diff options
author | Max Horn | 2005-05-15 09:46:34 +0000 |
---|---|---|
committer | Max Horn | 2005-05-15 09:46:34 +0000 |
commit | 75ffec581ff8eaf040bfc6292e034528923352e4 (patch) | |
tree | e6f66285cbf544fdb618c4b7e6aa75cfa6b6136a /scumm/actor.cpp | |
parent | 380f187eeba1f7e00bcf62183db26f72157aa2a9 (diff) | |
download | scummvm-rg350-75ffec581ff8eaf040bfc6292e034528923352e4.tar.gz scummvm-rg350-75ffec581ff8eaf040bfc6292e034528923352e4.tar.bz2 scummvm-rg350-75ffec581ff8eaf040bfc6292e034528923352e4.zip |
Added AuxBlock::reset() method; moved aux related code to ScummEngine_v71he class
svn-id: r18102
Diffstat (limited to 'scumm/actor.cpp')
-rw-r--r-- | scumm/actor.cpp | 32 |
1 files changed, 8 insertions, 24 deletions
diff --git a/scumm/actor.cpp b/scumm/actor.cpp index a9e49addd9..a48d6429a1 100644 --- a/scumm/actor.cpp +++ b/scumm/actor.cpp @@ -147,11 +147,7 @@ void Actor::initActor(int mode) { _clipOverride = _vm->_actorClipOverride; - _auxBlock.visible = false; - _auxBlock.r.left = 0; - _auxBlock.r.top = 0; - _auxBlock.r.right = -1; - _auxBlock.r.bottom = -1; + _auxBlock.reset(); _hePaletteNum = 0; _vm->_classData[_number] = (_vm->_version >= 7) ? _vm->_classData[0] : 0; @@ -506,11 +502,7 @@ void Actor::startAnimActor(int f) { // Causes Zak to lose his body in several scenes, see bug #771508 if (_vm->_version >= 3 && f == _initFrame) { _cost.reset(); - _auxBlock.visible = false; - _auxBlock.r.left = 0; - _auxBlock.r.top = 0; - _auxBlock.r.right = -1; - _auxBlock.r.bottom = -1; + _auxBlock.reset(); } _vm->_costumeLoader->costumeDecodeData(this, f, (uint) - 1); _frame = f; @@ -639,7 +631,7 @@ void Actor::putActor(int dstX, int dstY, byte newRoom) { adjustActorPos(); } else { if (_vm->_heversion >= 71) - _vm->queueAuxBlock(this); + ((ScummEngine_v71he *)_vm)->queueAuxBlock(this); hideActor(); } } else { @@ -801,11 +793,7 @@ void Actor::hideActor() { _cost.soundCounter = 0; _needRedraw = false; _needBgReset = true; - _auxBlock.visible = false; - _auxBlock.r.left = 0; - _auxBlock.r.top = 0; - _auxBlock.r.right = -1; - _auxBlock.r.bottom = -1; + _auxBlock.reset(); } void Actor::showActor() { @@ -1443,15 +1431,11 @@ void Actor::setActorCostume(int c) { memset(_animVariable, 0, sizeof(_animVariable)); if (_vm->_heversion >= 71) - _vm->queueAuxBlock(this); + ((ScummEngine_v71he *)_vm)->queueAuxBlock(this); _costume = c; _cost.reset(); - _auxBlock.visible = false; - _auxBlock.r.left = 0; - _auxBlock.r.top = 0; - _auxBlock.r.right = -1; - _auxBlock.r.bottom = -1; + _auxBlock.reset(); if (_visible) { if (_costume) { @@ -2058,7 +2042,7 @@ void ScummEngine_v71he::postProcessAuxQueue() { } #endif -void ScummEngine::queueAuxBlock(Actor *a) { +void ScummEngine_v71he::queueAuxBlock(Actor *a) { if (!a->_auxBlock.visible) return; @@ -2067,7 +2051,7 @@ void ScummEngine::queueAuxBlock(Actor *a) { ++_auxBlocksNum; } -void ScummEngine::queueAuxEntry(int actorNum, int subIndex) { +void ScummEngine_v71he::queueAuxEntry(int actorNum, int subIndex) { assert(_auxEntriesNum < ARRAYSIZE(_auxEntries)); AuxEntry *ae = &_auxEntries[_auxEntriesNum]; ae->actorNum = actorNum; |