diff options
author | Strangerke | 2016-04-10 12:02:08 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2016-05-10 09:54:21 +0200 |
commit | 6dfa316b2454e34252225be399a08f56b78e274f (patch) | |
tree | 19c3bdc793ef05e15e82d754029e9ea5895bdfec /engines/gnap/scenes | |
parent | 6a55da1504b54d4ac16dcccd3fd6c9811d6e3620 (diff) | |
download | scummvm-rg350-6dfa316b2454e34252225be399a08f56b78e274f.tar.gz scummvm-rg350-6dfa316b2454e34252225be399a08f56b78e274f.tar.bz2 scummvm-rg350-6dfa316b2454e34252225be399a08f56b78e274f.zip |
GNAP: Replace more flags values by enums (WIP)
Diffstat (limited to 'engines/gnap/scenes')
-rw-r--r-- | engines/gnap/scenes/scene02.cpp | 18 | ||||
-rw-r--r-- | engines/gnap/scenes/scene04.cpp | 4 | ||||
-rw-r--r-- | engines/gnap/scenes/scene05.cpp | 2 | ||||
-rw-r--r-- | engines/gnap/scenes/scene06.cpp | 4 | ||||
-rw-r--r-- | engines/gnap/scenes/scene08.cpp | 16 | ||||
-rw-r--r-- | engines/gnap/scenes/scene13.cpp | 2 | ||||
-rw-r--r-- | engines/gnap/scenes/scene15.cpp | 20 | ||||
-rw-r--r-- | engines/gnap/scenes/scene17.cpp | 4 | ||||
-rw-r--r-- | engines/gnap/scenes/scene18.cpp | 106 | ||||
-rw-r--r-- | engines/gnap/scenes/scene20.cpp | 4 | ||||
-rw-r--r-- | engines/gnap/scenes/scene22.cpp | 2 | ||||
-rw-r--r-- | engines/gnap/scenes/scene23.cpp | 6 | ||||
-rw-r--r-- | engines/gnap/scenes/scene27.cpp | 6 | ||||
-rw-r--r-- | engines/gnap/scenes/scene30.cpp | 2 | ||||
-rw-r--r-- | engines/gnap/scenes/scene41.cpp | 27 | ||||
-rw-r--r-- | engines/gnap/scenes/scene42.cpp | 12 | ||||
-rw-r--r-- | engines/gnap/scenes/scene43.cpp | 26 | ||||
-rw-r--r-- | engines/gnap/scenes/scene44.cpp | 21 | ||||
-rw-r--r-- | engines/gnap/scenes/scene45.cpp | 12 | ||||
-rw-r--r-- | engines/gnap/scenes/scene46.cpp | 12 | ||||
-rw-r--r-- | engines/gnap/scenes/scene50.cpp | 2 | ||||
-rw-r--r-- | engines/gnap/scenes/scenecore.cpp | 4 |
22 files changed, 152 insertions, 160 deletions
diff --git a/engines/gnap/scenes/scene02.cpp b/engines/gnap/scenes/scene02.cpp index 0688b29dfe..b285972c98 100644 --- a/engines/gnap/scenes/scene02.cpp +++ b/engines/gnap/scenes/scene02.cpp @@ -60,7 +60,7 @@ enum { int GnapEngine::scene02_init() { _gameSys->setAnimation(0, 0, 0); - return isFlag(9) ? 0x15A : 0x15B; + return isFlag(kGFTruckKeysUsed) ? 0x15A : 0x15B; } void GnapEngine::scene02_updateHotspots() { @@ -231,7 +231,7 @@ void GnapEngine::scene02_run() { if (gnapWalkTo(_hotspotsWalkPos[3].x, _hotspotsWalkPos[3].y, 0, getGnapSequenceId(gskIdle, 2, 2) | 0x10000, 1)) { setGrabCursorSprite(-1); invRemove(kItemKeys); - if (isFlag(8)) + if (isFlag(kGFTruckFilledWithGas)) _gnapActionStatus = kASUseTruckGas; else _gnapActionStatus = kASUseTruckNoGas; @@ -249,9 +249,9 @@ void GnapEngine::scene02_run() { playGnapScratchingHead(2, 2); break; case GRAB_CURSOR: - if (isFlag(9)) { + if (isFlag(kGFTruckKeysUsed)) { if (gnapWalkTo(_hotspotsWalkPos[3].x, _hotspotsWalkPos[3].y, 0, getGnapSequenceId(gskIdle, 2, 2) | 0x10000, 1)) { - if (isFlag(8)) + if (isFlag(kGFTruckFilledWithGas)) _gnapActionStatus = kASUseTruckGas; else _gnapActionStatus = kASUseTruckNoGas; @@ -419,7 +419,7 @@ void GnapEngine::scene02_updateAnimations() { _gnapSequenceDatNum = 0; invRemove(kItemGas); setGrabCursorSprite(-1); - setFlag(8); + setFlag(kGFTruckFilledWithGas); _gnapActionStatus = kASUseGasWithTruckDone; break; case kASUseTruckGas: @@ -427,10 +427,10 @@ void GnapEngine::scene02_updateAnimations() { _timers[4] = 9999; hideCursor(); setGrabCursorSprite(-1); - if (!isFlag(9)) { + if (!isFlag(kGFTruckKeysUsed)) { _gameSys->insertSequence(0x14F, _gnapId, makeRid(_gnapSequenceDatNum, _gnapSequenceId), _gnapId, kSeqSyncWait, 0, 0, 0); _gameSys->waitForUpdate(); - setFlag(9); + setFlag(kGFTruckKeysUsed); _gnapSequenceId = 0x14F; _gnapSequenceDatNum = 0; invRemove(kItemKeys); @@ -443,10 +443,10 @@ void GnapEngine::scene02_updateAnimations() { hideCursor(); setGrabCursorSprite(-1); _timers[4] = 250; - if (!isFlag(9)) { + if (!isFlag(kGFTruckKeysUsed)) { _gameSys->insertSequence(0x14F, _gnapId, makeRid(_gnapSequenceDatNum, _gnapSequenceId), _gnapId, kSeqSyncWait, 0, 0, 0); _gameSys->waitForUpdate(); - setFlag(9); + setFlag(kGFTruckKeysUsed); _gnapSequenceId = 0x14F; _gnapSequenceDatNum = 0; invRemove(kItemKeys); diff --git a/engines/gnap/scenes/scene04.cpp b/engines/gnap/scenes/scene04.cpp index 8022625154..b85bbe7f36 100644 --- a/engines/gnap/scenes/scene04.cpp +++ b/engines/gnap/scenes/scene04.cpp @@ -107,7 +107,7 @@ void GnapEngine::scene04_run() { queueInsertDeviceIcon(); - if (isFlag(10)) { + if (isFlag(kGFPlatyPussDisguised)) { _timers[3] = 300; // TODO setCursor((LPCSTR)IDC_WAIT); setGrabCursorSprite(kItemKeys); @@ -125,7 +125,7 @@ void GnapEngine::scene04_run() { invRemove(kItemDisguise); invAdd(kItemKeys); setFlag(kGFKeysTaken); - clearFlag(10); + clearFlag(kGFPlatyPussDisguised); _beaverSequenceId = 0x20C; _beaverSequenceDatNum = 0; _beaverFacing = kDirBottomRight; diff --git a/engines/gnap/scenes/scene05.cpp b/engines/gnap/scenes/scene05.cpp index 805de4f212..03534b1318 100644 --- a/engines/gnap/scenes/scene05.cpp +++ b/engines/gnap/scenes/scene05.cpp @@ -376,7 +376,7 @@ void GnapEngine::scene05_updateAnimations() { _gnapSequenceId = 0x147; _gnapSequenceDatNum = 0; setFlag(kGFBarnPadlockOpen); - setFlag(11); + setFlag(kGFSceneFlag1); setGrabCursorSprite(-1); _newSceneNum = 6; _timers[2] = 100; diff --git a/engines/gnap/scenes/scene06.cpp b/engines/gnap/scenes/scene06.cpp index 8a374e1021..13c6108d7c 100644 --- a/engines/gnap/scenes/scene06.cpp +++ b/engines/gnap/scenes/scene06.cpp @@ -53,9 +53,9 @@ int GnapEngine::scene06_init() { _gameSys->setAnimation(0, 0, 0); _gameSys->setAnimation(0, 0, 1); _gameSys->setAnimation(0, 0, 2); - if (isFlag(11)) { + if (isFlag(kGFSceneFlag1)) { playSound(0x11B, 0); - clearFlag(11); + clearFlag(kGFSceneFlag1); } return 0x101; } diff --git a/engines/gnap/scenes/scene08.cpp b/engines/gnap/scenes/scene08.cpp index 2dfb4d324f..d01355a44d 100644 --- a/engines/gnap/scenes/scene08.cpp +++ b/engines/gnap/scenes/scene08.cpp @@ -69,9 +69,9 @@ void GnapEngine::scene08_updateHotspots() { setDeviceHotspot(kHSDevice, -1, -1, -1, -1); if (isFlag(kGFBarnPadlockOpen)) _hotspots[kHSMeat]._flags = SF_WALKABLE | SF_DISABLED; - if (isFlag(8)) + if (isFlag(kGFTruckFilledWithGas)) _hotspots[kHSBone]._flags = SF_WALKABLE | SF_DISABLED; - if (isFlag(9)) + if (isFlag(kGFTruckKeysUsed)) _hotspots[kHSToy]._flags = SF_WALKABLE | SF_DISABLED; _hotspotsCount = 11; } @@ -110,10 +110,10 @@ void GnapEngine::scene08_run() { if (!isFlag(kGFBarnPadlockOpen)) _gameSys->insertSequence(0x144, 1, 0, 0, kSeqNone, 0, 0, 0); - if (!isFlag(8)) + if (!isFlag(kGFTruckFilledWithGas)) _gameSys->insertSequence(0x145, 1, 0, 0, kSeqNone, 0, 0, 0); - if (!isFlag(9)) + if (!isFlag(kGFTruckKeysUsed)) _gameSys->insertSequence(0x146, 1, 0, 0, kSeqNone, 0, 0, 0); initGnapPos(-1, 8, kDirBottomRight); @@ -156,7 +156,7 @@ void GnapEngine::scene08_run() { } else { switch (_verbCursor) { case LOOK_CURSOR: - if (isFlag(11)) + if (isFlag(kGFSceneFlag1)) playGnapMoan1(_platX, _platY); else playGnapScratchingHead(_platX, _platY); @@ -249,7 +249,7 @@ void GnapEngine::scene08_run() { _gnapActionStatus = kASTalkDog; break; case PLAT_CURSOR: - setFlag(11); + setFlag(kGFSceneFlag1); gnapActionIdle(0x14D); gnapUseDeviceOnBeaver(); platypusWalkTo(3, 7, 1, 0x107C2, 1); @@ -478,12 +478,12 @@ void GnapEngine::scene08_updateAnimations() { _gameSys->removeSequence(0x144, 1, true); break; case 0x14A: - setFlag(8); + setFlag(kGFTruckFilledWithGas); _hotspots[kHSBone]._flags = SF_DISABLED | SF_WALKABLE; _gameSys->removeSequence(0x145, 1, true); break; case 0x14B: - setFlag(9); + setFlag(kGFTruckKeysUsed); _hotspots[kHSToy]._flags = SF_DISABLED | SF_WALKABLE; _gameSys->removeSequence(0x146, 1, true); break; diff --git a/engines/gnap/scenes/scene13.cpp b/engines/gnap/scenes/scene13.cpp index a892b84a6d..bfffcbdcc9 100644 --- a/engines/gnap/scenes/scene13.cpp +++ b/engines/gnap/scenes/scene13.cpp @@ -165,7 +165,7 @@ void GnapEngine::scene13_run() { gnapWalkTo(2, 7, 0, 0x107C0, 1); _gnapActionStatus = kASLeaveScene; platypusWalkTo(2, 8, -1, -1, 1); - if (isFlag(14) || isFlag(15)) { + if (isFlag(kGFUnk14) || isFlag(15)) { _newSceneNum = 11; } else { setFlag(15); diff --git a/engines/gnap/scenes/scene15.cpp b/engines/gnap/scenes/scene15.cpp index f9fb3efbe6..4323253a8c 100644 --- a/engines/gnap/scenes/scene15.cpp +++ b/engines/gnap/scenes/scene15.cpp @@ -148,13 +148,13 @@ void GnapEngine::scene15_run() { } else { switch (_verbCursor) { case LOOK_CURSOR: - if (isFlag(12) || isFlag(13)) + if (isFlag(kGFGnapControlsToyUFO) || isFlag(kGFUnk13)) playSound(0x108E9, 0); else _s15_nextSlotSequenceId = 0xDA; break; case GRAB_CURSOR: - if (isFlag(12) || isFlag(13)) + if (isFlag(kGFGnapControlsToyUFO) || isFlag(kGFUnk13)) _s15_nextSlotSequenceId = 0xD9; else _s15_nextSlotSequenceId = 0xDA; @@ -259,22 +259,22 @@ void GnapEngine::scene15_updateAnimations() { invRemove(kItemQuarter); } else { invRemove(kItemQuarterWithHole); - setFlag(13); + setFlag(kGFUnk13); } setGrabCursorSprite(-1); break; case 0xDB: - setFlag(14); + setFlag(kGFUnk14); setGrabCursorSprite(-1); _s15_nextSlotSequenceId = 0xD8; break; case 0xD9: - if (isFlag(12)) { - clearFlag(12); + if (isFlag(kGFGnapControlsToyUFO)) { + clearFlag(kGFGnapControlsToyUFO); invAdd(kItemQuarter); _newGrabCursorSpriteIndex = kItemQuarter; - } else if (isFlag(13)) { - clearFlag(13); + } else if (isFlag(kGFUnk13)) { + clearFlag(kGFUnk13); invAdd(kItemQuarterWithHole); _newGrabCursorSpriteIndex = kItemQuarterWithHole; } @@ -315,7 +315,7 @@ void GnapEngine::scene15_updateAnimations() { _gameSys->insertSequence(_s15_nextUpperButtonSequenceId, 1, _s15_currUpperButtonSequenceId, 1, kSeqSyncWait, 0, 0, 0); _s15_currUpperButtonSequenceId = _s15_nextUpperButtonSequenceId; _s15_nextUpperButtonSequenceId = -1; - if (_s15_currLowerButtonSequenceId != -1 && isFlag(14)) { + if (_s15_currLowerButtonSequenceId != -1 && isFlag(kGFUnk14)) { if (_s15_currUpperButtonSequenceId == 0xCC && _s15_currLowerButtonSequenceId == 0xCE) _s15_nextRecordSequenceId = 0xD3; else @@ -329,7 +329,7 @@ void GnapEngine::scene15_updateAnimations() { _gameSys->insertSequence(_s15_nextLowerButtonSequenceId, 1, _s15_currLowerButtonSequenceId, 1, kSeqSyncWait, 0, 0, 0); _s15_currLowerButtonSequenceId = _s15_nextLowerButtonSequenceId; _s15_nextLowerButtonSequenceId = -1; - if (_s15_currUpperButtonSequenceId != -1 && isFlag(14)) { + if (_s15_currUpperButtonSequenceId != -1 && isFlag(kGFUnk14)) { if (_s15_currUpperButtonSequenceId == 0xCC && _s15_currLowerButtonSequenceId == 0xCE) _s15_nextRecordSequenceId = 0xD3; else diff --git a/engines/gnap/scenes/scene17.cpp b/engines/gnap/scenes/scene17.cpp index c502649c1d..8c07a0aff7 100644 --- a/engines/gnap/scenes/scene17.cpp +++ b/engines/gnap/scenes/scene17.cpp @@ -129,7 +129,7 @@ void GnapEngine::scene17_run() { _timers[6] = getRandom(30) + 200; _timers[7] = getRandom(100) + 100; - if (isFlag(9)) { + if (isFlag(kGFTruckKeysUsed)) { _gameSys->insertSequence(0x25F, 20, 0, 0, kSeqNone, 0, 0, 0); } else { if (_s18_garbageCanPos >= 8) { @@ -157,7 +157,7 @@ void GnapEngine::scene17_run() { _s17_currCarWindowSequenceId = 0x244; - if (isFlag(14)) + if (isFlag(kGFUnk14)) _gameSys->insertSequence(0x261, 1, 0, 0, kSeqNone, 0, 0, 0); _gameSys->setAnimation(_s17_currWrenchSequenceId, 40, 2); diff --git a/engines/gnap/scenes/scene18.cpp b/engines/gnap/scenes/scene18.cpp index 3e2301e96b..755a9f7585 100644 --- a/engines/gnap/scenes/scene18.cpp +++ b/engines/gnap/scenes/scene18.cpp @@ -86,8 +86,8 @@ void GnapEngine::scene18_updateHotspots() { setHotspot(kHSWalkArea1, 0, 0, 800, 448); setHotspot(kHSWalkArea2, 0, 0, 214, 515); setDeviceHotspot(kHSDevice, -1, -1, -1, -1); - if (isFlag(8)) { - if (isFlag(9)) { + if (isFlag(kGFTruckFilledWithGas)) { + if (isFlag(kGFTruckKeysUsed)) { _hotspots[kHSHydrantTopValve]._flags = SF_DISABLED; _hotspots[kHSHydrantRightValve]._x1 = 148; _hotspots[kHSHydrantRightValve]._y1 = 403; @@ -101,7 +101,7 @@ void GnapEngine::scene18_updateHotspots() { _hotspots[kHSHydrantRightValve]._flags = SF_DISABLED; _hotspots[kHSHydrantTopValve]._x1 = 105; _hotspots[kHSHydrantTopValve]._x2 = 192; - } else if (isFlag(9)) { + } else if (isFlag(kGFTruckKeysUsed)) { _hotspots[kHSGarbageCan]._x1 = 115; _hotspots[kHSGarbageCan]._y1 = 365; _hotspots[kHSGarbageCan]._x2 = 168; @@ -110,7 +110,7 @@ void GnapEngine::scene18_updateHotspots() { _hotspotsWalkPos[kHSGarbageCan].x = 3; _hotspotsWalkPos[kHSGarbageCan].y = 7; } - if (isFlag(10)) + if (isFlag(kGFPlatyPussDisguised)) _hotspots[kHSGarbageCan]._flags = SF_DISABLED; if (isFlag(26)) { _hotspots[kHSDevice]._flags = SF_DISABLED; @@ -118,7 +118,7 @@ void GnapEngine::scene18_updateHotspots() { _hotspots[kHSHydrantRightValve]._flags = SF_DISABLED; _hotspots[kHSPlatypus]._flags = SF_DISABLED; } - if (isFlag(14)) { + if (isFlag(kGFUnk14)) { _hotspots[kHSHydrantTopValve]._flags = SF_DISABLED; _hotspots[kHSCowboyHat]._flags = SF_DISABLED; } @@ -236,7 +236,7 @@ void GnapEngine::scene18_putDownGarbageCan(int animationIndex) { _s18_garbageCanPos = _gnapX - 1; else _s18_garbageCanPos = _gnapX + 1; - clearFlag(10); + clearFlag(kGFPlatyPussDisguised); scene18_updateHotspots(); if (_gnapIdleFacing != kDirNone && _gnapIdleFacing != kDirBottomRight && _gnapIdleFacing != kDirUpRight) { _gameSys->insertSequence(0x107BA, _gnapId, @@ -285,9 +285,9 @@ void GnapEngine::scene18_platEndPhoning(bool platFl) { void GnapEngine::scene18_closeHydrantValve() { _gnapActionStatus = kASLeaveScene; updateMouseCursor(); - if (isFlag(8)) { + if (isFlag(kGFTruckFilledWithGas)) { gnapWalkTo(_hotspotsWalkPos[kHSHydrantRightValve].x, _hotspotsWalkPos[kHSHydrantRightValve].y, 0, 0x107BA, 1); - if (isFlag(9)) { + if (isFlag(kGFTruckKeysUsed)) { _gnapActionStatus = kASCloseRightValveWithGarbageCan; scene18_waitForGnapAction(); } else { @@ -319,13 +319,13 @@ void GnapEngine::scene18_run() { queueInsertDeviceIcon(); - clearFlag(10); + clearFlag(kGFPlatyPussDisguised); - if (!isFlag(14)) + if (!isFlag(kGFUnk14)) _gameSys->insertSequence(0x1F8, 19, 0, 0, kSeqNone, 0, 0, 0); - if (isFlag(9)) { - if (isFlag(8)) { + if (isFlag(kGFTruckKeysUsed)) { + if (isFlag(kGFTruckFilledWithGas)) { _gameSys->insertSequence(0x214, 39, 0, 0, kSeqLoop, 0, 0, 0); _gameSys->insertSequence(0x20D, 39, 0, 0, kSeqLoop, 0, 0, 0); playSound(0x22B, true); @@ -334,7 +334,7 @@ void GnapEngine::scene18_run() { } } else { _gameSys->insertSequence(0x1FA, 19, 0, 0, kSeqNone, 0, 15 * (5 * _s18_garbageCanPos - 40), 0); - if (isFlag(8)) { + if (isFlag(kGFTruckFilledWithGas)) { _gameSys->insertSequence(0x212, 39, 0, 0, kSeqLoop, 0, 0, 0); _gameSys->insertSequence(0x20D, 39, 0, 0, kSeqLoop, 0, 0, 0); playSound(0x22B, true); @@ -372,8 +372,8 @@ void GnapEngine::scene18_run() { } gnapWalkTo(4, 8, -1, 0x107B9, 1); } else { - if (isFlag(12)) { - clearFlag(12); + if (isFlag(kGFGnapControlsToyUFO)) { + clearFlag(kGFGnapControlsToyUFO); setGrabCursorSprite(kItemCowboyHat); _prevSceneNum = 19; } @@ -422,7 +422,7 @@ void GnapEngine::scene18_run() { case kHSPlatypus: if (_gnapActionStatus < 0) { - if (isFlag(10)) { + if (isFlag(kGFPlatyPussDisguised)) { scene18_gnapCarryGarbageCanTo(-1, -1, 0, -1, -1); scene18_putDownGarbageCan(0); } @@ -455,7 +455,7 @@ void GnapEngine::scene18_run() { _gnapActionStatus = kASGrabCowboyHat; _sceneWaiting = 0; } else if (_gnapActionStatus < 0) { - if (isFlag(10)) { + if (isFlag(kGFPlatyPussDisguised)) { scene18_gnapCarryGarbageCanTo(-1, -1, 0, -1, -1); scene18_putDownGarbageCan(0); } @@ -480,7 +480,7 @@ void GnapEngine::scene18_run() { case kHSGarbageCan: if (_gnapActionStatus < 0) { - if (isFlag(14)) { + if (isFlag(kGFUnk14)) { if (_grabCursorSpriteIndex >= 0) playGnapShowCurrItem(_hotspotsWalkPos[kHSGarbageCan].x, _hotspotsWalkPos[kHSGarbageCan].y, 1, 5); else @@ -489,7 +489,7 @@ void GnapEngine::scene18_run() { if (isFlag(26)) scene18_platEndPhoning(true); if (_grabCursorSpriteIndex >= 0) { - if (!isFlag(9)) + if (!isFlag(kGFTruckKeysUsed)) playGnapShowCurrItem(_hotspotsWalkPos[kHSGarbageCan].x - (_gnapX < _s18_garbageCanPos ? 1 : -1), _hotspotsWalkPos[kHSGarbageCan].y, _hotspotsWalkPos[kHSGarbageCan].x, _hotspotsWalkPos[kHSGarbageCan].y); else @@ -497,18 +497,18 @@ void GnapEngine::scene18_run() { } else { switch (_verbCursor) { case LOOK_CURSOR: - if (!isFlag(9)) + if (!isFlag(kGFTruckKeysUsed)) playGnapScratchingHead(_hotspotsWalkPos[kHSGarbageCan].x - (_gnapX < _s18_garbageCanPos ? 1 : -1), _hotspotsWalkPos[kHSGarbageCan].y); - else if (!isFlag(8)) + else if (!isFlag(kGFTruckFilledWithGas)) playGnapScratchingHead(2, 4); break; case GRAB_CURSOR: - if (!isFlag(9)) { + if (!isFlag(kGFTruckKeysUsed)) { gnapWalkTo(_hotspotsWalkPos[kHSGarbageCan].x - (_gnapX < _s18_garbageCanPos ? 1 : -1), _hotspotsWalkPos[kHSGarbageCan].y, -1, -1, 1); gnapWalkTo(_gnapX, _gnapY, 0, getGnapSequenceId(gskIdle, _s18_garbageCanPos, _gnapY) | 0x10000, 1); _gnapActionStatus = kASGrabGarbageCanFromStreet; - } else if (!isFlag(8)) { + } else if (!isFlag(kGFTruckFilledWithGas)) { if (gnapWalkTo(_hotspotsWalkPos[kHSGarbageCan].x, _hotspotsWalkPos[kHSGarbageCan].y, 0, -1, 1)) _gnapActionStatus = kASGrabGarbageCanFromHydrant; } @@ -525,7 +525,7 @@ void GnapEngine::scene18_run() { case kHSHydrantTopValve: if (_gnapActionStatus < 0) { - if (isFlag(10)) { + if (isFlag(kGFPlatyPussDisguised)) { // While carrying garbage can if (_grabCursorSpriteIndex >= 0) { scene18_gnapCarryGarbageCanTo(-1, -1, 0, -1, -1); @@ -539,7 +539,7 @@ void GnapEngine::scene18_run() { playGnapScratchingHead(0, 0); break; case GRAB_CURSOR: - if (isFlag(8)) { + if (isFlag(kGFTruckFilledWithGas)) { scene18_gnapCarryGarbageCanTo(-1, -1, 0, -1, 2); _gnapActionStatus = kASPutGarbageCanOnRunningHydrant; } else if (!isFlag(kGFBarnPadlockOpen)) { @@ -591,20 +591,20 @@ void GnapEngine::scene18_run() { case kHSHydrantRightValve: if (_gnapActionStatus < 0) { - if (isFlag(14)) { + if (isFlag(kGFUnk14)) { if (_grabCursorSpriteIndex == -1) { playGnapImpossible(0, 0); } else { playGnapShowCurrItem(_hotspotsWalkPos[kHSHydrantRightValve].x, _hotspotsWalkPos[kHSHydrantRightValve].y, 1, 5); } } else { - if (isFlag(10)) { + if (isFlag(kGFPlatyPussDisguised)) { scene18_gnapCarryGarbageCanTo(-1, -1, 0, -1, -1); scene18_putDownGarbageCan(0); } if (_grabCursorSpriteIndex == kItemWrench) { gnapWalkTo(_gnapX, _gnapY, 0, getGnapSequenceId(gskIdle, 2, 8) | 0x10000, 1); - if (isFlag(9)) + if (isFlag(kGFTruckKeysUsed)) _gnapActionStatus = kASOpenRightValveWithGarbageCan; else _gnapActionStatus = kASOpenRightValveNoGarbageCan; @@ -616,9 +616,9 @@ void GnapEngine::scene18_run() { playGnapScratchingHead(1, 5); break; case GRAB_CURSOR: - if (isFlag(8)) { + if (isFlag(kGFTruckFilledWithGas)) { gnapWalkTo(_hotspotsWalkPos[kHSHydrantRightValve].x, _hotspotsWalkPos[kHSHydrantRightValve].y, 0, 0x107BA, 1); - if (isFlag(9)) + if (isFlag(kGFTruckKeysUsed)) _gnapActionStatus = kASCloseRightValveWithGarbageCan; else _gnapActionStatus = kASCloseRightValveNoGarbageCan; @@ -636,7 +636,7 @@ void GnapEngine::scene18_run() { case kHSExitToyStore: if (_gnapActionStatus < 0) { - if (isFlag(10)) { + if (isFlag(kGFPlatyPussDisguised)) { scene18_gnapCarryGarbageCanTo(-1, -1, 0, -1, -1); scene18_putDownGarbageCan(0); } @@ -655,7 +655,7 @@ void GnapEngine::scene18_run() { case kHSExitPhoneBooth: if (_gnapActionStatus < 0) { - if (isFlag(10)) { + if (isFlag(kGFPlatyPussDisguised)) { scene18_gnapCarryGarbageCanTo(-1, -1, 0, -1, -1); scene18_putDownGarbageCan(0); } @@ -673,7 +673,7 @@ void GnapEngine::scene18_run() { case kHSExitGrubCity: if (_gnapActionStatus < 0) { - if (isFlag(10)) { + if (isFlag(kGFPlatyPussDisguised)) { scene18_gnapCarryGarbageCanTo(-1, -1, 0, -1, -1); scene18_putDownGarbageCan(0); } @@ -694,7 +694,7 @@ void GnapEngine::scene18_run() { case kHSWalkArea1: case kHSWalkArea2: if (_gnapActionStatus < 0) { - if (isFlag(10)) { + if (isFlag(kGFPlatyPussDisguised)) { scene18_gnapCarryGarbageCanTo(-1, -1, 0, -1, -1); scene18_putDownGarbageCan(0); } else { @@ -706,7 +706,7 @@ void GnapEngine::scene18_run() { default: if (_gnapActionStatus != kASStandingOnHydrant && _mouseClickState._left) { - if (isFlag(10)) { + if (isFlag(kGFPlatyPussDisguised)) { scene18_gnapCarryGarbageCanTo(-1, -1, 0, -1, -1); scene18_putDownGarbageCan(0); } else { @@ -723,7 +723,7 @@ void GnapEngine::scene18_run() { if (!isSoundPlaying(0x10940)) playSound(0x10940, true); - if ((isFlag(8) || isFlag(kGFBarnPadlockOpen)) && !isSoundPlaying(0x22B) && + if ((isFlag(kGFTruckFilledWithGas) || isFlag(kGFBarnPadlockOpen)) && !isSoundPlaying(0x22B) && _gnapActionStatus != kASOpenRightValveNoGarbageCanDone && _gnapActionStatus != kASOpenRightValveNoGarbageCan && _gnapActionStatus != kASOpenTopValve && _gnapActionStatus != kASOpenTopValveDone && _gnapActionStatus != kASOpenRightValveWithGarbageCan && _gnapActionStatus != kASOpenRightValveWithGarbageCanDone) @@ -757,7 +757,7 @@ void GnapEngine::scene18_run() { } playSoundA(); } - if (!isFlag(10)) + if (!isFlag(kGFPlatyPussDisguised)) updateGnapIdleSequence(); } @@ -773,7 +773,7 @@ void GnapEngine::scene18_run() { } - if (isFlag(12)) + if (isFlag(kGFGnapControlsToyUFO)) deleteSurface(&_s18_cowboyHatSurface); } @@ -798,7 +798,7 @@ void GnapEngine::scene18_updateAnimations() { _gnapSequenceId = 0x1FD; } _gameSys->removeSequence(0x1FA, 19, true); - setFlag(10); + setFlag(kGFPlatyPussDisguised); scene18_updateHotspots(); _gnapActionStatus = -1; break; @@ -807,8 +807,8 @@ void GnapEngine::scene18_updateAnimations() { _gameSys->removeSequence(0x1F9, 19, true); _gnapSequenceDatNum = 0; _gnapSequenceId = 0x1FE; - clearFlag(9); - setFlag(10); + clearFlag(kGFTruckKeysUsed); + setFlag(kGFPlatyPussDisguised); scene18_updateHotspots(); _gnapActionStatus = -1; break; @@ -820,7 +820,7 @@ void GnapEngine::scene18_updateAnimations() { stopSound(0x22B); _gnapSequenceDatNum = 0; _gnapSequenceId = 0x205; - clearFlag(8); + clearFlag(kGFTruckFilledWithGas); invAdd(kItemWrench); setGrabCursorSprite(kItemWrench); scene18_updateHotspots(); @@ -886,11 +886,11 @@ void GnapEngine::scene18_updateAnimations() { _newSceneNum = 18; invAdd(kItemCowboyHat); invAdd(kItemWrench); - setFlag(12); - setFlag(14); - clearFlag(8); - setFlag(9); - setFlag(14); + setFlag(kGFGnapControlsToyUFO); + setFlag(kGFUnk14); + clearFlag(kGFTruckFilledWithGas); + setFlag(kGFTruckKeysUsed); + setFlag(kGFUnk14); // CHECKME - Set 2 times? scene18_updateHotspots(); _gnapActionStatus = kASLeaveScene; break; @@ -899,8 +899,8 @@ void GnapEngine::scene18_updateAnimations() { _gnapActionStatus = -1; break; case kASPutGarbageCanOnRunningHydrant: - setFlag(9); - clearFlag(10); + setFlag(kGFTruckKeysUsed); + clearFlag(kGFPlatyPussDisguised); _gameSys->requestRemoveSequence(0x211, 39); _gameSys->requestRemoveSequence(0x212, 39); _gameSys->insertSequence(0x210, _gnapId, makeRid(_gnapSequenceDatNum, _gnapSequenceId), _gnapId, kSeqSyncWait, 0, 0, 0); @@ -925,7 +925,7 @@ void GnapEngine::scene18_updateAnimations() { break; case kASOpenRightValveNoGarbageCan: case kASOpenRightValveWithGarbageCan: - setFlag(8); + setFlag(kGFTruckFilledWithGas); scene18_updateHotspots(); playGnapPullOutDevice(2, 7); playGnapUseDevice(0, 0); @@ -978,7 +978,7 @@ void GnapEngine::scene18_updateAnimations() { stopSound(0x22B); _gameSys->setAnimation(0x1F9, 19, 0); _gameSys->insertSequence(0x1F9, 19, 0x215, 39, kSeqSyncWait, 0, 0, 0); - clearFlag(8); + clearFlag(kGFTruckFilledWithGas); invAdd(kItemWrench); setGrabCursorSprite(kItemWrench); _gameSys->insertSequence(0x107B5, _gnapId, 517, _gnapId, kSeqSyncWait, 0, 75 * _gnapX - _gnapGridX, 48 * _gnapY - _gnapGridY); @@ -991,8 +991,8 @@ void GnapEngine::scene18_updateAnimations() { _gnapActionStatus = -1; break; case kASPutGarbageCanOnHydrant: - setFlag(9); - clearFlag(10); + setFlag(kGFTruckKeysUsed); + clearFlag(kGFPlatyPussDisguised); _gameSys->insertSequence(0x20F, _gnapId, makeRid(_gnapSequenceDatNum, _gnapSequenceId), _gnapId, kSeqSyncWait, 0, 0, 0); _gameSys->setAnimation(0x20F, _gnapId, 0); _gnapSequenceDatNum = 0; diff --git a/engines/gnap/scenes/scene20.cpp b/engines/gnap/scenes/scene20.cpp index beee17be0b..dd8dcfbeb5 100644 --- a/engines/gnap/scenes/scene20.cpp +++ b/engines/gnap/scenes/scene20.cpp @@ -219,8 +219,8 @@ void GnapEngine::scene20_run() { queueInsertDeviceIcon(); - if (isFlag(11)) { - clearFlag(11); + if (isFlag(kGFSceneFlag1)) { + clearFlag(kGFSceneFlag1); endSceneInit(); _gameSys->setAnimation(0x182, 140, 0); _gameSys->insertSequence(0x182, 140, 0, 0, kSeqNone, 0, 0, 0); diff --git a/engines/gnap/scenes/scene22.cpp b/engines/gnap/scenes/scene22.cpp index 01de3e8d55..a01c7e4b77 100644 --- a/engines/gnap/scenes/scene22.cpp +++ b/engines/gnap/scenes/scene22.cpp @@ -82,7 +82,7 @@ void GnapEngine::scene22_run() { platypusWalkTo(9, 8, -1, 0x107C2, 1); } - if (isFlag(11)) { + if (isFlag(kGFSceneFlag1)) { int storeDetectiveSeqId; setGrabCursorSprite(-1); invRemove(kItemCereals); diff --git a/engines/gnap/scenes/scene23.cpp b/engines/gnap/scenes/scene23.cpp index ebbf46a1da..3ad17c5fa2 100644 --- a/engines/gnap/scenes/scene23.cpp +++ b/engines/gnap/scenes/scene23.cpp @@ -139,7 +139,7 @@ void GnapEngine::scene23_run() { } else { switch (_verbCursor) { case LOOK_CURSOR: - if (isFlag(11)) + if (isFlag(kGFSceneFlag1)) playGnapMoan2(0, 0); else { gnapWalkTo(_hotspotsWalkPos[kHSCereals].x, _hotspotsWalkPos[kHSCereals].y, @@ -148,13 +148,13 @@ void GnapEngine::scene23_run() { } break; case GRAB_CURSOR: - if (isFlag(11)) + if (isFlag(kGFSceneFlag1)) playGnapImpossible(0, 0); else { _gnapIdleFacing = kDirBottomRight; gnapWalkTo(_hotspotsWalkPos[kHSCereals].x, _hotspotsWalkPos[kHSCereals].y, 0, getGnapSequenceId(gskIdle, 0, 0) | 0x10000, 1); - setFlag(11); + setFlag(kGFSceneFlag1); _gnapActionStatus = kASGrabCereals; invAdd(kItemCereals); } diff --git a/engines/gnap/scenes/scene27.cpp b/engines/gnap/scenes/scene27.cpp index e891e255d7..2b7666b4ee 100644 --- a/engines/gnap/scenes/scene27.cpp +++ b/engines/gnap/scenes/scene27.cpp @@ -63,7 +63,7 @@ void GnapEngine::scene27_updateHotspots() { setHotspot(kHSExitClown, 340, 240, 460, 420, SF_EXIT_U_CURSOR, 6, 8); setHotspot(kHSWalkArea1, 0, 0, 800, 507); setDeviceHotspot(kHSDevice, -1, -1, -1, -1); - if (isFlag(13)) + if (isFlag(kGFUnk13)) _hotspots[kHSBucket]._flags = SF_DISABLED; _hotspotsCount = 9; } @@ -75,7 +75,7 @@ void GnapEngine::scene27_run() { _timers[7] = getRandom(100) + 300; queueInsertDeviceIcon(); - if (!isFlag(13)) + if (!isFlag(kGFUnk13)) _gameSys->insertSequence(0xD3, 39, 0, 0, kSeqNone, 0, 0, 0); if (_debugLevel == 4) @@ -339,7 +339,7 @@ void GnapEngine::scene27_updateAnimations() { playGnapUseDevice(0, 0); _hotspots[kHSBucket]._flags = SF_DISABLED; invAdd(kItemEmptyBucket); - setFlag(13); + setFlag(kGFUnk13); _gameSys->setAnimation(0xD2, 39, 0); _gameSys->insertSequence(0xD2, 39, 211, 39, kSeqSyncWait, 0, 0, 0); _gnapActionStatus = kASGrabBucketDone; diff --git a/engines/gnap/scenes/scene30.cpp b/engines/gnap/scenes/scene30.cpp index 3e237fd46f..cad83ae6dd 100644 --- a/engines/gnap/scenes/scene30.cpp +++ b/engines/gnap/scenes/scene30.cpp @@ -67,7 +67,7 @@ void GnapEngine::scene30_run() { if (isFlag(23)) _gameSys->insertSequence(0x106, 1, 0, 0, kSeqNone, 0, 0, 0); - if (!isFlag(13)) + if (!isFlag(kGFUnk13)) _gameSys->insertSequence(0x107, 1, 0, 0, kSeqNone, 0, 0, 0); _timers[5] = getRandom(50) + 180; diff --git a/engines/gnap/scenes/scene41.cpp b/engines/gnap/scenes/scene41.cpp index efaf1d9d73..6c50a34706 100644 --- a/engines/gnap/scenes/scene41.cpp +++ b/engines/gnap/scenes/scene41.cpp @@ -66,7 +66,7 @@ int GnapEngine::scene41_init() { } void GnapEngine::scene41_updateHotspots() { - if (isFlag(12)) { + if (isFlag(kGFGnapControlsToyUFO)) { setHotspot(kHSPlatypus, 0, 0, 0, 0, SF_DISABLED); setHotspot(kHSUfoExitLeft, 0, 0, 10, 500, SF_EXIT_L_CURSOR | SF_DISABLED); setHotspot(kHSUfoExitRight, 790, 0, 799, 500, SF_EXIT_R_CURSOR); @@ -88,10 +88,9 @@ void GnapEngine::scene41_updateHotspots() { } void GnapEngine::scene41_run() { - queueInsertDeviceIcon(); - if (isFlag(12)) { + if (isFlag(kGFGnapControlsToyUFO)) { _toyUfoX = 770; if (_toyUfoY < 0 || _toyUfoY > 300) _toyUfoY = 150; @@ -113,7 +112,7 @@ void GnapEngine::scene41_run() { _gameSys->insertSequence(_toyUfoSequenceId | 0x10000, _toyUfoId, 0, 0, kSeqNone, 0, _toyUfoX - 274, _toyUfoY - 128); _gameSys->insertSequence(0x128, 0, 0, 0, kSeqLoop, 0, 0, 0); - if (isFlag(12)) + if (isFlag(kGFGnapControlsToyUFO)) _s41_currKidSequenceId = 0x11B; else _s41_currKidSequenceId = 0x11D; @@ -130,7 +129,7 @@ void GnapEngine::scene41_run() { _gameSys->insertSequence(_s41_currToyVendorSequenceId, 1, 0, 0, kSeqNone, 0, 0, 0); _gameSys->insertSequence(0x127, 2, 0, 0, kSeqNone, 0, 0, 0); - if (isFlag(12)) { + if (isFlag(kGFGnapControlsToyUFO)) { _gnapSequenceId = 0x120; _gnapSequenceDatNum = 0; _gnapIdleFacing = kDirUpRight; @@ -163,11 +162,10 @@ void GnapEngine::scene41_run() { _timers[5] = getRandom(30) + 20; while (!_sceneDone) { - if (!isSoundPlaying(0x1094B)) playSound(0x1094B, 1); - if (!isFlag(12)) { + if (!isFlag(kGFGnapControlsToyUFO)) { _hotspots[kHSToyUfo]._x1 = _toyUfoX - 25; _hotspots[kHSToyUfo]._y1 = _toyUfoY - 20; _hotspots[kHSToyUfo]._x2 = _toyUfoX + 25; @@ -182,7 +180,7 @@ void GnapEngine::scene41_run() { _sceneClickedHotspot = getClickedHotspotId(); updateGrabCursorSprite(0, 0); - if (isFlag(12)) { + if (isFlag(kGFGnapControlsToyUFO)) { switch (_sceneClickedHotspot) { @@ -339,10 +337,9 @@ void GnapEngine::scene41_run() { gnapWalkTo(-1, -1, -1, -1, 1); break; } - } - if (isFlag(12)) { + if (isFlag(kGFGnapControlsToyUFO)) { if (!_timers[9] && _gnapActionStatus < 0) { _gnapActionStatus = kASGiveBackToyUfo; if (_gnapSequenceId == 0x121 || _gnapSequenceId == 0x122) { @@ -356,7 +353,7 @@ void GnapEngine::scene41_run() { if (_mouseClickState._left && _gnapActionStatus < 0) { _mouseClickState._left = false; - if (isFlag(12)) { + if (isFlag(kGFGnapControlsToyUFO)) { int sequenceId; if (_leftClickMouseX >= 400) { if (_gnapSequenceId == 0x11F || _gnapSequenceId == 0x120 || _gnapSequenceId == 0x123 || _gnapSequenceId == 0x126) @@ -389,7 +386,7 @@ void GnapEngine::scene41_run() { if (!_isLeavingScene) { if (_beaverActionStatus < 0) updateBeaverIdleSequence(); - if (_gnapActionStatus < 0 && !isFlag(12)) + if (_gnapActionStatus < 0 && !isFlag(kGFGnapControlsToyUFO)) updateGnapIdleSequence(); if (!_timers[4]) { _timers[4] = getRandom(100) + 100; @@ -412,7 +409,7 @@ void GnapEngine::scene41_run() { if (!_timers[5]) { _timers[5] = getRandom(30) + 20; if (_gnapActionStatus < 0 && _beaverActionStatus < 0 && _toyUfoActionStatus == -1 && _s41_nextKidSequenceId == -1) { - if (isFlag(12)) + if (isFlag(kGFGnapControlsToyUFO)) _s41_nextKidSequenceId = 0x11B; else if (getRandom(3) != 0) _s41_nextKidSequenceId = 0x11D; @@ -481,7 +478,7 @@ void GnapEngine::scene41_updateAnimations() { _s41_nextKidSequenceId = 0x11B; _timers[5] = getRandom(30) + 20; _gnapActionStatus = -1; - setFlag(12); + setFlag(kGFGnapControlsToyUFO); scene41_updateHotspots(); _timers[9] = 600; } @@ -532,7 +529,7 @@ void GnapEngine::scene41_updateAnimations() { _s41_nextKidSequenceId = -1; _timers[5] = getRandom(30) + 20; _gnapActionStatus = -1; - clearFlag(12); + clearFlag(kGFGnapControlsToyUFO); scene41_updateHotspots(); } break; diff --git a/engines/gnap/scenes/scene42.cpp b/engines/gnap/scenes/scene42.cpp index 3aaedc8dc0..94a59e7eb4 100644 --- a/engines/gnap/scenes/scene42.cpp +++ b/engines/gnap/scenes/scene42.cpp @@ -66,7 +66,7 @@ int GnapEngine::scene42_init() { } void GnapEngine::scene42_updateHotspots() { - if (isFlag(12)) { + if (isFlag(kGFGnapControlsToyUFO)) { setHotspot(kHSPlatypus, 0, 0, 0, 0, SF_DISABLED); setHotspot(kHSUfoExitLeft, 0, 0, 10, 599, SF_EXIT_L_CURSOR); setHotspot(kHSUfoExitRight, 790, 0, 799, 599, SF_EXIT_R_CURSOR); @@ -99,7 +99,7 @@ void GnapEngine::scene42_run() { _gameSys->setAnimation(0x14A, 1, 2); _gameSys->insertSequence(_s42_currBBQVendorSequenceId, 1, 0, 0, kSeqNone, 0, 0, 0); - if (isFlag(12)) { + if (isFlag(kGFGnapControlsToyUFO)) { _toyUfoId = 0; _toyUfoActionStatus = -1; if (_prevSceneNum == 43 && isFlag(18)) { @@ -157,7 +157,7 @@ void GnapEngine::scene42_run() { _sceneClickedHotspot = getClickedHotspotId(); updateGrabCursorSprite(0, 0); - if (isFlag(12)) { + if (isFlag(kGFGnapControlsToyUFO)) { switch (_sceneClickedHotspot) { @@ -310,7 +310,7 @@ void GnapEngine::scene42_run() { if (_mouseClickState._left && _gnapActionStatus < 0) { _mouseClickState._left = false; - if (isFlag(12)) { + if (isFlag(kGFGnapControlsToyUFO)) { _toyUfoActionStatus = kASToyUfoRefresh; toyUfoFlyTo(-1, -1, 0, 799, 0, 300, 3); } else { @@ -323,9 +323,9 @@ void GnapEngine::scene42_run() { toyUfoCheckTimer(); if (!_isLeavingScene) { - if (_beaverActionStatus < 0 && !isFlag(12)) + if (_beaverActionStatus < 0 && !isFlag(kGFGnapControlsToyUFO)) updateBeaverIdleSequence(); - if (_gnapActionStatus < 0 && !isFlag(12)) + if (_gnapActionStatus < 0 && !isFlag(kGFGnapControlsToyUFO)) updateGnapIdleSequence(); if (!_timers[4]) { _timers[4] = getRandom(20) + 30; diff --git a/engines/gnap/scenes/scene43.cpp b/engines/gnap/scenes/scene43.cpp index b4fe5bb751..47931857ed 100644 --- a/engines/gnap/scenes/scene43.cpp +++ b/engines/gnap/scenes/scene43.cpp @@ -55,7 +55,7 @@ int GnapEngine::scene43_init() { } void GnapEngine::scene43_updateHotspots() { - if (isFlag(12)) { + if (isFlag(kGFGnapControlsToyUFO)) { setHotspot(kHSPlatypus, 0, 0, 0, 0, SF_DISABLED); setHotspot(kHSUfoExitLeft, 0, 0, 10, 599, SF_EXIT_L_CURSOR); setHotspot(kHSUfoExitRight, 790, 0, 799, 599, SF_EXIT_R_CURSOR); @@ -65,7 +65,7 @@ void GnapEngine::scene43_updateHotspots() { if (isFlag(19)) _hotspots[kHSUfoBucket]._flags = SF_GRAB_CURSOR; // NOTE Bug in the original. Key hotspot wasn't disabled. - if (isFlag(14)) + if (isFlag(kGFUnk14)) _hotspots[kHSUfoKey]._flags = SF_DISABLED; _hotspotsCount = 6; } else { @@ -79,7 +79,7 @@ void GnapEngine::scene43_updateHotspots() { setHotspot(kHSWalkArea1, 0, 0, 800, 445); setHotspot(kHSWalkArea2, 465, 0, 800, 493); setDeviceHotspot(kHSDevice, -1, -1, -1, -1); - if (isFlag(14)) + if (isFlag(kGFUnk14)) _hotspots[kHSKey]._flags = SF_DISABLED; _hotspotsCount = 10; } @@ -89,7 +89,7 @@ void GnapEngine::scene43_run() { queueInsertDeviceIcon(); - if (!isFlag(14)) + if (!isFlag(kGFUnk14)) _gameSys->insertSequence(0x1086F, 1, 0, 0, kSeqNone, 0, 0, 0); _s43_currTwoHeadedGuySequenceId = 0x13C; @@ -98,7 +98,7 @@ void GnapEngine::scene43_run() { _gameSys->setAnimation(0x13C, 1, 2); _gameSys->insertSequence(_s43_currTwoHeadedGuySequenceId, 1, 0, 0, kSeqNone, 0, 0, 0); - if (isFlag(12)) { + if (isFlag(kGFGnapControlsToyUFO)) { _toyUfoId = 0; _toyUfoActionStatus = -1; _toyUfoSequenceId = toyUfoGetSequenceId(); @@ -155,7 +155,7 @@ void GnapEngine::scene43_run() { _sceneClickedHotspot = getClickedHotspotId(); updateGrabCursorSprite(0, 0); - if (isFlag(12)) { + if (isFlag(kGFGnapControlsToyUFO)) { switch (_sceneClickedHotspot) { @@ -306,14 +306,12 @@ void GnapEngine::scene43_run() { if (_gnapActionStatus < 0) gnapWalkTo(-1, -1, -1, -1, 1); break; - } - } if (_mouseClickState._left && _gnapActionStatus < 0) { _mouseClickState._left = false; - if (isFlag(12) && (_toyUfoActionStatus == 5 || _toyUfoActionStatus == -1)) { + if (isFlag(kGFGnapControlsToyUFO) && (_toyUfoActionStatus == 5 || _toyUfoActionStatus == -1)) { _toyUfoActionStatus = 5; toyUfoFlyTo(-1, -1, 0, 799, 0, 300, 3); } else { @@ -326,11 +324,11 @@ void GnapEngine::scene43_run() { toyUfoCheckTimer(); if (!_isLeavingScene) { - if (_beaverActionStatus < 0 && !isFlag(12)) + if (_beaverActionStatus < 0 && !isFlag(kGFGnapControlsToyUFO)) updateBeaverIdleSequence(); - if (_gnapActionStatus < 0 && !isFlag(12)) + if (_gnapActionStatus < 0 && !isFlag(kGFGnapControlsToyUFO)) updateGnapIdleSequence(); - if (!_timers[4] && (!isFlag(12) || !isFlag(19))) { + if (!_timers[4] && (!isFlag(kGFGnapControlsToyUFO) || !isFlag(19))) { _timers[4] = getRandom(100) + 100; if (_gnapActionStatus < 0 && _beaverActionStatus < 0 && _s43_nextTwoHeadedGuySequenceId == -1) { switch (getRandom(5)) { @@ -370,7 +368,7 @@ void GnapEngine::scene43_run() { } if (_newSceneNum == 54) - clearFlag(12); + clearFlag(kGFGnapControlsToyUFO); } @@ -439,7 +437,7 @@ void GnapEngine::scene43_updateAnimations() { case 6: _gameSys->insertSequence(0x10871, _toyUfoId, _toyUfoSequenceId | 0x10000, _toyUfoId, kSeqSyncWait, 0, 0, 0); _gameSys->removeSequence(0x1086F, 1, true); - setFlag(14); + setFlag(kGFUnk14); scene43_updateHotspots(); toyUfoSetStatus(18); _toyUfoSequenceId = 0x871; diff --git a/engines/gnap/scenes/scene44.cpp b/engines/gnap/scenes/scene44.cpp index f6644313c8..6e8a12ada8 100644 --- a/engines/gnap/scenes/scene44.cpp +++ b/engines/gnap/scenes/scene44.cpp @@ -54,7 +54,7 @@ int GnapEngine::scene44_init() { } void GnapEngine::scene44_updateHotspots() { - if (isFlag(12)) { + if (isFlag(kGFGnapControlsToyUFO)) { setHotspot(kHSPlatypus, 0, 0, 0, 0, SF_DISABLED); setHotspot(kHSUfoExitLeft, 0, 0, 10, 599, SF_EXIT_L_CURSOR); setHotspot(kHSUfoExitRight, 790, 0, 799, 599, SF_EXIT_R_CURSOR); @@ -71,7 +71,7 @@ void GnapEngine::scene44_updateHotspots() { setHotspot(kHSWalkArea1, 0, 0, 800, 445); setHotspot(kHSWalkArea2, 617, 0, 800, 600); setDeviceHotspot(kHSDevice, -1, -1, -1, -1); - if (isFlag(13)) + if (isFlag(kGFUnk13)) _hotspots[kHSKissingLady]._flags = SF_DISABLED; if (isFlag(15)) _hotspots[kHSSpring]._flags = SF_DISABLED; @@ -94,7 +94,7 @@ void GnapEngine::scene44_run() { _gameSys->setAnimation(_s44_currSpringGuySequenceId, 1, 4); _gameSys->insertSequence(_s44_currSpringGuySequenceId, 1, 0, 0, kSeqNone, 0, 0, 0); - if (isFlag(13)) { + if (isFlag(kGFUnk13)) { if (_prevSceneNum != 50 || _sceneSavegameLoaded) { _s44_currKissingLadySequenceId = 0xF6; _s44_nextKissingLadySequenceId = -1; @@ -112,7 +112,7 @@ void GnapEngine::scene44_run() { _gameSys->insertSequence(_s44_currKissingLadySequenceId, 1, 0, 0, kSeqNone, 0, 0, 0); - if (isFlag(12)) { + if (isFlag(kGFGnapControlsToyUFO)) { _toyUfoId = 0; _toyUfoActionStatus = -1; _toyUfoSequenceId = toyUfoGetSequenceId(); @@ -144,7 +144,7 @@ void GnapEngine::scene44_run() { initGnapPos(4, 8, kDirBottomRight); if (_sceneSavegameLoaded) { initBeaverPos(_hotspotsWalkPos[4].x, _hotspotsWalkPos[4].y, kDirUnk4); - } else if (!isFlag(13)) { + } else if (!isFlag(kGFUnk13)) { _timers[0] = 50; _timers[1] = 20; _platX = 5; @@ -179,10 +179,8 @@ void GnapEngine::scene44_run() { _sceneClickedHotspot = getClickedHotspotId(); updateGrabCursorSprite(0, 0); - if (isFlag(12)) { - + if (isFlag(kGFGnapControlsToyUFO)) { switch (_sceneClickedHotspot) { - case kHSUfoExitLeft: if (_toyUfoActionStatus < 0) { _isLeavingScene = 1; @@ -351,12 +349,11 @@ void GnapEngine::scene44_run() { break; } - } if (_mouseClickState._left && _gnapActionStatus < 0) { _mouseClickState._left = false; - if (isFlag(12)) { + if (isFlag(kGFGnapControlsToyUFO)) { _toyUfoActionStatus = 7; toyUfoFlyTo(-1, -1, 0, 799, 0, 300, 3); } else { @@ -369,9 +366,9 @@ void GnapEngine::scene44_run() { toyUfoCheckTimer(); if (!_isLeavingScene) { - if (_beaverActionStatus < 0 && !isFlag(12) && _s44_currKissingLadySequenceId != 0xF5) + if (_beaverActionStatus < 0 && !isFlag(kGFGnapControlsToyUFO) && _s44_currKissingLadySequenceId != 0xF5) updateBeaverIdleSequence(); - if (_gnapActionStatus < 0 && !isFlag(12)) + if (_gnapActionStatus < 0 && !isFlag(kGFGnapControlsToyUFO)) updateGnapIdleSequence(); if (!_timers[4]) { _timers[4] = getRandom(20) + 20; diff --git a/engines/gnap/scenes/scene45.cpp b/engines/gnap/scenes/scene45.cpp index 36943623d2..55f6326577 100644 --- a/engines/gnap/scenes/scene45.cpp +++ b/engines/gnap/scenes/scene45.cpp @@ -54,7 +54,7 @@ int GnapEngine::scene45_init() { } void GnapEngine::scene45_updateHotspots() { - if (isFlag(12)) { + if (isFlag(kGFGnapControlsToyUFO)) { setHotspot(kHSPlatypus, 0, 0, 0, 0, SF_DISABLED); setHotspot(kHSUfoExitLeft, 0, 0, 10, 599, SF_EXIT_L_CURSOR); setHotspot(kHSUfoExitRight, 794, 0, 799, 599, SF_EXIT_R_CURSOR | SF_DISABLED); @@ -97,7 +97,7 @@ void GnapEngine::scene45_run() { _gameSys->setAnimation(_s45_currDancerSequenceId, 1, 2); _gameSys->insertSequence(_s45_currDancerSequenceId, 1, 0, 0, kSeqNone, 0, 0, 0); - if (isFlag(12)) { + if (isFlag(kGFGnapControlsToyUFO)) { _toyUfoId = 0; _toyUfoActionStatus = -1; _toyUfoSequenceId = toyUfoGetSequenceId(); @@ -138,7 +138,7 @@ void GnapEngine::scene45_run() { gnapWalkTo(2, 7, -1, 0x107B9, 1); } - if (!isFlag(21) && !isFlag(12)) { + if (!isFlag(21) && !isFlag(kGFGnapControlsToyUFO)) { setFlag(21); setGrabCursorSprite(-1); _gameSys->setAnimation(0x9D, _gnapId, 0); @@ -193,7 +193,7 @@ void GnapEngine::scene45_run() { _sceneClickedHotspot = getClickedHotspotId(); updateGrabCursorSprite(0, 0); - if (isFlag(12)) { + if (isFlag(kGFGnapControlsToyUFO)) { switch (_sceneClickedHotspot) { @@ -328,7 +328,7 @@ void GnapEngine::scene45_run() { if (_mouseClickState._left && _gnapActionStatus < 0) { _mouseClickState._left = false; - if (isFlag(12)) { + if (isFlag(kGFGnapControlsToyUFO)) { _toyUfoActionStatus = 3; toyUfoFlyTo(-1, -1, 0, 799, 0, 300, 5); } else { @@ -339,7 +339,7 @@ void GnapEngine::scene45_run() { scene45_updateAnimations(); toyUfoCheckTimer(); - if (!_isLeavingScene && _gnapActionStatus < 0 && !isFlag(12)) + if (!_isLeavingScene && _gnapActionStatus < 0 && !isFlag(kGFGnapControlsToyUFO)) updateGnapIdleSequence(); checkGameKeys(); diff --git a/engines/gnap/scenes/scene46.cpp b/engines/gnap/scenes/scene46.cpp index f7fdc87efd..29a8608273 100644 --- a/engines/gnap/scenes/scene46.cpp +++ b/engines/gnap/scenes/scene46.cpp @@ -53,7 +53,7 @@ int GnapEngine::scene46_init() { } void GnapEngine::scene46_updateHotspots() { - if (isFlag(12)) { + if (isFlag(kGFGnapControlsToyUFO)) { setHotspot(kHSPlatypus, 0, 0, 0, 0, SF_DISABLED); setHotspot(kHSUfoExitLeft, 0, 0, 10, 599, SF_EXIT_L_CURSOR); setHotspot(kHSUfoExitRight, 790, 0, 799, 599, SF_EXIT_R_CURSOR); @@ -88,7 +88,7 @@ void GnapEngine::scene46_run() { _gameSys->setAnimation(0x47, 1, 4); _gameSys->insertSequence(_s46_currItchyGuySequenceId, 1, 0, 0, kSeqNone, 0, 0, 0); - if (isFlag(12)) { + if (isFlag(kGFGnapControlsToyUFO)) { _toyUfoId = 0; _toyUfoActionStatus = -1; _toyUfoSequenceId = toyUfoGetSequenceId(); @@ -136,7 +136,7 @@ void GnapEngine::scene46_run() { _sceneClickedHotspot = getClickedHotspotId(); updateGrabCursorSprite(0, 0); - if (isFlag(12)) { + if (isFlag(kGFGnapControlsToyUFO)) { switch (_sceneClickedHotspot) { @@ -268,7 +268,7 @@ void GnapEngine::scene46_run() { if (_mouseClickState._left && _gnapActionStatus < 0) { _mouseClickState._left = false; - if (isFlag(12)) { + if (isFlag(kGFGnapControlsToyUFO)) { _toyUfoActionStatus = 4; toyUfoFlyTo(-1, -1, 0, 799, 0, 300, 2); } else { @@ -281,9 +281,9 @@ void GnapEngine::scene46_run() { toyUfoCheckTimer(); if (!_isLeavingScene) { - if (_beaverActionStatus < 0 && !isFlag(12)) + if (_beaverActionStatus < 0 && !isFlag(kGFGnapControlsToyUFO)) updateBeaverIdleSequence(); - if (_gnapActionStatus < 0 && !isFlag(12)) + if (_gnapActionStatus < 0 && !isFlag(kGFGnapControlsToyUFO)) updateGnapIdleSequence(); if (!_timers[4]) { _timers[4] = getRandom(50) + 80; diff --git a/engines/gnap/scenes/scene50.cpp b/engines/gnap/scenes/scene50.cpp index cd5b700b9f..2ec842af7a 100644 --- a/engines/gnap/scenes/scene50.cpp +++ b/engines/gnap/scenes/scene50.cpp @@ -61,7 +61,7 @@ void GnapEngine::scene50_playWinAnim(int tongueNum, bool fightOver) { scene50_waitForAnim(6); scene50_waitForAnim(5); invAdd(kItemGum); - setFlag(13); + setFlag(kGFUnk13); } else { _gameSys->insertSequence(0xB4, 100, _s50_leftTongueSequenceId, _s50_leftTongueId, kSeqSyncWait, 0, 0, 0); _gameSys->insertSequence(0xBD, 100, _s50_rightTongueSequenceId, _s50_rightTongueId, kSeqSyncWait, 0, 0, 0); diff --git a/engines/gnap/scenes/scenecore.cpp b/engines/gnap/scenes/scenecore.cpp index 734c7371a9..20d591fa9f 100644 --- a/engines/gnap/scenes/scenecore.cpp +++ b/engines/gnap/scenes/scenecore.cpp @@ -588,7 +588,7 @@ void GnapEngine::runSceneLogic() { } else if (_prevSceneNum == 13) { scene47_initCutscene2(); _newSceneNum = 11; - } else if (!isFlag(10) && _prevSceneNum == 2) {//CHECKME + } else if (!isFlag(kGFPlatyPussDisguised) && _prevSceneNum == 2) {//CHECKME if (isFlag(25)) { scene47_initCutscene3(); _newSceneNum = 2; @@ -604,7 +604,7 @@ void GnapEngine::runSceneLogic() { } else if (_prevSceneNum == 30) { scene47_initCutscene6(); _newSceneNum = 26; - } else if (isFlag(10) && _cursorValue == 1) { + } else if (isFlag(kGFPlatyPussDisguised) && _cursorValue == 1) { scene47_initCutscene7(); _newSceneNum = 4; } |