[Scummvm-cvs-logs] CVS: scummvm/scumm gfx.cpp,2.456,2.457 intern.h,2.498,2.499 script_v100he.cpp,2.153,2.154 script_v80he.cpp,2.115,2.116 script_v90he.cpp,2.256,2.257

kirben kirben at users.sourceforge.net
Sun May 22 03:42:46 CEST 2005


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

Modified Files:
	gfx.cpp intern.h script_v100he.cpp script_v80he.cpp 
	script_v90he.cpp 
Log Message:

HE70+ games use flags in drawBox().
Fixes glitches in farmdemo (Old version), freddi2, lost/smaller.


Index: gfx.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/gfx.cpp,v
retrieving revision 2.456
retrieving revision 2.457
diff -u -d -r2.456 -r2.457
--- gfx.cpp	21 May 2005 15:04:50 -0000	2.456
+++ gfx.cpp	22 May 2005 10:38:57 -0000	2.457
@@ -1049,18 +1049,27 @@
 	markRectAsDirty(vs->number, x, x2, y, y2);
 
 	backbuff = vs->getPixels(x, y);
+	bgbuff = vs->getBackPixels(x, y);
 
 	if (color == -1) {
 		if (vs->number != kMainVirtScreen)
 			error("can only copy bg to main window");
-		bgbuff = vs->getBackPixels(x, y);
 		blit(backbuff, vs->pitch, bgbuff, vs->pitch, width, height);
 		if (_charset->_hasMask) {
 			byte *mask = (byte *)_charset->_textSurface.pixels + _charset->_textSurface.pitch * (y - _screenTop) + x;
 			fill(mask, _charset->_textSurface.pitch, CHARSET_MASK_TRANSPARENCY, width, height);
 		}
 	} else {
-		fill(backbuff, vs->pitch, color, width, height);
+		// Flags are used for different methods in HE70+ games
+		if ((color & 0x2000) || (color & 0x4000)) {
+			error("drawBox: unsupported flag 0x%x", color);
+		} else if (color & 0x8000) {
+			color &= 0x7FFF;
+			fill(backbuff, vs->pitch, color, width, height);
+			fill(bgbuff, vs->pitch, color, width, height);
+		} else {
+			fill(backbuff, vs->pitch, color, width, height);
+		}
 	}
 }
 

Index: intern.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/intern.h,v
retrieving revision 2.498
retrieving revision 2.499
diff -u -d -r2.498 -r2.499
--- intern.h	21 May 2005 14:20:28 -0000	2.498
+++ intern.h	22 May 2005 10:38:57 -0000	2.499
@@ -1068,7 +1068,6 @@
 	void o80_writeConfigFile();
 	void o80_cursorCommand();
 	void o80_setState();
-	void o80_drawBox();
 	void o80_drawWizPolygon();
 	void o80_drawLine();
 	void o80_pickVarRandom();

Index: script_v100he.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v100he.cpp,v
retrieving revision 2.153
retrieving revision 2.154
diff -u -d -r2.153 -r2.154
--- script_v100he.cpp	22 May 2005 10:04:10 -0000	2.153
+++ script_v100he.cpp	22 May 2005 10:38:57 -0000	2.154
@@ -85,7 +85,7 @@
 		OPCODE(o6_div),
 		OPCODE(o6_animateActor),
 		OPCODE(o6_doSentence),
-		OPCODE(o80_drawBox),
+		OPCODE(o6_drawBox),
 		/* 24 */
 		OPCODE(o72_drawWizImage),
 		OPCODE(o80_drawWizPolygon),

Index: script_v80he.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v80he.cpp,v
retrieving revision 2.115
retrieving revision 2.116
diff -u -d -r2.115 -r2.116
--- script_v80he.cpp	21 May 2005 14:20:28 -0000	2.115
+++ script_v80he.cpp	22 May 2005 10:38:57 -0000	2.116
@@ -251,7 +251,7 @@
 		/* A4 */
 		OPCODE(o72_arrayOps),
 		OPCODE(o6_invalid),
-		OPCODE(o80_drawBox),
+		OPCODE(o6_drawBox),
 		OPCODE(o6_pop),
 		/* A8 */
 		OPCODE(o6_getActorWidth),
@@ -590,20 +590,6 @@
 	removeObjectFromDrawQue(obj);
 }
 
-void ScummEngine_v80he::o80_drawBox() {
-	int x, y, x2, y2, color;
-	color = pop();
-	y2 = pop();
-	x2 = pop();
-	y = pop();
-	x = pop();
-
-	if (color & 0x8000)
-		color &= 0x7FFF;
-
-	drawBox(x, y, x2, y2, color);
-}
-
 void ScummEngine_v80he::o80_drawWizPolygon() {
 	WizImage wi;
 	wi.x1 = wi.y1 = pop();

Index: script_v90he.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v90he.cpp,v
retrieving revision 2.256
retrieving revision 2.257
diff -u -d -r2.256 -r2.257
--- script_v90he.cpp	21 May 2005 14:20:28 -0000	2.256
+++ script_v90he.cpp	22 May 2005 10:38:57 -0000	2.257
@@ -250,7 +250,7 @@
 		/* A4 */
 		OPCODE(o72_arrayOps),
 		OPCODE(o90_fontUnk),
-		OPCODE(o80_drawBox),
+		OPCODE(o6_drawBox),
 		OPCODE(o6_pop),
 		/* A8 */
 		OPCODE(o6_getActorWidth),





More information about the Scummvm-git-logs mailing list