diff options
-rw-r--r-- | scumm/actor.cpp | 12 | ||||
-rw-r--r-- | scumm/actor.h | 1 | ||||
-rw-r--r-- | scumm/akos.cpp | 3 | ||||
-rw-r--r-- | scumm/base-costume.h | 4 | ||||
-rw-r--r-- | scumm/script_v6.cpp | 4 |
5 files changed, 22 insertions, 2 deletions
diff --git a/scumm/actor.cpp b/scumm/actor.cpp index 0342eb05ba..1787f44f1f 100644 --- a/scumm/actor.cpp +++ b/scumm/actor.cpp @@ -55,6 +55,7 @@ Actor::Actor() { frame = 0; walkbox = 0; animProgress = 0; + skipLimb = false; memset(animVariable, 0, sizeof(animVariable)); memset(palette, 0, sizeof(palette)); memset(sound, 0, sizeof(sound)); @@ -79,6 +80,7 @@ void Actor::initActor(int mode) { } elevation = 0; + skipLimb = false; width = 24; talkColor = 15; talkPosX = 0; @@ -989,6 +991,7 @@ void Actor::drawActorCostume() { } bcr->_draw_bottom = bottom = 0; + bcr->_skipLimb = (skipLimb != 0); // If the actor is partially hidden, redraw it next frame. // Only done for pre-AKOS, though. @@ -1205,6 +1208,12 @@ void ScummEngine::clearMsgQueue() { void Actor::setActorCostume(int c) { int i; + if ((_vm->_features & GF_HUMONGOUS) && (c == -1 || c == -2)) { + skipLimb = (c == -1); + needRedraw = true; + return; + } + costumeNeedsInit = true; if (_vm->_features & GF_NEW_COSTUMES) { @@ -1248,6 +1257,9 @@ void Actor::setActorCostume(int c) { for (i = 0; i < 32; i++) palette[i] = 0xFF; } + + skipLimb = false; + } void Actor::startWalkActor(int destX, int destY, int dir) { diff --git a/scumm/actor.h b/scumm/actor.h index 0cd475d91b..90e735516e 100644 --- a/scumm/actor.h +++ b/scumm/actor.h @@ -106,6 +106,7 @@ public: int16 talkPosX, talkPosY; uint16 talkScript, walkScript; bool ignoreTurns; + bool skipLimb; int8 layer; uint16 sound[8]; CostumeData cost; diff --git a/scumm/akos.cpp b/scumm/akos.cpp index c9cb5c84da..a92f416f9a 100644 --- a/scumm/akos.cpp +++ b/scumm/akos.cpp @@ -259,6 +259,9 @@ byte AkosRenderer::drawLimb(const CostumeData &cost, int limb) { byte result = 0; int xmoveCur, ymoveCur; + if (_skipLimb) + return 0; + if (!cost.active[limb] || cost.stopped & (1 << limb)) return 0; diff --git a/scumm/base-costume.h b/scumm/base-costume.h index a6d5116bac..29362797a8 100644 --- a/scumm/base-costume.h +++ b/scumm/base-costume.h @@ -61,6 +61,8 @@ public: byte _scaleX, _scaleY; int _draw_top, _draw_bottom; + bool _skipLimb; + protected: ScummEngine *_vm; @@ -113,6 +115,8 @@ public: _xmove = _ymove = 0; _mirror = false; _width = _height = 0; + _skipLimb = 0; + _outptr = 0; _outwidth = _outheight = 0; diff --git a/scumm/script_v6.cpp b/scumm/script_v6.cpp index e121ae9855..3e644a0b41 100644 --- a/scumm/script_v6.cpp +++ b/scumm/script_v6.cpp @@ -1784,10 +1784,10 @@ void ScummEngine_v6::o6_actorOps() { int top_actor = a->top; int bottom_actor = a->bottom; -// a->_zbuf = 1; ??? + a->forceClip = 1; a->needRedraw = true; a->drawActorCostume(); -// a->_zbuf = 0; ??? + a->forceClip = 0; a->needRedraw = true; a->drawActorCostume(); a->needRedraw = false; |