[Scummvm-cvs-logs] CVS: scummvm/gob driver_vga.cpp,1.2,1.3 game.cpp,1.5,1.6 inter.cpp,1.4,1.5 util.cpp,1.6,1.7

Eugene Sandulenko sev at users.sourceforge.net
Wed Apr 6 07:35:03 CEST 2005


Update of /cvsroot/scummvm/scummvm/gob
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24196

Modified Files:
	driver_vga.cpp game.cpp inter.cpp util.cpp 
Log Message:
o Implemented pDrawLetter
o F5 now can be used to open menu
o Minor cleanup


Index: driver_vga.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gob/driver_vga.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- driver_vga.cpp	5 Apr 2005 15:53:16 -0000	1.2
+++ driver_vga.cpp	6 Apr 2005 14:33:31 -0000	1.3
@@ -65,7 +65,31 @@
 }
 
 void VGAVideoDriver::drawLetter(char item, int16 x, int16 y, FontDesc *fontDesc, byte color1, byte color2, byte transp, SurfaceDesc *dest) {
-	STUB_FUNC;
+	byte *src, *dst;
+	uint16 data;
+	int i, j;
+	
+	src = (byte *)fontDesc->dataPtr + (item - fontDesc->startItem) * (fontDesc->itemSize & 0xff);
+	dst = dest->vidPtr + x + dest->width * y;
+
+	for (i = 0; i < fontDesc->itemHeight; i++) {
+		data = READ_BE_UINT16(src);
+		src += 2;
+		if (fontDesc->itemSize <= 8)
+			src--;
+
+		for (j = 0; j < fontDesc->itemWidth; j++) {
+			if (data & 0x8000) {
+				*dst = color2;
+			} else {
+				if (color1 == 0)
+					*dst = transp;
+			}
+			dst++;
+			data <<= 1;
+		}
+		dst += dest->width - fontDesc->itemWidth;
+	}
 }
 
 void VGAVideoDriver::drawLine(SurfaceDesc *dest, int16 x0, int16 y0, int16 x1, int16 y1, byte color) {

Index: game.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gob/game.cpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- game.cpp	5 Apr 2005 17:50:32 -0000	1.5
+++ game.cpp	6 Apr 2005 14:33:31 -0000	1.6
@@ -840,7 +840,6 @@
 		case 0x3c00:	// F2
 		case 0x3d00:	// F3
 		case 0x3e00:	// F4
-		case 0x3f00:	// F5
 		case 0x4000:	// F6
 		case 0x4100:	// F7
 		case 0x4200:	// F8
@@ -1693,6 +1692,7 @@
 	char path[20];
 	int16 handle;
 
+	// If demo
 	if (game_totFileData[0x3d] != 0 && game_totFileData[0x3b] == 0)
 		return;
 

Index: inter.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gob/inter.cpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- inter.cpp	5 Apr 2005 18:08:01 -0000	1.4
+++ inter.cpp	6 Apr 2005 14:33:31 -0000	1.5
@@ -146,7 +146,7 @@
 	char buf[60];
 	int16 i;
 
-	debug(0, "inter_printText");
+	debug(3, "inter_printText");
 	draw_destSpriteX = parse_parseValExpr();
 	draw_destSpriteY = parse_parseValExpr();
 
@@ -811,9 +811,9 @@
 	debug(0, "inter_loadCursor");
 	id = inter_load16();
 	index = *inter_execPtr++;
-
 	itemPtr = &game_totResourceTable->items[id];
 	offset = itemPtr->offset;
+
 	if (offset >= 0) {
 		dataBuf =
 		    ((char *)game_totResourceTable) + szGame_TotResTable +
@@ -895,7 +895,6 @@
 	else if ((key & 0xff) != 0)
 		key &= 0xff;
 
-	debug(0, "key: %d", key);
 	WRITE_LE_UINT32(inter_variables, key);
 
 	if (key != 0)

Index: util.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gob/util.cpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- util.cpp	5 Apr 2005 18:08:01 -0000	1.6
+++ util.cpp	6 Apr 2005 14:33:31 -0000	1.7
@@ -47,9 +47,9 @@
 		int16 from;
 		int16 to;
 	} keys[] = {
-		{8, 0xe08   },	// Backspace
-		{13, 0x1C0D },	// Enter
-		{27, 0x11b  },	// ESC 
+		{8,   0x0e08},	// Backspace
+		{13,  0x1C0D},	// Enter
+		{27,  0x011b},	// ESC 
 		{127, 0x5300},	// Del
 		{273, 0x4800},	// Up arrow
 		{274, 0x5000},	// Down arrow
@@ -59,7 +59,7 @@
 		{283, 0x3c00},	// F2
 		{284, 0x3d00},	// F3
 		{285, 0x3E00},	// F4
-		{286, 0x3F00},	// F5
+		{286, 0x011b},	// F5
 		{287, 0x4000},	// F6
 		{288, 0x4100},	// F7
 		{289, 0x4200},	// F8
@@ -136,19 +136,11 @@
 }
 
 void util_getMouseState(int16 *pX, int16 *pY, int16 *pButtons) {
-//	int16 x = 0;
-//	int16 y = 0;
-//	int16 buttons = 0;
-
 	*pX = _mouseX;
 	*pY = _mouseY;
 
 	if (pButtons != 0)
 		*pButtons = _mouseButtons;
-//	if (pX != 0)
-//		*pX = x >> mouseXShift;
-//	if (pY != 0)
-//		*pY = y >> mouseYShift;
 }
 
 void util_setMousePos(int16 x, int16 y) {





More information about the Scummvm-git-logs mailing list