diff options
Diffstat (limited to 'engines')
-rw-r--r-- | engines/gnap/datarchive.cpp | 1 | ||||
-rw-r--r-- | engines/gnap/scenes/scene07.cpp | 54 | ||||
-rw-r--r-- | engines/gnap/scenes/scene08.cpp | 264 | ||||
-rw-r--r-- | engines/gnap/scenes/scene08.h | 8 | ||||
-rw-r--r-- | engines/gnap/scenes/scene09.cpp | 68 | ||||
-rw-r--r-- | engines/gnap/scenes/scene09.h | 2 |
6 files changed, 198 insertions, 199 deletions
diff --git a/engines/gnap/datarchive.cpp b/engines/gnap/datarchive.cpp index a2de0b38e0..0eb6601ccb 100644 --- a/engines/gnap/datarchive.cpp +++ b/engines/gnap/datarchive.cpp @@ -83,6 +83,7 @@ DatManager::~DatManager() { void DatManager::open(int index, const char *filename) { close(index); _datArchives[index] = new DatArchive(filename); + warning("Loading %s - %d", filename, index); } void DatManager::close(int index) { diff --git a/engines/gnap/scenes/scene07.cpp b/engines/gnap/scenes/scene07.cpp index 244e901947..41ddf4caf1 100644 --- a/engines/gnap/scenes/scene07.cpp +++ b/engines/gnap/scenes/scene07.cpp @@ -29,18 +29,18 @@ namespace Gnap { enum { - kHSPlatypus = 0, - kHSExitHouse = 1, - kHSDice = 2, - kHSDevice = 3, - kHSWalkArea1 = 4, - kHSWalkArea2 = 5, - kHSWalkArea3 = 6 + kHS07Platypus = 0, + kHS07ExitHouse = 1, + kHS07Dice = 2, + kHS07Device = 3, + kHS07WalkArea1 = 4, + kHS07WalkArea2 = 5, + kHS07WalkArea3 = 6 }; enum { - kASWait = 0, - kASLeaveScene = 1 + kAS07Wait = 0, + kAS07LeaveScene = 1 }; Scene07::Scene07(GnapEngine *vm) : Scene(vm) { @@ -51,15 +51,15 @@ int Scene07::init() { } void Scene07::updateHotspots() { - _vm->setHotspot(kHSPlatypus, 0, 0, 0, 0, SF_WALKABLE | SF_TALK_CURSOR | SF_GRAB_CURSOR | SF_LOOK_CURSOR); - _vm->setHotspot(kHSExitHouse, 700, 125, 799, 290, SF_EXIT_NE_CURSOR); - _vm->setHotspot(kHSDice, 200, 290, 270, 360, SF_PLAT_CURSOR | SF_TALK_CURSOR | SF_GRAB_CURSOR | SF_LOOK_CURSOR); - _vm->setHotspot(kHSWalkArea1, 0, 0, 325, 445); - _vm->setHotspot(kHSWalkArea2, 325, 0, 799, 445, _vm->_isLeavingScene ? SF_WALKABLE : SF_NONE); - _vm->setHotspot(kHSWalkArea3, 160, 0, 325, 495); - _vm->setDeviceHotspot(kHSDevice, -1, -1, -1, -1); + _vm->setHotspot(kHS07Platypus, 0, 0, 0, 0, SF_WALKABLE | SF_TALK_CURSOR | SF_GRAB_CURSOR | SF_LOOK_CURSOR); + _vm->setHotspot(kHS07ExitHouse, 700, 125, 799, 290, SF_EXIT_NE_CURSOR); + _vm->setHotspot(kHS07Dice, 200, 290, 270, 360, SF_PLAT_CURSOR | SF_TALK_CURSOR | SF_GRAB_CURSOR | SF_LOOK_CURSOR); + _vm->setHotspot(kHS07WalkArea1, 0, 0, 325, 445); + _vm->setHotspot(kHS07WalkArea2, 325, 0, 799, 445, _vm->_isLeavingScene ? SF_WALKABLE : SF_NONE); + _vm->setHotspot(kHS07WalkArea3, 160, 0, 325, 495); + _vm->setDeviceHotspot(kHS07Device, -1, -1, -1, -1); if (_vm->isFlag(kGFPlatypus)) - _vm->_hotspots[kHSDice]._flags = SF_DISABLED; + _vm->_hotspots[kHS07Dice]._flags = SF_DISABLED; _vm->_hotspotsCount = 7; } @@ -87,7 +87,7 @@ void Scene07::run() { _vm->_gnapIdleFacing = kDirBottomRight; _vm->_gameSys->insertSequence(0x8F, 140, 0, 0, kSeqNone, 0, 0, 0); _vm->_gameSys->setAnimation(makeRid(_vm->_gnapSequenceDatNum, _vm->_gnapSequenceId), _vm->_gnapId, 0); - _vm->_gnapActionStatus = kASWait; + _vm->_gnapActionStatus = kAS07Wait; _vm->_platX = 3; _vm->_platY = 8; _vm->_platypusId = 160; @@ -115,7 +115,7 @@ void Scene07::run() { _vm->updateGrabCursorSprite(0, 0); switch (_vm->_sceneClickedHotspot) { - case kHSPlatypus: + case kHS07Platypus: switch (_vm->_verbCursor) { case LOOK_CURSOR: _vm->playGnapMoan1(_vm->_platX, _vm->_platY); @@ -132,16 +132,16 @@ void Scene07::run() { } break; - case kHSExitHouse: + case kHS07ExitHouse: _vm->_isLeavingScene = true; if (_vm->_gnapX > 8) _vm->gnapWalkTo(_vm->_gnapX, 7, 0, 0x107AD, 1); else _vm->gnapWalkTo(8, 7, 0, 0x107AD, 1); - _vm->_gnapActionStatus = kASLeaveScene; + _vm->_gnapActionStatus = kAS07LeaveScene; break; - case kHSDice: + case kHS07Dice: if (_vm->_grabCursorSpriteIndex >= 0) { _vm->playGnapShowCurrItem(4, 8, 3, 3); } else { @@ -169,7 +169,7 @@ void Scene07::run() { } break; - case kHSDevice: + case kHS07Device: if (_vm->_gnapActionStatus < 0) { _vm->runMenu(); updateHotspots(); @@ -177,12 +177,12 @@ void Scene07::run() { } break; - case kHSWalkArea1: - case kHSWalkArea2: + case kHS07WalkArea1: + case kHS07WalkArea2: _vm->gnapWalkTo(-1, -1, -1, -1, 1); break; - case kHSWalkArea3: + case kHS07WalkArea3: // Nothing break; @@ -254,7 +254,7 @@ void Scene07::updateAnimations() { if (_vm->_gameSys->getAnimationStatus(0) == 2) { _vm->_gameSys->setAnimation(0, 0, 0); switch (_vm->_gnapActionStatus) { - case kASLeaveScene: + case kAS07LeaveScene: _vm->_newSceneNum = 8; _vm->_sceneDone = true; break; diff --git a/engines/gnap/scenes/scene08.cpp b/engines/gnap/scenes/scene08.cpp index a5054cb558..2b977a481e 100644 --- a/engines/gnap/scenes/scene08.cpp +++ b/engines/gnap/scenes/scene08.cpp @@ -28,35 +28,35 @@ namespace Gnap { enum { - kHSPlatypus = 0, - kHSExitBackdoor = 1, - kHSExitCrash = 2, - kHSMan = 3, - kHSDoor = 4, - kHSMeat = 5, - kHSBone = 6, - kHSToy = 7, - kHSWalkArea1 = 8, - kHSDevice = 9, - kHSWalkArea2 = 10 + kH08SPlatypus = 0, + kHS08ExitBackdoor = 1, + kHS08ExitCrash = 2, + kHS08Man = 3, + kHS08Door = 4, + kHS08Meat = 5, + kHS08Bone = 6, + kHS08Toy = 7, + kHS08WalkArea1 = 8, + kHS08Device = 9, + kHS08WalkArea2 = 10 }; enum { - kASLeaveScene = 0, - kASTalkMan = 1, - kASLookMan = 2, - kASLookDog = 3, - kASGrabDog = 4, - kASTalkDog = 5, - kASPlatWithMan = 6, - kASPlatWithDog = 7 + kAS08LeaveScene = 0, + kAS08TalkMan = 1, + kAS08LookMan = 2, + kAS08LookDog = 3, + kAS08GrabDog = 4, + kAS08TalkDog = 5, + kAS08PlatWithMan = 6, + kAS08PlatWithDog = 7 }; Scene08::Scene08(GnapEngine *vm) : Scene(vm) { - _s08_nextDogSequenceId = -1; - _s08_currDogSequenceId = -1; - _s08_nextManSequenceId = -1; - _s08_currManSequenceId = -1; + _nextDogSequenceId = -1; + _currDogSequenceId = -1; + _nextManSequenceId = -1; + _currManSequenceId = -1; } int Scene08::init() { @@ -64,33 +64,33 @@ int Scene08::init() { } void Scene08::updateHotspots() { - _vm->setHotspot(kHSPlatypus, 0, 0, 0, 0, SF_WALKABLE | SF_TALK_CURSOR | SF_GRAB_CURSOR | SF_LOOK_CURSOR); - _vm->setHotspot(kHSExitBackdoor, 0, 280, 10, 400, SF_EXIT_L_CURSOR | SF_WALKABLE); - _vm->setHotspot(kHSExitCrash, 200, 590, 400, 599, SF_EXIT_D_CURSOR | SF_WALKABLE); - _vm->setHotspot(kHSMan, 510, 150, 610, 380, SF_PLAT_CURSOR | SF_TALK_CURSOR | SF_GRAB_CURSOR | SF_LOOK_CURSOR); - _vm->setHotspot(kHSDoor, 350, 170, 500, 410, SF_PLAT_CURSOR | SF_TALK_CURSOR | SF_GRAB_CURSOR | SF_LOOK_CURSOR); - _vm->setHotspot(kHSMeat, 405, 450, 480, 485, SF_PLAT_CURSOR | SF_TALK_CURSOR | SF_GRAB_CURSOR | SF_LOOK_CURSOR); - _vm->setHotspot(kHSBone, 200, 405, 270, 465, SF_PLAT_CURSOR | SF_TALK_CURSOR | SF_GRAB_CURSOR | SF_LOOK_CURSOR); - _vm->setHotspot(kHSToy, 540, 430, 615, 465, SF_PLAT_CURSOR | SF_TALK_CURSOR | SF_GRAB_CURSOR | SF_LOOK_CURSOR); - _vm->setHotspot(kHSWalkArea1, 290, 340, -1, -1); - _vm->setHotspot(kHSWalkArea2, 0, 0, 799, 420); - _vm->setDeviceHotspot(kHSDevice, -1, -1, -1, -1); + _vm->setHotspot(kH08SPlatypus, 0, 0, 0, 0, SF_WALKABLE | SF_TALK_CURSOR | SF_GRAB_CURSOR | SF_LOOK_CURSOR); + _vm->setHotspot(kHS08ExitBackdoor, 0, 280, 10, 400, SF_EXIT_L_CURSOR | SF_WALKABLE); + _vm->setHotspot(kHS08ExitCrash, 200, 590, 400, 599, SF_EXIT_D_CURSOR | SF_WALKABLE); + _vm->setHotspot(kHS08Man, 510, 150, 610, 380, SF_PLAT_CURSOR | SF_TALK_CURSOR | SF_GRAB_CURSOR | SF_LOOK_CURSOR); + _vm->setHotspot(kHS08Door, 350, 170, 500, 410, SF_PLAT_CURSOR | SF_TALK_CURSOR | SF_GRAB_CURSOR | SF_LOOK_CURSOR); + _vm->setHotspot(kHS08Meat, 405, 450, 480, 485, SF_PLAT_CURSOR | SF_TALK_CURSOR | SF_GRAB_CURSOR | SF_LOOK_CURSOR); + _vm->setHotspot(kHS08Bone, 200, 405, 270, 465, SF_PLAT_CURSOR | SF_TALK_CURSOR | SF_GRAB_CURSOR | SF_LOOK_CURSOR); + _vm->setHotspot(kHS08Toy, 540, 430, 615, 465, SF_PLAT_CURSOR | SF_TALK_CURSOR | SF_GRAB_CURSOR | SF_LOOK_CURSOR); + _vm->setHotspot(kHS08WalkArea1, 290, 340, -1, -1); + _vm->setHotspot(kHS08WalkArea2, 0, 0, 799, 420); + _vm->setDeviceHotspot(kHS08Device, -1, -1, -1, -1); if (_vm->isFlag(kGFBarnPadlockOpen)) - _vm->_hotspots[kHSMeat]._flags = SF_WALKABLE | SF_DISABLED; + _vm->_hotspots[kHS08Meat]._flags = SF_WALKABLE | SF_DISABLED; if (_vm->isFlag(kGFTruckFilledWithGas)) - _vm->_hotspots[kHSBone]._flags = SF_WALKABLE | SF_DISABLED; + _vm->_hotspots[kHS08Bone]._flags = SF_WALKABLE | SF_DISABLED; if (_vm->isFlag(kGFTruckKeysUsed)) - _vm->_hotspots[kHSToy]._flags = SF_WALKABLE | SF_DISABLED; + _vm->_hotspots[kHS08Toy]._flags = SF_WALKABLE | SF_DISABLED; _vm->_hotspotsCount = 11; } void Scene08::updateAnimationsCb() { if (_vm->_gameSys->getAnimationStatus(3) == 2) { - _vm->_gameSys->setAnimation(_s08_nextDogSequenceId, 100, 3); - _vm->_gameSys->insertSequence(_s08_nextDogSequenceId, 100, _s08_currDogSequenceId, 100, kSeqSyncWait, 0, 0, 0); - _s08_currDogSequenceId = _s08_nextDogSequenceId; - if ( _s08_nextDogSequenceId != 0x135 ) - _s08_nextDogSequenceId = 0x134; + _vm->_gameSys->setAnimation(_nextDogSequenceId, 100, 3); + _vm->_gameSys->insertSequence(_nextDogSequenceId, 100, _currDogSequenceId, 100, kSeqSyncWait, 0, 0, 0); + _currDogSequenceId = _nextDogSequenceId; + if ( _nextDogSequenceId != 0x135 ) + _nextDogSequenceId = 0x134; } } @@ -100,17 +100,17 @@ void Scene08::run() { _vm->_gameSys->insertSequence(0x14F, 1, 0, 0, kSeqLoop, 0, 0, 0); _vm->_gameSys->insertSequence(0x14E, 256, 0, 0, kSeqNone, 0, 0, 0); - _s08_currDogSequenceId = 0x135; - _s08_nextDogSequenceId = 0x135; + _currDogSequenceId = 0x135; + _nextDogSequenceId = 0x135; _vm->_gameSys->setAnimation(0x135, 100, 3); - _vm->_gameSys->insertSequence(_s08_currDogSequenceId, 100, 0, 0, kSeqNone, 0, 0, 0); + _vm->_gameSys->insertSequence(_currDogSequenceId, 100, 0, 0, kSeqNone, 0, 0, 0); - _s08_currManSequenceId = 0x140; - _s08_nextManSequenceId = -1; + _currManSequenceId = 0x140; + _nextManSequenceId = -1; _vm->_gameSys->setAnimation(0x140, 100, 2); - _vm->_gameSys->insertSequence(_s08_currManSequenceId, 100, 0, 0, kSeqNone, 0, 0, 0); + _vm->_gameSys->insertSequence(_currManSequenceId, 100, 0, 0, kSeqNone, 0, 0, 0); _vm->_timers[4] = _vm->getRandom(50) + 75; @@ -146,7 +146,7 @@ void Scene08::run() { _vm->updateGrabCursorSprite(0, 0); switch (_vm->_sceneClickedHotspot) { - case kHSDevice: + case kHS08Device: if (_vm->_gnapActionStatus < 0) { _vm->runMenu(); updateHotspots(); @@ -155,7 +155,7 @@ void Scene08::run() { } break; - case kHSPlatypus: + case kH08SPlatypus: if (_vm->_grabCursorSpriteIndex >= 0) { _vm->playGnapImpossible(0, 0); } else { @@ -180,25 +180,25 @@ void Scene08::run() { } break; - case kHSExitBackdoor: + case kHS08ExitBackdoor: _vm->_isLeavingScene = true; _vm->gnapActionIdle(0x14D); _vm->gnapWalkTo(0, 6, 0, 0x107AF, 1); - _vm->_gnapActionStatus = kASLeaveScene; + _vm->_gnapActionStatus = kAS08LeaveScene; _vm->platypusWalkTo(0, 7, 1, 0x107CF, 1); _vm->_newSceneNum = 9; break; - case kHSExitCrash: + case kHS08ExitCrash: _vm->_isLeavingScene = true; _vm->gnapActionIdle(0x14D); _vm->gnapWalkTo(3, 9, 0, 0x107AE, 1); - _vm->_gnapActionStatus = kASLeaveScene; + _vm->_gnapActionStatus = kAS08LeaveScene; _vm->platypusWalkTo(4, 9, 1, 0x107C1, 1); _vm->_newSceneNum = 7; break; - case kHSMan: + case kHS08Man: if (_vm->_grabCursorSpriteIndex >= 0) { _vm->playGnapShowCurrItem(6, 6, 7, 0); } else { @@ -206,7 +206,7 @@ void Scene08::run() { case LOOK_CURSOR: _vm->gnapActionIdle(0x14D); _vm->gnapWalkTo(6, 6, 0, 0x107BB, 1); - _vm->_gnapActionStatus = kASLookMan; + _vm->_gnapActionStatus = kAS08LookMan; _vm->_gnapIdleFacing = kDirUpRight; break; case GRAB_CURSOR: @@ -216,13 +216,13 @@ void Scene08::run() { _vm->_gnapIdleFacing = kDirUpLeft; _vm->gnapActionIdle(0x14D); _vm->gnapWalkTo(8, 6, 0, _vm->getGnapSequenceId(gskBrainPulsating, 0, 0) | 0x10000, 1); - _vm->_gnapActionStatus = kASTalkMan; + _vm->_gnapActionStatus = kAS08TalkMan; break; case PLAT_CURSOR: _vm->gnapActionIdle(0x14D); _vm->gnapUseDeviceOnPlatypuss(); _vm->platypusWalkTo(6, 6, 1, 0x107C2, 1); - _vm->_platypusActionStatus = kASPlatWithMan; + _vm->_platypusActionStatus = kAS08PlatWithMan; _vm->_platypusFacing = kDirNone; _vm->playGnapIdle(6, 6); break; @@ -230,35 +230,35 @@ void Scene08::run() { } break; - case kHSDoor: + case kHS08Door: if (_vm->_grabCursorSpriteIndex >= 0) { _vm->playGnapShowCurrItem(4, 7, 5, 0); _vm->_gameSys->setAnimation(makeRid(_vm->_gnapSequenceDatNum, _vm->_gnapSequenceId), _vm->_gnapId, 0); - _vm->_gnapActionStatus = kASGrabDog; + _vm->_gnapActionStatus = kAS08GrabDog; } else { switch (_vm->_verbCursor) { case LOOK_CURSOR: _vm->playGnapScratchingHead(6, 0); _vm->_gameSys->setAnimation(makeRid(_vm->_gnapSequenceDatNum, _vm->_gnapSequenceId), _vm->_gnapId, 0); - _vm->_gnapActionStatus = kASLookDog; + _vm->_gnapActionStatus = kAS08LookDog; break; case GRAB_CURSOR: _vm->gnapWalkTo(4, 7, 0, 0x107BB, 1); - _vm->_gnapActionStatus = kASGrabDog; + _vm->_gnapActionStatus = kAS08GrabDog; _vm->_gnapIdleFacing = kDirUpRight; break; case TALK_CURSOR: _vm->_gnapIdleFacing = kDirUpRight; _vm->gnapActionIdle(0x14D); _vm->gnapWalkTo(4, 7, 0, _vm->getGnapSequenceId(gskBrainPulsating, 0, 0) | 0x10000, 1); - _vm->_gnapActionStatus = kASTalkDog; + _vm->_gnapActionStatus = kAS08TalkDog; break; case PLAT_CURSOR: _vm->setFlag(kGFSceneFlag1); _vm->gnapActionIdle(0x14D); _vm->gnapUseDeviceOnPlatypuss(); _vm->platypusWalkTo(3, 7, 1, 0x107C2, 1); - _vm->_platypusActionStatus = kASPlatWithDog; + _vm->_platypusActionStatus = kAS08PlatWithDog; _vm->_platypusFacing = kDirNone; _vm->playGnapIdle(3, 7); break; @@ -266,7 +266,7 @@ void Scene08::run() { } break; - case kHSMeat: + case kHS08Meat: if (_vm->_grabCursorSpriteIndex >= 0) { _vm->playGnapShowCurrItem(6, 8, 5, 6); } else { @@ -275,13 +275,13 @@ void Scene08::run() { _vm->playGnapScratchingHead(6, 7); break; case GRAB_CURSOR: - if (_s08_currDogSequenceId == 0x135) { + if (_currDogSequenceId == 0x135) { _vm->playGnapScratchingHead(6, 7); } else { _vm->gnapActionIdle(0x14D); _vm->playGnapPullOutDevice(6, 7); _vm->playGnapUseDevice(0, 0); - _s08_nextDogSequenceId = 0x149; + _nextDogSequenceId = 0x149; } break; case TALK_CURSOR: @@ -292,7 +292,7 @@ void Scene08::run() { } break; - case kHSBone: + case kHS08Bone: if (_vm->_grabCursorSpriteIndex >= 0) { _vm->playGnapShowCurrItem(2, 7, 3, 6); } else { @@ -301,13 +301,13 @@ void Scene08::run() { _vm->playGnapScratchingHead(3, 6); break; case GRAB_CURSOR: - if (_s08_currDogSequenceId == 0x135) { + if (_currDogSequenceId == 0x135) { _vm->playGnapScratchingHead(3, 6); } else { _vm->gnapActionIdle(0x14D); _vm->playGnapPullOutDevice(3, 6); _vm->playGnapUseDevice(0, 0); - _s08_nextDogSequenceId = 0x14A; + _nextDogSequenceId = 0x14A; } break; case TALK_CURSOR: @@ -318,7 +318,7 @@ void Scene08::run() { } break; - case kHSToy: + case kHS08Toy: if (_vm->_grabCursorSpriteIndex >= 0) { _vm->playGnapShowCurrItem(8, 7, 7, 6); } else { @@ -327,13 +327,13 @@ void Scene08::run() { _vm->playGnapScratchingHead(7, 6); break; case GRAB_CURSOR: - if (_s08_currDogSequenceId == 0x135) { + if (_currDogSequenceId == 0x135) { _vm->playGnapScratchingHead(7, 6); } else { _vm->gnapActionIdle(0x14D); _vm->playGnapPullOutDevice(7, 6); _vm->playGnapUseDevice(0, 0); - _s08_nextDogSequenceId = 0x14B; + _nextDogSequenceId = 0x14B; } break; case TALK_CURSOR: @@ -344,8 +344,8 @@ void Scene08::run() { } break; - case kHSWalkArea1: - case kHSWalkArea2: + case kHS08WalkArea1: + case kHS08WalkArea2: _vm->gnapActionIdle(0x14D); _vm->gnapWalkTo(-1, 6, -1, -1, 1); break; @@ -366,21 +366,21 @@ void Scene08::run() { _vm->updateGnapIdleSequence(); if (!_vm->_timers[4]) { _vm->_timers[4] = _vm->getRandom(50) + 125; - if (_vm->_gnapActionStatus < 0 && _vm->_platypusActionStatus < 0 && _s08_nextManSequenceId == -1 && - (_s08_currDogSequenceId == 0x134 || _s08_currDogSequenceId == 0x135)) { + if (_vm->_gnapActionStatus < 0 && _vm->_platypusActionStatus < 0 && _nextManSequenceId == -1 && + (_currDogSequenceId == 0x134 || _currDogSequenceId == 0x135)) { int _gnapRandomValue = _vm->getRandom(4); switch (_gnapRandomValue) { case 0: - _s08_nextManSequenceId = 0x138; + _nextManSequenceId = 0x138; break; case 1: - _s08_nextManSequenceId = 0x136; + _nextManSequenceId = 0x136; break; case 2: - _s08_nextManSequenceId = 0x13B; + _nextManSequenceId = 0x13B; break; case 3: - _s08_nextManSequenceId = 0x13A; + _nextManSequenceId = 0x13A; break; } } @@ -406,34 +406,34 @@ void Scene08::updateAnimations() { if (_vm->_gameSys->getAnimationStatus(0) == 2) { _vm->_gameSys->setAnimation(0, 0, 0); switch (_vm->_gnapActionStatus) { - case kASLeaveScene: + case kAS08LeaveScene: _vm->_sceneDone = true; _vm->_gnapActionStatus = -1; break; - case kASTalkMan: - _s08_nextManSequenceId = 0x13F; + case kAS08TalkMan: + _nextManSequenceId = 0x13F; _vm->_gnapActionStatus = -1; break; - case kASLookMan: - _s08_nextManSequenceId = 0x140; + case kAS08LookMan: + _nextManSequenceId = 0x140; _vm->_gnapActionStatus = -1; break; - case kASLookDog: - _s08_nextManSequenceId = 0x137; + case kAS08LookDog: + _nextManSequenceId = 0x137; _vm->_gnapActionStatus = -1; break; - case kASGrabDog: - if (_s08_currDogSequenceId == 0x135) - _s08_nextDogSequenceId = 0x133; + case kAS08GrabDog: + if (_currDogSequenceId == 0x135) + _nextDogSequenceId = 0x133; else - _s08_nextDogSequenceId = 0x13C; + _nextDogSequenceId = 0x13C; _vm->_gnapActionStatus = -1; break; - case kASTalkDog: - if (_s08_currDogSequenceId == 0x135) - _s08_nextDogSequenceId = 0x133; + case kAS08TalkDog: + if (_currDogSequenceId == 0x135) + _nextDogSequenceId = 0x133; else - _s08_nextDogSequenceId = 0x13C; + _nextDogSequenceId = 0x13C; _vm->_gnapActionStatus = -1; break; } @@ -442,61 +442,61 @@ void Scene08::updateAnimations() { if (_vm->_gameSys->getAnimationStatus(1) == 2) { _vm->_gameSys->setAnimation(0, 0, 1); switch (_vm->_platypusActionStatus) { - case kASPlatWithDog: - _s08_nextDogSequenceId = 0x147; + case kAS08PlatWithDog: + _nextDogSequenceId = 0x147; break; - case kASPlatWithMan: - _s08_nextManSequenceId = 0x140; + case kAS08PlatWithMan: + _nextManSequenceId = 0x140; _vm->_platypusActionStatus = -1; break; } } - if (_vm->_gameSys->getAnimationStatus(2) == 2 && _s08_nextManSequenceId != -1) { - _vm->_gameSys->setAnimation(_s08_nextManSequenceId, 100, 2); - _vm->_gameSys->insertSequence(_s08_nextManSequenceId, 100, _s08_currManSequenceId, 100, kSeqSyncWait, 0, 0, 0); - _s08_currManSequenceId = _s08_nextManSequenceId; - _s08_nextManSequenceId = -1; + if (_vm->_gameSys->getAnimationStatus(2) == 2 && _nextManSequenceId != -1) { + _vm->_gameSys->setAnimation(_nextManSequenceId, 100, 2); + _vm->_gameSys->insertSequence(_nextManSequenceId, 100, _currManSequenceId, 100, kSeqSyncWait, 0, 0, 0); + _currManSequenceId = _nextManSequenceId; + _nextManSequenceId = -1; } if (_vm->_gameSys->getAnimationStatus(3) == 2) { - if (_s08_currDogSequenceId == 0x147) + if (_currDogSequenceId == 0x147) _vm->_platypusActionStatus = -1; - if (_s08_currDogSequenceId == 0x149 || _s08_currDogSequenceId == 0x14A || _s08_currDogSequenceId == 0x14B) { + if (_currDogSequenceId == 0x149 || _currDogSequenceId == 0x14A || _currDogSequenceId == 0x14B) { if (_vm->getRandom(2) != 0) - _s08_nextManSequenceId = 0x13D; + _nextManSequenceId = 0x13D; else - _s08_nextManSequenceId = 0x13E; - } else if (_s08_currDogSequenceId == 0x133) - _s08_nextManSequenceId = 0x139; - if (_s08_nextDogSequenceId == 0x149 || _s08_nextDogSequenceId == 0x14A || _s08_nextDogSequenceId == 0x14B) { - _vm->_gameSys->setAnimation(_s08_nextDogSequenceId, 100, 3); - _vm->_gameSys->insertSequence(_s08_nextDogSequenceId, 100, _s08_currDogSequenceId, 100, kSeqSyncWait, 0, 0, 0); - switch (_s08_nextDogSequenceId) { + _nextManSequenceId = 0x13E; + } else if (_currDogSequenceId == 0x133) + _nextManSequenceId = 0x139; + if (_nextDogSequenceId == 0x149 || _nextDogSequenceId == 0x14A || _nextDogSequenceId == 0x14B) { + _vm->_gameSys->setAnimation(_nextDogSequenceId, 100, 3); + _vm->_gameSys->insertSequence(_nextDogSequenceId, 100, _currDogSequenceId, 100, kSeqSyncWait, 0, 0, 0); + switch (_nextDogSequenceId) { case 0x149: _vm->setFlag(kGFBarnPadlockOpen); - _vm->_hotspots[kHSMeat]._flags = SF_DISABLED | SF_WALKABLE; + _vm->_hotspots[kHS08Meat]._flags = SF_DISABLED | SF_WALKABLE; _vm->_gameSys->removeSequence(0x144, 1, true); break; case 0x14A: _vm->setFlag(kGFTruckFilledWithGas); - _vm->_hotspots[kHSBone]._flags = SF_DISABLED | SF_WALKABLE; + _vm->_hotspots[kHS08Bone]._flags = SF_DISABLED | SF_WALKABLE; _vm->_gameSys->removeSequence(0x145, 1, true); break; case 0x14B: _vm->setFlag(kGFTruckKeysUsed); - _vm->_hotspots[kHSToy]._flags = SF_DISABLED | SF_WALKABLE; + _vm->_hotspots[kHS08Toy]._flags = SF_DISABLED | SF_WALKABLE; _vm->_gameSys->removeSequence(0x146, 1, true); break; } - _s08_currDogSequenceId = _s08_nextDogSequenceId; - _s08_nextDogSequenceId = 0x134; - } else if (_s08_nextDogSequenceId == 0x147) { - _vm->_gameSys->setAnimation(_s08_nextDogSequenceId, 100, 3); - _vm->_gameSys->insertSequence(_s08_nextDogSequenceId, 100, _s08_currDogSequenceId, 100, kSeqSyncWait, 0, 0, 0); + _currDogSequenceId = _nextDogSequenceId; + _nextDogSequenceId = 0x134; + } else if (_nextDogSequenceId == 0x147) { + _vm->_gameSys->setAnimation(_nextDogSequenceId, 100, 3); + _vm->_gameSys->insertSequence(_nextDogSequenceId, 100, _currDogSequenceId, 100, kSeqSyncWait, 0, 0, 0); _vm->_gameSys->insertSequence(0x148, 160, _vm->_platypusSequenceId | (_vm->_platypusSequenceDatNum << 16), _vm->_platypusId, kSeqSyncWait, 0, 0, 0); - _s08_currDogSequenceId = _s08_nextDogSequenceId; - _s08_nextDogSequenceId = 0x134; + _currDogSequenceId = _nextDogSequenceId; + _nextDogSequenceId = 0x134; _vm->_platX = 1; _vm->_platY = 8; _vm->_platypusId = 160; @@ -505,13 +505,13 @@ void Scene08::updateAnimations() { _vm->_platypusSequenceDatNum = 0; if (_vm->_gnapX == 1 && _vm->_gnapY == 8) _vm->gnapWalkStep(); - } else if (_s08_nextDogSequenceId != -1) { - _vm->_gameSys->setAnimation(_s08_nextDogSequenceId, 100, 3); - _vm->_gameSys->insertSequence(_s08_nextDogSequenceId, 100, _s08_currDogSequenceId, 100, kSeqSyncWait, 0, 0, 0); - _s08_currDogSequenceId = _s08_nextDogSequenceId; - if (_s08_nextDogSequenceId != 0x135) - _s08_nextDogSequenceId = 0x134; - if (_s08_currDogSequenceId == 0x133) { + } else if (_nextDogSequenceId != -1) { + _vm->_gameSys->setAnimation(_nextDogSequenceId, 100, 3); + _vm->_gameSys->insertSequence(_nextDogSequenceId, 100, _currDogSequenceId, 100, kSeqSyncWait, 0, 0, 0); + _currDogSequenceId = _nextDogSequenceId; + if (_nextDogSequenceId != 0x135) + _nextDogSequenceId = 0x134; + if (_currDogSequenceId == 0x133) { _vm->_timers[2] = _vm->getRandom(30) + 20; _vm->_timers[3] = _vm->getRandom(50) + 200; _vm->_gameSys->insertSequence(0x14D, _vm->_gnapId, makeRid(_vm->_gnapSequenceDatNum, _vm->_gnapSequenceId), _vm->_gnapId, kSeqSyncWait, 0, 0, 0); diff --git a/engines/gnap/scenes/scene08.h b/engines/gnap/scenes/scene08.h index ab538ce29a..b73bc49b22 100644 --- a/engines/gnap/scenes/scene08.h +++ b/engines/gnap/scenes/scene08.h @@ -42,10 +42,10 @@ public: virtual void updateAnimationsCb(); private: - int _s08_nextDogSequenceId; - int _s08_currDogSequenceId; - int _s08_nextManSequenceId; - int _s08_currManSequenceId; + int _nextDogSequenceId; + int _currDogSequenceId; + int _nextManSequenceId; + int _currManSequenceId; }; } // End of namespace Gnap diff --git a/engines/gnap/scenes/scene09.cpp b/engines/gnap/scenes/scene09.cpp index 5feee78597..7e92ca16ac 100644 --- a/engines/gnap/scenes/scene09.cpp +++ b/engines/gnap/scenes/scene09.cpp @@ -28,20 +28,20 @@ namespace Gnap { enum { - kHSPlatypus = 0, - kHSExitKitchen = 1, - kHSExitHouse = 2, - kHSTrash = 3, - kHSDevice = 4, - kHSWalkArea1 = 5, - kHSWalkArea2 = 6, - kHSWalkArea3 = 7 + kHS09Platypus = 0, + kHS09ExitKitchen = 1, + kHS09ExitHouse = 2, + kHS09Trash = 3, + kHS09Device = 4, + kHS09WalkArea1 = 5, + kHS09WalkArea2 = 6, + kHS09WalkArea3 = 7 }; enum { - kASLeaveScene = 0, - kASSearchTrash = 1, - kASSearchTrashDone = 2 + kAS09LeaveScene = 0, + kAS09SearchTrash = 1, + kAS09SearchTrashDone = 2 }; Scene09::Scene09(GnapEngine *vm) : Scene(vm) { @@ -52,14 +52,14 @@ int Scene09::init() { } void Scene09::updateHotspots() { - _vm->setHotspot(kHSPlatypus, 0, 200, 0, 0, SF_WALKABLE | SF_TALK_CURSOR | SF_GRAB_CURSOR | SF_LOOK_CURSOR); - _vm->setHotspot(kHSExitKitchen, 280, 200, 380, 400, SF_EXIT_U_CURSOR); - _vm->setHotspot(kHSExitHouse, 790, 200, 799, 450, SF_EXIT_R_CURSOR | SF_WALKABLE); - _vm->setHotspot(kHSTrash, 440, 310, 680, 420, SF_PLAT_CURSOR | SF_TALK_CURSOR | SF_GRAB_CURSOR | SF_LOOK_CURSOR); - _vm->setHotspot(kHSWalkArea1, 0, 0, 799, 400); - _vm->setHotspot(kHSWalkArea2, 0, 0, 630, 450); - _vm->setHotspot(kHSWalkArea2, 0, 0, 175, 495); - _vm->setDeviceHotspot(kHSDevice, -1, -1, -1, -1); + _vm->setHotspot(kHS09Platypus, 0, 200, 0, 0, SF_WALKABLE | SF_TALK_CURSOR | SF_GRAB_CURSOR | SF_LOOK_CURSOR); + _vm->setHotspot(kHS09ExitKitchen, 280, 200, 380, 400, SF_EXIT_U_CURSOR); + _vm->setHotspot(kHS09ExitHouse, 790, 200, 799, 450, SF_EXIT_R_CURSOR | SF_WALKABLE); + _vm->setHotspot(kHS09Trash, 440, 310, 680, 420, SF_PLAT_CURSOR | SF_TALK_CURSOR | SF_GRAB_CURSOR | SF_LOOK_CURSOR); + _vm->setHotspot(kHS09WalkArea1, 0, 0, 799, 400); + _vm->setHotspot(kHS09WalkArea2, 0, 0, 630, 450); + _vm->setHotspot(kHS09WalkArea2, 0, 0, 175, 495); + _vm->setDeviceHotspot(kHS09Device, -1, -1, -1, -1); _vm->_hotspotsCount = 8; } @@ -97,7 +97,7 @@ void Scene09::run() { _vm->updateGrabCursorSprite(0, 0); switch (_vm->_sceneClickedHotspot) { - case kHSDevice: + case kHS09Device: if (_vm->_gnapActionStatus < 0) { _vm->runMenu(); updateHotspots(); @@ -106,7 +106,7 @@ void Scene09::run() { } break; - case kHSPlatypus: + case kHS09Platypus: switch (_vm->_verbCursor) { case LOOK_CURSOR: _vm->playGnapMoan1(_vm->_platX, _vm->_platY); @@ -123,25 +123,25 @@ void Scene09::run() { } break; - case kHSExitKitchen: + case kHS09ExitKitchen: _vm->_isLeavingScene = true; _vm->_newSceneNum = 10; _vm->gnapWalkTo(4, 7, 0, 0x107BF, 1); - _vm->_gnapActionStatus = kASLeaveScene; + _vm->_gnapActionStatus = kAS09LeaveScene; _vm->platypusWalkTo(4, 8, -1, 0x107D2, 1); _vm->_platypusFacing = kDirUnk4; break; - case kHSExitHouse: + case kHS09ExitHouse: _vm->_isLeavingScene = true; _vm->_newSceneNum = 8; _vm->gnapWalkTo(10, -1, 0, 0x107AB, 1); - _vm->_gnapActionStatus = kASLeaveScene; + _vm->_gnapActionStatus = kAS09LeaveScene; _vm->platypusWalkTo(10, -1, -1, 0x107CD, 1); _vm->_platypusFacing = kDirUnk4; break; - case kHSTrash: + case kHS09Trash: if (_vm->_grabCursorSpriteIndex >= 0) { _vm->playGnapShowCurrItem(9, 6, 8, 0); } else { @@ -150,7 +150,7 @@ void Scene09::run() { _vm->playGnapScratchingHead(8, 3); break; case GRAB_CURSOR: - _vm->_gnapActionStatus = kASSearchTrash; + _vm->_gnapActionStatus = kAS09SearchTrash; _vm->gnapWalkTo(9, 6, 0, 0x107BC, 1); break; case TALK_CURSOR: @@ -161,9 +161,9 @@ void Scene09::run() { } break; - case kHSWalkArea1: - case kHSWalkArea2: - case kHSWalkArea3: + case kHS09WalkArea1: + case kHS09WalkArea2: + case kHS09WalkArea3: _vm->gnapWalkTo(-1, -1, -1, -1, 1); break; @@ -208,11 +208,11 @@ void Scene09::updateAnimations() { if (_vm->_gameSys->getAnimationStatus(0) == 2) { _vm->_gameSys->setAnimation(0, 0, 0); switch (_vm->_gnapActionStatus) { - case kASLeaveScene: + case kAS09LeaveScene: _vm->_sceneDone = true; _vm->_gnapActionStatus = -1; break; - case kASSearchTrash: + case kAS09SearchTrash: _vm->_gameSys->setAnimation(0x4C, 120, 0); _vm->_gameSys->insertSequence(0x4C, 120, makeRid(_vm->_gnapSequenceDatNum, _vm->_gnapSequenceId), _vm->_gnapId, kSeqSyncWait, 0, 0, 0); _vm->_gameSys->removeSequence(0x4B, 2, true); @@ -222,9 +222,9 @@ void Scene09::updateAnimations() { _vm->_gnapSequenceDatNum = 0; _vm->_gnapX = 9; _vm->_gnapY = 6; - _vm->_gnapActionStatus = kASSearchTrashDone; + _vm->_gnapActionStatus = kAS09SearchTrashDone; break; - case kASSearchTrashDone: + case kAS09SearchTrashDone: _vm->_gameSys->insertSequence(0x4B, 2, 0, 0, kSeqNone, 0, 0, 0); _vm->_timers[2] = 360; _vm->_timers[4] = _vm->getRandom(150) + 100; diff --git a/engines/gnap/scenes/scene09.h b/engines/gnap/scenes/scene09.h index c914d16aa9..2a1576e663 100644 --- a/engines/gnap/scenes/scene09.h +++ b/engines/gnap/scenes/scene09.h @@ -40,8 +40,6 @@ public: virtual void run(); virtual void updateAnimations(); virtual void updateAnimationsCb() {} - -private: }; } // End of namespace Gnap |