[Scummvm-cvs-logs] SF.net SVN: scummvm:[35311] scummvm/trunk/engines/gob
drmccoy at users.sourceforge.net
drmccoy at users.sourceforge.net
Fri Dec 12 05:31:01 CET 2008
Revision: 35311
http://scummvm.svn.sourceforge.net/scummvm/?rev=35311&view=rev
Author: drmccoy
Date: 2008-12-12 04:31:01 +0000 (Fri, 12 Dec 2008)
Log Message:
-----------
Text now works in Urban Runner
Modified Paths:
--------------
scummvm/trunk/engines/gob/draw_v2.cpp
scummvm/trunk/engines/gob/driver_vga.cpp
scummvm/trunk/engines/gob/video.h
Modified: scummvm/trunk/engines/gob/draw_v2.cpp
===================================================================
--- scummvm/trunk/engines/gob/draw_v2.cpp 2008-12-12 02:44:34 UTC (rev 35310)
+++ scummvm/trunk/engines/gob/draw_v2.cpp 2008-12-12 04:31:01 UTC (rev 35311)
@@ -792,11 +792,6 @@
break;
case DRAW_PRINTTEXT:
- if (_vm->getGameType() == kGameTypeUrban) {
- warning("Urban Stub: Print text \"%s\"", _textToPrint);
- break;
- }
-
len = strlen(_textToPrint);
left = _destSpriteX;
Modified: scummvm/trunk/engines/gob/driver_vga.cpp
===================================================================
--- scummvm/trunk/engines/gob/driver_vga.cpp 2008-12-12 02:44:34 UTC (rev 35310)
+++ scummvm/trunk/engines/gob/driver_vga.cpp 2008-12-12 04:31:01 UTC (rev 35311)
@@ -79,21 +79,33 @@
(item - fontDesc->startItem) * (fontDesc->itemSize & 0xFF);
dst = dest->getVidMem() + x + dest->getWidth() * y;
+ int nWidth = fontDesc->itemWidth;
+
+ if (nWidth & 7)
+ nWidth = (nWidth & 0xF8) + 8;
+
+ nWidth >>= 3;
+
for (int i = 0; i < fontDesc->itemHeight; i++) {
- data = READ_BE_UINT16(src);
- src += 2;
- if (fontDesc->itemWidth <= 8)
- src--;
+ int width = fontDesc->itemWidth;
- for (int j = 0; j < fontDesc->itemWidth; j++) {
- if (data & 0x8000)
- *dst = color2;
- else if (color1 == 0)
- *dst = transp;
+ for (int k = 0; k < nWidth; k++) {
+
+ data = *src++;
+ for (int j = 0; j < MIN(8, width); j++) {
+ if (data & 0x80)
+ *dst = color2;
+ else if (color1 == 0)
+ *dst = transp;
- dst++;
- data <<= 1;
+ dst++;
+ data <<= 1;
+ }
+
+ width -= 8;
+
}
+
dst += dest->getWidth() - fontDesc->itemWidth;
}
}
Modified: scummvm/trunk/engines/gob/video.h
===================================================================
--- scummvm/trunk/engines/gob/video.h 2008-12-12 02:44:34 UTC (rev 35310)
+++ scummvm/trunk/engines/gob/video.h 2008-12-12 04:31:01 UTC (rev 35311)
@@ -69,8 +69,8 @@
byte *dataPtr;
int8 itemWidth;
int8 itemHeight;
- int8 startItem;
- int8 endItem;
+ uint8 startItem;
+ uint8 endItem;
int8 itemSize;
int8 bitWidth;
byte *extraData;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list