[Scummvm-cvs-logs] CVS: scummvm/scumm actor.cpp,1.245,1.246 actor.h,1.52,1.53 base-costume.cpp,2.11,2.12 base-costume.h,1.19,1.20 script_v6he.cpp,2.71,2.72

Travis Howell kirben at users.sourceforge.net
Mon Jun 28 22:37:02 CEST 2004


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

Modified Files:
	actor.cpp actor.h base-costume.cpp base-costume.h 
	script_v6he.cpp 
Log Message:

Fix actorOps case 218/9 in HE games


Index: actor.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/actor.cpp,v
retrieving revision 1.245
retrieving revision 1.246
diff -u -d -r1.245 -r1.246
--- actor.cpp	27 Jun 2004 15:41:01 -0000	1.245
+++ actor.cpp	29 Jun 2004 05:36:01 -0000	1.246
@@ -57,6 +57,7 @@
 	walkbox = 0;
 	animProgress = 0;
 	skipLimb = false;
+	actor_draw_to_bg = false;
 	memset(animVariable, 0, sizeof(animVariable));
 	memset(palette, 0, sizeof(palette));
 	memset(sound, 0, sizeof(sound));
@@ -1017,6 +1018,7 @@
 
 	bcr->_draw_bottom = bottom = 0;
 	bcr->_skipLimb = (skipLimb != 0);
+	bcr->_actor_draw_to_bg = (actor_draw_to_bg != 0);
 
 	// If the actor is partially hidden, redraw it next frame.
 	// Only done for pre-AKOS, though.

Index: actor.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/actor.h,v
retrieving revision 1.52
retrieving revision 1.53
diff -u -d -r1.52 -r1.53
--- actor.h	16 Feb 2004 02:55:23 -0000	1.52
+++ actor.h	29 Jun 2004 05:36:01 -0000	1.53
@@ -108,6 +108,7 @@
 	uint16 talkScript, walkScript;
 	bool ignoreTurns;
 	bool skipLimb;
+	bool actor_draw_to_bg;
 	int8 layer;
 	uint16 sound[8];
 	CostumeData cost;

Index: base-costume.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/base-costume.cpp,v
retrieving revision 2.11
retrieving revision 2.12
diff -u -d -r2.11 -r2.12
--- base-costume.cpp	6 Jan 2004 12:45:29 -0000	2.11
+++ base-costume.cpp	29 Jun 2004 05:36:01 -0000	2.12
@@ -29,7 +29,11 @@
 	int i;
 	byte result = 0;
 
-	_outptr = vs.screenPtr + vs.xstart;
+	if (_actor_draw_to_bg)
+		_outptr = _vm->getResourceAddress(rtBuffer, 5) + vs.xstart;
+	else
+		_outptr = vs.screenPtr + vs.xstart;
+
 	_outwidth = vs.width;
 	_outheight = vs.height;
 	_numStrips = vs.width / 8;

Index: base-costume.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/base-costume.h,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- base-costume.h	4 Apr 2004 22:43:54 -0000	1.19
+++ base-costume.h	29 Jun 2004 05:36:01 -0000	1.20
@@ -62,6 +62,7 @@
 
 	int _draw_top, _draw_bottom;
 	bool _skipLimb;
+	bool _actor_draw_to_bg;
 
 
 protected:
@@ -116,6 +117,7 @@
 		_mirror = false;
 		_width = _height = 0;
 		_skipLimb = 0;
+		_actor_draw_to_bg = 0;
 
 		
 		_outptr = 0;

Index: script_v6he.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v6he.cpp,v
retrieving revision 2.71
retrieving revision 2.72
diff -u -d -r2.71 -r2.72
--- script_v6he.cpp	29 Jun 2004 01:34:42 -0000	2.71
+++ script_v6he.cpp	29 Jun 2004 05:36:01 -0000	2.72
@@ -675,15 +675,12 @@
 		break;
 	case 218:		
 		{
-			// TODO: this opcode is used in the putt-putt fun pack, in 'checkers" mini game
-			// and in fbear at original save screen
-
 			int top_actor = a->top;
 			int bottom_actor = a->bottom;
-			a->forceClip = 1;
+			a->actor_draw_to_bg = true;
 			a->needRedraw = true;
 			a->drawActorCostume();
-			a->forceClip = 0;
+			a->actor_draw_to_bg = false;
 			a->needRedraw = true;
 			a->drawActorCostume();
 			a->needRedraw = false;
@@ -693,12 +690,10 @@
 			if (a->bottom < bottom_actor)
 				a->bottom = bottom_actor;
 
-			//FIXME Trigger redraw
-			a->bottom = top_actor;
 		}
 		break;
 	case 219:
-		a->forceClip = false;
+		a->actor_draw_to_bg = false;
 		a->needRedraw = true;
 		a->needBgReset = true;
 		break;
@@ -887,10 +882,7 @@
 	int vs = 0; // XXX = gdi_virtScreen;
 
 	for (int j = y1; j <= y2; ++j) {
-		// FIXME - to match the disassembly, we should save buffer (vs + 5),
-		// but if we do that, then the cake decoration in Fatty Bear's Birthday 
-		// Surprise is not saved at all
-		uint8 *p = getResourceAddress(rtBuffer, vs + 1);
+		uint8 *p = getResourceAddress(rtBuffer, vs + 5);
 		p += virtscr[kMainVirtScreen].xstart;
 		p += (j - virtscr[kMainVirtScreen].topline) * 320 + x1;
 		





More information about the Scummvm-git-logs mailing list