diff options
author | Strangerke | 2016-04-26 23:16:19 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2016-05-10 09:54:21 +0200 |
commit | 9fc9de7882b04c633d6b551ef5ea437ecade26cd (patch) | |
tree | f8c48cb489a887242eac6050656d058a5abd04d3 /engines/gnap | |
parent | ffb93fa214ae0550a5afd571b9fe998dcb856fb7 (diff) | |
download | scummvm-rg350-9fc9de7882b04c633d6b551ef5ea437ecade26cd.tar.gz scummvm-rg350-9fc9de7882b04c633d6b551ef5ea437ecade26cd.tar.bz2 scummvm-rg350-9fc9de7882b04c633d6b551ef5ea437ecade26cd.zip |
GNAP: Prepare the merge of scene group 0 (WIP 3)
Diffstat (limited to 'engines/gnap')
-rw-r--r-- | engines/gnap/scenes/scene05.cpp | 162 | ||||
-rw-r--r-- | engines/gnap/scenes/scene05.h | 4 | ||||
-rw-r--r-- | engines/gnap/scenes/scene06.cpp | 190 | ||||
-rw-r--r-- | engines/gnap/scenes/scene06.h | 8 |
4 files changed, 182 insertions, 182 deletions
diff --git a/engines/gnap/scenes/scene05.cpp b/engines/gnap/scenes/scene05.cpp index f28a37daa1..8046465cd0 100644 --- a/engines/gnap/scenes/scene05.cpp +++ b/engines/gnap/scenes/scene05.cpp @@ -28,33 +28,33 @@ namespace Gnap { enum { - kHSPlatypus = 0, - kHSHaystack = 1, - kHSPadlock = 2, - kHSLadder = 3, - kHSExitHouse = 4, - kHSChicken = 5, - kHSDevice = 6, - kHSWalkArea1 = 7, - kHSWalkArea2 = 8, - kHSWalkArea3 = 9 + kHS05Platypus = 0, + kHS05Haystack = 1, + kHS05Padlock = 2, + kHS05Ladder = 3, + kHS05ExitHouse = 4, + kHS05Chicken = 5, + kHS05Device = 6, + kHS05WalkArea1 = 7, + kHS05WalkArea2 = 8, + kHS05WalkArea3 = 9 }; enum { - kASPlatSearchHaystack = 0, - kASTryPickPadlock = 1, - kASPickPadlock = 2, - kASTalkChicken = 3, - kASGrabChicken = 4, - kASGrabLadder = 5, - kASEnterBarn = 6, - kASUseTwigWithChicken = 11, - kASLeaveScene = 12 + kAS05PlatSearchHaystack = 0, + kAS05TryPickPadlock = 1, + kAS05PickPadlock = 2, + kAS05TalkChicken = 3, + kAS05GrabChicken = 4, + kAS05GrabLadder = 5, + kAS05EnterBarn = 6, + kAS05UseTwigWithChicken = 11, + kAS05LeaveScene = 12 }; Scene05::Scene05(GnapEngine *vm) : Scene(vm) { - _s05_nextChickenSequenceId = -1; - _s05_currChickenSequenceId = -1; + _nextChickenSequenceId = -1; + _currChickenSequenceId = -1; } int Scene05::init() { @@ -65,20 +65,20 @@ int Scene05::init() { } void Scene05::updateHotspots() { - _vm->setHotspot(kHSPlatypus, 0, 0, 0, 0, SF_DISABLED | SF_WALKABLE | SF_TALK_CURSOR | SF_GRAB_CURSOR | SF_LOOK_CURSOR); - _vm->setHotspot(kHSHaystack, 236, 366, 372, 442, SF_PLAT_CURSOR | SF_TALK_CURSOR | SF_GRAB_CURSOR | SF_LOOK_CURSOR, 5, 7); - _vm->setHotspot(kHSPadlock, 386, 230, 626, 481, SF_PLAT_CURSOR | SF_TALK_CURSOR | SF_GRAB_CURSOR | SF_LOOK_CURSOR, 5, 7); - _vm->setHotspot(kHSLadder, 108, 222, 207, 444, SF_PLAT_CURSOR | SF_TALK_CURSOR | SF_GRAB_CURSOR | SF_LOOK_CURSOR, 4, 7); - _vm->setHotspot(kHSExitHouse, 0, 395, 20, 600, SF_EXIT_L_CURSOR | SF_WALKABLE, 0, 8); - _vm->setHotspot(kHSChicken, 612, 462, 722, 564, SF_PLAT_CURSOR | SF_TALK_CURSOR | SF_GRAB_CURSOR | SF_LOOK_CURSOR, 7, 8); - _vm->setHotspot(kHSWalkArea1, 104, 0, 421, 480); - _vm->setHotspot(kHSWalkArea2, 422, 0, 800, 487); - _vm->setHotspot(kHSWalkArea3, 0, 0, 104, 499); - _vm->setDeviceHotspot(kHSDevice, -1, -1, -1, -1); + _vm->setHotspot(kHS05Platypus, 0, 0, 0, 0, SF_DISABLED | SF_WALKABLE | SF_TALK_CURSOR | SF_GRAB_CURSOR | SF_LOOK_CURSOR); + _vm->setHotspot(kHS05Haystack, 236, 366, 372, 442, SF_PLAT_CURSOR | SF_TALK_CURSOR | SF_GRAB_CURSOR | SF_LOOK_CURSOR, 5, 7); + _vm->setHotspot(kHS05Padlock, 386, 230, 626, 481, SF_PLAT_CURSOR | SF_TALK_CURSOR | SF_GRAB_CURSOR | SF_LOOK_CURSOR, 5, 7); + _vm->setHotspot(kHS05Ladder, 108, 222, 207, 444, SF_PLAT_CURSOR | SF_TALK_CURSOR | SF_GRAB_CURSOR | SF_LOOK_CURSOR, 4, 7); + _vm->setHotspot(kHS05ExitHouse, 0, 395, 20, 600, SF_EXIT_L_CURSOR | SF_WALKABLE, 0, 8); + _vm->setHotspot(kHS05Chicken, 612, 462, 722, 564, SF_PLAT_CURSOR | SF_TALK_CURSOR | SF_GRAB_CURSOR | SF_LOOK_CURSOR, 7, 8); + _vm->setHotspot(kHS05WalkArea1, 104, 0, 421, 480); + _vm->setHotspot(kHS05WalkArea2, 422, 0, 800, 487); + _vm->setHotspot(kHS05WalkArea3, 0, 0, 104, 499); + _vm->setDeviceHotspot(kHS05Device, -1, -1, -1, -1); if (_vm->isFlag(kGFPlatypus)) - _vm->_hotspots[kHSPlatypus]._flags = SF_WALKABLE | SF_TALK_CURSOR | SF_GRAB_CURSOR | SF_LOOK_CURSOR; + _vm->_hotspots[kHS05Platypus]._flags = SF_WALKABLE | SF_TALK_CURSOR | SF_GRAB_CURSOR | SF_LOOK_CURSOR; if (_vm->isFlag(kGFBarnPadlockOpen)) - _vm->_hotspots[kHSPadlock]._flags = SF_EXIT_U_CURSOR; + _vm->_hotspots[kHS05Padlock]._flags = SF_EXIT_U_CURSOR; _vm->_hotspotsCount = 10; } @@ -86,11 +86,11 @@ void Scene05::run() { _vm->playSound(0x1091C, true); _vm->startSoundTimerC(7); - _s05_currChickenSequenceId = 0x142; + _currChickenSequenceId = 0x142; _vm->_gameSys->setAnimation(0x142, 100, 3); _vm->_gameSys->insertSequence(0x142, 100, 0, 0, kSeqNone, 0, 0, 0); - _s05_nextChickenSequenceId = -1; + _nextChickenSequenceId = -1; _vm->_timers[5] = _vm->getRandom(10) + 30; _vm->_timers[6] = _vm->getRandom(150) + 300; @@ -125,14 +125,14 @@ void Scene05::run() { _vm->updateGrabCursorSprite(0, 0); switch (_vm->_sceneClickedHotspot) { - case kHSDevice: + case kHS05Device: if (_vm->_gnapActionStatus < 0) { _vm->runMenu(); updateHotspots(); } break; - case kHSPlatypus: + case kHS05Platypus: if (_vm->_gnapActionStatus < 0 && _vm->isFlag(kGFPlatypus)) { if (_vm->_grabCursorSpriteIndex == kItemDisguise) { _vm->gnapUseDisguiseOnPlatypus(); @@ -161,7 +161,7 @@ void Scene05::run() { } break; - case kHSHaystack: + case kHS05Haystack: if (_vm->_gnapActionStatus < 0 && _vm->_platypusActionStatus < 0) { if (_vm->_grabCursorSpriteIndex >= 0) { _vm->playGnapShowCurrItem(_vm->_hotspotsWalkPos[1].x - 2, _vm->_hotspotsWalkPos[1].y, 4, 5); @@ -180,7 +180,7 @@ void Scene05::run() { if (_vm->isFlag(kGFPlatypus)) { _vm->gnapUseDeviceOnPlatypuss(); if (_vm->platypusWalkTo(_vm->_hotspotsWalkPos[1].x, _vm->_hotspotsWalkPos[1].y, 1, 0x107C2, 1)) { - _vm->_platypusActionStatus = kASPlatSearchHaystack; + _vm->_platypusActionStatus = kAS05PlatSearchHaystack; _vm->_platypusFacing = kDirUnk4; } if (_vm->_gnapX == 4 && (_vm->_gnapY == 8 || _vm->_gnapY == 7)) @@ -193,13 +193,13 @@ void Scene05::run() { } break; - case kHSChicken: + case kHS05Chicken: if (_vm->_gnapActionStatus < 0) { if (_vm->_grabCursorSpriteIndex == kItemTwig) { _vm->_gnapIdleFacing = kDirUpRight; _vm->gnapWalkTo(_vm->_hotspotsWalkPos[_vm->_sceneClickedHotspot].x, _vm->_hotspotsWalkPos[_vm->_sceneClickedHotspot].y + 1, 0, _vm->getGnapSequenceId(gskIdle, 0, 0) | 0x10000, 1); - _vm->_gnapActionStatus = kASUseTwigWithChicken; + _vm->_gnapActionStatus = kAS05UseTwigWithChicken; } else if (_vm->_grabCursorSpriteIndex >= 0) { _vm->playGnapShowCurrItem(_vm->_hotspotsWalkPos[_vm->_sceneClickedHotspot].x, _vm->_hotspotsWalkPos[_vm->_sceneClickedHotspot].y + 1, 9, 7); } else { @@ -210,12 +210,12 @@ void Scene05::run() { case GRAB_CURSOR: _vm->_gnapIdleFacing = kDirBottomRight; _vm->gnapWalkTo(_vm->_hotspotsWalkPos[5].x, _vm->_hotspotsWalkPos[5].y, 0, _vm->getGnapSequenceId(gskIdle, 0, 0) | 0x10000, 1); - _vm->_gnapActionStatus = kASGrabChicken; + _vm->_gnapActionStatus = kAS05GrabChicken; break; case TALK_CURSOR: _vm->_gnapIdleFacing = kDirBottomRight; _vm->gnapWalkTo(_vm->_hotspotsWalkPos[5].x, _vm->_hotspotsWalkPos[5].y, 0, _vm->getGnapSequenceId(gskBrainPulsating, 0, 0) | 0x10000, 1); - _vm->_gnapActionStatus = kASTalkChicken; + _vm->_gnapActionStatus = kAS05TalkChicken; break; case PLAT_CURSOR: _vm->playGnapImpossible(0, 0); @@ -225,7 +225,7 @@ void Scene05::run() { } break; - case kHSLadder: + case kHS05Ladder: if (_vm->_gnapActionStatus < 0) { if (_vm->_grabCursorSpriteIndex >= 0) { _vm->playGnapShowCurrItem(_vm->_hotspotsWalkPos[_vm->_sceneClickedHotspot].x, _vm->_hotspotsWalkPos[_vm->_sceneClickedHotspot].y, 2, 5); @@ -237,7 +237,7 @@ void Scene05::run() { case GRAB_CURSOR: _vm->_gnapIdleFacing = kDirBottomLeft; _vm->gnapWalkTo(_vm->_hotspotsWalkPos[3].x, _vm->_hotspotsWalkPos[3].y, 0, _vm->getGnapSequenceId(gskIdle, 0, 0) | 0x10000, 1); - _vm->_gnapActionStatus = kASGrabLadder; + _vm->_gnapActionStatus = kAS05GrabLadder; break; case TALK_CURSOR: case PLAT_CURSOR: @@ -248,11 +248,11 @@ void Scene05::run() { } break; - case kHSPadlock: + case kHS05Padlock: if (_vm->isFlag(kGFBarnPadlockOpen)) { _vm->_isLeavingScene = true; _vm->gnapWalkTo(_vm->_hotspotsWalkPos[2].x - 1, _vm->_hotspotsWalkPos[2].y + 1, 0, -1, 1); - _vm->_gnapActionStatus = kASEnterBarn; + _vm->_gnapActionStatus = kAS05EnterBarn; if (_vm->_cursorValue == 1) _vm->_newSceneNum = 6; else @@ -261,7 +261,7 @@ void Scene05::run() { 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 = kASPickPadlock; + _vm->_gnapActionStatus = kAS05PickPadlock; } else if (_vm->_grabCursorSpriteIndex >= 0) { _vm->playGnapShowCurrItem(_vm->_hotspotsWalkPos[2].x, _vm->_hotspotsWalkPos[2].y, 7, 4); } else { @@ -273,7 +273,7 @@ void Scene05::run() { _vm->_gnapIdleFacing = kDirUpRight; _vm->gnapWalkTo(_vm->_hotspotsWalkPos[_vm->_sceneClickedHotspot].x, _vm->_hotspotsWalkPos[_vm->_sceneClickedHotspot].y, 0, _vm->getGnapSequenceId(gskIdle, 0, 0) | 0x10000, 1); - _vm->_gnapActionStatus = kASTryPickPadlock; + _vm->_gnapActionStatus = kAS05TryPickPadlock; break; case TALK_CURSOR: case PLAT_CURSOR: @@ -284,11 +284,11 @@ void Scene05::run() { } break; - case kHSExitHouse: + case kHS05ExitHouse: if (_vm->_gnapActionStatus < 0) { _vm->_isLeavingScene = true; _vm->gnapWalkTo(_vm->_hotspotsWalkPos[4].x, _vm->_hotspotsWalkPos[4].y, 0, 0x107AF, 1); - _vm->_gnapActionStatus = kASLeaveScene; + _vm->_gnapActionStatus = kAS05LeaveScene; if (_vm->isFlag(kGFPlatypus)) _vm->platypusWalkTo(_vm->_hotspotsWalkPos[4].x, _vm->_hotspotsWalkPos[4].y + 1, -1, 0x107C7, 1); if (_vm->_cursorValue == 1) @@ -298,13 +298,13 @@ void Scene05::run() { } break; - case kHSWalkArea1: - case kHSWalkArea2: + case kHS05WalkArea1: + case kHS05WalkArea2: if (_vm->_gnapActionStatus < 0) _vm->gnapWalkTo(-1, -1, -1, -1, 1); break; - case kHSWalkArea3: + case kHS05WalkArea3: // Nothing break; @@ -328,11 +328,11 @@ void Scene05::run() { _vm->updateGnapIdleSequence(); if (!_vm->_timers[5]) { _vm->_timers[5] = _vm->getRandom(20) + 30; - if (_vm->_gnapActionStatus != kASTalkChicken && _s05_nextChickenSequenceId == -1) { + if (_vm->_gnapActionStatus != kAS05TalkChicken && _nextChickenSequenceId == -1) { if (_vm->getRandom(4) != 0) - _s05_nextChickenSequenceId = 0x142; + _nextChickenSequenceId = 0x142; else - _s05_nextChickenSequenceId = 0x143; + _nextChickenSequenceId = 0x143; } } if (!_vm->_timers[6]) { @@ -360,17 +360,17 @@ void Scene05::updateAnimations() { if (_vm->_gameSys->getAnimationStatus(0) == 2) { _vm->_gameSys->setAnimation(0, 0, 0); switch (_vm->_gnapActionStatus) { - case kASLeaveScene: + case kAS05LeaveScene: _vm->_sceneDone = true; _vm->_gnapActionStatus = -1; break; - case kASTryPickPadlock: + case kAS05TryPickPadlock: _vm->_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; break; - case kASPickPadlock: + case kAS05PickPadlock: _vm->_gameSys->setAnimation(0x147, _vm->_gnapId, 0); _vm->_gameSys->insertSequence(0x147, _vm->_gnapId, makeRid(_vm->_gnapSequenceDatNum, _vm->_gnapSequenceId), _vm->_gnapId, kSeqSyncWait, 0, 0, 0); _vm->_gnapSequenceId = 0x147; @@ -381,16 +381,16 @@ void Scene05::updateAnimations() { _vm->_newSceneNum = 6; _vm->_timers[2] = 100; _vm->invRemove(kItemNeedle); - _vm->_gnapActionStatus = kASLeaveScene; + _vm->_gnapActionStatus = kAS05LeaveScene; break; - case kASTalkChicken: - _s05_nextChickenSequenceId = 0x144; + case kAS05TalkChicken: + _nextChickenSequenceId = 0x144; _vm->_gnapActionStatus = -1; break; - case kASGrabChicken: - _s05_nextChickenSequenceId = 0x14B; + case kAS05GrabChicken: + _nextChickenSequenceId = 0x14B; break; - case kASGrabLadder: + case kAS05GrabLadder: while (_vm->_gameSys->isSequenceActive(0x149, 39)) _vm->gameUpdateTick(); _vm->_gameSys->insertSequence(0x14E, _vm->_gnapId + 1, 0, 0, kSeqNone, 0, 0, 0); @@ -401,16 +401,16 @@ void Scene05::updateAnimations() { _vm->_timers[6] = 300; _vm->_gnapActionStatus = -1; break; - case kASEnterBarn: + case kAS05EnterBarn: _vm->_gameSys->insertSequence(0x107B1, 1, makeRid(_vm->_gnapSequenceDatNum, _vm->_gnapSequenceId), _vm->_gnapId, kSeqSyncWait, 0, 75 * _vm->_gnapX - _vm->_gnapGridX, 48 * _vm->_gnapY - _vm->_gnapGridY); _vm->_gameSys->setAnimation(0x107B1, 1, 0); - _vm->_gnapActionStatus = kASLeaveScene; + _vm->_gnapActionStatus = kAS05LeaveScene; break; - case kASUseTwigWithChicken: + case kAS05UseTwigWithChicken: _vm->playGnapShowItem(5, 0, 0); - _s05_nextChickenSequenceId = 0x14F; + _nextChickenSequenceId = 0x14F; _vm->_gnapActionStatus = -1; break; } @@ -431,7 +431,7 @@ void Scene05::updateAnimations() { _vm->_timers[1] = 30; _vm->_platypusActionStatus = -1; } - if (_vm->_platypusActionStatus == kASPlatSearchHaystack) { + if (_vm->_platypusActionStatus == kAS05PlatSearchHaystack) { _vm->_gameSys->setAnimation(0, 0, 1); _vm->_gameSys->insertSequence(0x145, _vm->_platypusId, _vm->_platypusSequenceId | (_vm->_platypusSequenceDatNum << 16), _vm->_platypusId, kSeqSyncWait, 0, 0, 0); _vm->_gameSys->insertSequence(0x146, 256, 0x145, _vm->_platypusId, kSeqSyncWait, 0, 0, 0); @@ -445,20 +445,20 @@ void Scene05::updateAnimations() { } if (_vm->_gameSys->getAnimationStatus(3) == 2) { - if (_s05_nextChickenSequenceId == 0x14B) { - _vm->_gameSys->setAnimation(_s05_nextChickenSequenceId, 100, 3); - _vm->_gameSys->insertSequence(_s05_nextChickenSequenceId, 100, _s05_currChickenSequenceId, 100, kSeqSyncWait, 0, 0, 0); + if (_nextChickenSequenceId == 0x14B) { + _vm->_gameSys->setAnimation(_nextChickenSequenceId, 100, 3); + _vm->_gameSys->insertSequence(_nextChickenSequenceId, 100, _currChickenSequenceId, 100, kSeqSyncWait, 0, 0, 0); _vm->_gameSys->insertSequence(0x14C, _vm->_gnapId, makeRid(_vm->_gnapSequenceDatNum, _vm->_gnapSequenceId), _vm->_gnapId, kSeqSyncWait, 0, 0, 0); _vm->_gnapSequenceDatNum = 0; _vm->_gnapSequenceId = 0x14C; - _s05_currChickenSequenceId = _s05_nextChickenSequenceId; - _s05_nextChickenSequenceId = -1; + _currChickenSequenceId = _nextChickenSequenceId; + _nextChickenSequenceId = -1; _vm->_gnapActionStatus = -1; - } else if (_s05_nextChickenSequenceId != -1) { - _vm->_gameSys->setAnimation(_s05_nextChickenSequenceId, 100, 3); - _vm->_gameSys->insertSequence(_s05_nextChickenSequenceId, 100, _s05_currChickenSequenceId, 100, kSeqSyncWait, 0, 0, 0); - _s05_currChickenSequenceId = _s05_nextChickenSequenceId; - _s05_nextChickenSequenceId = -1; + } else if (_nextChickenSequenceId != -1) { + _vm->_gameSys->setAnimation(_nextChickenSequenceId, 100, 3); + _vm->_gameSys->insertSequence(_nextChickenSequenceId, 100, _currChickenSequenceId, 100, kSeqSyncWait, 0, 0, 0); + _currChickenSequenceId = _nextChickenSequenceId; + _nextChickenSequenceId = -1; } } } diff --git a/engines/gnap/scenes/scene05.h b/engines/gnap/scenes/scene05.h index 083abe5f2d..a3be46b009 100644 --- a/engines/gnap/scenes/scene05.h +++ b/engines/gnap/scenes/scene05.h @@ -42,8 +42,8 @@ public: virtual void updateAnimationsCb() {} private: - int _s05_nextChickenSequenceId; - int _s05_currChickenSequenceId; + int _nextChickenSequenceId; + int _currChickenSequenceId; }; } // End of namespace Gnap diff --git a/engines/gnap/scenes/scene06.cpp b/engines/gnap/scenes/scene06.cpp index 3bd79fd1dd..aae5125bb7 100644 --- a/engines/gnap/scenes/scene06.cpp +++ b/engines/gnap/scenes/scene06.cpp @@ -28,33 +28,33 @@ namespace Gnap { enum { - kHSPlatypus = 0, - kHSGas = 1, - kHSLadder = 2, - kHSHorse = 3, - kHSExitOutsideBarn = 4, - kHSDevice = 5, - kHSWalkArea1 = 6, - kHSWalkArea2 = 7, - kHSWalkArea3 = 8, - kHSWalkArea4 = 9, - kHSWalkArea5 = 10 + kHS06Platypus = 0, + kHS06Gas = 1, + kHS06Ladder = 2, + kHS06Horse = 3, + kHS06ExitOutsideBarn = 4, + kHS06Device = 5, + kHS06WalkArea1 = 6, + kHS06WalkArea2 = 7, + kHS06WalkArea3 = 8, + kHS06WalkArea4 = 9, + kHS06WalkArea5 = 10 }; enum { - kASTryToGetGas = 0, - kASTryToClimbLadder = 1, - kASTryToClimbLadderDone = 2, - kASTalkToHorse = 3, - kASUseTwigOnHorse = 4, - kASLeaveScene = 5 + kAS06TryToGetGas = 0, + kAS06TryToClimbLadder = 1, + kAS06TryToClimbLadderDone = 2, + kAS06TalkToHorse = 3, + kAS06UseTwigOnHorse = 4, + kAS06LeaveScene = 5 }; Scene06::Scene06(GnapEngine *vm) : Scene(vm) { - _s06_horseTurnedBack = false;; - _s06_nextPlatSequenceId = -1; - _s06_nextHorseSequenceId = -1; - _s06_currHorseSequenceId = -1; + _horseTurnedBack = false;; + _nextPlatSequenceId = -1; + _nextHorseSequenceId = -1; + _currHorseSequenceId = -1; } int Scene06::init() { @@ -69,22 +69,22 @@ int Scene06::init() { } void Scene06::updateHotspots() { - _vm->setHotspot(kHSPlatypus, 0, 0, 0, 0, SF_WALKABLE | SF_TALK_CURSOR | SF_GRAB_CURSOR | SF_LOOK_CURSOR); - _vm->setHotspot(kHSGas, 300, 120, 440, 232, SF_PLAT_CURSOR | SF_TALK_CURSOR | SF_GRAB_CURSOR | SF_LOOK_CURSOR, 4, 7); - _vm->setHotspot(kHSLadder, 497, 222, 614, 492, SF_TALK_CURSOR | SF_GRAB_CURSOR | SF_LOOK_CURSOR, 6, 8); - _vm->setHotspot(kHSHorse, 90, 226, 259, 376, SF_TALK_CURSOR | SF_GRAB_CURSOR | SF_LOOK_CURSOR, 4, 7); - _vm->setHotspot(kHSExitOutsideBarn, 226, 580, 688, 600, SF_EXIT_D_CURSOR | SF_WALKABLE, 5, 10); - _vm->setHotspot(kHSWalkArea1, 0, 0, 200, 515); - _vm->setHotspot(kHSWalkArea2, 200, 0, 285, 499); - _vm->setHotspot(kHSWalkArea3, 688, 0, 800, 499); - _vm->setHotspot(kHSWalkArea4, 475, 469, 800, 505); - _vm->setHotspot(kHSWalkArea5, 0, 0, 800, 504); - _vm->setDeviceHotspot(kHSDevice, -1, -1, -1, -1); + _vm->setHotspot(kHS06Platypus, 0, 0, 0, 0, SF_WALKABLE | SF_TALK_CURSOR | SF_GRAB_CURSOR | SF_LOOK_CURSOR); + _vm->setHotspot(kHS06Gas, 300, 120, 440, 232, SF_PLAT_CURSOR | SF_TALK_CURSOR | SF_GRAB_CURSOR | SF_LOOK_CURSOR, 4, 7); + _vm->setHotspot(kHS06Ladder, 497, 222, 614, 492, SF_TALK_CURSOR | SF_GRAB_CURSOR | SF_LOOK_CURSOR, 6, 8); + _vm->setHotspot(kHS06Horse, 90, 226, 259, 376, SF_TALK_CURSOR | SF_GRAB_CURSOR | SF_LOOK_CURSOR, 4, 7); + _vm->setHotspot(kHS06ExitOutsideBarn, 226, 580, 688, 600, SF_EXIT_D_CURSOR | SF_WALKABLE, 5, 10); + _vm->setHotspot(kHS06WalkArea1, 0, 0, 200, 515); + _vm->setHotspot(kHS06WalkArea2, 200, 0, 285, 499); + _vm->setHotspot(kHS06WalkArea3, 688, 0, 800, 499); + _vm->setHotspot(kHS06WalkArea4, 475, 469, 800, 505); + _vm->setHotspot(kHS06WalkArea5, 0, 0, 800, 504); + _vm->setDeviceHotspot(kHS06Device, -1, -1, -1, -1); if (_vm->isFlag(kGFGasTaken)) - _vm->_hotspots[kHSLadder]._flags = SF_DISABLED; + _vm->_hotspots[kHS06Ladder]._flags = SF_DISABLED; if (_vm->_cursorValue == 4) { - _vm->_hotspots[kHSLadder]._flags = SF_DISABLED; - _vm->_hotspots[kHSGas]._flags = SF_DISABLED; + _vm->_hotspots[kHS06Ladder]._flags = SF_DISABLED; + _vm->_hotspots[kHS06Gas]._flags = SF_DISABLED; } _vm->_hotspotsCount = 11; } @@ -94,11 +94,11 @@ void Scene06::run() { _vm->startSoundTimerC(7); - _s06_horseTurnedBack = false; + _horseTurnedBack = false; _vm->_gameSys->insertSequence(0xF1, 120, 0, 0, kSeqNone, 0, 0, 0); - _s06_currHorseSequenceId = 0xF1; - _s06_nextHorseSequenceId = -1; + _currHorseSequenceId = 0xF1; + _nextHorseSequenceId = -1; _vm->_gameSys->setAnimation(0xF1, 120, 2); _vm->_timers[4] = _vm->getRandom(40) + 25; @@ -130,14 +130,14 @@ void Scene06::run() { _vm->updateGrabCursorSprite(0, 0); switch (_vm->_sceneClickedHotspot) { - case kHSDevice: + case kHS06Device: if (_vm->_gnapActionStatus < 0) { _vm->runMenu(); updateHotspots(); } break; - case kHSPlatypus: + case kHS06Platypus: if (_vm->_gnapActionStatus < 0) { if (_vm->_grabCursorSpriteIndex == kItemDisguise) { _vm->gnapUseDisguiseOnPlatypus(); @@ -166,7 +166,7 @@ void Scene06::run() { } break; - case kHSGas: + case kHS06Gas: if (_vm->_gnapActionStatus < 0) { if (_vm->_grabCursorSpriteIndex >= 0) { _vm->playGnapShowCurrItem(_vm->_hotspotsWalkPos[_vm->_sceneClickedHotspot].x, _vm->_hotspotsWalkPos[_vm->_sceneClickedHotspot].y, 5, 0); @@ -179,10 +179,10 @@ void Scene06::run() { if (_vm->isFlag(kGFUnk04)) { _vm->playGnapImpossible(0, 0); } else if (triedDeviceOnGas) { - _vm->_hotspots[kHSWalkArea5]._flags |= SF_WALKABLE; + _vm->_hotspots[kHS06WalkArea5]._flags |= SF_WALKABLE; _vm->gnapWalkTo(_vm->_hotspotsWalkPos[1].x, _vm->_hotspotsWalkPos[1].y, 0, 0x107BC, 1); - _vm->_hotspots[kHSWalkArea5]._flags &= ~SF_WALKABLE; - _vm->_gnapActionStatus = kASTryToGetGas; + _vm->_hotspots[kHS06WalkArea5]._flags &= ~SF_WALKABLE; + _vm->_gnapActionStatus = kAS06TryToGetGas; } else { triedDeviceOnGas = true; _vm->playGnapPullOutDeviceNonWorking(_vm->_hotspotsWalkPos[1].x, _vm->_hotspotsWalkPos[1].y); @@ -200,7 +200,7 @@ void Scene06::run() { } break; - case kHSLadder: + case kHS06Ladder: if (_vm->_gnapActionStatus < 0) { if (_vm->_grabCursorSpriteIndex >= 0) { _vm->playGnapShowCurrItem(_vm->_hotspotsWalkPos[_vm->_sceneClickedHotspot].x, _vm->_hotspotsWalkPos[_vm->_sceneClickedHotspot].y, 8, 4); @@ -214,7 +214,7 @@ void Scene06::run() { _vm->playGnapImpossible(0, 0); else { _vm->gnapWalkTo(_vm->_hotspotsWalkPos[2].x, _vm->_hotspotsWalkPos[2].y, 0, 0x107BB, 1); - _vm->_gnapActionStatus = kASTryToClimbLadder; + _vm->_gnapActionStatus = kAS06TryToClimbLadder; _vm->setFlag(kGFGasTaken); } break; @@ -227,16 +227,16 @@ void Scene06::run() { } break; - case kHSHorse: + case kHS06Horse: if (_vm->_gnapActionStatus < 0) { - if (_vm->_grabCursorSpriteIndex == kItemTwig && _s06_horseTurnedBack) { - _vm->_hotspots[kHSWalkArea5]._flags |= SF_WALKABLE; + if (_vm->_grabCursorSpriteIndex == kItemTwig && _horseTurnedBack) { + _vm->_hotspots[kHS06WalkArea5]._flags |= SF_WALKABLE; _vm->gnapWalkTo(_vm->_hotspotsWalkPos[3].x, _vm->_hotspotsWalkPos[3].y, 0, 0x107BC, 1); - _vm->_hotspots[kHSWalkArea5]._flags &= ~SF_WALKABLE; + _vm->_hotspots[kHS06WalkArea5]._flags &= ~SF_WALKABLE; _vm->_gnapIdleFacing = kDirUpLeft; _vm->platypusWalkTo(6, 8, 1, 0x107C2, 1); _vm->_platypusFacing = kDirNone; - _vm->_gnapActionStatus = kASUseTwigOnHorse; + _vm->_gnapActionStatus = kAS06UseTwigOnHorse; _vm->setGrabCursorSprite(-1); } else if (_vm->_grabCursorSpriteIndex >= 0) { _vm->playGnapShowCurrItem(_vm->_hotspotsWalkPos[_vm->_sceneClickedHotspot].x, _vm->_hotspotsWalkPos[_vm->_sceneClickedHotspot].y, 3, 2); @@ -246,14 +246,14 @@ void Scene06::run() { _vm->playGnapScratchingHead(3, 2); break; case TALK_CURSOR: - if (_s06_horseTurnedBack) { + if (_horseTurnedBack) { _vm->gnapWalkTo(_vm->_hotspotsWalkPos[3].x, _vm->_hotspotsWalkPos[3].y, 0, _vm->getGnapSequenceId(gskBrainPulsating, 3, 2) | 0x10000, 1); } else { _vm->_gnapIdleFacing = kDirBottomLeft; - _vm->_hotspots[kHSWalkArea5]._flags |= SF_WALKABLE; + _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[kHSWalkArea5]._flags &= ~SF_WALKABLE; - _vm->_gnapActionStatus = kASTalkToHorse; + _vm->_hotspots[kHS06WalkArea5]._flags &= ~SF_WALKABLE; + _vm->_gnapActionStatus = kAS06TalkToHorse; } break; case GRAB_CURSOR: @@ -265,11 +265,11 @@ void Scene06::run() { } break; - case kHSExitOutsideBarn: + case kHS06ExitOutsideBarn: if (_vm->_gnapActionStatus < 0) { _vm->_isLeavingScene = true; _vm->gnapWalkTo(_vm->_hotspotsWalkPos[4].x, _vm->_hotspotsWalkPos[4].y, 0, 0x107AE, 1); - _vm->_gnapActionStatus = kASLeaveScene; + _vm->_gnapActionStatus = kAS06LeaveScene; if (_vm->_cursorValue == 1) _vm->_newSceneNum = 5; else @@ -277,11 +277,11 @@ void Scene06::run() { } break; - case kHSWalkArea1: - case kHSWalkArea2: - case kHSWalkArea3: - case kHSWalkArea4: - case kHSWalkArea5: + case kHS06WalkArea1: + case kHS06WalkArea2: + case kHS06WalkArea3: + case kHS06WalkArea4: + case kHS06WalkArea5: if (_vm->_gnapActionStatus < 0) _vm->gnapWalkTo(-1, -1, -1, -1, 1); break; @@ -304,21 +304,21 @@ void Scene06::run() { _vm->updateGnapIdleSequence(); if (!_vm->_timers[4]) { _vm->_timers[4] = _vm->getRandom(40) + 25; - if (_vm->_gnapActionStatus < 0 && _vm->_platypusActionStatus < 0 && _s06_nextHorseSequenceId == -1) { - if (_s06_horseTurnedBack) { - _s06_nextHorseSequenceId = 0xF5; + if (_vm->_gnapActionStatus < 0 && _vm->_platypusActionStatus < 0 && _nextHorseSequenceId == -1) { + if (_horseTurnedBack) { + _nextHorseSequenceId = 0xF5; } else { switch (_vm->getRandom(5)) { case 0: case 1: case 2: - _s06_nextHorseSequenceId = 0xF1; + _nextHorseSequenceId = 0xF1; break; case 3: - _s06_nextHorseSequenceId = 0xF3; + _nextHorseSequenceId = 0xF3; break; case 4: - _s06_nextHorseSequenceId = 0xF4; + _nextHorseSequenceId = 0xF4; break; } } @@ -343,34 +343,34 @@ void Scene06::updateAnimations() { if (_vm->_gameSys->getAnimationStatus(0) == 2) { _vm->_gameSys->setAnimation(0, 0, 0); switch (_vm->_gnapActionStatus) { - case kASLeaveScene: + case kAS06LeaveScene: _vm->_sceneDone = true; _vm->_gnapActionStatus = -1; break; - case kASTryToGetGas: + case kAS06TryToGetGas: _vm->_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; break; - case kASTryToClimbLadder: + case kAS06TryToClimbLadder: _vm->_gameSys->insertSequence(0xFF, 20, 0xFE, 20, kSeqSyncWait, 0, 0, 0); _vm->_gameSys->setAnimation(0xFD, _vm->_gnapId, 0); _vm->_gameSys->insertSequence(0xFD, _vm->_gnapId, makeRid(_vm->_gnapSequenceDatNum, _vm->_gnapSequenceId), _vm->_gnapId, kSeqSyncWait, 0, 0, 0); _vm->_gnapSequenceId = 0xFD; _vm->_gnapSequenceDatNum = 0; - _vm->_gnapActionStatus = kASTryToClimbLadderDone; + _vm->_gnapActionStatus = kAS06TryToClimbLadderDone; break; - case kASTryToClimbLadderDone: + case kAS06TryToClimbLadderDone: _vm->_gnapX = 6; _vm->_gnapY = 7; _vm->_gnapActionStatus = -1; break; - case kASTalkToHorse: - _s06_nextHorseSequenceId = 0xF6; + case kAS06TalkToHorse: + _nextHorseSequenceId = 0xF6; break; - case kASUseTwigOnHorse: - _s06_nextPlatSequenceId = 0xFB; + case kAS06UseTwigOnHorse: + _nextPlatSequenceId = 0xFB; break; default: _vm->_gnapActionStatus = -1; @@ -384,7 +384,7 @@ void Scene06::updateAnimations() { _vm->_gameSys->setAnimation(0, 0, 1); _vm->invAdd(kItemGas); _vm->setFlag(kGFGasTaken); - _vm->_hotspots[kHSLadder]._flags = SF_DISABLED; + _vm->_hotspots[kHS06Ladder]._flags = SF_DISABLED; _vm->setGrabCursorSprite(kItemGas); _vm->_platypusActionStatus = -1; _vm->_platX = 6; @@ -396,20 +396,20 @@ void Scene06::updateAnimations() { _vm->_gnapActionStatus = -1; _vm->showCursor(); } - if (_s06_nextPlatSequenceId == 0xFB) { + if (_nextPlatSequenceId == 0xFB) { _vm->_gameSys->setAnimation(0, 0, 1); - _s06_nextHorseSequenceId = 0xF2; + _nextHorseSequenceId = 0xF2; _vm->_platypusActionStatus = 6; } } - if (_vm->_gameSys->getAnimationStatus(2) == 2 && _s06_nextHorseSequenceId != -1) { - switch (_s06_nextHorseSequenceId) { + if (_vm->_gameSys->getAnimationStatus(2) == 2 && _nextHorseSequenceId != -1) { + switch (_nextHorseSequenceId) { case 0xF2: _vm->setGrabCursorSprite(-1); _vm->hideCursor(); _vm->_gameSys->setAnimation(0xFA, 256, 1); - _vm->_gameSys->insertSequence(0xF2, 120, _s06_currHorseSequenceId, 120, kSeqSyncWait, 0, 0, 0); + _vm->_gameSys->insertSequence(0xF2, 120, _currHorseSequenceId, 120, kSeqSyncWait, 0, 0, 0); _vm->_gameSys->insertSequence(0x100, _vm->_gnapId, makeRid(_vm->_gnapSequenceDatNum, _vm->_gnapSequenceId), _vm->_gnapId, kSeqSyncWait, 0, 0, 0); _vm->_gameSys->insertSequence(0xF7, 20, 0xF8, 20, kSeqSyncWait, 0, 0, 0); _vm->_gameSys->insertSequence(0xFB, _vm->_platypusId, _vm->_platypusSequenceId | (_vm->_platypusSequenceDatNum << 16), _vm->_platypusId, kSeqSyncWait, 0, 0, 0); @@ -420,24 +420,24 @@ void Scene06::updateAnimations() { kSeqSyncWait, 0, 75 * _vm->_gnapX - _vm->_gnapGridX, 48 * _vm->_gnapY - _vm->_gnapGridY); _vm->_gnapSequenceId = 0x7B7; _vm->_gnapSequenceDatNum = 1; - _s06_currHorseSequenceId = _s06_nextHorseSequenceId; - _s06_nextHorseSequenceId = -1; - _s06_nextPlatSequenceId = -1; + _currHorseSequenceId = _nextHorseSequenceId; + _nextHorseSequenceId = -1; + _nextPlatSequenceId = -1; _vm->invRemove(kItemTwig); break; case 0xF6: - _vm->_gameSys->setAnimation(_s06_nextHorseSequenceId, 120, 2); - _vm->_gameSys->insertSequence(0xF6, 120, _s06_currHorseSequenceId, 120, kSeqSyncWait, 0, 0, 0); - _s06_horseTurnedBack = true; - _s06_currHorseSequenceId = _s06_nextHorseSequenceId; - _s06_nextHorseSequenceId = -1; + _vm->_gameSys->setAnimation(_nextHorseSequenceId, 120, 2); + _vm->_gameSys->insertSequence(0xF6, 120, _currHorseSequenceId, 120, kSeqSyncWait, 0, 0, 0); + _horseTurnedBack = true; + _currHorseSequenceId = _nextHorseSequenceId; + _nextHorseSequenceId = -1; _vm->_gnapActionStatus = -1; break; default: - _vm->_gameSys->setAnimation(_s06_nextHorseSequenceId, 120, 2); - _vm->_gameSys->insertSequence(_s06_nextHorseSequenceId, 120, _s06_currHorseSequenceId, 120, kSeqSyncWait, 0, 0, 0); - _s06_currHorseSequenceId = _s06_nextHorseSequenceId; - _s06_nextHorseSequenceId = -1; + _vm->_gameSys->setAnimation(_nextHorseSequenceId, 120, 2); + _vm->_gameSys->insertSequence(_nextHorseSequenceId, 120, _currHorseSequenceId, 120, kSeqSyncWait, 0, 0, 0); + _currHorseSequenceId = _nextHorseSequenceId; + _nextHorseSequenceId = -1; break; } } diff --git a/engines/gnap/scenes/scene06.h b/engines/gnap/scenes/scene06.h index 1f15be54f6..ff6ff9f14c 100644 --- a/engines/gnap/scenes/scene06.h +++ b/engines/gnap/scenes/scene06.h @@ -42,10 +42,10 @@ public: virtual void updateAnimationsCb() {} private: - bool _s06_horseTurnedBack; - int _s06_nextPlatSequenceId; - int _s06_nextHorseSequenceId; - int _s06_currHorseSequenceId; + bool _horseTurnedBack; + int _nextPlatSequenceId; + int _nextHorseSequenceId; + int _currHorseSequenceId; }; } // End of namespace Gnap |