diff options
Diffstat (limited to 'engines')
-rw-r--r-- | engines/gnap/character.cpp | 1 | ||||
-rw-r--r-- | engines/gnap/character.h | 1 | ||||
-rw-r--r-- | engines/gnap/gnap.cpp | 36 | ||||
-rw-r--r-- | engines/gnap/gnap.h | 2 | ||||
-rw-r--r-- | engines/gnap/scenes/group0.cpp | 442 | ||||
-rw-r--r-- | engines/gnap/scenes/group1.cpp | 492 | ||||
-rw-r--r-- | engines/gnap/scenes/group2.cpp | 390 | ||||
-rw-r--r-- | engines/gnap/scenes/group3.cpp | 264 | ||||
-rw-r--r-- | engines/gnap/scenes/group4.cpp | 240 | ||||
-rw-r--r-- | engines/gnap/scenes/group5.cpp | 42 |
10 files changed, 955 insertions, 955 deletions
diff --git a/engines/gnap/character.cpp b/engines/gnap/character.cpp index e0110ee329..84274877d9 100644 --- a/engines/gnap/character.cpp +++ b/engines/gnap/character.cpp @@ -28,6 +28,7 @@ namespace Gnap { Character::Character(GnapEngine *vm) : _vm(vm) { _pos = Common::Point(0, 0); _idleFacing = kDirNone; + _actionStatus = 0; } Character::~Character() {} diff --git a/engines/gnap/character.h b/engines/gnap/character.h index 8012ab634e..4f5282435f 100644 --- a/engines/gnap/character.h +++ b/engines/gnap/character.h @@ -43,6 +43,7 @@ public: Common::Point _pos; Facing _idleFacing; + int _actionStatus; protected: GnapEngine *_vm; diff --git a/engines/gnap/gnap.cpp b/engines/gnap/gnap.cpp index 76184fc58d..d02321a8f5 100644 --- a/engines/gnap/gnap.cpp +++ b/engines/gnap/gnap.cpp @@ -412,10 +412,10 @@ void GnapEngine::updateMouseCursor() { setCursor(kDisabledCursors[_verbCursor]); setGrabCursorSprite(-1); } - if (_isWaiting && ((_gnapActionStatus < 0 && _platypusActionStatus < 0) || _sceneWaiting)) { + if (_isWaiting && ((_gnap->_actionStatus < 0 && _plat->_actionStatus < 0) || _sceneWaiting)) { setCursor(kDisabledCursors[_verbCursor]); _isWaiting = false; - } else if (!_isWaiting && (_gnapActionStatus >= 0 || _platypusActionStatus >= 0) && !_sceneWaiting) { + } else if (!_isWaiting && (_gnap->_actionStatus >= 0 || _plat->_actionStatus >= 0) && !_sceneWaiting) { setCursor(WAIT_CURSOR); _isWaiting = true; } @@ -733,8 +733,8 @@ void GnapEngine::initScene() { _isLeavingScene = false; _sceneDone = false; _newSceneNum = 55; - _gnapActionStatus = -1; - _platypusActionStatus = -1; + _gnap->_actionStatus = -1; + _plat->_actionStatus = -1; gnapInitBrainPulseRndValue(); hideCursor(); clearAllKeyStatus1(); @@ -1553,7 +1553,7 @@ void GnapEngine::playGnapShowCurrItem(int gridX, int gridY, int gridLookX, int g } void GnapEngine::updateGnapIdleSequence() { - if (_gnapActionStatus < 0) { + if (_gnap->_actionStatus < 0) { if (_timers[2] > 0) { if (_timers[3] == 0) { _timers[2] = 60; @@ -1603,7 +1603,7 @@ void GnapEngine::updateGnapIdleSequence() { } void GnapEngine::updateGnapIdleSequence2() { - if (_gnapActionStatus < 0) { + if (_gnap->_actionStatus < 0) { if (_timers[2] > 0) { if (_timers[3] == 0) { _timers[2] = 60; @@ -1637,11 +1637,11 @@ void GnapEngine::updateGnapIdleSequence2() { } bool GnapEngine::testWalk(int animationIndex, int someStatus, int gridX1, int gridY1, int gridX2, int gridY2) { - if (_mouseClickState._left && someStatus == _gnapActionStatus) { + if (_mouseClickState._left && someStatus == _gnap->_actionStatus) { _isLeavingScene = false; _gameSys->setAnimation(0, 0, animationIndex); - _gnapActionStatus = -1; - _platypusActionStatus = -1; + _gnap->_actionStatus = -1; + _plat->_actionStatus = -1; gnapWalkTo(gridX1, gridY1, -1, -1, 1); platypusWalkTo(gridX2, gridY2, -1, -1, 1); _mouseClickState._left = false; @@ -1713,8 +1713,8 @@ void GnapEngine::doCallback(int callback) { bool GnapEngine::gnapPlatypusAction(int gridX, int gridY, int platSequenceId, int callback) { bool result = false; - if (_gnapActionStatus <= -1 && _platypusActionStatus <= -1) { - _gnapActionStatus = 100; + if (_gnap->_actionStatus <= -1 && _plat->_actionStatus <= -1) { + _gnap->_actionStatus = 100; if (isPointBlocked(_plat->_pos.x + gridX, _plat->_pos.y + gridY) && (_gnap->_pos != Common::Point(_plat->_pos.x + gridX, _plat->_pos.y + gridY))) platypusWalkStep(); if (!isPointBlocked(_plat->_pos.x + gridX, _plat->_pos.y + gridY) && (_gnap->_pos != Common::Point(_plat->_pos.x + gridX, _plat->_pos.y + gridY))) { @@ -1736,14 +1736,14 @@ bool GnapEngine::gnapPlatypusAction(int gridX, int gridY, int platSequenceId, in result = true; } } - _gnapActionStatus = -1; + _gnap->_actionStatus = -1; } return result; } void GnapEngine::gnapKissPlatypus(int callback) { if (gnapPlatypusAction(-1, 0, 0x107D1, callback)) { - _gnapActionStatus = 100; + _gnap->_actionStatus = 100; _gameSys->setAnimation(0, 0, 1); _gameSys->setAnimation(0x10847, _gnapId, 0); _gameSys->insertSequence(0x10847, _gnapId, @@ -1764,7 +1764,7 @@ void GnapEngine::gnapKissPlatypus(int callback) { gameUpdateTick(); } _gameSys->setAnimation(0, 0, 0); - _gnapActionStatus = -1; + _gnap->_actionStatus = -1; } else { playGnapSequence(getGnapSequenceId(gskScratchingHead, _plat->_pos.x, _plat->_pos.y) | 0x10000); } @@ -1773,7 +1773,7 @@ void GnapEngine::gnapKissPlatypus(int callback) { void GnapEngine::gnapUseJointOnPlatypus() { setGrabCursorSprite(-1); if (gnapPlatypusAction(1, 0, 0x107C1, 0)) { - _gnapActionStatus = 100; + _gnap->_actionStatus = 100; _gameSys->setAnimation(0, 0, 1); _gameSys->setAnimation(0x10876, _platypusId, 0); _gameSys->insertSequence(0x10875, _gnapId, @@ -1794,7 +1794,7 @@ void GnapEngine::gnapUseJointOnPlatypus() { gameUpdateTick(); } _gameSys->setAnimation(0, 0, 0); - _gnapActionStatus = -1; + _gnap->_actionStatus = -1; } else { playGnapSequence(getGnapSequenceId(gskScratchingHead, _plat->_pos.x, _plat->_pos.y) | 0x10000); } @@ -1834,7 +1834,7 @@ void GnapEngine::playPlatypusSequence(int sequenceId) { } void GnapEngine::updatePlatypusIdleSequence() { - if (_platypusActionStatus < 0 && _gnapActionStatus < 0) { + if (_plat->_actionStatus < 0 && _gnap->_actionStatus < 0) { if (_timers[0] > 0) { if (_timers[1] == 0) { _timers[1] = getRandom(20) + 30; @@ -1872,7 +1872,7 @@ void GnapEngine::updatePlatypusIdleSequence() { } void GnapEngine::updatePlatypusIdleSequence2() { - if (_platypusActionStatus < 0 && _gnapActionStatus < 0) { + if (_plat->_actionStatus < 0 && _gnap->_actionStatus < 0) { if (_timers[0]) { if (!_timers[1]) { _timers[1] = getRandom(20) + 30; diff --git a/engines/gnap/gnap.h b/engines/gnap/gnap.h index ce631a392c..ccaf11f961 100644 --- a/engines/gnap/gnap.h +++ b/engines/gnap/gnap.h @@ -516,7 +516,6 @@ public: void platypusMakeRoom(); // Gnap - int _gnapActionStatus; int _gnapBrainPulseNum, _gnapBrainPulseRndValue; int _gnapSequenceId, _gnapSequenceDatNum, _gnapId; @@ -548,7 +547,6 @@ public: void gnapUseDisguiseOnPlatypus(); // Platypus - int _platypusActionStatus; int _platypusSequenceId, _platypusSequenceDatNum, _platypusId; int getPlatypusSequenceId(); void playPlatypusSequence(int sequenceId); diff --git a/engines/gnap/scenes/group0.cpp b/engines/gnap/scenes/group0.cpp index 087fb53a5e..5348f18df8 100644 --- a/engines/gnap/scenes/group0.cpp +++ b/engines/gnap/scenes/group0.cpp @@ -115,14 +115,14 @@ void Scene01::run() { switch (_vm->_sceneClickedHotspot) { case kHS01Device: - if (_vm->_gnapActionStatus < 0) { + if (_vm->_gnap->_actionStatus < 0) { _vm->runMenu(); updateHotspots(); } break; case kHS01Platypus: - if (_vm->_gnapActionStatus < 0 && _vm->isFlag(kGFPlatypus)) { + if (_vm->_gnap->_actionStatus < 0 && _vm->isFlag(kGFPlatypus)) { if (_vm->_grabCursorSpriteIndex == kItemDisguise) { _vm->gnapUseDisguiseOnPlatypus(); } else if (_vm->_grabCursorSpriteIndex >= 0) { @@ -151,7 +151,7 @@ void Scene01::run() { break; case kHS01Spaceship: - if (_vm->_gnapActionStatus < 0) { + if (_vm->_gnap->_actionStatus < 0) { if (_vm->_grabCursorSpriteIndex >= 0) { _vm->playGnapShowCurrItem(_vm->_hotspotsWalkPos[4].x, _vm->_hotspotsWalkPos[4].y, 0, 2); } else { @@ -159,7 +159,7 @@ void Scene01::run() { 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)) - _vm->_gnapActionStatus = kAS01LookSpaceship; + _vm->_gnap->_actionStatus = kAS01LookSpaceship; break; case GRAB_CURSOR: case TALK_CURSOR: @@ -172,7 +172,7 @@ void Scene01::run() { break; case kHS01Mud: - if (_vm->_gnapActionStatus < 0) { + if (_vm->_gnap->_actionStatus < 0) { if (_vm->_grabCursorSpriteIndex >= 0) { _vm->playGnapShowCurrItem(_vm->_hotspotsWalkPos[2].x, _vm->_hotspotsWalkPos[2].y, 2, 3); } else { @@ -182,7 +182,7 @@ void Scene01::run() { break; case GRAB_CURSOR: _vm->gnapWalkTo(_vm->_hotspotsWalkPos[2].x, _vm->_hotspotsWalkPos[2].y, 0, _vm->getGnapSequenceId(gskIdle, 2, 3) | 0x10000, 1); - _vm->_gnapActionStatus = kAS01TakeMud; + _vm->_gnap->_actionStatus = kAS01TakeMud; break; case TALK_CURSOR: case PLAT_CURSOR: @@ -194,7 +194,7 @@ void Scene01::run() { break; case kHS01Pigs: - if (_vm->_gnapActionStatus < 0) { + if (_vm->_gnap->_actionStatus < 0) { if (_vm->_grabCursorSpriteIndex >= 0) { _vm->playGnapShowCurrItem(_vm->_hotspotsWalkPos[3].x, _vm->_hotspotsWalkPos[3].y, 7, 2); } else { @@ -202,17 +202,17 @@ void Scene01::run() { 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->_gnapActionStatus = kAS01LookPigs; + _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->_gnapActionStatus = kAS01UsePigs; + _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->_gnapActionStatus = kAS01LookPigs; + _vm->_gnap->_actionStatus = kAS01LookPigs; break; case PLAT_CURSOR: _vm->playGnapImpossible(0, 0); @@ -223,10 +223,10 @@ void Scene01::run() { break; case kHS01ExitTruck: - if (_vm->_gnapActionStatus < 0) { + if (_vm->_gnap->_actionStatus < 0) { _vm->_isLeavingScene = true; _vm->gnapWalkTo(_vm->_hotspotsWalkPos[1].x, _vm->_hotspotsWalkPos[1].y, 0, 0x107AB, 1); - _vm->_gnapActionStatus = kAS01LeaveScene; + _vm->_gnap->_actionStatus = kAS01LeaveScene; if (_vm->isFlag(kGFPlatypus)) _vm->platypusWalkTo(_vm->_hotspotsWalkPos[1].x, _vm->_hotspotsWalkPos[1].y + 1, -1, 0x107CD, 1); _vm->_newSceneNum = 2; @@ -241,12 +241,12 @@ void Scene01::run() { case kHS01WalkArea6: case kHS01WalkArea7: case kHS01WalkArea8: - if (_vm->_gnapActionStatus < 0) + if (_vm->_gnap->_actionStatus < 0) _vm->gnapWalkTo(-1, -1, -1, -1, 1); break; default: - if (_vm->_mouseClickState._left && _vm->_gnapActionStatus < 0) { + if (_vm->_mouseClickState._left && _vm->_gnap->_actionStatus < 0) { _vm->gnapWalkTo(-1, -1, -1, -1, 1); _vm->_mouseClickState._left = false; } @@ -260,9 +260,9 @@ void Scene01::run() { _vm->playSound(0x1091C, true); if (!_vm->_isLeavingScene) { - if (_vm->_platypusActionStatus < 0 && _vm->isFlag(kGFPlatypus)) + if (_vm->_plat->_actionStatus < 0 && _vm->isFlag(kGFPlatypus)) _vm->updatePlatypusIdleSequence(); - if (_vm->_gnapActionStatus < 0) + if (_vm->_gnap->_actionStatus < 0) _vm->updateGnapIdleSequence(); if (_vm->_timers[4] == 0) { // Update bird animation @@ -291,20 +291,20 @@ void Scene01::updateAnimations() { if (gameSys.getAnimationStatus(0) == 2) { gameSys.setAnimation(0, 0, 0); - switch (_vm->_gnapActionStatus) { + switch (_vm->_gnap->_actionStatus) { case kAS01LookSpaceship: _spaceshipSurface = gameSys.createSurface(47); gameSys.insertSpriteDrawItem(_spaceshipSurface, 0, 0, 255); gameSys.setAnimation(133, 256, 0); gameSys.insertSequence(133, 256, 0, 0, kSeqNone, 0, 0, 0); - _vm->_gnapActionStatus = kAS01LookSpaceshipDone; + _vm->_gnap->_actionStatus = kAS01LookSpaceshipDone; break; case kAS01LookSpaceshipDone: gameSys.removeSequence(133, 256, true); gameSys.removeSpriteDrawItem(_spaceshipSurface, 255); _vm->deleteSurface(&_spaceshipSurface); - _vm->_gnapActionStatus = -1; + _vm->_gnap->_actionStatus = -1; break; case kAS01LeaveScene: @@ -316,21 +316,21 @@ void Scene01::updateAnimations() { _vm->playGnapUseDevice(0, 0); gameSys.insertSequence(128, 40, 129, 40, kSeqSyncWait, 0, 0, 0); gameSys.setAnimation(128, 40, 3); - _vm->_gnapActionStatus = -1; + _vm->_gnap->_actionStatus = -1; break; case kAS01LookPigs: _vm->playSound(0x8A, false); _vm->playSound(0x8B, false); _vm->playSound(0x8C, false); - _vm->_gnapActionStatus = -1; + _vm->_gnap->_actionStatus = -1; break; case kAS01UsePigs: _vm->playGnapPullOutDevice(7, 2); _vm->playGnapUseDevice(0, 0); gameSys.insertSequence(135, 39, 0, 0, kSeqNone, 25, _vm->getRandom(140) - 40, 0); - _vm->_gnapActionStatus = -1; + _vm->_gnap->_actionStatus = -1; break; } } @@ -465,14 +465,14 @@ void Scene02::run() { switch (_vm->_sceneClickedHotspot) { case kHS02Device: - if (_vm->_gnapActionStatus < 0) { + if (_vm->_gnap->_actionStatus < 0) { _vm->runMenu(); updateHotspots(); } break; case kHS02Platypus: - if (_vm->_gnapActionStatus < 0 && _vm->isFlag(kGFPlatypus)) { + if (_vm->_gnap->_actionStatus < 0 && _vm->isFlag(kGFPlatypus)) { if (_vm->_grabCursorSpriteIndex == kItemDisguise) { _vm->gnapUseDisguiseOnPlatypus(); } else if (_vm->_grabCursorSpriteIndex >= 0) { @@ -501,12 +501,12 @@ void Scene02::run() { break; case kHS02Chicken: - if (_vm->_gnapActionStatus < 0) { + if (_vm->_gnap->_actionStatus < 0) { 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); - _vm->_gnapActionStatus = kAS02UseTwigWithChicken; + _vm->_gnap->_actionStatus = kAS02UseTwigWithChicken; } else if (_vm->_grabCursorSpriteIndex >= 0) { _vm->playGnapShowCurrItem(_vm->_hotspotsWalkPos[1].x, _vm->_hotspotsWalkPos[1].y + 1, 9, 8); } else { @@ -517,14 +517,14 @@ void Scene02::run() { 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)) - _vm->_gnapActionStatus = kAS02GrabChicken; + _vm->_gnap->_actionStatus = kAS02GrabChicken; else - _vm->_gnapActionStatus = -1; + _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->_gnapActionStatus = kAS02TalkChicken; + _vm->_gnap->_actionStatus = kAS02TalkChicken; break; case PLAT_CURSOR: _vm->playGnapImpossible(0, 0); @@ -536,20 +536,20 @@ void Scene02::run() { case kHS02Truck1: case kHS02Truck2: - if (_vm->_gnapActionStatus < 0) { + 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)) { _vm->setGrabCursorSprite(-1); _vm->invRemove(kItemKeys); if (_vm->isFlag(kGFTruckFilledWithGas)) - _vm->_gnapActionStatus = kAS02UseTruckGas; + _vm->_gnap->_actionStatus = kAS02UseTruckGas; else - _vm->_gnapActionStatus = kAS02UseTruckNoGas; + _vm->_gnap->_actionStatus = kAS02UseTruckNoGas; } } 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)) - _vm->_gnapActionStatus = kAS02UseGasWithTruck; + _vm->_gnap->_actionStatus = kAS02UseGasWithTruck; _vm->_hotspots[kHS02WalkArea4]._flags &= ~SF_WALKABLE; } else if (_vm->_grabCursorSpriteIndex >= 0) { _vm->playGnapShowCurrItem(_vm->_hotspotsWalkPos[2].x, _vm->_hotspotsWalkPos[2].y, 2, 2); @@ -562,14 +562,14 @@ void Scene02::run() { 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->isFlag(kGFTruckFilledWithGas)) - _vm->_gnapActionStatus = kAS02UseTruckGas; + _vm->_gnap->_actionStatus = kAS02UseTruckGas; else - _vm->_gnapActionStatus = kAS02UseTruckNoGas; + _vm->_gnap->_actionStatus = kAS02UseTruckNoGas; } } else { _vm->_gnap->_idleFacing = kDirUnk4; if (_vm->gnapWalkTo(_vm->_hotspotsWalkPos[3].x, _vm->_hotspotsWalkPos[3].y, 0, _vm->getGnapSequenceId(gskIdle, 2, 2) | 0x10000, 1)) - _vm->_gnapActionStatus = kAS02UseTruckNoKeys; + _vm->_gnap->_actionStatus = kAS02UseTruckNoKeys; } break; case TALK_CURSOR: @@ -582,7 +582,7 @@ void Scene02::run() { break; case kHS02TruckGrill: - if (_vm->_gnapActionStatus < 0) { + if (_vm->_gnap->_actionStatus < 0) { if (_vm->_grabCursorSpriteIndex >= 0) { _vm->playGnapShowCurrItem(_vm->_hotspotsWalkPos[4].x, _vm->_hotspotsWalkPos[4].y, 2, 4); } else { @@ -593,7 +593,7 @@ void Scene02::run() { 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->_gnapActionStatus = kAS02GrabTruckGrill; + _vm->_gnap->_actionStatus = kAS02GrabTruckGrill; break; case TALK_CURSOR: case PLAT_CURSOR: @@ -605,10 +605,10 @@ void Scene02::run() { break; case kHS02ExitHouse: - if (_vm->_gnapActionStatus < 0) { + if (_vm->_gnap->_actionStatus < 0) { _vm->_isLeavingScene = true; _vm->gnapWalkTo(_vm->_hotspotsWalkPos[6].x, _vm->_hotspotsWalkPos[6].y, 0, 0x107AD, 1); - _vm->_gnapActionStatus = kAS02LeaveScene; + _vm->_gnap->_actionStatus = kAS02LeaveScene; if (_vm->isFlag(kGFPlatypus)) _vm->platypusWalkTo(_vm->_hotspotsWalkPos[6].x + 1, _vm->_hotspotsWalkPos[6].y, -1, 0x107C1, 1); updateHotspots(); @@ -617,10 +617,10 @@ void Scene02::run() { break; case kHS02ExitBarn: - if (_vm->_gnapActionStatus < 0) { + if (_vm->_gnap->_actionStatus < 0) { _vm->_isLeavingScene = true; _vm->gnapWalkTo(_vm->_hotspotsWalkPos[7].x, _vm->_hotspotsWalkPos[7].y, 0, 0x107AD, 1); - _vm->_gnapActionStatus = kAS02LeaveScene; + _vm->_gnap->_actionStatus = kAS02LeaveScene; if (_vm->isFlag(kGFPlatypus)) _vm->platypusWalkTo(_vm->_hotspotsWalkPos[7].x + 1, _vm->_hotspotsWalkPos[7].y, -1, 0x107C1, 1); updateHotspots(); @@ -629,10 +629,10 @@ void Scene02::run() { break; case kHS02ExitCreek: - if (_vm->_gnapActionStatus < 0) { + if (_vm->_gnap->_actionStatus < 0) { _vm->_isLeavingScene = true; _vm->gnapWalkTo(_vm->_hotspotsWalkPos[8].x, _vm->_hotspotsWalkPos[8].y, 0, 0x107AB, 1); - _vm->_gnapActionStatus = kAS02LeaveScene; + _vm->_gnap->_actionStatus = kAS02LeaveScene; if (_vm->isFlag(kGFPlatypus)) _vm->platypusWalkTo(_vm->_hotspotsWalkPos[8].x, _vm->_hotspotsWalkPos[8].y, -1, 0x107CD, 1); _vm->_newSceneNum = 3; @@ -640,10 +640,10 @@ void Scene02::run() { break; case kHS02ExitPigpen: - if (_vm->_gnapActionStatus < 0) { + if (_vm->_gnap->_actionStatus < 0) { _vm->_isLeavingScene = true; _vm->gnapWalkTo(_vm->_hotspotsWalkPos[9].x, _vm->_hotspotsWalkPos[9].y, 0, 0x107AF, 1); - _vm->_gnapActionStatus = kAS02LeaveScene; + _vm->_gnap->_actionStatus = kAS02LeaveScene; if (_vm->isFlag(kGFPlatypus)) _vm->platypusWalkTo(_vm->_hotspotsWalkPos[9].x, _vm->_hotspotsWalkPos[9].y, -1, 0x107CF, 1); _vm->_newSceneNum = 1; @@ -654,12 +654,12 @@ void Scene02::run() { case kHS02WalkArea2: case kHS02WalkArea3: case kHS02WalkArea4: - if (_vm->_gnapActionStatus < 0) + if (_vm->_gnap->_actionStatus < 0) _vm->gnapWalkTo(-1, -1, -1, -1, 1); break; default: - if (_vm->_mouseClickState._left && _vm->_gnapActionStatus < 0) { + if (_vm->_mouseClickState._left && _vm->_gnap->_actionStatus < 0) { _vm->gnapWalkTo(-1, -1, -1, -1, 1); _vm->_mouseClickState._left = false; } @@ -672,9 +672,9 @@ void Scene02::run() { _vm->playSound(0x1091C, true); if (!_vm->_isLeavingScene) { - if (_vm->_platypusActionStatus < 0 && _vm->isFlag(kGFPlatypus)) + if (_vm->_plat->_actionStatus < 0 && _vm->isFlag(kGFPlatypus)) _vm->updatePlatypusIdleSequence(); - if (_vm->_gnapActionStatus < 0) + if (_vm->_gnap->_actionStatus < 0) _vm->updateGnapIdleSequence(); if (!_vm->_timers[4]) { // Update bird animation @@ -684,7 +684,7 @@ void Scene02::run() { else gameSys.insertSequence(0x154, 256, 0, 0, kSeqNone, 0, 0, 0); } - if (!_vm->_timers[5] && _nextChickenSequenceId == -1 && _vm->_gnapActionStatus != 7 && _vm->_gnapActionStatus != 8) { + if (!_vm->_timers[5] && _nextChickenSequenceId == -1 && _vm->_gnap->_actionStatus != 7 && _vm->_gnap->_actionStatus != 8) { if (_vm->getRandom(6) != 0) { _nextChickenSequenceId = 0x14B; _vm->_timers[5] = _vm->getRandom(20) + 30; @@ -712,13 +712,13 @@ void Scene02::updateAnimations() { GameSys& gameSys = *_vm->_gameSys; if (gameSys.getAnimationStatus(0) == 2) { - switch (_vm->_gnapActionStatus) { + 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; - _vm->_gnapActionStatus = kAS02UseTruckNoKeysDone; + _vm->_gnap->_actionStatus = kAS02UseTruckNoKeysDone; break; case kAS02UseGasWithTruck: gameSys.insertSequence(0x151, _vm->_gnapId, makeRid(_vm->_gnapSequenceDatNum, _vm->_gnapSequenceId), _vm->_gnapId, kSeqSyncWait, 0, 0, 0); @@ -728,7 +728,7 @@ void Scene02::updateAnimations() { _vm->invRemove(kItemGas); _vm->setGrabCursorSprite(-1); _vm->setFlag(kGFTruckFilledWithGas); - _vm->_gnapActionStatus = kAS02UseGasWithTruckDone; + _vm->_gnap->_actionStatus = kAS02UseGasWithTruckDone; break; case kAS02UseTruckGas: _vm->_timers[5] = 9999; @@ -781,7 +781,7 @@ void Scene02::updateAnimations() { gameSys.setAnimation(_gnapTruckSequenceId, _vm->_gnapId, 0); _vm->_gnapSequenceId = _gnapTruckSequenceId; _vm->_gnapSequenceDatNum = 0; - _vm->_gnapActionStatus = -1; + _vm->_gnap->_actionStatus = -1; break; case kAS02LeaveScene: _vm->_sceneDone = true; @@ -800,7 +800,7 @@ void Scene02::updateAnimations() { _currChickenSequenceId = 0x14B; gameSys.setAnimation(0x14B, 179, 2); gameSys.insertSequence(_currChickenSequenceId, 179, 0, 0, kSeqNone, 0, 0, 0); - _vm->_gnapActionStatus = -1; + _vm->_gnap->_actionStatus = -1; _vm->_timers[5] = 30; break; case kAS02UseTwigWithChicken: @@ -808,12 +808,12 @@ void Scene02::updateAnimations() { gameSys.insertSequence(0x155, 179, _currChickenSequenceId, 179, kSeqSyncExists, 0, 0, 0); _currChickenSequenceId = 0x155; _nextChickenSequenceId = -1; - _vm->_gnapActionStatus = -1; + _vm->_gnap->_actionStatus = -1; break; case kAS02UseTruckNoKeysDone: case kAS02UseGasWithTruckDone: default: - _vm->_gnapActionStatus = -1; + _vm->_gnap->_actionStatus = -1; break; } } @@ -825,14 +825,14 @@ void Scene02::updateAnimations() { gameSys.removeSequence(_currChickenSequenceId, 179, true); _nextChickenSequenceId = -1; _currChickenSequenceId = -1; - _vm->_gnapActionStatus = kAS02GrabChickenDone; + _vm->_gnap->_actionStatus = kAS02GrabChickenDone; _vm->_timers[5] = 500; } else if (_nextChickenSequenceId == 0x14C) { gameSys.setAnimation(_nextChickenSequenceId, 179, 2); gameSys.insertSequence(_nextChickenSequenceId, 179, _currChickenSequenceId, 179, kSeqSyncWait, 0, 0, 0); _currChickenSequenceId = _nextChickenSequenceId; _nextChickenSequenceId = -1; - _vm->_gnapActionStatus = -1; + _vm->_gnap->_actionStatus = -1; } else if (_nextChickenSequenceId != -1) { gameSys.setAnimation(_nextChickenSequenceId, 179, 2); gameSys.insertSequence(_nextChickenSequenceId, 179, _currChickenSequenceId, 179, kSeqSyncWait, 0, 0, 0); @@ -937,7 +937,7 @@ void Scene03::run() { switch (_vm->_sceneClickedHotspot) { case kHS03Platypus: - if (_vm->_gnapActionStatus < 0 && _vm->isFlag(kGFPlatypus)) { + if (_vm->_gnap->_actionStatus < 0 && _vm->isFlag(kGFPlatypus)) { if (_vm->_grabCursorSpriteIndex == kItemDisguise) { _vm->gnapUseDisguiseOnPlatypus(); } else if (_vm->_grabCursorSpriteIndex >= 0) { @@ -966,7 +966,7 @@ void Scene03::run() { break; case kHS03Grass: - if (_vm->_gnapActionStatus < 0) { + if (_vm->_gnap->_actionStatus < 0) { if (_vm->isFlag(kGFGrassTaken)) { _vm->gnapWalkTo(-1, -1, -1, -1, 1); } else if (_vm->_grabCursorSpriteIndex >= 0) { @@ -993,11 +993,11 @@ void Scene03::run() { break; case kHS03ExitTruck: - if (_vm->_gnapActionStatus < 0) { + if (_vm->_gnap->_actionStatus < 0) { _vm->_isLeavingScene = true; _vm->_hotspots[kHS03PlatypusWalkArea]._flags |= SF_WALKABLE; _vm->gnapWalkTo(_vm->_hotspotsWalkPos[2].x, _vm->_hotspotsWalkPos[2].y, 0, 0x107AD, 1); - _vm->_gnapActionStatus = kAS03LeaveScene; + _vm->_gnap->_actionStatus = kAS03LeaveScene; if (_vm->isFlag(kGFPlatypus)) _vm->platypusWalkTo(_vm->_hotspotsWalkPos[2].x, _vm->_hotspotsWalkPos[2].y, -1, 0x107C2, 1); _vm->_hotspots[kHS03PlatypusWalkArea]._flags &= ~SF_WALKABLE; @@ -1009,7 +1009,7 @@ void Scene03::run() { break; case kHS03Creek: - if (_vm->_gnapActionStatus == -1) { + if (_vm->_gnap->_actionStatus == -1) { if (_vm->_grabCursorSpriteIndex >= 0) { _vm->playGnapImpossible(0, 0); } else { @@ -1021,7 +1021,7 @@ void Scene03::run() { 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)) - _vm->_gnapActionStatus = kAS03GrabCreek; + _vm->_gnap->_actionStatus = kAS03GrabCreek; if (!_vm->isFlag(kGFPlatypus)) _vm->_hotspots[kHS03PlatypusWalkArea]._flags &= ~SF_WALKABLE; break; @@ -1035,7 +1035,7 @@ void Scene03::run() { break; case kHS03TrappedPlatypus: - if (_vm->_gnapActionStatus < 0) { + if (_vm->_gnap->_actionStatus < 0) { if (_vm->isFlag(kGFPlatypus)) { _vm->gnapWalkTo(-1, -1, -1, -1, 1); } else if (_vm->_grabCursorSpriteIndex >= 0) { @@ -1048,13 +1048,13 @@ void Scene03::run() { case GRAB_CURSOR: if (_platypusHypnotized) { _vm->gnapWalkTo(7, 6, 0, 0x107B5, 1); - _vm->_gnapActionStatus = kAS03FreePlatypus; + _vm->_gnap->_actionStatus = kAS03FreePlatypus; } else { _vm->gnapWalkTo(_vm->_hotspotsWalkPos[4].x, _vm->_hotspotsWalkPos[4].y, 0, _vm->getGnapSequenceId(gskIdle, 0, 0) | 0x10000, 1); if (_platypusScared) - _vm->_gnapActionStatus = kAS03GrabScaredPlatypus; + _vm->_gnap->_actionStatus = kAS03GrabScaredPlatypus; else - _vm->_gnapActionStatus = kAS03GrabPlatypus; + _vm->_gnap->_actionStatus = kAS03GrabPlatypus; } break; case TALK_CURSOR: @@ -1064,9 +1064,9 @@ void Scene03::run() { _vm->_gnap->_idleFacing = kDirBottomRight; _vm->gnapWalkTo(_vm->_hotspotsWalkPos[4].x, _vm->_hotspotsWalkPos[4].y, 0, _vm->getGnapSequenceId(gskIdle, 0, 0) | 0x10000, 1); if (_platypusScared) - _vm->_gnapActionStatus = kAS03HypnotizeScaredPlat; + _vm->_gnap->_actionStatus = kAS03HypnotizeScaredPlat; else - _vm->_gnapActionStatus = kAS03HypnotizePlat; + _vm->_gnap->_actionStatus = kAS03HypnotizePlat; } break; case PLAT_CURSOR: @@ -1078,7 +1078,7 @@ void Scene03::run() { break; case kHS03Device: - if (_vm->_gnapActionStatus < 0) { + if (_vm->_gnap->_actionStatus < 0) { _vm->runMenu(); updateHotspots(); } @@ -1087,26 +1087,26 @@ void Scene03::run() { case kHS03WalkAreas1: case kHS03WalkAreas2: case kHS03WalkAreas3: - if (_vm->_gnapActionStatus < 0) + if (_vm->_gnap->_actionStatus < 0) _vm->gnapWalkTo(-1, -1, -1, -1, 1); break; case kHS03PlatypusWalkArea: - if (_vm->_gnapActionStatus < 0) { + if (_vm->_gnap->_actionStatus < 0) { if (_vm->isFlag(kGFPlatypus) || _platypusHypnotized) { _vm->gnapWalkTo(-1, -1, -1, -1, 1); } else { _vm->gnapWalkTo(_vm->_hotspotsWalkPos[4].x, _vm->_hotspotsWalkPos[4].y, 0, 0x107B5, 1); if (_platypusScared) - _vm->_gnapActionStatus = kAS03GrabScaredPlatypus; + _vm->_gnap->_actionStatus = kAS03GrabScaredPlatypus; else - _vm->_gnapActionStatus = kAS03GrabPlatypus; + _vm->_gnap->_actionStatus = kAS03GrabPlatypus; } } break; default: - if (_vm->_mouseClickState._left && _vm->_gnapActionStatus < 0) { + if (_vm->_mouseClickState._left && _vm->_gnap->_actionStatus < 0) { _vm->gnapWalkTo(-1, -1, -1, -1, 1); _vm->_mouseClickState._left = false; } @@ -1120,18 +1120,18 @@ void Scene03::run() { _vm->playSound(0x10925, true); if (!_vm->_isLeavingScene) { - if (_vm->_platypusActionStatus < 0 && _vm->isFlag(kGFPlatypus)) + if (_vm->_plat->_actionStatus < 0 && _vm->isFlag(kGFPlatypus)) _vm->updatePlatypusIdleSequence(); - if (_vm->_gnapActionStatus < 0) + if (_vm->_gnap->_actionStatus < 0) _vm->updateGnapIdleSequence(); if (!_vm->_timers[1] && !_platypusScared) { _vm->_timers[1] = _vm->getRandom(40) + 20; - if (_vm->_gnapActionStatus < 0 && _vm->_platypusActionStatus < 0 && !_vm->isFlag(kGFPlatypus) && !_platypusHypnotized) + if (_vm->_gnap->_actionStatus < 0 && _vm->_plat->_actionStatus < 0 && !_vm->isFlag(kGFPlatypus) && !_platypusHypnotized) _nextPlatSequenceId = 450; } if (!_vm->_timers[6]) { _vm->_timers[6] = _vm->getRandom(20) + 30; - if (_vm->_gnapActionStatus < 0 && _vm->_platypusActionStatus < 0 && _nextFrogSequenceId == -1) { + if (_vm->_gnap->_actionStatus < 0 && _vm->_plat->_actionStatus < 0 && _nextFrogSequenceId == -1) { if (_vm->getRandom(5) == 1) _nextFrogSequenceId = 0x1C6; else @@ -1141,12 +1141,12 @@ void Scene03::run() { if (!_vm->_timers[4]) { // Update bird animation _vm->_timers[4] = _vm->getRandom(100) + 300; - if (_vm->_gnapActionStatus < 0 && _vm->_platypusActionStatus < 0) + if (_vm->_gnap->_actionStatus < 0 && _vm->_plat->_actionStatus < 0) gameSys.insertSequence(_vm->getRandom(2) != 0 ? 0x1C8 : 0x1C3, 253, 0, 0, kSeqNone, 0, 0, 0); } if (!_vm->_timers[5]) { _vm->_timers[5] = _vm->getRandom(100) + 200; - if (_vm->_gnapActionStatus < 0 && _vm->_platypusActionStatus < 0) { + if (_vm->_gnap->_actionStatus < 0 && _vm->_plat->_actionStatus < 0) { gameSys.setAnimation(0x1C5, 253, 4); gameSys.insertSequence(0x1C5, 253, 0, 0, kSeqNone, 0, 0, 0); } @@ -1174,7 +1174,7 @@ void Scene03::updateAnimations() { if (gameSys.getAnimationStatus(0) == 2) { gameSys.setAnimation(0, 0, 0); - switch (_vm->_gnapActionStatus) { + switch (_vm->_gnap->_actionStatus) { case kAS03LeaveScene: _vm->_sceneDone = true; break; @@ -1182,7 +1182,7 @@ void Scene03::updateAnimations() { _nextPlatSequenceId = 0x1BC; break; case kAS03FreePlatypusDone: - _vm->_gnapActionStatus = -1; + _vm->_gnap->_actionStatus = -1; _vm->_plat->_pos = Common::Point(6, 6); _vm->_plat->_idleFacing = kDirUnk4; _vm->_platypusId = 120; @@ -1207,7 +1207,7 @@ void Scene03::updateAnimations() { gameSys.insertSequence(0x1BA, 99, _vm->_platypusSequenceId | (_vm->_platypusSequenceDatNum << 16), 99, kSeqSyncExists, 0, 0, 0); _vm->_platypusSequenceDatNum = 0; _vm->_platypusSequenceId = 0x1BA; - _vm->_gnapActionStatus = -1; + _vm->_gnap->_actionStatus = -1; _platypusHypnotized = true; updateHotspots(); break; @@ -1227,7 +1227,7 @@ void Scene03::updateAnimations() { gameSys.insertSequence(0x1BA, 99, 447, 99, kSeqSyncWait, 0, 0, 0); _vm->_platypusSequenceDatNum = 0; _vm->_platypusSequenceId = 0x1BA; - _vm->_gnapActionStatus = -1; + _vm->_gnap->_actionStatus = -1; _platypusHypnotized = true; updateHotspots(); break; @@ -1244,10 +1244,10 @@ void Scene03::updateAnimations() { gameSys.setAnimation(0x1B4, _vm->_gnapId, 0); _vm->_gnapSequenceId = 0x1B4; _vm->_gnapSequenceDatNum = 0; - _vm->_gnapActionStatus = kAS03GrabCreekDone; + _vm->_gnap->_actionStatus = kAS03GrabCreekDone; break; default: - _vm->_gnapActionStatus = -1; + _vm->_gnap->_actionStatus = -1; break; } } @@ -1265,7 +1265,7 @@ void Scene03::updateAnimations() { _vm->_platypusSequenceDatNum = 0; gameSys.setAnimation(_nextPlatSequenceId, 99, 1); _nextPlatSequenceId = -1; - _vm->_gnapActionStatus = -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); @@ -1275,7 +1275,7 @@ void Scene03::updateAnimations() { _vm->_gnapSequenceId = 0x1B6; _vm->_gnapSequenceDatNum = 0; _vm->_gnap->_idleFacing = kDirNone; - _vm->_gnapActionStatus = kAS03FreePlatypusDone; + _vm->_gnap->_actionStatus = kAS03FreePlatypusDone; _nextPlatSequenceId = -1; } else if (_nextPlatSequenceId == 0x1C2 && !_platypusScared) { gameSys.setAnimation(0, 0, 1); @@ -1434,14 +1434,14 @@ void Scene04::run() { switch (_vm->_sceneClickedHotspot) { case kHS04Device: - if (_vm->_gnapActionStatus < 0) { + if (_vm->_gnap->_actionStatus < 0) { _vm->runMenu(); updateHotspots(); } break; case kHS04Platypus: - if (_vm->_gnapActionStatus < 0 && _vm->isFlag(kGFPlatypus)) { + if (_vm->_gnap->_actionStatus < 0 && _vm->isFlag(kGFPlatypus)) { if (_vm->_grabCursorSpriteIndex == kItemDisguise) { _vm->gnapUseDisguiseOnPlatypus(); } else if (_vm->_grabCursorSpriteIndex >= 0) { @@ -1473,7 +1473,7 @@ void Scene04::run() { break; case kHS04Twig: - if (_vm->_gnapActionStatus < 0) { + if (_vm->_gnap->_actionStatus < 0) { if (_vm->_grabCursorSpriteIndex >= 0) { _vm->playGnapShowItem(_vm->_grabCursorSpriteIndex, 9, 6); } else { @@ -1497,7 +1497,7 @@ void Scene04::run() { break; case kHS04Axe: - if (_vm->_gnapActionStatus < 0) { + if (_vm->_gnap->_actionStatus < 0) { if (_vm->_grabCursorSpriteIndex >= 0) { _vm->playGnapShowCurrItem(_vm->_hotspotsWalkPos[3].x, _vm->_hotspotsWalkPos[3].y, 9, 5); } else { @@ -1508,7 +1508,7 @@ void Scene04::run() { 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->_gnapActionStatus = kAS04GrabAxe; + _vm->_gnap->_actionStatus = kAS04GrabAxe; _vm->setFlag(kGFPlatypusTalkingToAssistant); updateHotspots(); break; @@ -1522,7 +1522,7 @@ void Scene04::run() { break; case kHS04Dog: - if (_vm->_gnapActionStatus < 0) { + if (_vm->_gnap->_actionStatus < 0) { if (_vm->_grabCursorSpriteIndex >= 0) { _vm->playGnapShowCurrItem(_vm->_hotspotsWalkPos[2].x, _vm->_hotspotsWalkPos[2].y, 9, 7); } else { @@ -1536,7 +1536,7 @@ void Scene04::run() { 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)) - _vm->_gnapActionStatus = kAS04GrabDog; + _vm->_gnap->_actionStatus = kAS04GrabDog; break; case TALK_CURSOR: _vm->_gnap->_idleFacing = kDirBottomRight; @@ -1554,7 +1554,7 @@ void Scene04::run() { break; case kHS04Door: - if (_vm->_gnapActionStatus < 0) { + if (_vm->_gnap->_actionStatus < 0) { if (_vm->_grabCursorSpriteIndex >= 0) { _vm->playGnapShowCurrItem(_vm->_hotspotsWalkPos[_vm->_sceneClickedHotspot].x, _vm->_hotspotsWalkPos[_vm->_sceneClickedHotspot].y, 4, 3); } else { @@ -1566,13 +1566,13 @@ void Scene04::run() { case GRAB_CURSOR: if (_vm->_cursorValue == 1) { _vm->gnapWalkTo(_vm->_hotspotsWalkPos[4].x, _vm->_hotspotsWalkPos[4].y, 0, 0x107BC, 1); - _vm->_gnapActionStatus = kAS04OpenDoor; + _vm->_gnap->_actionStatus = kAS04OpenDoor; _vm->_timers[5] = 300; _vm->_gnap->_idleFacing = kDirUpLeft; } else { _vm->_isLeavingScene = true; _vm->gnapWalkTo(_vm->_hotspotsWalkPos[4].x, _vm->_hotspotsWalkPos[4].y, 0, 0x107BC, 1); - _vm->_gnapActionStatus = kAS04LeaveScene; + _vm->_gnap->_actionStatus = kAS04LeaveScene; _vm->_newSceneNum = 38; } break; @@ -1585,10 +1585,10 @@ void Scene04::run() { break; case kHS04ExitTruck: - if (_vm->_gnapActionStatus < 0) { + if (_vm->_gnap->_actionStatus < 0) { _vm->_isLeavingScene = true; _vm->gnapWalkTo(_vm->_hotspotsWalkPos[5].x, _vm->_hotspotsWalkPos[5].y, 0, 0x107AE, 1); - _vm->_gnapActionStatus = kAS04LeaveScene; + _vm->_gnap->_actionStatus = kAS04LeaveScene; if (_vm->isFlag(kGFPlatypus)) _vm->platypusWalkTo(_vm->_hotspotsWalkPos[5].x, _vm->_hotspotsWalkPos[5].y, -1, 0x107C7, 1); if (_vm->_cursorValue == 1) @@ -1599,7 +1599,7 @@ void Scene04::run() { break; case kHS04Window: - if (_vm->_gnapActionStatus < 0) { + if (_vm->_gnap->_actionStatus < 0) { if (_vm->_grabCursorSpriteIndex >= 0) { _vm->playGnapShowCurrItem(_vm->_hotspotsWalkPos[_vm->_sceneClickedHotspot].x, _vm->_hotspotsWalkPos[_vm->_sceneClickedHotspot].y, 2, 3); } else if (_vm->isFlag(kGFKeysTaken)) { @@ -1609,9 +1609,9 @@ void Scene04::run() { case LOOK_CURSOR: if (_vm->gnapWalkTo(_vm->_hotspotsWalkPos[7].x, _vm->_hotspotsWalkPos[7].y, 0, _vm->getGnapSequenceId(gskIdle, 10, 2) | 0x10000, 1)) { if (_triedWindow) { - _vm->_gnapActionStatus = kAS04GetKeyAnother; + _vm->_gnap->_actionStatus = kAS04GetKeyAnother; } else { - _vm->_gnapActionStatus = kAS04GetKeyFirst; + _vm->_gnap->_actionStatus = kAS04GetKeyFirst; _triedWindow = true; } } @@ -1629,10 +1629,10 @@ void Scene04::run() { break; case kHS04ExitBarn: - if (_vm->_gnapActionStatus < 0) { + if (_vm->_gnap->_actionStatus < 0) { _vm->_isLeavingScene = true; _vm->gnapWalkTo(_vm->_hotspotsWalkPos[8].x, _vm->_hotspotsWalkPos[8].y, 0, 0x107AB, 1); - _vm->_gnapActionStatus = kAS04LeaveScene; + _vm->_gnap->_actionStatus = kAS04LeaveScene; if (_vm->isFlag(kGFPlatypus)) _vm->platypusWalkTo(_vm->_hotspotsWalkPos[8].x, _vm->_hotspotsWalkPos[8].y + 1, -1, 0x107C1, 1); if (_vm->_cursorValue == 1) @@ -1644,12 +1644,12 @@ void Scene04::run() { case kHS04WalkArea1: case kHS04WalkArea2: - if (_vm->_gnapActionStatus < 0) + if (_vm->_gnap->_actionStatus < 0) _vm->gnapWalkTo(-1, -1, -1, -1, 1); break; default: - if (_vm->_mouseClickState._left && _vm->_gnapActionStatus < 0) { + if (_vm->_mouseClickState._left && _vm->_gnap->_actionStatus < 0) { _vm->gnapWalkTo(-1, -1, -1, -1, 1); _vm->_mouseClickState._left = false; } @@ -1663,13 +1663,13 @@ void Scene04::run() { _vm->playSound(0x1091C, true); if (!_vm->_isLeavingScene) { - if (_vm->_platypusActionStatus < 0 && _vm->isFlag(kGFPlatypus)) + if (_vm->_plat->_actionStatus < 0 && _vm->isFlag(kGFPlatypus)) _vm->updatePlatypusIdleSequence2(); - if (_vm->_gnapActionStatus < 0) + if (_vm->_gnap->_actionStatus < 0) _vm->updateGnapIdleSequence2(); if (!_vm->_timers[5]) { _vm->_timers[5] = _vm->getRandom(150) + 300; - if (_vm->_gnapActionStatus < 0) + if (_vm->_gnap->_actionStatus < 0) gameSys.insertSequence(0x20D, 79, 0, 0, kSeqNone, 0, 0, 0); } if (!_vm->_timers[7]) { @@ -1705,7 +1705,7 @@ void Scene04::updateAnimations() { if (gameSys.getAnimationStatus(0) == 2) { gameSys.setAnimation(0, 0, 0); - switch (_vm->_gnapActionStatus) { + switch (_vm->_gnap->_actionStatus) { case kAS04LeaveScene: _vm->_sceneDone = true; break; @@ -1719,18 +1719,18 @@ void Scene04::updateAnimations() { gameSys.setAnimation(0x107B5, _vm->_gnapId, 0); _vm->_gnapSequenceId = 0x7B5; _vm->_gnapSequenceDatNum = 1; - _vm->_gnapActionStatus = kAS04OpenDoorDone; + _vm->_gnap->_actionStatus = kAS04OpenDoorDone; break; case kAS04OpenDoorDone: gameSys.insertSequence(0x209, 121, 0x207, 121, kSeqSyncWait, 0, 0, 0); - _vm->_gnapActionStatus = -1; + _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; - _vm->_gnapActionStatus = kAS04GetKeyFirst2; + _vm->_gnap->_actionStatus = kAS04GetKeyFirst2; break; case kAS04GetKeyFirst2: gameSys.insertSequence(0x206, 255, makeRid(_vm->_gnapSequenceDatNum, _vm->_gnapSequenceId), _vm->_gnapId, kSeqSyncWait, 0, 0, 0); @@ -1739,7 +1739,7 @@ void Scene04::updateAnimations() { gameSys.setAnimation(0x20B, 256, 0); _vm->_gnapSequenceId = 0x206; _vm->_gnapSequenceDatNum = 0; - _vm->_gnapActionStatus = kAS04GetKeyFirstDone; + _vm->_gnap->_actionStatus = kAS04GetKeyFirstDone; break; case kAS04GetKeyFirstDone: gameSys.requestRemoveSequence(0x1FF, 256); @@ -1750,14 +1750,14 @@ void Scene04::updateAnimations() { _vm->_gnap->_idleFacing = kDirBottomRight; _vm->_gnapSequenceId = 0x7B5; _vm->_gnapSequenceDatNum = 1; - _vm->_gnapActionStatus = -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; - _vm->_gnapActionStatus = kAS04GetKeyAnother2; + _vm->_gnap->_actionStatus = kAS04GetKeyAnother2; break; case kAS04GetKeyAnother2: gameSys.insertSequence(0x203, 255, makeRid(_vm->_gnapSequenceDatNum, _vm->_gnapSequenceId), _vm->_gnapId, kSeqSyncWait, 0, 0, 0); @@ -1766,7 +1766,7 @@ void Scene04::updateAnimations() { gameSys.setAnimation(0x20A, 256, 0); _vm->_gnapSequenceId = 0x203; _vm->_gnapSequenceDatNum = 0; - _vm->_gnapActionStatus = kAS04GetKeyAnotherDone; + _vm->_gnap->_actionStatus = kAS04GetKeyAnotherDone; break; case kAS04GetKeyAnotherDone: gameSys.removeSequence(0x1FF, 256, true); @@ -1777,7 +1777,7 @@ void Scene04::updateAnimations() { _vm->_gnapSequenceId = 0x7B5; _vm->_gnapSequenceDatNum = 1; _vm->_gnap->_idleFacing = kDirBottomRight; - _vm->_gnapActionStatus = -1; + _vm->_gnap->_actionStatus = -1; break; case kAS04GrabDog: _nextDogSequenceId = 0x201; @@ -1787,10 +1787,10 @@ void Scene04::updateAnimations() { gameSys.requestRemoveSequence(0x212, 100); _vm->_gnapSequenceDatNum = 0; _vm->_gnapSequenceId = 0x211; - _vm->_gnapActionStatus = -1; + _vm->_gnap->_actionStatus = -1; break; default: - _vm->_gnapActionStatus = -1; + _vm->_gnap->_actionStatus = -1; break; } } @@ -1814,7 +1814,7 @@ void Scene04::updateAnimations() { _currDogSequenceId = 0x201; _vm->_gnapSequenceId = 0x200; _vm->_gnapSequenceDatNum = 0; - _vm->_gnapActionStatus = -1; + _vm->_gnap->_actionStatus = -1; _vm->_timers[6] = _vm->getRandom(20) + 60; _nextDogSequenceId = -1; } else if (_nextDogSequenceId != -1) { @@ -1909,14 +1909,14 @@ void Scene05::run() { switch (_vm->_sceneClickedHotspot) { case kHS05Device: - if (_vm->_gnapActionStatus < 0) { + if (_vm->_gnap->_actionStatus < 0) { _vm->runMenu(); updateHotspots(); } break; case kHS05Platypus: - if (_vm->_gnapActionStatus < 0 && _vm->isFlag(kGFPlatypus)) { + if (_vm->_gnap->_actionStatus < 0 && _vm->isFlag(kGFPlatypus)) { if (_vm->_grabCursorSpriteIndex == kItemDisguise) { _vm->gnapUseDisguiseOnPlatypus(); } else if (_vm->_grabCursorSpriteIndex >= 0) { @@ -1945,7 +1945,7 @@ void Scene05::run() { break; case kHS05Haystack: - if (_vm->_gnapActionStatus < 0 && _vm->_platypusActionStatus < 0) { + if (_vm->_gnap->_actionStatus < 0 && _vm->_plat->_actionStatus < 0) { if (_vm->_grabCursorSpriteIndex >= 0) { _vm->playGnapShowCurrItem(_vm->_hotspotsWalkPos[1].x - 2, _vm->_hotspotsWalkPos[1].y, 4, 5); } else if (_vm->isFlag(kGFNeedleTaken)) { @@ -1963,7 +1963,7 @@ void Scene05::run() { if (_vm->isFlag(kGFPlatypus)) { _vm->gnapUseDeviceOnPlatypus(); if (_vm->platypusWalkTo(_vm->_hotspotsWalkPos[1].x, _vm->_hotspotsWalkPos[1].y, 1, 0x107C2, 1)) { - _vm->_platypusActionStatus = kAS05PlatSearchHaystack; + _vm->_plat->_actionStatus = kAS05PlatSearchHaystack; _vm->_plat->_idleFacing = kDirUnk4; } if (_vm->_gnap->_pos.x == 4 && (_vm->_gnap->_pos.y == 8 || _vm->_gnap->_pos.y == 7)) @@ -1977,12 +1977,12 @@ void Scene05::run() { break; case kHS05Chicken: - if (_vm->_gnapActionStatus < 0) { + if (_vm->_gnap->_actionStatus < 0) { 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); - _vm->_gnapActionStatus = kAS05UseTwigWithChicken; + _vm->_gnap->_actionStatus = kAS05UseTwigWithChicken; } else if (_vm->_grabCursorSpriteIndex >= 0) { _vm->playGnapShowCurrItem(_vm->_hotspotsWalkPos[_vm->_sceneClickedHotspot].x, _vm->_hotspotsWalkPos[_vm->_sceneClickedHotspot].y + 1, 9, 7); } else { @@ -1993,12 +1993,12 @@ void Scene05::run() { 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->_gnapActionStatus = kAS05GrabChicken; + _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->_gnapActionStatus = kAS05TalkChicken; + _vm->_gnap->_actionStatus = kAS05TalkChicken; break; case PLAT_CURSOR: _vm->playGnapImpossible(0, 0); @@ -2009,7 +2009,7 @@ void Scene05::run() { break; case kHS05Ladder: - if (_vm->_gnapActionStatus < 0) { + if (_vm->_gnap->_actionStatus < 0) { if (_vm->_grabCursorSpriteIndex >= 0) { _vm->playGnapShowCurrItem(_vm->_hotspotsWalkPos[_vm->_sceneClickedHotspot].x, _vm->_hotspotsWalkPos[_vm->_sceneClickedHotspot].y, 2, 5); } else { @@ -2020,7 +2020,7 @@ void Scene05::run() { 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->_gnapActionStatus = kAS05GrabLadder; + _vm->_gnap->_actionStatus = kAS05GrabLadder; break; case TALK_CURSOR: case PLAT_CURSOR: @@ -2035,16 +2035,16 @@ void Scene05::run() { if (_vm->isFlag(kGFBarnPadlockOpen)) { _vm->_isLeavingScene = true; _vm->gnapWalkTo(_vm->_hotspotsWalkPos[2].x - 1, _vm->_hotspotsWalkPos[2].y + 1, 0, -1, 1); - _vm->_gnapActionStatus = kAS05EnterBarn; + _vm->_gnap->_actionStatus = kAS05EnterBarn; if (_vm->_cursorValue == 1) _vm->_newSceneNum = 6; else _vm->_newSceneNum = 36; - } else if (_vm->_gnapActionStatus < 0) { + } 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->_gnapActionStatus = kAS05PickPadlock; + _vm->_gnap->_actionStatus = kAS05PickPadlock; } else if (_vm->_grabCursorSpriteIndex >= 0) { _vm->playGnapShowCurrItem(_vm->_hotspotsWalkPos[2].x, _vm->_hotspotsWalkPos[2].y, 7, 4); } else { @@ -2056,7 +2056,7 @@ void Scene05::run() { _vm->_gnap->_idleFacing = kDirUpRight; _vm->gnapWalkTo(_vm->_hotspotsWalkPos[_vm->_sceneClickedHotspot].x, _vm->_hotspotsWalkPos[_vm->_sceneClickedHotspot].y, 0, _vm->getGnapSequenceId(gskIdle, 0, 0) | 0x10000, 1); - _vm->_gnapActionStatus = kAS05TryPickPadlock; + _vm->_gnap->_actionStatus = kAS05TryPickPadlock; break; case TALK_CURSOR: case PLAT_CURSOR: @@ -2068,10 +2068,10 @@ void Scene05::run() { break; case kHS05ExitHouse: - if (_vm->_gnapActionStatus < 0) { + if (_vm->_gnap->_actionStatus < 0) { _vm->_isLeavingScene = true; _vm->gnapWalkTo(_vm->_hotspotsWalkPos[4].x, _vm->_hotspotsWalkPos[4].y, 0, 0x107AF, 1); - _vm->_gnapActionStatus = kAS05LeaveScene; + _vm->_gnap->_actionStatus = kAS05LeaveScene; if (_vm->isFlag(kGFPlatypus)) _vm->platypusWalkTo(_vm->_hotspotsWalkPos[4].x, _vm->_hotspotsWalkPos[4].y + 1, -1, 0x107C7, 1); if (_vm->_cursorValue == 1) @@ -2083,7 +2083,7 @@ void Scene05::run() { case kHS05WalkArea1: case kHS05WalkArea2: - if (_vm->_gnapActionStatus < 0) + if (_vm->_gnap->_actionStatus < 0) _vm->gnapWalkTo(-1, -1, -1, -1, 1); break; @@ -2092,7 +2092,7 @@ void Scene05::run() { break; default: - if (_vm->_mouseClickState._left && _vm->_gnapActionStatus < 0) { + if (_vm->_mouseClickState._left && _vm->_gnap->_actionStatus < 0) { _vm->gnapWalkTo(-1, -1, -1, -1, 1); _vm->_mouseClickState._left = false; } @@ -2111,7 +2111,7 @@ void Scene05::run() { _vm->updateGnapIdleSequence(); if (!_vm->_timers[5]) { _vm->_timers[5] = _vm->getRandom(20) + 30; - if (_vm->_gnapActionStatus != kAS05TalkChicken && _nextChickenSequenceId == -1) { + if (_vm->_gnap->_actionStatus != kAS05TalkChicken && _nextChickenSequenceId == -1) { if (_vm->getRandom(4) != 0) _nextChickenSequenceId = 0x142; else @@ -2120,7 +2120,7 @@ void Scene05::run() { } if (!_vm->_timers[6]) { _vm->_timers[6] = _vm->getRandom(150) + 300; - if (_vm->_gnapActionStatus < 0) + if (_vm->_gnap->_actionStatus < 0) gameSys.insertSequence(0x149, 39, 0, 0, kSeqNone, 0, 0, 0); } _vm->playSoundC(); @@ -2144,16 +2144,16 @@ void Scene05::updateAnimations() { if (gameSys.getAnimationStatus(0) == 2) { gameSys.setAnimation(0, 0, 0); - switch (_vm->_gnapActionStatus) { + switch (_vm->_gnap->_actionStatus) { case kAS05LeaveScene: _vm->_sceneDone = true; - _vm->_gnapActionStatus = -1; + _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; - _vm->_gnapActionStatus = -1; + _vm->_gnap->_actionStatus = -1; break; case kAS05PickPadlock: gameSys.setAnimation(0x147, _vm->_gnapId, 0); @@ -2166,11 +2166,11 @@ void Scene05::updateAnimations() { _vm->_newSceneNum = 6; _vm->_timers[2] = 100; _vm->invRemove(kItemNeedle); - _vm->_gnapActionStatus = kAS05LeaveScene; + _vm->_gnap->_actionStatus = kAS05LeaveScene; break; case kAS05TalkChicken: _nextChickenSequenceId = 0x144; - _vm->_gnapActionStatus = -1; + _vm->_gnap->_actionStatus = -1; break; case kAS05GrabChicken: _nextChickenSequenceId = 0x14B; @@ -2184,19 +2184,19 @@ void Scene05::updateAnimations() { _vm->_gnapSequenceDatNum = 0; _vm->_timers[2] = 200; _vm->_timers[6] = 300; - _vm->_gnapActionStatus = -1; + _vm->_gnap->_actionStatus = -1; break; case kAS05EnterBarn: gameSys.insertSequence(0x107B1, 1, makeRid(_vm->_gnapSequenceDatNum, _vm->_gnapSequenceId), _vm->_gnapId, kSeqSyncWait, 0, 75 * _vm->_gnap->_pos.x - _vm->_gnapGridX, 48 * _vm->_gnap->_pos.y - _vm->_gnapGridY); gameSys.setAnimation(0x107B1, 1, 0); - _vm->_gnapActionStatus = kAS05LeaveScene; + _vm->_gnap->_actionStatus = kAS05LeaveScene; break; case kAS05UseTwigWithChicken: _vm->playGnapShowItem(5, 0, 0); _nextChickenSequenceId = 0x14F; - _vm->_gnapActionStatus = -1; + _vm->_gnap->_actionStatus = -1; break; } } @@ -2213,9 +2213,9 @@ void Scene05::updateAnimations() { _vm->setGrabCursorSprite(kItemNeedle); _vm->showCursor(); _vm->_timers[1] = 30; - _vm->_platypusActionStatus = -1; + _vm->_plat->_actionStatus = -1; } - if (_vm->_platypusActionStatus == kAS05PlatSearchHaystack) { + 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); @@ -2237,7 +2237,7 @@ void Scene05::updateAnimations() { _vm->_gnapSequenceId = 0x14C; _currChickenSequenceId = _nextChickenSequenceId; _nextChickenSequenceId = -1; - _vm->_gnapActionStatus = -1; + _vm->_gnap->_actionStatus = -1; } else if (_nextChickenSequenceId != -1) { gameSys.setAnimation(_nextChickenSequenceId, 100, 3); gameSys.insertSequence(_nextChickenSequenceId, 100, _currChickenSequenceId, 100, kSeqSyncWait, 0, 0, 0); @@ -2333,14 +2333,14 @@ void Scene06::run() { switch (_vm->_sceneClickedHotspot) { case kHS06Device: - if (_vm->_gnapActionStatus < 0) { + if (_vm->_gnap->_actionStatus < 0) { _vm->runMenu(); updateHotspots(); } break; case kHS06Platypus: - if (_vm->_gnapActionStatus < 0) { + if (_vm->_gnap->_actionStatus < 0) { if (_vm->_grabCursorSpriteIndex == kItemDisguise) { _vm->gnapUseDisguiseOnPlatypus(); } else if (_vm->_grabCursorSpriteIndex >= 0) { @@ -2369,7 +2369,7 @@ void Scene06::run() { break; case kHS06Gas: - if (_vm->_gnapActionStatus < 0) { + if (_vm->_gnap->_actionStatus < 0) { if (_vm->_grabCursorSpriteIndex >= 0) { _vm->playGnapShowCurrItem(_vm->_hotspotsWalkPos[_vm->_sceneClickedHotspot].x, _vm->_hotspotsWalkPos[_vm->_sceneClickedHotspot].y, 5, 0); } else { @@ -2384,7 +2384,7 @@ void Scene06::run() { _vm->_hotspots[kHS06WalkArea5]._flags |= SF_WALKABLE; _vm->gnapWalkTo(_vm->_hotspotsWalkPos[1].x, _vm->_hotspotsWalkPos[1].y, 0, 0x107BC, 1); _vm->_hotspots[kHS06WalkArea5]._flags &= ~SF_WALKABLE; - _vm->_gnapActionStatus = kAS06TryToGetGas; + _vm->_gnap->_actionStatus = kAS06TryToGetGas; } else { triedDeviceOnGas = true; _vm->playGnapPullOutDeviceNonWorking(_vm->_hotspotsWalkPos[1].x, _vm->_hotspotsWalkPos[1].y); @@ -2403,7 +2403,7 @@ void Scene06::run() { break; case kHS06Ladder: - if (_vm->_gnapActionStatus < 0) { + if (_vm->_gnap->_actionStatus < 0) { if (_vm->_grabCursorSpriteIndex >= 0) { _vm->playGnapShowCurrItem(_vm->_hotspotsWalkPos[_vm->_sceneClickedHotspot].x, _vm->_hotspotsWalkPos[_vm->_sceneClickedHotspot].y, 8, 4); } else { @@ -2416,7 +2416,7 @@ void Scene06::run() { _vm->playGnapImpossible(0, 0); else { _vm->gnapWalkTo(_vm->_hotspotsWalkPos[2].x, _vm->_hotspotsWalkPos[2].y, 0, 0x107BB, 1); - _vm->_gnapActionStatus = kAS06TryToClimbLadder; + _vm->_gnap->_actionStatus = kAS06TryToClimbLadder; _vm->setFlag(kGFGasTaken); } break; @@ -2430,7 +2430,7 @@ void Scene06::run() { break; case kHS06Horse: - if (_vm->_gnapActionStatus < 0) { + if (_vm->_gnap->_actionStatus < 0) { if (_vm->_grabCursorSpriteIndex == kItemTwig && _horseTurnedBack) { _vm->_hotspots[kHS06WalkArea5]._flags |= SF_WALKABLE; _vm->gnapWalkTo(_vm->_hotspotsWalkPos[3].x, _vm->_hotspotsWalkPos[3].y, 0, 0x107BC, 1); @@ -2438,7 +2438,7 @@ void Scene06::run() { _vm->_gnap->_idleFacing = kDirUpLeft; _vm->platypusWalkTo(6, 8, 1, 0x107C2, 1); _vm->_plat->_idleFacing = kDirNone; - _vm->_gnapActionStatus = kAS06UseTwigOnHorse; + _vm->_gnap->_actionStatus = kAS06UseTwigOnHorse; _vm->setGrabCursorSprite(-1); } else if (_vm->_grabCursorSpriteIndex >= 0) { _vm->playGnapShowCurrItem(_vm->_hotspotsWalkPos[_vm->_sceneClickedHotspot].x, _vm->_hotspotsWalkPos[_vm->_sceneClickedHotspot].y, 3, 2); @@ -2455,7 +2455,7 @@ void Scene06::run() { _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->_hotspots[kHS06WalkArea5]._flags &= ~SF_WALKABLE; - _vm->_gnapActionStatus = kAS06TalkToHorse; + _vm->_gnap->_actionStatus = kAS06TalkToHorse; } break; case GRAB_CURSOR: @@ -2468,10 +2468,10 @@ void Scene06::run() { break; case kHS06ExitOutsideBarn: - if (_vm->_gnapActionStatus < 0) { + if (_vm->_gnap->_actionStatus < 0) { _vm->_isLeavingScene = true; _vm->gnapWalkTo(_vm->_hotspotsWalkPos[4].x, _vm->_hotspotsWalkPos[4].y, 0, 0x107AE, 1); - _vm->_gnapActionStatus = kAS06LeaveScene; + _vm->_gnap->_actionStatus = kAS06LeaveScene; if (_vm->_cursorValue == 1) _vm->_newSceneNum = 5; else @@ -2484,12 +2484,12 @@ void Scene06::run() { case kHS06WalkArea3: case kHS06WalkArea4: case kHS06WalkArea5: - if (_vm->_gnapActionStatus < 0) + if (_vm->_gnap->_actionStatus < 0) _vm->gnapWalkTo(-1, -1, -1, -1, 1); break; default: - if (_vm->_mouseClickState._left && _vm->_gnapActionStatus < 0) { + if (_vm->_mouseClickState._left && _vm->_gnap->_actionStatus < 0) { _vm->gnapWalkTo(-1, -1, -1, -1, 1); _vm->_mouseClickState._left = false; } @@ -2500,13 +2500,13 @@ void Scene06::run() { updateAnimations(); if (!_vm->_isLeavingScene) { - if (_vm->_platypusActionStatus < 0) + if (_vm->_plat->_actionStatus < 0) _vm->updatePlatypusIdleSequence(); - if (_vm->_gnapActionStatus < 0) + if (_vm->_gnap->_actionStatus < 0) _vm->updateGnapIdleSequence(); if (!_vm->_timers[4]) { _vm->_timers[4] = _vm->getRandom(40) + 25; - if (_vm->_gnapActionStatus < 0 && _vm->_platypusActionStatus < 0 && _nextHorseSequenceId == -1) { + if (_vm->_gnap->_actionStatus < 0 && _vm->_plat->_actionStatus < 0 && _nextHorseSequenceId == -1) { if (_horseTurnedBack) { _nextHorseSequenceId = 0xF5; } else { @@ -2546,16 +2546,16 @@ void Scene06::updateAnimations() { if (gameSys.getAnimationStatus(0) == 2) { gameSys.setAnimation(0, 0, 0); - switch (_vm->_gnapActionStatus) { + switch (_vm->_gnap->_actionStatus) { case kAS06LeaveScene: _vm->_sceneDone = true; - _vm->_gnapActionStatus = -1; + _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; - _vm->_gnapActionStatus = -1; + _vm->_gnap->_actionStatus = -1; break; case kAS06TryToClimbLadder: gameSys.insertSequence(0xFF, 20, 0xFE, 20, kSeqSyncWait, 0, 0, 0); @@ -2563,11 +2563,11 @@ void Scene06::updateAnimations() { gameSys.insertSequence(0xFD, _vm->_gnapId, makeRid(_vm->_gnapSequenceDatNum, _vm->_gnapSequenceId), _vm->_gnapId, kSeqSyncWait, 0, 0, 0); _vm->_gnapSequenceId = 0xFD; _vm->_gnapSequenceDatNum = 0; - _vm->_gnapActionStatus = kAS06TryToClimbLadderDone; + _vm->_gnap->_actionStatus = kAS06TryToClimbLadderDone; break; case kAS06TryToClimbLadderDone: _vm->_gnap->_pos = Common::Point(6, 7); - _vm->_gnapActionStatus = -1; + _vm->_gnap->_actionStatus = -1; break; case kAS06TalkToHorse: _nextHorseSequenceId = 0xF6; @@ -2576,7 +2576,7 @@ void Scene06::updateAnimations() { _nextPlatSequenceId = 0xFB; break; default: - _vm->_gnapActionStatus = -1; + _vm->_gnap->_actionStatus = -1; break; } } @@ -2589,19 +2589,19 @@ void Scene06::updateAnimations() { _vm->setFlag(kGFGasTaken); _vm->_hotspots[kHS06Ladder]._flags = SF_DISABLED; _vm->setGrabCursorSprite(kItemGas); - _vm->_platypusActionStatus = -1; + _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; _vm->setFlag(kGFUnk04); - _vm->_gnapActionStatus = -1; + _vm->_gnap->_actionStatus = -1; _vm->showCursor(); } if (_nextPlatSequenceId == 0xFB) { gameSys.setAnimation(0, 0, 1); _nextHorseSequenceId = 0xF2; - _vm->_platypusActionStatus = 6; + _vm->_plat->_actionStatus = 6; } } @@ -2633,7 +2633,7 @@ void Scene06::updateAnimations() { _horseTurnedBack = true; _currHorseSequenceId = _nextHorseSequenceId; _nextHorseSequenceId = -1; - _vm->_gnapActionStatus = -1; + _vm->_gnap->_actionStatus = -1; break; default: gameSys.setAnimation(_nextHorseSequenceId, 120, 2); @@ -2692,7 +2692,7 @@ void Scene07::run() { _vm->_gnap->_idleFacing = kDirBottomRight; gameSys.insertSequence(0x8F, 140, 0, 0, kSeqNone, 0, 0, 0); gameSys.setAnimation(makeRid(_vm->_gnapSequenceDatNum, _vm->_gnapSequenceId), _vm->_gnapId, 0); - _vm->_gnapActionStatus = kAS07Wait; + _vm->_gnap->_actionStatus = kAS07Wait; _vm->_plat->_pos = Common::Point(3, 8); _vm->_platypusId = 160; _vm->_platypusSequenceId = 0x91; @@ -2742,7 +2742,7 @@ void Scene07::run() { _vm->gnapWalkTo(_vm->_gnap->_pos.x, 7, 0, 0x107AD, 1); else _vm->gnapWalkTo(8, 7, 0, 0x107AD, 1); - _vm->_gnapActionStatus = kAS07LeaveScene; + _vm->_gnap->_actionStatus = kAS07LeaveScene; break; case kHS07Dice: @@ -2774,7 +2774,7 @@ void Scene07::run() { break; case kHS07Device: - if (_vm->_gnapActionStatus < 0) { + if (_vm->_gnap->_actionStatus < 0) { _vm->runMenu(); updateHotspots(); _vm->_timers[4] = _vm->getRandom(40) + 50; @@ -2802,7 +2802,7 @@ void Scene07::run() { if (!_vm->_isLeavingScene) { _vm->updateGnapIdleSequence(); - if (_vm->_platypusActionStatus < 0 && _vm->_gnapActionStatus < 0) { + if (_vm->_plat->_actionStatus < 0 && _vm->_gnap->_actionStatus < 0) { if (_vm->_timers[0]) { if (!_vm->_timers[1]) { _vm->_timers[1] = _vm->getRandom(20) + 30; @@ -2859,13 +2859,13 @@ void Scene07::updateAnimations() { if (gameSys.getAnimationStatus(0) == 2) { gameSys.setAnimation(0, 0, 0); - switch (_vm->_gnapActionStatus) { + switch (_vm->_gnap->_actionStatus) { case kAS07LeaveScene: _vm->_newSceneNum = 8; _vm->_sceneDone = true; break; } - _vm->_gnapActionStatus = -1; + _vm->_gnap->_actionStatus = -1; } if (gameSys.getAnimationStatus(2) == 2) { @@ -2975,7 +2975,7 @@ void Scene08::run() { switch (_vm->_sceneClickedHotspot) { case kHS08Device: - if (_vm->_gnapActionStatus < 0) { + if (_vm->_gnap->_actionStatus < 0) { _vm->runMenu(); updateHotspots(); _vm->_timers[4] = _vm->getRandom(50) + 75; @@ -3012,7 +3012,7 @@ void Scene08::run() { _vm->_isLeavingScene = true; _vm->gnapActionIdle(0x14D); _vm->gnapWalkTo(0, 6, 0, 0x107AF, 1); - _vm->_gnapActionStatus = kAS08LeaveScene; + _vm->_gnap->_actionStatus = kAS08LeaveScene; _vm->platypusWalkTo(0, 7, 1, 0x107CF, 1); _vm->_newSceneNum = 9; break; @@ -3021,7 +3021,7 @@ void Scene08::run() { _vm->_isLeavingScene = true; _vm->gnapActionIdle(0x14D); _vm->gnapWalkTo(3, 9, 0, 0x107AE, 1); - _vm->_gnapActionStatus = kAS08LeaveScene; + _vm->_gnap->_actionStatus = kAS08LeaveScene; _vm->platypusWalkTo(4, 9, 1, 0x107C1, 1); _vm->_newSceneNum = 7; break; @@ -3034,7 +3034,7 @@ void Scene08::run() { case LOOK_CURSOR: _vm->gnapActionIdle(0x14D); _vm->gnapWalkTo(6, 6, 0, 0x107BB, 1); - _vm->_gnapActionStatus = kAS08LookMan; + _vm->_gnap->_actionStatus = kAS08LookMan; _vm->_gnap->_idleFacing = kDirUpRight; break; case GRAB_CURSOR: @@ -3044,13 +3044,13 @@ void Scene08::run() { _vm->_gnap->_idleFacing = kDirUpLeft; _vm->gnapActionIdle(0x14D); _vm->gnapWalkTo(8, 6, 0, _vm->getGnapSequenceId(gskBrainPulsating, 0, 0) | 0x10000, 1); - _vm->_gnapActionStatus = kAS08TalkMan; + _vm->_gnap->_actionStatus = kAS08TalkMan; break; case PLAT_CURSOR: _vm->gnapActionIdle(0x14D); _vm->gnapUseDeviceOnPlatypus(); _vm->platypusWalkTo(6, 6, 1, 0x107C2, 1); - _vm->_platypusActionStatus = kAS08PlatWithMan; + _vm->_plat->_actionStatus = kAS08PlatWithMan; _vm->_plat->_idleFacing = kDirNone; _vm->playGnapIdle(6, 6); break; @@ -3062,31 +3062,31 @@ void Scene08::run() { if (_vm->_grabCursorSpriteIndex >= 0) { _vm->playGnapShowCurrItem(4, 7, 5, 0); gameSys.setAnimation(makeRid(_vm->_gnapSequenceDatNum, _vm->_gnapSequenceId), _vm->_gnapId, 0); - _vm->_gnapActionStatus = kAS08GrabDog; + _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); - _vm->_gnapActionStatus = kAS08LookDog; + _vm->_gnap->_actionStatus = kAS08LookDog; break; case GRAB_CURSOR: _vm->gnapWalkTo(4, 7, 0, 0x107BB, 1); - _vm->_gnapActionStatus = kAS08GrabDog; + _vm->_gnap->_actionStatus = kAS08GrabDog; _vm->_gnap->_idleFacing = kDirUpRight; break; case TALK_CURSOR: _vm->_gnap->_idleFacing = kDirUpRight; _vm->gnapActionIdle(0x14D); _vm->gnapWalkTo(4, 7, 0, _vm->getGnapSequenceId(gskBrainPulsating, 0, 0) | 0x10000, 1); - _vm->_gnapActionStatus = kAS08TalkDog; + _vm->_gnap->_actionStatus = kAS08TalkDog; break; case PLAT_CURSOR: _vm->setFlag(kGFSceneFlag1); _vm->gnapActionIdle(0x14D); _vm->gnapUseDeviceOnPlatypus(); _vm->platypusWalkTo(3, 7, 1, 0x107C2, 1); - _vm->_platypusActionStatus = kAS08PlatWithDog; + _vm->_plat->_actionStatus = kAS08PlatWithDog; _vm->_plat->_idleFacing = kDirNone; _vm->playGnapIdle(3, 7); break; @@ -3194,7 +3194,7 @@ void Scene08::run() { _vm->updateGnapIdleSequence(); if (!_vm->_timers[4]) { _vm->_timers[4] = _vm->getRandom(50) + 125; - if (_vm->_gnapActionStatus < 0 && _vm->_platypusActionStatus < 0 && _nextManSequenceId == -1 && + if (_vm->_gnap->_actionStatus < 0 && _vm->_plat->_actionStatus < 0 && _nextManSequenceId == -1 && (_currDogSequenceId == 0x134 || _currDogSequenceId == 0x135)) { int _gnapRandomValue = _vm->getRandom(4); switch (_gnapRandomValue) { @@ -3235,49 +3235,49 @@ void Scene08::updateAnimations() { if (gameSys.getAnimationStatus(0) == 2) { gameSys.setAnimation(0, 0, 0); - switch (_vm->_gnapActionStatus) { + switch (_vm->_gnap->_actionStatus) { case kAS08LeaveScene: _vm->_sceneDone = true; - _vm->_gnapActionStatus = -1; + _vm->_gnap->_actionStatus = -1; break; case kAS08TalkMan: _nextManSequenceId = 0x13F; - _vm->_gnapActionStatus = -1; + _vm->_gnap->_actionStatus = -1; break; case kAS08LookMan: _nextManSequenceId = 0x140; - _vm->_gnapActionStatus = -1; + _vm->_gnap->_actionStatus = -1; break; case kAS08LookDog: _nextManSequenceId = 0x137; - _vm->_gnapActionStatus = -1; + _vm->_gnap->_actionStatus = -1; break; case kAS08GrabDog: if (_currDogSequenceId == 0x135) _nextDogSequenceId = 0x133; else _nextDogSequenceId = 0x13C; - _vm->_gnapActionStatus = -1; + _vm->_gnap->_actionStatus = -1; break; case kAS08TalkDog: if (_currDogSequenceId == 0x135) _nextDogSequenceId = 0x133; else _nextDogSequenceId = 0x13C; - _vm->_gnapActionStatus = -1; + _vm->_gnap->_actionStatus = -1; break; } } if (gameSys.getAnimationStatus(1) == 2) { gameSys.setAnimation(0, 0, 1); - switch (_vm->_platypusActionStatus) { + switch (_vm->_plat->_actionStatus) { case kAS08PlatWithDog: _nextDogSequenceId = 0x147; break; case kAS08PlatWithMan: _nextManSequenceId = 0x140; - _vm->_platypusActionStatus = -1; + _vm->_plat->_actionStatus = -1; break; } } @@ -3291,7 +3291,7 @@ void Scene08::updateAnimations() { if (gameSys.getAnimationStatus(3) == 2) { if (_currDogSequenceId == 0x147) - _vm->_platypusActionStatus = -1; + _vm->_plat->_actionStatus = -1; if (_currDogSequenceId == 0x149 || _currDogSequenceId == 0x14A || _currDogSequenceId == 0x14B) { if (_vm->getRandom(2) != 0) _nextManSequenceId = 0x13D; @@ -3347,7 +3347,7 @@ void Scene08::updateAnimations() { _vm->_gnapSequenceId = 0x14D; _vm->_gnap->_idleFacing = kDirUpRight; _vm->_gnapSequenceDatNum = 0; - _vm->_gnapActionStatus = -1; + _vm->_gnap->_actionStatus = -1; } } } @@ -3411,7 +3411,7 @@ void Scene09::run() { switch (_vm->_sceneClickedHotspot) { case kHS09Device: - if (_vm->_gnapActionStatus < 0) { + if (_vm->_gnap->_actionStatus < 0) { _vm->runMenu(); updateHotspots(); _vm->_timers[4] = _vm->getRandom(150) + 50; @@ -3440,7 +3440,7 @@ void Scene09::run() { _vm->_isLeavingScene = true; _vm->_newSceneNum = 10; _vm->gnapWalkTo(4, 7, 0, 0x107BF, 1); - _vm->_gnapActionStatus = kAS09LeaveScene; + _vm->_gnap->_actionStatus = kAS09LeaveScene; _vm->platypusWalkTo(4, 8, -1, 0x107D2, 1); _vm->_plat->_idleFacing = kDirUnk4; break; @@ -3449,7 +3449,7 @@ void Scene09::run() { _vm->_isLeavingScene = true; _vm->_newSceneNum = 8; _vm->gnapWalkTo(10, -1, 0, 0x107AB, 1); - _vm->_gnapActionStatus = kAS09LeaveScene; + _vm->_gnap->_actionStatus = kAS09LeaveScene; _vm->platypusWalkTo(10, -1, -1, 0x107CD, 1); _vm->_plat->_idleFacing = kDirUnk4; break; @@ -3463,7 +3463,7 @@ void Scene09::run() { _vm->playGnapScratchingHead(8, 3); break; case GRAB_CURSOR: - _vm->_gnapActionStatus = kAS09SearchTrash; + _vm->_gnap->_actionStatus = kAS09SearchTrash; _vm->gnapWalkTo(9, 6, 0, 0x107BC, 1); break; case TALK_CURSOR: @@ -3490,7 +3490,7 @@ void Scene09::run() { updateAnimations(); - if (!_vm->_isLeavingScene && _vm->_gnapActionStatus != 1 && _vm->_gnapActionStatus != 2) { + if (!_vm->_isLeavingScene && _vm->_gnap->_actionStatus != 1 && _vm->_gnap->_actionStatus != 2) { _vm->updatePlatypusIdleSequence(); _vm->updateGnapIdleSequence(); if (!_vm->_timers[4]) { @@ -3522,10 +3522,10 @@ void Scene09::updateAnimations() { if (gameSys.getAnimationStatus(0) == 2) { gameSys.setAnimation(0, 0, 0); - switch (_vm->_gnapActionStatus) { + switch (_vm->_gnap->_actionStatus) { case kAS09LeaveScene: _vm->_sceneDone = true; - _vm->_gnapActionStatus = -1; + _vm->_gnap->_actionStatus = -1; break; case kAS09SearchTrash: gameSys.setAnimation(0x4C, 120, 0); @@ -3536,13 +3536,13 @@ void Scene09::updateAnimations() { _vm->_gnap->_idleFacing = kDirUpLeft; _vm->_gnapSequenceDatNum = 0; _vm->_gnap->_pos = Common::Point(9, 6); - _vm->_gnapActionStatus = kAS09SearchTrashDone; + _vm->_gnap->_actionStatus = kAS09SearchTrashDone; break; case kAS09SearchTrashDone: gameSys.insertSequence(0x4B, 2, 0, 0, kSeqNone, 0, 0, 0); _vm->_timers[2] = 360; _vm->_timers[4] = _vm->getRandom(150) + 100; - _vm->_gnapActionStatus = -1; + _vm->_gnap->_actionStatus = -1; break; } } diff --git a/engines/gnap/scenes/group1.cpp b/engines/gnap/scenes/group1.cpp index e2d0e9685a..6aca6434ed 100644 --- a/engines/gnap/scenes/group1.cpp +++ b/engines/gnap/scenes/group1.cpp @@ -133,7 +133,7 @@ void Scene10::run() { _vm->_isLeavingScene = true; _vm->gnapActionIdle(0x10C); _vm->gnapWalkTo(0, 7, 0, 0x107AF, 1); - _vm->_gnapActionStatus = kAS10LeaveScene; + _vm->_gnap->_actionStatus = kAS10LeaveScene; _vm->platypusWalkTo(0, 7, -1, 0x107CF, 1); _vm->_newSceneNum = 11; break; @@ -142,7 +142,7 @@ void Scene10::run() { _vm->_isLeavingScene = true; _vm->gnapActionIdle(0x10C); _vm->gnapWalkTo(2, 9, 0, 0x107AE, 1); - _vm->_gnapActionStatus = kAS10LeaveScene; + _vm->_gnap->_actionStatus = kAS10LeaveScene; _vm->platypusWalkTo(3, 9, -1, 0x107C7, 1); _vm->_newSceneNum = 9; break; @@ -151,7 +151,7 @@ void Scene10::run() { if (_vm->_grabCursorSpriteIndex >= 0) { _vm->playGnapShowCurrItem(4, 8, 6, 0); gameSys.setAnimation(makeRid(_vm->_gnapSequenceDatNum, _vm->_gnapSequenceId), _vm->_gnapId, 0); - _vm->_gnapActionStatus = kAS10AnnoyCook; + _vm->_gnap->_actionStatus = kAS10AnnoyCook; } else { switch (_vm->_verbCursor) { case LOOK_CURSOR: @@ -165,14 +165,14 @@ void Scene10::run() { _vm->_gnap->_idleFacing = kDirUpRight; _vm->gnapActionIdle(0x10C); _vm->gnapWalkTo(4, 8, 0, _vm->getGnapSequenceId(gskBrainPulsating, 0, 0) | 0x10000, 1); - _vm->_gnapActionStatus = kAS10AnnoyCook; + _vm->_gnap->_actionStatus = kAS10AnnoyCook; break; case PLAT_CURSOR: _vm->gnapActionIdle(0x10C); _vm->gnapUseDeviceOnPlatypus(); _vm->platypusWalkTo(4, 6, -1, -1, 1); _vm->gnapWalkTo(4, 8, 0, 0x107BB, 1); - _vm->_gnapActionStatus = kAS10AnnoyCook; + _vm->_gnap->_actionStatus = kAS10AnnoyCook; break; } } @@ -195,7 +195,7 @@ void Scene10::run() { else { _vm->gnapActionIdle(0x10C); _vm->gnapWalkTo(4, 8, 0, 0x107BB, 1); - _vm->_gnapActionStatus = kAS10AnnoyCook; + _vm->_gnap->_actionStatus = kAS10AnnoyCook; } break; case TALK_CURSOR: @@ -209,7 +209,7 @@ void Scene10::run() { _vm->gnapUseDeviceOnPlatypus(); _vm->platypusWalkTo(3, 7, -1, -1, 1); _vm->gnapWalkTo(4, 8, 0, 0x107BB, 1); - _vm->_gnapActionStatus = kAS10AnnoyCook; + _vm->_gnap->_actionStatus = kAS10AnnoyCook; } break; } @@ -227,7 +227,7 @@ void Scene10::run() { case GRAB_CURSOR: _vm->gnapActionIdle(0x10C); _vm->gnapWalkTo(4, 8, 0, 0x107BB, 1); - _vm->_gnapActionStatus = kAS10AnnoyCook; + _vm->_gnap->_actionStatus = kAS10AnnoyCook; break; case TALK_CURSOR: _vm->playGnapImpossible(0, 0); @@ -241,7 +241,7 @@ void Scene10::run() { _vm->gnapActionIdle(0x10C); _vm->gnapUseDeviceOnPlatypus(); _vm->platypusWalkTo(7, 6, 1, 0x107D2, 1); - _vm->_platypusActionStatus = kAS10PlatWithBox; + _vm->_plat->_actionStatus = kAS10PlatWithBox; _vm->_plat->_idleFacing = kDirUnk4; _vm->_largeSprite = gameSys.createSurface(0xC3); _vm->playGnapIdle(7, 6); @@ -287,7 +287,7 @@ void Scene10::run() { break; case kHS10Device: - if (_vm->_gnapActionStatus < 0) { + if (_vm->_gnap->_actionStatus < 0) { _vm->runMenu(); updateHotspots(); } @@ -345,7 +345,7 @@ void Scene10::updateAnimations() { if (gameSys.getAnimationStatus(0) == 2) { gameSys.setAnimation(0, 0, 0); - switch (_vm->_gnapActionStatus) { + switch (_vm->_gnap->_actionStatus) { case kAS10LeaveScene: _vm->_sceneDone = true; break; @@ -357,7 +357,7 @@ void Scene10::updateAnimations() { if (gameSys.getAnimationStatus(1) == 2) { gameSys.setAnimation(0, 0, 1); - switch (_vm->_platypusActionStatus) { + switch (_vm->_plat->_actionStatus) { case kAS10PlatWithBox: _nextCookSequenceId = 0x109; break; @@ -398,8 +398,8 @@ void Scene10::updateAnimations() { _vm->delayTicksCursor(5); _vm->deleteSurface(&_vm->_largeSprite); _vm->setGrabCursorSprite(kItemTongs); - if (_vm->_platypusActionStatus == kAS10PlatWithBox) - _vm->_platypusActionStatus = -1; + if (_vm->_plat->_actionStatus == kAS10PlatWithBox) + _vm->_plat->_actionStatus = -1; if (_vm->_gnap->_pos == Common::Point(4, 8)) _vm->gnapWalkStep(); break; @@ -413,7 +413,7 @@ void Scene10::updateAnimations() { case 0x106: { // TODO: Refactor into a if + a switch int rnd = _vm->getRandom(7); - if (_vm->_gnapActionStatus >= 0 || _vm->_platypusActionStatus >= 0) + if (_vm->_gnap->_actionStatus >= 0 || _vm->_plat->_actionStatus >= 0) _nextCookSequenceId = 0x106; else if (rnd == 0) _nextCookSequenceId = 0x104; @@ -427,7 +427,7 @@ void Scene10::updateAnimations() { } break; case 0x103: - if (_vm->_gnapActionStatus >= 0 || _vm->_platypusActionStatus >= 0) + if (_vm->_gnap->_actionStatus >= 0 || _vm->_plat->_actionStatus >= 0) _nextCookSequenceId = 0x106; else if (_vm->getRandom(7) == 0) _nextCookSequenceId = 0x104; @@ -435,7 +435,7 @@ void Scene10::updateAnimations() { _nextCookSequenceId = 0x106; break; case 0x104: - if (_vm->_gnapActionStatus >= 0 || _vm->_platypusActionStatus >= 0) + if (_vm->_gnap->_actionStatus >= 0 || _vm->_plat->_actionStatus >= 0) _nextCookSequenceId = 0x106; else if (_vm->getRandom(7) == 0) _nextCookSequenceId = 0x103; @@ -445,7 +445,7 @@ void Scene10::updateAnimations() { case 0x105: { // TODO: Refactor into a if + a switch int rnd = _vm->getRandom(7); - if (_vm->_gnapActionStatus >= 0 || _vm->_platypusActionStatus >= 0) + if (_vm->_gnap->_actionStatus >= 0 || _vm->_plat->_actionStatus >= 0) _nextCookSequenceId = 0x106; else if (rnd == 0) _nextCookSequenceId = 0x104; @@ -459,8 +459,8 @@ void Scene10::updateAnimations() { _vm->_gnapSequenceId = 0x10C; _vm->_gnap->_idleFacing = kDirUpRight; _vm->_gnapSequenceDatNum = 0; - _vm->_gnapActionStatus = -1; - _vm->_platypusActionStatus = -1; + _vm->_gnap->_actionStatus = -1; + _vm->_plat->_actionStatus = -1; } break; } @@ -613,7 +613,7 @@ void Scene11::run() { case kHS11ExitKitchen: _vm->_isLeavingScene = true; _vm->gnapWalkTo(6, 5, 0, 0x107BF, 1); - _vm->_gnapActionStatus = kAS11LeaveScene; + _vm->_gnap->_actionStatus = kAS11LeaveScene; _vm->platypusWalkTo(6, 6, -1, -1, 1); _vm->_newSceneNum = 10; break; @@ -621,7 +621,7 @@ void Scene11::run() { case kHS11ExitToilet: _vm->_isLeavingScene = true; _vm->gnapWalkTo(8, 5, 0, 0x107BF, 1); - _vm->_gnapActionStatus = kAS11LeaveScene; + _vm->_gnap->_actionStatus = kAS11LeaveScene; _vm->platypusWalkTo(8, 6, -1, -1, 1); _vm->_newSceneNum = 13; break; @@ -629,16 +629,16 @@ void Scene11::run() { case kHS11ExitLeft: _vm->_isLeavingScene = true; _vm->gnapWalkTo(-1, 8, 0, 0x107AF, 1); - _vm->_gnapActionStatus = kAS11LeaveScene; + _vm->_gnap->_actionStatus = kAS11LeaveScene; _vm->platypusWalkTo(-1, 9, -1, 0x107CF, 1); _vm->_newSceneNum = 12; break; case kHS11GoggleGuy: - if (_vm->_gnapActionStatus < 0) { + if (_vm->_gnap->_actionStatus < 0) { if (_vm->_grabCursorSpriteIndex == kItemMagazine) { _vm->gnapWalkTo(3, 7, 0, 0x107BC, 1); - _vm->_gnapActionStatus = kAS11ShowMagazineToGoggleGuy; + _vm->_gnap->_actionStatus = kAS11ShowMagazineToGoggleGuy; _vm->playGnapShowItem(_vm->_grabCursorSpriteIndex, 2, 0); } else if (_vm->_grabCursorSpriteIndex >= 0) { _vm->playGnapShowCurrItem(3, 7, 2, 0); @@ -654,7 +654,7 @@ void Scene11::run() { case TALK_CURSOR: _vm->_gnap->_idleFacing = kDirUpLeft; _vm->gnapWalkTo(3, 7, 0, _vm->getGnapSequenceId(gskBrainPulsating, 0, 0) | 0x10000, 1); - _vm->_gnapActionStatus = kAS11TalkGoggleGuy; + _vm->_gnap->_actionStatus = kAS11TalkGoggleGuy; break; } } @@ -662,11 +662,11 @@ void Scene11::run() { break; case kHS11HookGuy: - if (_vm->_gnapActionStatus < 0) { + if (_vm->_gnap->_actionStatus < 0) { _vm->_gnap->_idleFacing = kDirUpRight; if (_vm->_grabCursorSpriteIndex >= 0) { _vm->gnapWalkTo(5, 6, 0, 0x107BC, 9); - _vm->_gnapActionStatus = kAS11ShowItemToHookGuy; + _vm->_gnap->_actionStatus = kAS11ShowItemToHookGuy; _vm->playGnapShowItem(_vm->_grabCursorSpriteIndex, 4, 0); } else { switch (_vm->_verbCursor) { @@ -675,12 +675,12 @@ void Scene11::run() { break; case GRAB_CURSOR: _vm->gnapWalkTo(5, 6, 0, 0x107BC, 1); - _vm->_gnapActionStatus = kAS11GrabHookGuy; + _vm->_gnap->_actionStatus = kAS11GrabHookGuy; break; case TALK_CURSOR: _vm->_gnap->_idleFacing = kDirBottomLeft; _vm->gnapWalkTo(5, 6, 0, _vm->getGnapSequenceId(gskBrainPulsating, 0, 0) | 0x10000, 1); - _vm->_gnapActionStatus = kAS11TalkHookGuy; + _vm->_gnap->_actionStatus = kAS11TalkHookGuy; break; case PLAT_CURSOR: _vm->playGnapImpossible(0, 0); @@ -691,7 +691,7 @@ void Scene11::run() { break; case kHS11Billard: - if (_vm->_gnapActionStatus < 0) { + if (_vm->_gnap->_actionStatus < 0) { if (_vm->_grabCursorSpriteIndex >= 0) { _vm->playGnapImpossible(9, 8); } else { @@ -701,7 +701,7 @@ void Scene11::run() { break; case GRAB_CURSOR: _vm->gnapWalkTo(9, 8, 0, 0x107BA, 1); - _vm->_gnapActionStatus = kAS11GrabBillardBall; + _vm->_gnap->_actionStatus = kAS11GrabBillardBall; break; case TALK_CURSOR: case PLAT_CURSOR: @@ -717,19 +717,19 @@ void Scene11::run() { case kHS11WalkArea3: case kHS11WalkArea4: case kHS11WalkArea5: - if (_vm->_gnapActionStatus < 0) + if (_vm->_gnap->_actionStatus < 0) _vm->gnapWalkTo(-1, -1, -1, -1, 1); break; case kHS11Device: - if (_vm->_gnapActionStatus < 0) { + if (_vm->_gnap->_actionStatus < 0) { _vm->runMenu(); updateHotspots(); } break; default: - if (_vm->_mouseClickState._left && _vm->_gnapActionStatus < 0) { + if (_vm->_mouseClickState._left && _vm->_gnap->_actionStatus < 0) { _vm->gnapWalkTo(-1, -1, -1, -1, 1); _vm->_mouseClickState._left = false; } @@ -749,7 +749,7 @@ void Scene11::run() { _vm->updateGnapIdleSequence2(); if (!_vm->_timers[5]) { _vm->_timers[5] = _vm->getRandom(100) + 75; - if (_vm->_gnapActionStatus < 0 && _vm->_platypusActionStatus < 0 && _nextGoggleGuySequenceId == -1) { + if (_vm->_gnap->_actionStatus < 0 && _vm->_plat->_actionStatus < 0 && _nextGoggleGuySequenceId == -1) { if (_vm->getRandom(2)) _nextGoggleGuySequenceId = 0x1F6; else @@ -758,7 +758,7 @@ void Scene11::run() { } if (!_vm->_timers[4]) { _vm->_timers[4] = _vm->getRandom(40) + 20; - if (_vm->_gnapActionStatus < 0 && _vm->_platypusActionStatus < 0 && _nextHookGuySequenceId == -1) { + if (_vm->_gnap->_actionStatus < 0 && _vm->_plat->_actionStatus < 0 && _nextHookGuySequenceId == -1) { if (_currHookGuySequenceId == 0x201) { switch (_vm->getRandom(7)) { case 0: @@ -814,9 +814,9 @@ void Scene11::updateAnimations() { GameSys& gameSys = *_vm->_gameSys; if (gameSys.getAnimationStatus(0) == 2) { - if (_vm->_gnapActionStatus != kAS11GrabBillardBall) + if (_vm->_gnap->_actionStatus != kAS11GrabBillardBall) gameSys.setAnimation(0, 0, 0); - switch (_vm->_gnapActionStatus) { + switch (_vm->_gnap->_actionStatus) { case kAS11LeaveScene: _vm->_sceneDone = true; break; @@ -873,7 +873,7 @@ void Scene11::updateAnimations() { _vm->_hotspots[kHS11Billard]._flags |= SF_DISABLED; gameSys.setAnimation(0x207, 257, 4); gameSys.insertSequence(0x207, 257, 0, 0, kSeqNone, _vm->getSequenceTotalDuration(0x1FE), 0, 0); - _vm->_gnapActionStatus = -1; + _vm->_gnap->_actionStatus = -1; } break; } @@ -885,8 +885,8 @@ void Scene11::updateAnimations() { gameSys.setAnimation(_nextGoggleGuySequenceId, 121, 2); _currGoggleGuySequenceId = _nextGoggleGuySequenceId; _nextGoggleGuySequenceId = -1; - if (_vm->_gnapActionStatus >= 1 && _vm->_gnapActionStatus <= 4) - _vm->_gnapActionStatus = -1; + if (_vm->_gnap->_actionStatus >= 1 && _vm->_gnap->_actionStatus <= 4) + _vm->_gnap->_actionStatus = -1; } if (gameSys.getAnimationStatus(3) == 2) { @@ -901,16 +901,16 @@ void Scene11::updateAnimations() { _vm->_timers[4] = _vm->getRandom(40) + 20; _vm->_timers[2] = _vm->getRandom(20) + 70; _vm->_timers[3] = _vm->getRandom(50) + 200; - if (_vm->_gnapActionStatus == kAS11GrabHookGuy) - _vm->_gnapActionStatus = -1; + if (_vm->_gnap->_actionStatus == kAS11GrabHookGuy) + _vm->_gnap->_actionStatus = -1; } else if (_nextHookGuySequenceId != -1) { gameSys.insertSequence(_nextHookGuySequenceId, 120, _currHookGuySequenceId, 120, kSeqSyncWait, 0, 0, 0); gameSys.setAnimation(_nextHookGuySequenceId, 120, 3); _currHookGuySequenceId = _nextHookGuySequenceId; _nextHookGuySequenceId = -1; _vm->_timers[4] = _vm->getRandom(40) + 20; - if (_vm->_gnapActionStatus >= 6 && _vm->_gnapActionStatus <= 9) - _vm->_gnapActionStatus = -1; + if (_vm->_gnap->_actionStatus >= 6 && _vm->_gnap->_actionStatus <= 9) + _vm->_gnap->_actionStatus = -1; } } @@ -1005,7 +1005,7 @@ void Scene12::run() { switch (_vm->_sceneClickedHotspot) { case kHS12Device: - if (_vm->_gnapActionStatus < 0) { + if (_vm->_gnap->_actionStatus < 0) { _vm->runMenu(); updateHotspots(); } @@ -1031,7 +1031,7 @@ void Scene12::run() { case kHS12ExitRight: _vm->_isLeavingScene = true; _vm->gnapWalkTo(10, -1, 0, 0x107AB, 1); - _vm->_gnapActionStatus = kAS12LeaveScene; + _vm->_gnap->_actionStatus = kAS12LeaveScene; _vm->platypusWalkTo(10, -1, -1, -1, 1); _vm->_newSceneNum = 11; break; @@ -1041,18 +1041,18 @@ void Scene12::run() { _vm->_largeSprite = gameSys.createSurface(0x141); _vm->gnapWalkTo(3, 7, 0, 0x107BC, 9); _vm->_gnap->_idleFacing = kDirUpLeft; - _vm->_gnapActionStatus = kAS12QuarterToToothGuy; + _vm->_gnap->_actionStatus = kAS12QuarterToToothGuy; _vm->playGnapShowItem(_vm->_grabCursorSpriteIndex, 2, 0); _vm->setGrabCursorSprite(-1); } else if (_vm->_grabCursorSpriteIndex == kItemQuarterWithHole) { _vm->gnapWalkTo(3, 7, 0, 0x107BC, 9); _vm->_gnap->_idleFacing = kDirUpLeft; - _vm->_gnapActionStatus = kAS12QuarterWithHoleToToothGuy; + _vm->_gnap->_actionStatus = kAS12QuarterWithHoleToToothGuy; _vm->playGnapShowItem(_vm->_grabCursorSpriteIndex, 2, 0); } else if (_vm->_grabCursorSpriteIndex >= 0) { _vm->gnapWalkTo(3, 7, 0, 0x107BC, 9); _vm->_gnap->_idleFacing = kDirUpLeft; - _vm->_gnapActionStatus = kAS12ShowItemToToothGuy; + _vm->_gnap->_actionStatus = kAS12ShowItemToToothGuy; _vm->playGnapShowItem(_vm->_grabCursorSpriteIndex, 2, 0); } else { switch (_vm->_verbCursor) { @@ -1061,17 +1061,17 @@ void Scene12::run() { break; case GRAB_CURSOR: _vm->gnapWalkTo(3, 7, 0, 0x107BC, 1); - _vm->_gnapActionStatus = kAS12GrabToothGuy; + _vm->_gnap->_actionStatus = kAS12GrabToothGuy; break; case TALK_CURSOR: _vm->_gnap->_idleFacing = kDirUpLeft; _vm->gnapWalkTo(3, 7, 0, _vm->getGnapSequenceId(gskBrainPulsating, 0, 0) | 0x10000, 1); - _vm->_gnapActionStatus = kAS12TalkToothGuy; + _vm->_gnap->_actionStatus = kAS12TalkToothGuy; break; case PLAT_CURSOR: _vm->gnapUseDeviceOnPlatypus(); _vm->platypusWalkTo(3, 7, 1, 0x107D2, 1); - _vm->_platypusActionStatus = kAS12PlatWithToothGuy; + _vm->_plat->_actionStatus = kAS12PlatWithToothGuy; _vm->_plat->_idleFacing = kDirUnk4; _vm->playGnapIdle(2, 7); break; @@ -1083,19 +1083,19 @@ void Scene12::run() { if (_vm->_grabCursorSpriteIndex == kItemQuarter || _vm->_grabCursorSpriteIndex == kItemQuarterWithHole) { _vm->gnapWalkTo(6, 6, 0, 0x107BB, 9); _vm->_gnap->_idleFacing = kDirUpRight; - _vm->_gnapActionStatus = kAS12QuarterWithBarkeeper; + _vm->_gnap->_actionStatus = kAS12QuarterWithBarkeeper; _vm->playGnapShowItem(_vm->_grabCursorSpriteIndex, 7, 0); } else if (_vm->_grabCursorSpriteIndex >= 0) { _vm->gnapWalkTo(6, 6, 0, 0x107BB, 9); _vm->_gnap->_idleFacing = kDirUpRight; - _vm->_gnapActionStatus = kAS12ShowItemToBarkeeper; + _vm->_gnap->_actionStatus = kAS12ShowItemToBarkeeper; _vm->playGnapShowItem(_vm->_grabCursorSpriteIndex, 7, 0); } else { switch (_vm->_verbCursor) { case LOOK_CURSOR: _vm->gnapWalkTo(6, 6, 0, 0x107BB, 1); _vm->_gnap->_idleFacing = kDirUpRight; - _vm->_gnapActionStatus = kAS12LookBarkeeper; + _vm->_gnap->_actionStatus = kAS12LookBarkeeper; break; case GRAB_CURSOR: _vm->playGnapImpossible(0, 0); @@ -1103,12 +1103,12 @@ void Scene12::run() { case TALK_CURSOR: _vm->_gnap->_idleFacing = kDirUpRight; _vm->gnapWalkTo(6, 6, 0, _vm->getGnapSequenceId(gskBrainPulsating, 0, 0) | 0x10000, 1); - _vm->_gnapActionStatus = kAS12TalkBarkeeper; + _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); - _vm->_gnapActionStatus = kAS12PlatWithBarkeeper; + _vm->_gnap->_actionStatus = kAS12PlatWithBarkeeper; break; } } @@ -1118,30 +1118,30 @@ void Scene12::run() { if (_vm->_grabCursorSpriteIndex >= 0) { _vm->gnapWalkTo(7, 6, 0, 0x107BB, 9); _vm->_gnap->_idleFacing = kDirUpRight; - _vm->_gnapActionStatus = kAS12ShowItemToBeardGuy; + _vm->_gnap->_actionStatus = kAS12ShowItemToBeardGuy; _vm->playGnapShowItem(_vm->_grabCursorSpriteIndex, 8, 0); } else { switch (_vm->_verbCursor) { case LOOK_CURSOR: _vm->gnapWalkTo(7, 6, 0, 0x107BB, 1); _vm->_gnap->_idleFacing = kDirUpRight; - _vm->_gnapActionStatus = kAS12LookBeardGuy; + _vm->_gnap->_actionStatus = kAS12LookBeardGuy; break; case GRAB_CURSOR: // NOTE Bug in the original. It has 9 as flags which seems wrong here. _vm->gnapWalkTo(7, 6, 0, 0x107BB, 1); _vm->_gnap->_idleFacing = kDirUpRight; - _vm->_gnapActionStatus = kAS12GrabBeardGuy; + _vm->_gnap->_actionStatus = kAS12GrabBeardGuy; break; case TALK_CURSOR: _vm->_gnap->_idleFacing = kDirUpRight; _vm->gnapWalkTo(7, 6, 0, _vm->getGnapSequenceId(gskBrainPulsating, 0, 0) | 0x10000, 1); - _vm->_gnapActionStatus = kAS12TalkBeardGuy; + _vm->_gnap->_actionStatus = kAS12TalkBeardGuy; break; case PLAT_CURSOR: _vm->gnapUseDeviceOnPlatypus(); _vm->platypusWalkTo(7, 6, 1, 0x107C2, 1); - _vm->_platypusActionStatus = kAS12PlatWithBeardGuy; + _vm->_plat->_actionStatus = kAS12PlatWithBeardGuy; _vm->_plat->_idleFacing = kDirNone; _vm->playGnapIdle(7, 6); break; @@ -1153,19 +1153,19 @@ void Scene12::run() { _vm->_newSceneNum = 15; _vm->_isLeavingScene = true; _vm->gnapWalkTo(5, 6, 0, 0x107BC, 1); - _vm->_gnapActionStatus = kAS12LeaveScene; + _vm->_gnap->_actionStatus = kAS12LeaveScene; break; case kHS12WalkArea1: case kHS12WalkArea2: case kHS12WalkArea3: case kHS12WalkArea4: - if (_vm->_gnapActionStatus < 0) + if (_vm->_gnap->_actionStatus < 0) _vm->gnapWalkTo(-1, -1, -1, -1, 1); break; default: - if (_vm->_mouseClickState._left && _vm->_gnapActionStatus < 0) { + if (_vm->_mouseClickState._left && _vm->_gnap->_actionStatus < 0) { _vm->gnapWalkTo(-1, -1, -1, -1, 1); _vm->_mouseClickState._left = false; } @@ -1181,7 +1181,7 @@ void Scene12::run() { if (!_vm->_timers[4]) { _vm->_timers[4] = 15; if (_nextToothGuySequenceId == -1) { - if (v18 == 0 && _currBeardGuySequenceId == 0x202 && _currBarkeeperSequenceId == 0x203 && _vm->_gnapActionStatus < 0 && _vm->_platypusActionStatus < 0) { + if (v18 == 0 && _currBeardGuySequenceId == 0x202 && _currBarkeeperSequenceId == 0x203 && _vm->_gnap->_actionStatus < 0 && _vm->_plat->_actionStatus < 0) { if (_vm->getRandom(2) != 0) _nextToothGuySequenceId = 0x1EC; else @@ -1193,8 +1193,8 @@ void Scene12::run() { } if (!_vm->_timers[5]) { _vm->_timers[5] = _vm->getRandom(30) + 20; - if (_nextBarkeeperSequenceId == -1 && _vm->_gnapActionStatus < 0 && _vm->_platypusActionStatus < 0) { - if (v18 == 0 && _currToothGuySequenceId == 0x200 && _currBeardGuySequenceId == 0x202 && _vm->_gnapActionStatus < 0 && _vm->_platypusActionStatus < 0) { + if (_nextBarkeeperSequenceId == -1 && _vm->_gnap->_actionStatus < 0 && _vm->_plat->_actionStatus < 0) { + if (v18 == 0 && _currToothGuySequenceId == 0x200 && _currBeardGuySequenceId == 0x202 && _vm->_gnap->_actionStatus < 0 && _vm->_plat->_actionStatus < 0) { if (_vm->getRandom(2) != 0) _nextBarkeeperSequenceId = 0x208; else @@ -1206,8 +1206,8 @@ void Scene12::run() { } if (!_vm->_timers[6]) { _vm->_timers[6] = _vm->getRandom(30) + 15; - if (_nextBeardGuySequenceId == -1 && _vm->_gnapActionStatus < 0 && _vm->_platypusActionStatus < 0) { - if (v18 == 0 && _currToothGuySequenceId == 0x200 && _currBarkeeperSequenceId == 0x203 && _vm->_gnapActionStatus < 0 && _vm->_platypusActionStatus < 0) + if (_nextBeardGuySequenceId == -1 && _vm->_gnap->_actionStatus < 0 && _vm->_plat->_actionStatus < 0) { + if (v18 == 0 && _currToothGuySequenceId == 0x200 && _currBarkeeperSequenceId == 0x203 && _vm->_gnap->_actionStatus < 0 && _vm->_plat->_actionStatus < 0) _nextBeardGuySequenceId = 0x1F2; else _nextBeardGuySequenceId = 0x202; @@ -1251,7 +1251,7 @@ void Scene12::updateAnimations() { if (gameSys.getAnimationStatus(0) == 2) { gameSys.setAnimation(0, 0, 0); - switch (_vm->_gnapActionStatus) { + switch (_vm->_gnap->_actionStatus) { case kAS12LeaveScene: _vm->_sceneDone = true; break; @@ -1299,7 +1299,7 @@ void Scene12::updateAnimations() { } break; case kAS12QuarterToToothGuyDone: - _vm->_gnapActionStatus = -1; + _vm->_gnap->_actionStatus = -1; _vm->showCursor(); gameSys.removeSpriteDrawItem(_vm->_largeSprite, 300); _vm->deleteSurface(&_vm->_largeSprite); @@ -1343,7 +1343,7 @@ void Scene12::updateAnimations() { if (gameSys.getAnimationStatus(1) == 2) { gameSys.setAnimation(0, 0, 1); - switch (_vm->_platypusActionStatus) { + switch (_vm->_plat->_actionStatus) { case kAS12PlatWithToothGuy: _nextToothGuySequenceId = 0x1EB; break; @@ -1358,7 +1358,7 @@ void Scene12::updateAnimations() { gameSys.setAnimation(0, 0, 2); _vm->hideCursor(); gameSys.setAnimation(0x10843, 301, 0); - _vm->_gnapActionStatus = kAS12QuarterToToothGuyDone; + _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, @@ -1380,25 +1380,25 @@ void Scene12::updateAnimations() { _vm->_timers[4] = 40; _vm->_timers[2] = _vm->getRandom(20) + 70; _vm->_timers[3] = _vm->getRandom(50) + 200; - if (_vm->_gnapActionStatus == kAS12GrabToothGuy) - _vm->_gnapActionStatus = -1; + if (_vm->_gnap->_actionStatus == kAS12GrabToothGuy) + _vm->_gnap->_actionStatus = -1; } else if (_nextToothGuySequenceId != -1) { gameSys.insertSequence(_nextToothGuySequenceId, 50, _currToothGuySequenceId, 50, kSeqSyncWait, 0, 0, 0); gameSys.setAnimation(_nextToothGuySequenceId, 50, 2); _currToothGuySequenceId = _nextToothGuySequenceId; _nextToothGuySequenceId = -1; _vm->_timers[4] = 50; - if (_vm->_gnapActionStatus >= kAS12TalkToothGuy && _vm->_gnapActionStatus <= kAS12QuarterToToothGuy && _currToothGuySequenceId != 0x1E9 && + if (_vm->_gnap->_actionStatus >= kAS12TalkToothGuy && _vm->_gnap->_actionStatus <= kAS12QuarterToToothGuy && _currToothGuySequenceId != 0x1E9 && _currToothGuySequenceId != 0x1EC && _currToothGuySequenceId != 0x200) - _vm->_gnapActionStatus = -1; - if (_vm->_platypusActionStatus == kAS12PlatWithToothGuy) - _vm->_platypusActionStatus = -1; + _vm->_gnap->_actionStatus = -1; + if (_vm->_plat->_actionStatus == kAS12PlatWithToothGuy) + _vm->_plat->_actionStatus = -1; } } if (gameSys.getAnimationStatus(3) == 2) { - if (_vm->_gnapActionStatus == kAS12PlatWithBarkeeper && _currBarkeeperSequenceId == 0x1F9) { - _vm->_gnapActionStatus = -1; + if (_vm->_gnap->_actionStatus == kAS12PlatWithBarkeeper && _currBarkeeperSequenceId == 0x1F9) { + _vm->_gnap->_actionStatus = -1; _vm->playGnapIdle(7, 6); _vm->_timers[5] = 0; } @@ -1408,9 +1408,9 @@ void Scene12::updateAnimations() { _currBarkeeperSequenceId = _nextBarkeeperSequenceId; _nextBarkeeperSequenceId = -1; _vm->_timers[5] = _vm->getRandom(30) + 20; - if (_vm->_gnapActionStatus >= kAS12TalkBarkeeper && _vm->_gnapActionStatus <= kAS12QuarterWithBarkeeper && _currBarkeeperSequenceId != 0x203 && + if (_vm->_gnap->_actionStatus >= kAS12TalkBarkeeper && _vm->_gnap->_actionStatus <= kAS12QuarterWithBarkeeper && _currBarkeeperSequenceId != 0x203 && _currBarkeeperSequenceId != 0x1FB && _currBarkeeperSequenceId != 0x208) - _vm->_gnapActionStatus = -1; + _vm->_gnap->_actionStatus = -1; } } @@ -1420,10 +1420,10 @@ void Scene12::updateAnimations() { _currBeardGuySequenceId = _nextBeardGuySequenceId; _nextBeardGuySequenceId = -1; _vm->_timers[6] = _vm->getRandom(30) + 20; - if (_vm->_gnapActionStatus >= kAS12TalkBeardGuy && _vm->_gnapActionStatus <= kAS12ShowItemToBeardGuy && _currBeardGuySequenceId != 0x202 && _currBeardGuySequenceId != 0x1F2) - _vm->_gnapActionStatus = -1; - if (_vm->_platypusActionStatus == kAS12PlatWithBeardGuy) - _vm->_platypusActionStatus = -1; + if (_vm->_gnap->_actionStatus >= kAS12TalkBeardGuy && _vm->_gnap->_actionStatus <= kAS12ShowItemToBeardGuy && _currBeardGuySequenceId != 0x202 && _currBeardGuySequenceId != 0x1F2) + _vm->_gnap->_actionStatus = -1; + if (_vm->_plat->_actionStatus == kAS12PlatWithBeardGuy) + _vm->_plat->_actionStatus = -1; } } @@ -1512,7 +1512,7 @@ void Scene13::run() { switch (_vm->_sceneClickedHotspot) { case kHS13Device: - if (_vm->_gnapActionStatus < 0) { + if (_vm->_gnap->_actionStatus < 0) { _vm->runMenu(); updateHotspots(); _vm->_timers[4] = _vm->getRandom(20) + 20; @@ -1540,7 +1540,7 @@ void Scene13::run() { case kHS13ExitBar: _vm->_isLeavingScene = true; _vm->gnapWalkTo(2, 7, 0, 0x107C0, 1); - _vm->_gnapActionStatus = kAS13LeaveScene; + _vm->_gnap->_actionStatus = kAS13LeaveScene; _vm->platypusWalkTo(2, 8, -1, -1, 1); if (_vm->isFlag(kGFUnk14) || _vm->isFlag(kGFSpringTaken)) { _vm->_newSceneNum = 11; @@ -1564,13 +1564,13 @@ void Scene13::run() { gameSys.insertSequence(_backToiletCtr + 0xA3, _vm->_gnapId, makeRid(_vm->_gnapSequenceDatNum, _vm->_gnapSequenceId), _vm->_gnapId, kSeqScale | kSeqSyncWait, 0, 0, 0); - _vm->_gnapActionStatus = kAS13Wait; + _vm->_gnap->_actionStatus = kAS13Wait; _vm->_gnapSequenceId = _backToiletCtr + 0xA3; _vm->_gnap->_idleFacing = kDirUpRight; _vm->_gnapSequenceDatNum = 0; } else { _vm->gnapWalkTo(5, 5, 0, 0x107BB, 1); - _vm->_gnapActionStatus = kAS13BackToilet; + _vm->_gnap->_actionStatus = kAS13BackToilet; _vm->_gnap->_idleFacing = kDirUpRight; } break; @@ -1591,7 +1591,7 @@ void Scene13::run() { case TALK_CURSOR: case PLAT_CURSOR: _vm->gnapWalkTo(6, 7, 0, 0xA9, 5); - _vm->_gnapActionStatus = kAS13FrontToilet; + _vm->_gnap->_actionStatus = kAS13FrontToilet; _vm->_gnap->_idleFacing = kDirBottomRight; break; } @@ -1605,7 +1605,7 @@ void Scene13::run() { switch (_vm->_verbCursor) { case LOOK_CURSOR: _vm->gnapWalkTo(7, 7, 0, 0x107BB, 1); - _vm->_gnapActionStatus = kAS13LookScribble; + _vm->_gnap->_actionStatus = kAS13LookScribble; _vm->_gnap->_idleFacing = kDirUpRight; break; case GRAB_CURSOR: @@ -1630,11 +1630,11 @@ void Scene13::run() { case LOOK_CURSOR: _vm->playGnapSequence(_vm->getGnapSequenceId(gskDeflect, 9, 6)); _vm->gnapWalkTo(_vm->_gnap->_pos, 0, -1, 1); - _vm->_gnapActionStatus = kAS13Wait; + _vm->_gnap->_actionStatus = kAS13Wait; break; case GRAB_CURSOR: _vm->gnapWalkTo(8, 7, 0, -1, 1); - _vm->_gnapActionStatus = kAS13GrabUrinal; + _vm->_gnap->_actionStatus = kAS13GrabUrinal; break; case TALK_CURSOR: case PLAT_CURSOR: @@ -1652,11 +1652,11 @@ void Scene13::run() { case LOOK_CURSOR: _vm->playGnapSequence(_vm->getGnapSequenceId(gskDeflect, 5, 9)); _vm->gnapWalkTo(_vm->_gnap->_pos, 0, -1, 1); - _vm->_gnapActionStatus = kAS13Wait; + _vm->_gnap->_actionStatus = kAS13Wait; break; case GRAB_CURSOR: _vm->gnapWalkTo(4, 8, 0, 0x107B9, 1); - _vm->_gnapActionStatus = kAS13GrabSink; + _vm->_gnap->_actionStatus = kAS13GrabSink; break; case TALK_CURSOR: case PLAT_CURSOR: @@ -1695,7 +1695,7 @@ void Scene13::run() { _vm->updatePlatypusIdleSequence(); if (_vm->_plat->_pos.y == 5 || _vm->_plat->_pos.y == 6) _vm->platypusWalkTo(-1, 7, -1, -1, 1); - if (_vm->_gnapActionStatus < 0) + if (_vm->_gnap->_actionStatus < 0) _vm->updateGnapIdleSequence(); if (!_vm->_timers[4]) { _vm->_timers[4] = _vm->getRandom(20) + 20; @@ -1763,24 +1763,24 @@ void Scene13::updateAnimations() { if (gameSys.getAnimationStatus(0) == 2) { gameSys.setAnimation(0, 0, 0); - switch (_vm->_gnapActionStatus) { + switch (_vm->_gnap->_actionStatus) { case kAS13LeaveScene: _vm->_sceneDone = true; - _vm->_gnapActionStatus = -1; + _vm->_gnap->_actionStatus = -1; 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; - _vm->_gnapActionStatus = -1; + _vm->_gnap->_actionStatus = -1; break; case kAS13FrontToilet: _vm->_sceneDone = true; _vm->_newSceneNum = 14; break; case kAS13LookScribble: - _vm->_gnapActionStatus = -1; + _vm->_gnap->_actionStatus = -1; showScribble(); break; case kAS13GrabSink: @@ -1793,14 +1793,14 @@ void Scene13::updateAnimations() { _vm->_gnapSequenceDatNum = 0; _vm->_gnap->_pos = Common::Point(4, 8); _vm->_timers[2] = 360; - _vm->_gnapActionStatus = kAS13GrabSinkDone; + _vm->_gnap->_actionStatus = kAS13GrabSinkDone; break; case kAS13GrabSinkDone: gameSys.insertSequence(0xAA, 256, 0, 0, kSeqNone, 0, 0, 0); - _vm->_gnapActionStatus = -1; + _vm->_gnap->_actionStatus = -1; break; case kAS13Wait: - _vm->_gnapActionStatus = -1; + _vm->_gnap->_actionStatus = -1; break; case kAS13GrabUrinal: gameSys.setAnimation(0xA2, 120, 0); @@ -1811,14 +1811,14 @@ void Scene13::updateAnimations() { _vm->_gnapSequenceDatNum = 0; _vm->_gnap->_pos = Common::Point(4, 6); _vm->_timers[2] = 360; - _vm->_gnapActionStatus = kAS13Wait; + _vm->_gnap->_actionStatus = kAS13Wait; break; } } if (gameSys.getAnimationStatus(1) == 2) { gameSys.setAnimation(0, 0, 1); - _vm->_platypusActionStatus = -1; + _vm->_plat->_actionStatus = -1; } } @@ -1875,7 +1875,7 @@ void Scene14::run() { switch (_vm->_sceneClickedHotspot) { case kHS14Device: - if (_vm->_gnapActionStatus < 0) { + if (_vm->_gnap->_actionStatus < 0) { _vm->runMenu(); updateHotspots(); } @@ -2051,7 +2051,7 @@ void Scene15::run() { switch (_vm->_sceneClickedHotspot) { case kHS15Device: - if (_vm->_gnapActionStatus < 0) { + if (_vm->_gnap->_actionStatus < 0) { _vm->runMenu(); updateHotspots(); } @@ -2329,13 +2329,13 @@ void Scene17::update() { void Scene17::platHangUpPhone() { GameSys& gameSys = *_vm->_gameSys; - int savedGnapActionStatus = _vm->_gnapActionStatus; + int savedGnapActionStatus = _vm->_gnap->_actionStatus; - if (_vm->_platypusActionStatus == kAS17PlatPhoningAssistant) { - _vm->_gnapActionStatus = kAS17PlatHangUpPhone; + if (_vm->_plat->_actionStatus == kAS17PlatPhoningAssistant) { + _vm->_gnap->_actionStatus = kAS17PlatHangUpPhone; _vm->updateMouseCursor(); _platPhoneCtr = 0; - _vm->_platypusActionStatus = -1; + _vm->_plat->_actionStatus = -1; gameSys.setAnimation(0x257, 254, 4); gameSys.insertSequence(0x257, 254, _currPhoneSequenceId, 254, kSeqSyncExists, 0, 0, 0); while (gameSys.getAnimationStatus(4) != 2) @@ -2349,7 +2349,7 @@ void Scene17::platHangUpPhone() { _vm->clearFlag(kGFPlatypusTalkingToAssistant); while (gameSys.getAnimationStatus(1) != 2) _vm->gameUpdateTick(); - _vm->_gnapActionStatus = savedGnapActionStatus; + _vm->_gnap->_actionStatus = savedGnapActionStatus; _vm->updateMouseCursor(); } updateHotspots(); @@ -2431,7 +2431,7 @@ void Scene17::run() { _vm->endSceneInit(); _vm->clearFlag(kGFSpringTaken); _vm->clearFlag(kGFUnk16); - _vm->_platypusActionStatus = kAS17PlatPhoningAssistant; + _vm->_plat->_actionStatus = kAS17PlatPhoningAssistant; platHangUpPhone(); gameSys.setAnimation(0, 0, 4); _vm->clearFlag(kGFPlatypusTalkingToAssistant); @@ -2446,7 +2446,7 @@ void Scene17::run() { gameSys.insertSequence(601, 20 * _vm->_hotspotsWalkPos[2].y, 0, 0, kSeqNone, 0, 0, 0); _vm->_gnapSequenceDatNum = 0; _vm->_gnapSequenceId = 601; - _vm->_gnapActionStatus = kAS17GnapHangUpPhone; + _vm->_gnap->_actionStatus = kAS17GnapHangUpPhone; _vm->clearFlag(kGFUnk25); gameSys.insertSequence(0x251, 254, 0, 0, kSeqNone, 0, 0, 0); _vm->endSceneInit(); @@ -2466,7 +2466,7 @@ void Scene17::run() { _vm->_platypusSequenceDatNum = 0; _vm->endSceneInit(); gameSys.setAnimation(_currPhoneSequenceId, 254, 1); - _vm->_platypusActionStatus = kAS17PlatPhoningAssistant; + _vm->_plat->_actionStatus = kAS17PlatPhoningAssistant; updateHotspots(); } else if (_vm->_prevSceneNum == 18) { _vm->initGnapPos(6, 6, kDirBottomRight); @@ -2518,14 +2518,14 @@ void Scene17::run() { switch (_vm->_sceneClickedHotspot) { case kHS17Device: - if (_vm->_gnapActionStatus < 0 || _vm->_gnapActionStatus == 3) { + if (_vm->_gnap->_actionStatus < 0 || _vm->_gnap->_actionStatus == 3) { _vm->runMenu(); updateHotspots(); } break; case kHS17Platypus: - if (_vm->_gnapActionStatus < 0) { + if (_vm->_gnap->_actionStatus < 0) { if (_vm->_grabCursorSpriteIndex == kItemJoint) { if (_vm->isFlag(kGFGrassTaken)) { _vm->gnapUseJointOnPlatypus(); @@ -2533,8 +2533,8 @@ void Scene17::run() { _vm->gnapUseDeviceOnPlatypus(); _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->_platypusActionStatus = kAS17GetWrench1; - _vm->_gnapActionStatus = kAS17GetWrench1; + _vm->_plat->_actionStatus = kAS17GetWrench1; + _vm->_gnap->_actionStatus = kAS17GetWrench1; _vm->_timers[5] = _vm->getRandom(30) + 80; _vm->setGrabCursorSprite(-1); _vm->invRemove(kItemJoint); @@ -2560,7 +2560,7 @@ void Scene17::run() { break; case kHS17Wrench: - if (_vm->_gnapActionStatus < 0) { + if (_vm->_gnap->_actionStatus < 0) { if (_vm->isFlag(kGFGrassTaken)) { _vm->playGnapImpossible(0, 0); } else if (_vm->_grabCursorSpriteIndex >= 0) { @@ -2579,8 +2579,8 @@ void Scene17::run() { platHangUpPhone(); _vm->gnapUseDeviceOnPlatypus(); _vm->platypusWalkTo(_vm->_hotspotsWalkPos[6].x + 1, _vm->_hotspotsWalkPos[6].y, 1, 0x107C2, 1); - _vm->_platypusActionStatus = kAS17TryGetWrench; - _vm->_gnapActionStatus = kAS17TryGetWrench; + _vm->_plat->_actionStatus = kAS17TryGetWrench; + _vm->_gnap->_actionStatus = kAS17TryGetWrench; _vm->_timers[5] = _vm->getRandom(30) + 80; } else _vm->playGnapImpossible(0, 0); @@ -2591,10 +2591,10 @@ void Scene17::run() { break; case kHS17Phone1: - if (_vm->_gnapActionStatus < 0) { + 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->_gnapActionStatus = kAS17PutCoinIntoPhone; + _vm->_gnap->_actionStatus = kAS17PutCoinIntoPhone; } else if (_vm->_grabCursorSpriteIndex >= 0) { _vm->playGnapShowCurrItem(_vm->_hotspotsWalkPos[2].x, _vm->_hotspotsWalkPos[2].y, 1, 3); } else { @@ -2606,7 +2606,7 @@ void Scene17::run() { 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->_gnapActionStatus = kAS17GetCoinFromPhone; + _vm->_gnap->_actionStatus = kAS17GetCoinFromPhone; } else _vm->playGnapImpossible(0, 0); break; @@ -2621,8 +2621,8 @@ void Scene17::run() { _vm->_plat->_idleFacing = kDirUpLeft; _vm->platypusWalkTo(_vm->_hotspotsWalkPos[2].x, _vm->_hotspotsWalkPos[2].y, 1, 0x107C2, 1); _vm->setFlag(kGFUnk16); - _vm->_platypusActionStatus = kAS17PlatUsePhone; - _vm->_gnapActionStatus = kAS17PlatUsePhone; + _vm->_plat->_actionStatus = kAS17PlatUsePhone; + _vm->_gnap->_actionStatus = kAS17PlatUsePhone; } else _vm->playGnapImpossible(0, 0); break; @@ -2632,10 +2632,10 @@ void Scene17::run() { break; case kHS17Phone2: - if (_vm->_gnapActionStatus < 0) { + 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->_gnapActionStatus = kAS17PutCoinIntoPhone; + _vm->_gnap->_actionStatus = kAS17PutCoinIntoPhone; } else if (_vm->_grabCursorSpriteIndex >= 0) { _vm->playGnapShowCurrItem(_vm->_hotspotsWalkPos[2].x, _vm->_hotspotsWalkPos[2].y, 1, 3); } else { @@ -2649,7 +2649,7 @@ void Scene17::run() { _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->_gnapActionStatus = kAS17GnapUsePhone; + _vm->_gnap->_actionStatus = kAS17GnapUsePhone; _vm->setFlag(kGFSpringTaken); } else _vm->playGnapImpossible(0, 0); @@ -2665,8 +2665,8 @@ void Scene17::run() { _vm->_plat->_idleFacing = kDirUpLeft; _vm->platypusWalkTo(_vm->_hotspotsWalkPos[2].x, _vm->_hotspotsWalkPos[2].y, 1, 0x107C2, 1); _vm->setFlag(kGFUnk16); - _vm->_platypusActionStatus = kAS17PlatUsePhone; - _vm->_gnapActionStatus = kAS17PlatUsePhone; + _vm->_plat->_actionStatus = kAS17PlatUsePhone; + _vm->_gnap->_actionStatus = kAS17PlatUsePhone; } else _vm->playGnapImpossible(0, 0); break; @@ -2676,25 +2676,25 @@ void Scene17::run() { break; case kHS17ExitToyStore: - if (_vm->_gnapActionStatus < 0) { + if (_vm->_gnap->_actionStatus < 0) { _vm->_isLeavingScene = true; _vm->_newSceneNum = 18; _vm->_gnap->_idleFacing = kDirUpRight; _vm->gnapWalkTo(_vm->_hotspotsWalkPos[5].x, _vm->_hotspotsWalkPos[5].y, 0, 0x107BB, 1); - _vm->_gnapActionStatus = kAS17LeaveScene; - if (_vm->_platypusActionStatus != kAS17PlatPhoningAssistant) + _vm->_gnap->_actionStatus = kAS17LeaveScene; + if (_vm->_plat->_actionStatus != kAS17PlatPhoningAssistant) _vm->platypusWalkTo(_vm->_hotspotsWalkPos[5].x - 1, _vm->_hotspotsWalkPos[5].y, -1, 0x107C2, 1); } break; case kHS17ExitGrubCity: - if (_vm->_gnapActionStatus < 0) { + if (_vm->_gnap->_actionStatus < 0) { platHangUpPhone(); _vm->_isLeavingScene = true; _vm->_newSceneNum = 20; _vm->_gnap->_idleFacing = kDirUpLeft; _vm->gnapWalkTo(_vm->_hotspotsWalkPos[3].x, _vm->_hotspotsWalkPos[3].y, 0, 0x107BC, 1); - _vm->_gnapActionStatus = kAS17LeaveScene; + _vm->_gnap->_actionStatus = kAS17LeaveScene; _vm->platypusWalkTo(_vm->_hotspotsWalkPos[3].x + 1, _vm->_hotspotsWalkPos[3].y, -1, 0x107C2, 1); } break; @@ -2702,12 +2702,12 @@ void Scene17::run() { case kHS17WalkArea1: case kHS17WalkArea2: case kHS17WalkArea3: - if (_vm->_gnapActionStatus < 0) + if (_vm->_gnap->_actionStatus < 0) _vm->gnapWalkTo(-1, -1, -1, -1, 1); break; default: - if (_vm->_mouseClickState._left && _vm->_gnapActionStatus < 0) { + if (_vm->_mouseClickState._left && _vm->_gnap->_actionStatus < 0) { _vm->gnapWalkTo(-1, -1, -1, -1, 1); _vm->_mouseClickState._left = 0; } @@ -2720,17 +2720,17 @@ void Scene17::run() { _vm->playSound(0x10940, true); if (!_vm->_isLeavingScene) { - if (_vm->_platypusActionStatus < 0) + if (_vm->_plat->_actionStatus < 0) _vm->updatePlatypusIdleSequence2(); _vm->updateGnapIdleSequence2(); if (!_vm->_timers[4]) { _vm->_timers[4] = _vm->getRandom(100) + 200; - if (_vm->_gnapActionStatus < 0 && _vm->_platypusActionStatus < 0) + if (_vm->_gnap->_actionStatus < 0 && _vm->_plat->_actionStatus < 0) gameSys.insertSequence(0x22B, 21, 0, 0, kSeqNone, 0, 0, 0); } if (!_vm->_timers[7]) { _vm->_timers[7] = _vm->getRandom(100) + 100; - if (_vm->_gnapActionStatus < 0 && _vm->_platypusActionStatus < 0) { + if (_vm->_gnap->_actionStatus < 0 && _vm->_plat->_actionStatus < 0) { switch (_vm->getRandom(3)) { case 0: gameSys.insertSequence(0x25C, 255, 0, 0, kSeqNone, 0, 0, 0); @@ -2744,7 +2744,7 @@ void Scene17::run() { } } } - if (_vm->_platypusActionStatus < 0 && !_vm->_timers[5]) { + if (_vm->_plat->_actionStatus < 0 && !_vm->_timers[5]) { _vm->_timers[5] = _vm->getRandom(30) + 80; if (_vm->isFlag(kGFGrassTaken) && _nextWrenchSequenceId == -1) { _nextWrenchSequenceId = 0x236; @@ -2823,9 +2823,9 @@ void Scene17::updateAnimations() { if (gameSys.getAnimationStatus(0) == 2) { gameSys.setAnimation(0, 0, 0); - switch (_vm->_gnapActionStatus) { + switch (_vm->_gnap->_actionStatus) { case kAS17GetWrench1: - _vm->_gnapActionStatus = kAS17GetWrenchGnapReady; + _vm->_gnap->_actionStatus = kAS17GetWrenchGnapReady; break; case kAS17GetCoinFromPhone: _vm->playGnapPullOutDevice(1, 3); @@ -2834,11 +2834,11 @@ void Scene17::updateAnimations() { gameSys.insertSequence(0x250, 100, 591, 100, kSeqSyncWait, 0, 0, 0); _vm->invAdd(kItemDiceQuarterHole); _vm->clearFlag(kGFUnk18); - _vm->_gnapActionStatus = kAS17GetCoinFromPhoneDone; + _vm->_gnap->_actionStatus = kAS17GetCoinFromPhoneDone; break; case kAS17GetCoinFromPhoneDone: _vm->setGrabCursorSprite(kItemDiceQuarterHole); - _vm->_gnapActionStatus = -1; + _vm->_gnap->_actionStatus = -1; break; case kAS17PutCoinIntoPhone: gameSys.setAnimation(0x24C, _vm->_gnapId, 0); @@ -2848,23 +2848,23 @@ void Scene17::updateAnimations() { _vm->invRemove(kItemDiceQuarterHole); _vm->setGrabCursorSprite(-1); _vm->setFlag(kGFUnk18); - _vm->_gnapActionStatus = kAS17PutCoinIntoPhoneDone; + _vm->_gnap->_actionStatus = kAS17PutCoinIntoPhoneDone; break; case kAS17PutCoinIntoPhoneDone: gameSys.insertSequence(0x24F, 100, 0, 0, kSeqNone, 0, 0, 0); - _vm->_gnapActionStatus = -1; + _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); - _vm->_gnapActionStatus = kAS17LeaveScene; + _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; - _vm->_gnapActionStatus = -1; + _vm->_gnap->_actionStatus = -1; break; case kAS17LeaveScene: _vm->_sceneDone = true; @@ -2874,9 +2874,9 @@ void Scene17::updateAnimations() { if (gameSys.getAnimationStatus(1) == 2) { gameSys.setAnimation(0, 0, 1); - switch (_vm->_platypusActionStatus) { + switch (_vm->_plat->_actionStatus) { case kAS17TryGetWrench: - _vm->_platypusActionStatus = -1; + _vm->_plat->_actionStatus = -1; ++_platTryGetWrenchCtr; if (_platTryGetWrenchCtr % 2 != 0) _nextWrenchSequenceId = 0x233; @@ -2891,7 +2891,7 @@ void Scene17::updateAnimations() { _nextCarWindowSequenceId = 0x249; break; case kAS17GetWrenchDone: - _vm->_platypusActionStatus = -1; + _vm->_plat->_actionStatus = -1; _vm->invAdd(kItemWrench); _vm->setGrabCursorSprite(kItemWrench); break; @@ -2900,7 +2900,7 @@ void Scene17::updateAnimations() { gameSys.insertSequence(0x24E, _vm->_platypusId, _vm->_platypusSequenceId | (_vm->_platypusSequenceDatNum << 16), _vm->_platypusId, kSeqSyncWait, 0, 0, 0); _vm->_platypusSequenceDatNum = 0; _vm->_platypusSequenceId = 0x24E; - _vm->_platypusActionStatus = kAS17LeaveScene; + _vm->_plat->_actionStatus = kAS17LeaveScene; _vm->_newSceneNum = 53; break; case kAS17PlatPhoningAssistant: @@ -2912,7 +2912,7 @@ void Scene17::updateAnimations() { gameSys.insertSequence(0x25B, _vm->_platypusId, 0x25A, _vm->_platypusId, kSeqSyncWait, 0, 0, 0); _vm->_platypusSequenceDatNum = 0; _vm->_platypusSequenceId = 0x25B; - _vm->_platypusActionStatus = -1; + _vm->_plat->_actionStatus = -1; _vm->clearFlag(kGFPlatypusTalkingToAssistant); _vm->_sceneWaiting = false; updateHotspots(); @@ -2935,7 +2935,7 @@ void Scene17::updateAnimations() { if (gameSys.getAnimationStatus(2) == 2) { switch (_nextWrenchSequenceId) { case 0x233: - _vm->_gnapActionStatus = -1; + _vm->_gnap->_actionStatus = -1; gameSys.insertSequence(0x243, _vm->_platypusId, _vm->_platypusSequenceId | (_vm->_platypusSequenceDatNum << 16), _vm->_platypusId, kSeqSyncWait, 0, 0, 0); @@ -2947,7 +2947,7 @@ void Scene17::updateAnimations() { gameSys.setAnimation(0x243, _vm->_platypusId, 1); break; case 0x234: - _vm->_gnapActionStatus = -1; + _vm->_gnap->_actionStatus = -1; gameSys.insertSequence(0x242, _vm->_platypusId, _vm->_platypusSequenceId | (_vm->_platypusSequenceDatNum << 16), _vm->_platypusId, kSeqSyncWait, 0, 0, 0); @@ -2982,7 +2982,7 @@ void Scene17::updateAnimations() { _nextWrenchSequenceId = -1; break; case 0x230: - if (_vm->_gnapActionStatus == kAS17GetWrenchGnapReady) { + if (_vm->_gnap->_actionStatus == kAS17GetWrenchGnapReady) { gameSys.setAnimation(0, 0, 2); if (_canTryGetWrench) { gameSys.insertSequence(0x22E, 40, _currWrenchSequenceId, 40, kSeqSyncWait, 0, 0, 0); @@ -2999,7 +2999,7 @@ void Scene17::updateAnimations() { _vm->_gnapSequenceId = 0x875; _vm->_platypusSequenceId = 0x23F; _vm->gnapWalkTo(3, 8, -1, 0x107B9, 1); - _vm->_platypusActionStatus = kAS17GetWrench2; + _vm->_plat->_actionStatus = kAS17GetWrench2; } break; default: @@ -3063,8 +3063,8 @@ void Scene17::updateAnimations() { _currWrenchSequenceId = 0x22D; _nextWrenchSequenceId = -1; _vm->setFlag(kGFGrassTaken); - _vm->_gnapActionStatus = -1; - _vm->_platypusActionStatus = 2; + _vm->_gnap->_actionStatus = -1; + _vm->_plat->_actionStatus = 2; updateHotspots(); _vm->_timers[5] = _vm->getRandom(30) + 80; break; @@ -3277,7 +3277,7 @@ void Scene18::platEndPhoning(bool platFl) { if (_vm->isFlag(kGFPlatypusTalkingToAssistant)) { _platPhoneIter = 0; _platPhoneCtr = 0; - _vm->_platypusActionStatus = -1; + _vm->_plat->_actionStatus = -1; if (_currPhoneSequenceId != -1) { gameSys.setAnimation(0x21E, 254, 3); gameSys.insertSequence(0x21E, 254, _currPhoneSequenceId, 254, kSeqSyncExists, 0, 0, 0); @@ -3288,7 +3288,7 @@ void Scene18::platEndPhoning(bool platFl) { gameSys.setAnimation(0, 0, 3); _vm->clearFlag(kGFPlatypusTalkingToAssistant); if (platFl) { - _vm->_platypusActionStatus = kAS18PlatComesHere; + _vm->_plat->_actionStatus = kAS18PlatComesHere; _vm->_timers[6] = 50; _vm->_sceneWaiting = true; } @@ -3299,26 +3299,26 @@ void Scene18::platEndPhoning(bool platFl) { } void Scene18::closeHydrantValve() { - _vm->_gnapActionStatus = kAS18LeaveScene; + _vm->_gnap->_actionStatus = kAS18LeaveScene; _vm->updateMouseCursor(); if (_vm->isFlag(kGFTruckFilledWithGas)) { _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS18HydrantRightValve].x, _vm->_hotspotsWalkPos[kHS18HydrantRightValve].y, 0, 0x107BA, 1); if (_vm->isFlag(kGFTruckKeysUsed)) { - _vm->_gnapActionStatus = kAS18CloseRightValveWithGarbageCan; + _vm->_gnap->_actionStatus = kAS18CloseRightValveWithGarbageCan; waitForGnapAction(); } else { - _vm->_gnapActionStatus = kAS18CloseRightValveNoGarbageCan; + _vm->_gnap->_actionStatus = kAS18CloseRightValveNoGarbageCan; waitForGnapAction(); } } else if (_vm->isFlag(kGFBarnPadlockOpen)) { _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS18HydrantTopValve].x, _vm->_hotspotsWalkPos[kHS18HydrantTopValve].y, 0, 0x107BA, 1); - _vm->_gnapActionStatus = kAS18CloseTopValve; + _vm->_gnap->_actionStatus = kAS18CloseTopValve; waitForGnapAction(); } } void Scene18::waitForGnapAction() { - while (_vm->_gnapActionStatus >= 0) { + while (_vm->_gnap->_actionStatus >= 0) { updateAnimations(); _vm->gameUpdateTick(); } @@ -3423,14 +3423,14 @@ void Scene18::run() { switch (_vm->_sceneClickedHotspot) { case kHS18Device: - if (_vm->_gnapActionStatus < 0) { + if (_vm->_gnap->_actionStatus < 0) { _vm->runMenu(); updateHotspots(); } break; case kHS18Platypus: - if (_vm->_gnapActionStatus < 0) { + if (_vm->_gnap->_actionStatus < 0) { if (_vm->isFlag(kGFPlatypusDisguised)) { gnapCarryGarbageCanTo(-1); putDownGarbageCan(0); @@ -3460,10 +3460,10 @@ void Scene18::run() { break; case kHS18CowboyHat: - if (_vm->_gnapActionStatus == kAS18StandingOnHydrant) { - _vm->_gnapActionStatus = kAS18GrabCowboyHat; + if (_vm->_gnap->_actionStatus == kAS18StandingOnHydrant) { + _vm->_gnap->_actionStatus = kAS18GrabCowboyHat; _vm->_sceneWaiting = false; - } else if (_vm->_gnapActionStatus < 0) { + } else if (_vm->_gnap->_actionStatus < 0) { if (_vm->isFlag(kGFPlatypusDisguised)) { gnapCarryGarbageCanTo(-1); putDownGarbageCan(0); @@ -3488,7 +3488,7 @@ void Scene18::run() { break; case kHS18GarbageCan: - if (_vm->_gnapActionStatus < 0) { + if (_vm->_gnap->_actionStatus < 0) { if (_vm->isFlag(kGFUnk14)) { if (_vm->_grabCursorSpriteIndex >= 0) _vm->playGnapShowCurrItem(_vm->_hotspotsWalkPos[kHS18GarbageCan].x, _vm->_hotspotsWalkPos[kHS18GarbageCan].y, 1, 5); @@ -3516,10 +3516,10 @@ void Scene18::run() { _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->_gnapActionStatus = kAS18GrabGarbageCanFromStreet; + _vm->_gnap->_actionStatus = kAS18GrabGarbageCanFromStreet; } else if (!_vm->isFlag(kGFTruckFilledWithGas)) { if (_vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS18GarbageCan].x, _vm->_hotspotsWalkPos[kHS18GarbageCan].y, 0, -1, 1)) - _vm->_gnapActionStatus = kAS18GrabGarbageCanFromHydrant; + _vm->_gnap->_actionStatus = kAS18GrabGarbageCanFromHydrant; } break; case TALK_CURSOR: @@ -3533,7 +3533,7 @@ void Scene18::run() { break; case kHS18HydrantTopValve: - if (_vm->_gnapActionStatus < 0) { + if (_vm->_gnap->_actionStatus < 0) { if (_vm->isFlag(kGFPlatypusDisguised)) { // While carrying garbage can if (_vm->_grabCursorSpriteIndex >= 0) { @@ -3550,10 +3550,10 @@ void Scene18::run() { case GRAB_CURSOR: if (_vm->isFlag(kGFTruckFilledWithGas)) { gnapCarryGarbageCanTo(2); - _vm->_gnapActionStatus = kAS18PutGarbageCanOnRunningHydrant; + _vm->_gnap->_actionStatus = kAS18PutGarbageCanOnRunningHydrant; } else if (!_vm->isFlag(kGFBarnPadlockOpen)) { gnapCarryGarbageCanTo(2); - _vm->_gnapActionStatus = kAS18PutGarbageCanOnHydrant; + _vm->_gnap->_actionStatus = kAS18PutGarbageCanOnHydrant; } else { gnapCarryGarbageCanTo(-1); putDownGarbageCan(0); @@ -3571,7 +3571,7 @@ void Scene18::run() { } else { if (_vm->_grabCursorSpriteIndex == kItemWrench) { _vm->gnapWalkTo(_vm->_gnap->_pos, 0, _vm->getGnapSequenceId(gskIdle, 2, 8) | 0x10000, 1); - _vm->_gnapActionStatus = kAS18OpenTopValve; + _vm->_gnap->_actionStatus = kAS18OpenTopValve; } else if (_vm->_grabCursorSpriteIndex >= 0) { _vm->playGnapShowCurrItem(_vm->_hotspotsWalkPos[kHS18HydrantTopValve].x, _vm->_hotspotsWalkPos[kHS18HydrantTopValve].y, 1, 5); } else { @@ -3584,7 +3584,7 @@ void Scene18::run() { _vm->_hotspots[kHS18WalkArea2]._flags |= SF_WALKABLE; _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS18HydrantTopValve].x, _vm->_hotspotsWalkPos[kHS18HydrantTopValve].y, 0, 0x107BA, 1); _vm->_hotspots[kHS18WalkArea2]._flags &= ~SF_WALKABLE; - _vm->_gnapActionStatus = kAS18CloseTopValve; + _vm->_gnap->_actionStatus = kAS18CloseTopValve; } else _vm->playGnapImpossible(0, 0); break; @@ -3599,7 +3599,7 @@ void Scene18::run() { break; case kHS18HydrantRightValve: - if (_vm->_gnapActionStatus < 0) { + if (_vm->_gnap->_actionStatus < 0) { if (_vm->isFlag(kGFUnk14)) { if (_vm->_grabCursorSpriteIndex == -1) { _vm->playGnapImpossible(0, 0); @@ -3614,9 +3614,9 @@ void Scene18::run() { if (_vm->_grabCursorSpriteIndex == kItemWrench) { _vm->gnapWalkTo(_vm->_gnap->_pos, 0, _vm->getGnapSequenceId(gskIdle, 2, 8) | 0x10000, 1); if (_vm->isFlag(kGFTruckKeysUsed)) - _vm->_gnapActionStatus = kAS18OpenRightValveWithGarbageCan; + _vm->_gnap->_actionStatus = kAS18OpenRightValveWithGarbageCan; else - _vm->_gnapActionStatus = kAS18OpenRightValveNoGarbageCan; + _vm->_gnap->_actionStatus = kAS18OpenRightValveNoGarbageCan; } else if (_vm->_grabCursorSpriteIndex >= 0) { _vm->playGnapShowCurrItem(_vm->_hotspotsWalkPos[kHS18HydrantRightValve].x, _vm->_hotspotsWalkPos[kHS18HydrantRightValve].y, 1, 5); } else { @@ -3628,9 +3628,9 @@ void Scene18::run() { if (_vm->isFlag(kGFTruckFilledWithGas)) { _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS18HydrantRightValve].x, _vm->_hotspotsWalkPos[kHS18HydrantRightValve].y, 0, 0x107BA, 1); if (_vm->isFlag(kGFTruckKeysUsed)) - _vm->_gnapActionStatus = kAS18CloseRightValveWithGarbageCan; + _vm->_gnap->_actionStatus = kAS18CloseRightValveWithGarbageCan; else - _vm->_gnapActionStatus = kAS18CloseRightValveNoGarbageCan; + _vm->_gnap->_actionStatus = kAS18CloseRightValveNoGarbageCan; } break; case TALK_CURSOR: @@ -3644,7 +3644,7 @@ void Scene18::run() { break; case kHS18ExitToyStore: - if (_vm->_gnapActionStatus < 0) { + if (_vm->_gnap->_actionStatus < 0) { if (_vm->isFlag(kGFPlatypusDisguised)) { gnapCarryGarbageCanTo(-1); putDownGarbageCan(0); @@ -3655,7 +3655,7 @@ void Scene18::run() { _vm->_isLeavingScene = true; _vm->_newSceneNum = 19; _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS18ExitToyStore].x, _vm->_hotspotsWalkPos[kHS18ExitToyStore].y, 0, 0x107C0, 1); - _vm->_gnapActionStatus = kAS18LeaveScene; + _vm->_gnap->_actionStatus = kAS18LeaveScene; if (!_vm->isFlag(kGFPlatypusTalkingToAssistant)) _vm->platypusWalkTo(_vm->_hotspotsWalkPos[kHS18ExitToyStore].x + 1, _vm->_hotspotsWalkPos[kHS18ExitToyStore].y, -1, 0x107C2, 1); } @@ -3663,7 +3663,7 @@ void Scene18::run() { break; case kHS18ExitPhoneBooth: - if (_vm->_gnapActionStatus < 0) { + if (_vm->_gnap->_actionStatus < 0) { if (_vm->isFlag(kGFPlatypusDisguised)) { gnapCarryGarbageCanTo(-1); putDownGarbageCan(0); @@ -3672,7 +3672,7 @@ void Scene18::run() { _vm->_isLeavingScene = true; _vm->_newSceneNum = 17; _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS18ExitPhoneBooth].x, _vm->_hotspotsWalkPos[kHS18ExitPhoneBooth].y, 0, 0x107AE, 1); - _vm->_gnapActionStatus = kAS18LeaveScene; + _vm->_gnap->_actionStatus = kAS18LeaveScene; if (_vm->isFlag(kGFPlatypusTalkingToAssistant)) _vm->setFlag(kGFUnk27); else @@ -3681,7 +3681,7 @@ void Scene18::run() { break; case kHS18ExitGrubCity: - if (_vm->_gnapActionStatus < 0) { + if (_vm->_gnap->_actionStatus < 0) { if (_vm->isFlag(kGFPlatypusDisguised)) { gnapCarryGarbageCanTo(-1); putDownGarbageCan(0); @@ -3691,7 +3691,7 @@ void Scene18::run() { _vm->_newSceneNum = 20; _vm->_hotspots[kHS18WalkArea2]._flags |= SF_WALKABLE; _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS18ExitGrubCity].x, _vm->_hotspotsWalkPos[kHS18ExitGrubCity].y, 0, 0x107B2, 1); - _vm->_gnapActionStatus = kAS18LeaveScene; + _vm->_gnap->_actionStatus = kAS18LeaveScene; if (_vm->isFlag(kGFPlatypusTalkingToAssistant)) platEndPhoning(false); else @@ -3702,7 +3702,7 @@ void Scene18::run() { case kHS18WalkArea1: case kHS18WalkArea2: - if (_vm->_gnapActionStatus < 0) { + if (_vm->_gnap->_actionStatus < 0) { if (_vm->isFlag(kGFPlatypusDisguised)) { gnapCarryGarbageCanTo(-1); putDownGarbageCan(0); @@ -3714,7 +3714,7 @@ void Scene18::run() { break; default: - if (_vm->_gnapActionStatus != kAS18StandingOnHydrant && _vm->_mouseClickState._left) { + if (_vm->_gnap->_actionStatus != kAS18StandingOnHydrant && _vm->_mouseClickState._left) { if (_vm->isFlag(kGFPlatypusDisguised)) { gnapCarryGarbageCanTo(-1); putDownGarbageCan(0); @@ -3732,16 +3732,16 @@ void Scene18::run() { _vm->playSound(0x10940, true); if ((_vm->isFlag(kGFTruckFilledWithGas) || _vm->isFlag(kGFBarnPadlockOpen)) && !_vm->isSoundPlaying(0x22B) && - _vm->_gnapActionStatus != kAS18OpenRightValveNoGarbageCanDone && _vm->_gnapActionStatus != kAS18OpenRightValveNoGarbageCan && - _vm->_gnapActionStatus != kAS18OpenTopValve && _vm->_gnapActionStatus != kAS18OpenTopValveDone && - _vm->_gnapActionStatus != kAS18OpenRightValveWithGarbageCan && _vm->_gnapActionStatus != kAS18OpenRightValveWithGarbageCanDone) + _vm->_gnap->_actionStatus != kAS18OpenRightValveNoGarbageCanDone && _vm->_gnap->_actionStatus != kAS18OpenRightValveNoGarbageCan && + _vm->_gnap->_actionStatus != kAS18OpenTopValve && _vm->_gnap->_actionStatus != kAS18OpenTopValveDone && + _vm->_gnap->_actionStatus != kAS18OpenRightValveWithGarbageCan && _vm->_gnap->_actionStatus != kAS18OpenRightValveWithGarbageCanDone) _vm->playSound(0x22B, true); if (!_vm->_isLeavingScene) { if (!_vm->isFlag(kGFPlatypusTalkingToAssistant)) { - if (_vm->_platypusActionStatus == kAS18PlatComesHere) { + if (_vm->_plat->_actionStatus == kAS18PlatComesHere) { if (!_vm->_timers[6]) { - _vm->_platypusActionStatus = -1; + _vm->_plat->_actionStatus = -1; _vm->_sceneWaiting = false; _vm->initPlatypusPos(-1, 10, kDirNone); _vm->platypusWalkTo(3, 9, -1, 0x107C2, 1); @@ -3756,7 +3756,7 @@ void Scene18::run() { } if (!_vm->_timers[5]) { _vm->_timers[5] = _vm->getRandom(100) + 100; - if (_vm->_gnapActionStatus < 0) { + if (_vm->_gnap->_actionStatus < 0) { if (_vm->getRandom(2) == 1) gameSys.insertSequence(0x220, 255, 0, 0, kSeqNone, 0, 0, 0); else @@ -3789,7 +3789,7 @@ void Scene18::updateAnimations() { if (gameSys.getAnimationStatus(0) == 2) { gameSys.setAnimation(0, 0, 0); - switch (_vm->_gnapActionStatus) { + switch (_vm->_gnap->_actionStatus) { case kAS18GrabGarbageCanFromStreet: if (_vm->_gnap->_idleFacing != kDirUpRight && _vm->_gnap->_idleFacing != kDirBottomRight) { gameSys.insertSequence(0x1FC, _vm->_gnapId, @@ -3807,7 +3807,7 @@ void Scene18::updateAnimations() { gameSys.removeSequence(0x1FA, 19, true); _vm->setFlag(kGFPlatypusDisguised); updateHotspots(); - _vm->_gnapActionStatus = -1; + _vm->_gnap->_actionStatus = -1; break; case kAS18GrabGarbageCanFromHydrant: gameSys.insertSequence(0x1FE, _vm->_gnapId, makeRid(_vm->_gnapSequenceDatNum, _vm->_gnapSequenceId), _vm->_gnapId, kSeqSyncWait, 0, 0, 0); @@ -3817,7 +3817,7 @@ void Scene18::updateAnimations() { _vm->clearFlag(kGFTruckKeysUsed); _vm->setFlag(kGFPlatypusDisguised); updateHotspots(); - _vm->_gnapActionStatus = -1; + _vm->_gnap->_actionStatus = -1; break; case kAS18CloseRightValveNoGarbageCan: gameSys.insertSequence(0x205, _vm->_gnapId, makeRid(_vm->_gnapSequenceDatNum, _vm->_gnapSequenceId), _vm->_gnapId, kSeqSyncWait, 0, 0, 0); @@ -3831,7 +3831,7 @@ void Scene18::updateAnimations() { _vm->invAdd(kItemWrench); _vm->setGrabCursorSprite(kItemWrench); updateHotspots(); - _vm->_gnapActionStatus = -1; + _vm->_gnap->_actionStatus = -1; break; case kAS18OpenTopValve: _vm->setFlag(kGFBarnPadlockOpen); @@ -3842,7 +3842,7 @@ void Scene18::updateAnimations() { _vm->_hotspots[kHS18WalkArea2]._flags |= SF_WALKABLE; _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS18HydrantTopValve].x, _vm->_hotspotsWalkPos[kHS18HydrantTopValve].y, 0, 0x107BB, 1); _vm->_hotspots[kHS18WalkArea2]._flags &= ~SF_WALKABLE; - _vm->_gnapActionStatus = kAS18OpenTopValveDone; + _vm->_gnap->_actionStatus = kAS18OpenTopValveDone; break; case kAS18OpenTopValveDone: _vm->setGrabCursorSprite(-1); @@ -3859,7 +3859,7 @@ void Scene18::updateAnimations() { _vm->_gnapSequenceId = 0x208; _vm->invRemove(kItemWrench); _vm->setGrabCursorSprite(-1); - _vm->_gnapActionStatus = -1; + _vm->_gnap->_actionStatus = -1; break; case kAS18CloseTopValve: gameSys.insertSequence(0x206, _vm->_gnapId, makeRid(_vm->_gnapSequenceDatNum, _vm->_gnapSequenceId), _vm->_gnapId, kSeqSyncWait, 0, 0, 0); @@ -3873,14 +3873,14 @@ void Scene18::updateAnimations() { _vm->invAdd(kItemWrench); _vm->setGrabCursorSprite(kItemWrench); updateHotspots(); - _vm->_gnapActionStatus = -1; + _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; - _vm->_gnapActionStatus = kAS18GrabCowboyHatDone; + _vm->_gnap->_actionStatus = kAS18GrabCowboyHatDone; break; case kAS18GrabCowboyHatDone: _vm->hideCursor(); @@ -3899,11 +3899,11 @@ void Scene18::updateAnimations() { _vm->setFlag(kGFTruckKeysUsed); _vm->setFlag(kGFUnk14); // Useless, already set updateHotspots(); - _vm->_gnapActionStatus = kAS18LeaveScene; + _vm->_gnap->_actionStatus = kAS18LeaveScene; break; case kAS18LeaveScene: _vm->_sceneDone = true; - _vm->_gnapActionStatus = -1; + _vm->_gnap->_actionStatus = -1; break; case kAS18PutGarbageCanOnRunningHydrant: _vm->setFlag(kGFTruckKeysUsed); @@ -3915,7 +3915,7 @@ void Scene18::updateAnimations() { gameSys.setAnimation(0x210, _vm->_gnapId, 0); _vm->_gnapSequenceDatNum = 0; _vm->_gnapSequenceId = 0x210; - _vm->_gnapActionStatus = kAS18PutGarbageCanOnRunningHydrant2; + _vm->_gnap->_actionStatus = kAS18PutGarbageCanOnRunningHydrant2; break; case kAS18PutGarbageCanOnRunningHydrant2: _vm->playSound(0x22B, true); @@ -3924,7 +3924,7 @@ void Scene18::updateAnimations() { _vm->_gnapSequenceDatNum = 0; _vm->_gnapSequenceId = 0x1FF; _vm->_sceneWaiting = true; - _vm->_gnapActionStatus = kAS18StandingOnHydrant; + _vm->_gnap->_actionStatus = kAS18StandingOnHydrant; break; case kAS18StandingOnHydrant: gameSys.setAnimation(0x1FF, _vm->_gnapId, 0); @@ -3940,10 +3940,10 @@ void Scene18::updateAnimations() { _vm->_hotspots[kHS18WalkArea2]._flags |= SF_WALKABLE; _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS18HydrantRightValve].x, _vm->_hotspotsWalkPos[kHS18HydrantRightValve].y, 0, 0x107BA, 1); _vm->_hotspots[kHS18WalkArea2]._flags &= ~SF_WALKABLE; - if (_vm->_gnapActionStatus == kAS18OpenRightValveNoGarbageCan) - _vm->_gnapActionStatus = kAS18OpenRightValveNoGarbageCanDone; + if (_vm->_gnap->_actionStatus == kAS18OpenRightValveNoGarbageCan) + _vm->_gnap->_actionStatus = kAS18OpenRightValveNoGarbageCanDone; else - _vm->_gnapActionStatus = kAS18OpenRightValveWithGarbageCanDone; + _vm->_gnap->_actionStatus = kAS18OpenRightValveWithGarbageCanDone; break; case kAS18OpenRightValveWithGarbageCanDone: _vm->setGrabCursorSprite(-1); @@ -3960,7 +3960,7 @@ void Scene18::updateAnimations() { _vm->_gnapSequenceDatNum = 0; _vm->_gnapSequenceId = 0x207; _vm->invRemove(kItemWrench); - _vm->_gnapActionStatus = -1; + _vm->_gnap->_actionStatus = -1; break; case kAS18OpenRightValveNoGarbageCanDone: _vm->setGrabCursorSprite(-1); @@ -3976,7 +3976,7 @@ void Scene18::updateAnimations() { _vm->_gnapSequenceDatNum = 0; _vm->_gnapSequenceId = 0x207; _vm->invRemove(kItemWrench); - _vm->_gnapActionStatus = -1; + _vm->_gnap->_actionStatus = -1; break; case kAS18CloseRightValveWithGarbageCan: gameSys.insertSequence(0x205, _vm->_gnapId, makeRid(_vm->_gnapSequenceDatNum, _vm->_gnapSequenceId), _vm->_gnapId, kSeqSyncWait, 0, 0, 0); @@ -3992,10 +3992,10 @@ void Scene18::updateAnimations() { updateHotspots(); _vm->_gnapSequenceDatNum = 1; _vm->_gnapSequenceId = 0x7B5; - _vm->_gnapActionStatus = kAS18CloseRightValveWithGarbageCanDone; + _vm->_gnap->_actionStatus = kAS18CloseRightValveWithGarbageCanDone; break; case kAS18CloseRightValveWithGarbageCanDone: - _vm->_gnapActionStatus = -1; + _vm->_gnap->_actionStatus = -1; break; case kAS18PutGarbageCanOnHydrant: _vm->setFlag(kGFTruckKeysUsed); @@ -4004,12 +4004,12 @@ void Scene18::updateAnimations() { gameSys.setAnimation(0x20F, _vm->_gnapId, 0); _vm->_gnapSequenceDatNum = 0; _vm->_gnapSequenceId = 0x20F; - _vm->_gnapActionStatus = kAS18PutGarbageCanOnHydrantDone; + _vm->_gnap->_actionStatus = kAS18PutGarbageCanOnHydrantDone; break; case kAS18PutGarbageCanOnHydrantDone: gameSys.insertSequence(0x1F9, 19, 0x20F, _vm->_gnapId, kSeqNone, 0, 0, 0); updateHotspots(); - _vm->_gnapActionStatus = -1; + _vm->_gnap->_actionStatus = -1; break; } } @@ -4133,14 +4133,14 @@ void Scene19::run() { switch (_vm->_sceneClickedHotspot) { case kHS19Device: - if (_vm->_gnapActionStatus < 0) { + if (_vm->_gnap->_actionStatus < 0) { _vm->runMenu(); updateHotspots(); } break; case kHS19Platypus: - if (_vm->_gnapActionStatus < 0) { + if (_vm->_gnap->_actionStatus < 0) { if (_vm->_grabCursorSpriteIndex == kItemJoint) { _vm->gnapUseJointOnPlatypus(); } else if (_vm->_grabCursorSpriteIndex >= 0) { @@ -4166,12 +4166,12 @@ void Scene19::run() { break; case kHS19ExitOutsideToyStore: - if (_vm->_gnapActionStatus < 0) { + if (_vm->_gnap->_actionStatus < 0) { _vm->_isLeavingScene = true; _vm->_newSceneNum = 18; _vm->_hotspots[kHS19WalkArea1]._flags |= SF_WALKABLE; _vm->gnapWalkTo(_vm->_hotspotsWalkPos[1].x, _vm->_hotspotsWalkPos[1].y, 0, 0x107B2, 1); - _vm->_gnapActionStatus = kAS19LeaveScene; + _vm->_gnap->_actionStatus = kAS19LeaveScene; if (_vm->isFlag(kGFPlatypusTalkingToAssistant)) _vm->setFlag(kGFUnk27); else @@ -4181,7 +4181,7 @@ void Scene19::run() { break; case kHS19Picture: - if (_vm->_gnapActionStatus < 0) { + if (_vm->_gnap->_actionStatus < 0) { if (_vm->_grabCursorSpriteIndex >= 0) { _vm->playGnapShowCurrItem(_vm->_hotspotsWalkPos[_vm->_sceneClickedHotspot].x, _vm->_hotspotsWalkPos[_vm->_sceneClickedHotspot].y, 6, 2); } else { @@ -4192,7 +4192,7 @@ void Scene19::run() { 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->_gnapActionStatus = kAS19GrabPicture; + _vm->_gnap->_actionStatus = kAS19GrabPicture; } break; case TALK_CURSOR: @@ -4205,7 +4205,7 @@ void Scene19::run() { break; case kHS19ShopAssistant: - if (_vm->_gnapActionStatus < 0) { + if (_vm->_gnap->_actionStatus < 0) { if (_vm->_grabCursorSpriteIndex >= 0) { _vm->playGnapShowCurrItem(_vm->_hotspotsWalkPos[_vm->_sceneClickedHotspot].x, _vm->_hotspotsWalkPos[_vm->_sceneClickedHotspot].y, 6, 2); } else { @@ -4216,7 +4216,7 @@ void Scene19::run() { 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->_gnapActionStatus = kAS19TalkShopAssistant; + _vm->_gnap->_actionStatus = kAS19TalkShopAssistant; break; case GRAB_CURSOR: case PLAT_CURSOR: @@ -4234,7 +4234,7 @@ void Scene19::run() { case kHS19Toy5: case kHS19Toy6: case kHS19Toy7: - if (_vm->_gnapActionStatus < 0) { + if (_vm->_gnap->_actionStatus < 0) { if (_vm->_grabCursorSpriteIndex >= 0) { _vm->playGnapImpossible(_vm->_hotspotsWalkPos[_vm->_sceneClickedHotspot].x, _vm->_hotspotsWalkPos[_vm->_sceneClickedHotspot].y); } else { @@ -4245,7 +4245,7 @@ void Scene19::run() { case GRAB_CURSOR: _vm->gnapWalkTo(_vm->_hotspotsWalkPos[_vm->_sceneClickedHotspot].x, _vm->_hotspotsWalkPos[_vm->_sceneClickedHotspot].y, 0, -1, 1); _vm->playGnapIdle(_vm->_hotspotsWalkPos[_vm->_sceneClickedHotspot].x, _vm->_hotspotsWalkPos[_vm->_sceneClickedHotspot].y); - _vm->_gnapActionStatus = kAS19GrabToy; + _vm->_gnap->_actionStatus = kAS19GrabToy; break; case TALK_CURSOR: case PLAT_CURSOR: @@ -4257,7 +4257,7 @@ void Scene19::run() { break; case kHS19Phone: - if (_vm->_gnapActionStatus < 0) { + if (_vm->_gnap->_actionStatus < 0) { if (_vm->_grabCursorSpriteIndex >= 0) { _vm->playGnapShowCurrItem(_vm->_hotspotsWalkPos[_vm->_sceneClickedHotspot].x, _vm->_hotspotsWalkPos[_vm->_sceneClickedHotspot].y, 9, 1); } else { @@ -4268,7 +4268,7 @@ void Scene19::run() { case GRAB_CURSOR: _vm->gnapWalkTo(_vm->_hotspotsWalkPos[_vm->_sceneClickedHotspot].x, _vm->_hotspotsWalkPos[_vm->_sceneClickedHotspot].y, 0, -1, 1); _vm->playGnapIdle(8, 2); - _vm->_gnapActionStatus = kAS19UsePhone; + _vm->_gnap->_actionStatus = kAS19UsePhone; break; case TALK_CURSOR: case PLAT_CURSOR: @@ -4282,7 +4282,7 @@ void Scene19::run() { case kHS19WalkArea1: case kHS19WalkArea2: case kHS19WalkArea3: - if (_vm->_gnapActionStatus < 0) + if (_vm->_gnap->_actionStatus < 0) _vm->gnapWalkTo(-1, -1, -1, -1, 1); break; @@ -4332,7 +4332,7 @@ void Scene19::updateAnimations() { if (gameSys.getAnimationStatus(0) == 2) { gameSys.setAnimation(0, 0, 0); - switch (_vm->_gnapActionStatus) { + switch (_vm->_gnap->_actionStatus) { case kAS19UsePhone: _nextShopAssistantSequenceId = 0x67; break; @@ -4361,7 +4361,7 @@ void Scene19::updateAnimations() { _vm->invAdd(kItemPicture); _vm->setFlag(kGFPictureTaken); updateHotspots(); - _vm->_gnapActionStatus = kAS19GrabPictureDone; + _vm->_gnap->_actionStatus = kAS19GrabPictureDone; break; case kAS19GrabPictureDone: _vm->setGrabCursorSprite(-1); @@ -4382,7 +4382,7 @@ void Scene19::updateAnimations() { break; case kAS19TalkShopAssistant: _nextShopAssistantSequenceId = 0x6D; - _vm->_gnapActionStatus = -1; + _vm->_gnap->_actionStatus = -1; break; case kAS19LeaveScene: _vm->_sceneDone = true; @@ -4416,14 +4416,14 @@ void Scene19::updateAnimations() { _vm->gameUpdateTick(); } _vm->playGnapIdle(6, 2); - _vm->_gnapActionStatus = -1; + _vm->_gnap->_actionStatus = -1; break; case 0x67: gameSys.setAnimation(_nextShopAssistantSequenceId, 20, 4); gameSys.insertSequence(_nextShopAssistantSequenceId, 20, _currShopAssistantSequenceId, 20, kSeqSyncWait, 0, 0, 0); _currShopAssistantSequenceId = _nextShopAssistantSequenceId; _nextShopAssistantSequenceId = -1; - _vm->_gnapActionStatus = -1; + _vm->_gnap->_actionStatus = -1; break; case 0x65: _vm->playGnapIdle(6, 2); @@ -4432,7 +4432,7 @@ void Scene19::updateAnimations() { _currShopAssistantSequenceId = _nextShopAssistantSequenceId; _nextShopAssistantSequenceId = -1; _vm->_newSceneNum = 18; - _vm->_gnapActionStatus = kAS19LeaveScene; + _vm->_gnap->_actionStatus = kAS19LeaveScene; break; case 0x6D: gameSys.setAnimation(_nextShopAssistantSequenceId, 20, 4); diff --git a/engines/gnap/scenes/group2.cpp b/engines/gnap/scenes/group2.cpp index 23afc55907..229aad4eb6 100644 --- a/engines/gnap/scenes/group2.cpp +++ b/engines/gnap/scenes/group2.cpp @@ -77,7 +77,7 @@ void Scene20::updateAnimationsCb() { _vm->invAdd(kItemJoint); _vm->setFlag(kGFJointTaken); _stonerGuyShowingJoint = false; - _vm->_gnapActionStatus = kAS20GrabJointDone; + _vm->_gnap->_actionStatus = kAS20GrabJointDone; break; case 0x16E: gameSys.setAnimation(0x16E, 21, 2); @@ -92,7 +92,7 @@ void Scene20::updateAnimationsCb() { gameSys.insertSequence(_nextStonerGuySequenceId, 21, _currStonerGuySequenceId, 21, kSeqSyncWait, 0, 0, 0); _currStonerGuySequenceId = _nextStonerGuySequenceId; _nextStonerGuySequenceId = -1; - _vm->_gnapActionStatus = kAS20ActionDone; + _vm->_gnap->_actionStatus = kAS20ActionDone; break; case 0x16F: gameSys.setAnimation(_nextStonerGuySequenceId, 21, 2); @@ -264,14 +264,14 @@ void Scene20::run() { switch (_vm->_sceneClickedHotspot) { case kHS20Device: - if (_vm->_gnapActionStatus < 0) { + if (_vm->_gnap->_actionStatus < 0) { _vm->runMenu(); updateHotspots(); } break; case kHS20Platypus: - if (_vm->_gnapActionStatus < 0) { + if (_vm->_gnap->_actionStatus < 0) { if (_vm->_grabCursorSpriteIndex == kItemJoint) { _vm->gnapUseJointOnPlatypus(); } else if (_vm->_grabCursorSpriteIndex >= 0) { @@ -297,71 +297,71 @@ void Scene20::run() { break; case kHS20ExitParkingLot: - if (_vm->_gnapActionStatus < 0) { + if (_vm->_gnap->_actionStatus < 0) { if (_stonerGuyShowingJoint) _vm->_timers[4] = 0; _vm->_isLeavingScene = true; _vm->_newSceneNum = 21; _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS20ExitParkingLot].x, _vm->_hotspotsWalkPos[kHS20ExitParkingLot].y, 0, 0x107AF, 1); - _vm->_gnapActionStatus = kAS20LeaveScene; + _vm->_gnap->_actionStatus = kAS20LeaveScene; _vm->platypusWalkTo(_vm->_hotspotsWalkPos[kHS20ExitParkingLot].x, _vm->_hotspotsWalkPos[kHS20ExitParkingLot].y + 1, -1, 0x107CF, 1); _vm->_plat->_idleFacing = kDirUnk4; } break; case kHS20ExitPhone: - if (_vm->_gnapActionStatus < 0) { + if (_vm->_gnap->_actionStatus < 0) { if (_stonerGuyShowingJoint) _vm->_timers[4] = 0; _vm->_isLeavingScene = true; _vm->_newSceneNum = 17; _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS20ExitPhone].x, _vm->_hotspotsWalkPos[kHS20ExitPhone].y, 0, 0x107AE, 1); - _vm->_gnapActionStatus = kAS20LeaveScene; + _vm->_gnap->_actionStatus = kAS20LeaveScene; _vm->platypusWalkTo(_vm->_hotspotsWalkPos[kHS20ExitPhone].x + 1, _vm->_hotspotsWalkPos[kHS20ExitPhone].y, -1, 0x107C2, 1); } break; case kHS20ExitOutsideToyStore: - if (_vm->_gnapActionStatus < 0) { + if (_vm->_gnap->_actionStatus < 0) { if (_stonerGuyShowingJoint) _vm->_timers[4] = 0; _vm->_isLeavingScene = true; _vm->_newSceneNum = 18; _vm->_hotspots[kHS20WalkArea2]._flags |= SF_WALKABLE; _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS20ExitOutsideToyStore].x, _vm->_hotspotsWalkPos[kHS20ExitOutsideToyStore].y, 0, 0x107AB, 1); - _vm->_gnapActionStatus = kAS20LeaveScene; + _vm->_gnap->_actionStatus = kAS20LeaveScene; _vm->platypusWalkTo(_vm->_hotspotsWalkPos[kHS20ExitOutsideToyStore].x, _vm->_hotspotsWalkPos[kHS20ExitOutsideToyStore].y + 1, -1, 0x107CD, 1); _vm->_hotspots[kHS20WalkArea2]._flags &= ~SF_WALKABLE; } break; case kHS20ExitInsideGrubCity: - if (_vm->_gnapActionStatus < 0) { + if (_vm->_gnap->_actionStatus < 0) { if (_stonerGuyShowingJoint) _vm->_timers[4] = 0; _vm->_isLeavingScene = true; _vm->_newSceneNum = 22; _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS20ExitInsideGrubCity].x, _vm->_hotspotsWalkPos[kHS20ExitInsideGrubCity].y - 1, 0, 0x107BB, 1); - _vm->_gnapActionStatus = kAS20LeaveScene; + _vm->_gnap->_actionStatus = kAS20LeaveScene; _vm->platypusWalkTo(_vm->_hotspotsWalkPos[kHS20ExitInsideGrubCity].x + 1, _vm->_hotspotsWalkPos[kHS20ExitInsideGrubCity].y, -1, 0x107C2, 1); _vm->_plat->_idleFacing = kDirUnk4; } break; case kHS20ExitOutsideCircusWorld: - if (_vm->_gnapActionStatus < 0) { + if (_vm->_gnap->_actionStatus < 0) { if (_stonerGuyShowingJoint) _vm->_timers[4] = 0; _vm->_isLeavingScene = true; _vm->_newSceneNum = 24; _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS20ExitOutsideCircusWorld].x, _vm->_hotspotsWalkPos[kHS20ExitOutsideCircusWorld].y, 0, 0x107BB, 1); - _vm->_gnapActionStatus = kAS20LeaveScene; + _vm->_gnap->_actionStatus = kAS20LeaveScene; _vm->platypusWalkTo(_vm->_hotspotsWalkPos[kHS20ExitOutsideCircusWorld].x + 1, _vm->_hotspotsWalkPos[kHS20ExitOutsideCircusWorld].y, -1, 0x107C2, 1); } break; case kHS20StonerGuy: - if (_vm->_gnapActionStatus < 0) { + if (_vm->_gnap->_actionStatus < 0) { if (_vm->_grabCursorSpriteIndex >= 0) { _vm->playGnapShowCurrItem(_vm->_hotspotsWalkPos[kHS20StonerGuy].x, _vm->_hotspotsWalkPos[kHS20StonerGuy].y, 5, 4); } else { @@ -373,7 +373,7 @@ void Scene20::run() { _vm->_gnap->_idleFacing = kDirUpRight; _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS20StonerGuy].x, _vm->_hotspotsWalkPos[kHS20StonerGuy].y, 0, _vm->getGnapSequenceId(gskIdle, 0, 0) | 0x10000, 1); if (_stonerGuyShowingJoint) - _vm->_gnapActionStatus = kAS20GrabJoint; + _vm->_gnap->_actionStatus = kAS20GrabJoint; else _vm->playGnapImpossible(0, 0); break; @@ -381,9 +381,9 @@ void Scene20::run() { _vm->_gnap->_idleFacing = kDirUpRight; _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS20StonerGuy].x, _vm->_hotspotsWalkPos[kHS20StonerGuy].y, 0, _vm->getGnapSequenceId(gskBrainPulsating, 0, 0) | 0x10000, 1); if (_vm->isFlag(kGFJointTaken)) - _vm->_gnapActionStatus = kAS20TalkStonerGuyNoJoint; + _vm->_gnap->_actionStatus = kAS20TalkStonerGuyNoJoint; else - _vm->_gnapActionStatus = kAS20TalkStonerGuyHasJoint; + _vm->_gnap->_actionStatus = kAS20TalkStonerGuyHasJoint; break; case PLAT_CURSOR: _vm->playGnapImpossible(0, 0); @@ -394,7 +394,7 @@ void Scene20::run() { break; case kHS20GroceryStoreGuy: - if (_vm->_gnapActionStatus < 0) { + if (_vm->_gnap->_actionStatus < 0) { if (_vm->_grabCursorSpriteIndex >= 0) { _vm->playGnapShowCurrItem(_vm->_hotspotsWalkPos[kHS20GroceryStoreGuy].x, _vm->_hotspotsWalkPos[kHS20GroceryStoreGuy].y, 2, 4); } else { @@ -406,12 +406,12 @@ void Scene20::run() { _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->_gnapActionStatus = kAS20GrabGroceryStoreGuy; + _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->_gnapActionStatus = kAS20TalkGroceryStoreGuy; + _vm->_gnap->_actionStatus = kAS20TalkGroceryStoreGuy; break; case PLAT_CURSOR: _vm->playGnapImpossible(0, 0); @@ -422,11 +422,11 @@ void Scene20::run() { break; case kHS20GroceryStoreHat: - if (_vm->_gnapActionStatus < 0) { + 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->_gnapActionStatus = kAS20SwitchGroceryStoreHat; + _vm->_gnap->_actionStatus = kAS20SwitchGroceryStoreHat; } else if (_vm->_grabCursorSpriteIndex >= 0) { _vm->playGnapShowCurrItem(_vm->_hotspotsWalkPos[kHS20GroceryStoreHat].x, _vm->_hotspotsWalkPos[kHS20GroceryStoreHat].y, 1, 6); } else { @@ -438,7 +438,7 @@ void Scene20::run() { _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->_gnapActionStatus = kAS20GrabGroceryStoreHat; + _vm->_gnap->_actionStatus = kAS20GrabGroceryStoreHat; break; case TALK_CURSOR: case PLAT_CURSOR: @@ -469,14 +469,14 @@ void Scene20::run() { _vm->playSound(0x10940, true); if (!_vm->_isLeavingScene) { - if (_vm->_platypusActionStatus < 0) { + if (_vm->_plat->_actionStatus < 0) { _vm->_hotspots[kHS20WalkArea1]._y2 += 48; _vm->updatePlatypusIdleSequence(); _vm->_hotspots[kHS20WalkArea1]._y2 -= 48; } - if (_vm->_gnapActionStatus < 0) + if (_vm->_gnap->_actionStatus < 0) _vm->updateGnapIdleSequence(); - if (_vm->_gnapActionStatus < 0 && !_vm->_timers[5] && _nextGroceryStoreGuySequenceId == -1) { + if (_vm->_gnap->_actionStatus < 0 && !_vm->_timers[5] && _nextGroceryStoreGuySequenceId == -1) { _vm->_timers[5] = _vm->getRandom(50) + 130; if (_vm->getRandom(4) != 0) _nextGroceryStoreGuySequenceId = 0x17C; @@ -485,7 +485,7 @@ void Scene20::run() { } if (!_vm->_timers[7]) { _vm->_timers[7] = _vm->getRandom(100) + 100; - if (_vm->_gnapActionStatus < 0 && _vm->_platypusActionStatus < 0) { + if (_vm->_gnap->_actionStatus < 0 && _vm->_plat->_actionStatus < 0) { switch (_vm->getRandom(3)) { case 0: gameSys.insertSequence(0x183, 253, 0, 0, kSeqNone, 0, 0, 0); @@ -518,7 +518,7 @@ void Scene20::updateAnimations() { if (gameSys.getAnimationStatus(0) == 2) { gameSys.setAnimation(0, 0, 0); - switch (_vm->_gnapActionStatus) { + switch (_vm->_gnap->_actionStatus) { case kAS20LeaveScene: _vm->_sceneDone = true; break; @@ -552,13 +552,13 @@ void Scene20::updateAnimations() { _vm->_timers[6] = 200; _vm->_timers[4] = 100; _stonerGuyShowingJoint = true; - _vm->_gnapActionStatus = -1; + _vm->_gnap->_actionStatus = -1; break; case kAS20GrabJoint: _nextStonerGuySequenceId = 0x16A; break; case kAS20ActionDone: - _vm->_gnapActionStatus = -1; + _vm->_gnap->_actionStatus = -1; break; case kAS20TalkGroceryStoreGuy: gameSys.setAnimation(0x170, 21, 2); @@ -609,7 +609,7 @@ void Scene20::updateAnimations() { _vm->_gnapSequenceDatNum = 0; _vm->invRemove(kItemCowboyHat); _vm->invAdd(kItemGroceryStoreHat); - _vm->_gnapActionStatus = kAS20SwitchGroceryStoreHatDone; + _vm->_gnap->_actionStatus = kAS20SwitchGroceryStoreHatDone; break; case kAS20SwitchGroceryStoreHatDone: gameSys.insertSequence(0x17F, 20, 372, 20, kSeqSyncWait, 0, 0, 0); @@ -626,11 +626,11 @@ void Scene20::updateAnimations() { _vm->setGrabCursorSprite(kItemGroceryStoreHat); _vm->_gnap->_idleFacing = kDirBottomRight; _vm->gnapWalkTo(3, 8, -1, _vm->getGnapSequenceId(gskIdle, 0, 0) | 0x10000, 1); - _vm->_gnapActionStatus = -1; + _vm->_gnap->_actionStatus = -1; break; case kAS20GrabJointDone: _vm->setGrabCursorSprite(kItemJoint); - _vm->_gnapActionStatus = -1; + _vm->_gnap->_actionStatus = -1; break; } } @@ -652,7 +652,7 @@ void Scene20::updateAnimations() { gameSys.insertSequence(0x17D, _vm->_gnapId, makeRid(_vm->_gnapSequenceDatNum, _vm->_gnapSequenceId), _vm->_gnapId, kSeqSyncWait, 0, 0, 0); _vm->_gnapSequenceId = 0x17D; _vm->_gnapSequenceDatNum = 0; - _vm->_gnapActionStatus = kAS20ActionDone; + _vm->_gnap->_actionStatus = kAS20ActionDone; gameSys.setAnimation(0x16D, 21, 2); gameSys.insertSequence(0x16D, 21, _currStonerGuySequenceId, 21, kSeqSyncWait, 0, 0, 0); _currStonerGuySequenceId = 0x16D; @@ -667,7 +667,7 @@ void Scene20::updateAnimations() { gameSys.insertSequence(0x17E, _vm->_gnapId, makeRid(_vm->_gnapSequenceDatNum, _vm->_gnapSequenceId), _vm->_gnapId, kSeqSyncWait, 0, 0, 0); _vm->_gnapSequenceId = 0x17E; _vm->_gnapSequenceDatNum = 0; - _vm->_gnapActionStatus = kAS20ActionDone; + _vm->_gnap->_actionStatus = kAS20ActionDone; gameSys.setAnimation(0x16D, 21, 2); gameSys.insertSequence(0x16D, 21, _currStonerGuySequenceId, 21, kSeqSyncWait, 0, 0, 0); _currStonerGuySequenceId = 0x16D; @@ -690,7 +690,7 @@ void Scene20::updateAnimations() { gameSys.insertSequence(0x175, 20, _currGroceryStoreGuySequenceId, 20, kSeqSyncWait, 0, 0, 0); _currGroceryStoreGuySequenceId = 0x175; _nextGroceryStoreGuySequenceId = -1; - _vm->_gnapActionStatus = kAS20ActionDone; + _vm->_gnap->_actionStatus = kAS20ActionDone; break; default: if (_nextGroceryStoreGuySequenceId != -1) { @@ -782,14 +782,14 @@ void Scene21::run() { switch (_vm->_sceneClickedHotspot) { case kHS21Device: - if (_vm->_gnapActionStatus < 0) { + if (_vm->_gnap->_actionStatus < 0) { _vm->runMenu(); updateHotspots(); } break; case kHS21Platypus: - if (_vm->_gnapActionStatus < 0) { + if (_vm->_gnap->_actionStatus < 0) { if (_vm->_grabCursorSpriteIndex == kItemJoint) { _vm->gnapUseJointOnPlatypus(); } else if (_vm->_grabCursorSpriteIndex >= 0) { @@ -815,7 +815,7 @@ void Scene21::run() { break; case kHS21Banana: - if (_vm->_gnapActionStatus < 0) { + if (_vm->_gnap->_actionStatus < 0) { if (_vm->_grabCursorSpriteIndex >= 0) { _vm->playGnapShowItem(_vm->_grabCursorSpriteIndex, 2, 5); } else { @@ -827,7 +827,7 @@ void Scene21::run() { _vm->gnapWalkTo(_vm->_gnap->_pos, 0, _vm->getGnapSequenceId(gskIdle, _vm->_hotspotsWalkPos[kHS21Banana].x, _vm->_hotspotsWalkPos[kHS21Banana].y) | 0x10000, 1); _vm->playGnapPullOutDevice(2, 5); _vm->playGnapUseDevice(0, 0); - _vm->_gnapActionStatus = kAS21GrabBanana; + _vm->_gnap->_actionStatus = kAS21GrabBanana; break; case TALK_CURSOR: case PLAT_CURSOR: @@ -838,11 +838,11 @@ void Scene21::run() { break; case kHS21OldLady: - if (_vm->_gnapActionStatus < 0) { + 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->_gnapActionStatus = kAS21UseHatWithOldLady; + _vm->_gnap->_actionStatus = kAS21UseHatWithOldLady; } else if (_vm->_grabCursorSpriteIndex >= 0) { _vm->playGnapShowCurrItem(4, 6, 7, 4); } else { @@ -854,13 +854,13 @@ void Scene21::run() { _vm->_gnap->_idleFacing = kDirUpLeft; _vm->_hotspots[kHS21WalkArea1]._flags |= SF_WALKABLE; _vm->gnapWalkTo(7, 6, 0, _vm->getGnapSequenceId(gskIdle, 0, 0) | 0x10000, 1); - _vm->_gnapActionStatus = kAS21GrabOldLady; + _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->_gnapActionStatus = kAS21TalkOldLady; + _vm->_gnap->_actionStatus = kAS21TalkOldLady; break; case PLAT_CURSOR: _vm->playGnapImpossible(0, 0); @@ -871,11 +871,11 @@ void Scene21::run() { break; case kHS21ExitOutsideGrubCity: - if (_vm->_gnapActionStatus < 0) { + if (_vm->_gnap->_actionStatus < 0) { _vm->_isLeavingScene = true; _vm->_newSceneNum = 20; _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS21ExitOutsideGrubCity].x, _vm->_hotspotsWalkPos[kHS21ExitOutsideGrubCity].y, 0, 0x107B3, 1); - _vm->_gnapActionStatus = kAS21LeaveScene; + _vm->_gnap->_actionStatus = kAS21LeaveScene; _vm->platypusWalkTo(_vm->_hotspotsWalkPos[kHS21ExitOutsideGrubCity].x + 1, _vm->_hotspotsWalkPos[kHS21ExitOutsideGrubCity].y, -1, 0x107C2, 1); } break; @@ -902,7 +902,7 @@ void Scene21::run() { if (!_vm->_isLeavingScene) { _vm->updatePlatypusIdleSequence(); _vm->updateGnapIdleSequence(); - if (!_vm->isFlag(kGFTwigTaken) && !_vm->_timers[4] && _nextOldLadySequenceId == -1 && _vm->_gnapActionStatus == -1) { + if (!_vm->isFlag(kGFTwigTaken) && !_vm->_timers[4] && _nextOldLadySequenceId == -1 && _vm->_gnap->_actionStatus == -1) { _vm->_timers[4] = _vm->getRandom(30) + 50; switch (_vm->getRandom(5)) { case 0: @@ -940,10 +940,10 @@ void Scene21::updateAnimations() { if (gameSys.getAnimationStatus(0) == 2) { gameSys.setAnimation(0, 0, 0); - switch (_vm->_gnapActionStatus) { + switch (_vm->_gnap->_actionStatus) { case kAS21TalkOldLady: _nextOldLadySequenceId = 0x8B; - _vm->_gnapActionStatus = -1; + _vm->_gnap->_actionStatus = -1; break; case kAS21GrabBanana: gameSys.setAnimation(0x8C, 59, 0); @@ -951,11 +951,11 @@ void Scene21::updateAnimations() { _vm->setFlag(kGFUnk04); _vm->invAdd(kItemBanana); updateHotspots(); - _vm->_gnapActionStatus = kAS21GrabBananaDone; + _vm->_gnap->_actionStatus = kAS21GrabBananaDone; break; case kAS21GrabBananaDone: _vm->setGrabCursorSprite(kItemBanana); - _vm->_gnapActionStatus = -1; + _vm->_gnap->_actionStatus = -1; break; case kAS21GrabOldLady: _vm->_timers[4] = _vm->getRandom(30) + 50; @@ -966,7 +966,7 @@ void Scene21::updateAnimations() { gameSys.insertSequence(0x8F, _vm->_gnapId, makeRid(_vm->_gnapSequenceDatNum, _vm->_gnapSequenceId), _vm->_gnapId, kSeqSyncWait, 0, 0, 0); _vm->_gnapSequenceDatNum = 0; _vm->_gnapSequenceId = 0x8F; - _vm->_gnapActionStatus = kAS21UseHatWithOldLadyDone; + _vm->_gnap->_actionStatus = kAS21UseHatWithOldLadyDone; _vm->invAdd(kItemTickets); _vm->invRemove(kItemGroceryStoreHat); _vm->setGrabCursorSprite(-1); @@ -987,13 +987,13 @@ void Scene21::updateAnimations() { gameSys.insertSequence(0x86, _vm->_gnapId, makeRid(_vm->_gnapSequenceDatNum, _vm->_gnapSequenceId), _vm->_gnapId, kSeqSyncWait, 0, 0, 0); _vm->_gnapSequenceId = 0x86; _vm->_gnapSequenceDatNum = 0; - _vm->_gnapActionStatus = -1; + _vm->_gnap->_actionStatus = -1; _currOldLadySequenceId = _nextOldLadySequenceId; _nextOldLadySequenceId = -1; } else if (_nextOldLadySequenceId == 0x91) { gameSys.setAnimation(0x91, 79, 0); gameSys.insertSequence(_nextOldLadySequenceId, 79, _currOldLadySequenceId, 79, kSeqSyncWait, 0, 0, 0); - _vm->_gnapActionStatus = kAS21LeaveScene; + _vm->_gnap->_actionStatus = kAS21LeaveScene; _currOldLadySequenceId = _nextOldLadySequenceId; _nextOldLadySequenceId = -1; } else { @@ -1098,14 +1098,14 @@ void Scene22::run() { switch (_vm->_sceneClickedHotspot) { case kHS22Device: - if (_vm->_gnapActionStatus < 0) { + if (_vm->_gnap->_actionStatus < 0) { _vm->runMenu(); updateHotspots(); } break; case kHS22Platypus: - if (_vm->_gnapActionStatus < 0) { + if (_vm->_gnap->_actionStatus < 0) { if (_vm->_grabCursorSpriteIndex == kItemJoint) { _vm->gnapUseJointOnPlatypus(); } else if (_vm->_grabCursorSpriteIndex >= 0) { @@ -1131,27 +1131,27 @@ void Scene22::run() { break; case kHS22ExitOutsideGrubCity: - if (_vm->_gnapActionStatus < 0) { + if (_vm->_gnap->_actionStatus < 0) { _vm->_isLeavingScene = true; _vm->_newSceneNum = 20; _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS22ExitOutsideGrubCity].x, _vm->_hotspotsWalkPos[kHS22ExitOutsideGrubCity].y, 0, 0x107AF, 1); - _vm->_gnapActionStatus = kAS22LeaveScene; + _vm->_gnap->_actionStatus = kAS22LeaveScene; _vm->platypusWalkTo(_vm->_hotspotsWalkPos[kHS22ExitOutsideGrubCity].x, _vm->_hotspotsWalkPos[kHS22ExitOutsideGrubCity].y + 1, -1, 0x107C2, 1); } break; case kHS22ExitBackGrubCity: - if (_vm->_gnapActionStatus < 0) { + if (_vm->_gnap->_actionStatus < 0) { _vm->_isLeavingScene = true; _vm->_newSceneNum = 23; _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS22ExitBackGrubCity].x, _vm->_hotspotsWalkPos[kHS22ExitBackGrubCity].y, 0, 0x107AB, 1); - _vm->_gnapActionStatus = kAS22LeaveScene; + _vm->_gnap->_actionStatus = kAS22LeaveScene; _vm->platypusWalkTo(_vm->_hotspotsWalkPos[kHS22ExitBackGrubCity].x, _vm->_hotspotsWalkPos[kHS22ExitBackGrubCity].y + 1, -1, 0x107C2, 1); } break; case kHS22Cashier: - if (_vm->_gnapActionStatus < 0) { + if (_vm->_gnap->_actionStatus < 0) { if (_vm->_grabCursorSpriteIndex >= 0) { _vm->playGnapShowCurrItem(_vm->_hotspotsWalkPos[kHS22Cashier].x, _vm->_hotspotsWalkPos[kHS22Cashier].y, 8, 4); } else { @@ -1166,7 +1166,7 @@ void Scene22::run() { _vm->_gnap->_idleFacing = kDirUpRight; _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS22Cashier].x, _vm->_hotspotsWalkPos[kHS22Cashier].y, 0, _vm->getGnapSequenceId(gskBrainPulsating, 0, 0) | 0x10000, 1); - _vm->_gnapActionStatus = kAS22TalkCashier; + _vm->_gnap->_actionStatus = kAS22TalkCashier; break; case PLAT_CURSOR: _vm->gnapUseDeviceOnPlatypus(); @@ -1239,7 +1239,7 @@ void Scene22::updateAnimations() { if (gameSys.getAnimationStatus(0) == 2) { gameSys.setAnimation(0, 0, 0); - switch (_vm->_gnapActionStatus) { + switch (_vm->_gnap->_actionStatus) { case kAS22LeaveScene: _vm->_sceneDone = true; break; @@ -1247,7 +1247,7 @@ void Scene22::updateAnimations() { _nextCashierSequenceId = 0x5C; break; } - _vm->_gnapActionStatus = -1; + _vm->_gnap->_actionStatus = -1; } if (gameSys.getAnimationStatus(3) == 2 && _nextCashierSequenceId != -1) { @@ -1322,14 +1322,14 @@ void Scene23::run() { switch (_vm->_sceneClickedHotspot) { case kHS23Device: - if (_vm->_gnapActionStatus < 0) { + if (_vm->_gnap->_actionStatus < 0) { _vm->runMenu(); updateHotspots(); } break; case kHS23Platypus: - if (_vm->_gnapActionStatus < 0) { + if (_vm->_gnap->_actionStatus < 0) { if (_vm->_grabCursorSpriteIndex == kItemJoint) { _vm->gnapUseJointOnPlatypus(); } else if (_vm->_grabCursorSpriteIndex >= 0) { @@ -1355,7 +1355,7 @@ void Scene23::run() { break; case kHS23Cereals: - if (_vm->_gnapActionStatus < 0) { + if (_vm->_gnap->_actionStatus < 0) { if (_vm->_grabCursorSpriteIndex >= 0) { _vm->playGnapShowCurrItem(_vm->_hotspotsWalkPos[kHS23Cereals].x, _vm->_hotspotsWalkPos[kHS23Cereals].y, 5, 4); } else { @@ -1366,7 +1366,7 @@ void Scene23::run() { else { _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS23Cereals].x, _vm->_hotspotsWalkPos[kHS23Cereals].y, 0, _vm->getGnapSequenceId(gskIdle, 0, 0) | 0x10000, 1); - _vm->_gnapActionStatus = kAS23LookCereals; + _vm->_gnap->_actionStatus = kAS23LookCereals; } break; case GRAB_CURSOR: @@ -1377,7 +1377,7 @@ void Scene23::run() { _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS23Cereals].x, _vm->_hotspotsWalkPos[kHS23Cereals].y, 0, _vm->getGnapSequenceId(gskIdle, 0, 0) | 0x10000, 1); _vm->setFlag(kGFSceneFlag1); - _vm->_gnapActionStatus = kAS23GrabCereals; + _vm->_gnap->_actionStatus = kAS23GrabCereals; _vm->invAdd(kItemCereals); } break; @@ -1391,18 +1391,18 @@ void Scene23::run() { break; case kHS23ExitFrontGrubCity: - if (_vm->_gnapActionStatus < 0) { + if (_vm->_gnap->_actionStatus < 0) { _vm->_isLeavingScene = true; _vm->_newSceneNum = 22; _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS23ExitFrontGrubCity].x, _vm->_hotspotsWalkPos[kHS23ExitFrontGrubCity].y, 0, 0x107AF, 1); - _vm->_gnapActionStatus = kAS23LeaveScene; + _vm->_gnap->_actionStatus = kAS23LeaveScene; _vm->platypusWalkTo(_vm->_hotspotsWalkPos[kHS23ExitFrontGrubCity].x, _vm->_hotspotsWalkPos[kHS23ExitFrontGrubCity].y - 1, -1, 0x107C2, 1); } break; case kHS23WalkArea1: case kHS23WalkArea2: - if (_vm->_gnapActionStatus < 0) + if (_vm->_gnap->_actionStatus < 0) _vm->gnapWalkTo(-1, -1, -1, -1, 1); break; @@ -1419,7 +1419,7 @@ void Scene23::run() { if (!_vm->_isLeavingScene) { _vm->updatePlatypusIdleSequence(); _vm->updateGnapIdleSequence(); - if (!_vm->_timers[4] && _vm->_gnapActionStatus == -1) { + if (!_vm->_timers[4] && _vm->_gnap->_actionStatus == -1) { _vm->_timers[4] = _vm->getRandom(100) + 200; switch (_vm->getRandom(4)) { case 0: @@ -1467,10 +1467,10 @@ void Scene23::updateAnimations() { if (gameSys.getAnimationStatus(0) == 2) { gameSys.setAnimation(0, 0, 0); - switch (_vm->_gnapActionStatus) { + switch (_vm->_gnap->_actionStatus) { case kAS23LookCereals: _vm->showFullScreenSprite(0x48); - _vm->_gnapActionStatus = -1; + _vm->_gnap->_actionStatus = -1; break; case kAS23GrabCereals: gameSys.setAnimation(0xBE, _vm->_gnapId, 0); @@ -1478,11 +1478,11 @@ void Scene23::updateAnimations() { gameSys.requestRemoveSequence(0xBF, 2); _vm->_gnapSequenceDatNum = 0; _vm->_gnapSequenceId = 0xBE; - _vm->_gnapActionStatus = kAS23GrabCerealsDone; + _vm->_gnap->_actionStatus = kAS23GrabCerealsDone; break; case kAS23GrabCerealsDone: _vm->setGrabCursorSprite(kItemCereals); - _vm->_gnapActionStatus = -1; + _vm->_gnap->_actionStatus = -1; break; case kAS23LeaveScene: _vm->_sceneDone = true; @@ -1591,14 +1591,14 @@ void Scene24::run() { switch (_vm->_sceneClickedHotspot) { case kHS24Device: - if (_vm->_gnapActionStatus < 0) { + if (_vm->_gnap->_actionStatus < 0) { _vm->runMenu(); updateHotspots(); } break; case kHS24Platypus: - if (_vm->_gnapActionStatus < 0) { + if (_vm->_gnap->_actionStatus < 0) { if (_vm->_grabCursorSpriteIndex == kItemJoint) { _vm->gnapUseJointOnPlatypus(); } else if (_vm->_grabCursorSpriteIndex >= 0) { @@ -1624,22 +1624,22 @@ void Scene24::run() { break; case kHS24ExitCircusWorld: - if (_vm->_gnapActionStatus < 0) { + if (_vm->_gnap->_actionStatus < 0) { _vm->_isLeavingScene = true; _vm->_newSceneNum = 25; _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS24ExitCircusWorld].x, _vm->_hotspotsWalkPos[kHS24ExitCircusWorld].y, 0, 0x107AB, 1); - _vm->_gnapActionStatus = kAS24LeaveScene; + _vm->_gnap->_actionStatus = kAS24LeaveScene; _vm->platypusWalkTo(_vm->_hotspotsWalkPos[kHS24ExitCircusWorld].x + 1, _vm->_hotspotsWalkPos[kHS24ExitCircusWorld].y, -1, 0x107C2, 1); } break; case kHS24ExitOutsideGrubCity: - if (_vm->_gnapActionStatus < 0) { + if (_vm->_gnap->_actionStatus < 0) { _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->_gnapActionStatus = kAS24LeaveScene; + _vm->_gnap->_actionStatus = kAS24LeaveScene; _vm->platypusWalkTo(_vm->_hotspotsWalkPos[kHS24ExitOutsideGrubCity].x + 1, _vm->_hotspotsWalkPos[kHS24ExitOutsideGrubCity].y, -1, 0x107C2, 1); } break; @@ -1647,7 +1647,7 @@ void Scene24::run() { case kHS24WalkArea1: case kHS24WalkArea2: case kHS24WalkArea3: - if (_vm->_gnapActionStatus == -1) + if (_vm->_gnap->_actionStatus == -1) _vm->gnapWalkTo(-1, -1, -1, -1, 1); break; @@ -1729,9 +1729,9 @@ void Scene24::updateAnimations() { if (gameSys.getAnimationStatus(0) == 2) { gameSys.setAnimation(0, 0, 0); - if (_vm->_gnapActionStatus == kAS24LeaveScene) + if (_vm->_gnap->_actionStatus == kAS24LeaveScene) _vm->_sceneDone = true; - _vm->_gnapActionStatus = -1; + _vm->_gnap->_actionStatus = -1; } } @@ -1837,14 +1837,14 @@ void Scene25::run() { switch (_vm->_sceneClickedHotspot) { case kHS25Device: - if (_vm->_gnapActionStatus < 0) { + if (_vm->_gnap->_actionStatus < 0) { _vm->runMenu(); updateHotspots(); } break; case kHS25Platypus: - if (_vm->_gnapActionStatus < 0) { + if (_vm->_gnap->_actionStatus < 0) { if (_vm->_grabCursorSpriteIndex == kItemJoint) { _vm->gnapUseJointOnPlatypus(); } else if (_vm->_grabCursorSpriteIndex >= 0) { @@ -1870,9 +1870,9 @@ void Scene25::run() { break; case kHS25TicketVendor: - if (_vm->_gnapActionStatus < 0) { + if (_vm->_gnap->_actionStatus < 0) { if (_vm->_grabCursorSpriteIndex == kItemTickets) { - _vm->_gnapActionStatus = kAS25ShowTicketToVendor; + _vm->_gnap->_actionStatus = kAS25ShowTicketToVendor; _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS25TicketVendor].x, _vm->_hotspotsWalkPos[kHS25TicketVendor].y, 0, _vm->getGnapSequenceId(gskIdle, 9, 4) | 0x10000, 1); _vm->playGnapPullOutDevice(0, 0); @@ -1889,7 +1889,7 @@ void Scene25::run() { 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->_gnapActionStatus = kAS25TalkTicketVendor; + _vm->_gnap->_actionStatus = kAS25TalkTicketVendor; break; case GRAB_CURSOR: case PLAT_CURSOR: @@ -1901,29 +1901,29 @@ void Scene25::run() { break; case kHS25ExitOutsideCircusWorld: - if (_vm->_gnapActionStatus < 0) { + if (_vm->_gnap->_actionStatus < 0) { _vm->_isLeavingScene = true; _vm->_newSceneNum = 24; _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS25ExitOutsideCircusWorld].x, _vm->_hotspotsWalkPos[kHS25ExitOutsideCircusWorld].y, 0, 0x107B4, 1); - _vm->_gnapActionStatus = kAS25LeaveScene; + _vm->_gnap->_actionStatus = kAS25LeaveScene; _vm->platypusWalkTo(_vm->_hotspotsWalkPos[kHS25ExitOutsideCircusWorld].x + 1, _vm->_hotspotsWalkPos[kHS25ExitOutsideCircusWorld].y, -1, 0x107C2, 1); } break; case kHS25ExitInsideCircusWorld: - if (_vm->_gnapActionStatus < 0) { + if (_vm->_gnap->_actionStatus < 0) { if (_vm->isFlag(kGFNeedleTaken)) { _vm->_isLeavingScene = true; _vm->_newSceneNum = 26; _vm->_hotspots[kHS25WalkArea1]._flags |= SF_WALKABLE; _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS25ExitInsideCircusWorld].x, _vm->_hotspotsWalkPos[kHS25ExitInsideCircusWorld].y, 0, 0x107B1, 1); - _vm->_gnapActionStatus = kAS25LeaveScene; + _vm->_gnap->_actionStatus = kAS25LeaveScene; _vm->platypusWalkTo(_vm->_hotspotsWalkPos[kHS25ExitInsideCircusWorld].x + 1, _vm->_hotspotsWalkPos[kHS25ExitInsideCircusWorld].y, -1, 0x107C2, 1); _vm->_hotspots[kHS25WalkArea1]._flags &= ~SF_WALKABLE; } else { _vm->_hotspots[kHS25WalkArea1]._flags |= SF_WALKABLE; _vm->gnapWalkTo(4, 5, 0, 0x107BB, 1); - _vm->_gnapActionStatus = kAS25EnterCircusWihoutTicket; + _vm->_gnap->_actionStatus = kAS25EnterCircusWihoutTicket; _vm->_hotspots[kHS25WalkArea1]._flags &= ~SF_WALKABLE; } } @@ -1933,7 +1933,7 @@ void Scene25::run() { case kHS25Posters2: case kHS25Posters3: case kHS25Posters4: - if (_vm->_gnapActionStatus < 0) { + if (_vm->_gnap->_actionStatus < 0) { if (_vm->_grabCursorSpriteIndex >= 0) { _vm->playGnapImpossible(0, 0); } else { @@ -1961,7 +1961,7 @@ void Scene25::run() { case kHS25WalkArea1: case kHS25WalkArea2: - if (_vm->_gnapActionStatus < 0) + if (_vm->_gnap->_actionStatus < 0) _vm->gnapWalkTo(-1, -1, -1, -1, 1); break; @@ -1978,7 +1978,7 @@ void Scene25::run() { if (!_vm->_isLeavingScene) { _vm->updatePlatypusIdleSequence(); _vm->updateGnapIdleSequence(); - if (!_vm->_timers[4] && _nextTicketVendorSequenceId == -1 && _vm->_gnapActionStatus == -1) { + if (!_vm->_timers[4] && _nextTicketVendorSequenceId == -1 && _vm->_gnap->_actionStatus == -1) { _vm->_timers[4] = _vm->getRandom(20) + 20; switch (_vm->getRandom(13)) { case 0: @@ -2033,10 +2033,10 @@ void Scene25::updateAnimations() { if (gameSys.getAnimationStatus(0) == 2) { gameSys.setAnimation(0, 0, 0); - switch (_vm->_gnapActionStatus) { + switch (_vm->_gnap->_actionStatus) { case kAS25TalkTicketVendor: _nextTicketVendorSequenceId = (_vm->getRandom(2) == 1) ? 0x57 : 0x5F; - _vm->_gnapActionStatus = -1; + _vm->_gnap->_actionStatus = -1; break; case kAS25EnterCircusWihoutTicket: _nextTicketVendorSequenceId = 0x5E; @@ -2050,10 +2050,10 @@ void Scene25::updateAnimations() { _vm->playGnapIdle(0, 0); _vm->gnapWalkTo(_vm->_hotspotsWalkPos[3].x, _vm->_hotspotsWalkPos[3].y, -1, 0x107BB, 1); _vm->_hotspots[kHS25WalkArea1]._flags &= ~SF_WALKABLE; - _vm->_gnapActionStatus = kAS25EnterCircusWihoutTicketDone; + _vm->_gnap->_actionStatus = kAS25EnterCircusWihoutTicketDone; break; case kAS25EnterCircusWihoutTicketDone: - _vm->_gnapActionStatus = -1; + _vm->_gnap->_actionStatus = -1; break; case kAS25ShowTicketToVendor: _vm->setGrabCursorSprite(-1); @@ -2061,7 +2061,7 @@ void Scene25::updateAnimations() { _vm->setFlag(kGFNeedleTaken); gameSys.setAnimation(0x61, 40, 0); gameSys.insertSequence(0x61, 40, 0, 0, kSeqNone, 0, 0, 0); - _vm->_gnapActionStatus = kAS25ShowTicketToVendorDone; + _vm->_gnap->_actionStatus = kAS25ShowTicketToVendorDone; break; case kAS25ShowTicketToVendorDone: _nextTicketVendorSequenceId = 0x53; @@ -2077,7 +2077,7 @@ void Scene25::updateAnimations() { gameSys.insertSequence(_nextTicketVendorSequenceId, 39, _currTicketVendorSequenceId, 39, kSeqSyncWait, 0, 0, 0); _currTicketVendorSequenceId = _nextTicketVendorSequenceId; _nextTicketVendorSequenceId = -1; - _vm->_gnapActionStatus = -1; + _vm->_gnap->_actionStatus = -1; } else if (_nextTicketVendorSequenceId != -1) { gameSys.setAnimation(_nextTicketVendorSequenceId, 39, 3); gameSys.insertSequence(_nextTicketVendorSequenceId, 39, _currTicketVendorSequenceId, 39, kSeqSyncWait, 0, 0, 0); @@ -2154,14 +2154,14 @@ void Scene26::run() { switch (_vm->_sceneClickedHotspot) { case kHS26Device: - if (_vm->_gnapActionStatus < 0) { + if (_vm->_gnap->_actionStatus < 0) { _vm->runMenu(); updateHotspots(); } break; case kHS26Platypus: - if (_vm->_gnapActionStatus < 0) { + if (_vm->_gnap->_actionStatus < 0) { if (_vm->_grabCursorSpriteIndex == kItemJoint) { _vm->gnapUseJointOnPlatypus(); } else if (_vm->_grabCursorSpriteIndex >= 0) { @@ -2187,53 +2187,53 @@ void Scene26::run() { break; case kHS26ExitOutsideCircusWorld: - if (_vm->_gnapActionStatus < 0) { + if (_vm->_gnap->_actionStatus < 0) { _vm->_isLeavingScene = true; _vm->_newSceneNum = 25; _vm->gnapWalkTo(-1, _vm->_hotspotsWalkPos[kHS26ExitOutsideCircusWorld].y, 0, 0x107AE, 1); - _vm->_gnapActionStatus = kAS26LeaveScene; + _vm->_gnap->_actionStatus = kAS26LeaveScene; } break; case kHS26ExitOutsideClown: - if (_vm->_gnapActionStatus < 0) { + if (_vm->_gnap->_actionStatus < 0) { _vm->_isLeavingScene = true; _vm->_newSceneNum = 27; _vm->gnapWalkTo(-1, _vm->_hotspotsWalkPos[kHS26ExitOutsideClown].y, 0, 0x107BC, 1); - _vm->_gnapActionStatus = kAS26LeaveScene; + _vm->_gnap->_actionStatus = kAS26LeaveScene; } break; case kHS26ExitArcade: - if (_vm->_gnapActionStatus < 0) { + if (_vm->_gnap->_actionStatus < 0) { _vm->_isLeavingScene = true; _vm->_newSceneNum = 29; _vm->gnapWalkTo(-1, _vm->_hotspotsWalkPos[kHS26ExitArcade].y, 0, 0x107BC, 1); - _vm->_gnapActionStatus = kAS26LeaveScene; + _vm->_gnap->_actionStatus = kAS26LeaveScene; } break; case kHS26ExitElephant: - if (_vm->_gnapActionStatus < 0) { + if (_vm->_gnap->_actionStatus < 0) { _vm->_isLeavingScene = true; _vm->_newSceneNum = 30; _vm->gnapWalkTo(-1, _vm->_hotspotsWalkPos[4].y, 0, 0x107BC, 1); - _vm->_gnapActionStatus = kAS26LeaveScene; + _vm->_gnap->_actionStatus = kAS26LeaveScene; } break; case kHS26ExitBeerStand: - if (_vm->_gnapActionStatus < 0) { + if (_vm->_gnap->_actionStatus < 0) { _vm->_isLeavingScene = true; _vm->_newSceneNum = 31; _vm->gnapWalkTo(-1, _vm->_hotspotsWalkPos[kHS26ExitBeerStand].y, 0, 0x107BB, 1); - _vm->_gnapActionStatus = kAS26LeaveScene; + _vm->_gnap->_actionStatus = kAS26LeaveScene; } break; case kHS26WalkArea1: case kHS26WalkArea2: - if (_vm->_gnapActionStatus < 0) + if (_vm->_gnap->_actionStatus < 0) _vm->gnapWalkTo(-1, -1, -1, -1, 1); break; @@ -2288,9 +2288,9 @@ void Scene26::updateAnimations() { if (gameSys.getAnimationStatus(0) == 2) { gameSys.setAnimation(0, 0, 0); - if (_vm->_gnapActionStatus == kAS26LeaveScene) + if (_vm->_gnap->_actionStatus == kAS26LeaveScene) _vm->_sceneDone = true; - _vm->_gnapActionStatus = -1; + _vm->_gnap->_actionStatus = -1; } if (gameSys.getAnimationStatus(3) == 2 && _nextKidSequenceId != -1) { @@ -2382,20 +2382,20 @@ void Scene27::run() { _vm->updateMouseCursor(); _vm->updateCursorByHotspot(); _vm->_sceneClickedHotspot = -1; - if (_vm->_gnapActionStatus < 0) + if (_vm->_gnap->_actionStatus < 0) _vm->_sceneClickedHotspot = _vm->getClickedHotspotId(); _vm->updateGrabCursorSprite(0, 0); switch (_vm->_sceneClickedHotspot) { case kHS27Device: - if (_vm->_gnapActionStatus < 0) { + if (_vm->_gnap->_actionStatus < 0) { _vm->runMenu(); updateHotspots(); } break; case kHS27Platypus: - if (_vm->_gnapActionStatus < 0) { + if (_vm->_gnap->_actionStatus < 0) { if (_vm->_grabCursorSpriteIndex == kItemJoint) { _vm->gnapUseJointOnPlatypus(); } else if (_vm->_grabCursorSpriteIndex >= 0) { @@ -2421,11 +2421,11 @@ void Scene27::run() { break; case kHS27Janitor: - if (_vm->_gnapActionStatus < 0) { + if (_vm->_gnap->_actionStatus < 0) { if (_vm->_grabCursorSpriteIndex == kItemPicture) { _vm->_gnap->_idleFacing = kDirUpLeft; if (_vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS27Janitor].x, _vm->_hotspotsWalkPos[kHS27Janitor].y, 0, 0x107BC, 1)) - _vm->_gnapActionStatus = kAS27ShowPictureToJanitor; + _vm->_gnap->_actionStatus = kAS27ShowPictureToJanitor; } else if (_vm->_grabCursorSpriteIndex >= 0) { _vm->playGnapShowCurrItem(_vm->_hotspotsWalkPos[kHS27Janitor].x, _vm->_hotspotsWalkPos[kHS27Janitor].y, 7, 3); } else { @@ -2436,7 +2436,7 @@ void Scene27::run() { 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->_gnapActionStatus = kAS27TalkJanitor; + _vm->_gnap->_actionStatus = kAS27TalkJanitor; break; case GRAB_CURSOR: case PLAT_CURSOR: @@ -2448,7 +2448,7 @@ void Scene27::run() { break; case kHS27Bucket: - if (_vm->_gnapActionStatus < 0) { + if (_vm->_gnap->_actionStatus < 0) { if (_vm->_grabCursorSpriteIndex >= 0) { _vm->playGnapShowItem(_vm->_grabCursorSpriteIndex, 3, 3); } else { @@ -2459,7 +2459,7 @@ void Scene27::run() { 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->_gnapActionStatus = kAS27GrabBucket; + _vm->_gnap->_actionStatus = kAS27GrabBucket; break; case TALK_CURSOR: case PLAT_CURSOR: @@ -2471,59 +2471,59 @@ void Scene27::run() { break; case kHS27ExitCircus: - if (_vm->_gnapActionStatus < 0) { + if (_vm->_gnap->_actionStatus < 0) { _vm->_isLeavingScene = true; _vm->_newSceneNum = 26; _vm->gnapWalkTo(-1, _vm->_hotspotsWalkPos[kHS27ExitCircus].y, 0, 0x107AE, 1); - _vm->_gnapActionStatus = kAS27LeaveScene; + _vm->_gnap->_actionStatus = kAS27LeaveScene; _vm->platypusWalkTo(_vm->_hotspotsWalkPos[kHS27ExitCircus].x + 1, _vm->_hotspotsWalkPos[kHS27ExitCircus].y, -1, 0x107C7, 1); } break; case kHS27ExitArcade: - if (_vm->_gnapActionStatus < 0) { + if (_vm->_gnap->_actionStatus < 0) { _vm->_isLeavingScene = true; _vm->_newSceneNum = 29; _vm->gnapWalkTo(-1, _vm->_hotspotsWalkPos[kHS27ExitArcade].y, 0, 0x107AF, 1); - _vm->_gnapActionStatus = kAS27LeaveScene; + _vm->_gnap->_actionStatus = kAS27LeaveScene; _vm->platypusWalkTo(_vm->_hotspotsWalkPos[kHS27ExitArcade].x, _vm->_hotspotsWalkPos[kHS27ExitArcade].y + 1, -1, 0x107CF, 1); } break; case kHS27ExitBeerStand: - if (_vm->_gnapActionStatus < 0) { + if (_vm->_gnap->_actionStatus < 0) { _vm->_isLeavingScene = true; _vm->_newSceneNum = 31; _vm->gnapWalkTo(-1, _vm->_hotspotsWalkPos[kHS27ExitBeerStand].y, 0, 0x107AB, 1); - _vm->_gnapActionStatus = kAS27LeaveScene; + _vm->_gnap->_actionStatus = kAS27LeaveScene; _vm->platypusWalkTo(_vm->_hotspotsWalkPos[kHS27ExitBeerStand].x, _vm->_hotspotsWalkPos[kHS27ExitBeerStand].y + 1, -1, 0x107CD, 1); } break; case kHS27ExitClown: - if (_vm->_gnapActionStatus < 0) { + if (_vm->_gnap->_actionStatus < 0) { if (_vm->isFlag(kGFPlatypus)) { _vm->_isLeavingScene = true; _vm->_newSceneNum = 28; _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS27ExitClown].x, _vm->_hotspotsWalkPos[kHS27ExitClown].y, 0, 0x107AD, 1); - _vm->_gnapActionStatus = kAS27LeaveScene; + _vm->_gnap->_actionStatus = kAS27LeaveScene; _vm->platypusWalkTo(_vm->_hotspotsWalkPos[kHS27ExitClown].x + 1, _vm->_hotspotsWalkPos[kHS27ExitClown].y, -1, 0x107C4, 1); } else { _vm->_hotspots[kHS27WalkArea1]._flags |= SF_WALKABLE; _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS27ExitClown].x, 7, 0, 0x107BC, 1); _vm->_hotspots[kHS27WalkArea1]._flags &= SF_WALKABLE; - _vm->_gnapActionStatus = kAS27TryEnterClownTent; + _vm->_gnap->_actionStatus = kAS27TryEnterClownTent; } } break; case kHS27WalkArea1: - if (_vm->_gnapActionStatus < 0) + if (_vm->_gnap->_actionStatus < 0) _vm->gnapWalkTo(-1, -1, -1, -1, 1); break; default: - if (_vm->_mouseClickState._left && _vm->_gnapActionStatus < 0) { + if (_vm->_mouseClickState._left && _vm->_gnap->_actionStatus < 0) { _vm->gnapWalkTo(-1, -1, -1, -1, 1); _vm->_mouseClickState._left = false; } @@ -2538,13 +2538,13 @@ void Scene27::run() { if (!_vm->_isLeavingScene) { _vm->updatePlatypusIdleSequence(); - if (_vm->_gnapActionStatus < 0) + if (_vm->_gnap->_actionStatus < 0) _vm->updateGnapIdleSequence(); if (_vm->_debugLevel == 4) _vm->updateIdleTimer(); if (!_vm->_timers[5]) { _vm->_timers[5] = _vm->getRandom(20) + 60; - if (_vm->_gnapActionStatus < 0) { + if (_vm->_gnap->_actionStatus < 0) { if (_vm->getRandom(3) != 0) _nextJanitorSequenceId = 0xCB; else @@ -2553,7 +2553,7 @@ void Scene27::run() { } if (!_vm->_timers[7]) { _vm->_timers[7] = _vm->getRandom(100) + 300; - if (_vm->_gnapActionStatus < 0) + if (_vm->_gnap->_actionStatus < 0) gameSys.insertSequence(0xD4, 120, 0, 0, kSeqNone, 0, 0, 0); } _vm->playSoundB(); @@ -2576,7 +2576,7 @@ void Scene27::updateAnimations() { if (gameSys.getAnimationStatus(0) == 2) { gameSys.setAnimation(0, 0, 0); - switch (_vm->_gnapActionStatus) { + switch (_vm->_gnap->_actionStatus) { case kAS27TalkJanitor: switch (_vm->getRandom(3)) { case 0: @@ -2598,11 +2598,11 @@ void Scene27::updateAnimations() { _vm->setFlag(kGFUnk13); gameSys.setAnimation(0xD2, 39, 0); gameSys.insertSequence(0xD2, 39, 211, 39, kSeqSyncWait, 0, 0, 0); - _vm->_gnapActionStatus = kAS27GrabBucketDone; + _vm->_gnap->_actionStatus = kAS27GrabBucketDone; break; case kAS27GrabBucketDone: _vm->setGrabCursorSprite(kItemEmptyBucket); - _vm->_gnapActionStatus = -1; + _vm->_gnap->_actionStatus = -1; break; case kAS27ShowPictureToJanitor: _nextJanitorSequenceId = 0xD0; @@ -2614,17 +2614,17 @@ void Scene27::updateAnimations() { gameSys.setAnimation(_nextJanitorSequenceId, 39, 0); _currJanitorSequenceId = _nextJanitorSequenceId; _nextJanitorSequenceId = -1; - _vm->_gnapActionStatus = kAS27TryEnterClownTentDone; + _vm->_gnap->_actionStatus = kAS27TryEnterClownTentDone; break; case kAS27TryEnterClownTentDone: _vm->_hotspots[kHS27WalkArea1]._flags |= SF_WALKABLE; _vm->gnapWalkTo(_vm->_hotspotsWalkPos[7].x, 9, -1, 0x107BC, 1); _vm->_hotspots[kHS27WalkArea1]._flags &= ~SF_WALKABLE; - _vm->_gnapActionStatus = -1; + _vm->_gnap->_actionStatus = -1; break; case kAS27EnterClownTent: _vm->gnapWalkTo(_vm->_gnap->_pos, 0, 0x107B2, 1); - _vm->_gnapActionStatus = kAS27LeaveScene; + _vm->_gnap->_actionStatus = kAS27LeaveScene; break; case kAS27LeaveScene: _vm->_sceneDone = true; @@ -2644,7 +2644,7 @@ void Scene27::updateAnimations() { case 0xCC: case 0xCD: case 0xCE: - _vm->_gnapActionStatus = -1; + _vm->_gnap->_actionStatus = -1; gameSys.insertSequence(_nextJanitorSequenceId, 39, _currJanitorSequenceId, 39, kSeqSyncWait, 0, 0, 0); gameSys.setAnimation(_nextJanitorSequenceId, 39, 3); gameSys.setAnimation(_nextJanitorSequenceId, 39, 0); @@ -2657,7 +2657,7 @@ void Scene27::updateAnimations() { _vm->playGnapUseDevice(0, 0); gameSys.insertSequence(_nextJanitorSequenceId, 39, _currJanitorSequenceId, 39, kSeqSyncWait, 0, 0, 0); gameSys.setAnimation(_nextJanitorSequenceId, 39, 0); - _vm->_gnapActionStatus = kAS27EnterClownTent; + _vm->_gnap->_actionStatus = kAS27EnterClownTent; _currJanitorSequenceId = _nextJanitorSequenceId; _nextJanitorSequenceId = -1; _vm->setFlag(kGFPlatypus); @@ -2742,12 +2742,12 @@ void Scene28::run() { gameSys.insertSequence(_currClownSequenceId, 39, 0x11B, 39, kSeqSyncWait, 0, 0, 0); _nextClownSequenceId = -1; _vm->_timers[4] = _vm->getRandom(20) + 80; - _vm->_gnapActionStatus = kAS28GnapWaiting; + _vm->_gnap->_actionStatus = kAS28GnapWaiting; while (gameSys.getAnimationStatus(3) != 2) { _vm->gameUpdateTick(); _vm->updateMouseCursor(); } - _vm->_gnapActionStatus = -1; + _vm->_gnap->_actionStatus = -1; } while (!_vm->_sceneDone) { @@ -2759,14 +2759,14 @@ void Scene28::run() { switch (_vm->_sceneClickedHotspot) { case kHS28Device: - if (_vm->_gnapActionStatus < 0) { + if (_vm->_gnap->_actionStatus < 0) { _vm->runMenu(); updateHotspots(); } break; case kHS28Platypus: - if (_vm->_gnapActionStatus < 0) { + if (_vm->_gnap->_actionStatus < 0) { if (_vm->_grabCursorSpriteIndex == kItemJoint) { _vm->gnapUseJointOnPlatypus(); } else if (_vm->_grabCursorSpriteIndex >= 0) { @@ -2792,7 +2792,7 @@ void Scene28::run() { break; case kHS28Horn: - if (_vm->_gnapActionStatus < 0) { + if (_vm->_gnap->_actionStatus < 0) { if (_vm->_grabCursorSpriteIndex >= 0) { _vm->playGnapShowCurrItem(2, 8, 3, 4); } else { @@ -2804,7 +2804,7 @@ void Scene28::run() { 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->_gnapActionStatus = kAS28GrabHornSuccess; + _vm->_gnap->_actionStatus = kAS28GrabHornSuccess; } } else { _vm->_gnap->_idleFacing = kDirUpLeft; @@ -2812,7 +2812,7 @@ void Scene28::run() { _vm->_hotspots[kHS28WalkArea1]._flags |= SF_WALKABLE; _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS28Horn].x, _vm->_hotspotsWalkPos[kHS28Horn].y, 0, 0x107BB, 1); _vm->_hotspots[kHS28WalkArea1]._flags &= ~SF_WALKABLE; - _vm->_gnapActionStatus = kAS28GrabHornFails; + _vm->_gnap->_actionStatus = kAS28GrabHornFails; } break; case TALK_CURSOR: @@ -2825,7 +2825,7 @@ void Scene28::run() { break; case kHS28Clown: - if (_vm->_gnapActionStatus < 0) { + if (_vm->_gnap->_actionStatus < 0) { if (_vm->isFlag(kGFUnk21)) { if (_vm->_verbCursor == LOOK_CURSOR) _vm->playGnapScratchingHead(5, 2); @@ -2836,13 +2836,13 @@ void Scene28::run() { _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS28Clown].x, _vm->_hotspotsWalkPos[kHS28Clown].y, 0, 0x107BC, 1); _vm->playGnapPullOutDevice(0, 0); _vm->playGnapUseDevice(0, 0); - _vm->_gnapActionStatus = kAS28UseBeerBucketWithClown; + _vm->_gnap->_actionStatus = kAS28UseBeerBucketWithClown; } else if (_vm->_grabCursorSpriteIndex == kItemBucketWithPill) { _vm->_gnap->_idleFacing = kDirUpLeft; _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS28Clown].x, _vm->_hotspotsWalkPos[kHS28Clown].y, 0, 0x107BC, 1); _vm->playGnapPullOutDevice(0, 0); _vm->playGnapUseDevice(0, 0); - _vm->_gnapActionStatus = kAS28UsePillBucketWithClown; + _vm->_gnap->_actionStatus = kAS28UsePillBucketWithClown; } else if (_vm->_grabCursorSpriteIndex >= 0) { _vm->playGnapShowCurrItem(_vm->_hotspotsWalkPos[kHS28Clown].x, _vm->_hotspotsWalkPos[kHS28Clown].y, 2, 4); } else { @@ -2853,7 +2853,7 @@ void Scene28::run() { case TALK_CURSOR: _vm->_gnap->_idleFacing = kDirUpLeft; _vm->gnapWalkTo(5, 8, 0, _vm->getGnapSequenceId(gskBrainPulsating, 0, 0) | 0x10000, 1); - _vm->_gnapActionStatus = kAS28TalkClown; + _vm->_gnap->_actionStatus = kAS28TalkClown; break; case GRAB_CURSOR: case PLAT_CURSOR: @@ -2865,19 +2865,19 @@ void Scene28::run() { break; case kHS28ExitOutsideClown: - if (_vm->_gnapActionStatus < 0) { + if (_vm->_gnap->_actionStatus < 0) { _vm->_isLeavingScene = true; _vm->_newSceneNum = 27; _vm->_hotspots[kHS28WalkArea1]._flags |= SF_WALKABLE; _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS28ExitOutsideClown].x, _vm->_hotspotsWalkPos[kHS28ExitOutsideClown].y, 0, 0x107BF, 1); - _vm->_gnapActionStatus = kAS28LeaveScene; + _vm->_gnap->_actionStatus = kAS28LeaveScene; _vm->_hotspots[kHS28WalkArea1]._flags &= ~SF_WALKABLE; _vm->platypusWalkTo(_vm->_hotspotsWalkPos[kHS28ExitOutsideClown].x - 1, _vm->_hotspotsWalkPos[kHS28ExitOutsideClown].y, -1, 0x107C2, 1); } break; case kHS28EmptyBucket: - if (_vm->_gnapActionStatus < 0) { + if (_vm->_gnap->_actionStatus < 0) { if (_vm->_grabCursorSpriteIndex >= 0) { _vm->playGnapShowItem(_vm->_grabCursorSpriteIndex, 8, 6); } else if (_vm->isFlag(kGFUnk21)) { @@ -2889,7 +2889,7 @@ void Scene28::run() { break; case GRAB_CURSOR: _vm->gnapWalkTo(_vm->_gnap->_pos, 0, _vm->getGnapSequenceId(gskIdle, _vm->_hotspotsWalkPos[kHS28EmptyBucket].x, _vm->_hotspotsWalkPos[kHS28EmptyBucket].y) | 0x10000, 1); - _vm->_gnapActionStatus = kAS28GrabEmptyBucket; + _vm->_gnap->_actionStatus = kAS28GrabEmptyBucket; break; case TALK_CURSOR: case PLAT_CURSOR: @@ -2902,12 +2902,12 @@ void Scene28::run() { case kHS28WalkArea1: case kHS28WalkArea2: - if (_vm->_gnapActionStatus < 0) + if (_vm->_gnap->_actionStatus < 0) _vm->gnapWalkTo(-1, -1, -1, -1, 1); break; default: - if (_vm->_mouseClickState._left && _vm->_gnapActionStatus < 0) { + if (_vm->_mouseClickState._left && _vm->_gnap->_actionStatus < 0) { _vm->gnapWalkTo(-1, -1, -1, -1, 1); _vm->_mouseClickState._left = false; } @@ -2924,7 +2924,7 @@ void Scene28::run() { _vm->updateGnapIdleSequence(); if (!_vm->_timers[4]) { _vm->_timers[4] = _vm->getRandom(20) + 80; - if (_vm->_gnapActionStatus < 0 && !_vm->isFlag(kGFUnk21)) + if (_vm->_gnap->_actionStatus < 0 && !_vm->isFlag(kGFUnk21)) _nextClownSequenceId = 0x114; } } @@ -2946,7 +2946,7 @@ void Scene28::updateAnimations() { if (gameSys.getAnimationStatus(0) == 2) { gameSys.setAnimation(0, 0, 0); - switch (_vm->_gnapActionStatus) { + switch (_vm->_gnap->_actionStatus) { case kAS28UseBeerBucketWithClown: _vm->setFlag(kGFUnk22); _nextClownSequenceId = 0x113; @@ -2968,7 +2968,7 @@ void Scene28::updateAnimations() { _vm->playGnapUseDevice(0, 0); gameSys.setAnimation(0x117, 59, 0); gameSys.insertSequence(0x117, 59, 280, 59, kSeqSyncWait, 0, 0, 0); - _vm->_gnapActionStatus = kAS28GrabHornSuccessDone; + _vm->_gnap->_actionStatus = kAS28GrabHornSuccessDone; break; case kAS28GrabHornSuccessDone: _vm->hideCursor(); @@ -2983,21 +2983,21 @@ void Scene28::updateAnimations() { _vm->setGrabCursorSprite(kItemHorn); _vm->invAdd(kItemHorn); updateHotspots(); - _vm->_gnapActionStatus = -1; + _vm->_gnap->_actionStatus = -1; break; case kAS28GrabEmptyBucket: _vm->playGnapPullOutDevice(0, 0); _vm->playGnapUseDevice(0, 0); gameSys.setAnimation(0x111, 99, 0); gameSys.insertSequence(0x111, 99, 274, 99, kSeqSyncWait, 0, 0, 0); - _vm->_gnapActionStatus = kAS28GrabEmptyBucketDone; + _vm->_gnap->_actionStatus = kAS28GrabEmptyBucketDone; break; case kAS28GrabEmptyBucketDone: _vm->setGrabCursorSprite(kItemEmptyBucket); _vm->clearFlag(kGFUnk22);; updateHotspots(); _vm->invAdd(kItemEmptyBucket); - _vm->_gnapActionStatus = -1; + _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); @@ -3006,7 +3006,7 @@ void Scene28::updateAnimations() { gameSys.insertSequence(0x11B, 39, 0, 0, kSeqNone, 0, 0, 0); _currClownSequenceId = 0x11B; _nextClownSequenceId = -1; - _vm->_gnapActionStatus = -1; + _vm->_gnap->_actionStatus = -1; _vm->gnapWalkTo(2, 8, -1, 0x107BB, 1); break; case kAS28TalkClown: @@ -3019,7 +3019,7 @@ void Scene28::updateAnimations() { _nextClownSequenceId = 0x11F; // NOTE CHECKME Never set, bug in the original? break; case kAS28GnapWaiting: - _vm->_gnapActionStatus = -1; + _vm->_gnap->_actionStatus = -1; break; case kAS28LeaveScene: _vm->_sceneDone = true; @@ -3037,7 +3037,7 @@ void Scene28::updateAnimations() { gameSys.insertSequence(0x11B, 39, _nextClownSequenceId, 39, kSeqSyncWait, 0, 0, 0); _currClownSequenceId = 0x11B; _nextClownSequenceId = -1; - _vm->_gnapActionStatus = kAS28GnapWaiting; + _vm->_gnap->_actionStatus = kAS28GnapWaiting; break; case 0x116: _vm->setGrabCursorSprite(-1); @@ -3048,18 +3048,18 @@ void Scene28::updateAnimations() { gameSys.insertSequence(0x118, 59, 0, 0, kSeqNone, _vm->getSequenceTotalDuration(_nextClownSequenceId), 0, 0); _currClownSequenceId = _nextClownSequenceId; _nextClownSequenceId = -1; - _vm->_gnapActionStatus = kAS28GnapWaiting; + _vm->_gnap->_actionStatus = kAS28GnapWaiting; break; case 0x11D: case 0x11E: case 0x11F: - _vm->_gnapActionStatus = -1; + _vm->_gnap->_actionStatus = -1; break; case 0x119: gameSys.insertSequence(_nextClownSequenceId, 39, makeRid(_vm->_gnapSequenceDatNum, _vm->_gnapSequenceId), _vm->_gnapId, kSeqSyncWait, 0, 0, 0); gameSys.setAnimation(_nextClownSequenceId, 39, 0); gameSys.removeSequence(_currClownSequenceId, 39, true); - _vm->_gnapActionStatus = kAS28GrabHornFailsDone; + _vm->_gnap->_actionStatus = kAS28GrabHornFailsDone; _vm->_gnapSequenceId = _nextClownSequenceId; _vm->_gnapSequenceDatNum = 0; _nextClownSequenceId = -1; @@ -3150,14 +3150,14 @@ void Scene29::run() { switch (_vm->_sceneClickedHotspot) { case kHS29Device: - if (_vm->_gnapActionStatus < 0) { + if (_vm->_gnap->_actionStatus < 0) { _vm->runMenu(); updateHotspots(); } break; case kHS29Platypus: - if (_vm->_gnapActionStatus < 0) { + if (_vm->_gnap->_actionStatus < 0) { if (_vm->_grabCursorSpriteIndex == kItemJoint) { _vm->gnapUseJointOnPlatypus(); } else if (_vm->_grabCursorSpriteIndex >= 0) { @@ -3183,11 +3183,11 @@ void Scene29::run() { break; case kHS29Monkey: - if (_vm->_gnapActionStatus < 0) { + 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->_gnapActionStatus = kAS29UseBananaWithMonkey; + _vm->_gnap->_actionStatus = kAS29UseBananaWithMonkey; _vm->_newSceneNum = 51; _vm->_isLeavingScene = true; _vm->setGrabCursorSprite(-1); @@ -3211,34 +3211,34 @@ void Scene29::run() { break; case kHS29ExitCircus: - if (_vm->_gnapActionStatus < 0) { + if (_vm->_gnap->_actionStatus < 0) { _vm->_isLeavingScene = true; _vm->_newSceneNum = 26; _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS29ExitCircus].x, _vm->_hotspotsWalkPos[kHS29ExitCircus].y, 0, 0x107AE, 1); - _vm->_gnapActionStatus = kAS29LeaveScene; + _vm->_gnap->_actionStatus = kAS29LeaveScene; _vm->platypusWalkTo(_vm->_hotspotsWalkPos[kHS29ExitCircus].x + 1, _vm->_hotspotsWalkPos[kHS29ExitCircus].y, -1, -1, 1); } break; case kHS29ExitOutsideClown: - if (_vm->_gnapActionStatus < 0) { + if (_vm->_gnap->_actionStatus < 0) { _vm->_isLeavingScene = true; _vm->_newSceneNum = 27; _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS29ExitOutsideClown].x, _vm->_hotspotsWalkPos[kHS29ExitOutsideClown].y, 0, 0x107AB, 1); - _vm->_gnapActionStatus = kAS29LeaveScene; + _vm->_gnap->_actionStatus = kAS29LeaveScene; _vm->platypusWalkTo(_vm->_hotspotsWalkPos[kHS29ExitOutsideClown].x, _vm->_hotspotsWalkPos[kHS29ExitOutsideClown].y - 1, -1, 0x107CD, 1); } break; case kHS29Aracde: - if (_vm->_gnapActionStatus < 0) { + if (_vm->_gnap->_actionStatus < 0) { if (_vm->_grabCursorSpriteIndex == kItemDiceQuarterHole) { _vm->setGrabCursorSprite(-1); _vm->_isLeavingScene = true; _vm->_newSceneNum = 52; _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS29Aracde].x, _vm->_hotspotsWalkPos[kHS29Aracde].y, 0, -1, 1); _vm->playGnapIdle(_vm->_hotspotsWalkPos[kHS29Aracde].x, _vm->_hotspotsWalkPos[kHS29Aracde].y); - _vm->_gnapActionStatus = kAS29LeaveScene; + _vm->_gnap->_actionStatus = kAS29LeaveScene; } else if (_vm->_grabCursorSpriteIndex >= 0) { _vm->playGnapShowCurrItem(_vm->_hotspotsWalkPos[kHS29Aracde].x, _vm->_hotspotsWalkPos[kHS29Aracde].y, 2, 3); } else { @@ -3257,7 +3257,7 @@ void Scene29::run() { break; case kHS29WalkArea1: - if (_vm->_gnapActionStatus < 0) + if (_vm->_gnap->_actionStatus < 0) _vm->gnapWalkTo(-1, -1, -1, -1, 1); break; @@ -3275,14 +3275,14 @@ void Scene29::run() { _vm->playSound(0x1093B, true); if (!_vm->_isLeavingScene) { - if (_vm->_gnapActionStatus < 0) { + if (_vm->_gnap->_actionStatus < 0) { _vm->updateGnapIdleSequence(); _vm->updatePlatypusIdleSequence(); } if (!_vm->_timers[4]) { if (_vm->invHas(kItemHorn)) { _vm->_timers[4] = _vm->getRandom(20) + 60; - if (_vm->_gnapActionStatus < 0) { + if (_vm->_gnap->_actionStatus < 0) { switch (_vm->getRandom(5)) { case 0: _nextManSequenceId = 0xED; @@ -3323,7 +3323,7 @@ void Scene29::updateAnimations() { if (gameSys.getAnimationStatus(0) == 2) { gameSys.setAnimation(0, 0, 0); - switch (_vm->_gnapActionStatus) { + switch (_vm->_gnap->_actionStatus) { case kAS29UseBananaWithMonkey: _nextMonkeySequenceId = 0xE5; break; @@ -3349,7 +3349,7 @@ void Scene29::updateAnimations() { gameSys.setAnimation(0, 159, 4); gameSys.insertSequence(_nextMonkeySequenceId, 159, _currMonkeySequenceId, 159, kSeqSyncWait, 0, 0, 0); gameSys.insertSequence(0xE6, 159, _nextMonkeySequenceId, 159, kSeqSyncWait, 0, 0, 0); - _vm->_gnapActionStatus = kAS29LeaveScene; + _vm->_gnap->_actionStatus = kAS29LeaveScene; _currMonkeySequenceId = 0xE6; _nextMonkeySequenceId = -1; _vm->_timers[5] = 30; diff --git a/engines/gnap/scenes/group3.cpp b/engines/gnap/scenes/group3.cpp index 0e14ea9e3e..0698abb060 100644 --- a/engines/gnap/scenes/group3.cpp +++ b/engines/gnap/scenes/group3.cpp @@ -79,14 +79,14 @@ void Scene30::run() { switch (_vm->_sceneClickedHotspot) { case kHS30Device: - if (_vm->_gnapActionStatus < 0) { + if (_vm->_gnap->_actionStatus < 0) { _vm->runMenu(); updateHotspots(); } break; case kHS30Platypus: - if (_vm->_gnapActionStatus < 0) { + if (_vm->_gnap->_actionStatus < 0) { if (_vm->_grabCursorSpriteIndex == kItemJoint) { _vm->gnapUseJointOnPlatypus(); } else if (_vm->_grabCursorSpriteIndex >= 0) { @@ -112,12 +112,12 @@ void Scene30::run() { break; case kHS30PillMachine: - if (_vm->_gnapActionStatus < 0) { + if (_vm->_gnap->_actionStatus < 0) { if (_vm->_grabCursorSpriteIndex == kItemDiceQuarterHole && !_vm->isFlag(kGFUnk23)) { _vm->_hotspots[kHS30WalkArea1]._flags |= SF_WALKABLE; _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS30PillMachine].x, _vm->_hotspotsWalkPos[kHS30PillMachine].y, 0, 0x107BC, 1); _vm->_hotspots[kHS30WalkArea1]._flags &= ~SF_WALKABLE; - _vm->_gnapActionStatus = kAS30UsePillMachine; + _vm->_gnap->_actionStatus = kAS30UsePillMachine; hasTakenPill = true; } else if (_vm->_grabCursorSpriteIndex >= 0) { _vm->playGnapShowCurrItem(_vm->_hotspotsWalkPos[kHS30PillMachine].x, _vm->_hotspotsWalkPos[kHS30PillMachine].y, 8, 5); @@ -125,7 +125,7 @@ void Scene30::run() { switch (_vm->_verbCursor) { case LOOK_CURSOR: _vm->gnapWalkTo(9, 8, 0, 0x107BC, 1); - _vm->_gnapActionStatus = kAS30LookPillMachine; + _vm->_gnap->_actionStatus = kAS30LookPillMachine; break; case GRAB_CURSOR: _vm->playGnapScratchingHead(8, 5); @@ -140,20 +140,20 @@ void Scene30::run() { break; case kHS30ExitCircus: - if (_vm->_gnapActionStatus < 0) { + if (_vm->_gnap->_actionStatus < 0) { _vm->_isLeavingScene = true; if (hasTakenPill) _vm->_newSceneNum = 47; else _vm->_newSceneNum = 26; _vm->gnapWalkTo(-1, _vm->_hotspotsWalkPos[kHS30ExitCircus].y, 0, 0x107AE, 1); - _vm->_gnapActionStatus = kAS30LeaveScene; + _vm->_gnap->_actionStatus = kAS30LeaveScene; _vm->platypusWalkTo(_vm->_hotspotsWalkPos[kHS30ExitCircus].x + 1, _vm->_hotspotsWalkPos[kHS30ExitCircus].y, -1, 0x107C2, 1); } break; case kHS30WalkArea1: - if (_vm->_gnapActionStatus < 0) + if (_vm->_gnap->_actionStatus < 0) _vm->gnapWalkTo(-1, -1, -1, -1, 1); break; @@ -172,11 +172,11 @@ void Scene30::run() { if (!_vm->_isLeavingScene) { _vm->updatePlatypusIdleSequence(); - if (_vm->_gnapActionStatus < 0) + if (_vm->_gnap->_actionStatus < 0) _vm->updateGnapIdleSequence(); if (!_vm->_timers[4]) { _vm->_timers[4] = _vm->getRandom(100) + 300; - if (_vm->_gnapActionStatus < 0) { + if (_vm->_gnap->_actionStatus < 0) { if (_vm->getRandom(5) == 1) { gameSys.insertSequence(0xFF, 40, 0, 0, kSeqNone, 0, 0, 0); gameSys.insertSequence(0x100, 40, _kidSequenceId, 40, kSeqSyncWait, 0, 0, 0); @@ -188,7 +188,7 @@ void Scene30::run() { } if (!_vm->_timers[5]) { _vm->_timers[5] = _vm->getRandom(50) + 180; - if (_vm->_gnapActionStatus < 0) { + if (_vm->_gnap->_actionStatus < 0) { if (!_vm->isFlag(kGFUnk23) || hasTakenPill) gameSys.insertSequence(0x109, 20, 0, 0, kSeqNone, 0, 0, 0); else @@ -215,7 +215,7 @@ void Scene30::updateAnimations() { if (gameSys.getAnimationStatus(0) == 2) { gameSys.setAnimation(0, 0, 0); - switch (_vm->_gnapActionStatus) { + switch (_vm->_gnap->_actionStatus) { case kAS30LeaveScene: _vm->_sceneDone = true; break; @@ -225,7 +225,7 @@ void Scene30::updateAnimations() { gameSys.insertSequence(0x105, _vm->_gnapId, makeRid(_vm->_gnapSequenceDatNum, _vm->_gnapSequenceId), _vm->_gnapId, kSeqSyncWait, 0, 0, 0); _vm->_gnapSequenceId = 0x105; _vm->_gnapSequenceDatNum = 0; - _vm->_gnapActionStatus = kAS30UsePillMachine2; + _vm->_gnap->_actionStatus = kAS30UsePillMachine2; break; case kAS30UsePillMachine2: _vm->hideCursor(); @@ -240,7 +240,7 @@ void Scene30::updateAnimations() { gameSys.insertSequence(0x103, _vm->_gnapId, 0, 0, kSeqNone, 0, 0, 0); _vm->removeFullScreenSprite(); _vm->showCursor(); - _vm->_gnapActionStatus = kAS30UsePillMachine3; + _vm->_gnap->_actionStatus = kAS30UsePillMachine3; _vm->invAdd(kItemPill); _vm->setFlag(kGFUnk23); break; @@ -249,20 +249,20 @@ void Scene30::updateAnimations() { gameSys.insertSequence(0x104, _vm->_gnapId, makeRid(_vm->_gnapSequenceDatNum, 0x103), _vm->_gnapId, kSeqSyncWait, 0, 0, 0); _vm->_gnapSequenceId = 0x104; _vm->_gnapSequenceDatNum = 0; - _vm->_gnapActionStatus = kAS30UsePillMachine4; + _vm->_gnap->_actionStatus = kAS30UsePillMachine4; _vm->setGrabCursorSprite(kItemDiceQuarterHole); break; case kAS30UsePillMachine4: gameSys.insertSequence(0x106, 1, 0, 0, kSeqNone, 0, 0, 0); _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS30PillMachine].x, _vm->_hotspotsWalkPos[kHS30PillMachine].y + 1, -1, 0x107BC, 1); - _vm->_gnapActionStatus = -1; + _vm->_gnap->_actionStatus = -1; break; case kAS30LookPillMachine: if (_vm->isFlag(kGFUnk23)) _vm->showFullScreenSprite(0xE3); else _vm->showFullScreenSprite(0xE2); - _vm->_gnapActionStatus = -1; + _vm->_gnap->_actionStatus = -1; break; } } @@ -334,14 +334,14 @@ void Scene31::run() { switch (_vm->_sceneClickedHotspot) { case kHS31Device: - if (_vm->_gnapActionStatus < 0 || _vm->_gnapActionStatus == kAS31PlatMeasuringClown) { + if (_vm->_gnap->_actionStatus < 0 || _vm->_gnap->_actionStatus == kAS31PlatMeasuringClown) { _vm->runMenu(); updateHotspots(); } break; case kHS31Platypus: - if (_vm->_gnapActionStatus < 0) { + if (_vm->_gnap->_actionStatus < 0) { if (_vm->_grabCursorSpriteIndex == kItemJoint) { _vm->gnapUseJointOnPlatypus(); } else if (_vm->_grabCursorSpriteIndex >= 0) { @@ -367,8 +367,8 @@ void Scene31::run() { break; case kHS31MeasuringClown: - if (_vm->_gnapActionStatus < 0 || _vm->_gnapActionStatus == kAS31PlatMeasuringClown) { - if (_vm->_gnapActionStatus == kAS31PlatMeasuringClown) { + if (_vm->_gnap->_actionStatus < 0 || _vm->_gnap->_actionStatus == kAS31PlatMeasuringClown) { + if (_vm->_gnap->_actionStatus == kAS31PlatMeasuringClown) { if (_vm->_verbCursor == LOOK_CURSOR) _vm->playGnapScratchingHead(2, 2); else @@ -385,7 +385,7 @@ void Scene31::run() { _vm->_hotspots[kHS31WalkArea1]._flags |= SF_WALKABLE; _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS31MeasuringClown].x, _vm->_hotspotsWalkPos[kHS31MeasuringClown].y, 0, 0x107B9, 1); _vm->_hotspots[kHS31WalkArea1]._flags &= ~SF_WALKABLE; - _vm->_gnapActionStatus = kAS31UseMeasuringClown; + _vm->_gnap->_actionStatus = kAS31UseMeasuringClown; _vm->_timers[4] = 300; break; case TALK_CURSOR: @@ -398,8 +398,8 @@ void Scene31::run() { _vm->_hotspots[kHS31WalkArea1]._flags |= SF_WALKABLE; _vm->platypusWalkTo(_vm->_hotspotsWalkPos[kHS31MeasuringClown].x, _vm->_hotspotsWalkPos[kHS31MeasuringClown].y, 1, 0x107C2, 1); _vm->_hotspots[kHS31WalkArea1]._flags &= ~SF_WALKABLE; - _vm->_platypusActionStatus = kAS31PlatMeasuringClown; - _vm->_gnapActionStatus = kAS31PlatMeasuringClown; + _vm->_plat->_actionStatus = kAS31PlatMeasuringClown; + _vm->_gnap->_actionStatus = kAS31PlatMeasuringClown; _vm->_timers[4] = 300; } else _vm->playGnapImpossible(0, 0); @@ -410,7 +410,7 @@ void Scene31::run() { break; case kHS31BeerBarrel: - if (_vm->_gnapActionStatus < 0 || _vm->_gnapActionStatus == kAS31PlatMeasuringClown) { + 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); @@ -419,7 +419,7 @@ void Scene31::run() { _vm->playGnapPullOutDevice(6, 8); _vm->playGnapUseDevice(0, 0); _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS31BeerBarrel].x, _vm->_hotspotsWalkPos[kHS31BeerBarrel].y, 0, 0x107BC, 1); - _vm->_gnapActionStatus = kAS31FillEmptyBucketWithBeer; + _vm->_gnap->_actionStatus = kAS31FillEmptyBucketWithBeer; _vm->_timers[4] = 300; } else if (_vm->_grabCursorSpriteIndex >= 0) { _vm->playGnapShowCurrItem(_vm->_hotspotsWalkPos[kHS31BeerBarrel].x, _vm->_hotspotsWalkPos[kHS31BeerBarrel].y, 6, 2); @@ -433,7 +433,7 @@ void Scene31::run() { _vm->playGnapScratchingHead(6, 2); } else { _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS31BeerBarrel].x, _vm->_hotspotsWalkPos[kHS31BeerBarrel].y, 0, 0x107BC, 1); - _vm->_gnapActionStatus = kAS31UseBeerBarrel; + _vm->_gnap->_actionStatus = kAS31UseBeerBarrel; _vm->_gnap->_idleFacing = kDirUpLeft; } break; @@ -447,27 +447,27 @@ void Scene31::run() { break; case kHS31ExitCircus: - if (_vm->_gnapActionStatus < 0) { + if (_vm->_gnap->_actionStatus < 0) { _vm->_isLeavingScene = true; _vm->_newSceneNum = 26; _vm->gnapWalkTo(-1, _vm->_hotspotsWalkPos[kHS31ExitCircus].y, 0, 0x107AE, 1); - _vm->_gnapActionStatus = kAS31LeaveScene; + _vm->_gnap->_actionStatus = kAS31LeaveScene; _vm->platypusWalkTo(_vm->_hotspotsWalkPos[kHS31ExitCircus].x + 1, _vm->_hotspotsWalkPos[kHS31ExitCircus].y, -1, -1, 1); } break; case kHS31ExitOutsideClown: - if (_vm->_gnapActionStatus < 0) { + if (_vm->_gnap->_actionStatus < 0) { _vm->_isLeavingScene = true; _vm->_newSceneNum = 27; _vm->gnapWalkTo(-1, _vm->_hotspotsWalkPos[kHS31ExitOutsideClown].y, 0, 0x107AF, 1); - _vm->_gnapActionStatus = kAS31LeaveScene; + _vm->_gnap->_actionStatus = kAS31LeaveScene; _vm->platypusWalkTo(_vm->_hotspotsWalkPos[kHS31ExitOutsideClown].x, _vm->_hotspotsWalkPos[kHS31ExitOutsideClown].y + 1, -1, 0x107CF, 1); } break; case kHS31WalkArea1: - if (_vm->_gnapActionStatus < 0) + if (_vm->_gnap->_actionStatus < 0) _vm->gnapWalkTo(-1, -1, -1, -1, 1); break; @@ -485,13 +485,13 @@ void Scene31::run() { _vm->playSound(0x1093B, true); if (!_vm->_isLeavingScene) { - if (_vm->_platypusActionStatus < 0) + if (_vm->_plat->_actionStatus < 0) _vm->updatePlatypusIdleSequence(); - if (_vm->_gnapActionStatus < 0) + if (_vm->_gnap->_actionStatus < 0) _vm->updateGnapIdleSequence(); if (!_vm->_timers[4]) { _vm->_timers[4] = _vm->getRandom(20) + 60; - if (_vm->_gnapActionStatus < 0 && _nextClerkSequenceId == -1) { + if (_vm->_gnap->_actionStatus < 0 && _nextClerkSequenceId == -1) { switch (_vm->getRandom(6)){ case 0: _nextClerkSequenceId = 0xFF; @@ -510,7 +510,7 @@ void Scene31::run() { } if (!_vm->_timers[5]) { _vm->_timers[5] = _vm->getRandom(50) + 180; - if (_vm->_gnapActionStatus < 0) { + if (_vm->_gnap->_actionStatus < 0) { if (_vm->getRandom(2) != 0) gameSys.insertSequence(0x104, 20, 0, 0, kSeqNone, 0, 0, 0); else @@ -537,7 +537,7 @@ void Scene31::updateAnimations() { if (gameSys.getAnimationStatus(0) == 2) { gameSys.setAnimation(0, 0, 0); - switch (_vm->_gnapActionStatus) { + switch (_vm->_gnap->_actionStatus) { case kAS31UseBeerBarrel: _nextClerkSequenceId = 0xFE; break; @@ -548,14 +548,14 @@ void Scene31::updateAnimations() { _vm->_gnapSequenceDatNum = 0; _vm->_gnapSequenceId = 0x102; _vm->_gnapId = 59; - _vm->_gnapActionStatus = kAS31FillEmptyBucketWithBeerDone; + _vm->_gnap->_actionStatus = kAS31FillEmptyBucketWithBeerDone; break; case kAS31FillEmptyBucketWithBeerDone: _vm->_gnap->_idleFacing = kDirBottomLeft; _vm->playGnapPullOutDevice(0, 0); _vm->playGnapUseDevice(0, 0); gameSys.insertSequence(0xF9, 59, 0xF8, 59, kSeqSyncWait, 0, 0, 0); - _vm->_gnapActionStatus = -1; + _vm->_gnap->_actionStatus = -1; _vm->invAdd(kItemBucketWithBeer); _vm->invRemove(kItemEmptyBucket); _vm->setGrabCursorSprite(kItemBucketWithBeer); @@ -566,14 +566,14 @@ void Scene31::updateAnimations() { break; case kAS31LeaveScene: _vm->_sceneDone = true; - _vm->_gnapActionStatus = -1; + _vm->_gnap->_actionStatus = -1; break; } } if (gameSys.getAnimationStatus(1) == 2) { gameSys.setAnimation(0, 0, 1); - if (_vm->_platypusActionStatus == kAS31PlatMeasuringClown) { + if (_vm->_plat->_actionStatus == kAS31PlatMeasuringClown) { _vm->_sceneWaiting = true; _beerGuyDistracted = true; _nextClerkSequenceId = 0xFA; @@ -593,14 +593,14 @@ void Scene31::updateAnimations() { case 0xFC: ++_clerkMeasureCtr; if (_clerkMeasureCtr >= _clerkMeasureMaxCtr) { - if (_vm->_gnapActionStatus != 5) - _vm->_platypusActionStatus = -1; + if (_vm->_gnap->_actionStatus != 5) + _vm->_plat->_actionStatus = -1; _vm->_timers[0] = 40; gameSys.insertSequence(0xFD, 39, _currClerkSequenceId, 39, kSeqSyncWait, 0, 0, 0); _currClerkSequenceId = 0xFD; _nextClerkSequenceId = -1; - if (_vm->_gnapActionStatus != kAS31FillEmptyBucketWithBeerDone && _vm->_gnapActionStatus != kAS31FillEmptyBucketWithBeer) - _vm->_gnapActionStatus = -1; + if (_vm->_gnap->_actionStatus != kAS31FillEmptyBucketWithBeerDone && _vm->_gnap->_actionStatus != kAS31FillEmptyBucketWithBeer) + _vm->_gnap->_actionStatus = -1; _beerGuyDistracted = false; _clerkMeasureMaxCtr = 3; gameSys.setAnimation(0xFD, 39, 3); @@ -617,7 +617,7 @@ void Scene31::updateAnimations() { gameSys.setAnimation(_nextClerkSequenceId, 39, 3); _currClerkSequenceId = _nextClerkSequenceId; _nextClerkSequenceId = -1; - _vm->_gnapActionStatus = -1; + _vm->_gnap->_actionStatus = -1; break; default: if (_nextClerkSequenceId != -1) { @@ -685,14 +685,14 @@ void Scene32::run() { switch (_vm->_sceneClickedHotspot) { case kHS32Device: - if (_vm->_gnapActionStatus < 0) { + if (_vm->_gnap->_actionStatus < 0) { _vm->runMenu(); updateHotspots(); } break; case kHS32Platypus: - if (_vm->_gnapActionStatus < 0) { + if (_vm->_gnap->_actionStatus < 0) { if (_vm->_grabCursorSpriteIndex >= 0) { _vm->playGnapImpossible(_vm->_plat->_pos.x, _vm->_plat->_pos.y); } else { @@ -716,11 +716,11 @@ void Scene32::run() { break; case kHS32ExitTruck: - if (_vm->_gnapActionStatus < 0) { + if (_vm->_gnap->_actionStatus < 0) { _vm->_isLeavingScene = true; _vm->setGrabCursorSprite(-1); _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS32ExitTruck].x, _vm->_hotspotsWalkPos[kHS32ExitTruck].y, 0, 0x107AB, 1); - _vm->_gnapActionStatus = kAS32LeaveScene; + _vm->_gnap->_actionStatus = kAS32LeaveScene; _vm->platypusWalkTo(_vm->_hotspotsWalkPos[kHS32ExitTruck].x, _vm->_hotspotsWalkPos[kHS32ExitTruck].y + 1, -1, 0x107CD, 1); _vm->_newSceneNum = 33; } @@ -734,13 +734,13 @@ void Scene32::run() { case kHS32WalkArea6: case kHS32WalkArea7: case kHS32WalkArea8: - if (_vm->_gnapActionStatus < 0) + if (_vm->_gnap->_actionStatus < 0) _vm->gnapWalkTo(-1, -1, -1, -1, 1); break; } - if (_vm->_mouseClickState._left && _vm->_gnapActionStatus < 0) { + if (_vm->_mouseClickState._left && _vm->_gnap->_actionStatus < 0) { _vm->gnapWalkTo(-1, -1, -1, -1, 1); _vm->_mouseClickState._left = 0; } @@ -751,9 +751,9 @@ void Scene32::run() { _vm->playSound(0x1091C, true); if (!_vm->_isLeavingScene) { - if (_vm->_platypusActionStatus < 0) + if (_vm->_plat->_actionStatus < 0) _vm->updatePlatypusIdleSequence(); - if (_vm->_gnapActionStatus < 0) + if (_vm->_gnap->_actionStatus < 0) _vm->updateGnapIdleSequence(); if (!_vm->_timers[4]) { _vm->_timers[4] = _vm->getRandom(100) + 300; @@ -781,7 +781,7 @@ void Scene32::updateAnimations() { if (gameSys.getAnimationStatus(0) == 2) { gameSys.setAnimation(0, 0, 0); - if (_vm->_gnapActionStatus == kAS32LeaveScene) + if (_vm->_gnap->_actionStatus == kAS32LeaveScene) _vm->_sceneDone = true; } } @@ -861,14 +861,14 @@ void Scene33::run() { switch (_vm->_sceneClickedHotspot) { case kHS33Device: - if (_vm->_gnapActionStatus < 0) { + if (_vm->_gnap->_actionStatus < 0) { _vm->runMenu(); updateHotspots(); } break; case kHS33Platypus: - if (_vm->_gnapActionStatus < 0) { + if (_vm->_gnap->_actionStatus < 0) { if (_vm->_grabCursorSpriteIndex >= 0) { _vm->playGnapImpossible(_vm->_plat->_pos.x, _vm->_plat->_pos.y); } else { @@ -892,7 +892,7 @@ void Scene33::run() { break; case kHS33Chicken: - if (_vm->_gnapActionStatus < 0) { + if (_vm->_gnap->_actionStatus < 0) { if (_vm->_grabCursorSpriteIndex >= 0) { _vm->playGnapShowCurrItem(7, 9, 9, 8); } else { @@ -900,14 +900,14 @@ void Scene33::run() { 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)) - _vm->_gnapActionStatus = kAS33UseChicken; + _vm->_gnap->_actionStatus = kAS33UseChicken; else - _vm->_gnapActionStatus = -1; + _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->_gnapActionStatus = kAS33TalkChicken; + _vm->_gnap->_actionStatus = kAS33TalkChicken; break; case LOOK_CURSOR: case PLAT_CURSOR: @@ -919,9 +919,9 @@ void Scene33::run() { break; case kHS33ExitHouse: - if (_vm->_gnapActionStatus < 0) { + if (_vm->_gnap->_actionStatus < 0) { _vm->_isLeavingScene = true; - _vm->_gnapActionStatus = kAS33LeaveScene; + _vm->_gnap->_actionStatus = kAS33LeaveScene; _vm->_newSceneNum = 37; if (_vm->_gnap->_pos.x > 6) _vm->gnapWalkTo(_vm->_gnap->_pos, 0, 0x107AD, 1); @@ -931,9 +931,9 @@ void Scene33::run() { break; case kHS33ExitBarn: - if (_vm->_gnapActionStatus < 0) { + if (_vm->_gnap->_actionStatus < 0) { _vm->_isLeavingScene = true; - _vm->_gnapActionStatus = kAS33LeaveScene; + _vm->_gnap->_actionStatus = kAS33LeaveScene; _vm->_newSceneNum = 35; if (_vm->_gnap->_pos.x > 7) _vm->gnapWalkTo(_vm->_gnap->_pos, 0, 0x107AD, 1); @@ -943,20 +943,20 @@ void Scene33::run() { break; case kHS33ExitCreek: - if (_vm->_gnapActionStatus < 0) { + if (_vm->_gnap->_actionStatus < 0) { _vm->_isLeavingScene = true; _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS33ExitCreek].x, _vm->_hotspotsWalkPos[kHS33ExitCreek].y, 0, 0x107AB, 1); - _vm->_gnapActionStatus = kAS33LeaveScene; + _vm->_gnap->_actionStatus = kAS33LeaveScene; _vm->platypusWalkTo(_vm->_hotspotsWalkPos[kHS33ExitCreek].x, _vm->_hotspotsWalkPos[kHS33ExitCreek].y, -1, 0x107CD, 1); _vm->_newSceneNum = 34; } break; case kHS33ExitPigpen: - if (_vm->_gnapActionStatus < 0) { + if (_vm->_gnap->_actionStatus < 0) { _vm->_isLeavingScene = true; _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS33ExitPigpen].x, _vm->_hotspotsWalkPos[kHS33ExitPigpen].y, 0, 0x107AF, 1); - _vm->_gnapActionStatus = kAS33LeaveScene; + _vm->_gnap->_actionStatus = kAS33LeaveScene; _vm->platypusWalkTo(_vm->_hotspotsWalkPos[kHS33ExitPigpen].x, _vm->_hotspotsWalkPos[kHS33ExitPigpen].y, -1, 0x107CF, 1); _vm->_newSceneNum = 32; } @@ -964,12 +964,12 @@ void Scene33::run() { case kHS33WalkArea1: case kHS33WalkArea2: - if (_vm->_gnapActionStatus < 0) + if (_vm->_gnap->_actionStatus < 0) _vm->gnapWalkTo(-1, -1, -1, -1, 1); break; default: - if (_vm->_mouseClickState._left && _vm->_gnapActionStatus < 0) { + if (_vm->_mouseClickState._left && _vm->_gnap->_actionStatus < 0) { _vm->gnapWalkTo(-1, -1, -1, -1, 1); _vm->_mouseClickState._left = false; } @@ -982,9 +982,9 @@ void Scene33::run() { _vm->playSound(0x1091C, true); if (!_vm->_isLeavingScene) { - if (_vm->_platypusActionStatus < 0) + if (_vm->_plat->_actionStatus < 0) _vm->updatePlatypusIdleSequence(); - if (_vm->_gnapActionStatus < 0) + if (_vm->_gnap->_actionStatus < 0) _vm->updateGnapIdleSequence(); if (!_vm->_timers[4]) { _vm->_timers[4] = _vm->getRandom(100) + 300; @@ -993,7 +993,7 @@ void Scene33::run() { else gameSys.insertSequence(0x82, 256, 0, 0, kSeqNone, 0, 0, 0); } - if (!_vm->_timers[5] && _nextChickenSequenceId == -1 && _vm->_gnapActionStatus != kAS33TalkChicken && _vm->_gnapActionStatus != kAS33UseChicken) { + if (!_vm->_timers[5] && _nextChickenSequenceId == -1 && _vm->_gnap->_actionStatus != kAS33TalkChicken && _vm->_gnap->_actionStatus != kAS33UseChicken) { if (_vm->getRandom(6) != 0) { _nextChickenSequenceId = 0x7E; _vm->_timers[5] = _vm->getRandom(20) + 30; @@ -1020,7 +1020,7 @@ void Scene33::updateAnimations() { GameSys& gameSys = *_vm->_gameSys; if (gameSys.getAnimationStatus(0) == 2) { - switch (_vm->_gnapActionStatus) { + switch (_vm->_gnap->_actionStatus) { case kAS33LeaveScene: _vm->_sceneDone = true; break; @@ -1038,11 +1038,11 @@ void Scene33::updateAnimations() { _currChickenSequenceId = 0x7E; gameSys.setAnimation(0x7E, 179, 2); gameSys.insertSequence(_currChickenSequenceId, 179, 0, 0, kSeqNone, 0, 0, 0); - _vm->_gnapActionStatus = -1; + _vm->_gnap->_actionStatus = -1; _vm->_timers[5] = 30; break; default: - _vm->_gnapActionStatus = -1; + _vm->_gnap->_actionStatus = -1; break; } } @@ -1054,14 +1054,14 @@ void Scene33::updateAnimations() { gameSys.removeSequence(_currChickenSequenceId, 179, true); _nextChickenSequenceId = -1; _currChickenSequenceId = -1; - _vm->_gnapActionStatus = kAS33UseChickenDone; + _vm->_gnap->_actionStatus = kAS33UseChickenDone; _vm->_timers[5] = 500; } else if (_nextChickenSequenceId == 0x7F) { gameSys.setAnimation(_nextChickenSequenceId, 179, 2); gameSys.insertSequence(_nextChickenSequenceId, 179, _currChickenSequenceId, 179, kSeqSyncWait, 0, 0, 0); _currChickenSequenceId = _nextChickenSequenceId; _nextChickenSequenceId = -1; - _vm->_gnapActionStatus = -1; + _vm->_gnap->_actionStatus = -1; } else if (_nextChickenSequenceId != -1) { gameSys.setAnimation(_nextChickenSequenceId, 179, 2); gameSys.insertSequence(_nextChickenSequenceId, 179, _currChickenSequenceId, 179, kSeqSyncWait, 0, 0, 0); @@ -1098,21 +1098,21 @@ void Scene38::updateHotspots() { _vm->setHotspot(kHS38WalkArea5, 770, 0, 799, 445); _vm->setHotspot(kHS38WalkArea6, 393, 0, 698, 445, SF_WALKABLE | SF_DISABLED); _vm->setDeviceHotspot(kHS38Device, -1, -1, -1, -1); - if (_vm->_platypusActionStatus == kAS38PlatypusHoldingTrapDoor) + if (_vm->_plat->_actionStatus == kAS38PlatypusHoldingTrapDoor) _vm->_hotspots[kHS38Platypus]._flags = SF_WALKABLE | SF_DISABLED; - if (_vm->_platypusActionStatus == kAS38PlatypusHoldingTrapDoor) + if (_vm->_plat->_actionStatus == kAS38PlatypusHoldingTrapDoor) _vm->_hotspots[kHS38ExitCave]._flags = SF_EXIT_D_CURSOR; - else if (_vm->_gnapActionStatus == kAS38HoldingHuntingTrophy) + else if (_vm->_gnap->_actionStatus == kAS38HoldingHuntingTrophy) _vm->_hotspots[kHS38ExitCave]._flags = SF_EXIT_D_CURSOR; - if (_vm->_platypusActionStatus == kAS38PlatypusHoldingTrapDoor) + if (_vm->_plat->_actionStatus == kAS38PlatypusHoldingTrapDoor) _vm->_hotspots[kHS38TrapDoorLid1]._flags = SF_DISABLED; - else if (_vm->_gnapActionStatus == kAS38HoldingHuntingTrophy) + else if (_vm->_gnap->_actionStatus == kAS38HoldingHuntingTrophy) _vm->_hotspots[kHS38TrapDoorLid1]._flags = SF_PLAT_CURSOR | SF_TALK_CURSOR | SF_GRAB_CURSOR | SF_LOOK_CURSOR; - if (_vm->_platypusActionStatus == kAS38PlatypusHoldingTrapDoor) + if (_vm->_plat->_actionStatus == kAS38PlatypusHoldingTrapDoor) _vm->_hotspots[kHS38TrapDoorLid2]._flags = SF_DISABLED; - else if (_vm->_gnapActionStatus == kAS38HoldingHuntingTrophy) + else if (_vm->_gnap->_actionStatus == kAS38HoldingHuntingTrophy) _vm->_hotspots[kHS38TrapDoorLid2]._flags = SF_PLAT_CURSOR | SF_TALK_CURSOR | SF_GRAB_CURSOR | SF_LOOK_CURSOR; - if (_vm->_platypusActionStatus == kAS38PlatypusHoldingTrapDoor) + if (_vm->_plat->_actionStatus == kAS38PlatypusHoldingTrapDoor) _vm->_hotspots[kHS38WalkArea6]._flags = SF_NONE; _vm->_hotspotsCount = 13; } @@ -1144,8 +1144,8 @@ void Scene38::run() { break; case kHS38Platypus: - if (_vm->_gnapActionStatus == kAS38HoldingHuntingTrophy) { - _vm->_gnapActionStatus = kAS38ReleaseHuntingTrophy; + if (_vm->_gnap->_actionStatus == kAS38HoldingHuntingTrophy) { + _vm->_gnap->_actionStatus = kAS38ReleaseHuntingTrophy; } else if (_vm->_grabCursorSpriteIndex >= 0) { _vm->playGnapImpossible(_vm->_plat->_pos.x, _vm->_plat->_pos.y); } else { @@ -1168,42 +1168,42 @@ void Scene38::run() { break; case kHS38ExitHouse: - if (_vm->_gnapActionStatus == kAS38HoldingHuntingTrophy) { - _vm->_gnapActionStatus = kAS38ReleaseHuntingTrophy; + if (_vm->_gnap->_actionStatus == kAS38HoldingHuntingTrophy) { + _vm->_gnap->_actionStatus = kAS38ReleaseHuntingTrophy; } else { _vm->_isLeavingScene = true; _vm->gnapWalkTo(-1, -1, 0, 0x107AE, 1); - _vm->_gnapActionStatus = kAS38LeaveScene; + _vm->_gnap->_actionStatus = kAS38LeaveScene; _vm->_newSceneNum = 37; } break; case kHS38ExitCave: - if (_vm->_gnapActionStatus == kAS38HoldingHuntingTrophy) { - _vm->_gnapActionStatus = kAS38ReleaseHuntingTrophy; - if (_vm->_platypusActionStatus == kAS38PlatypusHoldingTrapDoor) + if (_vm->_gnap->_actionStatus == kAS38HoldingHuntingTrophy) { + _vm->_gnap->_actionStatus = kAS38ReleaseHuntingTrophy; + if (_vm->_plat->_actionStatus == kAS38PlatypusHoldingTrapDoor) _vm->_isLeavingScene = true; - } else if (_vm->_platypusActionStatus == kAS38PlatypusHoldingTrapDoor) { + } else if (_vm->_plat->_actionStatus == kAS38PlatypusHoldingTrapDoor) { _vm->_sceneWaiting = false; _vm->_isLeavingScene = true; _vm->gnapWalkTo(5, 7, 0, 0x107BB, 1); _vm->_newSceneNum = 39; - _vm->_gnapActionStatus = kAS38ExitCave; + _vm->_gnap->_actionStatus = kAS38ExitCave; } break; case kHS38TrapDoorLid1: case kHS38TrapDoorLid2: - if (_vm->_gnapActionStatus == kAS38HoldingHuntingTrophy) { - if (_vm->_verbCursor == PLAT_CURSOR && _vm->_platypusActionStatus != kAS38PlatypusHoldingTrapDoor) - _vm->_gnapActionStatus = kAS38UsePlatypusWithTrapDoor; + if (_vm->_gnap->_actionStatus == kAS38HoldingHuntingTrophy) { + if (_vm->_verbCursor == PLAT_CURSOR && _vm->_plat->_actionStatus != kAS38PlatypusHoldingTrapDoor) + _vm->_gnap->_actionStatus = kAS38UsePlatypusWithTrapDoor; else - _vm->_gnapActionStatus = kAS38ReleaseHuntingTrophy; + _vm->_gnap->_actionStatus = kAS38ReleaseHuntingTrophy; } break; case kHS38HuntingTrophy: - if (_vm->_gnapActionStatus != kAS38HoldingHuntingTrophy) { + if (_vm->_gnap->_actionStatus != kAS38HoldingHuntingTrophy) { if (_vm->_grabCursorSpriteIndex >= 0) { _vm->playGnapShowCurrItem(3, 6, 2, 0); } else { @@ -1212,12 +1212,12 @@ void Scene38::run() { _vm->playGnapScratchingHead(0, 0); break; case GRAB_CURSOR: - if (_vm->_platypusActionStatus == kAS38PlatypusHoldingTrapDoor) + if (_vm->_plat->_actionStatus == kAS38PlatypusHoldingTrapDoor) _vm->playGnapImpossible(0, 0); else { _vm->gnapWalkTo(3, 6, 0, 0x107BB, 1); _vm->platypusWalkTo(4, 8, -1, -1, 1); - _vm->_gnapActionStatus = kAS38UseHuntingTrophy; + _vm->_gnap->_actionStatus = kAS38UseHuntingTrophy; } break; case TALK_CURSOR: @@ -1240,17 +1240,17 @@ void Scene38::run() { case kHS38WalkArea4: case kHS38WalkArea5: case kHS38WalkArea6: - if (_vm->_gnapActionStatus == kAS38HoldingHuntingTrophy) - _vm->_gnapActionStatus = kAS38ReleaseHuntingTrophy; - else if (_vm->_gnapActionStatus < 0) + if (_vm->_gnap->_actionStatus == kAS38HoldingHuntingTrophy) + _vm->_gnap->_actionStatus = kAS38ReleaseHuntingTrophy; + else if (_vm->_gnap->_actionStatus < 0) _vm->gnapWalkTo(-1, -1, -1, -1, 1); break; default: if (_vm->_mouseClickState._left) { - if (_vm->_gnapActionStatus == kAS38HoldingHuntingTrophy) - _vm->_gnapActionStatus = kAS38ReleaseHuntingTrophy; - else if (_vm->_gnapActionStatus < 0) + if (_vm->_gnap->_actionStatus == kAS38HoldingHuntingTrophy) + _vm->_gnap->_actionStatus = kAS38ReleaseHuntingTrophy; + else if (_vm->_gnap->_actionStatus < 0) _vm->gnapWalkTo(-1, -1, -1, -1, 1); _vm->_mouseClickState._left = false; } @@ -1281,7 +1281,7 @@ void Scene38::updateAnimations() { if (gameSys.getAnimationStatus(0) == 2) { gameSys.setAnimation(0, 0, 0); - switch (_vm->_gnapActionStatus) { + switch (_vm->_gnap->_actionStatus) { case kAS38LeaveScene: _vm->_sceneDone = true; break; @@ -1291,7 +1291,7 @@ void Scene38::updateAnimations() { _vm->_gnapSequenceId = 0xA3; _vm->_gnapSequenceDatNum = 0; gameSys.setAnimation(0xA3, _vm->_gnapId, 0); - _vm->_gnapActionStatus = kAS38LeaveScene; + _vm->_gnap->_actionStatus = kAS38LeaveScene; break; case kAS38UseHuntingTrophy: gameSys.removeSequence(0x9B, 0, true); @@ -1299,11 +1299,11 @@ void Scene38::updateAnimations() { _vm->_gnapSequenceId = 0x9C; _vm->_gnapSequenceDatNum = 0; gameSys.setAnimation(0x9C, _vm->_gnapId, 0); - _vm->_gnapActionStatus = kAS38HoldingHuntingTrophy; + _vm->_gnap->_actionStatus = kAS38HoldingHuntingTrophy; updateHotspots(); break; case kAS38HoldingHuntingTrophy: - if (_vm->_platypusActionStatus != kAS38PlatypusHoldingTrapDoor) + 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); @@ -1318,8 +1318,8 @@ void Scene38::updateAnimations() { case kAS38ReleaseHuntingTrophy: if (_vm->_gnapSequenceId == 0x9E) { gameSys.insertSequence(0x9B, 0, 0, 0, kSeqNone, 0, 0, 0); - _vm->_gnapActionStatus = -1; - } else if (_vm->_platypusActionStatus == kAS38PlatypusHoldingTrapDoor) { + _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; @@ -1329,9 +1329,9 @@ void Scene38::updateAnimations() { _vm->_sceneWaiting = false; _vm->gnapWalkTo(5, 7, 0, 0x107BB, 1); _vm->_newSceneNum = 39; - _vm->_gnapActionStatus = kAS38ExitCave; + _vm->_gnap->_actionStatus = kAS38ExitCave; } else { - _vm->_gnapActionStatus = -1; + _vm->_gnap->_actionStatus = -1; } } else { gameSys.insertSequence(0x9E, _vm->_gnapId, makeRid(_vm->_gnapSequenceDatNum, _vm->_gnapSequenceId), _vm->_gnapId, kSeqSyncWait, 0, 0, 0); @@ -1350,7 +1350,7 @@ void Scene38::updateAnimations() { _vm->_gnapSequenceId = 0x9F; _vm->_gnapSequenceDatNum = 0; gameSys.setAnimation(0x9F, _vm->_gnapId, 0); - _vm->_gnapActionStatus = kAS38HoldingHuntingTrophy; + _vm->_gnap->_actionStatus = kAS38HoldingHuntingTrophy; if (_vm->_plat->_idleFacing != kDirNone) _vm->playPlatypusSequence(0x107D5); else @@ -1361,7 +1361,7 @@ void Scene38::updateAnimations() { _vm->_platypusSequenceDatNum = 0; _vm->_platypusId = _vm->_gnapId + 1; gameSys.setAnimation(0xA1, _vm->_gnapId + 1, 1); - _vm->_platypusActionStatus = kAS38PlatypusHoldingTrapDoor; + _vm->_plat->_actionStatus = kAS38PlatypusHoldingTrapDoor; updateHotspots(); break; } @@ -1369,7 +1369,7 @@ void Scene38::updateAnimations() { if (gameSys.getAnimationStatus(1) == 2) { gameSys.setAnimation(0, 0, 1); - if (_vm->_platypusActionStatus == kAS38PlatypusHoldingTrapDoor) { + 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; @@ -1451,7 +1451,7 @@ void Scene39::run() { break; case kHS39Platypus: - if (_vm->_gnapActionStatus < 0) { + if (_vm->_gnap->_actionStatus < 0) { if (_vm->_grabCursorSpriteIndex >= 0) { _vm->playGnapImpossible(_vm->_plat->_pos.x, _vm->_plat->_pos.y); } else { @@ -1475,17 +1475,17 @@ void Scene39::run() { break; case kHS39ExitUfoParty: - if (_vm->_gnapActionStatus < 0) { + if (_vm->_gnap->_actionStatus < 0) { _vm->_isLeavingScene = true; _vm->_sceneDone = true; _vm->gnapWalkTo(_vm->_gnap->_pos, 0, 0x107AB, 1); - _vm->_gnapActionStatus = kAS39LeaveScene; + _vm->_gnap->_actionStatus = kAS39LeaveScene; _vm->_newSceneNum = 40; } break; case kHS39Sign: - if (_vm->_gnapActionStatus < 0) { + if (_vm->_gnap->_actionStatus < 0) { if (_vm->_grabCursorSpriteIndex >= 0) { _vm->playGnapImpossible(0, 0); } else { @@ -1506,7 +1506,7 @@ void Scene39::run() { break; case kHS39ExitInsideHouse: - if (_vm->_gnapActionStatus < 0) { + if (_vm->_gnap->_actionStatus < 0) { _vm->_sceneDone = true; _vm->_isLeavingScene = true; _vm->_newSceneNum = 38; @@ -1515,12 +1515,12 @@ void Scene39::run() { case kHS39WalkArea1: case kHS39WalkArea2: - if (_vm->_gnapActionStatus < 0) + if (_vm->_gnap->_actionStatus < 0) _vm->gnapWalkTo(-1, -1, -1, -1, 1); break; default: - if (_vm->_mouseClickState._left && _vm->_gnapActionStatus < 0) { + if (_vm->_mouseClickState._left && _vm->_gnap->_actionStatus < 0) { _vm->gnapWalkTo(-1, -1, -1, -1, 1); _vm->_mouseClickState._left = false; } @@ -1530,9 +1530,9 @@ void Scene39::run() { updateAnimations(); if (!_vm->_isLeavingScene) { - if (_vm->_platypusActionStatus < 0) + if (_vm->_plat->_actionStatus < 0) _vm->updatePlatypusIdleSequence(); - if (_vm->_gnapActionStatus < 0) + if (_vm->_gnap->_actionStatus < 0) _vm->updateGnapIdleSequence(); if (!_vm->_timers[5]) { _vm->_timers[5] = _vm->getRandom(20) + 50; @@ -1571,10 +1571,10 @@ void Scene39::updateAnimations() { if (gameSys.getAnimationStatus(0) == 2) { gameSys.setAnimation(0, 0, 0); - if (_vm->_gnapActionStatus == kAS39LeaveScene) + if (_vm->_gnap->_actionStatus == kAS39LeaveScene) _vm->_sceneDone = true; else - _vm->_gnapActionStatus = -1; + _vm->_gnap->_actionStatus = -1; } if (gameSys.getAnimationStatus(3) == 2 && _nextGuySequenceId != -1) { diff --git a/engines/gnap/scenes/group4.cpp b/engines/gnap/scenes/group4.cpp index 861283af34..7ecaf23dd2 100644 --- a/engines/gnap/scenes/group4.cpp +++ b/engines/gnap/scenes/group4.cpp @@ -74,7 +74,7 @@ void Scene40::run() { break; case kHS40Platypus: - if (_vm->_gnapActionStatus < 0) { + if (_vm->_gnap->_actionStatus < 0) { if (_vm->_grabCursorSpriteIndex >= 0) { _vm->playGnapImpossible(_vm->_plat->_pos.x, _vm->_plat->_pos.y); } else { @@ -98,56 +98,56 @@ void Scene40::run() { break; case kHS40ExitCave: - if (_vm->_gnapActionStatus < 0) { + if (_vm->_gnap->_actionStatus < 0) { _vm->_newSceneNum = 39; _vm->_sceneDone = true; } break; case kHS40ExitToyStand: - if (_vm->_gnapActionStatus < 0) { + if (_vm->_gnap->_actionStatus < 0) { _vm->_newSceneNum = 41; _vm->_sceneDone = true; } break; case kHS40ExitBBQ: - if (_vm->_gnapActionStatus < 0) { + if (_vm->_gnap->_actionStatus < 0) { _vm->_newSceneNum = 42; _vm->_sceneDone = true; } break; case kHS40ExitUfo: - if (_vm->_gnapActionStatus < 0) { + if (_vm->_gnap->_actionStatus < 0) { _vm->_newSceneNum = 43; _vm->_sceneDone = true; } break; case kHS40ExitKissinBooth: - if (_vm->_gnapActionStatus < 0) { + if (_vm->_gnap->_actionStatus < 0) { _vm->_newSceneNum = 44; _vm->_sceneDone = true; } break; case kHS40ExitDancefloor: - if (_vm->_gnapActionStatus < 0) { + if (_vm->_gnap->_actionStatus < 0) { _vm->_newSceneNum = 45; _vm->_sceneDone = true; } break; case kHS40ExitShoe: - if (_vm->_gnapActionStatus < 0) { + if (_vm->_gnap->_actionStatus < 0) { _vm->_newSceneNum = 46; _vm->_sceneDone = true; } break; default: - if (_vm->_mouseClickState._left && _vm->_gnapActionStatus < 0) + if (_vm->_mouseClickState._left && _vm->_gnap->_actionStatus < 0) _vm->_mouseClickState._left = false; break; @@ -171,8 +171,8 @@ void Scene40::updateAnimations() { if (gameSys.getAnimationStatus(0) == 2) { gameSys.setAnimation(0, 0, 0); - if (_vm->_gnapActionStatus) - _vm->_gnapActionStatus = -1; + if (_vm->_gnap->_actionStatus) + _vm->_gnap->_actionStatus = -1; else _vm->_sceneDone = true; } @@ -228,7 +228,7 @@ void Scene41::run() { if (_vm->_toyUfoY < 0 || _vm->_toyUfoY > 300) _vm->_toyUfoY = 150; if (!_vm->_timers[9]) - _vm->_gnapActionStatus = kAS41GiveBackToyUfo; + _vm->_gnap->_actionStatus = kAS41GiveBackToyUfo; } else { if (!_vm->isFlag(kGFUnk16) && !_vm->isFlag(kGFJointTaken) && !_vm->isFlag(kGFUnk18) && !_vm->isFlag(kGFGroceryStoreHatTaken)) _vm->toyUfoSetStatus(kGFUnk16); @@ -349,7 +349,7 @@ void Scene41::run() { break; case kHS41Platypus: - if (_vm->_gnapActionStatus < 0) { + if (_vm->_gnap->_actionStatus < 0) { if (_vm->_grabCursorSpriteIndex >= 0) { _vm->playGnapImpossible(_vm->_plat->_pos.x, _vm->_plat->_pos.y); } else { @@ -375,14 +375,14 @@ void Scene41::run() { case kHS41ExitCave: _vm->_isLeavingScene = true; _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS41ExitCave].x, _vm->_hotspotsWalkPos[kHS41ExitCave].y, 0, 0x107AE, 1); - _vm->_gnapActionStatus = kAS41LeaveScene; + _vm->_gnap->_actionStatus = kAS41LeaveScene; _vm->_newSceneNum = 40; break; case kHS41Exit: _vm->_isLeavingScene = true; _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS41Exit].x, -1, 0, 0x107AF, 1); - _vm->_gnapActionStatus = kAS41LeaveScene; + _vm->_gnap->_actionStatus = kAS41LeaveScene; _vm->platypusWalkTo(_vm->_hotspotsWalkPos[kHS41Exit].x, -1, -1, 0x107CF, 1); _vm->_newSceneNum = 45; break; @@ -390,14 +390,14 @@ void Scene41::run() { case kHS41ExitBBQ: _vm->_isLeavingScene = true; _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS41ExitBBQ].x, -1, 0, 0x107AB, 1); - _vm->_gnapActionStatus = kAS41LeaveScene; + _vm->_gnap->_actionStatus = kAS41LeaveScene; _vm->platypusWalkTo(_vm->_hotspotsWalkPos[kHS41ExitBBQ].x, -1, -1, 0x107CD, 1); _vm->_newSceneNum = 42; break; case kHS41ToyVendor: if (_vm->_grabCursorSpriteIndex == kItemDiceQuarterHole) { - _vm->_gnapActionStatus = kAS41UseQuarterWithToyVendor; + _vm->_gnap->_actionStatus = kAS41UseQuarterWithToyVendor; _vm->gnapWalkTo(4, 7, 0, 0x107BB, 9); _vm->playGnapShowItem(_vm->_grabCursorSpriteIndex, 5, 0); } else if (_vm->_grabCursorSpriteIndex >= 0) { @@ -413,7 +413,7 @@ void Scene41::run() { case TALK_CURSOR: _vm->_gnap->_idleFacing = kDirUpRight; _vm->gnapWalkTo(4, 7, 0, _vm->getGnapSequenceId(gskBrainPulsating, 0, 0) | 0x10000, 1); - _vm->_gnapActionStatus = kAS41TalkToyVendor; + _vm->_gnap->_actionStatus = kAS41TalkToyVendor; break; case PLAT_CURSOR: _vm->playGnapImpossible(0, 0); @@ -426,7 +426,7 @@ void Scene41::run() { if (_vm->_grabCursorSpriteIndex == kItemChickenBucket) { _vm->gnapWalkTo(7, 7, 0, 0x107BB, 1); _vm->_gnap->_idleFacing = kDirUpRight; - _vm->_gnapActionStatus = kAS41UseChickenBucketWithKid; + _vm->_gnap->_actionStatus = kAS41UseChickenBucketWithKid; } else if (_vm->_grabCursorSpriteIndex >= 0) { _vm->playGnapShowCurrItem(7, 7, 8, 0); } else { @@ -437,7 +437,7 @@ void Scene41::run() { case GRAB_CURSOR: _vm->gnapWalkTo(7, 7, 0, 0x107BB, 1); _vm->_gnap->_idleFacing = kDirUpRight; - _vm->_gnapActionStatus = kAS41GrabKid; + _vm->_gnap->_actionStatus = kAS41GrabKid; break; case TALK_CURSOR: _vm->_gnap->_idleFacing = kDirUpRight; @@ -454,20 +454,20 @@ void Scene41::run() { if (_vm->_grabCursorSpriteIndex == kItemGum) { _vm->playGnapPullOutDevice(9, 0); gameSys.setAnimation(makeRid(_vm->_gnapSequenceDatNum, _vm->_gnapSequenceId), _vm->_gnapId, 0); - _vm->_gnapActionStatus = kAS41UseGumWithToyUfo; + _vm->_gnap->_actionStatus = kAS41UseGumWithToyUfo; } break; case kHS41WalkArea1: - if (_vm->_gnapActionStatus < 0) + if (_vm->_gnap->_actionStatus < 0) _vm->gnapWalkTo(-1, -1, -1, -1, 1); break; } } if (_vm->isFlag(kGFGnapControlsToyUFO)) { - if (!_vm->_timers[9] && _vm->_gnapActionStatus < 0) { - _vm->_gnapActionStatus = kAS41GiveBackToyUfo; + 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; @@ -477,7 +477,7 @@ void Scene41::run() { } } - if (_vm->_mouseClickState._left && _vm->_gnapActionStatus < 0) { + if (_vm->_mouseClickState._left && _vm->_gnap->_actionStatus < 0) { _vm->_mouseClickState._left = false; if (_vm->isFlag(kGFGnapControlsToyUFO)) { int sequenceId; @@ -510,13 +510,13 @@ void Scene41::run() { updateAnimations(); if (!_vm->_isLeavingScene) { - if (_vm->_platypusActionStatus < 0) + if (_vm->_plat->_actionStatus < 0) _vm->updatePlatypusIdleSequence(); - if (_vm->_gnapActionStatus < 0 && !_vm->isFlag(kGFGnapControlsToyUFO)) + if (_vm->_gnap->_actionStatus < 0 && !_vm->isFlag(kGFGnapControlsToyUFO)) _vm->updateGnapIdleSequence(); if (!_vm->_timers[4]) { _vm->_timers[4] = _vm->getRandom(100) + 100; - if (_vm->_gnapActionStatus < 0 && _vm->_platypusActionStatus < 0 && _vm->_toyUfoActionStatus == -1 && _nextToyVendorSequenceId == -1) { + if (_vm->_gnap->_actionStatus < 0 && _vm->_plat->_actionStatus < 0 && _vm->_toyUfoActionStatus == -1 && _nextToyVendorSequenceId == -1) { switch (_vm->getRandom(3)) { case 0: _nextToyVendorSequenceId = 0x113; @@ -534,7 +534,7 @@ void Scene41::run() { } if (!_vm->_timers[5]) { _vm->_timers[5] = _vm->getRandom(30) + 20; - if (_vm->_gnapActionStatus < 0 && _vm->_platypusActionStatus < 0 && _vm->_toyUfoActionStatus == -1 && _nextKidSequenceId == -1) { + if (_vm->_gnap->_actionStatus < 0 && _vm->_plat->_actionStatus < 0 && _vm->_toyUfoActionStatus == -1 && _nextKidSequenceId == -1) { if (_vm->isFlag(kGFGnapControlsToyUFO)) _nextKidSequenceId = 0x11B; else if (_vm->getRandom(3) != 0) @@ -562,26 +562,26 @@ void Scene41::updateAnimations() { GameSys& gameSys = *_vm->_gameSys; if (gameSys.getAnimationStatus(0) == 2) { - switch (_vm->_gnapActionStatus) { + switch (_vm->_gnap->_actionStatus) { case kAS41LeaveScene: gameSys.setAnimation(0, 0, 0); _vm->_sceneDone = true; - _vm->_gnapActionStatus = -1; + _vm->_gnap->_actionStatus = -1; break; case kAS41UseQuarterWithToyVendor: gameSys.setAnimation(0, 0, 0); _nextToyVendorSequenceId = 0x114; - _vm->_gnapActionStatus = -1; + _vm->_gnap->_actionStatus = -1; break; case kAS41TalkToyVendor: gameSys.setAnimation(0, 0, 0); _nextToyVendorSequenceId = 0x116; - _vm->_gnapActionStatus = -1; + _vm->_gnap->_actionStatus = -1; break; case kAS41UseGumWithToyUfo: gameSys.setAnimation(0, 0, 0); _vm->playGnapUseDevice(9, 0); - _vm->_gnapActionStatus = -1; + _vm->_gnap->_actionStatus = -1; _vm->setGrabCursorSprite(-1); _vm->invRemove(kItemGum); _vm->_toyUfoActionStatus = kAS41UfoGumAttached; @@ -601,7 +601,7 @@ void Scene41::updateAnimations() { _currKidSequenceId = _nextKidSequenceId; _nextKidSequenceId = 0x11B; _vm->_timers[5] = _vm->getRandom(30) + 20; - _vm->_gnapActionStatus = -1; + _vm->_gnap->_actionStatus = -1; _vm->setFlag(kGFGnapControlsToyUFO); updateHotspots(); _vm->_timers[9] = 600; @@ -627,7 +627,7 @@ void Scene41::updateAnimations() { _currKidSequenceId = _nextKidSequenceId; _nextKidSequenceId = -1; _vm->_timers[5] = _vm->getRandom(30) + 20; - _vm->_gnapActionStatus = -1; + _vm->_gnap->_actionStatus = -1; } break; case kAS41GiveBackToyUfo: @@ -652,7 +652,7 @@ void Scene41::updateAnimations() { _currKidSequenceId = _nextKidSequenceId; _nextKidSequenceId = -1; _vm->_timers[5] = _vm->getRandom(30) + 20; - _vm->_gnapActionStatus = -1; + _vm->_gnap->_actionStatus = -1; _vm->clearFlag(kGFGnapControlsToyUFO); updateHotspots(); } @@ -861,7 +861,7 @@ void Scene42::run() { break; case kHS42Platypus: - if (_vm->_gnapActionStatus < 0) { + if (_vm->_gnap->_actionStatus < 0) { if (_vm->_grabCursorSpriteIndex >= 0) { _vm->playGnapImpossible(_vm->_plat->_pos.x, _vm->_plat->_pos.y); } else { @@ -887,7 +887,7 @@ void Scene42::run() { case kHS42ExitUfoParty: _vm->_isLeavingScene = true; _vm->gnapWalkTo(_vm->_gnap->_pos.x, _vm->_hotspotsWalkPos[kHS42ExitUfoParty].y, 0, 0x107AE, 1); - _vm->_gnapActionStatus = kAS42LeaveScene; + _vm->_gnap->_actionStatus = kAS42LeaveScene; _vm->platypusWalkTo(_vm->_plat->_pos.x, _vm->_hotspotsWalkPos[kHS42ExitUfoParty].y, -1, 0x107C7, 1); _vm->_newSceneNum = 40; break; @@ -895,7 +895,7 @@ void Scene42::run() { case kHS42ExitToyStand: _vm->_isLeavingScene = true; _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS42ExitToyStand].x, _vm->_gnap->_pos.y, 0, 0x107AF, 1); - _vm->_gnapActionStatus = kAS42LeaveScene; + _vm->_gnap->_actionStatus = kAS42LeaveScene; _vm->platypusWalkTo(_vm->_hotspotsWalkPos[kHS42ExitToyStand].x, _vm->_hotspotsWalkPos[kHS42ExitToyStand].y, -1, 0x107CF, 1); _vm->_newSceneNum = 41; break; @@ -903,7 +903,7 @@ void Scene42::run() { case kHS42ExitUfo: _vm->_isLeavingScene = true; _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS42ExitUfo].x, _vm->_gnap->_pos.y, 0, 0x107AB, 1); - _vm->_gnapActionStatus = kAS42LeaveScene; + _vm->_gnap->_actionStatus = kAS42LeaveScene; _vm->platypusWalkTo(_vm->_hotspotsWalkPos[kHS42ExitUfo].x, _vm->_hotspotsWalkPos[kHS42ExitUfo].y, -1, 0x107CD, 1); _vm->_newSceneNum = 43; break; @@ -911,7 +911,7 @@ void Scene42::run() { case kHS42BBQVendor: if (_vm->_grabCursorSpriteIndex == kItemDiceQuarterHole) { _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS42BBQVendor].x, _vm->_hotspotsWalkPos[kHS42BBQVendor].y, 0, 0x107BB, 1); - _vm->_gnapActionStatus = kAS42UseQuarterWithBBQVendor; + _vm->_gnap->_actionStatus = kAS42UseQuarterWithBBQVendor; if (_vm->_plat->_pos.y < 9) _vm->platypusWalkTo(_vm->_plat->_pos.x, 9, -1, -1, 1); } else if (_vm->_grabCursorSpriteIndex >= 0) { @@ -924,7 +924,7 @@ void Scene42::run() { 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->_gnapActionStatus = kAS42TalkBBQVendor; + _vm->_gnap->_actionStatus = kAS42TalkBBQVendor; break; case GRAB_CURSOR: case PLAT_CURSOR: @@ -944,7 +944,7 @@ void Scene42::run() { break; case GRAB_CURSOR: _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS42ChickenLeg].x, _vm->_hotspotsWalkPos[kHS42ChickenLeg].y, 0, 0x107BC, 1); - _vm->_gnapActionStatus = kAS42GrabChickenLeg; + _vm->_gnap->_actionStatus = kAS42GrabChickenLeg; break; case TALK_CURSOR: case PLAT_CURSOR: @@ -956,14 +956,14 @@ void Scene42::run() { case kHS42WalkArea1: case kHS42WalkArea2: - if (_vm->_gnapActionStatus < 0) + if (_vm->_gnap->_actionStatus < 0) _vm->gnapWalkTo(-1, -1, -1, -1, 1); break; } } - if (_vm->_mouseClickState._left && _vm->_gnapActionStatus < 0) { + if (_vm->_mouseClickState._left && _vm->_gnap->_actionStatus < 0) { _vm->_mouseClickState._left = false; if (_vm->isFlag(kGFGnapControlsToyUFO)) { _vm->_toyUfoActionStatus = kAS42ToyUfoRefresh; @@ -978,13 +978,13 @@ void Scene42::run() { _vm->toyUfoCheckTimer(); if (!_vm->_isLeavingScene) { - if (_vm->_platypusActionStatus < 0 && !_vm->isFlag(kGFGnapControlsToyUFO)) + if (_vm->_plat->_actionStatus < 0 && !_vm->isFlag(kGFGnapControlsToyUFO)) _vm->updatePlatypusIdleSequence(); - if (_vm->_gnapActionStatus < 0 && !_vm->isFlag(kGFGnapControlsToyUFO)) + if (_vm->_gnap->_actionStatus < 0 && !_vm->isFlag(kGFGnapControlsToyUFO)) _vm->updateGnapIdleSequence(); if (!_vm->_timers[4]) { _vm->_timers[4] = _vm->getRandom(20) + 30; - if (_vm->_gnapActionStatus < 0 && _vm->_platypusActionStatus < 0 && _nextBBQVendorSequenceId == -1) { + if (_vm->_gnap->_actionStatus < 0 && _vm->_plat->_actionStatus < 0 && _nextBBQVendorSequenceId == -1) { switch (_vm->getRandom(8)) { case 0: _nextBBQVendorSequenceId = 0x14C; @@ -1026,22 +1026,22 @@ void Scene42::updateAnimations() { GameSys& gameSys = *_vm->_gameSys; if (gameSys.getAnimationStatus(0) == 2) { - switch (_vm->_gnapActionStatus) { + switch (_vm->_gnap->_actionStatus) { case kAS42LeaveScene: gameSys.setAnimation(0, 0, 0); - _vm->_gnapActionStatus = -1; + _vm->_gnap->_actionStatus = -1; _vm->_sceneDone = true; break; case kAS42TalkBBQVendor: gameSys.setAnimation(0, 0, 0); - _vm->_gnapActionStatus = -1; + _vm->_gnap->_actionStatus = -1; _nextBBQVendorSequenceId = 0x14B; break; case kAS42UseQuarterWithBBQVendor: case kAS42GrabChickenLeg: if (gameSys.getAnimationStatus(2) == 2) { int sequenceId; - if (_vm->_gnapActionStatus == kAS42UseQuarterWithBBQVendor) { + if (_vm->_gnap->_actionStatus == kAS42UseQuarterWithBBQVendor) { _vm->invRemove(kItemDiceQuarterHole); _vm->invAdd(kItemChickenBucket); _vm->setGrabCursorSprite(-1); @@ -1075,10 +1075,10 @@ void Scene42::updateAnimations() { } _vm->_gnapSequenceId = sequenceId; gameSys.setAnimation(sequenceId | (_vm->_gnapSequenceDatNum << 16), _vm->_gnapId, 0); - if (_vm->_gnapActionStatus == kAS42UseQuarterWithBBQVendor) - _vm->_gnapActionStatus = kAS42UseQuarterWithBBQVendorDone; + if (_vm->_gnap->_actionStatus == kAS42UseQuarterWithBBQVendor) + _vm->_gnap->_actionStatus = kAS42UseQuarterWithBBQVendorDone; else - _vm->_gnapActionStatus = -1; + _vm->_gnap->_actionStatus = -1; gameSys.insertSequence(_nextBBQVendorSequenceId, 1, _currBBQVendorSequenceId, 1, kSeqSyncWait, 0, 0, 0); gameSys.setAnimation(_nextBBQVendorSequenceId, 1, 2); _currBBQVendorSequenceId = _nextBBQVendorSequenceId; @@ -1094,11 +1094,11 @@ void Scene42::updateAnimations() { case kAS42UseQuarterWithBBQVendorDone: gameSys.setAnimation(0, 0, 0); _vm->setGrabCursorSprite(kItemChickenBucket); - _vm->_gnapActionStatus = -1; + _vm->_gnap->_actionStatus = -1; break; default: gameSys.setAnimation(0, 0, 0); - _vm->_gnapActionStatus = -1; + _vm->_gnap->_actionStatus = -1; break; } } @@ -1319,7 +1319,7 @@ void Scene43::run() { break; case kHS43Platypus: - if (_vm->_gnapActionStatus < 0) { + if (_vm->_gnap->_actionStatus < 0) { if (_vm->_grabCursorSpriteIndex >= 0) { _vm->playGnapImpossible(_vm->_plat->_pos.x, _vm->_plat->_pos.y); } else { @@ -1345,7 +1345,7 @@ void Scene43::run() { case kHS43ExitUfoParty: _vm->_isLeavingScene = true; _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS43ExitUfoParty].x, _vm->_hotspotsWalkPos[kHS43ExitUfoParty].y, 0, 0x107AE, 1); - _vm->_gnapActionStatus = 0; + _vm->_gnap->_actionStatus = 0; _vm->platypusWalkTo(_vm->_hotspotsWalkPos[kHS43ExitUfoParty].x, _vm->_hotspotsWalkPos[kHS43ExitUfoParty].y, -1, 0x107C7, 1); _vm->_newSceneNum = 40; break; @@ -1353,7 +1353,7 @@ void Scene43::run() { case kHS43ExitBBQ: _vm->_isLeavingScene = true; _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS43ExitBBQ].x, _vm->_gnap->_pos.y, 0, 0x107AF, 1); - _vm->_gnapActionStatus = 0; + _vm->_gnap->_actionStatus = 0; _vm->platypusWalkTo(_vm->_hotspotsWalkPos[kHS43ExitBBQ].x, _vm->_hotspotsWalkPos[kHS43ExitBBQ].y, -1, 0x107CF, 1); _vm->_newSceneNum = 42; break; @@ -1361,7 +1361,7 @@ void Scene43::run() { case kHS43ExitKissinBooth: _vm->_isLeavingScene = true; _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS43ExitKissinBooth].x, _vm->_gnap->_pos.y, 0, 0x107AB, 1); - _vm->_gnapActionStatus = 0; + _vm->_gnap->_actionStatus = 0; _vm->platypusWalkTo(_vm->_hotspotsWalkPos[kHS43ExitKissinBooth].x, _vm->_hotspotsWalkPos[kHS43ExitKissinBooth].y, -1, 0x107CD, 1); _vm->_newSceneNum = 44; break; @@ -1377,7 +1377,7 @@ void Scene43::run() { case TALK_CURSOR: _vm->_gnap->_idleFacing = kDirUpRight; _vm->gnapWalkTo(5, 8, 0, _vm->getGnapSequenceId(gskBrainPulsating, 0, 0) | 0x10000, 1); - _vm->_gnapActionStatus = 2; + _vm->_gnap->_actionStatus = 2; break; case GRAB_CURSOR: case PLAT_CURSOR: @@ -1399,7 +1399,7 @@ void Scene43::run() { case GRAB_CURSOR: _vm->_gnap->_idleFacing = kDirUpRight; _vm->gnapWalkTo(3, 7, 0, 67515, 1); - _vm->_gnapActionStatus = 1; + _vm->_gnap->_actionStatus = 1; break; case TALK_CURSOR: case PLAT_CURSOR: @@ -1411,13 +1411,13 @@ void Scene43::run() { case kHS43WalkArea1: case kHS43WalkArea2: - if (_vm->_gnapActionStatus < 0) + if (_vm->_gnap->_actionStatus < 0) _vm->gnapWalkTo(-1, -1, -1, -1, 1); break; } } - if (_vm->_mouseClickState._left && _vm->_gnapActionStatus < 0) { + if (_vm->_mouseClickState._left && _vm->_gnap->_actionStatus < 0) { _vm->_mouseClickState._left = false; if (_vm->isFlag(kGFGnapControlsToyUFO) && (_vm->_toyUfoActionStatus == 5 || _vm->_toyUfoActionStatus == -1)) { _vm->_toyUfoActionStatus = 5; @@ -1432,13 +1432,13 @@ void Scene43::run() { _vm->toyUfoCheckTimer(); if (!_vm->_isLeavingScene) { - if (_vm->_platypusActionStatus < 0 && !_vm->isFlag(kGFGnapControlsToyUFO)) + if (_vm->_plat->_actionStatus < 0 && !_vm->isFlag(kGFGnapControlsToyUFO)) _vm->updatePlatypusIdleSequence(); - if (_vm->_gnapActionStatus < 0 && !_vm->isFlag(kGFGnapControlsToyUFO)) + if (_vm->_gnap->_actionStatus < 0 && !_vm->isFlag(kGFGnapControlsToyUFO)) _vm->updateGnapIdleSequence(); if (!_vm->_timers[4] && (!_vm->isFlag(kGFGnapControlsToyUFO) || !_vm->isFlag(kGFGroceryStoreHatTaken))) { _vm->_timers[4] = _vm->getRandom(100) + 100; - if (_vm->_gnapActionStatus < 0 && _vm->_platypusActionStatus < 0 && _nextTwoHeadedGuySequenceId == -1) { + if (_vm->_gnap->_actionStatus < 0 && _vm->_plat->_actionStatus < 0 && _nextTwoHeadedGuySequenceId == -1) { switch (_vm->getRandom(5)) { case 0: _nextTwoHeadedGuySequenceId = 0x13C; @@ -1482,7 +1482,7 @@ void Scene43::updateAnimations() { GameSys& gameSys = *_vm->_gameSys; if (gameSys.getAnimationStatus(0) == 2) { - switch (_vm->_gnapActionStatus) { + switch (_vm->_gnap->_actionStatus) { case 0: gameSys.setAnimation(0, 0, 0); _vm->_sceneDone = true; @@ -1502,13 +1502,13 @@ void Scene43::updateAnimations() { _currTwoHeadedGuySequenceId = _nextTwoHeadedGuySequenceId; _nextTwoHeadedGuySequenceId = -1; _vm->_timers[4] = _vm->getRandom(100) + 100; - _vm->_gnapActionStatus = -1; + _vm->_gnap->_actionStatus = -1; } break; default: gameSys.setAnimation(0, 0, 0); - _vm->_gnapActionStatus = -1; + _vm->_gnap->_actionStatus = -1; break; } } @@ -1560,7 +1560,7 @@ void Scene43::updateAnimations() { gameSys.setAnimation(0x10874, _vm->_toyUfoId, 3); _vm->_toyUfoActionStatus = 8; _vm->setFlag(kGFJointTaken); - _vm->_gnapActionStatus = 3; + _vm->_gnap->_actionStatus = 3; break; case 8: _nextTwoHeadedGuySequenceId = 0x13A; @@ -1767,7 +1767,7 @@ void Scene44::run() { break; case kHS44Platypus: - if (_vm->_gnapActionStatus < 0) { + if (_vm->_gnap->_actionStatus < 0) { if (_vm->_grabCursorSpriteIndex >= 0) { _vm->playGnapImpossible(_vm->_plat->_pos.x, _vm->_plat->_pos.y); } else { @@ -1793,14 +1793,14 @@ void Scene44::run() { case kHS44ExitUfoParty: _vm->_isLeavingScene = true; _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS44ExitUfoParty].x, _vm->_hotspotsWalkPos[kHS44ExitUfoParty].y, 0, 0x107AE, 1); - _vm->_gnapActionStatus = 0; + _vm->_gnap->_actionStatus = 0; _vm->_newSceneNum = 40; break; case kHS44ExitUfo: _vm->_isLeavingScene = true; _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS44ExitUfo].x, _vm->_gnap->_pos.y, 0, 0x107AF, 1); - _vm->_gnapActionStatus = 0; + _vm->_gnap->_actionStatus = 0; _vm->platypusWalkTo(_vm->_hotspotsWalkPos[kHS44ExitUfo].x, _vm->_plat->_pos.y, -1, 0x107CF, 1); _vm->_newSceneNum = 43; break; @@ -1808,13 +1808,13 @@ void Scene44::run() { case kHS44ExitShow: _vm->_isLeavingScene = true; _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS44ExitShow].x, _vm->_hotspotsWalkPos[kHS44ExitShow].y, 0, 0x107AB, 1); - _vm->_gnapActionStatus = 0; + _vm->_gnap->_actionStatus = 0; _vm->_newSceneNum = 46; break; case kHS44KissingLady: if (_vm->_grabCursorSpriteIndex >= 0) { - _vm->_gnapActionStatus = 2; + _vm->_gnap->_actionStatus = 2; _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS44KissingLady].x, _vm->_hotspotsWalkPos[kHS44KissingLady].y, 0, -1, 9); _vm->playGnapShowItem(_vm->_grabCursorSpriteIndex, _vm->_hotspotsWalkPos[kHS44KissingLady].x - 1, _vm->_hotspotsWalkPos[kHS44KissingLady].y); } else { @@ -1828,7 +1828,7 @@ void Scene44::run() { 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->_gnapActionStatus = 1; + _vm->_gnap->_actionStatus = 1; break; case PLAT_CURSOR: _vm->gnapUseDeviceOnPlatypus(); @@ -1836,7 +1836,7 @@ void Scene44::run() { if (_vm->_gnap->_pos == Common::Point(7, 7)) _vm->gnapWalkStep(); _vm->playGnapIdle(5, 7); - _vm->_platypusActionStatus = 4; + _vm->_plat->_actionStatus = 4; break; } } @@ -1893,14 +1893,14 @@ void Scene44::run() { case kHS44WalkArea1: case kHS44WalkArea2: - if (_vm->_gnapActionStatus < 0) + if (_vm->_gnap->_actionStatus < 0) _vm->gnapWalkTo(-1, -1, -1, -1, 1); break; } } - if (_vm->_mouseClickState._left && _vm->_gnapActionStatus < 0) { + if (_vm->_mouseClickState._left && _vm->_gnap->_actionStatus < 0) { _vm->_mouseClickState._left = false; if (_vm->isFlag(kGFGnapControlsToyUFO)) { _vm->_toyUfoActionStatus = 7; @@ -1914,13 +1914,13 @@ void Scene44::run() { _vm->toyUfoCheckTimer(); if (!_vm->_isLeavingScene) { - if (_vm->_platypusActionStatus < 0 && !_vm->isFlag(kGFGnapControlsToyUFO) && _currKissingLadySequenceId != 0xF5) + if (_vm->_plat->_actionStatus < 0 && !_vm->isFlag(kGFGnapControlsToyUFO) && _currKissingLadySequenceId != 0xF5) _vm->updatePlatypusIdleSequence(); - if (_vm->_gnapActionStatus < 0 && !_vm->isFlag(kGFGnapControlsToyUFO)) + if (_vm->_gnap->_actionStatus < 0 && !_vm->isFlag(kGFGnapControlsToyUFO)) _vm->updateGnapIdleSequence(); if (!_vm->_timers[4]) { _vm->_timers[4] = _vm->getRandom(20) + 20; - if (_vm->_gnapActionStatus < 0 && _vm->_platypusActionStatus < 0 && _nextKissingLadySequenceId == -1) { + if (_vm->_gnap->_actionStatus < 0 && _vm->_plat->_actionStatus < 0 && _nextKissingLadySequenceId == -1) { switch (_vm->getRandom(20)) { case 0: _nextKissingLadySequenceId = 0xED; @@ -1947,7 +1947,7 @@ void Scene44::run() { } if (!_vm->_timers[5]) { _vm->_timers[5] = _vm->getRandom(20) + 20; - if (_vm->_gnapActionStatus < 0 && _vm->_platypusActionStatus < 0 && _nextSpringGuySequenceId == -1) { + if (_vm->_gnap->_actionStatus < 0 && _vm->_plat->_actionStatus < 0 && _nextSpringGuySequenceId == -1) { if (_vm->getRandom(5) != 0) { if (!_vm->isFlag(kGFSpringTaken)) _nextSpringGuySequenceId = 0xF9; @@ -1979,7 +1979,7 @@ void Scene44::updateAnimations() { if (gameSys.getAnimationStatus(0) == 2) { gameSys.setAnimation(0, 0, 0); - switch (_vm->_gnapActionStatus) { + switch (_vm->_gnap->_actionStatus) { case 0: _vm->_sceneDone = true; break; @@ -1990,12 +1990,12 @@ void Scene44::updateAnimations() { _nextKissingLadySequenceId = 0xF2; break; } - _vm->_gnapActionStatus = -1; + _vm->_gnap->_actionStatus = -1; } if (gameSys.getAnimationStatus(1) == 2) { gameSys.setAnimation(0, 0, 1); - switch (_vm->_platypusActionStatus) { + 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); @@ -2003,7 +2003,7 @@ void Scene44::updateAnimations() { _vm->_platypusSequenceDatNum = 0; gameSys.setAnimation(0xFE, _vm->_platypusId, 1); gameSys.removeSequence(_currKissingLadySequenceId, 1, true); - _vm->_platypusActionStatus = 5; + _vm->_plat->_actionStatus = 5; } break; case 5: @@ -2011,7 +2011,7 @@ void Scene44::updateAnimations() { _vm->_newSceneNum = 50; break; default: - _vm->_platypusActionStatus = -1; + _vm->_plat->_actionStatus = -1; break; } } @@ -2145,7 +2145,7 @@ void Scene45::run() { _vm->_gnapSequenceDatNum = 0; _vm->_gnapId = 1; gameSys.setAnimation(0x9E, 1, 0); - _vm->_gnapActionStatus = 1; + _vm->_gnap->_actionStatus = 1; gameSys.insertSequence(_vm->_gnapSequenceId, _vm->_gnapId, 0, 0, kSeqNone, 0, 0, 0); _vm->initPlatypusPos(4, 8, kDirNone); _vm->endSceneInit(); @@ -2256,7 +2256,7 @@ void Scene45::run() { break; case kHS45Platypus: - if (_vm->_gnapActionStatus < 0) { + if (_vm->_gnap->_actionStatus < 0) { if (_vm->_grabCursorSpriteIndex >= 0) { _vm->playGnapImpossible(_vm->_plat->_pos.x, _vm->_plat->_pos.y); } else { @@ -2282,29 +2282,29 @@ void Scene45::run() { break; case kHS45ExitUfoParty: - if (_vm->_gnapActionStatus < 0) { + if (_vm->_gnap->_actionStatus < 0) { _vm->_isLeavingScene = true; _vm->gnapWalkTo(_vm->_gnap->_pos.x, _vm->_hotspotsWalkPos[kHS45ExitUfoParty].y, 0, 0x107AE, 1); - _vm->_gnapActionStatus = 0; + _vm->_gnap->_actionStatus = 0; _vm->_newSceneNum = 40; } break; case kHS45ExitShoe: - if (_vm->_gnapActionStatus < 0) { + if (_vm->_gnap->_actionStatus < 0) { _vm->_isLeavingScene = true; _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS45ExitShoe].x, _vm->_gnap->_pos.y, 0, 0x107AF, 1); - _vm->_gnapActionStatus = 0; + _vm->_gnap->_actionStatus = 0; _vm->platypusWalkTo(_vm->_hotspotsWalkPos[kHS45ExitShoe].x, _vm->_plat->_pos.y, -1, 0x107CF, 1); _vm->_newSceneNum = 46; } break; case kHS45ExitRight: - if (_vm->_gnapActionStatus < 0) { + if (_vm->_gnap->_actionStatus < 0) { _vm->_isLeavingScene = true; _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS45ExitRight].x, _vm->_gnap->_pos.y, 0, 0x107AB, 1); - _vm->_gnapActionStatus = 0; + _vm->_gnap->_actionStatus = 0; _vm->platypusWalkTo(_vm->_hotspotsWalkPos[kHS45ExitRight].x, _vm->_plat->_pos.y, -1, 0x107CD, 1); _vm->_newSceneNum = 41; } @@ -2318,10 +2318,10 @@ void Scene45::run() { break; case kHS45DiscoBall: - if (_vm->_gnapActionStatus < 0) { + if (_vm->_gnap->_actionStatus < 0) { if (_vm->_grabCursorSpriteIndex == kItemSpring) { _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS45DiscoBall].x, _vm->_hotspotsWalkPos[kHS45DiscoBall].y, 0, 0x9F, 5); - _vm->_gnapActionStatus = 1; + _vm->_gnap->_actionStatus = 1; _vm->setGrabCursorSprite(-1); _vm->invRemove(kItemSpring); } else if (_vm->_grabCursorSpriteIndex >= 0) { @@ -2342,13 +2342,13 @@ void Scene45::run() { break; case kHS45WalkArea1: - if (_vm->_gnapActionStatus < 0) + if (_vm->_gnap->_actionStatus < 0) _vm->gnapWalkTo(-1, -1, -1, -1, 1); break; } } - if (_vm->_mouseClickState._left && _vm->_gnapActionStatus < 0) { + if (_vm->_mouseClickState._left && _vm->_gnap->_actionStatus < 0) { _vm->_mouseClickState._left = false; if (_vm->isFlag(kGFGnapControlsToyUFO)) { _vm->_toyUfoActionStatus = 3; @@ -2361,7 +2361,7 @@ void Scene45::run() { updateAnimations(); _vm->toyUfoCheckTimer(); - if (!_vm->_isLeavingScene && _vm->_gnapActionStatus < 0 && !_vm->isFlag(kGFGnapControlsToyUFO)) + if (!_vm->_isLeavingScene && _vm->_gnap->_actionStatus < 0 && !_vm->isFlag(kGFGnapControlsToyUFO)) _vm->updateGnapIdleSequence(); _vm->checkGameKeys(); @@ -2383,7 +2383,7 @@ void Scene45::updateAnimations() { if (gameSys.getAnimationStatus(0) == 2) { gameSys.setAnimation(0, 0, 0); - switch (_vm->_gnapActionStatus) { + switch (_vm->_gnap->_actionStatus) { case 0: _vm->_sceneDone = true; break; @@ -2397,7 +2397,7 @@ void Scene45::updateAnimations() { gameSys.setAnimation(0x9E, _vm->_gnapId, 0); break; default: - _vm->_gnapActionStatus = -1; + _vm->_gnap->_actionStatus = -1; break; } } @@ -2581,7 +2581,7 @@ void Scene46::run() { break; case kHS46Platypus: - if (_vm->_gnapActionStatus < 0) { + if (_vm->_gnap->_actionStatus < 0) { if (_vm->_grabCursorSpriteIndex >= 0) { _vm->playGnapImpossible(_vm->_plat->_pos.x, _vm->_plat->_pos.y); } else { @@ -2615,7 +2615,7 @@ void Scene46::run() { 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->_gnapActionStatus = 2; + _vm->_gnap->_actionStatus = 2; break; case GRAB_CURSOR: case PLAT_CURSOR: @@ -2636,7 +2636,7 @@ void Scene46::run() { 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->_gnapActionStatus = 1; + _vm->_gnap->_actionStatus = 1; break; case GRAB_CURSOR: case PLAT_CURSOR: @@ -2649,14 +2649,14 @@ void Scene46::run() { case kHS46ExitUfoParty: _vm->_isLeavingScene = true; _vm->gnapWalkTo(_vm->_gnap->_pos.x, _vm->_hotspotsWalkPos[kHS46ExitUfoParty].y, 0, 0x107AE, 1); - _vm->_gnapActionStatus = 0; + _vm->_gnap->_actionStatus = 0; _vm->_newSceneNum = 40; break; case kHS46ExitKissinBooth: _vm->_isLeavingScene = true; _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS46ExitKissinBooth].x, _vm->_gnap->_pos.y, 0, 0x107AF, 1); - _vm->_gnapActionStatus = 0; + _vm->_gnap->_actionStatus = 0; _vm->platypusWalkTo(_vm->_hotspotsWalkPos[kHS46ExitKissinBooth].x, _vm->_plat->_pos.y, -1, 0x107CF, 1); _vm->_newSceneNum = 44; break; @@ -2664,19 +2664,19 @@ void Scene46::run() { case kHS46ExitDisco: _vm->_isLeavingScene = true; _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS46ExitDisco].x, _vm->_gnap->_pos.y, 0, 0x107AB, 1); - _vm->_gnapActionStatus = 0; + _vm->_gnap->_actionStatus = 0; _vm->platypusWalkTo(_vm->_hotspotsWalkPos[kHS46ExitDisco].x, _vm->_plat->_pos.y, -1, 0x107CD, 1); _vm->_newSceneNum = 45; break; case kHS46WalkArea1: - if (_vm->_gnapActionStatus < 0) + if (_vm->_gnap->_actionStatus < 0) _vm->gnapWalkTo(-1, -1, -1, -1, 1); break; } } - if (_vm->_mouseClickState._left && _vm->_gnapActionStatus < 0) { + if (_vm->_mouseClickState._left && _vm->_gnap->_actionStatus < 0) { _vm->_mouseClickState._left = false; if (_vm->isFlag(kGFGnapControlsToyUFO)) { _vm->_toyUfoActionStatus = 4; @@ -2690,13 +2690,13 @@ void Scene46::run() { _vm->toyUfoCheckTimer(); if (!_vm->_isLeavingScene) { - if (_vm->_platypusActionStatus < 0 && !_vm->isFlag(kGFGnapControlsToyUFO)) + if (_vm->_plat->_actionStatus < 0 && !_vm->isFlag(kGFGnapControlsToyUFO)) _vm->updatePlatypusIdleSequence(); - if (_vm->_gnapActionStatus < 0 && !_vm->isFlag(kGFGnapControlsToyUFO)) + if (_vm->_gnap->_actionStatus < 0 && !_vm->isFlag(kGFGnapControlsToyUFO)) _vm->updateGnapIdleSequence(); if (!_vm->_timers[4]) { _vm->_timers[4] = _vm->getRandom(50) + 80; - if (_vm->_gnapActionStatus < 0 && _vm->_platypusActionStatus < 0 && _nextItchyGuySequenceId == -1) { + if (_vm->_gnap->_actionStatus < 0 && _vm->_plat->_actionStatus < 0 && _nextItchyGuySequenceId == -1) { if (_vm->getRandom(2) != 0) _nextItchyGuySequenceId = 0x49; else @@ -2705,7 +2705,7 @@ void Scene46::run() { } if (!_vm->_timers[5]) { _vm->_timers[5] = _vm->getRandom(50) + 80; - if (_vm->_gnapActionStatus < 0 && _vm->_platypusActionStatus < 0 && _nextSackGuySequenceId == -1) + if (_vm->_gnap->_actionStatus < 0 && _vm->_plat->_actionStatus < 0 && _nextSackGuySequenceId == -1) _nextSackGuySequenceId = 0x4C; } } @@ -2727,7 +2727,7 @@ void Scene46::updateAnimations() { if (gameSys.getAnimationStatus(0) == 2) { gameSys.setAnimation(0, 0, 0); - switch (_vm->_gnapActionStatus) { + switch (_vm->_gnap->_actionStatus) { case 0: _vm->_sceneDone = true; break; @@ -2738,7 +2738,7 @@ void Scene46::updateAnimations() { _nextSackGuySequenceId = 0x4A; break; } - _vm->_gnapActionStatus = -1; + _vm->_gnap->_actionStatus = -1; } if (gameSys.getAnimationStatus(3) == 2 && _nextSackGuySequenceId != -1) { diff --git a/engines/gnap/scenes/group5.cpp b/engines/gnap/scenes/group5.cpp index 3ae20034fd..8cf5087ff6 100644 --- a/engines/gnap/scenes/group5.cpp +++ b/engines/gnap/scenes/group5.cpp @@ -86,13 +86,13 @@ int Scene53::pressPhoneNumberButton(int phoneNumber, int buttonNum) { _currHandSequenceId = kPlatypusHandSequenceIds[buttonNum]; } - _vm->_gnapActionStatus = 6; + _vm->_gnap->_actionStatus = 6; while (gameSys.getAnimationStatus(6) != 2) { // checkGameAppStatus(); _vm->updateMouseCursor(); _vm->gameUpdateTick(); } - _vm->_gnapActionStatus = -1; + _vm->_gnap->_actionStatus = -1; if (buttonNum < 11) phoneNumber = buttonNum % 10 + 10 * phoneNumber; @@ -137,13 +137,13 @@ void Scene53::runRandomCall() { _callsMadeCtr = 0; } - _vm->_gnapActionStatus = 1; + _vm->_gnap->_actionStatus = 1; while (gameSys.getAnimationStatus(6) != 2) { _vm->updateMouseCursor(); // checkGameAppStatus(); _vm->gameUpdateTick(); } - _vm->_gnapActionStatus = -1; + _vm->_gnap->_actionStatus = -1; } void Scene53::runChitChatLine() { @@ -154,13 +154,13 @@ void Scene53::runChitChatLine() { gameSys.setAnimation(0x6E, 1, 6); gameSys.insertSequence(0x6E, 1, 0, 0, kSeqNone, 16, 0, 0); - _vm->_gnapActionStatus = 1; + _vm->_gnap->_actionStatus = 1; while (gameSys.getAnimationStatus(6) != 2) { _vm->updateMouseCursor(); // checkGameAppStatus(); _vm->gameUpdateTick(); } - _vm->_gnapActionStatus = -1; + _vm->_gnap->_actionStatus = -1; if (_vm->isFlag(kGFSpringTaken)) { gameSys.insertSequence(0x45, 40, _currHandSequenceId, 40, kSeqSyncWait, 0, 0, 0); @@ -198,7 +198,7 @@ void Scene53::runChitChatLine() { flag = 1; _vm->_isLeavingScene = true; _vm->_sceneDone = true; - _vm->_gnapActionStatus = 0; + _vm->_gnap->_actionStatus = 0; _vm->_newSceneNum = 17; break; case 5: @@ -217,31 +217,31 @@ void Scene53::runChitChatLine() { if (flag && sequenceId != -1) { _vm->stopSound(0xA0); pressPhoneNumberButton(0, _vm->_sceneClickedHotspot - 1); - _vm->_gnapActionStatus = 1; + _vm->_gnap->_actionStatus = 1; gameSys.setAnimation(sequenceId, 1, 6); gameSys.insertSequence(sequenceId, 1, 0, 0, kSeqNone, 16, 0, 0); - _vm->_gnapActionStatus = 1; + _vm->_gnap->_actionStatus = 1; while (gameSys.getAnimationStatus(6) != 2) { _vm->updateMouseCursor(); // checkGameAppStatus(); _vm->gameUpdateTick(); } - _vm->_gnapActionStatus = -1; + _vm->_gnap->_actionStatus = -1; gameSys.setAnimation(0x72, 1, 6); gameSys.insertSequence(0x72, 1, 0, 0, kSeqNone, 16, 0, 0); - _vm->_gnapActionStatus = 1; + _vm->_gnap->_actionStatus = 1; while (gameSys.getAnimationStatus(6) != 2) { _vm->updateMouseCursor(); // checkGameAppStatus(); _vm->gameUpdateTick(); } - _vm->_gnapActionStatus = -1; + _vm->_gnap->_actionStatus = -1; } } updateHotspots(); - _vm->_gnapActionStatus = 1; + _vm->_gnap->_actionStatus = 1; if (_vm->isFlag(kGFSpringTaken)) { gameSys.setAnimation(0x73, 40, 6); @@ -252,7 +252,7 @@ void Scene53::runChitChatLine() { _vm->gameUpdateTick(); } _currHandSequenceId = 0x73; - _vm->_gnapActionStatus = -1; + _vm->_gnap->_actionStatus = -1; } } @@ -287,7 +287,7 @@ void Scene53::run() { switch (_vm->_sceneClickedHotspot) { case 1: - if (_vm->_gnapActionStatus < 0) { + if (_vm->_gnap->_actionStatus < 0) { _vm->runMenu(); updateHotspots(); } @@ -307,7 +307,7 @@ void Scene53::run() { phoneNumber = pressPhoneNumberButton(phoneNumber, _vm->_sceneClickedHotspot - 1); debugC(kDebugBasic, "phoneNumber: %d", phoneNumber); if (phoneNumberLen == 7) { - _vm->_gnapActionStatus = 1; + _vm->_gnap->_actionStatus = 1; if (_vm->isFlag(kGFSpringTaken)) { gameSys.setAnimation(0x73, 40, 6); gameSys.insertSequence(0x73, 40, _currHandSequenceId, 40, kSeqSyncWait, 0, 0, 0); @@ -317,7 +317,7 @@ void Scene53::run() { _vm->gameUpdateTick(); } _currHandSequenceId = 0x73; - _vm->_gnapActionStatus = -1; + _vm->_gnap->_actionStatus = -1; } if (phoneNumber == 7284141) { runChitChatLine(); @@ -348,8 +348,8 @@ void Scene53::run() { pressPhoneNumberButton(0, _vm->_sceneClickedHotspot - 1); break; case 14: - if (_vm->_gnapActionStatus < 0) { - _vm->_gnapActionStatus = 1; + if (_vm->_gnap->_actionStatus < 0) { + _vm->_gnap->_actionStatus = 1; if (_vm->isFlag(kGFSpringTaken)) { gameSys.setAnimation(0x73, 40, 6); gameSys.insertSequence(0x73, 40, _currHandSequenceId, 40, kSeqSyncWait, 0, 0, 0); @@ -359,11 +359,11 @@ void Scene53::run() { _vm->gameUpdateTick(); } _currHandSequenceId = 0x73; - _vm->_gnapActionStatus = -1; + _vm->_gnap->_actionStatus = -1; } _vm->_isLeavingScene = true; _vm->_sceneDone = true; - _vm->_gnapActionStatus = 0; + _vm->_gnap->_actionStatus = 0; _vm->_newSceneNum = 17; } break; |