diff options
Diffstat (limited to 'engines/gnap')
-rw-r--r-- | engines/gnap/character.cpp | 460 | ||||
-rw-r--r-- | engines/gnap/character.h | 14 | ||||
-rw-r--r-- | engines/gnap/gnap.cpp | 610 | ||||
-rw-r--r-- | engines/gnap/gnap.h | 10 | ||||
-rw-r--r-- | engines/gnap/grid.cpp | 94 | ||||
-rw-r--r-- | engines/gnap/scenes/arcade.cpp | 9 | ||||
-rw-r--r-- | engines/gnap/scenes/group0.cpp | 432 | ||||
-rw-r--r-- | engines/gnap/scenes/group1.cpp | 456 | ||||
-rw-r--r-- | engines/gnap/scenes/group2.cpp | 170 | ||||
-rw-r--r-- | engines/gnap/scenes/group3.cpp | 146 | ||||
-rw-r--r-- | engines/gnap/scenes/group4.cpp | 182 |
11 files changed, 1297 insertions, 1286 deletions
diff --git a/engines/gnap/character.cpp b/engines/gnap/character.cpp index 84274877d9..8b6ea803c0 100644 --- a/engines/gnap/character.cpp +++ b/engines/gnap/character.cpp @@ -22,6 +22,7 @@ #include "gnap/gnap.h" #include "gnap/character.h" +#include "gnap/gamesys.h" namespace Gnap { @@ -29,12 +30,469 @@ Character::Character(GnapEngine *vm) : _vm(vm) { _pos = Common::Point(0, 0); _idleFacing = kDirNone; _actionStatus = 0; + _sequenceId = 0; + _sequenceDatNum = 0; + _id = 0; } Character::~Character() {} -PlayerGnap::PlayerGnap(GnapEngine * vm) : Character(vm) {} +PlayerGnap::PlayerGnap(GnapEngine * vm) : Character(vm) { + _gnapBrainPulseNum = 0; + _gnapBrainPulseRndValue = 0; +} + +int PlayerGnap::getSequenceId(int kind, int gridX, int gridY) { + int sequenceId = 0; + + switch (kind) { + case gskPullOutDevice: + if (gridX > 0 && gridY > 0) { + if (_pos.y > gridY) { + if (_pos.x > gridX) { + sequenceId = 0x83F; + _idleFacing = kDirUpLeft; + } else { + sequenceId = 0x83D; + _idleFacing = kDirUpRight; + } + } else { + if (_pos.x > gridX) { + sequenceId = 0x83B; + _idleFacing = kDirBottomLeft; + } else { + sequenceId = 0x839; + _idleFacing = kDirBottomRight; + } + } + } else { + switch (_idleFacing) { + case kDirBottomRight: + sequenceId = 0x839; + break; + case kDirBottomLeft: + sequenceId = 0x83B; + break; + case kDirUpRight: + sequenceId = 0x83D; + break; + default: + sequenceId = 0x83F; + break; + } + } + break; + + case gskPullOutDeviceNonWorking: + if (gridX > 0 && gridY > 0) { + if (_pos.y > gridY) { + if (_pos.x > gridX) { + sequenceId = 0x829; + _idleFacing = kDirUpLeft; + } else { + sequenceId = 0x828; + _idleFacing = kDirUpRight; + } + } else { + if (_pos.x > gridX) { + sequenceId = 0x827; + _idleFacing = kDirBottomLeft; + } else { + sequenceId = 0x826; + _idleFacing = kDirBottomRight; + } + } + } else { + switch (_idleFacing) { + case kDirBottomRight: + sequenceId = 0x826; + break; + case kDirBottomLeft: + sequenceId = 0x827; + break; + case kDirUpRight: + sequenceId = 0x828; + break; + default: + sequenceId = 0x829; + break; + } + } + break; + + case gskScratchingHead: + if (gridX > 0 && gridY > 0) { + if (_pos.y > gridY) { + if (_pos.x > gridX) { + sequenceId = 0x834; + _idleFacing = kDirBottomLeft; + } else { + sequenceId = 0x885; + _idleFacing = kDirUpRight; + } + } else { + if (_pos.x > gridX) { + sequenceId = 0x834; + _idleFacing = kDirBottomLeft; + } else { + sequenceId = 0x833; + _idleFacing = kDirBottomRight; + } + } + } else { + switch (_idleFacing) { + case kDirBottomRight: + sequenceId = 0x833; + _idleFacing = kDirBottomRight; + break; + case kDirBottomLeft: + sequenceId = 0x834; + _idleFacing = kDirBottomLeft; + break; + case kDirUpRight: + sequenceId = 0x885; + _idleFacing = kDirUpRight; + break; + default: + sequenceId = 0x834; + _idleFacing = kDirBottomLeft; + break; + } + } + break; + + case gskIdle: + if (gridX > 0 && gridY > 0) { + if (_pos.y > gridY) { + if (_pos.x > gridX) { + sequenceId = 0x7BC; + _idleFacing = kDirUpLeft; + } else { + sequenceId = 0x7BB; + _idleFacing = kDirUpRight; + } + } else { + if (_pos.x > gridX) { + sequenceId = 0x7BA; + _idleFacing = kDirBottomLeft; + } else { + sequenceId = 0x7B9; + _idleFacing = kDirBottomRight; + } + } + } else { + switch (_idleFacing) { + case kDirBottomRight: + sequenceId = 0x7B9; + break; + case kDirBottomLeft: + sequenceId = 0x7BA; + break; + case kDirUpRight: + sequenceId = 0x7BB; + break; + default: + sequenceId = 0x7BC; + break; + } + } + break; + + case gskBrainPulsating: + _gnapBrainPulseNum = (_gnapBrainPulseNum + 1) & 1; + if (gridX > 0 && gridY > 0) { + if (_pos.y > gridY) { + if (_pos.x > gridX) { + sequenceId = _gnapBrainPulseRndValue + _gnapBrainPulseNum + 0x812; + _idleFacing = kDirUpLeft; + } else { + sequenceId = _gnapBrainPulseRndValue + _gnapBrainPulseNum + 0x7FE; + _idleFacing = kDirUpRight; + } + } else { + if (_pos.x > gridX) { + sequenceId = _gnapBrainPulseRndValue + _gnapBrainPulseNum + 0x7D6; + _idleFacing = kDirBottomLeft; + } else { + sequenceId = _gnapBrainPulseRndValue + _gnapBrainPulseNum + 0x7EA; + _idleFacing = kDirBottomRight; + } + } + } else { + switch (_idleFacing) { + case kDirBottomRight: + sequenceId = _gnapBrainPulseRndValue + _gnapBrainPulseNum + 0x7EA; + break; + case kDirBottomLeft: + sequenceId = _gnapBrainPulseRndValue + _gnapBrainPulseNum + 0x7D6; + break; + case kDirUpRight: + sequenceId = _gnapBrainPulseRndValue + _gnapBrainPulseNum + 0x7FE; + break; + default: + sequenceId = _gnapBrainPulseRndValue + _gnapBrainPulseNum + 0x812; + break; + } + } + break; + + case gskImpossible: + if (gridX > 0 && gridY > 0) { + if (_pos.y > gridY) { + if (_pos.x > gridX) { + sequenceId = 0x831; + _idleFacing = kDirBottomLeft; + } else { + sequenceId = 0x7A8; + _idleFacing = kDirBottomRight; + } + } else { + if (_pos.x > gridX) { + sequenceId = 0x831; + _idleFacing = kDirBottomLeft; + } else { + if (_pos.x % 2) + sequenceId = 0x7A8; + else + sequenceId = 0x89A; + _idleFacing = kDirBottomRight; + } + } + } else if (_idleFacing != kDirBottomRight && _idleFacing != kDirUpRight) { + sequenceId = 0x831; + _idleFacing = kDirBottomLeft; + } else { + if (_vm->_currentSceneNum % 2) + sequenceId = 0x7A8; + else + sequenceId = 0x89A; + _idleFacing = kDirBottomRight; + } + break; + + case gskDeflect: + if (gridX > 0 && gridY > 0) { + if (_pos.y > gridY) { + if (_pos.x > gridX) { + sequenceId = 0x830; + _idleFacing = kDirUpLeft; + } else { + sequenceId = 0x82F; + _idleFacing = kDirUpRight; + } + } else { + if (_pos.x > gridX) { + sequenceId = 0x82E; + _idleFacing = kDirBottomLeft; + } else { + sequenceId = 0x7A7; + _idleFacing = kDirBottomRight; + } + } + } else { + switch (_idleFacing) { + case kDirBottomRight: + sequenceId = 0x7A7; + break; + case kDirBottomLeft: + sequenceId = 0x82E; + break; + case kDirUpLeft: + sequenceId = 0x830; + break; + case kDirUpRight: + sequenceId = 0x82F; + break; + case kDirNone: + case kDirUnk4: + break; + } + } + break; + + case gskUseDevice: + switch (_idleFacing) { + case kDirBottomRight: + sequenceId = 0x83A; + break; + case kDirBottomLeft: + sequenceId = 0x83C; + break; + case kDirUpLeft: + sequenceId = 0x840; + break; + case kDirUpRight: + sequenceId = 0x83E; + break; + case kDirNone: + case kDirUnk4: + break; + } + break; + + case gskMoan1: + if (gridX > 0 && gridY > 0) { + if (_pos.y > gridY) { + if (_pos.x > gridX) { + sequenceId = 0x832; + _idleFacing = kDirBottomLeft; + } else { + sequenceId = 0x7AA; + _idleFacing = kDirBottomRight; + } + } else { + if (_pos.x > gridX) { + sequenceId = 0x832; + _idleFacing = kDirBottomLeft; + } else { + sequenceId = 0x7AA; + _idleFacing = kDirBottomRight; + } + } + } else if (_idleFacing != kDirBottomRight && _idleFacing != kDirUpRight) { + sequenceId = 0x832; + _idleFacing = kDirBottomLeft; + } else { + sequenceId = 0x7AA; + _idleFacing = kDirBottomRight; + } + break; + + case gskMoan2: + if (gridX > 0 && gridY > 0) { + if (_pos.y > gridY) { + if (_pos.x > gridX) { + sequenceId = 0x832; + _idleFacing = kDirBottomLeft; + } else { + sequenceId = 0x7AA; + _idleFacing = kDirBottomRight; + } + } else { + if (_pos.x > gridX) { + sequenceId = 0x832; + _idleFacing = kDirBottomLeft; + } else { + sequenceId = 0x7AA; + _idleFacing = kDirBottomRight; + } + } + } else if (_idleFacing != kDirBottomRight && _idleFacing != kDirUpRight) { + sequenceId = 0x832; + _idleFacing = kDirBottomLeft; + } else { + sequenceId = 0x7AA; + _idleFacing = kDirBottomRight; + } + break; + } + + return sequenceId | 0x10000; +} + +void PlayerGnap::useJointOnPlatypus() { + _vm->setGrabCursorSprite(-1); + if (_vm->gnapPlatypusAction(1, 0, 0x107C1, 0)) { + _actionStatus = 100; + _vm->_gameSys->setAnimation(0, 0, 1); + _vm->_gameSys->setAnimation(0x10876, _vm->_plat->_id, 0); + _vm->_gameSys->insertSequence(0x10875, _id, + makeRid(_sequenceDatNum, _sequenceId), _id, + kSeqSyncWait, 0, 15 * (5 * _pos.x - 30), 48 * (_pos.y - 7)); + _sequenceDatNum = 1; + _sequenceId = 0x875; + _vm->_gameSys->insertSequence(0x10876, _vm->_plat->_id, + _vm->_plat->_sequenceId | (_vm->_plat->_sequenceDatNum << 16), _vm->_plat->_id, + kSeqSyncWait, 0, 15 * (5 * _vm->_plat->_pos.x - 25), 48 * (_vm->_plat->_pos.y - 7)); + _vm->_plat->_sequenceDatNum = 1; + _vm->_plat->_sequenceId = 0x876; + _vm->_plat->_idleFacing = kDirNone; + _vm->playGnapSequence(0x107B5); + _vm->gnapWalkStep(); + while (_vm->_gameSys->getAnimationStatus(0) != 2) { + _vm->updateMouseCursor(); + _vm->gameUpdateTick(); + } + _vm->_gameSys->setAnimation(0, 0, 0); + _actionStatus = -1; + } else { + _vm->playGnapSequence(getSequenceId(gskScratchingHead, _vm->_plat->_pos.x, _vm->_plat->_pos.y) | 0x10000); + } +} + +void PlayerGnap::kissPlatypus(int callback) { + if (_vm->gnapPlatypusAction(-1, 0, 0x107D1, callback)) { + _actionStatus = 100; + _vm->_gameSys->setAnimation(0, 0, 1); + _vm->_gameSys->setAnimation(0x10847, _id, 0); + _vm->_gameSys->insertSequence(0x10847, _id, + makeRid(_sequenceDatNum, _sequenceId), _id, + kSeqSyncWait, 0, 15 * (5 * _pos.x - 20) - (21 - _vm->_gridMinX), 48 * (_pos.y - 6) - (146 - _vm->_gridMinY)); + _sequenceDatNum = 1; + _sequenceId = 0x847; + _vm->_gameSys->insertSequence(0x107CB, _vm->_plat->_id, + makeRid(_vm->_plat->_sequenceDatNum, _vm->_plat->_sequenceId), _vm->_plat->_id, + kSeqSyncWait, _vm->getSequenceTotalDuration(0x10847), 75 * _vm->_plat->_pos.x - _vm->_platGridX, 48 * _vm->_plat->_pos.y - _vm->_platGridY); + _vm->_plat->_sequenceDatNum = 1; + _vm->_plat->_sequenceId = 0x7CB; + _vm->_plat->_idleFacing = kDirNone; + _vm->playGnapSequence(0x107B5); + while (_vm->_gameSys->getAnimationStatus(0) != 2) { + _vm->updateMouseCursor(); + _vm->doCallback(callback); + _vm->gameUpdateTick(); + } + _vm->_gameSys->setAnimation(0, 0, 0); + _actionStatus = -1; + } else { + _vm->playGnapSequence(getSequenceId(gskScratchingHead, _vm->_plat->_pos.x, _vm->_plat->_pos.y) | 0x10000); + } +} + +void PlayerGnap::useDeviceOnPlatypus() { + _vm->playGnapSequence(makeRid(1, getSequenceId(gskPullOutDevice, _vm->_plat->_pos.x, _vm->_plat->_pos.y))); + + if (_vm->_plat->_idleFacing != kDirNone) { + _vm->_gameSys->insertSequence(makeRid(1, 0x7D5), _vm->_plat->_id, + makeRid(_vm->_plat->_sequenceDatNum, _vm->_plat->_sequenceId), _vm->_plat->_id, + kSeqSyncWait, 0, 75 * _vm->_plat->_pos.x - _vm->_platGridX, 48 * _vm->_plat->_pos.y - _vm->_platGridY); + _vm->_plat->_sequenceId = 0x7D5; + _vm->_plat->_sequenceDatNum = 1; + } else { + _vm->_gameSys->insertSequence(makeRid(1, 0x7D4), _vm->_plat->_id, + makeRid(_vm->_plat->_sequenceDatNum, _vm->_plat->_sequenceId), _vm->_plat->_id, + kSeqSyncWait, 0, 75 * _vm->_plat->_pos.x - _vm->_platGridX, 48 * _vm->_plat->_pos.y - _vm->_platGridY); + _vm->_plat->_sequenceId = 0x7D4; + _vm->_plat->_sequenceDatNum = 1; + } + + int newSequenceId = getSequenceId(gskUseDevice, 0, 0); + _vm->_gameSys->insertSequence(makeRid(1, newSequenceId), _id, + makeRid(_sequenceDatNum, _sequenceId), _id, + kSeqSyncWait, 0, 75 * _pos.x - _vm->_gnapGridX, 48 * _pos.y - _vm->_gnapGridY); + _sequenceId = newSequenceId; + _sequenceDatNum = 1; +} + +void PlayerGnap::initBrainPulseRndValue() { + _gnapBrainPulseRndValue = 2 * _vm->getRandom(10); +} + +/************************************************************************************************/ PlayerPlat::PlayerPlat(GnapEngine * vm) : Character(vm) {} +int PlayerPlat::getSequenceId(int kind, int gridX, int gridY) { + // The original had 3 parameters, all always set to 0. + // The code to handle the other values has been removed. + + int sequenceId = 0x7CB; + + if (_idleFacing != kDirNone) { + sequenceId = 0x7CC; + _idleFacing = kDirUnk4; + } + + return sequenceId | 0x10000; +} } // End of namespace Gnap diff --git a/engines/gnap/character.h b/engines/gnap/character.h index 4f5282435f..1a05548bae 100644 --- a/engines/gnap/character.h +++ b/engines/gnap/character.h @@ -41,9 +41,14 @@ public: Character(GnapEngine *vm); ~Character(); + virtual int getSequenceId(int kind, int gridX, int gridY) = 0; + Common::Point _pos; Facing _idleFacing; int _actionStatus; + int _sequenceId; + int _sequenceDatNum; + int _id; protected: GnapEngine *_vm; @@ -52,11 +57,20 @@ protected: class PlayerGnap : public Character { public: PlayerGnap(GnapEngine *vm); + virtual int getSequenceId(int kind, int gridX, int gridY); + + void initBrainPulseRndValue(); + void kissPlatypus(int callback); + void useDeviceOnPlatypus(); + void useJointOnPlatypus(); + + int _gnapBrainPulseNum, _gnapBrainPulseRndValue; }; class PlayerPlat : public Character { public: PlayerPlat(GnapEngine *vm); + virtual int getSequenceId(int kind = 0, int gridX = 0, int gridY = 0); }; } // End of namespace Gnap diff --git a/engines/gnap/gnap.cpp b/engines/gnap/gnap.cpp index d02321a8f5..c020d752b6 100644 --- a/engines/gnap/gnap.cpp +++ b/engines/gnap/gnap.cpp @@ -735,7 +735,7 @@ void GnapEngine::initScene() { _newSceneNum = 55; _gnap->_actionStatus = -1; _plat->_actionStatus = -1; - gnapInitBrainPulseRndValue(); + _gnap->initBrainPulseRndValue(); hideCursor(); clearAllKeyStatus1(); _mouseClickState._left = false; @@ -941,354 +941,6 @@ void GnapEngine::deleteSurface(Graphics::Surface **surface) { } } -int GnapEngine::getGnapSequenceId(int kind, int gridX, int gridY) { - int sequenceId = 0; - - switch (kind) { - case gskPullOutDevice: - if (gridX > 0 && gridY > 0) { - if (_gnap->_pos.y > gridY) { - if (_gnap->_pos.x > gridX) { - sequenceId = 0x83F; - _gnap->_idleFacing = kDirUpLeft; - } else { - sequenceId = 0x83D; - _gnap->_idleFacing = kDirUpRight; - } - } else { - if (_gnap->_pos.x > gridX) { - sequenceId = 0x83B; - _gnap->_idleFacing = kDirBottomLeft; - } else { - sequenceId = 0x839; - _gnap->_idleFacing = kDirBottomRight; - } - } - } else { - switch (_gnap->_idleFacing) { - case kDirBottomRight: - sequenceId = 0x839; - break; - case kDirBottomLeft: - sequenceId = 0x83B; - break; - case kDirUpRight: - sequenceId = 0x83D; - break; - default: - sequenceId = 0x83F; - break; - } - } - break; - - case gskPullOutDeviceNonWorking: - if (gridX > 0 && gridY > 0) { - if (_gnap->_pos.y > gridY) { - if (_gnap->_pos.x > gridX) { - sequenceId = 0x829; - _gnap->_idleFacing = kDirUpLeft; - } else { - sequenceId = 0x828; - _gnap->_idleFacing = kDirUpRight; - } - } else { - if (_gnap->_pos.x > gridX) { - sequenceId = 0x827; - _gnap->_idleFacing = kDirBottomLeft; - } else { - sequenceId = 0x826; - _gnap->_idleFacing = kDirBottomRight; - } - } - } else { - switch (_gnap->_idleFacing) { - case kDirBottomRight: - sequenceId = 0x826; - break; - case kDirBottomLeft: - sequenceId = 0x827; - break; - case kDirUpRight: - sequenceId = 0x828; - break; - default: - sequenceId = 0x829; - break; - } - } - break; - - case gskScratchingHead: - if (gridX > 0 && gridY > 0) { - if (_gnap->_pos.y > gridY) { - if (_gnap->_pos.x > gridX) { - sequenceId = 0x834; - _gnap->_idleFacing = kDirBottomLeft; - } else { - sequenceId = 0x885; - _gnap->_idleFacing = kDirUpRight; - } - } else { - if (_gnap->_pos.x > gridX) { - sequenceId = 0x834; - _gnap->_idleFacing = kDirBottomLeft; - } else { - sequenceId = 0x833; - _gnap->_idleFacing = kDirBottomRight; - } - } - } else { - switch (_gnap->_idleFacing) { - case kDirBottomRight: - sequenceId = 0x833; - _gnap->_idleFacing = kDirBottomRight; - break; - case kDirBottomLeft: - sequenceId = 0x834; - _gnap->_idleFacing = kDirBottomLeft; - break; - case kDirUpRight: - sequenceId = 0x885; - _gnap->_idleFacing = kDirUpRight; - break; - default: - sequenceId = 0x834; - _gnap->_idleFacing = kDirBottomLeft; - break; - } - } - break; - - case gskIdle: - if (gridX > 0 && gridY > 0) { - if (_gnap->_pos.y > gridY) { - if (_gnap->_pos.x > gridX) { - sequenceId = 0x7BC; - _gnap->_idleFacing = kDirUpLeft; - } else { - sequenceId = 0x7BB; - _gnap->_idleFacing = kDirUpRight; - } - } else { - if (_gnap->_pos.x > gridX) { - sequenceId = 0x7BA; - _gnap->_idleFacing = kDirBottomLeft; - } else { - sequenceId = 0x7B9; - _gnap->_idleFacing = kDirBottomRight; - } - } - } else { - switch (_gnap->_idleFacing) { - case kDirBottomRight: - sequenceId = 0x7B9; - break; - case kDirBottomLeft: - sequenceId = 0x7BA; - break; - case kDirUpRight: - sequenceId = 0x7BB; - break; - default: - sequenceId = 0x7BC; - break; - } - } - break; - - case gskBrainPulsating: - _gnapBrainPulseNum = (_gnapBrainPulseNum + 1) & 1; - if (gridX > 0 && gridY > 0) { - if (_gnap->_pos.y > gridY) { - if (_gnap->_pos.x > gridX) { - sequenceId = _gnapBrainPulseRndValue + _gnapBrainPulseNum + 0x812; - _gnap->_idleFacing = kDirUpLeft; - } else { - sequenceId = _gnapBrainPulseRndValue + _gnapBrainPulseNum + 0x7FE; - _gnap->_idleFacing = kDirUpRight; - } - } else { - if (_gnap->_pos.x > gridX) { - sequenceId = _gnapBrainPulseRndValue + _gnapBrainPulseNum + 0x7D6; - _gnap->_idleFacing = kDirBottomLeft; - } else { - sequenceId = _gnapBrainPulseRndValue + _gnapBrainPulseNum + 0x7EA; - _gnap->_idleFacing = kDirBottomRight; - } - } - } else { - switch (_gnap->_idleFacing) { - case kDirBottomRight: - sequenceId = _gnapBrainPulseRndValue + _gnapBrainPulseNum + 0x7EA; - break; - case kDirBottomLeft: - sequenceId = _gnapBrainPulseRndValue + _gnapBrainPulseNum + 0x7D6; - break; - case kDirUpRight: - sequenceId = _gnapBrainPulseRndValue + _gnapBrainPulseNum + 0x7FE; - break; - default: - sequenceId = _gnapBrainPulseRndValue + _gnapBrainPulseNum + 0x812; - break; - } - } - break; - - case gskImpossible: - if (gridX > 0 && gridY > 0) { - if (_gnap->_pos.y > gridY) { - if (_gnap->_pos.x > gridX) { - sequenceId = 0x831; - _gnap->_idleFacing = kDirBottomLeft; - } else { - sequenceId = 0x7A8; - _gnap->_idleFacing = kDirBottomRight; - } - } else { - if (_gnap->_pos.x > gridX) { - sequenceId = 0x831; - _gnap->_idleFacing = kDirBottomLeft; - } else { - if (_gnap->_pos.x % 2) - sequenceId = 0x7A8; - else - sequenceId = 0x89A; - _gnap->_idleFacing = kDirBottomRight; - } - } - } else if (_gnap->_idleFacing != kDirBottomRight && _gnap->_idleFacing != kDirUpRight) { - sequenceId = 0x831; - _gnap->_idleFacing = kDirBottomLeft; - } else { - if (_currentSceneNum % 2) - sequenceId = 0x7A8; - else - sequenceId = 0x89A; - _gnap->_idleFacing = kDirBottomRight; - } - break; - - case gskDeflect: - if (gridX > 0 && gridY > 0) { - if (_gnap->_pos.y > gridY) { - if (_gnap->_pos.x > gridX) { - sequenceId = 0x830; - _gnap->_idleFacing = kDirUpLeft; - } else { - sequenceId = 0x82F; - _gnap->_idleFacing = kDirUpRight; - } - } else { - if (_gnap->_pos.x > gridX) { - sequenceId = 0x82E; - _gnap->_idleFacing = kDirBottomLeft; - } else { - sequenceId = 0x7A7; - _gnap->_idleFacing = kDirBottomRight; - } - } - } else { - switch (_gnap->_idleFacing) { - case kDirBottomRight: - sequenceId = 0x7A7; - break; - case kDirBottomLeft: - sequenceId = 0x82E; - break; - case kDirUpLeft: - sequenceId = 0x830; - break; - case kDirUpRight: - sequenceId = 0x82F; - break; - case kDirNone: - case kDirUnk4: - break; - } - } - break; - - case gskUseDevice: - switch (_gnap->_idleFacing) { - case kDirBottomRight: - sequenceId = 0x83A; - break; - case kDirBottomLeft: - sequenceId = 0x83C; - break; - case kDirUpLeft: - sequenceId = 0x840; - break; - case kDirUpRight: - sequenceId = 0x83E; - break; - case kDirNone: - case kDirUnk4: - break; - } - break; - - case gskMoan1: - if (gridX > 0 && gridY > 0) { - if (_gnap->_pos.y > gridY) { - if (_gnap->_pos.x > gridX) { - sequenceId = 0x832; - _gnap->_idleFacing = kDirBottomLeft; - } else { - sequenceId = 0x7AA; - _gnap->_idleFacing = kDirBottomRight; - } - } else { - if (_gnap->_pos.x > gridX) { - sequenceId = 0x832; - _gnap->_idleFacing = kDirBottomLeft; - } else { - sequenceId = 0x7AA; - _gnap->_idleFacing = kDirBottomRight; - } - } - } else if (_gnap->_idleFacing != kDirBottomRight && _gnap->_idleFacing != kDirUpRight) { - sequenceId = 0x832; - _gnap->_idleFacing = kDirBottomLeft; - } else { - sequenceId = 0x7AA; - _gnap->_idleFacing = kDirBottomRight; - } - break; - - case gskMoan2: - if (gridX > 0 && gridY > 0) { - if (_gnap->_pos.y > gridY) { - if (_gnap->_pos.x > gridX) { - sequenceId = 0x832; - _gnap->_idleFacing = kDirBottomLeft; - } else { - sequenceId = 0x7AA; - _gnap->_idleFacing = kDirBottomRight; - } - } else { - if (_gnap->_pos.x > gridX) { - sequenceId = 0x832; - _gnap->_idleFacing = kDirBottomLeft; - } else { - sequenceId = 0x7AA; - _gnap->_idleFacing = kDirBottomRight; - } - } - } else if (_gnap->_idleFacing != kDirBottomRight && _gnap->_idleFacing != kDirUpRight) { - sequenceId = 0x832; - _gnap->_idleFacing = kDirBottomLeft; - } else { - sequenceId = 0x7AA; - _gnap->_idleFacing = kDirBottomRight; - } - break; - } - - return sequenceId | 0x10000; -} - int GnapEngine::getGnapShowSequenceId(int index, int gridX, int gridY) { int sequenceId; Facing facing = _gnap->_idleFacing; @@ -1461,36 +1113,36 @@ int GnapEngine::getGnapShowSequenceId(int index, int gridX, int gridY) { //Skip 29 default: _gnap->_idleFacing = facing; - sequenceId = getGnapSequenceId(gskImpossible, 0, 0); + sequenceId = _gnap->getSequenceId(gskImpossible, 0, 0); break; } return sequenceId; } void GnapEngine::gnapIdle() { - if (_gnapSequenceId != -1 && _gnapSequenceDatNum == 1 && - (_gnapSequenceId == 0x7A6 || _gnapSequenceId == 0x7AA || - _gnapSequenceId == 0x832 || _gnapSequenceId == 0x841 || - _gnapSequenceId == 0x842 || _gnapSequenceId == 0x8A2 || - _gnapSequenceId == 0x833 || _gnapSequenceId == 0x834 || - _gnapSequenceId == 0x885 || _gnapSequenceId == 0x7A8 || - _gnapSequenceId == 0x831 || _gnapSequenceId == 0x89A)) { - _gameSys->insertSequence(getGnapSequenceId(gskIdle, 0, 0) | 0x10000, _gnapId, - makeRid(_gnapSequenceDatNum, _gnapSequenceId), _gnapId, + if (_gnap->_sequenceId != -1 && _gnap->_sequenceDatNum == 1 && + (_gnap->_sequenceId == 0x7A6 || _gnap->_sequenceId == 0x7AA || + _gnap->_sequenceId == 0x832 || _gnap->_sequenceId == 0x841 || + _gnap->_sequenceId == 0x842 || _gnap->_sequenceId == 0x8A2 || + _gnap->_sequenceId == 0x833 || _gnap->_sequenceId == 0x834 || + _gnap->_sequenceId == 0x885 || _gnap->_sequenceId == 0x7A8 || + _gnap->_sequenceId == 0x831 || _gnap->_sequenceId == 0x89A)) { + _gameSys->insertSequence(_gnap->getSequenceId(gskIdle, 0, 0) | 0x10000, _gnap->_id, + makeRid(_gnap->_sequenceDatNum, _gnap->_sequenceId), _gnap->_id, kSeqSyncExists, 0, 75 * _gnap->_pos.x - _gnapGridX, 48 * _gnap->_pos.y - _gnapGridY); - _gnapSequenceId = getGnapSequenceId(gskIdle, 0, 0); - _gnapSequenceDatNum = 1; + _gnap->_sequenceId = _gnap->getSequenceId(gskIdle, 0, 0); + _gnap->_sequenceDatNum = 1; } } void GnapEngine::gnapActionIdle(int sequenceId) { - if (_gnapSequenceId != -1 && ridToDatIndex(sequenceId) == _gnapSequenceDatNum && - ridToEntryIndex(sequenceId) == _gnapSequenceId) { - _gameSys->insertSequence(getGnapSequenceId(gskIdle, 0, 0) | 0x10000, _gnapId, - makeRid(_gnapSequenceDatNum, _gnapSequenceId), _gnapId, + if (_gnap->_sequenceId != -1 && ridToDatIndex(sequenceId) == _gnap->_sequenceDatNum && + ridToEntryIndex(sequenceId) == _gnap->_sequenceId) { + _gameSys->insertSequence(_gnap->getSequenceId(gskIdle, 0, 0) | 0x10000, _gnap->_id, + makeRid(_gnap->_sequenceDatNum, _gnap->_sequenceId), _gnap->_id, kSeqSyncExists, 0, 75 * _gnap->_pos.x - _gnapGridX, 48 * _gnap->_pos.y - _gnapGridY); - _gnapSequenceId = getGnapSequenceId(gskIdle, 0, 0); - _gnapSequenceDatNum = 1; + _gnap->_sequenceId = _gnap->getSequenceId(gskIdle, 0, 0); + _gnap->_sequenceDatNum = 1; } } @@ -1498,47 +1150,47 @@ void GnapEngine::playGnapSequence(int sequenceId) { _timers[2] = getRandom(30) + 20; _timers[3] = 300; gnapIdle(); - _gameSys->insertSequence(sequenceId, _gnapId, - makeRid(_gnapSequenceDatNum, _gnapSequenceId), _gnapId, + _gameSys->insertSequence(sequenceId, _gnap->_id, + makeRid(_gnap->_sequenceDatNum, _gnap->_sequenceId), _gnap->_id, kSeqScale | kSeqSyncWait, 0, 75 * _gnap->_pos.x - _gnapGridX, 48 * _gnap->_pos.y - _gnapGridY); - _gnapSequenceId = ridToEntryIndex(sequenceId); - _gnapSequenceDatNum = ridToDatIndex(sequenceId); + _gnap->_sequenceId = ridToEntryIndex(sequenceId); + _gnap->_sequenceDatNum = ridToDatIndex(sequenceId); } void GnapEngine::playGnapImpossible(int gridX, int gridY) { - playGnapSequence(getGnapSequenceId(gskImpossible, gridX, gridY) | 0x10000); + playGnapSequence(_gnap->getSequenceId(gskImpossible, gridX, gridY) | 0x10000); } void GnapEngine::playGnapScratchingHead(int gridX, int gridY) { - playGnapSequence(getGnapSequenceId(gskScratchingHead, gridX, gridY) | 0x10000); + playGnapSequence(_gnap->getSequenceId(gskScratchingHead, gridX, gridY) | 0x10000); } void GnapEngine::playGnapMoan1(int gridX, int gridY) { - playGnapSequence(getGnapSequenceId(gskMoan1, gridX, gridY) | 0x10000); + playGnapSequence(_gnap->getSequenceId(gskMoan1, gridX, gridY) | 0x10000); } void GnapEngine::playGnapMoan2(int gridX, int gridY) { - playGnapSequence(getGnapSequenceId(gskMoan2, gridX, gridY) | 0x10000); + playGnapSequence(_gnap->getSequenceId(gskMoan2, gridX, gridY) | 0x10000); } void GnapEngine::playGnapBrainPulsating(int gridX, int gridY) { - playGnapSequence(getGnapSequenceId(gskBrainPulsating, gridX, gridY) | 0x10000); + playGnapSequence(_gnap->getSequenceId(gskBrainPulsating, gridX, gridY) | 0x10000); } void GnapEngine::playGnapPullOutDevice(int gridX, int gridY) { - playGnapSequence(getGnapSequenceId(gskPullOutDevice, gridX, gridY) | 0x10000); + playGnapSequence(_gnap->getSequenceId(gskPullOutDevice, gridX, gridY) | 0x10000); } void GnapEngine::playGnapPullOutDeviceNonWorking(int gridX, int gridY) { - playGnapSequence(getGnapSequenceId(gskPullOutDeviceNonWorking, gridX, gridY) | 0x10000); + playGnapSequence(_gnap->getSequenceId(gskPullOutDeviceNonWorking, gridX, gridY) | 0x10000); } void GnapEngine::playGnapUseDevice(int gridX, int gridY) { - playGnapSequence(getGnapSequenceId(gskUseDevice, gridX, gridY) | 0x10000); + playGnapSequence(_gnap->getSequenceId(gskUseDevice, gridX, gridY) | 0x10000); } void GnapEngine::playGnapIdle(int gridX, int gridY) { - playGnapSequence(getGnapSequenceId(gskIdle, gridX, gridY) | 0x10000); + playGnapSequence(_gnap->getSequenceId(gskIdle, gridX, gridY) | 0x10000); } void GnapEngine::playGnapShowItem(int itemIndex, int gridLookX, int gridLookY) { @@ -1583,17 +1235,17 @@ void GnapEngine::updateGnapIdleSequence() { } else { _timers[2] = getRandom(30) + 20; if (_gnap->_idleFacing == kDirBottomRight) { - _gameSys->insertSequence(0x107BD, _gnapId, - makeRid(_gnapSequenceDatNum, _gnapSequenceId), _gnapId, + _gameSys->insertSequence(0x107BD, _gnap->_id, + makeRid(_gnap->_sequenceDatNum, _gnap->_sequenceId), _gnap->_id, kSeqSyncWait, 0, 75 * _gnap->_pos.x - _gnapGridX, 48 * _gnap->_pos.y - _gnapGridY); - _gnapSequenceId = 0x7BD; - _gnapSequenceDatNum = 1; + _gnap->_sequenceId = 0x7BD; + _gnap->_sequenceDatNum = 1; } else if (_gnap->_idleFacing == kDirBottomLeft) { - _gameSys->insertSequence(0x107BE, _gnapId, - makeRid(_gnapSequenceDatNum, _gnapSequenceId), _gnapId, + _gameSys->insertSequence(0x107BE, _gnap->_id, + makeRid(_gnap->_sequenceDatNum, _gnap->_sequenceId), _gnap->_id, kSeqSyncWait, 0, 75 * _gnap->_pos.x - _gnapGridX, 48 * _gnap->_pos.y - _gnapGridY); - _gnapSequenceId = 0x7BE; - _gnapSequenceDatNum = 1; + _gnap->_sequenceId = 0x7BE; + _gnap->_sequenceDatNum = 1; } } } else { @@ -1617,17 +1269,17 @@ void GnapEngine::updateGnapIdleSequence2() { } else { _timers[2] = getRandom(30) + 20; if (_gnap->_idleFacing == kDirBottomRight) { - _gameSys->insertSequence(0x107BD, _gnapId, - makeRid(_gnapSequenceDatNum, _gnapSequenceId), _gnapId, + _gameSys->insertSequence(0x107BD, _gnap->_id, + makeRid(_gnap->_sequenceDatNum, _gnap->_sequenceId), _gnap->_id, kSeqSyncWait, 0, 75 * _gnap->_pos.x - _gnapGridX, 48 * _gnap->_pos.y - _gnapGridY); - _gnapSequenceId = 0x7BD; - _gnapSequenceDatNum = 1; + _gnap->_sequenceId = 0x7BD; + _gnap->_sequenceDatNum = 1; } else if (_gnap->_idleFacing == kDirBottomLeft) { - _gameSys->insertSequence(0x107BE, _gnapId, - makeRid(_gnapSequenceDatNum, _gnapSequenceId), _gnapId, + _gameSys->insertSequence(0x107BE, _gnap->_id, + makeRid(_gnap->_sequenceDatNum, _gnap->_sequenceId), _gnap->_id, kSeqSyncWait, 0, 75 * _gnap->_pos.x - _gnapGridX, 48 * _gnap->_pos.y - _gnapGridY); - _gnapSequenceId = 0x7BE; - _gnapSequenceDatNum = 1; + _gnap->_sequenceId = 0x7BE; + _gnap->_sequenceDatNum = 1; } } } else { @@ -1659,47 +1311,18 @@ void GnapEngine::initGnapPos(int gridX, int gridY, Facing facing) { else _gnap->_idleFacing = facing; if (_gnap->_idleFacing == kDirBottomLeft) { - _gnapSequenceId = 0x7B8; + _gnap->_sequenceId = 0x7B8; } else { - _gnapSequenceId = 0x7B5; + _gnap->_sequenceId = 0x7B5; _gnap->_idleFacing = kDirBottomRight; } - _gnapId = 20 * _gnap->_pos.y; - _gnapSequenceDatNum = 1; - _gameSys->insertSequence(makeRid(1, _gnapSequenceId), 20 * _gnap->_pos.y, + _gnap->_id = 20 * _gnap->_pos.y; + _gnap->_sequenceDatNum = 1; + _gameSys->insertSequence(makeRid(1, _gnap->_sequenceId), 20 * _gnap->_pos.y, 0, 0, kSeqScale, 0, 75 * _gnap->_pos.x - _gnapGridX, 48 * _gnap->_pos.y - _gnapGridY); } -void GnapEngine::gnapInitBrainPulseRndValue() { - _gnapBrainPulseRndValue = 2 * getRandom(10); -} - -void GnapEngine::gnapUseDeviceOnPlatypus() { - playGnapSequence(makeRid(1, getGnapSequenceId(gskPullOutDevice, _plat->_pos.x, _plat->_pos.y))); - - if (_plat->_idleFacing != kDirNone) { - _gameSys->insertSequence(makeRid(1, 0x7D5), _platypusId, - makeRid(_platypusSequenceDatNum, _platypusSequenceId), _platypusId, - kSeqSyncWait, 0, 75 * _plat->_pos.x - _platGridX, 48 * _plat->_pos.y - _platGridY); - _platypusSequenceId = 0x7D5; - _platypusSequenceDatNum = 1; - } else { - _gameSys->insertSequence(makeRid(1, 0x7D4), _platypusId, - makeRid(_platypusSequenceDatNum, _platypusSequenceId), _platypusId, - kSeqSyncWait, 0, 75 * _plat->_pos.x - _platGridX, 48 * _plat->_pos.y - _platGridY); - _platypusSequenceId = 0x7D4; - _platypusSequenceDatNum = 1; - } - - int newSequenceId = getGnapSequenceId(gskUseDevice, 0, 0); - _gameSys->insertSequence(makeRid(1, newSequenceId), _gnapId, - makeRid(_gnapSequenceDatNum, _gnapSequenceId), _gnapId, - kSeqSyncWait, 0, 75 * _gnap->_pos.x - _gnapGridX, 48 * _gnap->_pos.y - _gnapGridY); - _gnapSequenceId = newSequenceId; - _gnapSequenceDatNum = 1; -} - void GnapEngine::doCallback(int callback) { switch (callback) { case 8: @@ -1726,7 +1349,7 @@ bool GnapEngine::gnapPlatypusAction(int gridX, int gridY, int platSequenceId, in } _gameSys->setAnimation(0, 0, 0); if (_gnap->_pos == Common::Point(_plat->_pos.x + gridX, _plat->_pos.y + gridY)) { - _gameSys->setAnimation(platSequenceId, _platypusId, 1); + _gameSys->setAnimation(platSequenceId, _plat->_id, 1); playPlatypusSequence(platSequenceId); while (_gameSys->getAnimationStatus(1) != 2) { updateMouseCursor(); @@ -1741,67 +1364,8 @@ bool GnapEngine::gnapPlatypusAction(int gridX, int gridY, int platSequenceId, in return result; } -void GnapEngine::gnapKissPlatypus(int callback) { - if (gnapPlatypusAction(-1, 0, 0x107D1, callback)) { - _gnap->_actionStatus = 100; - _gameSys->setAnimation(0, 0, 1); - _gameSys->setAnimation(0x10847, _gnapId, 0); - _gameSys->insertSequence(0x10847, _gnapId, - makeRid(_gnapSequenceDatNum, _gnapSequenceId), _gnapId, - kSeqSyncWait, 0, 15 * (5 * _gnap->_pos.x - 20) - (21 - _gridMinX), 48 * (_gnap->_pos.y - 6) - (146 - _gridMinY)); - _gnapSequenceDatNum = 1; - _gnapSequenceId = 0x847; - _gameSys->insertSequence(0x107CB, _platypusId, - makeRid(_platypusSequenceDatNum, _platypusSequenceId), _platypusId, - kSeqSyncWait, getSequenceTotalDuration(0x10847), 75 * _plat->_pos.x - _platGridX, 48 * _plat->_pos.y - _platGridY); - _platypusSequenceDatNum = 1; - _platypusSequenceId = 0x7CB; - _plat->_idleFacing = kDirNone; - playGnapSequence(0x107B5); - while (_gameSys->getAnimationStatus(0) != 2) { - updateMouseCursor(); - doCallback(callback); - gameUpdateTick(); - } - _gameSys->setAnimation(0, 0, 0); - _gnap->_actionStatus = -1; - } else { - playGnapSequence(getGnapSequenceId(gskScratchingHead, _plat->_pos.x, _plat->_pos.y) | 0x10000); - } -} - -void GnapEngine::gnapUseJointOnPlatypus() { - setGrabCursorSprite(-1); - if (gnapPlatypusAction(1, 0, 0x107C1, 0)) { - _gnap->_actionStatus = 100; - _gameSys->setAnimation(0, 0, 1); - _gameSys->setAnimation(0x10876, _platypusId, 0); - _gameSys->insertSequence(0x10875, _gnapId, - makeRid(_gnapSequenceDatNum, _gnapSequenceId), _gnapId, - kSeqSyncWait, 0, 15 * (5 * _gnap->_pos.x - 30), 48 * (_gnap->_pos.y - 7)); - _gnapSequenceDatNum = 1; - _gnapSequenceId = 0x875; - _gameSys->insertSequence(0x10876, _platypusId, - _platypusSequenceId | (_platypusSequenceDatNum << 16), _platypusId, - kSeqSyncWait, 0, 15 * (5 * _plat->_pos.x - 25), 48 * (_plat->_pos.y - 7)); - _platypusSequenceDatNum = 1; - _platypusSequenceId = 0x876; - _plat->_idleFacing = kDirNone; - playGnapSequence(0x107B5); - gnapWalkStep(); - while (_gameSys->getAnimationStatus(0) != 2) { - updateMouseCursor(); - gameUpdateTick(); - } - _gameSys->setAnimation(0, 0, 0); - _gnap->_actionStatus = -1; - } else { - playGnapSequence(getGnapSequenceId(gskScratchingHead, _plat->_pos.x, _plat->_pos.y) | 0x10000); - } -} - void GnapEngine::gnapUseDisguiseOnPlatypus() { - _gameSys->setAnimation(0x10846, _gnapId, 0); + _gameSys->setAnimation(0x10846, _gnap->_id, 0); playGnapSequence(0x10846); while (_gameSys->getAnimationStatus(0) != 2) gameUpdateTick(); @@ -1811,26 +1375,12 @@ void GnapEngine::gnapUseDisguiseOnPlatypus() { setFlag(kGFPlatypusDisguised); } -int GnapEngine::getPlatypusSequenceId() { - // The original had 3 parameters, all always set to 0. - // The code to handle the other values has been removed. - - int sequenceId = 0x7CB; - - if (_plat->_idleFacing != kDirNone) { - sequenceId = 0x7CC; - _plat->_idleFacing = kDirUnk4; - } - - return sequenceId | 0x10000; -} - void GnapEngine::playPlatypusSequence(int sequenceId) { - _gameSys->insertSequence(sequenceId, _platypusId, - makeRid(_platypusSequenceDatNum, _platypusSequenceId), _platypusId, + _gameSys->insertSequence(sequenceId, _plat->_id, + makeRid(_plat->_sequenceDatNum, _plat->_sequenceId), _plat->_id, kSeqScale | kSeqSyncWait, 0, 75 * _plat->_pos.x - _platGridX, 48 * _plat->_pos.y - _platGridY); - _platypusSequenceId = ridToEntryIndex(sequenceId); - _platypusSequenceDatNum = ridToDatIndex(sequenceId); + _plat->_sequenceId = ridToEntryIndex(sequenceId); + _plat->_sequenceDatNum = ridToDatIndex(sequenceId); } void GnapEngine::updatePlatypusIdleSequence() { @@ -1840,17 +1390,17 @@ void GnapEngine::updatePlatypusIdleSequence() { _timers[1] = getRandom(20) + 30; int rnd = getRandom(10); if (_plat->_idleFacing != kDirNone) { - if (rnd != 0 || _platypusSequenceId != 0x7CA) { - if (rnd != 1 || _platypusSequenceId != 0x7CA) + if (rnd != 0 || _plat->_sequenceId != 0x7CA) { + if (rnd != 1 || _plat->_sequenceId != 0x7CA) playPlatypusSequence(0x107CA); else playPlatypusSequence(0x10845); } else { playPlatypusSequence(0x107CC); } - } else if (rnd != 0 || _platypusSequenceId != 0x7C9) { - if (rnd != 1 || _platypusSequenceId != 0x7C9) { - if (rnd != 2 || _platypusSequenceId != 0x7C9) + } else if (rnd != 0 || _plat->_sequenceId != 0x7C9) { + if (rnd != 1 || _plat->_sequenceId != 0x7C9) { + if (rnd != 2 || _plat->_sequenceId != 0x7C9) playPlatypusSequence(0x107C9); else playPlatypusSequence(0x108A4); @@ -1877,12 +1427,12 @@ void GnapEngine::updatePlatypusIdleSequence2() { if (!_timers[1]) { _timers[1] = getRandom(20) + 30; if (_plat->_idleFacing != kDirNone) { - if (getRandom(10) >= 2 || _platypusSequenceId != 0x7CA) + if (getRandom(10) >= 2 || _plat->_sequenceId != 0x7CA) playPlatypusSequence(0x107CA); else playPlatypusSequence(0x107CC); } else { - if (getRandom(10) >= 2 || _platypusSequenceId != 0x7C9) { + if (getRandom(10) >= 2 || _plat->_sequenceId != 0x7C9) { playPlatypusSequence(0x107C9); } else { playPlatypusSequence(0x107CB); @@ -1908,14 +1458,14 @@ void GnapEngine::initPlatypusPos(int gridX, int gridY, Facing facing) { else _plat->_idleFacing = facing; if (_plat->_idleFacing == kDirUnk4) { - _platypusSequenceId = 0x7D1; + _plat->_sequenceId = 0x7D1; } else { - _platypusSequenceId = 0x7C1; + _plat->_sequenceId = 0x7C1; _plat->_idleFacing = kDirNone; } - _platypusId = 20 * _plat->_pos.y; - _platypusSequenceDatNum = 1; - _gameSys->insertSequence(makeRid(1, _platypusSequenceId), 20 * _plat->_pos.y, + _plat->_id = 20 * _plat->_pos.y; + _plat->_sequenceDatNum = 1; + _gameSys->insertSequence(makeRid(1, _plat->_sequenceId), 20 * _plat->_pos.y, 0, 0, kSeqScale, 0, 75 * _plat->_pos.x - _platGridX, 48 * _plat->_pos.y - _platGridY); } @@ -1935,12 +1485,12 @@ void GnapEngine::initGlobalSceneVars() { void GnapEngine::playSequences(int fullScreenSpriteId, int sequenceId1, int sequenceId2, int sequenceId3) { setGrabCursorSprite(-1); - _gameSys->setAnimation(sequenceId2, _gnapId, 0); - _gameSys->insertSequence(sequenceId2, _gnapId, - makeRid(_gnapSequenceDatNum, _gnapSequenceId), _gnapId, + _gameSys->setAnimation(sequenceId2, _gnap->_id, 0); + _gameSys->insertSequence(sequenceId2, _gnap->_id, + makeRid(_gnap->_sequenceDatNum, _gnap->_sequenceId), _gnap->_id, kSeqSyncWait, 0, 15 * (5 * _gnap->_pos.x - 25), 48 * (_gnap->_pos.y - 8)); - _gnapSequenceId = sequenceId2; - _gnapSequenceDatNum = 0; + _gnap->_sequenceId = sequenceId2; + _gnap->_sequenceDatNum = 0; while (_gameSys->getAnimationStatus(0) != 2) gameUpdateTick(); hideCursor(); @@ -1949,13 +1499,13 @@ void GnapEngine::playSequences(int fullScreenSpriteId, int sequenceId1, int sequ _gameSys->insertSequence(sequenceId1, 256, 0, 0, kSeqNone, 0, 0, 0); while (_gameSys->getAnimationStatus(0) != 2) gameUpdateTick(); - _gameSys->setAnimation(sequenceId3, _gnapId, 0); - _gameSys->insertSequence(sequenceId3, _gnapId, - makeRid(_gnapSequenceDatNum, _gnapSequenceId), _gnapId, + _gameSys->setAnimation(sequenceId3, _gnap->_id, 0); + _gameSys->insertSequence(sequenceId3, _gnap->_id, + makeRid(_gnap->_sequenceDatNum, _gnap->_sequenceId), _gnap->_id, kSeqSyncWait, 0, 15 * (5 * _gnap->_pos.x - 25), 48 * (_gnap->_pos.y - 8)); removeFullScreenSprite(); showCursor(); - _gnapSequenceId = sequenceId3; + _gnap->_sequenceId = sequenceId3; } void GnapEngine::toyUfoSetStatus(int flagNum) { diff --git a/engines/gnap/gnap.h b/engines/gnap/gnap.h index ccaf11f961..4474a2d564 100644 --- a/engines/gnap/gnap.h +++ b/engines/gnap/gnap.h @@ -516,10 +516,6 @@ public: void platypusMakeRoom(); // Gnap - int _gnapBrainPulseNum, _gnapBrainPulseRndValue; - int _gnapSequenceId, _gnapSequenceDatNum, _gnapId; - - int getGnapSequenceId(int kind, int gridX, int gridY); int getGnapShowSequenceId(int index, int gridX, int gridY); void gnapIdle(); void gnapActionIdle(int sequenceId); @@ -538,17 +534,11 @@ public: void updateGnapIdleSequence(); void updateGnapIdleSequence2(); void initGnapPos(int gridX, int gridY, Facing facing); - void gnapInitBrainPulseRndValue(); - void gnapUseDeviceOnPlatypus(); void doCallback(int callback); bool gnapPlatypusAction(int gridX, int gridY, int platSequenceId, int callback); - void gnapKissPlatypus(int callback); - void gnapUseJointOnPlatypus(); void gnapUseDisguiseOnPlatypus(); // Platypus - int _platypusSequenceId, _platypusSequenceDatNum, _platypusId; - int getPlatypusSequenceId(); void playPlatypusSequence(int sequenceId); void updatePlatypusIdleSequence(); void updatePlatypusIdleSequence2(); diff --git a/engines/gnap/grid.cpp b/engines/gnap/grid.cpp index 31b7934f42..ec0595f0a6 100644 --- a/engines/gnap/grid.cpp +++ b/engines/gnap/grid.cpp @@ -575,9 +575,9 @@ bool GnapEngine::gnapWalkTo(int gridX, int gridY, int animationIndex, int sequen gnapIdle(); - int gnapSequenceId = _gnapSequenceId; - int gnapId = _gnapId; - int gnapSequenceDatNum = _gnapSequenceDatNum; + int gnapSequenceId = _gnap->_sequenceId; + int gnapId = _gnap->_id; + int gnapSequenceDatNum = _gnap->_sequenceDatNum; debugC(kDebugBasic, "_gnapWalkNodesCount: %d", _gnapWalkNodesCount); @@ -629,24 +629,24 @@ bool GnapEngine::gnapWalkTo(int gridX, int gridY, int animationIndex, int sequen if (flags & 8) { if (_gnapWalkNodesCount > 0) { - _gnapSequenceId = gnapSequenceId; - _gnapId = gnapId; + _gnap->_sequenceId = gnapSequenceId; + _gnap->_id = gnapId; _gnap->_idleFacing = getGnapWalkFacing(_gnapWalkNodes[_gnapWalkNodesCount - 1]._deltaX, _gnapWalkNodes[_gnapWalkNodesCount - 1]._deltaY); - _gnapSequenceDatNum = datNum; + _gnap->_sequenceDatNum = datNum; if (animationIndex >= 0) - _gameSys->setAnimation(makeRid(_gnapSequenceDatNum, _gnapSequenceId), _gnapId, animationIndex); + _gameSys->setAnimation(makeRid(_gnap->_sequenceDatNum, _gnap->_sequenceId), _gnap->_id, animationIndex); } else if (animationIndex >= 0) { _gameSys->setAnimation(0x107D3, 1, animationIndex); _gameSys->insertSequence(0x107D3, 1, 0, 0, kSeqNone, 0, 0, 0); } } else { if (sequenceId >= 0 && sequenceId != -1) { - _gnapSequenceId = ridToEntryIndex(sequenceId); - _gnapSequenceDatNum = ridToDatIndex(sequenceId); - if (_gnapSequenceId == 0x7B9) { + _gnap->_sequenceId = ridToEntryIndex(sequenceId); + _gnap->_sequenceDatNum = ridToDatIndex(sequenceId); + if (_gnap->_sequenceId == 0x7B9) { _gnap->_idleFacing = kDirBottomRight; } else { - switch (_gnapSequenceId) { + switch (_gnap->_sequenceId) { case 0x7BA: _gnap->_idleFacing = kDirBottomLeft; break; @@ -660,21 +660,21 @@ bool GnapEngine::gnapWalkTo(int gridX, int gridY, int animationIndex, int sequen } } else { if (_gnapWalkNodesCount > 0) { - _gnapSequenceId = getGnapWalkStopSequenceId(_gnapWalkNodes[_gnapWalkNodesCount - 1]._deltaX, _gnapWalkNodes[_gnapWalkNodesCount - 1]._deltaY); + _gnap->_sequenceId = getGnapWalkStopSequenceId(_gnapWalkNodes[_gnapWalkNodesCount - 1]._deltaX, _gnapWalkNodes[_gnapWalkNodesCount - 1]._deltaY); _gnap->_idleFacing = getGnapWalkFacing(_gnapWalkNodes[_gnapWalkNodesCount - 1]._deltaX, _gnapWalkNodes[_gnapWalkNodesCount - 1]._deltaY); } else if (gridX >= 0 || gridY >= 0) { switch (_gnap->_idleFacing) { case kDirBottomRight: - _gnapSequenceId = 0x7B9; + _gnap->_sequenceId = 0x7B9; break; case kDirBottomLeft: - _gnapSequenceId = 0x7BA; + _gnap->_sequenceId = 0x7BA; break; case kDirUpRight: - _gnapSequenceId = 0x7BB; + _gnap->_sequenceId = 0x7BB; break; default: - _gnapSequenceId = 0x7BC; + _gnap->_sequenceId = 0x7BC; break; } } else { @@ -685,25 +685,25 @@ bool GnapEngine::gnapWalkTo(int gridX, int gridY, int animationIndex, int sequen ++v10; if (_leftClickMouseY == _gridMinY + 48 * _gnap->_pos.y) v11 = 1; - _gnapSequenceId = getGnapWalkStopSequenceId(v10 / abs(v10), v11 / abs(v11)); + _gnap->_sequenceId = getGnapWalkStopSequenceId(v10 / abs(v10), v11 / abs(v11)); _gnap->_idleFacing = getGnapWalkFacing(v10 / abs(v10), v11 / abs(v11)); } - _gnapSequenceDatNum = datNum; + _gnap->_sequenceDatNum = datNum; } if (animationIndex < 0) { - _gnapId = 20 * _gnapWalkDestY + 1; + _gnap->_id = 20 * _gnapWalkDestY + 1; } else { - _gnapId = _gnapWalkNodesCount + animationIndex + 20 * _gnapWalkDestY; - _gameSys->setAnimation(makeRid(_gnapSequenceDatNum, _gnapSequenceId), _gnapWalkNodesCount + animationIndex + 20 * _gnapWalkDestY, animationIndex); + _gnap->_id = _gnapWalkNodesCount + animationIndex + 20 * _gnapWalkDestY; + _gameSys->setAnimation(makeRid(_gnap->_sequenceDatNum, _gnap->_sequenceId), _gnapWalkNodesCount + animationIndex + 20 * _gnapWalkDestY, animationIndex); } if (flags & 4) { - _gameSys->insertSequence(makeRid(_gnapSequenceDatNum, _gnapSequenceId), _gnapId, + _gameSys->insertSequence(makeRid(_gnap->_sequenceDatNum, _gnap->_sequenceId), _gnap->_id, makeRid(gnapSequenceDatNum, gnapSequenceId), gnapId, kSeqScale | kSeqSyncWait, 0, 0, 0); } else { - _gameSys->insertSequence(makeRid(_gnapSequenceDatNum, _gnapSequenceId), _gnapId, + _gameSys->insertSequence(makeRid(_gnap->_sequenceDatNum, _gnap->_sequenceId), _gnap->_id, makeRid(gnapSequenceDatNum, gnapSequenceId), gnapId, kSeqScale | kSeqSyncWait, 0, 75 * _gnapWalkDestX - _gnapGridX, 48 * _gnapWalkDestY - _gnapGridY); } @@ -1229,9 +1229,9 @@ bool GnapEngine::platypusWalkTo(int gridX, int gridY, int animationIndex, int se if (!done) gridSub423750(_plat->_pos.x, _plat->_pos.y); - int platSequenceId = _platypusSequenceId; - int platId = _platypusId; - int platSequenceDatNum = _platypusSequenceDatNum; + int platSequenceId = _plat->_sequenceId; + int platId = _plat->_id; + int platSequenceDatNum = _plat->_sequenceDatNum; for (int index = 0; index < _platWalkNodesCount; ++index) { _platWalkNodes[index]._id = index + 20 * _platWalkNodes[index]._gridY1; @@ -1281,9 +1281,9 @@ bool GnapEngine::platypusWalkTo(int gridX, int gridY, int animationIndex, int se if (flags & 8) { if (_platWalkNodesCount > 0) { - _platypusSequenceId = platSequenceId; - _platypusId = platId; - _platypusSequenceDatNum = datNum; + _plat->_sequenceId = platSequenceId; + _plat->_id = platId; + _plat->_sequenceDatNum = datNum; // CHECKME Not sure if this is correct... if (_platWalkNodes[_platWalkNodesCount - 1]._deltaX > 0) _plat->_idleFacing = kDirNone; @@ -1294,59 +1294,59 @@ bool GnapEngine::platypusWalkTo(int gridX, int gridY, int animationIndex, int se else _plat->_idleFacing = kDirNone; if (animationIndex >= 0) - _gameSys->setAnimation(makeRid(_platypusSequenceDatNum, _platypusSequenceId), _platypusId, animationIndex); + _gameSys->setAnimation(makeRid(_plat->_sequenceDatNum, _plat->_sequenceId), _plat->_id, animationIndex); } else if (animationIndex >= 0) { _gameSys->setAnimation(0x107D3, 1, animationIndex); _gameSys->insertSequence(0x107D3, 1, 0, 0, kSeqNone, 0, 0, 0); } } else { if (sequenceId >= 0 && sequenceId != -1) { - _platypusSequenceId = ridToEntryIndex(sequenceId); - _platypusSequenceDatNum = ridToDatIndex(sequenceId); - if (_platypusSequenceId == 0x7C2) { + _plat->_sequenceId = ridToEntryIndex(sequenceId); + _plat->_sequenceDatNum = ridToDatIndex(sequenceId); + if (_plat->_sequenceId == 0x7C2) { _plat->_idleFacing = kDirNone; - } else if (_platypusSequenceId == 0x7D2) { + } else if (_plat->_sequenceId == 0x7D2) { _plat->_idleFacing = kDirUnk4; } } else { if (_platWalkNodesCount > 0) { if (_platWalkNodes[_platWalkNodesCount - 1]._deltaX > 0) { - _platypusSequenceId = 0x7C2; + _plat->_sequenceId = 0x7C2; _plat->_idleFacing = kDirNone; } else if (_platWalkNodes[_platWalkNodesCount - 1]._deltaX < 0) { - _platypusSequenceId = 0x7D2; + _plat->_sequenceId = 0x7D2; _plat->_idleFacing = kDirUnk4; } else if (_platWalkNodes[0]._deltaX > 0) { - _platypusSequenceId = 0x7C2; + _plat->_sequenceId = 0x7C2; _plat->_idleFacing = kDirNone; } else if (_platWalkNodes[0]._deltaX < 0) { - _platypusSequenceId = 0x7D2; + _plat->_sequenceId = 0x7D2; _plat->_idleFacing = kDirUnk4; } else { - _platypusSequenceId = 0x7D2; + _plat->_sequenceId = 0x7D2; _plat->_idleFacing = kDirUnk4; } } else if (_plat->_idleFacing != kDirNone) { - _platypusSequenceId = 0x7D2; + _plat->_sequenceId = 0x7D2; } else { - _platypusSequenceId = 0x7C2; + _plat->_sequenceId = 0x7C2; } - _platypusSequenceDatNum = datNum; + _plat->_sequenceDatNum = datNum; } if (animationIndex < 0) { - _platypusId = 20 * _platWalkDestY; + _plat->_id = 20 * _platWalkDestY; } else { - _platypusId = animationIndex + 20 * _platWalkDestY; - _gameSys->setAnimation(makeRid(_platypusSequenceDatNum, _platypusSequenceId), animationIndex + 20 * _platWalkDestY, animationIndex); + _plat->_id = animationIndex + 20 * _platWalkDestY; + _gameSys->setAnimation(makeRid(_plat->_sequenceDatNum, _plat->_sequenceId), animationIndex + 20 * _platWalkDestY, animationIndex); } if (flags & 4) - _gameSys->insertSequence(makeRid(_platypusSequenceDatNum, _platypusSequenceId), _platypusId, + _gameSys->insertSequence(makeRid(_plat->_sequenceDatNum, _plat->_sequenceId), _plat->_id, makeRid(platSequenceDatNum, platSequenceId), platId, 9, 0, 0, 0); else - _gameSys->insertSequence(makeRid(_platypusSequenceDatNum, _platypusSequenceId), _platypusId, + _gameSys->insertSequence(makeRid(_plat->_sequenceDatNum, _plat->_sequenceId), _plat->_id, makeRid(platSequenceDatNum, platSequenceId), platId, 9, 0, 75 * _platWalkDestX - _platGridX, 48 * _platWalkDestY - _platGridY); } diff --git a/engines/gnap/scenes/arcade.cpp b/engines/gnap/scenes/arcade.cpp index 196d99a7f8..a4bde9f1fe 100644 --- a/engines/gnap/scenes/arcade.cpp +++ b/engines/gnap/scenes/arcade.cpp @@ -1025,7 +1025,6 @@ Scene51::Scene51(GnapEngine *vm) : Scene(vm) { _nextDropItemKind = -1; _itemInsertX = -1; _itemInsertDirection = -1; - _platypusSequenceId = -1; _platypusNextSequenceId = -1; _platypusJumpSequenceId = -1; _itemsCtr = -1; @@ -1233,13 +1232,13 @@ void Scene51::updateItemAnimations() { } int Scene51::checkCollision(int sequenceId) { - bool jumpingLeft = false, jumpingRight = false; - int v8, v4; - int result = 0; - if (!isJumping(sequenceId)) return false; + bool jumpingLeft = false, jumpingRight = false; + int v8 = 0, v4 = 0; + int result = 0; + bool checkFl = false; for (int i = 0; i < 6; i++) checkFl |= _items[i]._isCollision; diff --git a/engines/gnap/scenes/group0.cpp b/engines/gnap/scenes/group0.cpp index 5348f18df8..419139fc9e 100644 --- a/engines/gnap/scenes/group0.cpp +++ b/engines/gnap/scenes/group0.cpp @@ -136,11 +136,11 @@ void Scene01::run() { _vm->playGnapScratchingHead(_vm->_plat->_pos.x, _vm->_plat->_pos.y); break; case GRAB_CURSOR: - _vm->gnapKissPlatypus(0); + _vm->_gnap->kissPlatypus(0); break; case TALK_CURSOR: _vm->playGnapBrainPulsating(_vm->_plat->_pos.x, _vm->_plat->_pos.y); - _vm->playPlatypusSequence(_vm->getPlatypusSequenceId()); + _vm->playPlatypusSequence(_vm->_plat->getSequenceId()); break; case PLAT_CURSOR: _vm->playGnapImpossible(0, 0); @@ -158,7 +158,7 @@ void Scene01::run() { switch (_vm->_verbCursor) { case LOOK_CURSOR: _vm->_gnap->_idleFacing = kDirUpLeft; - if (_vm->gnapWalkTo(_vm->_hotspotsWalkPos[4].x, _vm->_hotspotsWalkPos[4].y, 0, _vm->getGnapSequenceId(gskIdle, 0, 0) | 0x10000, 1)) + if (_vm->gnapWalkTo(_vm->_hotspotsWalkPos[4].x, _vm->_hotspotsWalkPos[4].y, 0, _vm->_gnap->getSequenceId(gskIdle, 0, 0) | 0x10000, 1)) _vm->_gnap->_actionStatus = kAS01LookSpaceship; break; case GRAB_CURSOR: @@ -181,7 +181,7 @@ void Scene01::run() { _vm->playGnapScratchingHead(3, 3); break; case GRAB_CURSOR: - _vm->gnapWalkTo(_vm->_hotspotsWalkPos[2].x, _vm->_hotspotsWalkPos[2].y, 0, _vm->getGnapSequenceId(gskIdle, 2, 3) | 0x10000, 1); + _vm->gnapWalkTo(_vm->_hotspotsWalkPos[2].x, _vm->_hotspotsWalkPos[2].y, 0, _vm->_gnap->getSequenceId(gskIdle, 2, 3) | 0x10000, 1); _vm->_gnap->_actionStatus = kAS01TakeMud; break; case TALK_CURSOR: @@ -201,17 +201,17 @@ void Scene01::run() { switch (_vm->_verbCursor) { case LOOK_CURSOR: _vm->_gnap->_idleFacing = kDirUpRight; - _vm->gnapWalkTo(_vm->_hotspotsWalkPos[3].x, _vm->_hotspotsWalkPos[3].y, 0, _vm->getGnapSequenceId(gskIdle, 7, 2) | 0x10000, 1); + _vm->gnapWalkTo(_vm->_hotspotsWalkPos[3].x, _vm->_hotspotsWalkPos[3].y, 0, _vm->_gnap->getSequenceId(gskIdle, 7, 2) | 0x10000, 1); _vm->_gnap->_actionStatus = kAS01LookPigs; break; case GRAB_CURSOR: _vm->_gnap->_idleFacing = kDirUpRight; - _vm->gnapWalkTo(_vm->_hotspotsWalkPos[3].x, _vm->_hotspotsWalkPos[3].y, 0, _vm->getGnapSequenceId(gskIdle, 7, 2) | 0x10000, 1); + _vm->gnapWalkTo(_vm->_hotspotsWalkPos[3].x, _vm->_hotspotsWalkPos[3].y, 0, _vm->_gnap->getSequenceId(gskIdle, 7, 2) | 0x10000, 1); _vm->_gnap->_actionStatus = kAS01UsePigs; break; case TALK_CURSOR: _vm->_gnap->_idleFacing = kDirUpRight; - _vm->gnapWalkTo(_vm->_hotspotsWalkPos[3].x, _vm->_hotspotsWalkPos[3].y, 0, _vm->getGnapSequenceId(gskBrainPulsating, 7, 2) | 0x10000, 1); + _vm->gnapWalkTo(_vm->_hotspotsWalkPos[3].x, _vm->_hotspotsWalkPos[3].y, 0, _vm->_gnap->getSequenceId(gskBrainPulsating, 7, 2) | 0x10000, 1); _vm->_gnap->_actionStatus = kAS01LookPigs; break; case PLAT_CURSOR: @@ -486,11 +486,11 @@ void Scene02::run() { _vm->playGnapScratchingHead(_vm->_plat->_pos.x, _vm->_plat->_pos.y); break; case GRAB_CURSOR: - _vm->gnapKissPlatypus(0); + _vm->_gnap->kissPlatypus(0); break; case TALK_CURSOR: _vm->playGnapBrainPulsating(_vm->_plat->_pos.x, _vm->_plat->_pos.y); - _vm->playPlatypusSequence(_vm->getPlatypusSequenceId()); + _vm->playPlatypusSequence(_vm->_plat->getSequenceId()); break; case PLAT_CURSOR: _vm->playGnapImpossible(0, 0); @@ -505,7 +505,7 @@ void Scene02::run() { if (_vm->_grabCursorSpriteIndex == kItemTwig) { _vm->_gnap->_idleFacing = kDirUpRight; _vm->gnapWalkTo(_vm->_hotspotsWalkPos[_vm->_sceneClickedHotspot].x, _vm->_hotspotsWalkPos[_vm->_sceneClickedHotspot].y + 1, - 0, _vm->getGnapSequenceId(gskIdle, 0, 0) | 0x10000, 1); + 0, _vm->_gnap->getSequenceId(gskIdle, 0, 0) | 0x10000, 1); _vm->_gnap->_actionStatus = kAS02UseTwigWithChicken; } else if (_vm->_grabCursorSpriteIndex >= 0) { _vm->playGnapShowCurrItem(_vm->_hotspotsWalkPos[1].x, _vm->_hotspotsWalkPos[1].y + 1, 9, 8); @@ -516,14 +516,14 @@ void Scene02::run() { break; case GRAB_CURSOR: _vm->_gnap->_idleFacing = kDirBottomRight; - if (_vm->gnapWalkTo(_vm->_hotspotsWalkPos[1].x, _vm->_hotspotsWalkPos[1].y, 0, _vm->getGnapSequenceId(gskIdle, 0, 0) | 0x10000, 1)) + if (_vm->gnapWalkTo(_vm->_hotspotsWalkPos[1].x, _vm->_hotspotsWalkPos[1].y, 0, _vm->_gnap->getSequenceId(gskIdle, 0, 0) | 0x10000, 1)) _vm->_gnap->_actionStatus = kAS02GrabChicken; else _vm->_gnap->_actionStatus = -1; break; case TALK_CURSOR: _vm->_gnap->_idleFacing = kDirBottomRight; - _vm->gnapWalkTo(_vm->_hotspotsWalkPos[1].x, _vm->_hotspotsWalkPos[1].y, 0, _vm->getGnapSequenceId(gskBrainPulsating, 0, 0) | 0x10000, 1); + _vm->gnapWalkTo(_vm->_hotspotsWalkPos[1].x, _vm->_hotspotsWalkPos[1].y, 0, _vm->_gnap->getSequenceId(gskBrainPulsating, 0, 0) | 0x10000, 1); _vm->_gnap->_actionStatus = kAS02TalkChicken; break; case PLAT_CURSOR: @@ -538,7 +538,7 @@ void Scene02::run() { case kHS02Truck2: if (_vm->_gnap->_actionStatus < 0) { if (_vm->_grabCursorSpriteIndex == kItemKeys) { - if (_vm->gnapWalkTo(_vm->_hotspotsWalkPos[3].x, _vm->_hotspotsWalkPos[3].y, 0, _vm->getGnapSequenceId(gskIdle, 2, 2) | 0x10000, 1)) { + if (_vm->gnapWalkTo(_vm->_hotspotsWalkPos[3].x, _vm->_hotspotsWalkPos[3].y, 0, _vm->_gnap->getSequenceId(gskIdle, 2, 2) | 0x10000, 1)) { _vm->setGrabCursorSprite(-1); _vm->invRemove(kItemKeys); if (_vm->isFlag(kGFTruckFilledWithGas)) @@ -548,7 +548,7 @@ void Scene02::run() { } } else if (_vm->_grabCursorSpriteIndex == kItemGas) { _vm->_hotspots[kHS02WalkArea4]._flags |= SF_WALKABLE; - if (_vm->gnapWalkTo(_vm->_hotspotsWalkPos[2].x, _vm->_hotspotsWalkPos[2].y, 0, _vm->getGnapSequenceId(gskIdle, 2, 2) | 0x10000, 1)) + if (_vm->gnapWalkTo(_vm->_hotspotsWalkPos[2].x, _vm->_hotspotsWalkPos[2].y, 0, _vm->_gnap->getSequenceId(gskIdle, 2, 2) | 0x10000, 1)) _vm->_gnap->_actionStatus = kAS02UseGasWithTruck; _vm->_hotspots[kHS02WalkArea4]._flags &= ~SF_WALKABLE; } else if (_vm->_grabCursorSpriteIndex >= 0) { @@ -560,7 +560,7 @@ void Scene02::run() { break; case GRAB_CURSOR: if (_vm->isFlag(kGFTruckKeysUsed)) { - if (_vm->gnapWalkTo(_vm->_hotspotsWalkPos[3].x, _vm->_hotspotsWalkPos[3].y, 0, _vm->getGnapSequenceId(gskIdle, 2, 2) | 0x10000, 1)) { + if (_vm->gnapWalkTo(_vm->_hotspotsWalkPos[3].x, _vm->_hotspotsWalkPos[3].y, 0, _vm->_gnap->getSequenceId(gskIdle, 2, 2) | 0x10000, 1)) { if (_vm->isFlag(kGFTruckFilledWithGas)) _vm->_gnap->_actionStatus = kAS02UseTruckGas; else @@ -568,7 +568,7 @@ void Scene02::run() { } } else { _vm->_gnap->_idleFacing = kDirUnk4; - if (_vm->gnapWalkTo(_vm->_hotspotsWalkPos[3].x, _vm->_hotspotsWalkPos[3].y, 0, _vm->getGnapSequenceId(gskIdle, 2, 2) | 0x10000, 1)) + if (_vm->gnapWalkTo(_vm->_hotspotsWalkPos[3].x, _vm->_hotspotsWalkPos[3].y, 0, _vm->_gnap->getSequenceId(gskIdle, 2, 2) | 0x10000, 1)) _vm->_gnap->_actionStatus = kAS02UseTruckNoKeys; } break; @@ -592,7 +592,7 @@ void Scene02::run() { break; case GRAB_CURSOR: _vm->_gnap->_idleFacing = kDirUpRight; - _vm->gnapWalkTo(_vm->_hotspotsWalkPos[4].x, _vm->_hotspotsWalkPos[4].y, 0, _vm->getGnapSequenceId(gskIdle, 0, 0) | 0x10000, 1); + _vm->gnapWalkTo(_vm->_hotspotsWalkPos[4].x, _vm->_hotspotsWalkPos[4].y, 0, _vm->_gnap->getSequenceId(gskIdle, 0, 0) | 0x10000, 1); _vm->_gnap->_actionStatus = kAS02GrabTruckGrill; break; case TALK_CURSOR: @@ -714,17 +714,17 @@ void Scene02::updateAnimations() { if (gameSys.getAnimationStatus(0) == 2) { switch (_vm->_gnap->_actionStatus) { case kAS02UseTruckNoKeys: - gameSys.insertSequence(0x14E, _vm->_gnapId, makeRid(_vm->_gnapSequenceDatNum, _vm->_gnapSequenceId), _vm->_gnapId, kSeqSyncWait, 0, 0, 0); - gameSys.setAnimation(0x14E, _vm->_gnapId, 0); - _vm->_gnapSequenceId = 0x14E; - _vm->_gnapSequenceDatNum = 0; + gameSys.insertSequence(0x14E, _vm->_gnap->_id, makeRid(_vm->_gnap->_sequenceDatNum, _vm->_gnap->_sequenceId), _vm->_gnap->_id, kSeqSyncWait, 0, 0, 0); + gameSys.setAnimation(0x14E, _vm->_gnap->_id, 0); + _vm->_gnap->_sequenceId = 0x14E; + _vm->_gnap->_sequenceDatNum = 0; _vm->_gnap->_actionStatus = kAS02UseTruckNoKeysDone; break; case kAS02UseGasWithTruck: - gameSys.insertSequence(0x151, _vm->_gnapId, makeRid(_vm->_gnapSequenceDatNum, _vm->_gnapSequenceId), _vm->_gnapId, kSeqSyncWait, 0, 0, 0); - gameSys.setAnimation(0x151, _vm->_gnapId, 0); - _vm->_gnapSequenceId = 0x151; - _vm->_gnapSequenceDatNum = 0; + gameSys.insertSequence(0x151, _vm->_gnap->_id, makeRid(_vm->_gnap->_sequenceDatNum, _vm->_gnap->_sequenceId), _vm->_gnap->_id, kSeqSyncWait, 0, 0, 0); + gameSys.setAnimation(0x151, _vm->_gnap->_id, 0); + _vm->_gnap->_sequenceId = 0x151; + _vm->_gnap->_sequenceDatNum = 0; _vm->invRemove(kItemGas); _vm->setGrabCursorSprite(-1); _vm->setFlag(kGFTruckFilledWithGas); @@ -736,11 +736,11 @@ void Scene02::updateAnimations() { _vm->hideCursor(); _vm->setGrabCursorSprite(-1); if (!_vm->isFlag(kGFTruckKeysUsed)) { - gameSys.insertSequence(0x14F, _vm->_gnapId, makeRid(_vm->_gnapSequenceDatNum, _vm->_gnapSequenceId), _vm->_gnapId, kSeqSyncWait, 0, 0, 0); + gameSys.insertSequence(0x14F, _vm->_gnap->_id, makeRid(_vm->_gnap->_sequenceDatNum, _vm->_gnap->_sequenceId), _vm->_gnap->_id, kSeqSyncWait, 0, 0, 0); gameSys.waitForUpdate(); _vm->setFlag(kGFTruckKeysUsed); - _vm->_gnapSequenceId = 0x14F; - _vm->_gnapSequenceDatNum = 0; + _vm->_gnap->_sequenceId = 0x14F; + _vm->_gnap->_sequenceDatNum = 0; _vm->invRemove(kItemKeys); _vm->setGrabCursorSprite(-1); } @@ -752,11 +752,11 @@ void Scene02::updateAnimations() { _vm->setGrabCursorSprite(-1); _vm->_timers[4] = 250; if (!_vm->isFlag(kGFTruckKeysUsed)) { - gameSys.insertSequence(0x14F, _vm->_gnapId, makeRid(_vm->_gnapSequenceDatNum, _vm->_gnapSequenceId), _vm->_gnapId, kSeqSyncWait, 0, 0, 0); + gameSys.insertSequence(0x14F, _vm->_gnap->_id, makeRid(_vm->_gnap->_sequenceDatNum, _vm->_gnap->_sequenceId), _vm->_gnap->_id, kSeqSyncWait, 0, 0, 0); gameSys.waitForUpdate(); _vm->setFlag(kGFTruckKeysUsed); - _vm->_gnapSequenceId = 0x14F; - _vm->_gnapSequenceDatNum = 0; + _vm->_gnap->_sequenceId = 0x14F; + _vm->_gnap->_sequenceDatNum = 0; _vm->invRemove(kItemKeys); _vm->setGrabCursorSprite(-1); } @@ -777,10 +777,10 @@ void Scene02::updateAnimations() { break; } _truckGrillCtr = (_truckGrillCtr + 1) % 3; - gameSys.insertSequence(_gnapTruckSequenceId, _vm->_gnapId, makeRid(_vm->_gnapSequenceDatNum, _vm->_gnapSequenceId), _vm->_gnapId, kSeqSyncWait, 0, 0, 0); - gameSys.setAnimation(_gnapTruckSequenceId, _vm->_gnapId, 0); - _vm->_gnapSequenceId = _gnapTruckSequenceId; - _vm->_gnapSequenceDatNum = 0; + gameSys.insertSequence(_gnapTruckSequenceId, _vm->_gnap->_id, makeRid(_vm->_gnap->_sequenceDatNum, _vm->_gnap->_sequenceId), _vm->_gnap->_id, kSeqSyncWait, 0, 0, 0); + gameSys.setAnimation(_gnapTruckSequenceId, _vm->_gnap->_id, 0); + _vm->_gnap->_sequenceId = _gnapTruckSequenceId; + _vm->_gnap->_sequenceDatNum = 0; _vm->_gnap->_actionStatus = -1; break; case kAS02LeaveScene: @@ -794,9 +794,9 @@ void Scene02::updateAnimations() { _vm->_timers[2] = 100; break; case kAS02GrabChickenDone: - gameSys.insertSequence(0x107B5, _vm->_gnapId, 0x150, 179, kSeqSyncWait, 0, 75 * _vm->_gnap->_pos.x - _vm->_gnapGridX, 48 * _vm->_gnap->_pos.y - _vm->_gnapGridY); - _vm->_gnapSequenceId = 0x7B5; - _vm->_gnapSequenceDatNum = 1; + gameSys.insertSequence(0x107B5, _vm->_gnap->_id, 0x150, 179, kSeqSyncWait, 0, 75 * _vm->_gnap->_pos.x - _vm->_gnapGridX, 48 * _vm->_gnap->_pos.y - _vm->_gnapGridY); + _vm->_gnap->_sequenceId = 0x7B5; + _vm->_gnap->_sequenceDatNum = 1; _currChickenSequenceId = 0x14B; gameSys.setAnimation(0x14B, 179, 2); gameSys.insertSequence(_currChickenSequenceId, 179, 0, 0, kSeqNone, 0, 0, 0); @@ -821,7 +821,7 @@ void Scene02::updateAnimations() { if (gameSys.getAnimationStatus(2) == 2) { if (_nextChickenSequenceId == 0x150) { gameSys.setAnimation(_nextChickenSequenceId, 179, 0); - gameSys.insertSequence(_nextChickenSequenceId, 179, makeRid(_vm->_gnapSequenceDatNum, _vm->_gnapSequenceId), _vm->_gnapId, kSeqSyncWait, 0, 0, 0); + gameSys.insertSequence(_nextChickenSequenceId, 179, makeRid(_vm->_gnap->_sequenceDatNum, _vm->_gnap->_sequenceId), _vm->_gnap->_id, kSeqSyncWait, 0, 0, 0); gameSys.removeSequence(_currChickenSequenceId, 179, true); _nextChickenSequenceId = -1; _currChickenSequenceId = -1; @@ -911,8 +911,8 @@ void Scene03::run() { _vm->_timers[1] = _vm->getRandom(40) + 20; gameSys.setAnimation(0x1C2, 99, 1); gameSys.insertSequence(0x1C2, 99, 0, 0, kSeqNone, 0, 0, 0); - _vm->_platypusSequenceId = 0x1C2; - _vm->_platypusSequenceDatNum = 0; + _vm->_plat->_sequenceId = 0x1C2; + _vm->_plat->_sequenceDatNum = 0; } gameSys.insertSequence(0x1C4, 255, 0, 0, kSeqNone, 0, 0, 0); @@ -951,11 +951,11 @@ void Scene03::run() { _vm->playGnapScratchingHead(_vm->_plat->_pos.x, _vm->_plat->_pos.y); break; case GRAB_CURSOR: - _vm->gnapKissPlatypus(0); + _vm->_gnap->kissPlatypus(0); break; case TALK_CURSOR: _vm->playGnapBrainPulsating(_vm->_plat->_pos.x, _vm->_plat->_pos.y); - _vm->playPlatypusSequence(_vm->getPlatypusSequenceId()); + _vm->playPlatypusSequence(_vm->_plat->getSequenceId()); break; case PLAT_CURSOR: _vm->playGnapImpossible(0, 0); @@ -1020,7 +1020,7 @@ void Scene03::run() { case GRAB_CURSOR: if (!_vm->isFlag(kGFPlatypus)) _vm->_hotspots[kHS03PlatypusWalkArea]._flags |= SF_WALKABLE; - if (_vm->gnapWalkTo(_vm->_hotspotsWalkPos[3].x, _vm->_hotspotsWalkPos[3].y, 0, _vm->getGnapSequenceId(gskIdle, _vm->_hotspotsWalkPos[3].x + 1, _vm->_hotspotsWalkPos[3].y + 1) | 0x10000, 1)) + if (_vm->gnapWalkTo(_vm->_hotspotsWalkPos[3].x, _vm->_hotspotsWalkPos[3].y, 0, _vm->_gnap->getSequenceId(gskIdle, _vm->_hotspotsWalkPos[3].x + 1, _vm->_hotspotsWalkPos[3].y + 1) | 0x10000, 1)) _vm->_gnap->_actionStatus = kAS03GrabCreek; if (!_vm->isFlag(kGFPlatypus)) _vm->_hotspots[kHS03PlatypusWalkArea]._flags &= ~SF_WALKABLE; @@ -1050,7 +1050,7 @@ void Scene03::run() { _vm->gnapWalkTo(7, 6, 0, 0x107B5, 1); _vm->_gnap->_actionStatus = kAS03FreePlatypus; } else { - _vm->gnapWalkTo(_vm->_hotspotsWalkPos[4].x, _vm->_hotspotsWalkPos[4].y, 0, _vm->getGnapSequenceId(gskIdle, 0, 0) | 0x10000, 1); + _vm->gnapWalkTo(_vm->_hotspotsWalkPos[4].x, _vm->_hotspotsWalkPos[4].y, 0, _vm->_gnap->getSequenceId(gskIdle, 0, 0) | 0x10000, 1); if (_platypusScared) _vm->_gnap->_actionStatus = kAS03GrabScaredPlatypus; else @@ -1062,7 +1062,7 @@ void Scene03::run() { _vm->playGnapBrainPulsating(8, 4); } else { _vm->_gnap->_idleFacing = kDirBottomRight; - _vm->gnapWalkTo(_vm->_hotspotsWalkPos[4].x, _vm->_hotspotsWalkPos[4].y, 0, _vm->getGnapSequenceId(gskIdle, 0, 0) | 0x10000, 1); + _vm->gnapWalkTo(_vm->_hotspotsWalkPos[4].x, _vm->_hotspotsWalkPos[4].y, 0, _vm->_gnap->getSequenceId(gskIdle, 0, 0) | 0x10000, 1); if (_platypusScared) _vm->_gnap->_actionStatus = kAS03HypnotizeScaredPlat; else @@ -1185,12 +1185,12 @@ void Scene03::updateAnimations() { _vm->_gnap->_actionStatus = -1; _vm->_plat->_pos = Common::Point(6, 6); _vm->_plat->_idleFacing = kDirUnk4; - _vm->_platypusId = 120; - gameSys.insertSequence(0x107CA, _vm->_platypusId, 0x1BC, 99, + _vm->_plat->_id = 120; + gameSys.insertSequence(0x107CA, _vm->_plat->_id, 0x1BC, 99, kSeqSyncWait, 0, 75 * _vm->_plat->_pos.x - _vm->_platGridX, 48 * _vm->_plat->_pos.y - _vm->_platGridY); gameSys.insertSequence(0x1B7, 99, 0, 0, kSeqNone, 0, 0, 0); - _vm->_platypusSequenceDatNum = 1; - _vm->_platypusSequenceId = 0x7CA; + _vm->_plat->_sequenceDatNum = 1; + _vm->_plat->_sequenceId = 0x7CA; _vm->setFlag(kGFPlatypus); _nextPlatSequenceId = -1; updateHotspots(); @@ -1204,16 +1204,16 @@ void Scene03::updateAnimations() { _vm->gameUpdateTick(); _vm->removeFullScreenSprite(); gameSys.setAnimation(0x1BA, 99, 1); - gameSys.insertSequence(0x1BA, 99, _vm->_platypusSequenceId | (_vm->_platypusSequenceDatNum << 16), 99, kSeqSyncExists, 0, 0, 0); - _vm->_platypusSequenceDatNum = 0; - _vm->_platypusSequenceId = 0x1BA; + gameSys.insertSequence(0x1BA, 99, _vm->_plat->_sequenceId | (_vm->_plat->_sequenceDatNum << 16), 99, kSeqSyncExists, 0, 0, 0); + _vm->_plat->_sequenceDatNum = 0; + _vm->_plat->_sequenceId = 0x1BA; _vm->_gnap->_actionStatus = -1; _platypusHypnotized = true; updateHotspots(); break; case kAS03HypnotizeScaredPlat: _vm->playGnapBrainPulsating(0, 0); - gameSys.insertSequence(0x1BF, 99, _vm->_platypusSequenceId | (_vm->_platypusSequenceDatNum << 16), 99, kSeqSyncExists, 0, 0, 0); + gameSys.insertSequence(0x1BF, 99, _vm->_plat->_sequenceId | (_vm->_plat->_sequenceDatNum << 16), 99, kSeqSyncExists, 0, 0, 0); gameSys.setAnimation(0x1BF, 99, 1); while (gameSys.getAnimationStatus(1) != 2) _vm->gameUpdateTick(); @@ -1225,8 +1225,8 @@ void Scene03::updateAnimations() { _vm->removeFullScreenSprite(); gameSys.setAnimation(0x1BA, 99, 1); gameSys.insertSequence(0x1BA, 99, 447, 99, kSeqSyncWait, 0, 0, 0); - _vm->_platypusSequenceDatNum = 0; - _vm->_platypusSequenceId = 0x1BA; + _vm->_plat->_sequenceDatNum = 0; + _vm->_plat->_sequenceId = 0x1BA; _vm->_gnap->_actionStatus = -1; _platypusHypnotized = true; updateHotspots(); @@ -1240,10 +1240,10 @@ void Scene03::updateAnimations() { _platypusHypnotized = false; break; case kAS03GrabCreek: - gameSys.insertSequence(0x1B4, _vm->_gnapId, makeRid(_vm->_gnapSequenceDatNum, _vm->_gnapSequenceId), _vm->_gnapId, kSeqSyncWait, 0, 0, 0); - gameSys.setAnimation(0x1B4, _vm->_gnapId, 0); - _vm->_gnapSequenceId = 0x1B4; - _vm->_gnapSequenceDatNum = 0; + gameSys.insertSequence(0x1B4, _vm->_gnap->_id, makeRid(_vm->_gnap->_sequenceDatNum, _vm->_gnap->_sequenceId), _vm->_gnap->_id, kSeqSyncWait, 0, 0, 0); + gameSys.setAnimation(0x1B4, _vm->_gnap->_id, 0); + _vm->_gnap->_sequenceId = 0x1B4; + _vm->_gnap->_sequenceDatNum = 0; _vm->_gnap->_actionStatus = kAS03GrabCreekDone; break; default: @@ -1256,40 +1256,40 @@ void Scene03::updateAnimations() { if (_nextPlatSequenceId == 0x1BD || _nextPlatSequenceId == 0x1C0) { gameSys.setAnimation(0, 0, 1); _platypusScared = true; - gameSys.insertSequence(0x1B5, _vm->_gnapId, makeRid(_vm->_gnapSequenceDatNum, _vm->_gnapSequenceId), _vm->_gnapId, kSeqSyncWait, 0, 0, 0); - gameSys.insertSequence(_nextPlatSequenceId, 99, _vm->_platypusSequenceId | (_vm->_platypusSequenceDatNum << 16), 99, kSeqSyncWait, 0, 0, 0); - _vm->_gnapSequenceId = 0x1B5; - _vm->_gnapSequenceDatNum = 0; + gameSys.insertSequence(0x1B5, _vm->_gnap->_id, makeRid(_vm->_gnap->_sequenceDatNum, _vm->_gnap->_sequenceId), _vm->_gnap->_id, kSeqSyncWait, 0, 0, 0); + gameSys.insertSequence(_nextPlatSequenceId, 99, _vm->_plat->_sequenceId | (_vm->_plat->_sequenceDatNum << 16), 99, kSeqSyncWait, 0, 0, 0); + _vm->_gnap->_sequenceId = 0x1B5; + _vm->_gnap->_sequenceDatNum = 0; _vm->_gnap->_idleFacing = kDirNone; - _vm->_platypusSequenceId = _nextPlatSequenceId; - _vm->_platypusSequenceDatNum = 0; + _vm->_plat->_sequenceId = _nextPlatSequenceId; + _vm->_plat->_sequenceDatNum = 0; gameSys.setAnimation(_nextPlatSequenceId, 99, 1); _nextPlatSequenceId = -1; _vm->_gnap->_actionStatus = -1; } else if (_nextPlatSequenceId == 0x1BC) { _vm->_gnap->_pos = Common::Point(3, 6); - gameSys.insertSequence(0x1B6, 120, makeRid(_vm->_gnapSequenceDatNum, _vm->_gnapSequenceId), _vm->_gnapId, kSeqSyncWait, 0, 0, 0); - gameSys.insertSequence(0x1BC, 99, _vm->_platypusSequenceId | (_vm->_platypusSequenceDatNum << 16), 99, kSeqSyncWait, 0, 0, 0); + gameSys.insertSequence(0x1B6, 120, makeRid(_vm->_gnap->_sequenceDatNum, _vm->_gnap->_sequenceId), _vm->_gnap->_id, kSeqSyncWait, 0, 0, 0); + gameSys.insertSequence(0x1BC, 99, _vm->_plat->_sequenceId | (_vm->_plat->_sequenceDatNum << 16), 99, kSeqSyncWait, 0, 0, 0); gameSys.setAnimation(0x1BC, 99, 0); - _vm->_gnapId = 20 * _vm->_gnap->_pos.y; - _vm->_gnapSequenceId = 0x1B6; - _vm->_gnapSequenceDatNum = 0; + _vm->_gnap->_id = 20 * _vm->_gnap->_pos.y; + _vm->_gnap->_sequenceId = 0x1B6; + _vm->_gnap->_sequenceDatNum = 0; _vm->_gnap->_idleFacing = kDirNone; _vm->_gnap->_actionStatus = kAS03FreePlatypusDone; _nextPlatSequenceId = -1; } else if (_nextPlatSequenceId == 0x1C2 && !_platypusScared) { gameSys.setAnimation(0, 0, 1); - gameSys.insertSequence(0x1C2, 99, _vm->_platypusSequenceId | (_vm->_platypusSequenceDatNum << 16), 99, kSeqSyncWait, 0, 0, 0); - _vm->_platypusSequenceId = 0x1C2; - _vm->_platypusSequenceDatNum = 0; + gameSys.insertSequence(0x1C2, 99, _vm->_plat->_sequenceId | (_vm->_plat->_sequenceDatNum << 16), 99, kSeqSyncWait, 0, 0, 0); + _vm->_plat->_sequenceId = 0x1C2; + _vm->_plat->_sequenceDatNum = 0; gameSys.setAnimation(0x1C2, 99, 1); _nextPlatSequenceId = -1; } else if (_nextPlatSequenceId == -1 && _platypusScared && !_platypusHypnotized) { gameSys.setAnimation(0, 0, 1); gameSys.setAnimation(0x1BE, 99, 1); - gameSys.insertSequence(0x1BE, 99, _vm->_platypusSequenceId | (_vm->_platypusSequenceDatNum << 16), 99, kSeqSyncWait, 0, 0, 0); - _vm->_platypusSequenceId = 0x1BE; - _vm->_platypusSequenceDatNum = 0; + gameSys.insertSequence(0x1BE, 99, _vm->_plat->_sequenceId | (_vm->_plat->_sequenceDatNum << 16), 99, kSeqSyncWait, 0, 0, 0); + _vm->_plat->_sequenceId = 0x1BE; + _vm->_plat->_sequenceDatNum = 0; _nextPlatSequenceId = -1; } } @@ -1380,9 +1380,9 @@ void Scene04::run() { // TODO setCursor((LPCSTR)IDC_WAIT); _vm->setGrabCursorSprite(kItemKeys); _vm->_gnap->_pos = Common::Point(4, 7); - _vm->_gnapId = 140; + _vm->_gnap->_id = 140; _vm->_plat->_pos = Common::Point(6, 7); - _vm->_platypusId = 141; + _vm->_plat->_id = 141; gameSys.insertSequence(0x107B5, 140, 0, 0, kSeqNone, 0, 300 - _vm->_gnapGridX, 336 - _vm->_gnapGridY); gameSys.insertSequence(0x20C, 141, 0, 0, kSeqNone, 0, 0, 0); gameSys.insertSequence(0x208, 121, 0, 0, kSeqNone, 0, 0, 0); @@ -1392,11 +1392,11 @@ void Scene04::run() { _vm->invAdd(kItemKeys); _vm->setFlag(kGFKeysTaken); _vm->clearFlag(kGFPlatypusDisguised); - _vm->_platypusSequenceId = 0x20C; - _vm->_platypusSequenceDatNum = 0; + _vm->_plat->_sequenceId = 0x20C; + _vm->_plat->_sequenceDatNum = 0; _vm->_plat->_idleFacing = kDirBottomRight; - _vm->_gnapSequenceId = 0x7B5; - _vm->_gnapSequenceDatNum = 1; + _vm->_gnap->_sequenceId = 0x7B5; + _vm->_gnap->_sequenceDatNum = 1; gameSys.waitForUpdate(); } else { gameSys.insertSequence(0x209, 121, 0, 0, kSeqNone, 0, 0, 0); @@ -1456,13 +1456,13 @@ void Scene04::run() { break; case GRAB_CURSOR: if (_vm->_cursorValue == 4) - _vm->gnapKissPlatypus(0); + _vm->_gnap->kissPlatypus(0); else _vm->playGnapMoan1(_vm->_plat->_pos.x, _vm->_plat->_pos.y); break; case TALK_CURSOR: _vm->playGnapBrainPulsating(_vm->_plat->_pos.x, _vm->_plat->_pos.y); - _vm->playPlatypusSequence(_vm->getPlatypusSequenceId()); + _vm->playPlatypusSequence(_vm->_plat->getSequenceId()); break; case PLAT_CURSOR: _vm->playGnapImpossible(0, 0); @@ -1507,7 +1507,7 @@ void Scene04::run() { break; case GRAB_CURSOR: _vm->_gnap->_idleFacing = kDirUpRight; - _vm->gnapWalkTo(_vm->_hotspotsWalkPos[3].x, _vm->_hotspotsWalkPos[3].y, 0, _vm->getGnapSequenceId(gskIdle, 0, 0) | 0x10000, 1); + _vm->gnapWalkTo(_vm->_hotspotsWalkPos[3].x, _vm->_hotspotsWalkPos[3].y, 0, _vm->_gnap->getSequenceId(gskIdle, 0, 0) | 0x10000, 1); _vm->_gnap->_actionStatus = kAS04GrabAxe; _vm->setFlag(kGFPlatypusTalkingToAssistant); updateHotspots(); @@ -1535,7 +1535,7 @@ void Scene04::run() { break; case GRAB_CURSOR: _vm->_gnap->_idleFacing = kDirBottomRight; - if (_vm->gnapWalkTo(_vm->_hotspotsWalkPos[2].x, _vm->_hotspotsWalkPos[2].y, 0, _vm->getGnapSequenceId(gskIdle, 0, 0) | 0x10000, 1)) + if (_vm->gnapWalkTo(_vm->_hotspotsWalkPos[2].x, _vm->_hotspotsWalkPos[2].y, 0, _vm->_gnap->getSequenceId(gskIdle, 0, 0) | 0x10000, 1)) _vm->_gnap->_actionStatus = kAS04GrabDog; break; case TALK_CURSOR: @@ -1607,7 +1607,7 @@ void Scene04::run() { } else { switch (_vm->_verbCursor) { case LOOK_CURSOR: - if (_vm->gnapWalkTo(_vm->_hotspotsWalkPos[7].x, _vm->_hotspotsWalkPos[7].y, 0, _vm->getGnapSequenceId(gskIdle, 10, 2) | 0x10000, 1)) { + if (_vm->gnapWalkTo(_vm->_hotspotsWalkPos[7].x, _vm->_hotspotsWalkPos[7].y, 0, _vm->_gnap->getSequenceId(gskIdle, 10, 2) | 0x10000, 1)) { if (_triedWindow) { _vm->_gnap->_actionStatus = kAS04GetKeyAnother; } else { @@ -1710,15 +1710,15 @@ void Scene04::updateAnimations() { _vm->_sceneDone = true; break; case kAS04OpenDoor: - gameSys.insertSequence(0x205, _vm->_gnapId, 0, 0, kSeqNone, 0, 0, 0); + gameSys.insertSequence(0x205, _vm->_gnap->_id, 0, 0, kSeqNone, 0, 0, 0); gameSys.insertSequence(0x207, 121, 521, 121, kSeqSyncWait, 0, 0, 0); _vm->_gnap->_pos = Common::Point(6, 7); - gameSys.insertSequence(0x107B5, _vm->_gnapId, - makeRid(_vm->_gnapSequenceDatNum, _vm->_gnapSequenceId), _vm->_gnapId, + gameSys.insertSequence(0x107B5, _vm->_gnap->_id, + makeRid(_vm->_gnap->_sequenceDatNum, _vm->_gnap->_sequenceId), _vm->_gnap->_id, kSeqSyncWait, _vm->getSequenceTotalDuration(0x205) - 1, 450 - _vm->_gnapGridX, 336 - _vm->_gnapGridY); - gameSys.setAnimation(0x107B5, _vm->_gnapId, 0); - _vm->_gnapSequenceId = 0x7B5; - _vm->_gnapSequenceDatNum = 1; + gameSys.setAnimation(0x107B5, _vm->_gnap->_id, 0); + _vm->_gnap->_sequenceId = 0x7B5; + _vm->_gnap->_sequenceDatNum = 1; _vm->_gnap->_actionStatus = kAS04OpenDoorDone; break; case kAS04OpenDoorDone: @@ -1726,56 +1726,56 @@ void Scene04::updateAnimations() { _vm->_gnap->_actionStatus = -1; break; case kAS04GetKeyFirst: - gameSys.insertSequence(0x204, _vm->_gnapId, makeRid(_vm->_gnapSequenceDatNum, _vm->_gnapSequenceId), _vm->_gnapId, kSeqSyncWait, 0, 0, 0); - gameSys.setAnimation(0x204, _vm->_gnapId, 0); - _vm->_gnapSequenceId = 0x204; - _vm->_gnapSequenceDatNum = 0; + gameSys.insertSequence(0x204, _vm->_gnap->_id, makeRid(_vm->_gnap->_sequenceDatNum, _vm->_gnap->_sequenceId), _vm->_gnap->_id, kSeqSyncWait, 0, 0, 0); + gameSys.setAnimation(0x204, _vm->_gnap->_id, 0); + _vm->_gnap->_sequenceId = 0x204; + _vm->_gnap->_sequenceDatNum = 0; _vm->_gnap->_actionStatus = kAS04GetKeyFirst2; break; case kAS04GetKeyFirst2: - gameSys.insertSequence(0x206, 255, makeRid(_vm->_gnapSequenceDatNum, _vm->_gnapSequenceId), _vm->_gnapId, kSeqSyncWait, 0, 0, 0); + gameSys.insertSequence(0x206, 255, makeRid(_vm->_gnap->_sequenceDatNum, _vm->_gnap->_sequenceId), _vm->_gnap->_id, kSeqSyncWait, 0, 0, 0); gameSys.insertSequence(0x1FF, 256, 0, 0, kSeqNone, 0, 0, 0); gameSys.insertSequence(0x20B, 256, 0, 0, kSeqNone, 0, 0, 0); gameSys.setAnimation(0x20B, 256, 0); - _vm->_gnapSequenceId = 0x206; - _vm->_gnapSequenceDatNum = 0; + _vm->_gnap->_sequenceId = 0x206; + _vm->_gnap->_sequenceDatNum = 0; _vm->_gnap->_actionStatus = kAS04GetKeyFirstDone; break; case kAS04GetKeyFirstDone: gameSys.requestRemoveSequence(0x1FF, 256); gameSys.requestRemoveSequence(0x20B, 256); - gameSys.insertSequence(0x107B5, _vm->_gnapId, - makeRid(_vm->_gnapSequenceDatNum, _vm->_gnapSequenceId), 255, + gameSys.insertSequence(0x107B5, _vm->_gnap->_id, + makeRid(_vm->_gnap->_sequenceDatNum, _vm->_gnap->_sequenceId), 255, kSeqSyncWait, 0, 75 * _vm->_gnap->_pos.x - _vm->_gnapGridX, 48 * _vm->_gnap->_pos.y - _vm->_gnapGridY); _vm->_gnap->_idleFacing = kDirBottomRight; - _vm->_gnapSequenceId = 0x7B5; - _vm->_gnapSequenceDatNum = 1; + _vm->_gnap->_sequenceId = 0x7B5; + _vm->_gnap->_sequenceDatNum = 1; _vm->_gnap->_actionStatus = -1; break; case kAS04GetKeyAnother: - gameSys.insertSequence(0x202, _vm->_gnapId, makeRid(_vm->_gnapSequenceDatNum, _vm->_gnapSequenceId), _vm->_gnapId, kSeqSyncWait, 0, 0, 0); - gameSys.setAnimation(0x202, _vm->_gnapId, 0); - _vm->_gnapSequenceId = 0x202; - _vm->_gnapSequenceDatNum = 0; + gameSys.insertSequence(0x202, _vm->_gnap->_id, makeRid(_vm->_gnap->_sequenceDatNum, _vm->_gnap->_sequenceId), _vm->_gnap->_id, kSeqSyncWait, 0, 0, 0); + gameSys.setAnimation(0x202, _vm->_gnap->_id, 0); + _vm->_gnap->_sequenceId = 0x202; + _vm->_gnap->_sequenceDatNum = 0; _vm->_gnap->_actionStatus = kAS04GetKeyAnother2; break; case kAS04GetKeyAnother2: - gameSys.insertSequence(0x203, 255, makeRid(_vm->_gnapSequenceDatNum, _vm->_gnapSequenceId), _vm->_gnapId, kSeqSyncWait, 0, 0, 0); + gameSys.insertSequence(0x203, 255, makeRid(_vm->_gnap->_sequenceDatNum, _vm->_gnap->_sequenceId), _vm->_gnap->_id, kSeqSyncWait, 0, 0, 0); gameSys.insertSequence(0x1FF, 256, 0, 0, kSeqNone, 0, 0, 0); gameSys.insertSequence(0x20A, 256, 0, 0, kSeqNone, 0, 0, 0); gameSys.setAnimation(0x20A, 256, 0); - _vm->_gnapSequenceId = 0x203; - _vm->_gnapSequenceDatNum = 0; + _vm->_gnap->_sequenceId = 0x203; + _vm->_gnap->_sequenceDatNum = 0; _vm->_gnap->_actionStatus = kAS04GetKeyAnotherDone; break; case kAS04GetKeyAnotherDone: gameSys.removeSequence(0x1FF, 256, true); gameSys.removeSequence(0x20A, 256, true); - gameSys.insertSequence(0x107B5, _vm->_gnapId, - makeRid(_vm->_gnapSequenceDatNum, _vm->_gnapSequenceId), 255, + gameSys.insertSequence(0x107B5, _vm->_gnap->_id, + makeRid(_vm->_gnap->_sequenceDatNum, _vm->_gnap->_sequenceId), 255, kSeqSyncWait, 0, 75 * _vm->_gnap->_pos.x - _vm->_gnapGridX, 48 * _vm->_gnap->_pos.y - _vm->_gnapGridY); - _vm->_gnapSequenceId = 0x7B5; - _vm->_gnapSequenceDatNum = 1; + _vm->_gnap->_sequenceId = 0x7B5; + _vm->_gnap->_sequenceDatNum = 1; _vm->_gnap->_idleFacing = kDirBottomRight; _vm->_gnap->_actionStatus = -1; break; @@ -1783,10 +1783,10 @@ void Scene04::updateAnimations() { _nextDogSequenceId = 0x201; break; case kAS04GrabAxe: - gameSys.insertSequence(0x211, _vm->_gnapId, makeRid(_vm->_gnapSequenceDatNum, _vm->_gnapSequenceId), _vm->_gnapId, kSeqSyncWait, 0, 0, 0); + gameSys.insertSequence(0x211, _vm->_gnap->_id, makeRid(_vm->_gnap->_sequenceDatNum, _vm->_gnap->_sequenceId), _vm->_gnap->_id, kSeqSyncWait, 0, 0, 0); gameSys.requestRemoveSequence(0x212, 100); - _vm->_gnapSequenceDatNum = 0; - _vm->_gnapSequenceId = 0x211; + _vm->_gnap->_sequenceDatNum = 0; + _vm->_gnap->_sequenceId = 0x211; _vm->_gnap->_actionStatus = -1; break; default: @@ -1808,12 +1808,12 @@ void Scene04::updateAnimations() { gameSys.insertSequence(_nextDogSequenceId, 139 - _dogIdCtr, _currDogSequenceId, 139 - (_dogIdCtr + 1) % 2, kSeqSyncWait, 0, 0, 0); - gameSys.insertSequence(0x200, _vm->_gnapId, makeRid(_vm->_gnapSequenceDatNum, _vm->_gnapSequenceId), _vm->_gnapId, kSeqSyncWait, 0, 0, 0); + gameSys.insertSequence(0x200, _vm->_gnap->_id, makeRid(_vm->_gnap->_sequenceDatNum, _vm->_gnap->_sequenceId), _vm->_gnap->_id, kSeqSyncWait, 0, 0, 0); gameSys.setAnimation(_nextDogSequenceId, 139 - _dogIdCtr, 3); _dogIdCtr = (_dogIdCtr + 1) % 2; _currDogSequenceId = 0x201; - _vm->_gnapSequenceId = 0x200; - _vm->_gnapSequenceDatNum = 0; + _vm->_gnap->_sequenceId = 0x200; + _vm->_gnap->_sequenceDatNum = 0; _vm->_gnap->_actionStatus = -1; _vm->_timers[6] = _vm->getRandom(20) + 60; _nextDogSequenceId = -1; @@ -1930,11 +1930,11 @@ void Scene05::run() { _vm->playGnapScratchingHead(_vm->_plat->_pos.x, _vm->_plat->_pos.y); break; case GRAB_CURSOR: - _vm->gnapKissPlatypus(0); + _vm->_gnap->kissPlatypus(0); break; case TALK_CURSOR: _vm->playGnapBrainPulsating(_vm->_plat->_pos.x, _vm->_plat->_pos.y); - _vm->playPlatypusSequence(_vm->getPlatypusSequenceId()); + _vm->playPlatypusSequence(_vm->_plat->getSequenceId()); break; case PLAT_CURSOR: _vm->playGnapImpossible(0, 0); @@ -1961,7 +1961,7 @@ void Scene05::run() { break; case PLAT_CURSOR: if (_vm->isFlag(kGFPlatypus)) { - _vm->gnapUseDeviceOnPlatypus(); + _vm->_gnap->useDeviceOnPlatypus(); if (_vm->platypusWalkTo(_vm->_hotspotsWalkPos[1].x, _vm->_hotspotsWalkPos[1].y, 1, 0x107C2, 1)) { _vm->_plat->_actionStatus = kAS05PlatSearchHaystack; _vm->_plat->_idleFacing = kDirUnk4; @@ -1981,7 +1981,7 @@ void Scene05::run() { if (_vm->_grabCursorSpriteIndex == kItemTwig) { _vm->_gnap->_idleFacing = kDirUpRight; _vm->gnapWalkTo(_vm->_hotspotsWalkPos[_vm->_sceneClickedHotspot].x, _vm->_hotspotsWalkPos[_vm->_sceneClickedHotspot].y + 1, - 0, _vm->getGnapSequenceId(gskIdle, 0, 0) | 0x10000, 1); + 0, _vm->_gnap->getSequenceId(gskIdle, 0, 0) | 0x10000, 1); _vm->_gnap->_actionStatus = kAS05UseTwigWithChicken; } else if (_vm->_grabCursorSpriteIndex >= 0) { _vm->playGnapShowCurrItem(_vm->_hotspotsWalkPos[_vm->_sceneClickedHotspot].x, _vm->_hotspotsWalkPos[_vm->_sceneClickedHotspot].y + 1, 9, 7); @@ -1992,12 +1992,12 @@ void Scene05::run() { break; case GRAB_CURSOR: _vm->_gnap->_idleFacing = kDirBottomRight; - _vm->gnapWalkTo(_vm->_hotspotsWalkPos[5].x, _vm->_hotspotsWalkPos[5].y, 0, _vm->getGnapSequenceId(gskIdle, 0, 0) | 0x10000, 1); + _vm->gnapWalkTo(_vm->_hotspotsWalkPos[5].x, _vm->_hotspotsWalkPos[5].y, 0, _vm->_gnap->getSequenceId(gskIdle, 0, 0) | 0x10000, 1); _vm->_gnap->_actionStatus = kAS05GrabChicken; break; case TALK_CURSOR: _vm->_gnap->_idleFacing = kDirBottomRight; - _vm->gnapWalkTo(_vm->_hotspotsWalkPos[5].x, _vm->_hotspotsWalkPos[5].y, 0, _vm->getGnapSequenceId(gskBrainPulsating, 0, 0) | 0x10000, 1); + _vm->gnapWalkTo(_vm->_hotspotsWalkPos[5].x, _vm->_hotspotsWalkPos[5].y, 0, _vm->_gnap->getSequenceId(gskBrainPulsating, 0, 0) | 0x10000, 1); _vm->_gnap->_actionStatus = kAS05TalkChicken; break; case PLAT_CURSOR: @@ -2019,7 +2019,7 @@ void Scene05::run() { break; case GRAB_CURSOR: _vm->_gnap->_idleFacing = kDirBottomLeft; - _vm->gnapWalkTo(_vm->_hotspotsWalkPos[3].x, _vm->_hotspotsWalkPos[3].y, 0, _vm->getGnapSequenceId(gskIdle, 0, 0) | 0x10000, 1); + _vm->gnapWalkTo(_vm->_hotspotsWalkPos[3].x, _vm->_hotspotsWalkPos[3].y, 0, _vm->_gnap->getSequenceId(gskIdle, 0, 0) | 0x10000, 1); _vm->_gnap->_actionStatus = kAS05GrabLadder; break; case TALK_CURSOR: @@ -2043,7 +2043,7 @@ void Scene05::run() { } else if (_vm->_gnap->_actionStatus < 0) { if (_vm->_grabCursorSpriteIndex == kItemNeedle) { if (_vm->gnapWalkTo(_vm->_hotspotsWalkPos[2].x, _vm->_hotspotsWalkPos[2].y, 0, - _vm->getGnapSequenceId(gskIdle, _vm->_hotspotsWalkPos[2].x, _vm->_hotspotsWalkPos[2].y) | 0x10000, 1)) + _vm->_gnap->getSequenceId(gskIdle, _vm->_hotspotsWalkPos[2].x, _vm->_hotspotsWalkPos[2].y) | 0x10000, 1)) _vm->_gnap->_actionStatus = kAS05PickPadlock; } else if (_vm->_grabCursorSpriteIndex >= 0) { _vm->playGnapShowCurrItem(_vm->_hotspotsWalkPos[2].x, _vm->_hotspotsWalkPos[2].y, 7, 4); @@ -2055,7 +2055,7 @@ void Scene05::run() { case GRAB_CURSOR: _vm->_gnap->_idleFacing = kDirUpRight; _vm->gnapWalkTo(_vm->_hotspotsWalkPos[_vm->_sceneClickedHotspot].x, _vm->_hotspotsWalkPos[_vm->_sceneClickedHotspot].y, - 0, _vm->getGnapSequenceId(gskIdle, 0, 0) | 0x10000, 1); + 0, _vm->_gnap->getSequenceId(gskIdle, 0, 0) | 0x10000, 1); _vm->_gnap->_actionStatus = kAS05TryPickPadlock; break; case TALK_CURSOR: @@ -2150,16 +2150,16 @@ void Scene05::updateAnimations() { _vm->_gnap->_actionStatus = -1; break; case kAS05TryPickPadlock: - gameSys.insertSequence(0x148, _vm->_gnapId, makeRid(_vm->_gnapSequenceDatNum, _vm->_gnapSequenceId), _vm->_gnapId, kSeqSyncWait, 0, 0, 0); - _vm->_gnapSequenceId = 0x148; - _vm->_gnapSequenceDatNum = 0; + gameSys.insertSequence(0x148, _vm->_gnap->_id, makeRid(_vm->_gnap->_sequenceDatNum, _vm->_gnap->_sequenceId), _vm->_gnap->_id, kSeqSyncWait, 0, 0, 0); + _vm->_gnap->_sequenceId = 0x148; + _vm->_gnap->_sequenceDatNum = 0; _vm->_gnap->_actionStatus = -1; break; case kAS05PickPadlock: - gameSys.setAnimation(0x147, _vm->_gnapId, 0); - gameSys.insertSequence(0x147, _vm->_gnapId, makeRid(_vm->_gnapSequenceDatNum, _vm->_gnapSequenceId), _vm->_gnapId, kSeqSyncWait, 0, 0, 0); - _vm->_gnapSequenceId = 0x147; - _vm->_gnapSequenceDatNum = 0; + gameSys.setAnimation(0x147, _vm->_gnap->_id, 0); + gameSys.insertSequence(0x147, _vm->_gnap->_id, makeRid(_vm->_gnap->_sequenceDatNum, _vm->_gnap->_sequenceId), _vm->_gnap->_id, kSeqSyncWait, 0, 0, 0); + _vm->_gnap->_sequenceId = 0x147; + _vm->_gnap->_sequenceDatNum = 0; _vm->setFlag(kGFBarnPadlockOpen); _vm->setFlag(kGFSceneFlag1); _vm->setGrabCursorSprite(-1); @@ -2178,17 +2178,17 @@ void Scene05::updateAnimations() { case kAS05GrabLadder: while (gameSys.isSequenceActive(0x149, 39)) _vm->gameUpdateTick(); - gameSys.insertSequence(0x14E, _vm->_gnapId + 1, 0, 0, kSeqNone, 0, 0, 0); - gameSys.insertSequence(0x14D, _vm->_gnapId, makeRid(_vm->_gnapSequenceDatNum, _vm->_gnapSequenceId), _vm->_gnapId, kSeqSyncWait, 0, 0, 0); - _vm->_gnapSequenceId = 0x14D; - _vm->_gnapSequenceDatNum = 0; + gameSys.insertSequence(0x14E, _vm->_gnap->_id + 1, 0, 0, kSeqNone, 0, 0, 0); + gameSys.insertSequence(0x14D, _vm->_gnap->_id, makeRid(_vm->_gnap->_sequenceDatNum, _vm->_gnap->_sequenceId), _vm->_gnap->_id, kSeqSyncWait, 0, 0, 0); + _vm->_gnap->_sequenceId = 0x14D; + _vm->_gnap->_sequenceDatNum = 0; _vm->_timers[2] = 200; _vm->_timers[6] = 300; _vm->_gnap->_actionStatus = -1; break; case kAS05EnterBarn: gameSys.insertSequence(0x107B1, 1, - makeRid(_vm->_gnapSequenceDatNum, _vm->_gnapSequenceId), _vm->_gnapId, + makeRid(_vm->_gnap->_sequenceDatNum, _vm->_gnap->_sequenceId), _vm->_gnap->_id, kSeqSyncWait, 0, 75 * _vm->_gnap->_pos.x - _vm->_gnapGridX, 48 * _vm->_gnap->_pos.y - _vm->_gnapGridY); gameSys.setAnimation(0x107B1, 1, 0); _vm->_gnap->_actionStatus = kAS05LeaveScene; @@ -2202,12 +2202,12 @@ void Scene05::updateAnimations() { } if (gameSys.getAnimationStatus(1) == 2) { - if (_vm->_platypusSequenceId == 0x146) { + if (_vm->_plat->_sequenceId == 0x146) { _vm->_plat->_pos = Common::Point(4, 8); gameSys.insertSequence(0x107C1, 160, 0x146, 256, kSeqSyncWait, 0, 300 - _vm->_platGridX, 384 - _vm->_platGridY); - _vm->_platypusSequenceId = 0x7C1; - _vm->_platypusSequenceDatNum = 1; - _vm->_platypusId = 20 * _vm->_plat->_pos.y; + _vm->_plat->_sequenceId = 0x7C1; + _vm->_plat->_sequenceDatNum = 1; + _vm->_plat->_id = 20 * _vm->_plat->_pos.y; _vm->invAdd(kItemNeedle); _vm->setFlag(kGFNeedleTaken); _vm->setGrabCursorSprite(kItemNeedle); @@ -2217,12 +2217,12 @@ void Scene05::updateAnimations() { } if (_vm->_plat->_actionStatus == kAS05PlatSearchHaystack) { gameSys.setAnimation(0, 0, 1); - gameSys.insertSequence(0x145, _vm->_platypusId, _vm->_platypusSequenceId | (_vm->_platypusSequenceDatNum << 16), _vm->_platypusId, kSeqSyncWait, 0, 0, 0); - gameSys.insertSequence(0x146, 256, 0x145, _vm->_platypusId, kSeqSyncWait, 0, 0, 0); + gameSys.insertSequence(0x145, _vm->_plat->_id, _vm->_plat->_sequenceId | (_vm->_plat->_sequenceDatNum << 16), _vm->_plat->_id, kSeqSyncWait, 0, 0, 0); + gameSys.insertSequence(0x146, 256, 0x145, _vm->_plat->_id, kSeqSyncWait, 0, 0, 0); _vm->hideCursor(); _vm->setGrabCursorSprite(-1); - _vm->_platypusSequenceId = 0x146; - _vm->_platypusSequenceDatNum = 0; + _vm->_plat->_sequenceId = 0x146; + _vm->_plat->_sequenceDatNum = 0; gameSys.setAnimation(0x146, 256, 1); _vm->_timers[1] = 300; } @@ -2232,9 +2232,9 @@ void Scene05::updateAnimations() { if (_nextChickenSequenceId == 0x14B) { gameSys.setAnimation(_nextChickenSequenceId, 100, 3); gameSys.insertSequence(_nextChickenSequenceId, 100, _currChickenSequenceId, 100, kSeqSyncWait, 0, 0, 0); - gameSys.insertSequence(0x14C, _vm->_gnapId, makeRid(_vm->_gnapSequenceDatNum, _vm->_gnapSequenceId), _vm->_gnapId, kSeqSyncWait, 0, 0, 0); - _vm->_gnapSequenceDatNum = 0; - _vm->_gnapSequenceId = 0x14C; + gameSys.insertSequence(0x14C, _vm->_gnap->_id, makeRid(_vm->_gnap->_sequenceDatNum, _vm->_gnap->_sequenceId), _vm->_gnap->_id, kSeqSyncWait, 0, 0, 0); + _vm->_gnap->_sequenceDatNum = 0; + _vm->_gnap->_sequenceId = 0x14C; _currChickenSequenceId = _nextChickenSequenceId; _nextChickenSequenceId = -1; _vm->_gnap->_actionStatus = -1; @@ -2354,11 +2354,11 @@ void Scene06::run() { _vm->playGnapScratchingHead(_vm->_plat->_pos.x, _vm->_plat->_pos.y); break; case GRAB_CURSOR: - _vm->gnapKissPlatypus(0); + _vm->_gnap->kissPlatypus(0); break; case TALK_CURSOR: _vm->playGnapBrainPulsating(_vm->_plat->_pos.x, _vm->_plat->_pos.y); - _vm->playPlatypusSequence(_vm->getPlatypusSequenceId()); + _vm->playPlatypusSequence(_vm->_plat->getSequenceId()); break; case PLAT_CURSOR: _vm->playGnapImpossible(0, 0); @@ -2449,11 +2449,11 @@ void Scene06::run() { break; case TALK_CURSOR: if (_horseTurnedBack) { - _vm->gnapWalkTo(_vm->_hotspotsWalkPos[3].x, _vm->_hotspotsWalkPos[3].y, 0, _vm->getGnapSequenceId(gskBrainPulsating, 3, 2) | 0x10000, 1); + _vm->gnapWalkTo(_vm->_hotspotsWalkPos[3].x, _vm->_hotspotsWalkPos[3].y, 0, _vm->_gnap->getSequenceId(gskBrainPulsating, 3, 2) | 0x10000, 1); } else { _vm->_gnap->_idleFacing = kDirBottomLeft; _vm->_hotspots[kHS06WalkArea5]._flags |= SF_WALKABLE; - _vm->gnapWalkTo(_vm->_hotspotsWalkPos[3].x, _vm->_hotspotsWalkPos[3].y, 0, _vm->getGnapSequenceId(gskBrainPulsating, 0, 0) | 0x10000, 1); + _vm->gnapWalkTo(_vm->_hotspotsWalkPos[3].x, _vm->_hotspotsWalkPos[3].y, 0, _vm->_gnap->getSequenceId(gskBrainPulsating, 0, 0) | 0x10000, 1); _vm->_hotspots[kHS06WalkArea5]._flags &= ~SF_WALKABLE; _vm->_gnap->_actionStatus = kAS06TalkToHorse; } @@ -2552,17 +2552,17 @@ void Scene06::updateAnimations() { _vm->_gnap->_actionStatus = -1; break; case kAS06TryToGetGas: - gameSys.insertSequence(0xFC, _vm->_gnapId, makeRid(_vm->_gnapSequenceDatNum, _vm->_gnapSequenceId), _vm->_gnapId, kSeqSyncWait, 0, 0, 0); - _vm->_gnapSequenceId = 0xFC; - _vm->_gnapSequenceDatNum = 0; + gameSys.insertSequence(0xFC, _vm->_gnap->_id, makeRid(_vm->_gnap->_sequenceDatNum, _vm->_gnap->_sequenceId), _vm->_gnap->_id, kSeqSyncWait, 0, 0, 0); + _vm->_gnap->_sequenceId = 0xFC; + _vm->_gnap->_sequenceDatNum = 0; _vm->_gnap->_actionStatus = -1; break; case kAS06TryToClimbLadder: gameSys.insertSequence(0xFF, 20, 0xFE, 20, kSeqSyncWait, 0, 0, 0); - gameSys.setAnimation(0xFD, _vm->_gnapId, 0); - gameSys.insertSequence(0xFD, _vm->_gnapId, makeRid(_vm->_gnapSequenceDatNum, _vm->_gnapSequenceId), _vm->_gnapId, kSeqSyncWait, 0, 0, 0); - _vm->_gnapSequenceId = 0xFD; - _vm->_gnapSequenceDatNum = 0; + gameSys.setAnimation(0xFD, _vm->_gnap->_id, 0); + gameSys.insertSequence(0xFD, _vm->_gnap->_id, makeRid(_vm->_gnap->_sequenceDatNum, _vm->_gnap->_sequenceId), _vm->_gnap->_id, kSeqSyncWait, 0, 0, 0); + _vm->_gnap->_sequenceId = 0xFD; + _vm->_gnap->_sequenceDatNum = 0; _vm->_gnap->_actionStatus = kAS06TryToClimbLadderDone; break; case kAS06TryToClimbLadderDone: @@ -2583,7 +2583,7 @@ void Scene06::updateAnimations() { if (gameSys.getAnimationStatus(1) == 2) { gameSys.setAnimation(0, 0, 1); - if (_vm->_platypusSequenceId == 0xFA) { + if (_vm->_plat->_sequenceId == 0xFA) { gameSys.setAnimation(0, 0, 1); _vm->invAdd(kItemGas); _vm->setFlag(kGFGasTaken); @@ -2591,9 +2591,9 @@ void Scene06::updateAnimations() { _vm->setGrabCursorSprite(kItemGas); _vm->_plat->_actionStatus = -1; _vm->_plat->_pos = Common::Point(6, 8); - gameSys.insertSequence(0x107C1, _vm->_platypusId, 0, 0, kSeqNone, 0, 450 - _vm->_platGridX, 384 - _vm->_platGridY); - _vm->_platypusSequenceId = 0x7C1; - _vm->_platypusSequenceDatNum = 1; + gameSys.insertSequence(0x107C1, _vm->_plat->_id, 0, 0, kSeqNone, 0, 450 - _vm->_platGridX, 384 - _vm->_platGridY); + _vm->_plat->_sequenceId = 0x7C1; + _vm->_plat->_sequenceDatNum = 1; _vm->setFlag(kGFUnk04); _vm->_gnap->_actionStatus = -1; _vm->showCursor(); @@ -2612,16 +2612,16 @@ void Scene06::updateAnimations() { _vm->hideCursor(); gameSys.setAnimation(0xFA, 256, 1); gameSys.insertSequence(0xF2, 120, _currHorseSequenceId, 120, kSeqSyncWait, 0, 0, 0); - gameSys.insertSequence(0x100, _vm->_gnapId, makeRid(_vm->_gnapSequenceDatNum, _vm->_gnapSequenceId), _vm->_gnapId, kSeqSyncWait, 0, 0, 0); + gameSys.insertSequence(0x100, _vm->_gnap->_id, makeRid(_vm->_gnap->_sequenceDatNum, _vm->_gnap->_sequenceId), _vm->_gnap->_id, kSeqSyncWait, 0, 0, 0); gameSys.insertSequence(0xF7, 20, 0xF8, 20, kSeqSyncWait, 0, 0, 0); - gameSys.insertSequence(0xFB, _vm->_platypusId, _vm->_platypusSequenceId | (_vm->_platypusSequenceDatNum << 16), _vm->_platypusId, kSeqSyncWait, 0, 0, 0); - gameSys.insertSequence(0xFA, 256, 0xFB, _vm->_platypusId, kSeqSyncWait, 0, 0, 0); - _vm->_platypusSequenceId = 0xFA; - _vm->_platypusSequenceDatNum = 0; - gameSys.insertSequence(0x107B7, _vm->_gnapId, 0x100, _vm->_gnapId, + gameSys.insertSequence(0xFB, _vm->_plat->_id, _vm->_plat->_sequenceId | (_vm->_plat->_sequenceDatNum << 16), _vm->_plat->_id, kSeqSyncWait, 0, 0, 0); + gameSys.insertSequence(0xFA, 256, 0xFB, _vm->_plat->_id, kSeqSyncWait, 0, 0, 0); + _vm->_plat->_sequenceId = 0xFA; + _vm->_plat->_sequenceDatNum = 0; + gameSys.insertSequence(0x107B7, _vm->_gnap->_id, 0x100, _vm->_gnap->_id, kSeqSyncWait, 0, 75 * _vm->_gnap->_pos.x - _vm->_gnapGridX, 48 * _vm->_gnap->_pos.y - _vm->_gnapGridY); - _vm->_gnapSequenceId = 0x7B7; - _vm->_gnapSequenceDatNum = 1; + _vm->_gnap->_sequenceId = 0x7B7; + _vm->_gnap->_sequenceDatNum = 1; _currHorseSequenceId = _nextHorseSequenceId; _nextHorseSequenceId = -1; _nextPlatSequenceId = -1; @@ -2686,17 +2686,17 @@ void Scene07::run() { _vm->endSceneInit(); } else { _vm->_gnap->_pos = Common::Point(6, 7); - _vm->_gnapId = 140; - _vm->_gnapSequenceId = 0x8F; - _vm->_gnapSequenceDatNum = 0; + _vm->_gnap->_id = 140; + _vm->_gnap->_sequenceId = 0x8F; + _vm->_gnap->_sequenceDatNum = 0; _vm->_gnap->_idleFacing = kDirBottomRight; gameSys.insertSequence(0x8F, 140, 0, 0, kSeqNone, 0, 0, 0); - gameSys.setAnimation(makeRid(_vm->_gnapSequenceDatNum, _vm->_gnapSequenceId), _vm->_gnapId, 0); + gameSys.setAnimation(makeRid(_vm->_gnap->_sequenceDatNum, _vm->_gnap->_sequenceId), _vm->_gnap->_id, 0); _vm->_gnap->_actionStatus = kAS07Wait; _vm->_plat->_pos = Common::Point(3, 8); - _vm->_platypusId = 160; - _vm->_platypusSequenceId = 0x91; - _vm->_platypusSequenceDatNum = 0; + _vm->_plat->_id = 160; + _vm->_plat->_sequenceId = 0x91; + _vm->_plat->_sequenceDatNum = 0; _vm->_plat->_idleFacing = kDirNone; gameSys.insertSequence(0x91, 160, 0, 0, kSeqNone, 0, 0, 0); _vm->endSceneInit(); @@ -2725,11 +2725,11 @@ void Scene07::run() { _vm->playGnapMoan1(_vm->_plat->_pos.x, _vm->_plat->_pos.y); break; case GRAB_CURSOR: - _vm->gnapKissPlatypus(0); + _vm->_gnap->kissPlatypus(0); break; case TALK_CURSOR: _vm->playGnapBrainPulsating(_vm->_plat->_pos.x, _vm->_plat->_pos.y); - _vm->playPlatypusSequence(_vm->getPlatypusSequenceId()); + _vm->playPlatypusSequence(_vm->_plat->getSequenceId()); break; case PLAT_CURSOR: break; @@ -2759,11 +2759,11 @@ void Scene07::run() { _vm->playGnapPullOutDevice(3, 3); gameSys.setAnimation(0x8E, 1, 2); gameSys.insertSequence(0x8E, 1, 141, 1, kSeqSyncWait, 0, 0, 0); - gameSys.insertSequence(_vm->getGnapSequenceId(gskUseDevice, 0, 0) | 0x10000, _vm->_gnapId, - makeRid(_vm->_gnapSequenceDatNum, _vm->_gnapSequenceId), _vm->_gnapId, + gameSys.insertSequence(_vm->_gnap->getSequenceId(gskUseDevice, 0, 0) | 0x10000, _vm->_gnap->_id, + makeRid(_vm->_gnap->_sequenceDatNum, _vm->_gnap->_sequenceId), _vm->_gnap->_id, kSeqSyncWait, 0, 75 * _vm->_gnap->_pos.x - _vm->_gnapGridX, 48 * _vm->_gnap->_pos.y - _vm->_gnapGridY); - _vm->_gnapSequenceId = _vm->getGnapSequenceId(gskUseDevice, 0, 0); - _vm->_gnapSequenceDatNum = 1; + _vm->_gnap->_sequenceId = _vm->_gnap->getSequenceId(gskUseDevice, 0, 0); + _vm->_gnap->_sequenceDatNum = 1; break; case TALK_CURSOR: case PLAT_CURSOR: @@ -2809,8 +2809,8 @@ void Scene07::run() { int gnapRandomValue = _vm->getRandom(20); // TODO Cleanup if (_vm->_plat->_idleFacing != kDirNone) { - if (gnapRandomValue != 0 || _vm->_platypusSequenceId != 0x7CA) { - if (gnapRandomValue != 1 || _vm->_platypusSequenceId != 0x7CA) { + if (gnapRandomValue != 0 || _vm->_plat->_sequenceId != 0x7CA) { + if (gnapRandomValue != 1 || _vm->_plat->_sequenceId != 0x7CA) { if (_vm->_plat->_pos.y == 9) _vm->playPlatypusSequence(0x107CA); } else { @@ -2819,8 +2819,8 @@ void Scene07::run() { } else { _vm->playPlatypusSequence(0x107CC); } - } else if (gnapRandomValue != 0 || _vm->_platypusSequenceId != 0x7C9) { - if (gnapRandomValue != 1 || _vm->_platypusSequenceId != 0x7C9) { + } else if (gnapRandomValue != 0 || _vm->_plat->_sequenceId != 0x7C9) { + if (gnapRandomValue != 1 || _vm->_plat->_sequenceId != 0x7C9) { if (_vm->_plat->_pos.y == 9) _vm->playPlatypusSequence(0x107C9); } else { @@ -2829,7 +2829,7 @@ void Scene07::run() { } else { _vm->playPlatypusSequence(0x107CB); } - gameSys.setAnimation(_vm->_platypusSequenceId | (_vm->_platypusSequenceDatNum << 16), _vm->_platypusId, 1); + gameSys.setAnimation(_vm->_plat->_sequenceId | (_vm->_plat->_sequenceDatNum << 16), _vm->_plat->_id, 1); } } else { _vm->_timers[0] = _vm->getRandom(75) + 75; @@ -2996,11 +2996,11 @@ void Scene08::run() { break; case GRAB_CURSOR: _vm->gnapActionIdle(0x14D); - _vm->gnapKissPlatypus(8); + _vm->_gnap->kissPlatypus(8); break; case TALK_CURSOR: _vm->playGnapBrainPulsating(_vm->_plat->_pos.x, _vm->_plat->_pos.y); - _vm->playPlatypusSequence(_vm->getPlatypusSequenceId()); + _vm->playPlatypusSequence(_vm->_plat->getSequenceId()); break; case PLAT_CURSOR: break; @@ -3043,12 +3043,12 @@ void Scene08::run() { case TALK_CURSOR: _vm->_gnap->_idleFacing = kDirUpLeft; _vm->gnapActionIdle(0x14D); - _vm->gnapWalkTo(8, 6, 0, _vm->getGnapSequenceId(gskBrainPulsating, 0, 0) | 0x10000, 1); + _vm->gnapWalkTo(8, 6, 0, _vm->_gnap->getSequenceId(gskBrainPulsating, 0, 0) | 0x10000, 1); _vm->_gnap->_actionStatus = kAS08TalkMan; break; case PLAT_CURSOR: _vm->gnapActionIdle(0x14D); - _vm->gnapUseDeviceOnPlatypus(); + _vm->_gnap->useDeviceOnPlatypus(); _vm->platypusWalkTo(6, 6, 1, 0x107C2, 1); _vm->_plat->_actionStatus = kAS08PlatWithMan; _vm->_plat->_idleFacing = kDirNone; @@ -3061,13 +3061,13 @@ void Scene08::run() { case kHS08Door: if (_vm->_grabCursorSpriteIndex >= 0) { _vm->playGnapShowCurrItem(4, 7, 5, 0); - gameSys.setAnimation(makeRid(_vm->_gnapSequenceDatNum, _vm->_gnapSequenceId), _vm->_gnapId, 0); + gameSys.setAnimation(makeRid(_vm->_gnap->_sequenceDatNum, _vm->_gnap->_sequenceId), _vm->_gnap->_id, 0); _vm->_gnap->_actionStatus = kAS08GrabDog; } else { switch (_vm->_verbCursor) { case LOOK_CURSOR: _vm->playGnapScratchingHead(6, 0); - gameSys.setAnimation(makeRid(_vm->_gnapSequenceDatNum, _vm->_gnapSequenceId), _vm->_gnapId, 0); + gameSys.setAnimation(makeRid(_vm->_gnap->_sequenceDatNum, _vm->_gnap->_sequenceId), _vm->_gnap->_id, 0); _vm->_gnap->_actionStatus = kAS08LookDog; break; case GRAB_CURSOR: @@ -3078,13 +3078,13 @@ void Scene08::run() { case TALK_CURSOR: _vm->_gnap->_idleFacing = kDirUpRight; _vm->gnapActionIdle(0x14D); - _vm->gnapWalkTo(4, 7, 0, _vm->getGnapSequenceId(gskBrainPulsating, 0, 0) | 0x10000, 1); + _vm->gnapWalkTo(4, 7, 0, _vm->_gnap->getSequenceId(gskBrainPulsating, 0, 0) | 0x10000, 1); _vm->_gnap->_actionStatus = kAS08TalkDog; break; case PLAT_CURSOR: _vm->setFlag(kGFSceneFlag1); _vm->gnapActionIdle(0x14D); - _vm->gnapUseDeviceOnPlatypus(); + _vm->_gnap->useDeviceOnPlatypus(); _vm->platypusWalkTo(3, 7, 1, 0x107C2, 1); _vm->_plat->_actionStatus = kAS08PlatWithDog; _vm->_plat->_idleFacing = kDirNone; @@ -3324,14 +3324,14 @@ void Scene08::updateAnimations() { } else if (_nextDogSequenceId == 0x147) { gameSys.setAnimation(_nextDogSequenceId, 100, 3); gameSys.insertSequence(_nextDogSequenceId, 100, _currDogSequenceId, 100, kSeqSyncWait, 0, 0, 0); - gameSys.insertSequence(0x148, 160, _vm->_platypusSequenceId | (_vm->_platypusSequenceDatNum << 16), _vm->_platypusId, kSeqSyncWait, 0, 0, 0); + gameSys.insertSequence(0x148, 160, _vm->_plat->_sequenceId | (_vm->_plat->_sequenceDatNum << 16), _vm->_plat->_id, kSeqSyncWait, 0, 0, 0); _currDogSequenceId = _nextDogSequenceId; _nextDogSequenceId = 0x134; _vm->_plat->_pos = Common::Point(1, 8); - _vm->_platypusId = 160; - _vm->_platypusSequenceId = 0x148; + _vm->_plat->_id = 160; + _vm->_plat->_sequenceId = 0x148; _vm->_plat->_idleFacing = kDirUnk4; - _vm->_platypusSequenceDatNum = 0; + _vm->_plat->_sequenceDatNum = 0; if (_vm->_gnap->_pos == Common::Point(1, 8)) _vm->gnapWalkStep(); } else if (_nextDogSequenceId != -1) { @@ -3343,10 +3343,10 @@ void Scene08::updateAnimations() { if (_currDogSequenceId == 0x133) { _vm->_timers[2] = _vm->getRandom(30) + 20; _vm->_timers[3] = _vm->getRandom(50) + 200; - gameSys.insertSequence(0x14D, _vm->_gnapId, makeRid(_vm->_gnapSequenceDatNum, _vm->_gnapSequenceId), _vm->_gnapId, kSeqSyncWait, 0, 0, 0); - _vm->_gnapSequenceId = 0x14D; + gameSys.insertSequence(0x14D, _vm->_gnap->_id, makeRid(_vm->_gnap->_sequenceDatNum, _vm->_gnap->_sequenceId), _vm->_gnap->_id, kSeqSyncWait, 0, 0, 0); + _vm->_gnap->_sequenceId = 0x14D; _vm->_gnap->_idleFacing = kDirUpRight; - _vm->_gnapSequenceDatNum = 0; + _vm->_gnap->_sequenceDatNum = 0; _vm->_gnap->_actionStatus = -1; } } @@ -3425,11 +3425,11 @@ void Scene09::run() { _vm->playGnapMoan1(_vm->_plat->_pos.x, _vm->_plat->_pos.y); break; case GRAB_CURSOR: - _vm->gnapKissPlatypus(0); + _vm->_gnap->kissPlatypus(0); break; case TALK_CURSOR: _vm->playGnapBrainPulsating(_vm->_plat->_pos.x, _vm->_plat->_pos.y); - _vm->playPlatypusSequence(_vm->getPlatypusSequenceId()); + _vm->playPlatypusSequence(_vm->_plat->getSequenceId()); break; case PLAT_CURSOR: break; @@ -3529,12 +3529,12 @@ void Scene09::updateAnimations() { break; case kAS09SearchTrash: gameSys.setAnimation(0x4C, 120, 0); - gameSys.insertSequence(0x4C, 120, makeRid(_vm->_gnapSequenceDatNum, _vm->_gnapSequenceId), _vm->_gnapId, kSeqSyncWait, 0, 0, 0); + gameSys.insertSequence(0x4C, 120, makeRid(_vm->_gnap->_sequenceDatNum, _vm->_gnap->_sequenceId), _vm->_gnap->_id, kSeqSyncWait, 0, 0, 0); gameSys.removeSequence(0x4B, 2, true); - _vm->_gnapSequenceId = 0x4C; - _vm->_gnapId = 120; + _vm->_gnap->_sequenceId = 0x4C; + _vm->_gnap->_id = 120; _vm->_gnap->_idleFacing = kDirUpLeft; - _vm->_gnapSequenceDatNum = 0; + _vm->_gnap->_sequenceDatNum = 0; _vm->_gnap->_pos = Common::Point(9, 6); _vm->_gnap->_actionStatus = kAS09SearchTrashDone; break; diff --git a/engines/gnap/scenes/group1.cpp b/engines/gnap/scenes/group1.cpp index 6aca6434ed..5cad36d393 100644 --- a/engines/gnap/scenes/group1.cpp +++ b/engines/gnap/scenes/group1.cpp @@ -117,11 +117,11 @@ void Scene10::run() { _vm->playGnapScratchingHead(_vm->_plat->_pos.x, _vm->_plat->_pos.y); break; case GRAB_CURSOR: - _vm->gnapKissPlatypus(10); + _vm->_gnap->kissPlatypus(10); break; case TALK_CURSOR: _vm->playGnapBrainPulsating(_vm->_plat->_pos.x, _vm->_plat->_pos.y); - _vm->playPlatypusSequence(_vm->getPlatypusSequenceId()); + _vm->playPlatypusSequence(_vm->_plat->getSequenceId()); break; case PLAT_CURSOR: break; @@ -150,7 +150,7 @@ void Scene10::run() { case kHS10Cook: if (_vm->_grabCursorSpriteIndex >= 0) { _vm->playGnapShowCurrItem(4, 8, 6, 0); - gameSys.setAnimation(makeRid(_vm->_gnapSequenceDatNum, _vm->_gnapSequenceId), _vm->_gnapId, 0); + gameSys.setAnimation(makeRid(_vm->_gnap->_sequenceDatNum, _vm->_gnap->_sequenceId), _vm->_gnap->_id, 0); _vm->_gnap->_actionStatus = kAS10AnnoyCook; } else { switch (_vm->_verbCursor) { @@ -164,12 +164,12 @@ void Scene10::run() { case TALK_CURSOR: _vm->_gnap->_idleFacing = kDirUpRight; _vm->gnapActionIdle(0x10C); - _vm->gnapWalkTo(4, 8, 0, _vm->getGnapSequenceId(gskBrainPulsating, 0, 0) | 0x10000, 1); + _vm->gnapWalkTo(4, 8, 0, _vm->_gnap->getSequenceId(gskBrainPulsating, 0, 0) | 0x10000, 1); _vm->_gnap->_actionStatus = kAS10AnnoyCook; break; case PLAT_CURSOR: _vm->gnapActionIdle(0x10C); - _vm->gnapUseDeviceOnPlatypus(); + _vm->_gnap->useDeviceOnPlatypus(); _vm->platypusWalkTo(4, 6, -1, -1, 1); _vm->gnapWalkTo(4, 8, 0, 0x107BB, 1); _vm->_gnap->_actionStatus = kAS10AnnoyCook; @@ -206,7 +206,7 @@ void Scene10::run() { _vm->playGnapMoan2(-1, -1); else { _vm->gnapActionIdle(0x10C); - _vm->gnapUseDeviceOnPlatypus(); + _vm->_gnap->useDeviceOnPlatypus(); _vm->platypusWalkTo(3, 7, -1, -1, 1); _vm->gnapWalkTo(4, 8, 0, 0x107BB, 1); _vm->_gnap->_actionStatus = kAS10AnnoyCook; @@ -239,7 +239,7 @@ void Scene10::run() { _vm->invAdd(kItemTongs); _vm->setFlag(kGFMudTaken); _vm->gnapActionIdle(0x10C); - _vm->gnapUseDeviceOnPlatypus(); + _vm->_gnap->useDeviceOnPlatypus(); _vm->platypusWalkTo(7, 6, 1, 0x107D2, 1); _vm->_plat->_actionStatus = kAS10PlatWithBox; _vm->_plat->_idleFacing = kDirUnk4; @@ -257,16 +257,16 @@ void Scene10::run() { } else { switch (_vm->_verbCursor) { case LOOK_CURSOR: - _vm->playGnapSequence(_vm->getGnapSequenceId(gskDeflect, 10, 5) | 0x10000); + _vm->playGnapSequence(_vm->_gnap->getSequenceId(gskDeflect, 10, 5) | 0x10000); break; case GRAB_CURSOR: _vm->gnapActionIdle(0x10C); _vm->gnapWalkTo(9, 6, 0, 0x107BB, 1); - gameSys.insertSequence(0x10E, 120, makeRid(_vm->_gnapSequenceDatNum, _vm->_gnapSequenceId), _vm->_gnapId, kSeqSyncWait, 0, 0, 0); - _vm->_gnapSequenceId = 0x10E; - _vm->_gnapId = 120; + gameSys.insertSequence(0x10E, 120, makeRid(_vm->_gnap->_sequenceDatNum, _vm->_gnap->_sequenceId), _vm->_gnap->_id, kSeqSyncWait, 0, 0, 0); + _vm->_gnap->_sequenceId = 0x10E; + _vm->_gnap->_id = 120; _vm->_gnap->_idleFacing = kDirUpRight; - _vm->_gnapSequenceDatNum = 0; + _vm->_gnap->_sequenceDatNum = 0; _vm->_gnap->_pos = Common::Point(9, 6); _vm->_timers[2] = 360; break; @@ -371,16 +371,16 @@ void Scene10::updateAnimations() { _vm->_plat->_pos = Common::Point(4, 8); gameSys.insertSequence(0x109, 100, _currCookSequenceId, 100, kSeqSyncWait, 0, 0, 0); gameSys.insertSequence(0x107C9, 160, - _vm->_platypusSequenceId | (_vm->_platypusSequenceDatNum << 16), _vm->_platypusId, + _vm->_plat->_sequenceId | (_vm->_plat->_sequenceDatNum << 16), _vm->_plat->_id, kSeqSyncWait, _vm->getSequenceTotalDuration(0x109) + _vm->getSequenceTotalDuration(0x10A) + _vm->getSequenceTotalDuration(0x10843), 75 * _vm->_plat->_pos.x - _vm->_platGridX, 48 * _vm->_plat->_pos.y - _vm->_platGridY); gameSys.removeSequence(0x107, 100, true); _currCookSequenceId = 0x109; _nextCookSequenceId = 0x843; - _vm->_platypusSequenceId = 0x7C9; - _vm->_platypusId = 160; + _vm->_plat->_sequenceId = 0x7C9; + _vm->_plat->_id = 160; _vm->_plat->_idleFacing = kDirNone; - _vm->_platypusSequenceDatNum = 1; + _vm->_plat->_sequenceDatNum = 1; break; case 0x843: _vm->hideCursor(); @@ -455,10 +455,10 @@ void Scene10::updateAnimations() { _nextCookSequenceId = 0x106; _vm->_timers[2] = _vm->getRandom(30) + 20; _vm->_timers[3] = 300; - gameSys.insertSequence(0x10C, _vm->_gnapId, makeRid(_vm->_gnapSequenceDatNum, _vm->_gnapSequenceId), _vm->_gnapId, kSeqSyncWait, 0, 0, 0); - _vm->_gnapSequenceId = 0x10C; + gameSys.insertSequence(0x10C, _vm->_gnap->_id, makeRid(_vm->_gnap->_sequenceDatNum, _vm->_gnap->_sequenceId), _vm->_gnap->_id, kSeqSyncWait, 0, 0, 0); + _vm->_gnap->_sequenceId = 0x10C; _vm->_gnap->_idleFacing = kDirUpRight; - _vm->_gnapSequenceDatNum = 0; + _vm->_gnap->_sequenceDatNum = 0; _vm->_gnap->_actionStatus = -1; _vm->_plat->_actionStatus = -1; } @@ -598,11 +598,11 @@ void Scene11::run() { _vm->playGnapMoan1(_vm->_plat->_pos.x, _vm->_plat->_pos.y); break; case GRAB_CURSOR: - _vm->gnapKissPlatypus(0); + _vm->_gnap->kissPlatypus(0); break; case TALK_CURSOR: _vm->playGnapBrainPulsating(_vm->_plat->_pos.x, _vm->_plat->_pos.y); - _vm->playPlatypusSequence(_vm->getPlatypusSequenceId()); + _vm->playPlatypusSequence(_vm->_plat->getSequenceId()); break; case PLAT_CURSOR: break; @@ -653,7 +653,7 @@ void Scene11::run() { break; case TALK_CURSOR: _vm->_gnap->_idleFacing = kDirUpLeft; - _vm->gnapWalkTo(3, 7, 0, _vm->getGnapSequenceId(gskBrainPulsating, 0, 0) | 0x10000, 1); + _vm->gnapWalkTo(3, 7, 0, _vm->_gnap->getSequenceId(gskBrainPulsating, 0, 0) | 0x10000, 1); _vm->_gnap->_actionStatus = kAS11TalkGoggleGuy; break; } @@ -671,7 +671,7 @@ void Scene11::run() { } else { switch (_vm->_verbCursor) { case LOOK_CURSOR: - _vm->playGnapSequence(_vm->getGnapSequenceId(gskDeflect, 3, 6) | 0x10000); + _vm->playGnapSequence(_vm->_gnap->getSequenceId(gskDeflect, 3, 6) | 0x10000); break; case GRAB_CURSOR: _vm->gnapWalkTo(5, 6, 0, 0x107BC, 1); @@ -679,7 +679,7 @@ void Scene11::run() { break; case TALK_CURSOR: _vm->_gnap->_idleFacing = kDirBottomLeft; - _vm->gnapWalkTo(5, 6, 0, _vm->getGnapSequenceId(gskBrainPulsating, 0, 0) | 0x10000, 1); + _vm->gnapWalkTo(5, 6, 0, _vm->_gnap->getSequenceId(gskBrainPulsating, 0, 0) | 0x10000, 1); _vm->_gnap->_actionStatus = kAS11TalkHookGuy; break; case PLAT_CURSOR: @@ -840,10 +840,10 @@ void Scene11::updateAnimations() { gameSys.setAnimation(0, 0, 0); _vm->_timers[2] = _vm->getRandom(30) + 20; _vm->_timers[3] = _vm->getRandom(50) + 200; - gameSys.insertSequence(0x1F4, 255, makeRid(_vm->_gnapSequenceDatNum, _vm->_gnapSequenceId), _vm->_gnapId, kSeqSyncWait, 0, 0, 0); - _vm->_gnapSequenceId = 0x1F4; - _vm->_gnapId = 255; - _vm->_gnapSequenceDatNum = 0; + gameSys.insertSequence(0x1F4, 255, makeRid(_vm->_gnap->_sequenceDatNum, _vm->_gnap->_sequenceId), _vm->_gnap->_id, kSeqSyncWait, 0, 0, 0); + _vm->_gnap->_sequenceId = 0x1F4; + _vm->_gnap->_id = 255; + _vm->_gnap->_sequenceDatNum = 0; gameSys.removeSequence(0x207, 257, true); gameSys.removeSequence(0x208, 256, true); _nextGoggleGuySequenceId = 0x1F8; @@ -893,11 +893,11 @@ void Scene11::updateAnimations() { if (_nextHookGuySequenceId == 0x204) { gameSys.setAnimation(_nextHookGuySequenceId, 120, 3); gameSys.insertSequence(0x204, 120, _currHookGuySequenceId, 120, kSeqSyncWait, 0, 0, 0); - gameSys.insertSequence(0x1F5, _vm->_gnapId, makeRid(_vm->_gnapSequenceDatNum, _vm->_gnapSequenceId), _vm->_gnapId, kSeqSyncWait, 0, 0, 0); + gameSys.insertSequence(0x1F5, _vm->_gnap->_id, makeRid(_vm->_gnap->_sequenceDatNum, _vm->_gnap->_sequenceId), _vm->_gnap->_id, kSeqSyncWait, 0, 0, 0); _currHookGuySequenceId = 0x204; _nextHookGuySequenceId = -1; - _vm->_gnapSequenceId = 0x1F5; - _vm->_gnapSequenceDatNum = 0; + _vm->_gnap->_sequenceId = 0x1F5; + _vm->_gnap->_sequenceDatNum = 0; _vm->_timers[4] = _vm->getRandom(40) + 20; _vm->_timers[2] = _vm->getRandom(20) + 70; _vm->_timers[3] = _vm->getRandom(50) + 200; @@ -1017,11 +1017,11 @@ void Scene12::run() { _vm->playGnapMoan1(_vm->_plat->_pos.x, _vm->_plat->_pos.y); break; case GRAB_CURSOR: - _vm->gnapKissPlatypus(0); + _vm->_gnap->kissPlatypus(0); break; case TALK_CURSOR: _vm->playGnapBrainPulsating(_vm->_plat->_pos.x, _vm->_plat->_pos.y); - _vm->playPlatypusSequence(_vm->getPlatypusSequenceId()); + _vm->playPlatypusSequence(_vm->_plat->getSequenceId()); break; case PLAT_CURSOR: break; @@ -1065,11 +1065,11 @@ void Scene12::run() { break; case TALK_CURSOR: _vm->_gnap->_idleFacing = kDirUpLeft; - _vm->gnapWalkTo(3, 7, 0, _vm->getGnapSequenceId(gskBrainPulsating, 0, 0) | 0x10000, 1); + _vm->gnapWalkTo(3, 7, 0, _vm->_gnap->getSequenceId(gskBrainPulsating, 0, 0) | 0x10000, 1); _vm->_gnap->_actionStatus = kAS12TalkToothGuy; break; case PLAT_CURSOR: - _vm->gnapUseDeviceOnPlatypus(); + _vm->_gnap->useDeviceOnPlatypus(); _vm->platypusWalkTo(3, 7, 1, 0x107D2, 1); _vm->_plat->_actionStatus = kAS12PlatWithToothGuy; _vm->_plat->_idleFacing = kDirUnk4; @@ -1102,12 +1102,12 @@ void Scene12::run() { break; case TALK_CURSOR: _vm->_gnap->_idleFacing = kDirUpRight; - _vm->gnapWalkTo(6, 6, 0, _vm->getGnapSequenceId(gskBrainPulsating, 0, 0) | 0x10000, 1); + _vm->gnapWalkTo(6, 6, 0, _vm->_gnap->getSequenceId(gskBrainPulsating, 0, 0) | 0x10000, 1); _vm->_gnap->_actionStatus = kAS12TalkBarkeeper; break; case PLAT_CURSOR: _vm->playGnapPullOutDevice(_vm->_plat->_pos.x, _vm->_plat->_pos.y); - gameSys.setAnimation(makeRid(_vm->_gnapSequenceDatNum, _vm->_gnapSequenceId), _vm->_gnapId, 0); + gameSys.setAnimation(makeRid(_vm->_gnap->_sequenceDatNum, _vm->_gnap->_sequenceId), _vm->_gnap->_id, 0); _vm->_gnap->_actionStatus = kAS12PlatWithBarkeeper; break; } @@ -1135,11 +1135,11 @@ void Scene12::run() { break; case TALK_CURSOR: _vm->_gnap->_idleFacing = kDirUpRight; - _vm->gnapWalkTo(7, 6, 0, _vm->getGnapSequenceId(gskBrainPulsating, 0, 0) | 0x10000, 1); + _vm->gnapWalkTo(7, 6, 0, _vm->_gnap->getSequenceId(gskBrainPulsating, 0, 0) | 0x10000, 1); _vm->_gnap->_actionStatus = kAS12TalkBeardGuy; break; case PLAT_CURSOR: - _vm->gnapUseDeviceOnPlatypus(); + _vm->_gnap->useDeviceOnPlatypus(); _vm->platypusWalkTo(7, 6, 1, 0x107C2, 1); _vm->_plat->_actionStatus = kAS12PlatWithBeardGuy; _vm->_plat->_idleFacing = kDirNone; @@ -1360,11 +1360,11 @@ void Scene12::updateAnimations() { gameSys.setAnimation(0x10843, 301, 0); _vm->_gnap->_actionStatus = kAS12QuarterToToothGuyDone; gameSys.insertSpriteDrawItem(_vm->_largeSprite, 0, 0, 300); - gameSys.insertSequence(0x10843, 301, makeRid(_vm->_gnapSequenceDatNum, _vm->_gnapSequenceId), _vm->_gnapId, kSeqSyncWait, 0, 0, 0); - gameSys.insertSequence(0x107B7, _vm->_gnapId, 0x10843, 301, + gameSys.insertSequence(0x10843, 301, makeRid(_vm->_gnap->_sequenceDatNum, _vm->_gnap->_sequenceId), _vm->_gnap->_id, kSeqSyncWait, 0, 0, 0); + gameSys.insertSequence(0x107B7, _vm->_gnap->_id, 0x10843, 301, kSeqSyncWait, 0, 75 * _vm->_gnap->_pos.x - _vm->_gnapGridX, 48 * _vm->_gnap->_pos.y - _vm->_gnapGridY); - _vm->_gnapSequenceId = 0x7B7; - _vm->_gnapSequenceDatNum = 1; + _vm->_gnap->_sequenceId = 0x7B7; + _vm->_gnap->_sequenceDatNum = 1; _vm->setFlag(kGFTwigTaken); _vm->invAdd(kItemQuarterWithHole); _vm->invRemove(kItemQuarter); @@ -1372,11 +1372,11 @@ void Scene12::updateAnimations() { if (_nextToothGuySequenceId == 0x1EF) { gameSys.setAnimation(_nextToothGuySequenceId, 50, 2); gameSys.insertSequence(_nextToothGuySequenceId, 50, _currToothGuySequenceId, 50, kSeqSyncWait, 0, 0, 0); - gameSys.insertSequence(0x205, _vm->_gnapId, makeRid(_vm->_gnapSequenceDatNum, _vm->_gnapSequenceId), _vm->_gnapId, kSeqSyncWait, 0, 0, 0); + gameSys.insertSequence(0x205, _vm->_gnap->_id, makeRid(_vm->_gnap->_sequenceDatNum, _vm->_gnap->_sequenceId), _vm->_gnap->_id, kSeqSyncWait, 0, 0, 0); _currToothGuySequenceId = _nextToothGuySequenceId; _nextToothGuySequenceId = -1; - _vm->_gnapSequenceId = 0x205; - _vm->_gnapSequenceDatNum = 0; + _vm->_gnap->_sequenceId = 0x205; + _vm->_gnap->_sequenceDatNum = 0; _vm->_timers[4] = 40; _vm->_timers[2] = _vm->getRandom(20) + 70; _vm->_timers[3] = _vm->getRandom(50) + 200; @@ -1526,11 +1526,11 @@ void Scene13::run() { _vm->playGnapMoan1(_vm->_plat->_pos.x, _vm->_plat->_pos.y); break; case GRAB_CURSOR: - _vm->gnapKissPlatypus(0); + _vm->_gnap->kissPlatypus(0); break; case TALK_CURSOR: _vm->playGnapBrainPulsating(_vm->_plat->_pos.x, _vm->_plat->_pos.y); - _vm->playPlatypusSequence(_vm->getPlatypusSequenceId()); + _vm->playPlatypusSequence(_vm->_plat->getSequenceId()); break; case PLAT_CURSOR: break; @@ -1560,14 +1560,14 @@ void Scene13::run() { case TALK_CURSOR: if (_vm->_gnap->_pos == Common::Point(5, 5)) { _backToiletCtr = MIN(5, _backToiletCtr + 1); - gameSys.setAnimation(_backToiletCtr + 0xA3, _vm->_gnapId, 0); - gameSys.insertSequence(_backToiletCtr + 0xA3, _vm->_gnapId, - makeRid(_vm->_gnapSequenceDatNum, _vm->_gnapSequenceId), _vm->_gnapId, + gameSys.setAnimation(_backToiletCtr + 0xA3, _vm->_gnap->_id, 0); + gameSys.insertSequence(_backToiletCtr + 0xA3, _vm->_gnap->_id, + makeRid(_vm->_gnap->_sequenceDatNum, _vm->_gnap->_sequenceId), _vm->_gnap->_id, kSeqScale | kSeqSyncWait, 0, 0, 0); _vm->_gnap->_actionStatus = kAS13Wait; - _vm->_gnapSequenceId = _backToiletCtr + 0xA3; + _vm->_gnap->_sequenceId = _backToiletCtr + 0xA3; _vm->_gnap->_idleFacing = kDirUpRight; - _vm->_gnapSequenceDatNum = 0; + _vm->_gnap->_sequenceDatNum = 0; } else { _vm->gnapWalkTo(5, 5, 0, 0x107BB, 1); _vm->_gnap->_actionStatus = kAS13BackToilet; @@ -1613,7 +1613,7 @@ void Scene13::run() { break; case TALK_CURSOR: _vm->_gnap->_idleFacing = kDirUpRight; - _vm->gnapWalkTo(7, 7, -1, _vm->getGnapSequenceId(gskBrainPulsating, 0, 0), 1); + _vm->gnapWalkTo(7, 7, -1, _vm->_gnap->getSequenceId(gskBrainPulsating, 0, 0), 1); break; case PLAT_CURSOR: _vm->playGnapImpossible(0, 0); @@ -1628,7 +1628,7 @@ void Scene13::run() { } else { switch (_vm->_verbCursor) { case LOOK_CURSOR: - _vm->playGnapSequence(_vm->getGnapSequenceId(gskDeflect, 9, 6)); + _vm->playGnapSequence(_vm->_gnap->getSequenceId(gskDeflect, 9, 6)); _vm->gnapWalkTo(_vm->_gnap->_pos, 0, -1, 1); _vm->_gnap->_actionStatus = kAS13Wait; break; @@ -1650,7 +1650,7 @@ void Scene13::run() { } else { switch (_vm->_verbCursor) { case LOOK_CURSOR: - _vm->playGnapSequence(_vm->getGnapSequenceId(gskDeflect, 5, 9)); + _vm->playGnapSequence(_vm->_gnap->getSequenceId(gskDeflect, 5, 9)); _vm->gnapWalkTo(_vm->_gnap->_pos, 0, -1, 1); _vm->_gnap->_actionStatus = kAS13Wait; break; @@ -1770,9 +1770,9 @@ void Scene13::updateAnimations() { break; case kAS13BackToilet: _backToiletCtr = MIN(5, _backToiletCtr + 1); - gameSys.insertSequence(_backToiletCtr + 0xA3, _vm->_gnapId, makeRid(_vm->_gnapSequenceDatNum, _vm->_gnapSequenceId), _vm->_gnapId, 9, 0, 0, 0); - _vm->_gnapSequenceId = _backToiletCtr + 0xA3; - _vm->_gnapSequenceDatNum = 0; + gameSys.insertSequence(_backToiletCtr + 0xA3, _vm->_gnap->_id, makeRid(_vm->_gnap->_sequenceDatNum, _vm->_gnap->_sequenceId), _vm->_gnap->_id, 9, 0, 0, 0); + _vm->_gnap->_sequenceId = _backToiletCtr + 0xA3; + _vm->_gnap->_sequenceDatNum = 0; _vm->_gnap->_actionStatus = -1; break; case kAS13FrontToilet: @@ -1785,12 +1785,12 @@ void Scene13::updateAnimations() { break; case kAS13GrabSink: gameSys.setAnimation(0xAB, 160, 0); - gameSys.insertSequence(0xAB, 160, makeRid(_vm->_gnapSequenceDatNum, _vm->_gnapSequenceId), _vm->_gnapId, kSeqSyncWait, 0, 0, 0); + gameSys.insertSequence(0xAB, 160, makeRid(_vm->_gnap->_sequenceDatNum, _vm->_gnap->_sequenceId), _vm->_gnap->_id, kSeqSyncWait, 0, 0, 0); gameSys.removeSequence(0xAA, 256, true); - _vm->_gnapSequenceId = 0xAB; - _vm->_gnapId = 160; + _vm->_gnap->_sequenceId = 0xAB; + _vm->_gnap->_id = 160; _vm->_gnap->_idleFacing = kDirBottomRight; - _vm->_gnapSequenceDatNum = 0; + _vm->_gnap->_sequenceDatNum = 0; _vm->_gnap->_pos = Common::Point(4, 8); _vm->_timers[2] = 360; _vm->_gnap->_actionStatus = kAS13GrabSinkDone; @@ -1804,11 +1804,11 @@ void Scene13::updateAnimations() { break; case kAS13GrabUrinal: gameSys.setAnimation(0xA2, 120, 0); - gameSys.insertSequence(0xA2, 120, makeRid(_vm->_gnapSequenceDatNum, _vm->_gnapSequenceId), _vm->_gnapId, kSeqSyncWait, 0, 0, 0); - _vm->_gnapSequenceId = 0xA2; - _vm->_gnapId = 120; + gameSys.insertSequence(0xA2, 120, makeRid(_vm->_gnap->_sequenceDatNum, _vm->_gnap->_sequenceId), _vm->_gnap->_id, kSeqSyncWait, 0, 0, 0); + _vm->_gnap->_sequenceId = 0xA2; + _vm->_gnap->_id = 120; _vm->_gnap->_idleFacing = kDirBottomLeft; - _vm->_gnapSequenceDatNum = 0; + _vm->_gnap->_sequenceDatNum = 0; _vm->_gnap->_pos = Common::Point(4, 6); _vm->_timers[2] = 360; _vm->_gnap->_actionStatus = kAS13Wait; @@ -1862,7 +1862,7 @@ void Scene14::run() { if (!_vm->isFlag(kGFNeedleTaken)) { gameSys.insertSequence(0x24, 10, 0x23, 10, kSeqSyncWait, 0, 0, 0); - _vm->_gnapSequenceId = 0x24; + _vm->_gnap->_sequenceId = 0x24; _vm->_timers[2] = _vm->getRandom(40) + 50; } @@ -1893,7 +1893,7 @@ void Scene14::run() { _vm->setGrabCursorSprite(-1); _vm->hideCursor(); gameSys.setAnimation(0x26, 10, 0); - gameSys.insertSequence(0x26, 10, _vm->_gnapSequenceId, 10, kSeqSyncWait, 0, 0, 0); + gameSys.insertSequence(0x26, 10, _vm->_gnap->_sequenceId, 10, kSeqSyncWait, 0, 0, 0); } else if (_vm->_grabCursorSpriteIndex >= 0) { _vm->playSound(0x108E9, false); } else { @@ -1902,9 +1902,9 @@ void Scene14::run() { _vm->playSound(0x108E9, false); break; case GRAB_CURSOR: - gameSys.insertSequence(0x25, 10, _vm->_gnapSequenceId, 10, kSeqSyncWait, 0, 0, 0); + gameSys.insertSequence(0x25, 10, _vm->_gnap->_sequenceId, 10, kSeqSyncWait, 0, 0, 0); gameSys.insertSequence(0x23, 10, 0x25, 10, kSeqSyncWait, 0, 0, 0); - _vm->_gnapSequenceId = 0x23; + _vm->_gnap->_sequenceId = 0x23; break; case TALK_CURSOR: _vm->playSound((_vm->getRandom(5) + 0x8D5) | 0x10000, false); @@ -1944,8 +1944,8 @@ void Scene14::run() { _vm->checkGameKeys(); if (!_vm->isFlag(kGFNeedleTaken) && !_vm->_timers[2]) { - gameSys.insertSequence(0x24, 10, _vm->_gnapSequenceId, 10, kSeqSyncWait, 0, 0, 0); - _vm->_gnapSequenceId = 0x24; + gameSys.insertSequence(0x24, 10, _vm->_gnap->_sequenceId, 10, kSeqSyncWait, 0, 0, 0); + _vm->_gnap->_sequenceId = 0x24; _vm->_timers[2] = _vm->getRandom(40) + 50; } @@ -2340,10 +2340,10 @@ void Scene17::platHangUpPhone() { gameSys.insertSequence(0x257, 254, _currPhoneSequenceId, 254, kSeqSyncExists, 0, 0, 0); while (gameSys.getAnimationStatus(4) != 2) _vm->gameUpdateTick(); - gameSys.setAnimation(0x25B, _vm->_platypusId, 1); - gameSys.insertSequence(0x25B, _vm->_platypusId, _vm->_platypusSequenceId | (_vm->_platypusSequenceDatNum << 16), _vm->_platypusId, kSeqSyncWait, 0, 0, 0); - _vm->_platypusSequenceId = 0x25B; - _vm->_platypusSequenceDatNum = 0; + gameSys.setAnimation(0x25B, _vm->_plat->_id, 1); + gameSys.insertSequence(0x25B, _vm->_plat->_id, _vm->_plat->_sequenceId | (_vm->_plat->_sequenceDatNum << 16), _vm->_plat->_id, kSeqSyncWait, 0, 0, 0); + _vm->_plat->_sequenceId = 0x25B; + _vm->_plat->_sequenceDatNum = 0; _currPhoneSequenceId = -1; _nextPhoneSequenceId = -1; _vm->clearFlag(kGFPlatypusTalkingToAssistant); @@ -2423,11 +2423,11 @@ void Scene17::run() { } else if (_vm->isFlag(kGFUnk27)) { _vm->initGnapPos(3, 9, kDirUpLeft); _vm->_plat->_pos = _vm->_hotspotsWalkPos[2]; - _vm->_platypusId = 20 * _vm->_hotspotsWalkPos[2].y; + _vm->_plat->_id = 20 * _vm->_hotspotsWalkPos[2].y; gameSys.insertSequence(0x25A, 20 * _vm->_hotspotsWalkPos[2].y, 0, 0, kSeqNone, 0, 0, 0); gameSys.insertSequence(0x257, 254, 0, 0, kSeqNone, 0, 0, 0); - _vm->_platypusSequenceId = 0x25A; - _vm->_platypusSequenceDatNum = 0; + _vm->_plat->_sequenceId = 0x25A; + _vm->_plat->_sequenceDatNum = 0; _vm->endSceneInit(); _vm->clearFlag(kGFSpringTaken); _vm->clearFlag(kGFUnk16); @@ -2442,10 +2442,10 @@ void Scene17::run() { _vm->clearFlag(kGFUnk16); _vm->initPlatypusPos(7, 9, kDirNone); _vm->_gnap->_pos = _vm->_hotspotsWalkPos[2]; - _vm->_gnapId = 20 * _vm->_hotspotsWalkPos[2].y; + _vm->_gnap->_id = 20 * _vm->_hotspotsWalkPos[2].y; gameSys.insertSequence(601, 20 * _vm->_hotspotsWalkPos[2].y, 0, 0, kSeqNone, 0, 0, 0); - _vm->_gnapSequenceDatNum = 0; - _vm->_gnapSequenceId = 601; + _vm->_gnap->_sequenceDatNum = 0; + _vm->_gnap->_sequenceId = 601; _vm->_gnap->_actionStatus = kAS17GnapHangUpPhone; _vm->clearFlag(kGFUnk25); gameSys.insertSequence(0x251, 254, 0, 0, kSeqNone, 0, 0, 0); @@ -2458,12 +2458,12 @@ void Scene17::run() { _vm->_sceneWaiting = true; _vm->initGnapPos(3, 9, kDirUpLeft); _vm->_plat->_pos = _vm->_hotspotsWalkPos[2]; - _vm->_platypusId = 20 * _vm->_hotspotsWalkPos[2].y; + _vm->_plat->_id = 20 * _vm->_hotspotsWalkPos[2].y; _currPhoneSequenceId = 0x251; gameSys.insertSequence(0x25A, 20 * _vm->_hotspotsWalkPos[2].y, 0, 0, kSeqNone, 0, 0, 0); gameSys.insertSequence(_currPhoneSequenceId, 254, 0, 0, kSeqNone, 0, 0, 0); - _vm->_platypusSequenceId = 0x25A; - _vm->_platypusSequenceDatNum = 0; + _vm->_plat->_sequenceId = 0x25A; + _vm->_plat->_sequenceDatNum = 0; _vm->endSceneInit(); gameSys.setAnimation(_currPhoneSequenceId, 254, 1); _vm->_plat->_actionStatus = kAS17PlatPhoningAssistant; @@ -2490,21 +2490,21 @@ void Scene17::run() { } } else { _vm->_gnap->_pos = Common::Point(3, 6); - _vm->_gnapId = 120; - _vm->_gnapSequenceId = 0x23D; - _vm->_gnapSequenceDatNum = 0; + _vm->_gnap->_id = 120; + _vm->_gnap->_sequenceId = 0x23D; + _vm->_gnap->_sequenceDatNum = 0; _vm->_gnap->_idleFacing = kDirBottomRight; - gameSys.insertSequence(makeRid(_vm->_gnapSequenceDatNum, _vm->_gnapSequenceId), _vm->_gnapId, 0, 0, kSeqNone, 0, 0, 0); + gameSys.insertSequence(makeRid(_vm->_gnap->_sequenceDatNum, _vm->_gnap->_sequenceId), _vm->_gnap->_id, 0, 0, kSeqNone, 0, 0, 0); _vm->_plat->_pos = Common::Point(-1, 8); - _vm->_platypusId = 160; + _vm->_plat->_id = 160; gameSys.insertSequence(0x241, 160, 0, 0, kSeqNone, 0, 0, 0); - gameSys.insertSequence(0x107C1, _vm->_platypusId, 0x241, _vm->_platypusId, + gameSys.insertSequence(0x107C1, _vm->_plat->_id, 0x241, _vm->_plat->_id, kSeqScale | kSeqSyncWait, 0, 75 * _vm->_plat->_pos.x - _vm->_platGridX, 48 * _vm->_plat->_pos.y - _vm->_platGridY); gameSys.insertSequence(0x22C, 2, 0, 0, kSeqNone, 0, 0, 0); // TODO delayTicksA(2, 9); _vm->endSceneInit(); - _vm->_platypusSequenceId = 0x7C1; - _vm->_platypusSequenceDatNum = 1; + _vm->_plat->_sequenceId = 0x7C1; + _vm->_plat->_sequenceDatNum = 1; _vm->_plat->_idleFacing = kDirBottomRight; _vm->platypusWalkTo(2, 9, -1, 0x107C2, 1); } @@ -2528,9 +2528,9 @@ void Scene17::run() { if (_vm->_gnap->_actionStatus < 0) { if (_vm->_grabCursorSpriteIndex == kItemJoint) { if (_vm->isFlag(kGFGrassTaken)) { - _vm->gnapUseJointOnPlatypus(); + _vm->_gnap->useJointOnPlatypus(); } else { - _vm->gnapUseDeviceOnPlatypus(); + _vm->_gnap->useDeviceOnPlatypus(); _vm->platypusWalkTo(_vm->_hotspotsWalkPos[6].x, _vm->_hotspotsWalkPos[6].y, 1, 0x107C2, 1); _vm->gnapWalkTo(_vm->_hotspotsWalkPos[6].x + 1, _vm->_hotspotsWalkPos[6].y, 0, 0x107BA, 1); _vm->_plat->_actionStatus = kAS17GetWrench1; @@ -2549,7 +2549,7 @@ void Scene17::run() { break; case TALK_CURSOR: _vm->playGnapBrainPulsating(_vm->_plat->_pos.x, _vm->_plat->_pos.y); - _vm->playPlatypusSequence(_vm->getPlatypusSequenceId()); + _vm->playPlatypusSequence(_vm->_plat->getSequenceId()); break; case PLAT_CURSOR: _vm->playGnapImpossible(0, 0); @@ -2577,7 +2577,7 @@ void Scene17::run() { case PLAT_CURSOR: if (_canTryGetWrench) { platHangUpPhone(); - _vm->gnapUseDeviceOnPlatypus(); + _vm->_gnap->useDeviceOnPlatypus(); _vm->platypusWalkTo(_vm->_hotspotsWalkPos[6].x + 1, _vm->_hotspotsWalkPos[6].y, 1, 0x107C2, 1); _vm->_plat->_actionStatus = kAS17TryGetWrench; _vm->_gnap->_actionStatus = kAS17TryGetWrench; @@ -2593,7 +2593,7 @@ void Scene17::run() { case kHS17Phone1: if (_vm->_gnap->_actionStatus < 0) { if (_vm->_grabCursorSpriteIndex == kItemDiceQuarterHole) { - _vm->gnapWalkTo(_vm->_hotspotsWalkPos[2].x, _vm->_hotspotsWalkPos[2].y, 0, _vm->getGnapSequenceId(gskIdle, 0, 0) | 0x10000, 1); + _vm->gnapWalkTo(_vm->_hotspotsWalkPos[2].x, _vm->_hotspotsWalkPos[2].y, 0, _vm->_gnap->getSequenceId(gskIdle, 0, 0) | 0x10000, 1); _vm->_gnap->_actionStatus = kAS17PutCoinIntoPhone; } else if (_vm->_grabCursorSpriteIndex >= 0) { _vm->playGnapShowCurrItem(_vm->_hotspotsWalkPos[2].x, _vm->_hotspotsWalkPos[2].y, 1, 3); @@ -2605,7 +2605,7 @@ void Scene17::run() { case GRAB_CURSOR: if (_vm->isFlag(kGFUnk18)) { platHangUpPhone(); - _vm->gnapWalkTo(_vm->_gnap->_pos, 0, _vm->getGnapSequenceId(gskIdle, _vm->_hotspotsWalkPos[2].x, _vm->_hotspotsWalkPos[2].y) | 0x10000, 1); + _vm->gnapWalkTo(_vm->_gnap->_pos, 0, _vm->_gnap->getSequenceId(gskIdle, _vm->_hotspotsWalkPos[2].x, _vm->_hotspotsWalkPos[2].y) | 0x10000, 1); _vm->_gnap->_actionStatus = kAS17GetCoinFromPhone; } else _vm->playGnapImpossible(0, 0); @@ -2617,7 +2617,7 @@ void Scene17::run() { if (_vm->isFlag(kGFUnk18)) { platHangUpPhone(); _vm->_isLeavingScene = true; - _vm->gnapUseDeviceOnPlatypus(); + _vm->_gnap->useDeviceOnPlatypus(); _vm->_plat->_idleFacing = kDirUpLeft; _vm->platypusWalkTo(_vm->_hotspotsWalkPos[2].x, _vm->_hotspotsWalkPos[2].y, 1, 0x107C2, 1); _vm->setFlag(kGFUnk16); @@ -2634,7 +2634,7 @@ void Scene17::run() { case kHS17Phone2: if (_vm->_gnap->_actionStatus < 0) { if (_vm->_grabCursorSpriteIndex == kItemDiceQuarterHole) { - _vm->gnapWalkTo(_vm->_hotspotsWalkPos[2].x, _vm->_hotspotsWalkPos[2].y, 0, _vm->getGnapSequenceId(gskIdle, 0, 0) | 0x10000, 1); + _vm->gnapWalkTo(_vm->_hotspotsWalkPos[2].x, _vm->_hotspotsWalkPos[2].y, 0, _vm->_gnap->getSequenceId(gskIdle, 0, 0) | 0x10000, 1); _vm->_gnap->_actionStatus = kAS17PutCoinIntoPhone; } else if (_vm->_grabCursorSpriteIndex >= 0) { _vm->playGnapShowCurrItem(_vm->_hotspotsWalkPos[2].x, _vm->_hotspotsWalkPos[2].y, 1, 3); @@ -2648,7 +2648,7 @@ void Scene17::run() { platHangUpPhone(); _vm->_isLeavingScene = true; _vm->_gnap->_idleFacing = kDirUpLeft; - _vm->gnapWalkTo(_vm->_hotspotsWalkPos[2].x, _vm->_hotspotsWalkPos[2].y, 0, _vm->getGnapSequenceId(gskIdle, 0, 0) | 0x10000, 1); + _vm->gnapWalkTo(_vm->_hotspotsWalkPos[2].x, _vm->_hotspotsWalkPos[2].y, 0, _vm->_gnap->getSequenceId(gskIdle, 0, 0) | 0x10000, 1); _vm->_gnap->_actionStatus = kAS17GnapUsePhone; _vm->setFlag(kGFSpringTaken); } else @@ -2661,7 +2661,7 @@ void Scene17::run() { if (_vm->isFlag(kGFUnk18)) { platHangUpPhone(); _vm->_isLeavingScene = true; - _vm->gnapUseDeviceOnPlatypus(); + _vm->_gnap->useDeviceOnPlatypus(); _vm->_plat->_idleFacing = kDirUpLeft; _vm->platypusWalkTo(_vm->_hotspotsWalkPos[2].x, _vm->_hotspotsWalkPos[2].y, 1, 0x107C2, 1); _vm->setFlag(kGFUnk16); @@ -2841,10 +2841,10 @@ void Scene17::updateAnimations() { _vm->_gnap->_actionStatus = -1; break; case kAS17PutCoinIntoPhone: - gameSys.setAnimation(0x24C, _vm->_gnapId, 0); - gameSys.insertSequence(0x24C, _vm->_gnapId, makeRid(_vm->_gnapSequenceDatNum, _vm->_gnapSequenceId), _vm->_gnapId, kSeqSyncWait, 0, 0, 0); - _vm->_gnapSequenceDatNum = 0; - _vm->_gnapSequenceId = 0x24C; + gameSys.setAnimation(0x24C, _vm->_gnap->_id, 0); + gameSys.insertSequence(0x24C, _vm->_gnap->_id, makeRid(_vm->_gnap->_sequenceDatNum, _vm->_gnap->_sequenceId), _vm->_gnap->_id, kSeqSyncWait, 0, 0, 0); + _vm->_gnap->_sequenceDatNum = 0; + _vm->_gnap->_sequenceId = 0x24C; _vm->invRemove(kItemDiceQuarterHole); _vm->setGrabCursorSprite(-1); _vm->setFlag(kGFUnk18); @@ -2855,15 +2855,15 @@ void Scene17::updateAnimations() { _vm->_gnap->_actionStatus = -1; break; case kAS17GnapUsePhone: - gameSys.setAnimation(0x24D, _vm->_gnapId, 0); - gameSys.insertSequence(0x24D, _vm->_gnapId, makeRid(_vm->_gnapSequenceDatNum, _vm->_gnapSequenceId), _vm->_gnapId, kSeqSyncWait, 0, 0, 0); + gameSys.setAnimation(0x24D, _vm->_gnap->_id, 0); + gameSys.insertSequence(0x24D, _vm->_gnap->_id, makeRid(_vm->_gnap->_sequenceDatNum, _vm->_gnap->_sequenceId), _vm->_gnap->_id, kSeqSyncWait, 0, 0, 0); _vm->_gnap->_actionStatus = kAS17LeaveScene; _vm->_newSceneNum = 53; break; case kAS17GnapHangUpPhone: - gameSys.insertSequence(0x258, _vm->_gnapId, makeRid(_vm->_gnapSequenceDatNum, _vm->_gnapSequenceId), _vm->_gnapId, kSeqSyncWait, 0, 0, 0); - _vm->_gnapSequenceDatNum = 0; - _vm->_gnapSequenceId = 0x258; + gameSys.insertSequence(0x258, _vm->_gnap->_id, makeRid(_vm->_gnap->_sequenceDatNum, _vm->_gnap->_sequenceId), _vm->_gnap->_id, kSeqSyncWait, 0, 0, 0); + _vm->_gnap->_sequenceDatNum = 0; + _vm->_gnap->_sequenceId = 0x258; _vm->_gnap->_actionStatus = -1; break; case kAS17LeaveScene: @@ -2896,10 +2896,10 @@ void Scene17::updateAnimations() { _vm->setGrabCursorSprite(kItemWrench); break; case kAS17PlatUsePhone: - gameSys.setAnimation(0x24E, _vm->_platypusId, 1); - gameSys.insertSequence(0x24E, _vm->_platypusId, _vm->_platypusSequenceId | (_vm->_platypusSequenceDatNum << 16), _vm->_platypusId, kSeqSyncWait, 0, 0, 0); - _vm->_platypusSequenceDatNum = 0; - _vm->_platypusSequenceId = 0x24E; + gameSys.setAnimation(0x24E, _vm->_plat->_id, 1); + gameSys.insertSequence(0x24E, _vm->_plat->_id, _vm->_plat->_sequenceId | (_vm->_plat->_sequenceDatNum << 16), _vm->_plat->_id, kSeqSyncWait, 0, 0, 0); + _vm->_plat->_sequenceDatNum = 0; + _vm->_plat->_sequenceId = 0x24E; _vm->_plat->_actionStatus = kAS17LeaveScene; _vm->_newSceneNum = 53; break; @@ -2909,9 +2909,9 @@ void Scene17::updateAnimations() { _platPhoneCtr = 0; _nextPhoneSequenceId = -1; _currPhoneSequenceId = -1; - gameSys.insertSequence(0x25B, _vm->_platypusId, 0x25A, _vm->_platypusId, kSeqSyncWait, 0, 0, 0); - _vm->_platypusSequenceDatNum = 0; - _vm->_platypusSequenceId = 0x25B; + gameSys.insertSequence(0x25B, _vm->_plat->_id, 0x25A, _vm->_plat->_id, kSeqSyncWait, 0, 0, 0); + _vm->_plat->_sequenceDatNum = 0; + _vm->_plat->_sequenceId = 0x25B; _vm->_plat->_actionStatus = -1; _vm->clearFlag(kGFPlatypusTalkingToAssistant); _vm->_sceneWaiting = false; @@ -2920,9 +2920,9 @@ void Scene17::updateAnimations() { _nextPhoneSequenceId = kPlatPhoneSequenceIds[_platPhoneCtr]; gameSys.setAnimation(_nextPhoneSequenceId, 254, 1); gameSys.insertSequence(_nextPhoneSequenceId, 254, _currPhoneSequenceId, 254, kSeqSyncWait, 0, 0, 0); - gameSys.insertSequence(0x25A, _vm->_platypusId, 0x25A, _vm->_platypusId, kSeqSyncWait, 0, 0, 0); - _vm->_platypusSequenceDatNum = 0; - _vm->_platypusSequenceId = 0x25A; + gameSys.insertSequence(0x25A, _vm->_plat->_id, 0x25A, _vm->_plat->_id, kSeqSyncWait, 0, 0, 0); + _vm->_plat->_sequenceDatNum = 0; + _vm->_plat->_sequenceId = 0x25A; _currPhoneSequenceId = _nextPhoneSequenceId; } break; @@ -2936,27 +2936,27 @@ void Scene17::updateAnimations() { switch (_nextWrenchSequenceId) { case 0x233: _vm->_gnap->_actionStatus = -1; - gameSys.insertSequence(0x243, _vm->_platypusId, - _vm->_platypusSequenceId | (_vm->_platypusSequenceDatNum << 16), _vm->_platypusId, + gameSys.insertSequence(0x243, _vm->_plat->_id, + _vm->_plat->_sequenceId | (_vm->_plat->_sequenceDatNum << 16), _vm->_plat->_id, kSeqSyncWait, 0, 0, 0); gameSys.insertSequence(_nextWrenchSequenceId, 40, _currWrenchSequenceId, 40, kSeqSyncWait, 0, 0, 0); _currWrenchSequenceId = _nextWrenchSequenceId; _nextWrenchSequenceId = -1; - _vm->_platypusSequenceId = 0x243; - _vm->_platypusSequenceDatNum = 0; - gameSys.setAnimation(0x243, _vm->_platypusId, 1); + _vm->_plat->_sequenceId = 0x243; + _vm->_plat->_sequenceDatNum = 0; + gameSys.setAnimation(0x243, _vm->_plat->_id, 1); break; case 0x234: _vm->_gnap->_actionStatus = -1; - gameSys.insertSequence(0x242, _vm->_platypusId, - _vm->_platypusSequenceId | (_vm->_platypusSequenceDatNum << 16), _vm->_platypusId, + gameSys.insertSequence(0x242, _vm->_plat->_id, + _vm->_plat->_sequenceId | (_vm->_plat->_sequenceDatNum << 16), _vm->_plat->_id, kSeqSyncWait, 0, 0, 0); gameSys.insertSequence(_nextWrenchSequenceId, 40, _currWrenchSequenceId, 40, kSeqSyncWait, 0, 0, 0); _currWrenchSequenceId = _nextWrenchSequenceId; _nextWrenchSequenceId = -1; - _vm->_platypusSequenceId = 0x242; - _vm->_platypusSequenceDatNum = 0; - gameSys.setAnimation(0x242, _vm->_platypusId, 1); + _vm->_plat->_sequenceId = 0x242; + _vm->_plat->_sequenceDatNum = 0; + gameSys.setAnimation(0x242, _vm->_plat->_id, 1); break; case 0x231: if (_vm->getRandom(2) != 0) @@ -2989,15 +2989,15 @@ void Scene17::updateAnimations() { _currWrenchSequenceId = 0x22E; _canTryGetWrench = false; } - gameSys.setAnimation(0x23F, _vm->_platypusId, 1); - gameSys.insertSequence(0x10875, _vm->_gnapId, makeRid(_vm->_gnapSequenceDatNum, _vm->_gnapSequenceId), _vm->_gnapId, kSeqSyncWait, 0, 0, 0); - gameSys.insertSequence(0x23F, _vm->_platypusId, - _vm->_platypusSequenceId | (_vm->_platypusSequenceDatNum << 16), _vm->_platypusId, + gameSys.setAnimation(0x23F, _vm->_plat->_id, 1); + gameSys.insertSequence(0x10875, _vm->_gnap->_id, makeRid(_vm->_gnap->_sequenceDatNum, _vm->_gnap->_sequenceId), _vm->_gnap->_id, kSeqSyncWait, 0, 0, 0); + gameSys.insertSequence(0x23F, _vm->_plat->_id, + _vm->_plat->_sequenceId | (_vm->_plat->_sequenceDatNum << 16), _vm->_plat->_id, kSeqSyncWait, 0, 0, 0); - _vm->_gnapSequenceDatNum = 1; - _vm->_platypusSequenceDatNum = 0; - _vm->_gnapSequenceId = 0x875; - _vm->_platypusSequenceId = 0x23F; + _vm->_gnap->_sequenceDatNum = 1; + _vm->_plat->_sequenceDatNum = 0; + _vm->_gnap->_sequenceId = 0x875; + _vm->_plat->_sequenceId = 0x23F; _vm->gnapWalkTo(3, 8, -1, 0x107B9, 1); _vm->_plat->_actionStatus = kAS17GetWrench2; } @@ -3037,15 +3037,15 @@ void Scene17::updateAnimations() { break; case 0x249: gameSys.setAnimation(0x230, 40, 2); - gameSys.setAnimation(0x240, _vm->_platypusId, 1); + gameSys.setAnimation(0x240, _vm->_plat->_id, 1); gameSys.insertSequence(0x230, 40, _currWrenchSequenceId, 40, kSeqSyncWait, 0, 0, 0); gameSys.insertSequence(_nextCarWindowSequenceId, 40, _currCarWindowSequenceId, 40, kSeqSyncWait, 0, 0, 0); - gameSys.insertSequence(0x240, _vm->_platypusId, _vm->_platypusSequenceId, _vm->_platypusId, kSeqSyncWait, 0, 0, 0); - gameSys.insertSequence(0x23E, _vm->_gnapId, makeRid(_vm->_gnapSequenceDatNum, _vm->_gnapSequenceId), _vm->_gnapId, kSeqSyncWait, 0, 0, 0); - _vm->_gnapSequenceId = 0x23E; - _vm->_gnapSequenceDatNum = 0; - _vm->_platypusSequenceId = 0x240; - _vm->_platypusSequenceDatNum = 0; + gameSys.insertSequence(0x240, _vm->_plat->_id, _vm->_plat->_sequenceId, _vm->_plat->_id, kSeqSyncWait, 0, 0, 0); + gameSys.insertSequence(0x23E, _vm->_gnap->_id, makeRid(_vm->_gnap->_sequenceDatNum, _vm->_gnap->_sequenceId), _vm->_gnap->_id, kSeqSyncWait, 0, 0, 0); + _vm->_gnap->_sequenceId = 0x23E; + _vm->_gnap->_sequenceDatNum = 0; + _vm->_plat->_sequenceId = 0x240; + _vm->_plat->_sequenceDatNum = 0; gameSys.setAnimation(0x24A, 40, 3); gameSys.insertSequence(0x24A, 40, _nextCarWindowSequenceId, 40, kSeqSyncWait, 0, 0, 0); while (gameSys.getAnimationStatus(2) != 2) { @@ -3173,9 +3173,9 @@ void Scene18::gnapCarryGarbageCanTo(int gridX) { nextGridX = destGridX; if (nextGridX == _vm->_gnap->_pos.x) { - gnapSeqId = _vm->_gnapSequenceId; - gnapId = _vm->_gnapId; - gnapDatNum = _vm->_gnapSequenceDatNum; + gnapSeqId = _vm->_gnap->_sequenceId; + gnapId = _vm->_gnap->_id; + gnapDatNum = _vm->_gnap->_sequenceDatNum; gnapGridX = _vm->_gnap->_pos.x; if (_vm->_gnap->_pos.x <= curGridX) direction = 1; @@ -3190,9 +3190,9 @@ void Scene18::gnapCarryGarbageCanTo(int gridX) { _vm->platypusMakeRoom(); } } - gnapSeqId = _vm->_gnapSequenceId; - gnapId = _vm->_gnapId; - gnapDatNum = _vm->_gnapSequenceDatNum; + gnapSeqId = _vm->_gnap->_sequenceId; + gnapId = _vm->_gnap->_id; + gnapDatNum = _vm->_gnap->_sequenceDatNum; gnapGridX = _vm->_gnap->_pos.x; int seqId; if (nextGridX < _vm->_gnap->_pos.x) { @@ -3219,20 +3219,20 @@ void Scene18::gnapCarryGarbageCanTo(int gridX) { } if (direction == 1) - _vm->_gnapSequenceId = 0x20A; + _vm->_gnap->_sequenceId = 0x20A; else - _vm->_gnapSequenceId = 0x209; - _vm->_gnapSequenceDatNum = 0; + _vm->_gnap->_sequenceId = 0x209; + _vm->_gnap->_sequenceDatNum = 0; if (direction == 1) _vm->_gnap->_idleFacing = kDirBottomRight; else _vm->_gnap->_idleFacing = kDirBottomLeft; - _vm->_gnapId = 20 * _vm->_gnap->_pos.y + 1; + _vm->_gnap->_id = 20 * _vm->_gnap->_pos.y + 1; - gameSys.setAnimation(makeRid(_vm->_gnapSequenceDatNum, _vm->_gnapSequenceId), _vm->_gnapId, 0); - gameSys.insertSequence(makeRid(_vm->_gnapSequenceDatNum, _vm->_gnapSequenceId), _vm->_gnapId, + gameSys.setAnimation(makeRid(_vm->_gnap->_sequenceDatNum, _vm->_gnap->_sequenceId), _vm->_gnap->_id, 0); + gameSys.insertSequence(makeRid(_vm->_gnap->_sequenceDatNum, _vm->_gnap->_sequenceId), _vm->_gnap->_id, gnapSeqId | (gnapDatNum << 16), gnapId, kSeqScale | kSeqSyncWait, 0, 75 * gnapGridX - _vm->_gnapGridX, 48 * _vm->_gnap->_pos.y - _vm->_gnapGridY); @@ -3253,17 +3253,17 @@ void Scene18::putDownGarbageCan(int animationIndex) { _vm->clearFlag(kGFPlatypusDisguised); updateHotspots(); if (_vm->_gnap->_idleFacing != kDirNone && _vm->_gnap->_idleFacing != kDirBottomRight && _vm->_gnap->_idleFacing != kDirUpRight) { - gameSys.insertSequence(0x107BA, _vm->_gnapId, - makeRid(_vm->_gnapSequenceDatNum, _vm->_gnapSequenceId), _vm->_gnapId, + gameSys.insertSequence(0x107BA, _vm->_gnap->_id, + makeRid(_vm->_gnap->_sequenceDatNum, _vm->_gnap->_sequenceId), _vm->_gnap->_id, kSeqSyncWait, 0, 75 * _vm->_gnap->_pos.x - _vm->_gnapGridX, 48 * _vm->_gnap->_pos.y - _vm->_gnapGridY); - _vm->_gnapSequenceId = 0x7BA; + _vm->_gnap->_sequenceId = 0x7BA; } else { - gameSys.insertSequence(0x107B9, _vm->_gnapId, - makeRid(_vm->_gnapSequenceDatNum, _vm->_gnapSequenceId), _vm->_gnapId, + gameSys.insertSequence(0x107B9, _vm->_gnap->_id, + makeRid(_vm->_gnap->_sequenceDatNum, _vm->_gnap->_sequenceId), _vm->_gnap->_id, kSeqSyncWait, 0, 75 * _vm->_gnap->_pos.x - _vm->_gnapGridX, 48 * _vm->_gnap->_pos.y - _vm->_gnapGridY); - _vm->_gnapSequenceId = 0x7B9; + _vm->_gnap->_sequenceId = 0x7B9; } - _vm->_gnapSequenceDatNum = 1; + _vm->_gnap->_sequenceDatNum = 1; gameSys.insertSequence(0x1FB, 19, 0, 0, kSeqNone, 0, 15 * (5 * _vm->_s18GarbageCanPos - 40), 0); gameSys.setAnimation(0x1FA, 19, 4); gameSys.insertSequence(0x1FA, 19, 507, 19, kSeqSyncWait, 0, 15 * (5 * _vm->_s18GarbageCanPos - 40), 0); @@ -3436,7 +3436,7 @@ void Scene18::run() { putDownGarbageCan(0); } if (_vm->_grabCursorSpriteIndex == kItemJoint) { - _vm->gnapUseJointOnPlatypus(); + _vm->_gnap->useJointOnPlatypus(); } else if (_vm->_grabCursorSpriteIndex >= 0) { _vm->playGnapShowItem(_vm->_grabCursorSpriteIndex, _vm->_plat->_pos.x, _vm->_plat->_pos.y); } else { @@ -3445,11 +3445,11 @@ void Scene18::run() { _vm->playGnapMoan1(_vm->_plat->_pos.x, _vm->_plat->_pos.y); break; case GRAB_CURSOR: - _vm->gnapKissPlatypus(0); + _vm->_gnap->kissPlatypus(0); break; case TALK_CURSOR: _vm->playGnapBrainPulsating(_vm->_plat->_pos.x, _vm->_plat->_pos.y); - _vm->playPlatypusSequence(_vm->getPlatypusSequenceId()); + _vm->playPlatypusSequence(_vm->_plat->getSequenceId()); break; case PLAT_CURSOR: _vm->playGnapImpossible(0, 0); @@ -3476,7 +3476,7 @@ void Scene18::run() { _vm->playGnapScratchingHead(3, 2); break; case GRAB_CURSOR: - _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS18CowboyHat].x, _vm->_hotspotsWalkPos[kHS18CowboyHat].y, 0, _vm->getGnapSequenceId(gskPullOutDeviceNonWorking, 3, 2) | 0x10000, 1); + _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS18CowboyHat].x, _vm->_hotspotsWalkPos[kHS18CowboyHat].y, 0, _vm->_gnap->getSequenceId(gskPullOutDeviceNonWorking, 3, 2) | 0x10000, 1); break; case TALK_CURSOR: case PLAT_CURSOR: @@ -3515,7 +3515,7 @@ void Scene18::run() { if (!_vm->isFlag(kGFTruckKeysUsed)) { _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS18GarbageCan].x - (_vm->_gnap->_pos.x < _vm->_s18GarbageCanPos ? 1 : -1), _vm->_hotspotsWalkPos[kHS18GarbageCan].y, -1, -1, 1); - _vm->gnapWalkTo(_vm->_gnap->_pos, 0, _vm->getGnapSequenceId(gskIdle, _vm->_s18GarbageCanPos, _vm->_gnap->_pos.y) | 0x10000, 1); + _vm->gnapWalkTo(_vm->_gnap->_pos, 0, _vm->_gnap->getSequenceId(gskIdle, _vm->_s18GarbageCanPos, _vm->_gnap->_pos.y) | 0x10000, 1); _vm->_gnap->_actionStatus = kAS18GrabGarbageCanFromStreet; } else if (!_vm->isFlag(kGFTruckFilledWithGas)) { if (_vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS18GarbageCan].x, _vm->_hotspotsWalkPos[kHS18GarbageCan].y, 0, -1, 1)) @@ -3570,7 +3570,7 @@ void Scene18::run() { } } else { if (_vm->_grabCursorSpriteIndex == kItemWrench) { - _vm->gnapWalkTo(_vm->_gnap->_pos, 0, _vm->getGnapSequenceId(gskIdle, 2, 8) | 0x10000, 1); + _vm->gnapWalkTo(_vm->_gnap->_pos, 0, _vm->_gnap->getSequenceId(gskIdle, 2, 8) | 0x10000, 1); _vm->_gnap->_actionStatus = kAS18OpenTopValve; } else if (_vm->_grabCursorSpriteIndex >= 0) { _vm->playGnapShowCurrItem(_vm->_hotspotsWalkPos[kHS18HydrantTopValve].x, _vm->_hotspotsWalkPos[kHS18HydrantTopValve].y, 1, 5); @@ -3612,7 +3612,7 @@ void Scene18::run() { putDownGarbageCan(0); } if (_vm->_grabCursorSpriteIndex == kItemWrench) { - _vm->gnapWalkTo(_vm->_gnap->_pos, 0, _vm->getGnapSequenceId(gskIdle, 2, 8) | 0x10000, 1); + _vm->gnapWalkTo(_vm->_gnap->_pos, 0, _vm->_gnap->getSequenceId(gskIdle, 2, 8) | 0x10000, 1); if (_vm->isFlag(kGFTruckKeysUsed)) _vm->_gnap->_actionStatus = kAS18OpenRightValveWithGarbageCan; else @@ -3792,17 +3792,17 @@ void Scene18::updateAnimations() { switch (_vm->_gnap->_actionStatus) { case kAS18GrabGarbageCanFromStreet: if (_vm->_gnap->_idleFacing != kDirUpRight && _vm->_gnap->_idleFacing != kDirBottomRight) { - gameSys.insertSequence(0x1FC, _vm->_gnapId, - makeRid(_vm->_gnapSequenceDatNum, _vm->_gnapSequenceId), _vm->_gnapId, + gameSys.insertSequence(0x1FC, _vm->_gnap->_id, + makeRid(_vm->_gnap->_sequenceDatNum, _vm->_gnap->_sequenceId), _vm->_gnap->_id, kSeqSyncWait, 0, 75 * _vm->_gnap->_pos.x - 675, 0); - _vm->_gnapSequenceDatNum = 0; - _vm->_gnapSequenceId = 0x1FC; + _vm->_gnap->_sequenceDatNum = 0; + _vm->_gnap->_sequenceId = 0x1FC; } else { - gameSys.insertSequence(0x1FD, _vm->_gnapId, - makeRid(_vm->_gnapSequenceDatNum, _vm->_gnapSequenceId), _vm->_gnapId, + gameSys.insertSequence(0x1FD, _vm->_gnap->_id, + makeRid(_vm->_gnap->_sequenceDatNum, _vm->_gnap->_sequenceId), _vm->_gnap->_id, kSeqSyncWait, 0, 75 * _vm->_gnap->_pos.x - 525, 0); - _vm->_gnapSequenceDatNum = 0; - _vm->_gnapSequenceId = 0x1FD; + _vm->_gnap->_sequenceDatNum = 0; + _vm->_gnap->_sequenceId = 0x1FD; } gameSys.removeSequence(0x1FA, 19, true); _vm->setFlag(kGFPlatypusDisguised); @@ -3810,23 +3810,23 @@ void Scene18::updateAnimations() { _vm->_gnap->_actionStatus = -1; break; case kAS18GrabGarbageCanFromHydrant: - gameSys.insertSequence(0x1FE, _vm->_gnapId, makeRid(_vm->_gnapSequenceDatNum, _vm->_gnapSequenceId), _vm->_gnapId, kSeqSyncWait, 0, 0, 0); + gameSys.insertSequence(0x1FE, _vm->_gnap->_id, makeRid(_vm->_gnap->_sequenceDatNum, _vm->_gnap->_sequenceId), _vm->_gnap->_id, kSeqSyncWait, 0, 0, 0); gameSys.removeSequence(0x1F9, 19, true); - _vm->_gnapSequenceDatNum = 0; - _vm->_gnapSequenceId = 0x1FE; + _vm->_gnap->_sequenceDatNum = 0; + _vm->_gnap->_sequenceId = 0x1FE; _vm->clearFlag(kGFTruckKeysUsed); _vm->setFlag(kGFPlatypusDisguised); updateHotspots(); _vm->_gnap->_actionStatus = -1; break; case kAS18CloseRightValveNoGarbageCan: - gameSys.insertSequence(0x205, _vm->_gnapId, makeRid(_vm->_gnapSequenceDatNum, _vm->_gnapSequenceId), _vm->_gnapId, kSeqSyncWait, 0, 0, 0); + gameSys.insertSequence(0x205, _vm->_gnap->_id, makeRid(_vm->_gnap->_sequenceDatNum, _vm->_gnap->_sequenceId), _vm->_gnap->_id, kSeqSyncWait, 0, 0, 0); gameSys.removeSequence(0x20D, 39, true); gameSys.removeSequence(0x212, 39, true); gameSys.removeSequence(0x211, 39, true); _vm->stopSound(0x22B); - _vm->_gnapSequenceDatNum = 0; - _vm->_gnapSequenceId = 0x205; + _vm->_gnap->_sequenceDatNum = 0; + _vm->_gnap->_sequenceId = 0x205; _vm->clearFlag(kGFTruckFilledWithGas); _vm->invAdd(kItemWrench); _vm->setGrabCursorSprite(kItemWrench); @@ -3846,7 +3846,7 @@ void Scene18::updateAnimations() { break; case kAS18OpenTopValveDone: _vm->setGrabCursorSprite(-1); - gameSys.insertSequence(0x208, _vm->_gnapId, makeRid(_vm->_gnapSequenceDatNum, _vm->_gnapSequenceId), _vm->_gnapId, kSeqSyncWait, 0, 0, 0); + gameSys.insertSequence(0x208, _vm->_gnap->_id, makeRid(_vm->_gnap->_sequenceDatNum, _vm->_gnap->_sequenceId), _vm->_gnap->_id, kSeqSyncWait, 0, 0, 0); gameSys.insertSequence(0x216, 39, 0, 0, kSeqNone, 21, 0, 0); gameSys.removeSequence(0x20C, 19, true); gameSys.setAnimation(0x217, 39, 5); @@ -3855,20 +3855,20 @@ void Scene18::updateAnimations() { _vm->gameUpdateTick(); _vm->playSound(0x22B, true); gameSys.insertSequence(0x20E, 39, 0, 0, kSeqNone, 0, 0, 0); - _vm->_gnapSequenceDatNum = 0; - _vm->_gnapSequenceId = 0x208; + _vm->_gnap->_sequenceDatNum = 0; + _vm->_gnap->_sequenceId = 0x208; _vm->invRemove(kItemWrench); _vm->setGrabCursorSprite(-1); _vm->_gnap->_actionStatus = -1; break; case kAS18CloseTopValve: - gameSys.insertSequence(0x206, _vm->_gnapId, makeRid(_vm->_gnapSequenceDatNum, _vm->_gnapSequenceId), _vm->_gnapId, kSeqSyncWait, 0, 0, 0); + gameSys.insertSequence(0x206, _vm->_gnap->_id, makeRid(_vm->_gnap->_sequenceDatNum, _vm->_gnap->_sequenceId), _vm->_gnap->_id, kSeqSyncWait, 0, 0, 0); gameSys.removeSequence(0x20E, 39, true); gameSys.removeSequence(0x216, 39, true); gameSys.removeSequence(0x217, 39, true); _vm->stopSound(0x22B); - _vm->_gnapSequenceDatNum = 0; - _vm->_gnapSequenceId = 0x206; + _vm->_gnap->_sequenceDatNum = 0; + _vm->_gnap->_sequenceId = 0x206; _vm->clearFlag(kGFBarnPadlockOpen); _vm->invAdd(kItemWrench); _vm->setGrabCursorSprite(kItemWrench); @@ -3876,10 +3876,10 @@ void Scene18::updateAnimations() { _vm->_gnap->_actionStatus = -1; break; case kAS18GrabCowboyHat: - gameSys.setAnimation(0x200, _vm->_gnapId, 0); - gameSys.insertSequence(0x200, _vm->_gnapId, makeRid(_vm->_gnapSequenceDatNum, _vm->_gnapSequenceId), _vm->_gnapId, kSeqSyncWait, 0, 0, 0); - _vm->_gnapSequenceDatNum = 0; - _vm->_gnapSequenceId = 0x200; + gameSys.setAnimation(0x200, _vm->_gnap->_id, 0); + gameSys.insertSequence(0x200, _vm->_gnap->_id, makeRid(_vm->_gnap->_sequenceDatNum, _vm->_gnap->_sequenceId), _vm->_gnap->_id, kSeqSyncWait, 0, 0, 0); + _vm->_gnap->_sequenceDatNum = 0; + _vm->_gnap->_sequenceId = 0x200; _vm->_gnap->_actionStatus = kAS18GrabCowboyHatDone; break; case kAS18GrabCowboyHatDone: @@ -3910,25 +3910,25 @@ void Scene18::updateAnimations() { _vm->clearFlag(kGFPlatypusDisguised); gameSys.requestRemoveSequence(0x211, 39); gameSys.requestRemoveSequence(0x212, 39); - gameSys.insertSequence(0x210, _vm->_gnapId, makeRid(_vm->_gnapSequenceDatNum, _vm->_gnapSequenceId), _vm->_gnapId, kSeqSyncWait, 0, 0, 0); + gameSys.insertSequence(0x210, _vm->_gnap->_id, makeRid(_vm->_gnap->_sequenceDatNum, _vm->_gnap->_sequenceId), _vm->_gnap->_id, kSeqSyncWait, 0, 0, 0); _vm->stopSound(0x22B); - gameSys.setAnimation(0x210, _vm->_gnapId, 0); - _vm->_gnapSequenceDatNum = 0; - _vm->_gnapSequenceId = 0x210; + gameSys.setAnimation(0x210, _vm->_gnap->_id, 0); + _vm->_gnap->_sequenceDatNum = 0; + _vm->_gnap->_sequenceId = 0x210; _vm->_gnap->_actionStatus = kAS18PutGarbageCanOnRunningHydrant2; break; case kAS18PutGarbageCanOnRunningHydrant2: _vm->playSound(0x22B, true); - gameSys.setAnimation(0x1FF, _vm->_gnapId, 0); - gameSys.insertSequence(0x1FF, _vm->_gnapId, makeRid(_vm->_gnapSequenceDatNum, _vm->_gnapSequenceId), _vm->_gnapId, kSeqSyncWait, 0, 0, 0); - _vm->_gnapSequenceDatNum = 0; - _vm->_gnapSequenceId = 0x1FF; + gameSys.setAnimation(0x1FF, _vm->_gnap->_id, 0); + gameSys.insertSequence(0x1FF, _vm->_gnap->_id, makeRid(_vm->_gnap->_sequenceDatNum, _vm->_gnap->_sequenceId), _vm->_gnap->_id, kSeqSyncWait, 0, 0, 0); + _vm->_gnap->_sequenceDatNum = 0; + _vm->_gnap->_sequenceId = 0x1FF; _vm->_sceneWaiting = true; _vm->_gnap->_actionStatus = kAS18StandingOnHydrant; break; case kAS18StandingOnHydrant: - gameSys.setAnimation(0x1FF, _vm->_gnapId, 0); - gameSys.insertSequence(0x1FF, _vm->_gnapId, makeRid(_vm->_gnapSequenceDatNum, _vm->_gnapSequenceId), _vm->_gnapId, kSeqSyncWait, 0, 0, 0); + gameSys.setAnimation(0x1FF, _vm->_gnap->_id, 0); + gameSys.insertSequence(0x1FF, _vm->_gnap->_id, makeRid(_vm->_gnap->_sequenceDatNum, _vm->_gnap->_sequenceId), _vm->_gnap->_id, kSeqSyncWait, 0, 0, 0); break; case kAS18OpenRightValveNoGarbageCan: case kAS18OpenRightValveWithGarbageCan: @@ -3947,7 +3947,7 @@ void Scene18::updateAnimations() { break; case kAS18OpenRightValveWithGarbageCanDone: _vm->setGrabCursorSprite(-1); - gameSys.insertSequence(0x207, _vm->_gnapId, makeRid(_vm->_gnapSequenceDatNum, _vm->_gnapSequenceId), _vm->_gnapId, kSeqSyncWait, 0, 0, 0); + gameSys.insertSequence(0x207, _vm->_gnap->_id, makeRid(_vm->_gnap->_sequenceDatNum, _vm->_gnap->_sequenceId), _vm->_gnap->_id, kSeqSyncWait, 0, 0, 0); gameSys.insertSequence(0x213, 39, 0, 0, kSeqNone, 21, 0, 0); gameSys.requestRemoveSequence(0x1F9, 19); gameSys.removeSequence(0x20B, 19, true); @@ -3957,14 +3957,14 @@ void Scene18::updateAnimations() { _vm->gameUpdateTick(); _vm->playSound(0x22B, true); gameSys.insertSequence(0x20D, 39, 0, 0, kSeqNone, 0, 0, 0); - _vm->_gnapSequenceDatNum = 0; - _vm->_gnapSequenceId = 0x207; + _vm->_gnap->_sequenceDatNum = 0; + _vm->_gnap->_sequenceId = 0x207; _vm->invRemove(kItemWrench); _vm->_gnap->_actionStatus = -1; break; case kAS18OpenRightValveNoGarbageCanDone: _vm->setGrabCursorSprite(-1); - gameSys.insertSequence(0x207, _vm->_gnapId, makeRid(_vm->_gnapSequenceDatNum, _vm->_gnapSequenceId), _vm->_gnapId, kSeqSyncWait, 0, 0, 0); + gameSys.insertSequence(0x207, _vm->_gnap->_id, makeRid(_vm->_gnap->_sequenceDatNum, _vm->_gnap->_sequenceId), _vm->_gnap->_id, kSeqSyncWait, 0, 0, 0); gameSys.insertSequence(0x211, 39, 0, 0, kSeqNone, 21, 0, 0); gameSys.removeSequence(0x20B, 19, true); gameSys.setAnimation(0x211, 39, 5); @@ -3973,13 +3973,13 @@ void Scene18::updateAnimations() { _vm->gameUpdateTick(); _vm->playSound(0x22B, true); gameSys.insertSequence(0x20D, 39, 0, 0, kSeqNone, 0, 0, 0); - _vm->_gnapSequenceDatNum = 0; - _vm->_gnapSequenceId = 0x207; + _vm->_gnap->_sequenceDatNum = 0; + _vm->_gnap->_sequenceId = 0x207; _vm->invRemove(kItemWrench); _vm->_gnap->_actionStatus = -1; break; case kAS18CloseRightValveWithGarbageCan: - gameSys.insertSequence(0x205, _vm->_gnapId, makeRid(_vm->_gnapSequenceDatNum, _vm->_gnapSequenceId), _vm->_gnapId, kSeqSyncWait, 0, 0, 0); + gameSys.insertSequence(0x205, _vm->_gnap->_id, makeRid(_vm->_gnap->_sequenceDatNum, _vm->_gnap->_sequenceId), _vm->_gnap->_id, kSeqSyncWait, 0, 0, 0); gameSys.removeSequence(0x20D, 39, true); gameSys.insertSequence(0x215, 39, 0x214, 39, kSeqSyncWait, 0, 0, 0); _vm->stopSound(0x22B); @@ -3988,10 +3988,10 @@ void Scene18::updateAnimations() { _vm->clearFlag(kGFTruckFilledWithGas); _vm->invAdd(kItemWrench); _vm->setGrabCursorSprite(kItemWrench); - gameSys.insertSequence(0x107B5, _vm->_gnapId, 517, _vm->_gnapId, kSeqSyncWait, 0, 75 * _vm->_gnap->_pos.x - _vm->_gnapGridX, 48 * _vm->_gnap->_pos.y - _vm->_gnapGridY); + gameSys.insertSequence(0x107B5, _vm->_gnap->_id, 517, _vm->_gnap->_id, kSeqSyncWait, 0, 75 * _vm->_gnap->_pos.x - _vm->_gnapGridX, 48 * _vm->_gnap->_pos.y - _vm->_gnapGridY); updateHotspots(); - _vm->_gnapSequenceDatNum = 1; - _vm->_gnapSequenceId = 0x7B5; + _vm->_gnap->_sequenceDatNum = 1; + _vm->_gnap->_sequenceId = 0x7B5; _vm->_gnap->_actionStatus = kAS18CloseRightValveWithGarbageCanDone; break; case kAS18CloseRightValveWithGarbageCanDone: @@ -4000,14 +4000,14 @@ void Scene18::updateAnimations() { case kAS18PutGarbageCanOnHydrant: _vm->setFlag(kGFTruckKeysUsed); _vm->clearFlag(kGFPlatypusDisguised); - gameSys.insertSequence(0x20F, _vm->_gnapId, makeRid(_vm->_gnapSequenceDatNum, _vm->_gnapSequenceId), _vm->_gnapId, kSeqSyncWait, 0, 0, 0); - gameSys.setAnimation(0x20F, _vm->_gnapId, 0); - _vm->_gnapSequenceDatNum = 0; - _vm->_gnapSequenceId = 0x20F; + gameSys.insertSequence(0x20F, _vm->_gnap->_id, makeRid(_vm->_gnap->_sequenceDatNum, _vm->_gnap->_sequenceId), _vm->_gnap->_id, kSeqSyncWait, 0, 0, 0); + gameSys.setAnimation(0x20F, _vm->_gnap->_id, 0); + _vm->_gnap->_sequenceDatNum = 0; + _vm->_gnap->_sequenceId = 0x20F; _vm->_gnap->_actionStatus = kAS18PutGarbageCanOnHydrantDone; break; case kAS18PutGarbageCanOnHydrantDone: - gameSys.insertSequence(0x1F9, 19, 0x20F, _vm->_gnapId, kSeqNone, 0, 0, 0); + gameSys.insertSequence(0x1F9, 19, 0x20F, _vm->_gnap->_id, kSeqNone, 0, 0, 0); updateHotspots(); _vm->_gnap->_actionStatus = -1; break; @@ -4142,7 +4142,7 @@ void Scene19::run() { case kHS19Platypus: if (_vm->_gnap->_actionStatus < 0) { if (_vm->_grabCursorSpriteIndex == kItemJoint) { - _vm->gnapUseJointOnPlatypus(); + _vm->_gnap->useJointOnPlatypus(); } else if (_vm->_grabCursorSpriteIndex >= 0) { _vm->playGnapImpossible(_vm->_plat->_pos.x, _vm->_plat->_pos.y); } else { @@ -4151,11 +4151,11 @@ void Scene19::run() { _vm->playGnapMoan1(_vm->_plat->_pos.x, _vm->_plat->_pos.y); break; case GRAB_CURSOR: - _vm->gnapKissPlatypus(0); + _vm->_gnap->kissPlatypus(0); break; case TALK_CURSOR: _vm->playGnapBrainPulsating(_vm->_plat->_pos.x, _vm->_plat->_pos.y); - _vm->playPlatypusSequence(_vm->getPlatypusSequenceId()); + _vm->playPlatypusSequence(_vm->_plat->getSequenceId()); break; case PLAT_CURSOR: _vm->playGnapImpossible(0, 0); @@ -4191,7 +4191,7 @@ void Scene19::run() { break; case GRAB_CURSOR: if (!_vm->isFlag(kGFPictureTaken)) { - _vm->gnapWalkTo(_vm->_gnap->_pos, 0, _vm->getGnapSequenceId(gskIdle, _vm->_hotspotsWalkPos[_vm->_sceneClickedHotspot].x, _vm->_hotspotsWalkPos[_vm->_sceneClickedHotspot].y) | 0x10000, 1); + _vm->gnapWalkTo(_vm->_gnap->_pos, 0, _vm->_gnap->getSequenceId(gskIdle, _vm->_hotspotsWalkPos[_vm->_sceneClickedHotspot].x, _vm->_hotspotsWalkPos[_vm->_sceneClickedHotspot].y) | 0x10000, 1); _vm->_gnap->_actionStatus = kAS19GrabPicture; } break; @@ -4215,7 +4215,7 @@ void Scene19::run() { break; case TALK_CURSOR: _vm->_gnap->_idleFacing = kDirUpRight; - _vm->gnapWalkTo(_vm->_hotspotsWalkPos[_vm->_sceneClickedHotspot].x, _vm->_hotspotsWalkPos[_vm->_sceneClickedHotspot].y, 0, _vm->getGnapSequenceId(gskBrainPulsating, 0, 0) | 0x10000, 1); + _vm->gnapWalkTo(_vm->_hotspotsWalkPos[_vm->_sceneClickedHotspot].x, _vm->_hotspotsWalkPos[_vm->_sceneClickedHotspot].y, 0, _vm->_gnap->getSequenceId(gskBrainPulsating, 0, 0) | 0x10000, 1); _vm->_gnap->_actionStatus = kAS19TalkShopAssistant; break; case GRAB_CURSOR: diff --git a/engines/gnap/scenes/group2.cpp b/engines/gnap/scenes/group2.cpp index 229aad4eb6..0a8d6041b6 100644 --- a/engines/gnap/scenes/group2.cpp +++ b/engines/gnap/scenes/group2.cpp @@ -273,7 +273,7 @@ void Scene20::run() { case kHS20Platypus: if (_vm->_gnap->_actionStatus < 0) { if (_vm->_grabCursorSpriteIndex == kItemJoint) { - _vm->gnapUseJointOnPlatypus(); + _vm->_gnap->useJointOnPlatypus(); } else if (_vm->_grabCursorSpriteIndex >= 0) { _vm->playGnapImpossible(0, 0); } else { @@ -282,11 +282,11 @@ void Scene20::run() { _vm->playGnapScratchingHead(_vm->_plat->_pos.x, _vm->_plat->_pos.y); break; case GRAB_CURSOR: - _vm->gnapKissPlatypus(20); + _vm->_gnap->kissPlatypus(20); break; case TALK_CURSOR: _vm->playGnapBrainPulsating(_vm->_plat->_pos.x, _vm->_plat->_pos.y); - _vm->playPlatypusSequence(_vm->getPlatypusSequenceId()); + _vm->playPlatypusSequence(_vm->_plat->getSequenceId()); break; case PLAT_CURSOR: _vm->playGnapImpossible(0, 0); @@ -371,7 +371,7 @@ void Scene20::run() { break; case GRAB_CURSOR: _vm->_gnap->_idleFacing = kDirUpRight; - _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS20StonerGuy].x, _vm->_hotspotsWalkPos[kHS20StonerGuy].y, 0, _vm->getGnapSequenceId(gskIdle, 0, 0) | 0x10000, 1); + _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS20StonerGuy].x, _vm->_hotspotsWalkPos[kHS20StonerGuy].y, 0, _vm->_gnap->getSequenceId(gskIdle, 0, 0) | 0x10000, 1); if (_stonerGuyShowingJoint) _vm->_gnap->_actionStatus = kAS20GrabJoint; else @@ -379,7 +379,7 @@ void Scene20::run() { break; case TALK_CURSOR: _vm->_gnap->_idleFacing = kDirUpRight; - _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS20StonerGuy].x, _vm->_hotspotsWalkPos[kHS20StonerGuy].y, 0, _vm->getGnapSequenceId(gskBrainPulsating, 0, 0) | 0x10000, 1); + _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS20StonerGuy].x, _vm->_hotspotsWalkPos[kHS20StonerGuy].y, 0, _vm->_gnap->getSequenceId(gskBrainPulsating, 0, 0) | 0x10000, 1); if (_vm->isFlag(kGFJointTaken)) _vm->_gnap->_actionStatus = kAS20TalkStonerGuyNoJoint; else @@ -405,12 +405,12 @@ void Scene20::run() { case GRAB_CURSOR: _stonerGuyShowingJoint = false; _vm->_gnap->_idleFacing = kDirUpLeft; - _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS20GroceryStoreGuy].x, _vm->_hotspotsWalkPos[kHS20GroceryStoreGuy].y, 0, _vm->getGnapSequenceId(gskIdle, 0, 0) | 0x10000, 1); + _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS20GroceryStoreGuy].x, _vm->_hotspotsWalkPos[kHS20GroceryStoreGuy].y, 0, _vm->_gnap->getSequenceId(gskIdle, 0, 0) | 0x10000, 1); _vm->_gnap->_actionStatus = kAS20GrabGroceryStoreGuy; break; case TALK_CURSOR: _vm->_gnap->_idleFacing = kDirUpLeft; - _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS20GroceryStoreGuy].x, _vm->_hotspotsWalkPos[kHS20GroceryStoreGuy].y, 0, _vm->getGnapSequenceId(gskBrainPulsating, 0, 0) | 0x10000, 1); + _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS20GroceryStoreGuy].x, _vm->_hotspotsWalkPos[kHS20GroceryStoreGuy].y, 0, _vm->_gnap->getSequenceId(gskBrainPulsating, 0, 0) | 0x10000, 1); _vm->_gnap->_actionStatus = kAS20TalkGroceryStoreGuy; break; case PLAT_CURSOR: @@ -425,7 +425,7 @@ void Scene20::run() { if (_vm->_gnap->_actionStatus < 0) { if (_vm->_grabCursorSpriteIndex == kItemCowboyHat) { _vm->_gnap->_idleFacing = kDirUpRight; - _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS20GroceryStoreHat].x, _vm->_hotspotsWalkPos[kHS20GroceryStoreHat].y, 0, _vm->getGnapSequenceId(gskIdle, 0, 0) | 0x10000, 1); + _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS20GroceryStoreHat].x, _vm->_hotspotsWalkPos[kHS20GroceryStoreHat].y, 0, _vm->_gnap->getSequenceId(gskIdle, 0, 0) | 0x10000, 1); _vm->_gnap->_actionStatus = kAS20SwitchGroceryStoreHat; } else if (_vm->_grabCursorSpriteIndex >= 0) { _vm->playGnapShowCurrItem(_vm->_hotspotsWalkPos[kHS20GroceryStoreHat].x, _vm->_hotspotsWalkPos[kHS20GroceryStoreHat].y, 1, 6); @@ -437,7 +437,7 @@ void Scene20::run() { case GRAB_CURSOR: _stonerGuyShowingJoint = false; _vm->_gnap->_idleFacing = kDirUpLeft; - _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS20GroceryStoreGuy].x, _vm->_hotspotsWalkPos[kHS20GroceryStoreGuy].y, 0, _vm->getGnapSequenceId(gskIdle, 0, 0) | 0x10000, 1); + _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS20GroceryStoreGuy].x, _vm->_hotspotsWalkPos[kHS20GroceryStoreGuy].y, 0, _vm->_gnap->getSequenceId(gskIdle, 0, 0) | 0x10000, 1); _vm->_gnap->_actionStatus = kAS20GrabGroceryStoreHat; break; case TALK_CURSOR: @@ -603,10 +603,10 @@ void Scene20::updateAnimations() { break; case kAS20SwitchGroceryStoreHat: _vm->setGrabCursorSprite(-1); - gameSys.setAnimation(0x180, _vm->_gnapId, 0); - gameSys.insertSequence(0x180, _vm->_gnapId, makeRid(_vm->_gnapSequenceDatNum, _vm->_gnapSequenceId), _vm->_gnapId, kSeqSyncWait, 0, 0, 0); - _vm->_gnapSequenceId = 0x180; - _vm->_gnapSequenceDatNum = 0; + gameSys.setAnimation(0x180, _vm->_gnap->_id, 0); + gameSys.insertSequence(0x180, _vm->_gnap->_id, makeRid(_vm->_gnap->_sequenceDatNum, _vm->_gnap->_sequenceId), _vm->_gnap->_id, kSeqSyncWait, 0, 0, 0); + _vm->_gnap->_sequenceId = 0x180; + _vm->_gnap->_sequenceDatNum = 0; _vm->invRemove(kItemCowboyHat); _vm->invAdd(kItemGroceryStoreHat); _vm->_gnap->_actionStatus = kAS20SwitchGroceryStoreHatDone; @@ -625,7 +625,7 @@ void Scene20::updateAnimations() { _vm->showCursor(); _vm->setGrabCursorSprite(kItemGroceryStoreHat); _vm->_gnap->_idleFacing = kDirBottomRight; - _vm->gnapWalkTo(3, 8, -1, _vm->getGnapSequenceId(gskIdle, 0, 0) | 0x10000, 1); + _vm->gnapWalkTo(3, 8, -1, _vm->_gnap->getSequenceId(gskIdle, 0, 0) | 0x10000, 1); _vm->_gnap->_actionStatus = -1; break; case kAS20GrabJointDone: @@ -647,11 +647,11 @@ void Scene20::updateAnimations() { break; case 0x178: gameSys.setAnimation(_nextGroceryStoreGuySequenceId, 20, 3); - gameSys.setAnimation(0x17D, _vm->_gnapId, 0); + gameSys.setAnimation(0x17D, _vm->_gnap->_id, 0); gameSys.insertSequence(_nextGroceryStoreGuySequenceId, 20, _currGroceryStoreGuySequenceId, 20, kSeqSyncWait, 0, 0, 0); - gameSys.insertSequence(0x17D, _vm->_gnapId, makeRid(_vm->_gnapSequenceDatNum, _vm->_gnapSequenceId), _vm->_gnapId, kSeqSyncWait, 0, 0, 0); - _vm->_gnapSequenceId = 0x17D; - _vm->_gnapSequenceDatNum = 0; + gameSys.insertSequence(0x17D, _vm->_gnap->_id, makeRid(_vm->_gnap->_sequenceDatNum, _vm->_gnap->_sequenceId), _vm->_gnap->_id, kSeqSyncWait, 0, 0, 0); + _vm->_gnap->_sequenceId = 0x17D; + _vm->_gnap->_sequenceDatNum = 0; _vm->_gnap->_actionStatus = kAS20ActionDone; gameSys.setAnimation(0x16D, 21, 2); gameSys.insertSequence(0x16D, 21, _currStonerGuySequenceId, 21, kSeqSyncWait, 0, 0, 0); @@ -664,9 +664,9 @@ void Scene20::updateAnimations() { gameSys.setAnimation(_nextGroceryStoreGuySequenceId, 20, 3); gameSys.setAnimation(0x16D, 21, 0); gameSys.insertSequence(_nextGroceryStoreGuySequenceId, 20, _currGroceryStoreGuySequenceId, 20, kSeqSyncWait, 0, 0, 0); - gameSys.insertSequence(0x17E, _vm->_gnapId, makeRid(_vm->_gnapSequenceDatNum, _vm->_gnapSequenceId), _vm->_gnapId, kSeqSyncWait, 0, 0, 0); - _vm->_gnapSequenceId = 0x17E; - _vm->_gnapSequenceDatNum = 0; + gameSys.insertSequence(0x17E, _vm->_gnap->_id, makeRid(_vm->_gnap->_sequenceDatNum, _vm->_gnap->_sequenceId), _vm->_gnap->_id, kSeqSyncWait, 0, 0, 0); + _vm->_gnap->_sequenceId = 0x17E; + _vm->_gnap->_sequenceDatNum = 0; _vm->_gnap->_actionStatus = kAS20ActionDone; gameSys.setAnimation(0x16D, 21, 2); gameSys.insertSequence(0x16D, 21, _currStonerGuySequenceId, 21, kSeqSyncWait, 0, 0, 0); @@ -791,7 +791,7 @@ void Scene21::run() { case kHS21Platypus: if (_vm->_gnap->_actionStatus < 0) { if (_vm->_grabCursorSpriteIndex == kItemJoint) { - _vm->gnapUseJointOnPlatypus(); + _vm->_gnap->useJointOnPlatypus(); } else if (_vm->_grabCursorSpriteIndex >= 0) { _vm->playGnapImpossible(0, 0); } else { @@ -800,11 +800,11 @@ void Scene21::run() { _vm->playGnapScratchingHead(_vm->_plat->_pos.x, _vm->_plat->_pos.y); break; case GRAB_CURSOR: - _vm->gnapKissPlatypus(0); + _vm->_gnap->kissPlatypus(0); break; case TALK_CURSOR: _vm->playGnapBrainPulsating(_vm->_plat->_pos.x, _vm->_plat->_pos.y); - _vm->playPlatypusSequence(_vm->getPlatypusSequenceId()); + _vm->playPlatypusSequence(_vm->_plat->getSequenceId()); break; case PLAT_CURSOR: _vm->playGnapImpossible(0, 0); @@ -824,7 +824,7 @@ void Scene21::run() { _vm->playGnapScratchingHead(2, 5); break; case GRAB_CURSOR: - _vm->gnapWalkTo(_vm->_gnap->_pos, 0, _vm->getGnapSequenceId(gskIdle, _vm->_hotspotsWalkPos[kHS21Banana].x, _vm->_hotspotsWalkPos[kHS21Banana].y) | 0x10000, 1); + _vm->gnapWalkTo(_vm->_gnap->_pos, 0, _vm->_gnap->getSequenceId(gskIdle, _vm->_hotspotsWalkPos[kHS21Banana].x, _vm->_hotspotsWalkPos[kHS21Banana].y) | 0x10000, 1); _vm->playGnapPullOutDevice(2, 5); _vm->playGnapUseDevice(0, 0); _vm->_gnap->_actionStatus = kAS21GrabBanana; @@ -841,7 +841,7 @@ void Scene21::run() { if (_vm->_gnap->_actionStatus < 0) { if (_vm->_grabCursorSpriteIndex == kItemGroceryStoreHat) { _vm->_newSceneNum = 47; - _vm->gnapWalkTo(4, 6, 0, _vm->getGnapSequenceId(gskIdle, 0, 0) | 0x10000, 1); + _vm->gnapWalkTo(4, 6, 0, _vm->_gnap->getSequenceId(gskIdle, 0, 0) | 0x10000, 1); _vm->_gnap->_actionStatus = kAS21UseHatWithOldLady; } else if (_vm->_grabCursorSpriteIndex >= 0) { _vm->playGnapShowCurrItem(4, 6, 7, 4); @@ -853,13 +853,13 @@ void Scene21::run() { case GRAB_CURSOR: _vm->_gnap->_idleFacing = kDirUpLeft; _vm->_hotspots[kHS21WalkArea1]._flags |= SF_WALKABLE; - _vm->gnapWalkTo(7, 6, 0, _vm->getGnapSequenceId(gskIdle, 0, 0) | 0x10000, 1); + _vm->gnapWalkTo(7, 6, 0, _vm->_gnap->getSequenceId(gskIdle, 0, 0) | 0x10000, 1); _vm->_gnap->_actionStatus = kAS21GrabOldLady; _vm->_hotspots[kHS21WalkArea1]._flags &= ~SF_WALKABLE; break; case TALK_CURSOR: _vm->_gnap->_idleFacing = kDirUpRight; - _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS21OldLady].x, _vm->_hotspotsWalkPos[kHS21OldLady].y, 0, _vm->getGnapSequenceId(gskBrainPulsating, 0, 0) | 0x10000, 1); + _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS21OldLady].x, _vm->_hotspotsWalkPos[kHS21OldLady].y, 0, _vm->_gnap->getSequenceId(gskBrainPulsating, 0, 0) | 0x10000, 1); _vm->_gnap->_actionStatus = kAS21TalkOldLady; break; case PLAT_CURSOR: @@ -962,10 +962,10 @@ void Scene21::updateAnimations() { _nextOldLadySequenceId = 0x87; break; case kAS21UseHatWithOldLady: - gameSys.setAnimation(0x8F, _vm->_gnapId, 0); - gameSys.insertSequence(0x8F, _vm->_gnapId, makeRid(_vm->_gnapSequenceDatNum, _vm->_gnapSequenceId), _vm->_gnapId, kSeqSyncWait, 0, 0, 0); - _vm->_gnapSequenceDatNum = 0; - _vm->_gnapSequenceId = 0x8F; + gameSys.setAnimation(0x8F, _vm->_gnap->_id, 0); + gameSys.insertSequence(0x8F, _vm->_gnap->_id, makeRid(_vm->_gnap->_sequenceDatNum, _vm->_gnap->_sequenceId), _vm->_gnap->_id, kSeqSyncWait, 0, 0, 0); + _vm->_gnap->_sequenceDatNum = 0; + _vm->_gnap->_sequenceId = 0x8F; _vm->_gnap->_actionStatus = kAS21UseHatWithOldLadyDone; _vm->invAdd(kItemTickets); _vm->invRemove(kItemGroceryStoreHat); @@ -984,9 +984,9 @@ void Scene21::updateAnimations() { if (_nextOldLadySequenceId == 0x87) { gameSys.setAnimation(_nextOldLadySequenceId, 79, 3); gameSys.insertSequence(_nextOldLadySequenceId, 79, _currOldLadySequenceId, 79, kSeqSyncWait, 0, 0, 0); - gameSys.insertSequence(0x86, _vm->_gnapId, makeRid(_vm->_gnapSequenceDatNum, _vm->_gnapSequenceId), _vm->_gnapId, kSeqSyncWait, 0, 0, 0); - _vm->_gnapSequenceId = 0x86; - _vm->_gnapSequenceDatNum = 0; + gameSys.insertSequence(0x86, _vm->_gnap->_id, makeRid(_vm->_gnap->_sequenceDatNum, _vm->_gnap->_sequenceId), _vm->_gnap->_id, kSeqSyncWait, 0, 0, 0); + _vm->_gnap->_sequenceId = 0x86; + _vm->_gnap->_sequenceDatNum = 0; _vm->_gnap->_actionStatus = -1; _currOldLadySequenceId = _nextOldLadySequenceId; _nextOldLadySequenceId = -1; @@ -1107,7 +1107,7 @@ void Scene22::run() { case kHS22Platypus: if (_vm->_gnap->_actionStatus < 0) { if (_vm->_grabCursorSpriteIndex == kItemJoint) { - _vm->gnapUseJointOnPlatypus(); + _vm->_gnap->useJointOnPlatypus(); } else if (_vm->_grabCursorSpriteIndex >= 0) { _vm->playGnapImpossible(0, 0); } else { @@ -1116,11 +1116,11 @@ void Scene22::run() { _vm->playGnapScratchingHead(_vm->_plat->_pos.x, _vm->_plat->_pos.y); break; case GRAB_CURSOR: - _vm->gnapKissPlatypus(0); + _vm->_gnap->kissPlatypus(0); break; case TALK_CURSOR: _vm->playGnapBrainPulsating(_vm->_plat->_pos.x, _vm->_plat->_pos.y); - _vm->playPlatypusSequence(_vm->getPlatypusSequenceId()); + _vm->playPlatypusSequence(_vm->_plat->getSequenceId()); break; case PLAT_CURSOR: _vm->playGnapImpossible(0, 0); @@ -1165,11 +1165,11 @@ void Scene22::run() { case TALK_CURSOR: _vm->_gnap->_idleFacing = kDirUpRight; _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS22Cashier].x, _vm->_hotspotsWalkPos[kHS22Cashier].y, - 0, _vm->getGnapSequenceId(gskBrainPulsating, 0, 0) | 0x10000, 1); + 0, _vm->_gnap->getSequenceId(gskBrainPulsating, 0, 0) | 0x10000, 1); _vm->_gnap->_actionStatus = kAS22TalkCashier; break; case PLAT_CURSOR: - _vm->gnapUseDeviceOnPlatypus(); + _vm->_gnap->useDeviceOnPlatypus(); break; } } @@ -1331,7 +1331,7 @@ void Scene23::run() { case kHS23Platypus: if (_vm->_gnap->_actionStatus < 0) { if (_vm->_grabCursorSpriteIndex == kItemJoint) { - _vm->gnapUseJointOnPlatypus(); + _vm->_gnap->useJointOnPlatypus(); } else if (_vm->_grabCursorSpriteIndex >= 0) { _vm->playGnapImpossible(0, 0); } else { @@ -1340,11 +1340,11 @@ void Scene23::run() { _vm->playGnapScratchingHead(_vm->_plat->_pos.x, _vm->_plat->_pos.y); break; case GRAB_CURSOR: - _vm->gnapKissPlatypus(0); + _vm->_gnap->kissPlatypus(0); break; case TALK_CURSOR: _vm->playGnapBrainPulsating(_vm->_plat->_pos.x, _vm->_plat->_pos.y); - _vm->playPlatypusSequence(_vm->getPlatypusSequenceId()); + _vm->playPlatypusSequence(_vm->_plat->getSequenceId()); break; case PLAT_CURSOR: _vm->playGnapImpossible(0, 0); @@ -1365,7 +1365,7 @@ void Scene23::run() { _vm->playGnapMoan2(0, 0); else { _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS23Cereals].x, _vm->_hotspotsWalkPos[kHS23Cereals].y, - 0, _vm->getGnapSequenceId(gskIdle, 0, 0) | 0x10000, 1); + 0, _vm->_gnap->getSequenceId(gskIdle, 0, 0) | 0x10000, 1); _vm->_gnap->_actionStatus = kAS23LookCereals; } break; @@ -1375,7 +1375,7 @@ void Scene23::run() { else { _vm->_gnap->_idleFacing = kDirBottomRight; _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS23Cereals].x, _vm->_hotspotsWalkPos[kHS23Cereals].y, - 0, _vm->getGnapSequenceId(gskIdle, 0, 0) | 0x10000, 1); + 0, _vm->_gnap->getSequenceId(gskIdle, 0, 0) | 0x10000, 1); _vm->setFlag(kGFSceneFlag1); _vm->_gnap->_actionStatus = kAS23GrabCereals; _vm->invAdd(kItemCereals); @@ -1473,11 +1473,11 @@ void Scene23::updateAnimations() { _vm->_gnap->_actionStatus = -1; break; case kAS23GrabCereals: - gameSys.setAnimation(0xBE, _vm->_gnapId, 0); - gameSys.insertSequence(0xBE, _vm->_gnapId, makeRid(_vm->_gnapSequenceDatNum, _vm->_gnapSequenceId), _vm->_gnapId, kSeqSyncWait, 0, 0, 0); + gameSys.setAnimation(0xBE, _vm->_gnap->_id, 0); + gameSys.insertSequence(0xBE, _vm->_gnap->_id, makeRid(_vm->_gnap->_sequenceDatNum, _vm->_gnap->_sequenceId), _vm->_gnap->_id, kSeqSyncWait, 0, 0, 0); gameSys.requestRemoveSequence(0xBF, 2); - _vm->_gnapSequenceDatNum = 0; - _vm->_gnapSequenceId = 0xBE; + _vm->_gnap->_sequenceDatNum = 0; + _vm->_gnap->_sequenceId = 0xBE; _vm->_gnap->_actionStatus = kAS23GrabCerealsDone; break; case kAS23GrabCerealsDone: @@ -1600,7 +1600,7 @@ void Scene24::run() { case kHS24Platypus: if (_vm->_gnap->_actionStatus < 0) { if (_vm->_grabCursorSpriteIndex == kItemJoint) { - _vm->gnapUseJointOnPlatypus(); + _vm->_gnap->useJointOnPlatypus(); } else if (_vm->_grabCursorSpriteIndex >= 0) { _vm->playGnapImpossible(0, 0); } else { @@ -1609,11 +1609,11 @@ void Scene24::run() { _vm->playGnapScratchingHead(_vm->_plat->_pos.x, _vm->_plat->_pos.y); break; case GRAB_CURSOR: - _vm->gnapKissPlatypus(0); + _vm->_gnap->kissPlatypus(0); break; case TALK_CURSOR: _vm->playGnapBrainPulsating(_vm->_plat->_pos.x, _vm->_plat->_pos.y); - _vm->playPlatypusSequence(_vm->getPlatypusSequenceId()); + _vm->playPlatypusSequence(_vm->_plat->getSequenceId()); break; case PLAT_CURSOR: _vm->playGnapImpossible(0, 0); @@ -1638,7 +1638,7 @@ void Scene24::run() { _vm->_isLeavingScene = true; _vm->_newSceneNum = 20; _vm->_gnap->_idleFacing = kDirUpRight; - _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS24ExitOutsideGrubCity].x, _vm->_hotspotsWalkPos[kHS24ExitOutsideGrubCity].y, 0, _vm->getGnapSequenceId(gskIdle, 0, 0) | 0x10000, 1); + _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS24ExitOutsideGrubCity].x, _vm->_hotspotsWalkPos[kHS24ExitOutsideGrubCity].y, 0, _vm->_gnap->getSequenceId(gskIdle, 0, 0) | 0x10000, 1); _vm->_gnap->_actionStatus = kAS24LeaveScene; _vm->platypusWalkTo(_vm->_hotspotsWalkPos[kHS24ExitOutsideGrubCity].x + 1, _vm->_hotspotsWalkPos[kHS24ExitOutsideGrubCity].y, -1, 0x107C2, 1); } @@ -1846,7 +1846,7 @@ void Scene25::run() { case kHS25Platypus: if (_vm->_gnap->_actionStatus < 0) { if (_vm->_grabCursorSpriteIndex == kItemJoint) { - _vm->gnapUseJointOnPlatypus(); + _vm->_gnap->useJointOnPlatypus(); } else if (_vm->_grabCursorSpriteIndex >= 0) { _vm->playGnapImpossible(0, 0); } else { @@ -1855,11 +1855,11 @@ void Scene25::run() { _vm->playGnapScratchingHead(_vm->_plat->_pos.x, _vm->_plat->_pos.y); break; case GRAB_CURSOR: - _vm->gnapKissPlatypus(0); + _vm->_gnap->kissPlatypus(0); break; case TALK_CURSOR: _vm->playGnapBrainPulsating(_vm->_plat->_pos.x, _vm->_plat->_pos.y); - _vm->playPlatypusSequence(_vm->getPlatypusSequenceId()); + _vm->playPlatypusSequence(_vm->_plat->getSequenceId()); break; case PLAT_CURSOR: _vm->playGnapImpossible(0, 0); @@ -1874,7 +1874,7 @@ void Scene25::run() { if (_vm->_grabCursorSpriteIndex == kItemTickets) { _vm->_gnap->_actionStatus = kAS25ShowTicketToVendor; _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS25TicketVendor].x, _vm->_hotspotsWalkPos[kHS25TicketVendor].y, - 0, _vm->getGnapSequenceId(gskIdle, 9, 4) | 0x10000, 1); + 0, _vm->_gnap->getSequenceId(gskIdle, 9, 4) | 0x10000, 1); _vm->playGnapPullOutDevice(0, 0); _vm->playGnapUseDevice(0, 0); } else if (_vm->_grabCursorSpriteIndex >= 0) { @@ -1888,7 +1888,7 @@ void Scene25::run() { break; case TALK_CURSOR: _vm->_gnap->_idleFacing = kDirUpRight; - _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS25TicketVendor].x, _vm->_hotspotsWalkPos[kHS25TicketVendor].y, 0, _vm->getGnapSequenceId(gskBrainPulsating, 0, 0) | 0x10000, 1); + _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS25TicketVendor].x, _vm->_hotspotsWalkPos[kHS25TicketVendor].y, 0, _vm->_gnap->getSequenceId(gskBrainPulsating, 0, 0) | 0x10000, 1); _vm->_gnap->_actionStatus = kAS25TalkTicketVendor; break; case GRAB_CURSOR: @@ -2163,7 +2163,7 @@ void Scene26::run() { case kHS26Platypus: if (_vm->_gnap->_actionStatus < 0) { if (_vm->_grabCursorSpriteIndex == kItemJoint) { - _vm->gnapUseJointOnPlatypus(); + _vm->_gnap->useJointOnPlatypus(); } else if (_vm->_grabCursorSpriteIndex >= 0) { _vm->playGnapImpossible(0, 0); } else { @@ -2172,11 +2172,11 @@ void Scene26::run() { _vm->playGnapMoan1(_vm->_plat->_pos.x, _vm->_plat->_pos.y); break; case GRAB_CURSOR: - _vm->gnapKissPlatypus(0); + _vm->_gnap->kissPlatypus(0); break; case TALK_CURSOR: _vm->playGnapBrainPulsating(_vm->_plat->_pos.x, _vm->_plat->_pos.y); - _vm->playPlatypusSequence(_vm->getPlatypusSequenceId()); + _vm->playPlatypusSequence(_vm->_plat->getSequenceId()); break; case PLAT_CURSOR: _vm->playGnapImpossible(0, 0); @@ -2397,7 +2397,7 @@ void Scene27::run() { case kHS27Platypus: if (_vm->_gnap->_actionStatus < 0) { if (_vm->_grabCursorSpriteIndex == kItemJoint) { - _vm->gnapUseJointOnPlatypus(); + _vm->_gnap->useJointOnPlatypus(); } else if (_vm->_grabCursorSpriteIndex >= 0) { _vm->playGnapImpossible(0, 0); } else { @@ -2406,11 +2406,11 @@ void Scene27::run() { _vm->playGnapMoan1(_vm->_plat->_pos.x, _vm->_plat->_pos.y); break; case GRAB_CURSOR: - _vm->gnapKissPlatypus(0); + _vm->_gnap->kissPlatypus(0); break; case TALK_CURSOR: _vm->playGnapBrainPulsating(_vm->_plat->_pos.x, _vm->_plat->_pos.y); - _vm->playPlatypusSequence(_vm->getPlatypusSequenceId()); + _vm->playPlatypusSequence(_vm->_plat->getSequenceId()); break; case PLAT_CURSOR: _vm->playGnapImpossible(0, 0); @@ -2435,7 +2435,7 @@ void Scene27::run() { break; case TALK_CURSOR: _vm->_gnap->_idleFacing = kDirUpLeft; - _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS27Janitor].x, _vm->_hotspotsWalkPos[kHS27Janitor].y, 0, _vm->getGnapSequenceId(gskBrainPulsating, 0, 0) | 0x10000, 1); + _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS27Janitor].x, _vm->_hotspotsWalkPos[kHS27Janitor].y, 0, _vm->_gnap->getSequenceId(gskBrainPulsating, 0, 0) | 0x10000, 1); _vm->_gnap->_actionStatus = kAS27TalkJanitor; break; case GRAB_CURSOR: @@ -2458,7 +2458,7 @@ void Scene27::run() { break; case GRAB_CURSOR: _vm->_gnap->_idleFacing = kDirUpLeft; - _vm->gnapWalkTo(_vm->_gnap->_pos, 0, _vm->getGnapSequenceId(gskIdle, _vm->_hotspotsWalkPos[kHS27Bucket].x, _vm->_hotspotsWalkPos[kHS27Bucket].y) | 0x10000, 1); + _vm->gnapWalkTo(_vm->_gnap->_pos, 0, _vm->_gnap->getSequenceId(gskIdle, _vm->_hotspotsWalkPos[kHS27Bucket].x, _vm->_hotspotsWalkPos[kHS27Bucket].y) | 0x10000, 1); _vm->_gnap->_actionStatus = kAS27GrabBucket; break; case TALK_CURSOR: @@ -2768,7 +2768,7 @@ void Scene28::run() { case kHS28Platypus: if (_vm->_gnap->_actionStatus < 0) { if (_vm->_grabCursorSpriteIndex == kItemJoint) { - _vm->gnapUseJointOnPlatypus(); + _vm->_gnap->useJointOnPlatypus(); } else if (_vm->_grabCursorSpriteIndex >= 0) { _vm->playGnapImpossible(0, 0); } else { @@ -2777,11 +2777,11 @@ void Scene28::run() { _vm->playGnapMoan1(_vm->_plat->_pos.x, _vm->_plat->_pos.y); break; case GRAB_CURSOR: - _vm->gnapKissPlatypus(0); + _vm->_gnap->kissPlatypus(0); break; case TALK_CURSOR: _vm->playGnapBrainPulsating(_vm->_plat->_pos.x, _vm->_plat->_pos.y); - _vm->playPlatypusSequence(_vm->getPlatypusSequenceId()); + _vm->playPlatypusSequence(_vm->_plat->getSequenceId()); break; case PLAT_CURSOR: _vm->playGnapImpossible(0, 0); @@ -2803,7 +2803,7 @@ void Scene28::run() { case GRAB_CURSOR: if (_vm->isFlag(kGFUnk21)) { if (!_vm->invHas(kItemHorn)) { - _vm->gnapWalkTo(_vm->_gnap->_pos, 0, _vm->getGnapSequenceId(gskIdle, _vm->_hotspotsWalkPos[kHS28Horn].x, _vm->_hotspotsWalkPos[kHS28Horn].y) | 0x10000, 1); + _vm->gnapWalkTo(_vm->_gnap->_pos, 0, _vm->_gnap->getSequenceId(gskIdle, _vm->_hotspotsWalkPos[kHS28Horn].x, _vm->_hotspotsWalkPos[kHS28Horn].y) | 0x10000, 1); _vm->_gnap->_actionStatus = kAS28GrabHornSuccess; } } else { @@ -2852,7 +2852,7 @@ void Scene28::run() { break; case TALK_CURSOR: _vm->_gnap->_idleFacing = kDirUpLeft; - _vm->gnapWalkTo(5, 8, 0, _vm->getGnapSequenceId(gskBrainPulsating, 0, 0) | 0x10000, 1); + _vm->gnapWalkTo(5, 8, 0, _vm->_gnap->getSequenceId(gskBrainPulsating, 0, 0) | 0x10000, 1); _vm->_gnap->_actionStatus = kAS28TalkClown; break; case GRAB_CURSOR: @@ -2888,7 +2888,7 @@ void Scene28::run() { _vm->playGnapScratchingHead(8, 6); break; case GRAB_CURSOR: - _vm->gnapWalkTo(_vm->_gnap->_pos, 0, _vm->getGnapSequenceId(gskIdle, _vm->_hotspotsWalkPos[kHS28EmptyBucket].x, _vm->_hotspotsWalkPos[kHS28EmptyBucket].y) | 0x10000, 1); + _vm->gnapWalkTo(_vm->_gnap->_pos, 0, _vm->_gnap->getSequenceId(gskIdle, _vm->_hotspotsWalkPos[kHS28EmptyBucket].x, _vm->_hotspotsWalkPos[kHS28EmptyBucket].y) | 0x10000, 1); _vm->_gnap->_actionStatus = kAS28GrabEmptyBucket; break; case TALK_CURSOR: @@ -3000,9 +3000,9 @@ void Scene28::updateAnimations() { _vm->_gnap->_actionStatus = -1; break; case kAS28GrabHornFailsDone: - gameSys.insertSequence(0x107B5, _vm->_gnapId, 281, 39, kSeqSyncWait, 0, 75 * _vm->_gnap->_pos.x - _vm->_gnapGridX, 48 * _vm->_gnap->_pos.y - _vm->_gnapGridY); - _vm->_gnapSequenceId = 0x7B5; - _vm->_gnapSequenceDatNum = 1; + gameSys.insertSequence(0x107B5, _vm->_gnap->_id, 281, 39, kSeqSyncWait, 0, 75 * _vm->_gnap->_pos.x - _vm->_gnapGridX, 48 * _vm->_gnap->_pos.y - _vm->_gnapGridY); + _vm->_gnap->_sequenceId = 0x7B5; + _vm->_gnap->_sequenceDatNum = 1; gameSys.insertSequence(0x11B, 39, 0, 0, kSeqNone, 0, 0, 0); _currClownSequenceId = 0x11B; _nextClownSequenceId = -1; @@ -3056,12 +3056,12 @@ void Scene28::updateAnimations() { _vm->_gnap->_actionStatus = -1; break; case 0x119: - gameSys.insertSequence(_nextClownSequenceId, 39, makeRid(_vm->_gnapSequenceDatNum, _vm->_gnapSequenceId), _vm->_gnapId, kSeqSyncWait, 0, 0, 0); + gameSys.insertSequence(_nextClownSequenceId, 39, makeRid(_vm->_gnap->_sequenceDatNum, _vm->_gnap->_sequenceId), _vm->_gnap->_id, kSeqSyncWait, 0, 0, 0); gameSys.setAnimation(_nextClownSequenceId, 39, 0); gameSys.removeSequence(_currClownSequenceId, 39, true); _vm->_gnap->_actionStatus = kAS28GrabHornFailsDone; - _vm->_gnapSequenceId = _nextClownSequenceId; - _vm->_gnapSequenceDatNum = 0; + _vm->_gnap->_sequenceId = _nextClownSequenceId; + _vm->_gnap->_sequenceDatNum = 0; _nextClownSequenceId = -1; break; } @@ -3159,7 +3159,7 @@ void Scene29::run() { case kHS29Platypus: if (_vm->_gnap->_actionStatus < 0) { if (_vm->_grabCursorSpriteIndex == kItemJoint) { - _vm->gnapUseJointOnPlatypus(); + _vm->_gnap->useJointOnPlatypus(); } else if (_vm->_grabCursorSpriteIndex >= 0) { _vm->playGnapImpossible(0, 0); } else { @@ -3168,11 +3168,11 @@ void Scene29::run() { _vm->playGnapMoan1(_vm->_plat->_pos.x, _vm->_plat->_pos.y); break; case GRAB_CURSOR: - _vm->gnapKissPlatypus(0); + _vm->_gnap->kissPlatypus(0); break; case TALK_CURSOR: _vm->playGnapBrainPulsating(_vm->_plat->_pos.x, _vm->_plat->_pos.y); - _vm->playPlatypusSequence(_vm->getPlatypusSequenceId()); + _vm->playPlatypusSequence(_vm->_plat->getSequenceId()); break; case PLAT_CURSOR: _vm->playGnapImpossible(0, 0); @@ -3186,7 +3186,7 @@ void Scene29::run() { if (_vm->_gnap->_actionStatus < 0) { if (_vm->_grabCursorSpriteIndex == kItemBanana) { _vm->_gnap->_idleFacing = kDirBottomRight; - _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS29Monkey].x, _vm->_hotspotsWalkPos[kHS29Monkey].y, 0, _vm->getGnapSequenceId(gskIdle, 0, 0) | 0x10000, 1); + _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS29Monkey].x, _vm->_hotspotsWalkPos[kHS29Monkey].y, 0, _vm->_gnap->getSequenceId(gskIdle, 0, 0) | 0x10000, 1); _vm->_gnap->_actionStatus = kAS29UseBananaWithMonkey; _vm->_newSceneNum = 51; _vm->_isLeavingScene = true; @@ -3342,9 +3342,9 @@ void Scene29::updateAnimations() { if (gameSys.getAnimationStatus(4) == 2) { if (_nextMonkeySequenceId == 0xE5) { - gameSys.insertSequence(0xF2, _vm->_gnapId, makeRid(_vm->_gnapSequenceDatNum, _vm->_gnapSequenceId), _vm->_gnapId, kSeqSyncWait, 0, 0, 0); - _vm->_gnapSequenceDatNum = 0; - _vm->_gnapSequenceId = 0xF2; + gameSys.insertSequence(0xF2, _vm->_gnap->_id, makeRid(_vm->_gnap->_sequenceDatNum, _vm->_gnap->_sequenceId), _vm->_gnap->_id, kSeqSyncWait, 0, 0, 0); + _vm->_gnap->_sequenceDatNum = 0; + _vm->_gnap->_sequenceId = 0xF2; gameSys.setAnimation(0xE6, 159, 0); gameSys.setAnimation(0, 159, 4); gameSys.insertSequence(_nextMonkeySequenceId, 159, _currMonkeySequenceId, 159, kSeqSyncWait, 0, 0, 0); diff --git a/engines/gnap/scenes/group3.cpp b/engines/gnap/scenes/group3.cpp index 0698abb060..1a22a331f3 100644 --- a/engines/gnap/scenes/group3.cpp +++ b/engines/gnap/scenes/group3.cpp @@ -88,7 +88,7 @@ void Scene30::run() { case kHS30Platypus: if (_vm->_gnap->_actionStatus < 0) { if (_vm->_grabCursorSpriteIndex == kItemJoint) { - _vm->gnapUseJointOnPlatypus(); + _vm->_gnap->useJointOnPlatypus(); } else if (_vm->_grabCursorSpriteIndex >= 0) { _vm->playGnapImpossible(0, 0); } else { @@ -97,11 +97,11 @@ void Scene30::run() { _vm->playGnapMoan1(_vm->_plat->_pos.x, _vm->_plat->_pos.y); break; case GRAB_CURSOR: - _vm->gnapKissPlatypus(0); + _vm->_gnap->kissPlatypus(0); break; case TALK_CURSOR: _vm->playGnapBrainPulsating(_vm->_plat->_pos.x, _vm->_plat->_pos.y); - _vm->playPlatypusSequence(_vm->getPlatypusSequenceId()); + _vm->playPlatypusSequence(_vm->_plat->getSequenceId()); break; case PLAT_CURSOR: _vm->playGnapImpossible(0, 0); @@ -221,23 +221,23 @@ void Scene30::updateAnimations() { break; case kAS30UsePillMachine: _vm->setGrabCursorSprite(-1); - gameSys.setAnimation(0x105, _vm->_gnapId, 0); - gameSys.insertSequence(0x105, _vm->_gnapId, makeRid(_vm->_gnapSequenceDatNum, _vm->_gnapSequenceId), _vm->_gnapId, kSeqSyncWait, 0, 0, 0); - _vm->_gnapSequenceId = 0x105; - _vm->_gnapSequenceDatNum = 0; + gameSys.setAnimation(0x105, _vm->_gnap->_id, 0); + gameSys.insertSequence(0x105, _vm->_gnap->_id, makeRid(_vm->_gnap->_sequenceDatNum, _vm->_gnap->_sequenceId), _vm->_gnap->_id, kSeqSyncWait, 0, 0, 0); + _vm->_gnap->_sequenceId = 0x105; + _vm->_gnap->_sequenceDatNum = 0; _vm->_gnap->_actionStatus = kAS30UsePillMachine2; break; case kAS30UsePillMachine2: _vm->hideCursor(); _vm->setGrabCursorSprite(-1); _vm->addFullScreenSprite(0x3F, 255); - gameSys.removeSequence(0x105, _vm->_gnapId, true); + gameSys.removeSequence(0x105, _vm->_gnap->_id, true); gameSys.setAnimation(0x102, 256, 0); gameSys.insertSequence(0x102, 256, 0, 0, kSeqNone, 0, 0, 0); while (gameSys.getAnimationStatus(0) != 2) _vm->gameUpdateTick(); - gameSys.setAnimation(0x103, _vm->_gnapId, 0); - gameSys.insertSequence(0x103, _vm->_gnapId, 0, 0, kSeqNone, 0, 0, 0); + gameSys.setAnimation(0x103, _vm->_gnap->_id, 0); + gameSys.insertSequence(0x103, _vm->_gnap->_id, 0, 0, kSeqNone, 0, 0, 0); _vm->removeFullScreenSprite(); _vm->showCursor(); _vm->_gnap->_actionStatus = kAS30UsePillMachine3; @@ -245,10 +245,10 @@ void Scene30::updateAnimations() { _vm->setFlag(kGFUnk23); break; case kAS30UsePillMachine3: - gameSys.setAnimation(0x104, _vm->_gnapId, 0); - gameSys.insertSequence(0x104, _vm->_gnapId, makeRid(_vm->_gnapSequenceDatNum, 0x103), _vm->_gnapId, kSeqSyncWait, 0, 0, 0); - _vm->_gnapSequenceId = 0x104; - _vm->_gnapSequenceDatNum = 0; + gameSys.setAnimation(0x104, _vm->_gnap->_id, 0); + gameSys.insertSequence(0x104, _vm->_gnap->_id, makeRid(_vm->_gnap->_sequenceDatNum, 0x103), _vm->_gnap->_id, kSeqSyncWait, 0, 0, 0); + _vm->_gnap->_sequenceId = 0x104; + _vm->_gnap->_sequenceDatNum = 0; _vm->_gnap->_actionStatus = kAS30UsePillMachine4; _vm->setGrabCursorSprite(kItemDiceQuarterHole); break; @@ -343,7 +343,7 @@ void Scene31::run() { case kHS31Platypus: if (_vm->_gnap->_actionStatus < 0) { if (_vm->_grabCursorSpriteIndex == kItemJoint) { - _vm->gnapUseJointOnPlatypus(); + _vm->_gnap->useJointOnPlatypus(); } else if (_vm->_grabCursorSpriteIndex >= 0) { _vm->playGnapImpossible(0, 0); } else { @@ -352,11 +352,11 @@ void Scene31::run() { _vm->playGnapMoan1(_vm->_plat->_pos.x, _vm->_plat->_pos.y); break; case GRAB_CURSOR: - _vm->gnapKissPlatypus(0); + _vm->_gnap->kissPlatypus(0); break; case TALK_CURSOR: _vm->playGnapBrainPulsating(_vm->_plat->_pos.x, _vm->_plat->_pos.y); - _vm->playPlatypusSequence(_vm->getPlatypusSequenceId()); + _vm->playPlatypusSequence(_vm->_plat->getSequenceId()); break; case PLAT_CURSOR: _vm->playGnapImpossible(0, 0); @@ -393,7 +393,7 @@ void Scene31::run() { break; case PLAT_CURSOR: if (!_vm->invHas(kItemBucketWithBeer)) { - _vm->gnapUseDeviceOnPlatypus(); + _vm->_gnap->useDeviceOnPlatypus(); _vm->platypusWalkTo(_vm->_hotspotsWalkPos[kHS31MeasuringClown].x, _vm->_hotspotsWalkPos[kHS31MeasuringClown].y + 1, 1, 0x107C2, 1); _vm->_hotspots[kHS31WalkArea1]._flags |= SF_WALKABLE; _vm->platypusWalkTo(_vm->_hotspotsWalkPos[kHS31MeasuringClown].x, _vm->_hotspotsWalkPos[kHS31MeasuringClown].y, 1, 0x107C2, 1); @@ -413,7 +413,7 @@ void Scene31::run() { if (_vm->_gnap->_actionStatus < 0 || _vm->_gnap->_actionStatus == kAS31PlatMeasuringClown) { if (_vm->_grabCursorSpriteIndex == kItemEmptyBucket && _beerGuyDistracted) { _vm->setGrabCursorSprite(-1); - _vm->gnapWalkTo(_vm->_gnap->_pos, -1, _vm->getGnapSequenceId(gskIdle, _vm->_hotspotsWalkPos[kHS31BeerBarrel].x, _vm->_hotspotsWalkPos[kHS31BeerBarrel].y) | 0x10000, 1); + _vm->gnapWalkTo(_vm->_gnap->_pos, -1, _vm->_gnap->getSequenceId(gskIdle, _vm->_hotspotsWalkPos[kHS31BeerBarrel].x, _vm->_hotspotsWalkPos[kHS31BeerBarrel].y) | 0x10000, 1); _clerkMeasureMaxCtr += 5; gameSys.insertSequence(0xF8, 59, 0, 0, kSeqNone, 0, 0, 0); _vm->playGnapPullOutDevice(6, 8); @@ -543,11 +543,11 @@ void Scene31::updateAnimations() { break; case kAS31FillEmptyBucketWithBeer: gameSys.setAnimation(0x102, 59, 0); - gameSys.insertSequence(0x102, 59, makeRid(_vm->_gnapSequenceDatNum, _vm->_gnapSequenceId), _vm->_gnapId, kSeqSyncWait, 0, 0, 0); + gameSys.insertSequence(0x102, 59, makeRid(_vm->_gnap->_sequenceDatNum, _vm->_gnap->_sequenceId), _vm->_gnap->_id, kSeqSyncWait, 0, 0, 0); _vm->_gnap->_pos = Common::Point(5, 7); - _vm->_gnapSequenceDatNum = 0; - _vm->_gnapSequenceId = 0x102; - _vm->_gnapId = 59; + _vm->_gnap->_sequenceDatNum = 0; + _vm->_gnap->_sequenceId = 0x102; + _vm->_gnap->_id = 59; _vm->_gnap->_actionStatus = kAS31FillEmptyBucketWithBeerDone; break; case kAS31FillEmptyBucketWithBeerDone: @@ -701,11 +701,11 @@ void Scene32::run() { _vm->playGnapMoan1(_vm->_plat->_pos.x, _vm->_plat->_pos.y); break; case GRAB_CURSOR: - _vm->gnapKissPlatypus(0); + _vm->_gnap->kissPlatypus(0); break; case TALK_CURSOR: _vm->playGnapBrainPulsating(_vm->_plat->_pos.x, _vm->_plat->_pos.y); - _vm->playPlatypusSequence(_vm->getPlatypusSequenceId()); + _vm->playPlatypusSequence(_vm->_plat->getSequenceId()); break; case PLAT_CURSOR: _vm->playGnapImpossible(_vm->_plat->_pos.x, _vm->_plat->_pos.y); @@ -877,11 +877,11 @@ void Scene33::run() { _vm->playGnapMoan1(_vm->_plat->_pos.x, _vm->_plat->_pos.y); break; case GRAB_CURSOR: - _vm->gnapKissPlatypus(0); + _vm->_gnap->kissPlatypus(0); break; case TALK_CURSOR: _vm->playGnapBrainPulsating(_vm->_plat->_pos.x, _vm->_plat->_pos.y); - _vm->playPlatypusSequence(_vm->getPlatypusSequenceId()); + _vm->playPlatypusSequence(_vm->_plat->getSequenceId()); break; case PLAT_CURSOR: _vm->playGnapImpossible(_vm->_plat->_pos.x, _vm->_plat->_pos.y); @@ -899,14 +899,14 @@ void Scene33::run() { switch (_vm->_verbCursor) { case GRAB_CURSOR: _vm->_gnap->_idleFacing = kDirBottomRight; - if (_vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS33Chicken].x, _vm->_hotspotsWalkPos[kHS33Chicken].y, 0, _vm->getGnapSequenceId(gskIdle, 0, 0) | 0x10000, 1)) + if (_vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS33Chicken].x, _vm->_hotspotsWalkPos[kHS33Chicken].y, 0, _vm->_gnap->getSequenceId(gskIdle, 0, 0) | 0x10000, 1)) _vm->_gnap->_actionStatus = kAS33UseChicken; else _vm->_gnap->_actionStatus = -1; break; case TALK_CURSOR: _vm->_gnap->_idleFacing = kDirBottomRight; - _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS33Chicken].x, _vm->_hotspotsWalkPos[kHS33Chicken].y, 0, _vm->getGnapSequenceId(gskBrainPulsating, 0, 0) | 0x10000, 1); + _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS33Chicken].x, _vm->_hotspotsWalkPos[kHS33Chicken].y, 0, _vm->_gnap->getSequenceId(gskBrainPulsating, 0, 0) | 0x10000, 1); _vm->_gnap->_actionStatus = kAS33TalkChicken; break; case LOOK_CURSOR: @@ -1032,9 +1032,9 @@ void Scene33::updateAnimations() { _vm->_timers[2] = 100; break; case kAS33UseChickenDone: - gameSys.insertSequence(0x107B5, _vm->_gnapId, 0x81, 179, kSeqSyncWait, 0, 75 * _vm->_gnap->_pos.x - _vm->_gnapGridX, 48 * _vm->_gnap->_pos.y - _vm->_gnapGridY); - _vm->_gnapSequenceId = 0x7B5; - _vm->_gnapSequenceDatNum = 1; + gameSys.insertSequence(0x107B5, _vm->_gnap->_id, 0x81, 179, kSeqSyncWait, 0, 75 * _vm->_gnap->_pos.x - _vm->_gnapGridX, 48 * _vm->_gnap->_pos.y - _vm->_gnapGridY); + _vm->_gnap->_sequenceId = 0x7B5; + _vm->_gnap->_sequenceDatNum = 1; _currChickenSequenceId = 0x7E; gameSys.setAnimation(0x7E, 179, 2); gameSys.insertSequence(_currChickenSequenceId, 179, 0, 0, kSeqNone, 0, 0, 0); @@ -1050,7 +1050,7 @@ void Scene33::updateAnimations() { if (gameSys.getAnimationStatus(2) == 2) { if (_nextChickenSequenceId == 0x81) { gameSys.setAnimation(_nextChickenSequenceId, 179, 0); - gameSys.insertSequence(_nextChickenSequenceId, 179, makeRid(_vm->_gnapSequenceDatNum, _vm->_gnapSequenceId), _vm->_gnapId, kSeqSyncWait, 0, 0, 0); + gameSys.insertSequence(_nextChickenSequenceId, 179, makeRid(_vm->_gnap->_sequenceDatNum, _vm->_gnap->_sequenceId), _vm->_gnap->_id, kSeqSyncWait, 0, 0, 0); gameSys.removeSequence(_currChickenSequenceId, 179, true); _nextChickenSequenceId = -1; _currChickenSequenceId = -1; @@ -1154,11 +1154,11 @@ void Scene38::run() { _vm->playGnapMoan1(_vm->_plat->_pos.x, _vm->_plat->_pos.y); break; case GRAB_CURSOR: - _vm->gnapKissPlatypus(0); + _vm->_gnap->kissPlatypus(0); break; case TALK_CURSOR: _vm->playGnapBrainPulsating(_vm->_plat->_pos.x, _vm->_plat->_pos.y); - _vm->playPlatypusSequence(_vm->getPlatypusSequenceId()); + _vm->playPlatypusSequence(_vm->_plat->getSequenceId()); break; case PLAT_CURSOR: _vm->playGnapImpossible(_vm->_plat->_pos.x, _vm->_plat->_pos.y); @@ -1286,43 +1286,43 @@ void Scene38::updateAnimations() { _vm->_sceneDone = true; break; case kAS38ExitCave: - gameSys.removeSequence(_vm->_platypusSequenceId | (_vm->_platypusSequenceDatNum << 16), _vm->_platypusId, true); - gameSys.insertSequence(0xA3, _vm->_gnapId, makeRid(_vm->_gnapSequenceDatNum, _vm->_gnapSequenceId), _vm->_gnapId, kSeqSyncWait, 0, 0, 0); - _vm->_gnapSequenceId = 0xA3; - _vm->_gnapSequenceDatNum = 0; - gameSys.setAnimation(0xA3, _vm->_gnapId, 0); + gameSys.removeSequence(_vm->_plat->_sequenceId | (_vm->_plat->_sequenceDatNum << 16), _vm->_plat->_id, true); + gameSys.insertSequence(0xA3, _vm->_gnap->_id, makeRid(_vm->_gnap->_sequenceDatNum, _vm->_gnap->_sequenceId), _vm->_gnap->_id, kSeqSyncWait, 0, 0, 0); + _vm->_gnap->_sequenceId = 0xA3; + _vm->_gnap->_sequenceDatNum = 0; + gameSys.setAnimation(0xA3, _vm->_gnap->_id, 0); _vm->_gnap->_actionStatus = kAS38LeaveScene; break; case kAS38UseHuntingTrophy: gameSys.removeSequence(0x9B, 0, true); - gameSys.insertSequence(0x9C, _vm->_gnapId, makeRid(_vm->_gnapSequenceDatNum, _vm->_gnapSequenceId), _vm->_gnapId, kSeqSyncWait, 0, 0, 0); - _vm->_gnapSequenceId = 0x9C; - _vm->_gnapSequenceDatNum = 0; - gameSys.setAnimation(0x9C, _vm->_gnapId, 0); + gameSys.insertSequence(0x9C, _vm->_gnap->_id, makeRid(_vm->_gnap->_sequenceDatNum, _vm->_gnap->_sequenceId), _vm->_gnap->_id, kSeqSyncWait, 0, 0, 0); + _vm->_gnap->_sequenceId = 0x9C; + _vm->_gnap->_sequenceDatNum = 0; + gameSys.setAnimation(0x9C, _vm->_gnap->_id, 0); _vm->_gnap->_actionStatus = kAS38HoldingHuntingTrophy; updateHotspots(); break; case kAS38HoldingHuntingTrophy: if (_vm->_plat->_actionStatus != kAS38PlatypusHoldingTrapDoor) _vm->_sceneWaiting = true; - if (_vm->_gnapSequenceId == 0xA4) { - gameSys.insertSequence(0x9D, _vm->_gnapId, makeRid(_vm->_gnapSequenceDatNum, _vm->_gnapSequenceId), _vm->_gnapId, kSeqSyncWait, 0, 0, 0); - _vm->_gnapSequenceId = 0x9D; + if (_vm->_gnap->_sequenceId == 0xA4) { + gameSys.insertSequence(0x9D, _vm->_gnap->_id, makeRid(_vm->_gnap->_sequenceDatNum, _vm->_gnap->_sequenceId), _vm->_gnap->_id, kSeqSyncWait, 0, 0, 0); + _vm->_gnap->_sequenceId = 0x9D; } else { - gameSys.insertSequence(0xA4, _vm->_gnapId, makeRid(_vm->_gnapSequenceDatNum, _vm->_gnapSequenceId), _vm->_gnapId, kSeqSyncWait, 0, 0, 0); - _vm->_gnapSequenceId = 0xA4; + gameSys.insertSequence(0xA4, _vm->_gnap->_id, makeRid(_vm->_gnap->_sequenceDatNum, _vm->_gnap->_sequenceId), _vm->_gnap->_id, kSeqSyncWait, 0, 0, 0); + _vm->_gnap->_sequenceId = 0xA4; } - _vm->_gnapSequenceDatNum = 0; - gameSys.setAnimation(_vm->_gnapSequenceId, _vm->_gnapId, 0); + _vm->_gnap->_sequenceDatNum = 0; + gameSys.setAnimation(_vm->_gnap->_sequenceId, _vm->_gnap->_id, 0); break; case kAS38ReleaseHuntingTrophy: - if (_vm->_gnapSequenceId == 0x9E) { + if (_vm->_gnap->_sequenceId == 0x9E) { gameSys.insertSequence(0x9B, 0, 0, 0, kSeqNone, 0, 0, 0); _vm->_gnap->_actionStatus = -1; } else if (_vm->_plat->_actionStatus == kAS38PlatypusHoldingTrapDoor) { - gameSys.insertSequence(0xA0, _vm->_gnapId, makeRid(_vm->_gnapSequenceDatNum, _vm->_gnapSequenceId), _vm->_gnapId, kSeqSyncWait, 0, 0, 0); - _vm->_gnapSequenceId = 0xA0; - _vm->_gnapSequenceDatNum = 0; + gameSys.insertSequence(0xA0, _vm->_gnap->_id, makeRid(_vm->_gnap->_sequenceDatNum, _vm->_gnap->_sequenceId), _vm->_gnap->_id, kSeqSyncWait, 0, 0, 0); + _vm->_gnap->_sequenceId = 0xA0; + _vm->_gnap->_sequenceDatNum = 0; _vm->_gnap->_pos = Common::Point(3, 6); _vm->_gnap->_idleFacing = kDirBottomRight; if (_vm->_isLeavingScene) { @@ -1334,33 +1334,33 @@ void Scene38::updateAnimations() { _vm->_gnap->_actionStatus = -1; } } else { - gameSys.insertSequence(0x9E, _vm->_gnapId, makeRid(_vm->_gnapSequenceDatNum, _vm->_gnapSequenceId), _vm->_gnapId, kSeqSyncWait, 0, 0, 0); - _vm->_gnapSequenceId = 0x9E; - _vm->_gnapSequenceDatNum = 0; + gameSys.insertSequence(0x9E, _vm->_gnap->_id, makeRid(_vm->_gnap->_sequenceDatNum, _vm->_gnap->_sequenceId), _vm->_gnap->_id, kSeqSyncWait, 0, 0, 0); + _vm->_gnap->_sequenceId = 0x9E; + _vm->_gnap->_sequenceDatNum = 0; _vm->_gnap->_pos = Common::Point(3, 6); _vm->_gnap->_idleFacing = kDirBottomRight; - gameSys.setAnimation(0x9E, _vm->_gnapId, 0); + gameSys.setAnimation(0x9E, _vm->_gnap->_id, 0); _vm->_sceneWaiting = false; updateHotspots(); } break; case kAS38UsePlatypusWithTrapDoor: _vm->_sceneWaiting = false; - gameSys.insertSequence(0x9F, _vm->_gnapId, makeRid(_vm->_gnapSequenceDatNum, _vm->_gnapSequenceId), _vm->_gnapId, kSeqSyncWait, 0, 0, 0); - _vm->_gnapSequenceId = 0x9F; - _vm->_gnapSequenceDatNum = 0; - gameSys.setAnimation(0x9F, _vm->_gnapId, 0); + gameSys.insertSequence(0x9F, _vm->_gnap->_id, makeRid(_vm->_gnap->_sequenceDatNum, _vm->_gnap->_sequenceId), _vm->_gnap->_id, kSeqSyncWait, 0, 0, 0); + _vm->_gnap->_sequenceId = 0x9F; + _vm->_gnap->_sequenceDatNum = 0; + gameSys.setAnimation(0x9F, _vm->_gnap->_id, 0); _vm->_gnap->_actionStatus = kAS38HoldingHuntingTrophy; if (_vm->_plat->_idleFacing != kDirNone) _vm->playPlatypusSequence(0x107D5); else _vm->playPlatypusSequence(0x107D4); _vm->platypusWalkTo(8, 7, -1, 0x107D2, 1); - gameSys.insertSequence(0xA1, _vm->_gnapId + 1, _vm->_platypusSequenceId | (_vm->_platypusSequenceDatNum << 16), _vm->_platypusId, kSeqSyncWait, 0, 0, 0); - _vm->_platypusSequenceId = 0xA1; - _vm->_platypusSequenceDatNum = 0; - _vm->_platypusId = _vm->_gnapId + 1; - gameSys.setAnimation(0xA1, _vm->_gnapId + 1, 1); + gameSys.insertSequence(0xA1, _vm->_gnap->_id + 1, _vm->_plat->_sequenceId | (_vm->_plat->_sequenceDatNum << 16), _vm->_plat->_id, kSeqSyncWait, 0, 0, 0); + _vm->_plat->_sequenceId = 0xA1; + _vm->_plat->_sequenceDatNum = 0; + _vm->_plat->_id = _vm->_gnap->_id + 1; + gameSys.setAnimation(0xA1, _vm->_gnap->_id + 1, 1); _vm->_plat->_actionStatus = kAS38PlatypusHoldingTrapDoor; updateHotspots(); break; @@ -1370,9 +1370,9 @@ void Scene38::updateAnimations() { if (gameSys.getAnimationStatus(1) == 2) { gameSys.setAnimation(0, 0, 1); if (_vm->_plat->_actionStatus == kAS38PlatypusHoldingTrapDoor) { - gameSys.insertSequence(0xA2, _vm->_platypusId, _vm->_platypusSequenceId | (_vm->_platypusSequenceDatNum << 16), _vm->_platypusId, kSeqSyncWait, 0, 0, 0); - _vm->_platypusSequenceId = 0xA2; - _vm->_platypusSequenceDatNum = 0; + gameSys.insertSequence(0xA2, _vm->_plat->_id, _vm->_plat->_sequenceId | (_vm->_plat->_sequenceDatNum << 16), _vm->_plat->_id, kSeqSyncWait, 0, 0, 0); + _vm->_plat->_sequenceId = 0xA2; + _vm->_plat->_sequenceDatNum = 0; updateHotspots(); _vm->_sceneWaiting = true; } @@ -1460,11 +1460,11 @@ void Scene39::run() { _vm->playGnapMoan1(_vm->_plat->_pos.x, _vm->_plat->_pos.y); break; case GRAB_CURSOR: - _vm->gnapKissPlatypus(0); + _vm->_gnap->kissPlatypus(0); break; case TALK_CURSOR: _vm->playGnapBrainPulsating(_vm->_plat->_pos.x, _vm->_plat->_pos.y); - _vm->playPlatypusSequence(_vm->getPlatypusSequenceId()); + _vm->playPlatypusSequence(_vm->_plat->getSequenceId()); break; case PLAT_CURSOR: _vm->playGnapImpossible(_vm->_plat->_pos.x, _vm->_plat->_pos.y); diff --git a/engines/gnap/scenes/group4.cpp b/engines/gnap/scenes/group4.cpp index 7ecaf23dd2..e4e29d92f6 100644 --- a/engines/gnap/scenes/group4.cpp +++ b/engines/gnap/scenes/group4.cpp @@ -83,11 +83,11 @@ void Scene40::run() { _vm->playGnapMoan1(_vm->_plat->_pos.x, _vm->_plat->_pos.y); break; case GRAB_CURSOR: - _vm->gnapKissPlatypus(0); + _vm->_gnap->kissPlatypus(0); break; case TALK_CURSOR: _vm->playGnapBrainPulsating(_vm->_plat->_pos.x, _vm->_plat->_pos.y); - _vm->playPlatypusSequence(_vm->getPlatypusSequenceId()); + _vm->playPlatypusSequence(_vm->_plat->getSequenceId()); break; case PLAT_CURSOR: _vm->playGnapImpossible(_vm->_plat->_pos.x, _vm->_plat->_pos.y); @@ -263,13 +263,13 @@ void Scene41::run() { gameSys.insertSequence(0x127, 2, 0, 0, kSeqNone, 0, 0, 0); if (_vm->isFlag(kGFGnapControlsToyUFO)) { - _vm->_gnapSequenceId = 0x120; - _vm->_gnapSequenceDatNum = 0; + _vm->_gnap->_sequenceId = 0x120; + _vm->_gnap->_sequenceDatNum = 0; _vm->_gnap->_idleFacing = kDirUpRight; _vm->_gnap->_pos = Common::Point(7, 7); - _vm->_gnapId = 140; + _vm->_gnap->_id = 140; gameSys.insertSequence(0x120, 140, 0, 0, kSeqNone, 0, 0, 0); - gameSys.setAnimation(makeRid(_vm->_gnapSequenceDatNum, _vm->_gnapSequenceId), _vm->_gnapId, 0); + gameSys.setAnimation(makeRid(_vm->_gnap->_sequenceDatNum, _vm->_gnap->_sequenceId), _vm->_gnap->_id, 0); _vm->initPlatypusPos(8, 10, kDirBottomLeft); _vm->endSceneInit(); } else if (_vm->_prevSceneNum == 45) { @@ -358,11 +358,11 @@ void Scene41::run() { _vm->playGnapMoan1(_vm->_plat->_pos.x, _vm->_plat->_pos.y); break; case GRAB_CURSOR: - _vm->gnapKissPlatypus(0); + _vm->_gnap->kissPlatypus(0); break; case TALK_CURSOR: _vm->playGnapBrainPulsating(_vm->_plat->_pos.x, _vm->_plat->_pos.y); - _vm->playPlatypusSequence(_vm->getPlatypusSequenceId()); + _vm->playPlatypusSequence(_vm->_plat->getSequenceId()); break; case PLAT_CURSOR: _vm->playGnapImpossible(_vm->_plat->_pos.x, _vm->_plat->_pos.y); @@ -412,7 +412,7 @@ void Scene41::run() { break; case TALK_CURSOR: _vm->_gnap->_idleFacing = kDirUpRight; - _vm->gnapWalkTo(4, 7, 0, _vm->getGnapSequenceId(gskBrainPulsating, 0, 0) | 0x10000, 1); + _vm->gnapWalkTo(4, 7, 0, _vm->_gnap->getSequenceId(gskBrainPulsating, 0, 0) | 0x10000, 1); _vm->_gnap->_actionStatus = kAS41TalkToyVendor; break; case PLAT_CURSOR: @@ -441,7 +441,7 @@ void Scene41::run() { break; case TALK_CURSOR: _vm->_gnap->_idleFacing = kDirUpRight; - _vm->gnapWalkTo(7, 7, 0, _vm->getGnapSequenceId(gskBrainPulsating, 0, 0) | 0x10000, 1); + _vm->gnapWalkTo(7, 7, 0, _vm->_gnap->getSequenceId(gskBrainPulsating, 0, 0) | 0x10000, 1); break; case PLAT_CURSOR: _vm->playGnapImpossible(0, 0); @@ -453,7 +453,7 @@ void Scene41::run() { case kHS41ToyUfo: if (_vm->_grabCursorSpriteIndex == kItemGum) { _vm->playGnapPullOutDevice(9, 0); - gameSys.setAnimation(makeRid(_vm->_gnapSequenceDatNum, _vm->_gnapSequenceId), _vm->_gnapId, 0); + gameSys.setAnimation(makeRid(_vm->_gnap->_sequenceDatNum, _vm->_gnap->_sequenceId), _vm->_gnap->_id, 0); _vm->_gnap->_actionStatus = kAS41UseGumWithToyUfo; } break; @@ -468,11 +468,11 @@ void Scene41::run() { if (_vm->isFlag(kGFGnapControlsToyUFO)) { if (!_vm->_timers[9] && _vm->_gnap->_actionStatus < 0) { _vm->_gnap->_actionStatus = kAS41GiveBackToyUfo; - if (_vm->_gnapSequenceId == 0x121 || _vm->_gnapSequenceId == 0x122) { - gameSys.insertSequence(0x123, _vm->_gnapId, makeRid(_vm->_gnapSequenceDatNum, _vm->_gnapSequenceId), _vm->_gnapId, kSeqSyncWait, 0, 0, 0); - _vm->_gnapSequenceId = 0x123; - _vm->_gnapSequenceDatNum = 0; - gameSys.setAnimation(0x123, _vm->_gnapId, 0); + if (_vm->_gnap->_sequenceId == 0x121 || _vm->_gnap->_sequenceId == 0x122) { + gameSys.insertSequence(0x123, _vm->_gnap->_id, makeRid(_vm->_gnap->_sequenceDatNum, _vm->_gnap->_sequenceId), _vm->_gnap->_id, kSeqSyncWait, 0, 0, 0); + _vm->_gnap->_sequenceId = 0x123; + _vm->_gnap->_sequenceDatNum = 0; + gameSys.setAnimation(0x123, _vm->_gnap->_id, 0); } } } @@ -482,24 +482,24 @@ void Scene41::run() { if (_vm->isFlag(kGFGnapControlsToyUFO)) { int sequenceId; if (_vm->_leftClickMouseX >= 400) { - if (_vm->_gnapSequenceId == 0x11F || _vm->_gnapSequenceId == 0x120 || _vm->_gnapSequenceId == 0x123 || _vm->_gnapSequenceId == 0x126) + if (_vm->_gnap->_sequenceId == 0x11F || _vm->_gnap->_sequenceId == 0x120 || _vm->_gnap->_sequenceId == 0x123 || _vm->_gnap->_sequenceId == 0x126) sequenceId = 0x120; else if (_vm->_leftClickMouseX - _vm->_toyUfoX >= 400) sequenceId = 0x126; else sequenceId = 0x123; } else { - if (_vm->_gnapSequenceId == 0x121 || _vm->_gnapSequenceId == 0x125 || _vm->_gnapSequenceId == 0x122) + if (_vm->_gnap->_sequenceId == 0x121 || _vm->_gnap->_sequenceId == 0x125 || _vm->_gnap->_sequenceId == 0x122) sequenceId = 0x122; else if (_vm->_toyUfoX - _vm->_leftClickMouseX >= 400) sequenceId = 0x125; else sequenceId = 0x121; } - gameSys.insertSequence(sequenceId, _vm->_gnapId, makeRid(_vm->_gnapSequenceDatNum, _vm->_gnapSequenceId), _vm->_gnapId, kSeqSyncWait, 0, 0, 0); - _vm->_gnapSequenceId = sequenceId; - _vm->_gnapSequenceDatNum = 0; - gameSys.setAnimation(sequenceId, _vm->_gnapId, 0); + gameSys.insertSequence(sequenceId, _vm->_gnap->_id, makeRid(_vm->_gnap->_sequenceDatNum, _vm->_gnap->_sequenceId), _vm->_gnap->_id, kSeqSyncWait, 0, 0, 0); + _vm->_gnap->_sequenceId = sequenceId; + _vm->_gnap->_sequenceDatNum = 0; + gameSys.setAnimation(sequenceId, _vm->_gnap->_id, 0); _vm->_toyUfoActionStatus = kAS41ToyUfoRefresh; _vm->toyUfoFlyTo(-1, -1, 0, 799, 0, 300, 2); } else { @@ -591,10 +591,10 @@ void Scene41::updateAnimations() { _vm->_timers[2] = _vm->getRandom(30) + 20; _vm->_timers[3] = _vm->getRandom(50) + 200; _vm->setGrabCursorSprite(-1); - gameSys.insertSequence(0x11F, _vm->_gnapId, makeRid(_vm->_gnapSequenceDatNum, _vm->_gnapSequenceId), _vm->_gnapId, kSeqSyncWait, 0, 0, 0); - _vm->_gnapSequenceId = 0x11F; - _vm->_gnapSequenceDatNum = 0; - gameSys.setAnimation(0x11F, _vm->_gnapId, 0); + gameSys.insertSequence(0x11F, _vm->_gnap->_id, makeRid(_vm->_gnap->_sequenceDatNum, _vm->_gnap->_sequenceId), _vm->_gnap->_id, kSeqSyncWait, 0, 0, 0); + _vm->_gnap->_sequenceId = 0x11F; + _vm->_gnap->_sequenceDatNum = 0; + gameSys.setAnimation(0x11F, _vm->_gnap->_id, 0); _nextKidSequenceId = 0x11A; gameSys.insertSequence(0x11A, 1, _currKidSequenceId, 1, kSeqSyncWait, 0, 0, 0); gameSys.setAnimation(_nextKidSequenceId, 1, 4); @@ -611,10 +611,10 @@ void Scene41::updateAnimations() { if (gameSys.getAnimationStatus(3) == 2 && gameSys.getAnimationStatus(4) == 2) { _vm->_timers[2] = _vm->getRandom(30) + 20; _vm->_timers[3] = _vm->getRandom(50) + 200; - gameSys.insertSequence(0x110, _vm->_gnapId, makeRid(_vm->_gnapSequenceDatNum, _vm->_gnapSequenceId), _vm->_gnapId, kSeqSyncWait, 0, 0, 0); - _vm->_gnapSequenceId = 0x110; - _vm->_gnapSequenceDatNum = 0; - gameSys.setAnimation(0x110, _vm->_gnapId, 0); + gameSys.insertSequence(0x110, _vm->_gnap->_id, makeRid(_vm->_gnap->_sequenceDatNum, _vm->_gnap->_sequenceId), _vm->_gnap->_id, kSeqSyncWait, 0, 0, 0); + _vm->_gnap->_sequenceId = 0x110; + _vm->_gnap->_sequenceDatNum = 0; + gameSys.setAnimation(0x110, _vm->_gnap->_id, 0); _nextToyVendorSequenceId = 0x111; gameSys.insertSequence(0x111, 1, _currToyVendorSequenceId, 1, kSeqSyncWait, 0, 0, 0); gameSys.setAnimation(_nextToyVendorSequenceId, 1, 3); @@ -634,12 +634,12 @@ void Scene41::updateAnimations() { if (gameSys.getAnimationStatus(3) == 2 && gameSys.getAnimationStatus(4) == 2) { _vm->_timers[2] = _vm->getRandom(30) + 20; _vm->_timers[3] = _vm->getRandom(50) + 200; - gameSys.insertSequence(0x124, _vm->_gnapId, - makeRid(_vm->_gnapSequenceDatNum, _vm->_gnapSequenceId), _vm->_gnapId, + gameSys.insertSequence(0x124, _vm->_gnap->_id, + makeRid(_vm->_gnap->_sequenceDatNum, _vm->_gnap->_sequenceId), _vm->_gnap->_id, kSeqSyncWait, 0, 0, 0); - _vm->_gnapSequenceId = 0x124; - _vm->_gnapSequenceDatNum = 0; - gameSys.setAnimation(0x124, _vm->_gnapId, 0); + _vm->_gnap->_sequenceId = 0x124; + _vm->_gnap->_sequenceDatNum = 0; + gameSys.setAnimation(0x124, _vm->_gnap->_id, 0); _nextToyVendorSequenceId = 0x112; gameSys.insertSequence(0x112, 1, _currToyVendorSequenceId, 1, kSeqSyncWait, 0, 0, 0); gameSys.setAnimation(_nextToyVendorSequenceId, 1, 3); @@ -870,11 +870,11 @@ void Scene42::run() { _vm->playGnapMoan1(_vm->_plat->_pos.x, _vm->_plat->_pos.y); break; case GRAB_CURSOR: - _vm->gnapKissPlatypus(0); + _vm->_gnap->kissPlatypus(0); break; case TALK_CURSOR: _vm->playGnapBrainPulsating(_vm->_plat->_pos.x, _vm->_plat->_pos.y); - _vm->playPlatypusSequence(_vm->getPlatypusSequenceId()); + _vm->playPlatypusSequence(_vm->_plat->getSequenceId()); break; case PLAT_CURSOR: _vm->playGnapImpossible(_vm->_plat->_pos.x, _vm->_plat->_pos.y); @@ -923,7 +923,7 @@ void Scene42::run() { break; case TALK_CURSOR: _vm->_gnap->_idleFacing = kDirUpRight; - _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS42BBQVendor].x, _vm->_hotspotsWalkPos[kHS42BBQVendor].y, 0, _vm->getGnapSequenceId(gskBrainPulsating, 0, 0) | 0x10000, 1); + _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS42BBQVendor].x, _vm->_hotspotsWalkPos[kHS42BBQVendor].y, 0, _vm->_gnap->getSequenceId(gskBrainPulsating, 0, 0) | 0x10000, 1); _vm->_gnap->_actionStatus = kAS42TalkBBQVendor; break; case GRAB_CURSOR: @@ -1062,19 +1062,19 @@ void Scene42::updateAnimations() { _nextBBQVendorSequenceId = 0x146; } if (sequenceId == 0x7B7) { - gameSys.insertSequence(0x107B7, _vm->_gnapId, - makeRid(_vm->_gnapSequenceDatNum, _vm->_gnapSequenceId), _vm->_gnapId, + gameSys.insertSequence(0x107B7, _vm->_gnap->_id, + makeRid(_vm->_gnap->_sequenceDatNum, _vm->_gnap->_sequenceId), _vm->_gnap->_id, kSeqSyncWait, _vm->getSequenceTotalDuration(_nextBBQVendorSequenceId), 75 * _vm->_gnap->_pos.x - _vm->_gnapGridX, 48 * _vm->_gnap->_pos.y - _vm->_gnapGridY); - _vm->_gnapSequenceDatNum = 1; + _vm->_gnap->_sequenceDatNum = 1; } else { - gameSys.insertSequence(sequenceId, _vm->_gnapId, - makeRid(_vm->_gnapSequenceDatNum, _vm->_gnapSequenceId), _vm->_gnapId, + gameSys.insertSequence(sequenceId, _vm->_gnap->_id, + makeRid(_vm->_gnap->_sequenceDatNum, _vm->_gnap->_sequenceId), _vm->_gnap->_id, kSeqSyncWait, 0, 0, 0); - _vm->_gnapSequenceDatNum = 0; + _vm->_gnap->_sequenceDatNum = 0; } - _vm->_gnapSequenceId = sequenceId; - gameSys.setAnimation(sequenceId | (_vm->_gnapSequenceDatNum << 16), _vm->_gnapId, 0); + _vm->_gnap->_sequenceId = sequenceId; + gameSys.setAnimation(sequenceId | (_vm->_gnap->_sequenceDatNum << 16), _vm->_gnap->_id, 0); if (_vm->_gnap->_actionStatus == kAS42UseQuarterWithBBQVendor) _vm->_gnap->_actionStatus = kAS42UseQuarterWithBBQVendorDone; else @@ -1328,11 +1328,11 @@ void Scene43::run() { _vm->playGnapMoan1(_vm->_plat->_pos.x, _vm->_plat->_pos.y); break; case GRAB_CURSOR: - _vm->gnapKissPlatypus(0); + _vm->_gnap->kissPlatypus(0); break; case TALK_CURSOR: _vm->playGnapBrainPulsating(_vm->_plat->_pos.x, _vm->_plat->_pos.y); - _vm->playPlatypusSequence(_vm->getPlatypusSequenceId()); + _vm->playPlatypusSequence(_vm->_plat->getSequenceId()); break; case PLAT_CURSOR: _vm->playGnapImpossible(_vm->_plat->_pos.x, _vm->_plat->_pos.y); @@ -1376,7 +1376,7 @@ void Scene43::run() { break; case TALK_CURSOR: _vm->_gnap->_idleFacing = kDirUpRight; - _vm->gnapWalkTo(5, 8, 0, _vm->getGnapSequenceId(gskBrainPulsating, 0, 0) | 0x10000, 1); + _vm->gnapWalkTo(5, 8, 0, _vm->_gnap->getSequenceId(gskBrainPulsating, 0, 0) | 0x10000, 1); _vm->_gnap->_actionStatus = 2; break; case GRAB_CURSOR: @@ -1492,10 +1492,10 @@ void Scene43::updateAnimations() { if (gameSys.getAnimationStatus(2) == 2) { _vm->_timers[2] = _vm->getRandom(30) + 20; _vm->_timers[3] = _vm->getRandom(50) + 200; - gameSys.insertSequence(0x13D, _vm->_gnapId, makeRid(_vm->_gnapSequenceDatNum, _vm->_gnapSequenceId), _vm->_gnapId, kSeqSyncWait, 0, 0, 0); - _vm->_gnapSequenceId = 0x13D; - _vm->_gnapSequenceDatNum = 0; - gameSys.setAnimation(0x13D, _vm->_gnapId, 0); + gameSys.insertSequence(0x13D, _vm->_gnap->_id, makeRid(_vm->_gnap->_sequenceDatNum, _vm->_gnap->_sequenceId), _vm->_gnap->_id, kSeqSyncWait, 0, 0, 0); + _vm->_gnap->_sequenceId = 0x13D; + _vm->_gnap->_sequenceDatNum = 0; + gameSys.setAnimation(0x13D, _vm->_gnap->_id, 0); _nextTwoHeadedGuySequenceId = 0x13B; gameSys.insertSequence(0x13B, 1, _currTwoHeadedGuySequenceId, 1, kSeqSyncWait, 0, 0, 0); gameSys.setAnimation(_nextTwoHeadedGuySequenceId, 1, 2); @@ -1702,10 +1702,10 @@ void Scene44::run() { _vm->_timers[0] = 50; _vm->_timers[1] = 20; _vm->_plat->_pos = Common::Point(5, 8); - _vm->_platypusSequenceId = 0xFD; + _vm->_plat->_sequenceId = 0xFD; _vm->_plat->_idleFacing = kDirNone; - _vm->_platypusId = 160; - _vm->_platypusSequenceDatNum = 0; + _vm->_plat->_id = 160; + _vm->_plat->_sequenceDatNum = 0; gameSys.insertSequence(0xFD, 160, 0, 0, kSeqNone, 0, 0, 0); } _vm->endSceneInit(); @@ -1776,11 +1776,11 @@ void Scene44::run() { _vm->playGnapMoan1(_vm->_plat->_pos.x, _vm->_plat->_pos.y); break; case GRAB_CURSOR: - _vm->gnapKissPlatypus(0); + _vm->_gnap->kissPlatypus(0); break; case TALK_CURSOR: _vm->playGnapBrainPulsating(_vm->_plat->_pos.x, _vm->_plat->_pos.y); - _vm->playPlatypusSequence(_vm->getPlatypusSequenceId()); + _vm->playPlatypusSequence(_vm->_plat->getSequenceId()); break; case PLAT_CURSOR: _vm->playGnapImpossible(_vm->_plat->_pos.x, _vm->_plat->_pos.y); @@ -1827,11 +1827,11 @@ void Scene44::run() { break; case TALK_CURSOR: _vm->_gnap->_idleFacing = kDirUpLeft; - _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS44KissingLady].x, _vm->_hotspotsWalkPos[kHS44KissingLady].y, 0, _vm->getGnapSequenceId(gskBrainPulsating, 0, 0) | 0x10000, 1); + _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS44KissingLady].x, _vm->_hotspotsWalkPos[kHS44KissingLady].y, 0, _vm->_gnap->getSequenceId(gskBrainPulsating, 0, 0) | 0x10000, 1); _vm->_gnap->_actionStatus = 1; break; case PLAT_CURSOR: - _vm->gnapUseDeviceOnPlatypus(); + _vm->_gnap->useDeviceOnPlatypus(); _vm->platypusWalkTo(6, 7, 1, 0x107D2, 1); if (_vm->_gnap->_pos == Common::Point(7, 7)) _vm->gnapWalkStep(); @@ -1881,7 +1881,7 @@ void Scene44::run() { break; case TALK_CURSOR: _vm->_gnap->_idleFacing = kDirUpRight; - _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS44SpringGuy].x, _vm->_hotspotsWalkPos[kHS44SpringGuy].y, -1, _vm->getGnapSequenceId(gskBrainPulsating, 0, 0) | 0x10000, 1); + _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS44SpringGuy].x, _vm->_hotspotsWalkPos[kHS44SpringGuy].y, -1, _vm->_gnap->getSequenceId(gskBrainPulsating, 0, 0) | 0x10000, 1); break; case GRAB_CURSOR: case PLAT_CURSOR: @@ -1998,10 +1998,10 @@ void Scene44::updateAnimations() { switch (_vm->_plat->_actionStatus) { case 4: if (gameSys.getAnimationStatus(2) == 2) { - gameSys.insertSequence(0xFE, _vm->_platypusId, _vm->_platypusSequenceId | (_vm->_platypusSequenceDatNum << 16), _vm->_platypusId, kSeqSyncWait, 0, 0, 0); - _vm->_platypusSequenceId = 0xFE; - _vm->_platypusSequenceDatNum = 0; - gameSys.setAnimation(0xFE, _vm->_platypusId, 1); + gameSys.insertSequence(0xFE, _vm->_plat->_id, _vm->_plat->_sequenceId | (_vm->_plat->_sequenceDatNum << 16), _vm->_plat->_id, kSeqSyncWait, 0, 0, 0); + _vm->_plat->_sequenceId = 0xFE; + _vm->_plat->_sequenceDatNum = 0; + gameSys.setAnimation(0xFE, _vm->_plat->_id, 1); gameSys.removeSequence(_currKissingLadySequenceId, 1, true); _vm->_plat->_actionStatus = 5; } @@ -2141,12 +2141,12 @@ void Scene45::run() { gameSys.insertSequence(_vm->_toyUfoSequenceId | 0x10000, _vm->_toyUfoId, 0, 0, kSeqNone, 0, _vm->_toyUfoX - 274, _vm->_toyUfoY - 128); _vm->endSceneInit(); } else if (_vm->isFlag(kGFUnk22)) { - _vm->_gnapSequenceId = 0x9E; - _vm->_gnapSequenceDatNum = 0; - _vm->_gnapId = 1; + _vm->_gnap->_sequenceId = 0x9E; + _vm->_gnap->_sequenceDatNum = 0; + _vm->_gnap->_id = 1; gameSys.setAnimation(0x9E, 1, 0); _vm->_gnap->_actionStatus = 1; - gameSys.insertSequence(_vm->_gnapSequenceId, _vm->_gnapId, 0, 0, kSeqNone, 0, 0, 0); + gameSys.insertSequence(_vm->_gnap->_sequenceId, _vm->_gnap->_id, 0, 0, kSeqNone, 0, 0, 0); _vm->initPlatypusPos(4, 8, kDirNone); _vm->endSceneInit(); } else if (_vm->_prevSceneNum == 46) { @@ -2172,8 +2172,8 @@ void Scene45::run() { if (!_vm->isFlag(kGFUnk21) && !_vm->isFlag(kGFGnapControlsToyUFO)) { _vm->setFlag(kGFUnk21); _vm->setGrabCursorSprite(-1); - gameSys.setAnimation(0x9D, _vm->_gnapId, 0); - gameSys.insertSequence(0x9D, _vm->_gnapId, makeRid(_vm->_gnapSequenceDatNum, _vm->_gnapSequenceId), _vm->_gnapId, kSeqSyncWait, 0, 0, 0); + gameSys.setAnimation(0x9D, _vm->_gnap->_id, 0); + gameSys.insertSequence(0x9D, _vm->_gnap->_id, makeRid(_vm->_gnap->_sequenceDatNum, _vm->_gnap->_sequenceId), _vm->_gnap->_id, kSeqSyncWait, 0, 0, 0); while (gameSys.getAnimationStatus(0) != 2) { _vm->gameUpdateTick(); if (gameSys.getAnimationStatus(2) == 2) { @@ -2190,26 +2190,26 @@ void Scene45::run() { gameSys.setAnimation(0x99, 1, 4); } } - _vm->_gnapSequenceId = 0x9D; - _vm->_gnapSequenceDatNum = 0; + _vm->_gnap->_sequenceId = 0x9D; + _vm->_gnap->_sequenceDatNum = 0; _vm->hideCursor(); _vm->addFullScreenSprite(0x8A, 255); gameSys.setAnimation(0xA0, 256, 0); gameSys.insertSequence(0xA0, 256, 0, 0, kSeqNone, 0, 0, 0); while (gameSys.getAnimationStatus(0) != 2) _vm->gameUpdateTick(); - gameSys.setAnimation(0x107BD, _vm->_gnapId, 0); - gameSys.insertSequence(0x107BD, _vm->_gnapId, - makeRid(_vm->_gnapSequenceDatNum, _vm->_gnapSequenceId), _vm->_gnapId, + gameSys.setAnimation(0x107BD, _vm->_gnap->_id, 0); + gameSys.insertSequence(0x107BD, _vm->_gnap->_id, + makeRid(_vm->_gnap->_sequenceDatNum, _vm->_gnap->_sequenceId), _vm->_gnap->_id, kSeqSyncWait, 0, 75 * _vm->_gnap->_pos.x - _vm->_gnapGridX, 48 * _vm->_gnap->_pos.y - _vm->_gnapGridY); _vm->removeFullScreenSprite(); _vm->showCursor(); - _vm->_gnapSequenceId = 0x7BD; - _vm->_gnapSequenceDatNum = 1; + _vm->_gnap->_sequenceId = 0x7BD; + _vm->_gnap->_sequenceDatNum = 1; } _vm->playPlatypusSequence(0x9A); - gameSys.setAnimation(_vm->_platypusSequenceId, _vm->_platypusId, 1); + gameSys.setAnimation(_vm->_plat->_sequenceId, _vm->_plat->_id, 1); while (!_vm->_sceneDone) { if (!_vm->isSoundPlaying(0x1094A)) @@ -2265,13 +2265,13 @@ void Scene45::run() { _vm->playGnapMoan1(_vm->_plat->_pos.x, _vm->_plat->_pos.y); break; case GRAB_CURSOR: - _vm->gnapKissPlatypus(0); + _vm->_gnap->kissPlatypus(0); _vm->playPlatypusSequence(0x9A); - gameSys.setAnimation(_vm->_platypusSequenceId, _vm->_platypusId, 1); + gameSys.setAnimation(_vm->_plat->_sequenceId, _vm->_plat->_id, 1); break; case TALK_CURSOR: _vm->playGnapBrainPulsating(_vm->_plat->_pos.x, _vm->_plat->_pos.y); - _vm->playPlatypusSequence(_vm->getPlatypusSequenceId()); + _vm->playPlatypusSequence(_vm->_plat->getSequenceId()); break; case PLAT_CURSOR: _vm->playGnapImpossible(_vm->_plat->_pos.x, _vm->_plat->_pos.y); @@ -2391,10 +2391,10 @@ void Scene45::updateAnimations() { _vm->_sceneWaiting = true; _vm->setFlag(kGFUnk22); updateHotspots(); - gameSys.insertSequence(0x9E, _vm->_gnapId, makeRid(_vm->_gnapSequenceDatNum, _vm->_gnapSequenceId), _vm->_gnapId, kSeqSyncWait, 0, 0, 0); - _vm->_gnapSequenceId = 0x9E; - _vm->_gnapSequenceDatNum = 0; - gameSys.setAnimation(0x9E, _vm->_gnapId, 0); + gameSys.insertSequence(0x9E, _vm->_gnap->_id, makeRid(_vm->_gnap->_sequenceDatNum, _vm->_gnap->_sequenceId), _vm->_gnap->_id, kSeqSyncWait, 0, 0, 0); + _vm->_gnap->_sequenceId = 0x9E; + _vm->_gnap->_sequenceDatNum = 0; + gameSys.setAnimation(0x9E, _vm->_gnap->_id, 0); break; default: _vm->_gnap->_actionStatus = -1; @@ -2408,7 +2408,7 @@ void Scene45::updateAnimations() { _vm->playPlatypusSequence(0x9B); else _vm->playPlatypusSequence(0x9C); - gameSys.setAnimation(_vm->_platypusSequenceId, _vm->_platypusId, 1); + gameSys.setAnimation(_vm->_plat->_sequenceId, _vm->_plat->_id, 1); } if (gameSys.getAnimationStatus(2) == 2) { @@ -2590,11 +2590,11 @@ void Scene46::run() { _vm->playGnapMoan1(_vm->_plat->_pos.x, _vm->_plat->_pos.y); break; case GRAB_CURSOR: - _vm->gnapKissPlatypus(0); + _vm->_gnap->kissPlatypus(0); break; case TALK_CURSOR: _vm->playGnapBrainPulsating(_vm->_plat->_pos.x, _vm->_plat->_pos.y); - _vm->playPlatypusSequence(_vm->getPlatypusSequenceId()); + _vm->playPlatypusSequence(_vm->_plat->getSequenceId()); break; case PLAT_CURSOR: _vm->playGnapImpossible(_vm->_plat->_pos.x, _vm->_plat->_pos.y); @@ -2614,7 +2614,7 @@ void Scene46::run() { break; case TALK_CURSOR: _vm->_gnap->_idleFacing = kDirUpLeft; - _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS46SackGuy].x, _vm->_hotspotsWalkPos[kHS46SackGuy].y, 0, _vm->getGnapSequenceId(gskBrainPulsating, 0, 0) | 0x10000, 1); + _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS46SackGuy].x, _vm->_hotspotsWalkPos[kHS46SackGuy].y, 0, _vm->_gnap->getSequenceId(gskBrainPulsating, 0, 0) | 0x10000, 1); _vm->_gnap->_actionStatus = 2; break; case GRAB_CURSOR: @@ -2635,7 +2635,7 @@ void Scene46::run() { break; case TALK_CURSOR: _vm->_gnap->_idleFacing = kDirUpRight; - _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS46ItchyGuy].x, _vm->_hotspotsWalkPos[kHS46ItchyGuy].y, 0, _vm->getGnapSequenceId(gskBrainPulsating, 0, 0) | 0x10000, 1); + _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS46ItchyGuy].x, _vm->_hotspotsWalkPos[kHS46ItchyGuy].y, 0, _vm->_gnap->getSequenceId(gskBrainPulsating, 0, 0) | 0x10000, 1); _vm->_gnap->_actionStatus = 1; break; case GRAB_CURSOR: |