[Scummvm-cvs-logs] SF.net SVN: scummvm: [23471] scummvm/trunk/engines/scumm

kirben at users.sourceforge.net kirben at users.sourceforge.net
Thu Jul 20 22:44:53 CEST 2006


Revision: 23471
          http://svn.sourceforge.net/scummvm/?rev=23471&view=rev
Author:   kirben
Date:     2006-07-10 03:14:10 -0700 (Mon, 10 Jul 2006)

Log Message:
-----------
Fix actor glitches in the stomach location of pajama3

Modified Paths:
--------------
    scummvm/trunk/engines/scumm/actor.cpp
    scummvm/trunk/engines/scumm/actor.h
    scummvm/trunk/engines/scumm/he/script_v100he.cpp
    scummvm/trunk/engines/scumm/he/script_v72he.cpp

Modified: scummvm/trunk/engines/scumm/actor.cpp
===================================================================
--- scummvm/trunk/engines/scumm/actor.cpp	2006-07-10 09:29:12 UTC (rev 23470)
+++ scummvm/trunk/engines/scumm/actor.cpp	2006-07-10 10:14:10 UTC (rev 23471)
@@ -154,6 +154,7 @@
 
 	_auxBlock.reset();
 	_hePaletteNum = 0;
+	_heFlags = 0;
 
 	_vm->_classData[_number] = (_vm->_game.version >= 7) ? _vm->_classData[0] : 0;
 }
@@ -1314,6 +1315,9 @@
 		clearGfxUsageBit(strip, USAGE_BIT_DIRTY);
 		clearGfxUsageBit(strip, USAGE_BIT_RESTORED);
 		for (j = 1; j < _numActors; j++) {
+			if (_actors[j]._heFlags & 1)
+				continue;
+
 			if (testGfxUsageBit(strip, j) &&
 				((_actors[j]._top != 0x7fffffff && _actors[j]._needRedraw) || _actors[j]._needBgReset)) {
 				clearGfxUsageBit(strip, j);
@@ -2046,6 +2050,15 @@
 		return isInClass(kObjectClassPlayer);
 }
 
+void Actor::setHEFlag(int bit, int set) {
+	// Note that condition is inverted
+	if (!set) {
+		_heFlags |= bit;
+	} else {
+		_heFlags &= ~bit;
+	}
+}
+
 void Actor::setUserCondition(int slot, int set) {
 	const int condMaskCode = (_vm->_game.heversion >= 85) ? 0x1FFF : 0x3FF;
 	checkRange(32, 1, slot, "Condition %d out of range");

Modified: scummvm/trunk/engines/scumm/actor.h
===================================================================
--- scummvm/trunk/engines/scumm/actor.h	2006-07-10 09:29:12 UTC (rev 23470)
+++ scummvm/trunk/engines/scumm/actor.h	2006-07-10 10:14:10 UTC (rev 23471)
@@ -143,6 +143,7 @@
 	uint32 _heCondMask;
 	uint32 _hePaletteNum;
 	uint32 _heXmapNum;
+	byte _heFlags;
 
 	AuxBlock _auxBlock;
 
@@ -274,6 +275,8 @@
 
 	void classChanged(int cls, bool value);
 
+	void setHEFlag(int bit, int set);
+
 	void setUserCondition(int slot, int set);
 	bool isUserConditionSet(int slot) const;
 

Modified: scummvm/trunk/engines/scumm/he/script_v100he.cpp
===================================================================
--- scummvm/trunk/engines/scumm/he/script_v100he.cpp	2006-07-10 09:29:12 UTC (rev 23470)
+++ scummvm/trunk/engines/scumm/he/script_v100he.cpp	2006-07-10 10:14:10 UTC (rev 23471)
@@ -442,8 +442,8 @@
 		a->initActor(0);
 		break;
 	case 32:
-		i = pop();
-		debug(0,"o100_actorOps: case 32 (%d)", i);
+		k = pop();
+		a->setHEFlag(1, k);
 		break;
 	case 52:		// SO_ACTOR_NAME
 		copyScriptString(string, sizeof(string));

Modified: scummvm/trunk/engines/scumm/he/script_v72he.cpp
===================================================================
--- scummvm/trunk/engines/scumm/he/script_v72he.cpp	2006-07-10 09:29:12 UTC (rev 23470)
+++ scummvm/trunk/engines/scumm/he/script_v72he.cpp	2006-07-10 10:14:10 UTC (rev 23471)
@@ -1127,7 +1127,7 @@
 		break;
 	case 68: // HE 90+
 		k = pop();
-		debug(0,"o72_actorOps: case 68 (%d)", k);
+		a->setHEFlag(1, k);
 		break;
 	case 76:		// SO_COSTUME
 		a->setActorCostume(pop());






More information about the Scummvm-git-logs mailing list