diff options
author | Travis Howell | 2006-07-10 10:14:10 +0000 |
---|---|---|
committer | Travis Howell | 2006-07-10 10:14:10 +0000 |
commit | 76e67fba9264cee212af40f327f60231d40e08eb (patch) | |
tree | f6af2024a635077c3f6a0fd2a0eef52fcc626203 | |
parent | d8e974ba72a5ed9faf43e1a8fcd5611f4606e9db (diff) | |
download | scummvm-rg350-76e67fba9264cee212af40f327f60231d40e08eb.tar.gz scummvm-rg350-76e67fba9264cee212af40f327f60231d40e08eb.tar.bz2 scummvm-rg350-76e67fba9264cee212af40f327f60231d40e08eb.zip |
Fix actor glitches in the stomach location of pajama3
svn-id: r23471
-rw-r--r-- | engines/scumm/actor.cpp | 13 | ||||
-rw-r--r-- | engines/scumm/actor.h | 3 | ||||
-rw-r--r-- | engines/scumm/he/script_v100he.cpp | 4 | ||||
-rw-r--r-- | engines/scumm/he/script_v72he.cpp | 2 |
4 files changed, 19 insertions, 3 deletions
diff --git a/engines/scumm/actor.cpp b/engines/scumm/actor.cpp index fb89554247..b8252adda7 100644 --- a/engines/scumm/actor.cpp +++ b/engines/scumm/actor.cpp @@ -154,6 +154,7 @@ void Actor::initActor(int mode) { _auxBlock.reset(); _hePaletteNum = 0; + _heFlags = 0; _vm->_classData[_number] = (_vm->_game.version >= 7) ? _vm->_classData[0] : 0; } @@ -1314,6 +1315,9 @@ void ScummEngine::resetActorBgs() { 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 @@ bool Actor::isPlayer() { 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"); diff --git a/engines/scumm/actor.h b/engines/scumm/actor.h index a164294815..151c272da9 100644 --- a/engines/scumm/actor.h +++ b/engines/scumm/actor.h @@ -143,6 +143,7 @@ public: uint32 _heCondMask; uint32 _hePaletteNum; uint32 _heXmapNum; + byte _heFlags; AuxBlock _auxBlock; @@ -274,6 +275,8 @@ public: void classChanged(int cls, bool value); + void setHEFlag(int bit, int set); + void setUserCondition(int slot, int set); bool isUserConditionSet(int slot) const; diff --git a/engines/scumm/he/script_v100he.cpp b/engines/scumm/he/script_v100he.cpp index e9d9a8074d..e824bff129 100644 --- a/engines/scumm/he/script_v100he.cpp +++ b/engines/scumm/he/script_v100he.cpp @@ -442,8 +442,8 @@ void ScummEngine_v100he::o100_actorOps() { 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)); diff --git a/engines/scumm/he/script_v72he.cpp b/engines/scumm/he/script_v72he.cpp index 50a4ab9a1f..a502df6929 100644 --- a/engines/scumm/he/script_v72he.cpp +++ b/engines/scumm/he/script_v72he.cpp @@ -1127,7 +1127,7 @@ void ScummEngine_v72he::o72_actorOps() { 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()); |