aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStrangerke2016-04-10 11:44:38 +0200
committerEugene Sandulenko2016-05-10 09:54:21 +0200
commit6a55da1504b54d4ac16dcccd3fd6c9811d6e3620 (patch)
tree9e0891652d100d2fb84ae70feadd17aefc662f67
parente11ec6a9c18ec908780b30b0a5f54d271904ea8b (diff)
downloadscummvm-rg350-6a55da1504b54d4ac16dcccd3fd6c9811d6e3620.tar.gz
scummvm-rg350-6a55da1504b54d4ac16dcccd3fd6c9811d6e3620.tar.bz2
scummvm-rg350-6a55da1504b54d4ac16dcccd3fd6c9811d6e3620.zip
GNAP: Replace flags values by enums (WIP)
-rw-r--r--engines/gnap/gnap.cpp20
-rw-r--r--engines/gnap/gnap.h33
-rw-r--r--engines/gnap/scenes/scene01.cpp22
-rw-r--r--engines/gnap/scenes/scene02.cpp30
-rw-r--r--engines/gnap/scenes/scene03.cpp38
-rw-r--r--engines/gnap/scenes/scene04.cpp30
-rw-r--r--engines/gnap/scenes/scene05.cpp32
-rw-r--r--engines/gnap/scenes/scene06.cpp10
-rw-r--r--engines/gnap/scenes/scene07.cpp6
-rw-r--r--engines/gnap/scenes/scene08.cpp6
-rw-r--r--engines/gnap/scenes/scene10.cpp14
-rw-r--r--engines/gnap/scenes/scene12.cpp2
-rw-r--r--engines/gnap/scenes/scene14.cpp12
-rw-r--r--engines/gnap/scenes/scene17.cpp16
-rw-r--r--engines/gnap/scenes/scene18.cpp16
-rw-r--r--engines/gnap/scenes/scene21.cpp20
-rw-r--r--engines/gnap/scenes/scene25.cpp4
-rw-r--r--engines/gnap/scenes/scene27.cpp5
-rw-r--r--engines/gnap/scenes/scene28.cpp4
-rw-r--r--engines/gnap/scenes/scene47.cpp4
-rw-r--r--engines/gnap/scenes/scenecore.cpp4
21 files changed, 177 insertions, 151 deletions
diff --git a/engines/gnap/gnap.cpp b/engines/gnap/gnap.cpp
index ce9e680ee3..fad1e57841 100644
--- a/engines/gnap/gnap.cpp
+++ b/engines/gnap/gnap.cpp
@@ -455,7 +455,7 @@ void GnapEngine::updateMouseCursor() {
_mouseClickState._right = false;
_timers[3] = 300;
_verbCursor = (_verbCursor + 1) % 4;
- if (!isFlag(0) && _verbCursor == PLAT_CURSOR && _cursorValue == 1)
+ if (!isFlag(kGFPlatypus) && _verbCursor == PLAT_CURSOR && _cursorValue == 1)
_verbCursor = (_verbCursor + 1) % 4;
if (!_isWaiting)
setCursor(kDisabledCursors[_verbCursor]);
@@ -688,20 +688,20 @@ void GnapEngine::initGameFlags(int num) {
invAdd(kItemHorn);
invAdd(kItemLightbulb);
clearFlags();
- setFlag(0);
- setFlag(1);
- setFlag(2);
- setFlag(3);
- setFlag(4);
- setFlag(5);
- setFlag(6);
- setFlag(7);
+ setFlag(kGFPlatypus);
+ setFlag(kGFMudTaken);
+ setFlag(kGFNeedleTaken);
+ setFlag(kGFTwigTaken);
+ setFlag(kGFUnk04);
+ setFlag(kGFKeysTaken);
+ setFlag(kGFGrassTaken);
+ setFlag(kGFBarnPadlockOpen);
break;
}
//DEBUG!
#if 0
-// setFlag(0); // Enable platypus
+// setFlag(kGFPlatypus); // Enable platypus
setFlag(25);
invClear();
invAdd(kItemMagazine);
diff --git a/engines/gnap/gnap.h b/engines/gnap/gnap.h
index fa33d42dad..75f931d1fa 100644
--- a/engines/gnap/gnap.h
+++ b/engines/gnap/gnap.h
@@ -169,9 +169,36 @@ enum {
enum {
kGFPlatypus = 0,
kGFMudTaken = 1,
-
-
- kGFEnd
+ kGFNeedleTaken = 2,
+ kGFTwigTaken = 3,
+ kGFUnk04 = 4,
+ kGFKeysTaken = 5,
+ kGFGrassTaken = 6,
+ kGFBarnPadlockOpen = 7,
+ kGFTruckFilledWithGas = 8,
+ kGFTruckKeysUsed = 9,
+ kGFPlatyPussDisguised = 10,
+ kGFSceneFlag1 = 11,
+ kGFGnapControlsToyUFO = 12,
+ kGFUnk13 = 13,
+ kGFUnk14 = 14,
+ kGFSpringTaken = 15,
+ kGFUnk16 = 16,
+ kGFJointTaken = 17,
+ kGFUnk18 = 18,
+ kGFGroceryStoreHatTaken = 19,
+ kGFPictureTaken = 20,
+ kGFUnk21 = 21,
+ kGFUnk22 = 22,
+ kGFUnk23 = 23,
+ kGFUnk24 = 24,
+ kGFUnk25 = 25,
+ kGFPlatypusTalkingToAssistant = 26,
+ kGFUnk27 = 27,
+ kGFUnk28 = 28,
+ kGFGasTaken = 29,
+ kGFUnk30 = 30,
+ kGFUnk31 = 31
};
/*
diff --git a/engines/gnap/scenes/scene01.cpp b/engines/gnap/scenes/scene01.cpp
index 1d4bfee7be..bb7315c90c 100644
--- a/engines/gnap/scenes/scene01.cpp
+++ b/engines/gnap/scenes/scene01.cpp
@@ -73,9 +73,9 @@ void GnapEngine::scene01_updateHotspots() {
setHotspot(kHSWalkArea7, 0, 0, 520, 351);
setHotspot(kHSWalkArea8, 0, 546, 300, 600);
setDeviceHotspot(kHSDevice, -1, -1, -1, -1);
- if (isFlag(0))
+ if (isFlag(kGFPlatypus))
_hotspots[kHSPlatypus]._flags = SF_WALKABLE | SF_TALK_CURSOR | SF_GRAB_CURSOR | SF_LOOK_CURSOR;
- if (isFlag(1))
+ if (isFlag(kGFMudTaken))
_hotspots[kHSMud]._flags = SF_WALKABLE | SF_DISABLED;
_hotspotsCount = 14;
}
@@ -95,22 +95,22 @@ void GnapEngine::scene01_run() {
_timers[4] = getRandom(100) + 300;
- if (!isFlag(1))
+ if (!isFlag(kGFMudTaken))
_gameSys->insertSequence(129, 40, 0, 0, kSeqNone, 0, 0, 0);
queueInsertDeviceIcon();
if (_prevSceneNum == 2) {
initGnapPos(11, 6, kDirBottomLeft);
- if (isFlag(0))
+ if (isFlag(kGFPlatypus))
initBeaverPos(12, 6, kDirUnk4);
endSceneInit();
- if (isFlag(0))
+ if (isFlag(kGFPlatypus))
platypusWalkTo(9, 6, -1, 0x107C2, 1);
gnapWalkTo(8, 6, -1, 0x107B9, 1);
} else {
initGnapPos(1, 6, kDirBottomRight);
- if (isFlag(0))
+ if (isFlag(kGFPlatypus))
initBeaverPos(1, 7, kDirNone);
endSceneInit();
}
@@ -134,7 +134,7 @@ void GnapEngine::scene01_run() {
break;
case kHSPlatypus:
- if (_gnapActionStatus < 0 && isFlag(0)) {
+ if (_gnapActionStatus < 0 && isFlag(kGFPlatypus)) {
if (_grabCursorSpriteIndex == kItemDisguise) {
gnapUseDisguiseOnPlatypus();
} else if (_grabCursorSpriteIndex >= 0) {
@@ -142,7 +142,7 @@ void GnapEngine::scene01_run() {
} else {
switch (_verbCursor) {
case LOOK_CURSOR:
- if (isFlag(5))
+ if (isFlag(kGFKeysTaken))
playGnapMoan1(_platX, _platY);
else
playGnapScratchingHead(_platX, _platY);
@@ -239,7 +239,7 @@ void GnapEngine::scene01_run() {
_isLeavingScene = true;
gnapWalkTo(_hotspotsWalkPos[1].x, _hotspotsWalkPos[1].y, 0, 0x107AB, 1);
_gnapActionStatus = kASLeaveScene;
- if (isFlag(0))
+ if (isFlag(kGFPlatypus))
platypusWalkTo(_hotspotsWalkPos[1].x, _hotspotsWalkPos[1].y + 1, -1, 0x107CD, 1);
_newSceneNum = 2;
}
@@ -272,7 +272,7 @@ void GnapEngine::scene01_run() {
playSound(0x1091C, 1);
if (!_isLeavingScene) {
- if (_beaverActionStatus < 0 && isFlag(0))
+ if (_beaverActionStatus < 0 && isFlag(kGFPlatypus))
updateBeaverIdleSequence();
if (_gnapActionStatus < 0)
updateGnapIdleSequence();
@@ -347,7 +347,7 @@ void GnapEngine::scene01_updateAnimations() {
_gameSys->setAnimation(0, 0, 3);
invAdd(kItemMud);
setGrabCursorSprite(kItemMud);
- setFlag(1);
+ setFlag(kGFMudTaken);
scene01_updateHotspots();
}
diff --git a/engines/gnap/scenes/scene02.cpp b/engines/gnap/scenes/scene02.cpp
index 65018e0435..0688b29dfe 100644
--- a/engines/gnap/scenes/scene02.cpp
+++ b/engines/gnap/scenes/scene02.cpp
@@ -78,7 +78,7 @@ void GnapEngine::scene02_updateHotspots() {
setHotspot(kHSWalkArea3, 0, 0, 386, 445);
setHotspot(kHSWalkArea4, 386, 0, 509, 410);
setDeviceHotspot(kHSDevice, -1, -1, -1, -1);
- if (isFlag(0))
+ if (isFlag(kGFPlatypus))
_hotspots[kHSPlatypus]._flags = SF_WALKABLE | SF_TALK_CURSOR | SF_GRAB_CURSOR | SF_LOOK_CURSOR;
_hotspotsCount = 14;
}
@@ -100,20 +100,20 @@ void GnapEngine::scene02_run() {
switch (_prevSceneNum) {
case 3:
initGnapPos(11, 6, kDirBottomLeft);
- if (isFlag(0))
+ if (isFlag(kGFPlatypus))
initBeaverPos(12, 6, kDirUnk4);
endSceneInit();
- if (isFlag(0))
+ if (isFlag(kGFPlatypus))
platypusWalkTo(9, 6, -1, 0x107C2, 1);
gnapWalkTo(8, 6, -1, 0x107BA, 1);
break;
case 4:
initGnapPos(_hotspotsWalkPos[6].x, _hotspotsWalkPos[6].y, kDirBottomLeft);
- if (isFlag(0))
+ if (isFlag(kGFPlatypus))
initBeaverPos(_hotspotsWalkPos[6].x + 1, _hotspotsWalkPos[6].y, kDirUnk4);
endSceneInit();
gnapWalkTo(7, 6, 0, 0x107B9, 1);
- if (isFlag(0))
+ if (isFlag(kGFPlatypus))
platypusWalkTo(8, 6, 1, 0x107C2, 1);
scene02_updateHotspots();
_gameSys->waitForUpdate();
@@ -126,16 +126,16 @@ void GnapEngine::scene02_run() {
break;
case 49:
initGnapPos(5, 6, kDirBottomRight);
- if (isFlag(0))
+ if (isFlag(kGFPlatypus))
initBeaverPos(6, 7, kDirNone);
endSceneInit();
break;
default:
initGnapPos(-1, 6, kDirBottomRight);
- if (isFlag(0))
+ if (isFlag(kGFPlatypus))
initBeaverPos(-1, 7, kDirNone);
endSceneInit();
- if (isFlag(0))
+ if (isFlag(kGFPlatypus))
platypusWalkTo(2, 7, -1, 0x107C2, 1);
gnapWalkTo(2, 8, -1, 0x107B9, 1);
break;
@@ -162,7 +162,7 @@ void GnapEngine::scene02_run() {
break;
case kHSPlatypus:
- if (_gnapActionStatus < 0 && isFlag(0)) {
+ if (_gnapActionStatus < 0 && isFlag(kGFPlatypus)) {
if (_grabCursorSpriteIndex == kItemDisguise) {
gnapUseDisguiseOnPlatypus();
} else if (_grabCursorSpriteIndex >= 0) {
@@ -170,7 +170,7 @@ void GnapEngine::scene02_run() {
} else {
switch (_verbCursor) {
case LOOK_CURSOR:
- if (isFlag(5))
+ if (isFlag(kGFKeysTaken))
playGnapMoan1(_platX, _platY);
else
playGnapScratchingHead(_platX, _platY);
@@ -299,7 +299,7 @@ void GnapEngine::scene02_run() {
_isLeavingScene = 1;
gnapWalkTo(_hotspotsWalkPos[6].x, _hotspotsWalkPos[6].y, 0, 0x107AD, 1);
_gnapActionStatus = kASLeaveScene;
- if (isFlag(0))
+ if (isFlag(kGFPlatypus))
platypusWalkTo(_hotspotsWalkPos[6].x + 1, _hotspotsWalkPos[6].y, -1, 0x107C1, 1);
scene02_updateHotspots();
_newSceneNum = 4;
@@ -311,7 +311,7 @@ void GnapEngine::scene02_run() {
_isLeavingScene = 1;
gnapWalkTo(_hotspotsWalkPos[7].x, _hotspotsWalkPos[7].y, 0, 0x107AD, 1);
_gnapActionStatus = kASLeaveScene;
- if (isFlag(0))
+ if (isFlag(kGFPlatypus))
platypusWalkTo(_hotspotsWalkPos[7].x + 1, _hotspotsWalkPos[7].y, -1, 0x107C1, 1);
scene02_updateHotspots();
_newSceneNum = 5;
@@ -323,7 +323,7 @@ void GnapEngine::scene02_run() {
_isLeavingScene = 1;
gnapWalkTo(_hotspotsWalkPos[8].x, _hotspotsWalkPos[8].y, 0, 0x107AB, 1);
_gnapActionStatus = kASLeaveScene;
- if (isFlag(0))
+ if (isFlag(kGFPlatypus))
platypusWalkTo(_hotspotsWalkPos[8].x, _hotspotsWalkPos[8].y, -1, 0x107CD, 1);
_newSceneNum = 3;
}
@@ -334,7 +334,7 @@ void GnapEngine::scene02_run() {
_isLeavingScene = 1;
gnapWalkTo(_hotspotsWalkPos[9].x, _hotspotsWalkPos[9].y, 0, 0x107AF, 1);
_gnapActionStatus = kASLeaveScene;
- if (isFlag(0))
+ if (isFlag(kGFPlatypus))
platypusWalkTo(_hotspotsWalkPos[9].x, _hotspotsWalkPos[9].y, -1, 0x107CF, 1);
_newSceneNum = 1;
}
@@ -363,7 +363,7 @@ void GnapEngine::scene02_run() {
playSound(0x1091C, 1);
if (!_isLeavingScene) {
- if (_beaverActionStatus < 0 && isFlag(0))
+ if (_beaverActionStatus < 0 && isFlag(kGFPlatypus))
updateBeaverIdleSequence();
if (_gnapActionStatus < 0)
updateGnapIdleSequence();
diff --git a/engines/gnap/scenes/scene03.cpp b/engines/gnap/scenes/scene03.cpp
index 930554c3ac..50c985c543 100644
--- a/engines/gnap/scenes/scene03.cpp
+++ b/engines/gnap/scenes/scene03.cpp
@@ -69,13 +69,13 @@ void GnapEngine::scene03_updateHotspots() {
setHotspot(kHSPlatypusWalkArea, 235, 0, 800, 600);
setHotspot(kHSWalkAreas3, 0, 0, 800, 354);
setDeviceHotspot(kHSDevice, -1, -1, -1, -1);
- if (isFlag(0))
+ if (isFlag(kGFPlatypus))
_hotspots[kHSPlatypus]._flags = SF_WALKABLE | SF_TALK_CURSOR | SF_GRAB_CURSOR | SF_LOOK_CURSOR;
- if (isFlag(6))
+ if (isFlag(kGFGrassTaken))
_hotspots[kHSGrass]._flags = SF_WALKABLE | SF_DISABLED;
- if (isFlag(0))
+ if (isFlag(kGFPlatypus))
_hotspots[kHSTrappedPlatypus]._flags = SF_DISABLED;
- if (isFlag(0) || _s03_platypusHypnotized)
+ if (isFlag(kGFPlatypus) || _s03_platypusHypnotized)
_hotspots[kHSPlatypusWalkArea]._flags |= SF_WALKABLE;
_hotspotsCount = 10;
}
@@ -103,7 +103,7 @@ void GnapEngine::scene03_run() {
_timers[4] = getRandom(100) + 300;
_timers[5] = getRandom(100) + 200;
- if (isFlag(0)) {
+ if (isFlag(kGFPlatypus)) {
initBeaverPos(5, 4, kDirNone);
} else {
_timers[1] = getRandom(40) + 20;
@@ -115,14 +115,14 @@ void GnapEngine::scene03_run() {
_gameSys->insertSequence(0x1C4, 255, 0, 0, kSeqNone, 0, 0, 0);
- if (!isFlag(6))
+ if (!isFlag(kGFGrassTaken))
_gameSys->insertSequence(0x1B2, 253, 0, 0, kSeqNone, 0, 0, 0);
queueInsertDeviceIcon();
endSceneInit();
- if (isFlag(0))
+ if (isFlag(kGFPlatypus))
platypusWalkTo(4, 7, -1, 0x107C2, 1);
gnapWalkTo(3, 6, -1, 0x107B9, 1);
@@ -137,7 +137,7 @@ void GnapEngine::scene03_run() {
switch (_sceneClickedHotspot) {
case kHSPlatypus:
- if (_gnapActionStatus < 0 && isFlag(0)) {
+ if (_gnapActionStatus < 0 && isFlag(kGFPlatypus)) {
if (_grabCursorSpriteIndex == kItemDisguise) {
gnapUseDisguiseOnPlatypus();
} else if (_grabCursorSpriteIndex >= 0) {
@@ -145,7 +145,7 @@ void GnapEngine::scene03_run() {
} else {
switch (_verbCursor) {
case LOOK_CURSOR:
- if (isFlag(5))
+ if (isFlag(kGFKeysTaken))
playGnapMoan1(_platX, _platY);
else
playGnapScratchingHead(_platX, _platY);
@@ -167,7 +167,7 @@ void GnapEngine::scene03_run() {
case kHSGrass:
if (_gnapActionStatus < 0) {
- if (isFlag(6)) {
+ if (isFlag(kGFGrassTaken)) {
gnapWalkTo(-1, -1, -1, -1, 1);
} else if (_grabCursorSpriteIndex >= 0) {
playGnapShowItem(_grabCursorSpriteIndex, 9, 6);
@@ -198,7 +198,7 @@ void GnapEngine::scene03_run() {
_hotspots[kHSPlatypusWalkArea]._flags |= SF_WALKABLE;
gnapWalkTo(_hotspotsWalkPos[2].x, _hotspotsWalkPos[2].y, 0, 0x107AD, 1);
_gnapActionStatus = kASLeaveScene;
- if (isFlag(0))
+ if (isFlag(kGFPlatypus))
platypusWalkTo(_hotspotsWalkPos[2].x, _hotspotsWalkPos[2].y, -1, 0x107C2, 1);
_hotspots[kHSPlatypusWalkArea]._flags &= ~SF_WALKABLE;
if (_cursorValue == 1)
@@ -218,11 +218,11 @@ void GnapEngine::scene03_run() {
playGnapMoan2(2, 8);
break;
case GRAB_CURSOR:
- if (!isFlag(0))
+ if (!isFlag(kGFPlatypus))
_hotspots[kHSPlatypusWalkArea]._flags |= SF_WALKABLE;
if (gnapWalkTo(_hotspotsWalkPos[3].x, _hotspotsWalkPos[3].y, 0, getGnapSequenceId(gskIdle, _hotspotsWalkPos[3].x + 1, _hotspotsWalkPos[3].y + 1) | 0x10000, 1))
_gnapActionStatus = kASGrabCreek;
- if (!isFlag(0))
+ if (!isFlag(kGFPlatypus))
_hotspots[kHSPlatypusWalkArea]._flags &= ~SF_WALKABLE;
break;
case TALK_CURSOR:
@@ -236,7 +236,7 @@ void GnapEngine::scene03_run() {
case kHSTrappedPlatypus:
if (_gnapActionStatus < 0) {
- if (isFlag(0)) {
+ if (isFlag(kGFPlatypus)) {
gnapWalkTo(-1, -1, -1, -1, 1);
} else if (_grabCursorSpriteIndex >= 0) {
playGnapShowItem(_grabCursorSpriteIndex, 8, 4);
@@ -293,7 +293,7 @@ void GnapEngine::scene03_run() {
case kHSPlatypusWalkArea:
if (_gnapActionStatus < 0) {
- if (isFlag(0) || _s03_platypusHypnotized) {
+ if (isFlag(kGFPlatypus) || _s03_platypusHypnotized) {
gnapWalkTo(-1, -1, -1, -1, 1);
} else {
gnapWalkTo(_hotspotsWalkPos[4].x, _hotspotsWalkPos[4].y, 0, 0x107B5, 1);
@@ -320,13 +320,13 @@ void GnapEngine::scene03_run() {
playSound(0x10925, 1);
if (!_isLeavingScene) {
- if (_beaverActionStatus < 0 && isFlag(0))
+ if (_beaverActionStatus < 0 && isFlag(kGFPlatypus))
updateBeaverIdleSequence();
if (_gnapActionStatus < 0)
updateGnapIdleSequence();
if (!_timers[1] && !_s03_platypusScared) {
_timers[1] = getRandom(40) + 20;
- if (_gnapActionStatus < 0 && _beaverActionStatus < 0 && !isFlag(0) && !_s03_platypusHypnotized)
+ if (_gnapActionStatus < 0 && _beaverActionStatus < 0 && !isFlag(kGFPlatypus) && !_s03_platypusHypnotized)
_s03_nextPlatSequenceId = 450;
}
if (!_timers[6]) {
@@ -393,7 +393,7 @@ void GnapEngine::scene03_updateAnimations() {
_gameSys->insertSequence(0x1B7, 99, 0, 0, kSeqNone, 0, 0, 0);
_beaverSequenceDatNum = 1;
_beaverSequenceId = 0x7CA;
- setFlag(0);
+ setFlag(kGFPlatypus);
_s03_nextPlatSequenceId = -1;
scene03_updateHotspots();
break;
@@ -508,7 +508,7 @@ void GnapEngine::scene03_updateAnimations() {
_gameSys->setAnimation(0, 0, 5);
invAdd(kItemGrass);
setGrabCursorSprite(kItemGrass);
- setFlag(6);
+ setFlag(kGFGrassTaken);
scene03_updateHotspots();
}
diff --git a/engines/gnap/scenes/scene04.cpp b/engines/gnap/scenes/scene04.cpp
index ec3f482ac0..8022625154 100644
--- a/engines/gnap/scenes/scene04.cpp
+++ b/engines/gnap/scenes/scene04.cpp
@@ -73,9 +73,9 @@ void GnapEngine::scene04_updateHotspots() {
setHotspot(kHSWalkArea1, 0, 0, 562, 461);
setHotspot(kHSWalkArea2, 562, 0, 800, 500);
setDeviceHotspot(kHSDevice, -1, -1, -1, -1);
- if (isFlag(0))
+ if (isFlag(kGFPlatypus))
_hotspots[kHSPlatypus]._flags = SF_WALKABLE | SF_TALK_CURSOR | SF_GRAB_CURSOR | SF_LOOK_CURSOR;
- if (isFlag(3))
+ if (isFlag(kGFTwigTaken))
_hotspots[kHSTwig]._flags = SF_WALKABLE | SF_DISABLED;
if (isFlag(26) || _cursorValue == 1)
_hotspots[kHSAxe]._flags = SF_DISABLED;
@@ -102,7 +102,7 @@ void GnapEngine::scene04_run() {
if (!isFlag(26) && _cursorValue == 4)
_gameSys->insertSequence(0x212, 100, 0, 0, kSeqNone, 0, 0, 0);
- if (!isFlag(3))
+ if (!isFlag(kGFTwigTaken))
_gameSys->insertSequence(0x1FE, 100, 0, 0, kSeqNone, 0, 0, 0);
queueInsertDeviceIcon();
@@ -124,7 +124,7 @@ void GnapEngine::scene04_run() {
endSceneInit();
invRemove(kItemDisguise);
invAdd(kItemKeys);
- setFlag(5);
+ setFlag(kGFKeysTaken);
clearFlag(10);
_beaverSequenceId = 0x20C;
_beaverSequenceDatNum = 0;
@@ -136,10 +136,10 @@ void GnapEngine::scene04_run() {
_gameSys->insertSequence(0x209, 121, 0, 0, kSeqNone, 0, 0, 0);
if (_prevSceneNum == 2) {
initGnapPos(5, 11, kDirUpRight);
- if (isFlag(0))
+ if (isFlag(kGFPlatypus))
initBeaverPos(6, 11, kDirUpLeft);
endSceneInit();
- if (isFlag(0))
+ if (isFlag(kGFPlatypus))
platypusWalkTo(5, 8, -1, 0x107C2, 1);
gnapWalkTo(6, 9, -1, 0x107BA, 1);
} else if (_prevSceneNum == 38) {
@@ -148,10 +148,10 @@ void GnapEngine::scene04_run() {
endSceneInit();
} else {
initGnapPos(12, 9, kDirBottomRight);
- if (isFlag(0))
+ if (isFlag(kGFPlatypus))
initBeaverPos(12, 8, kDirNone);
endSceneInit();
- if (isFlag(0))
+ if (isFlag(kGFPlatypus))
platypusWalkTo(9, 8, -1, 0x107C2, 1);
gnapWalkTo(9, 9, -1, 0x107BA, 1);
}
@@ -177,7 +177,7 @@ void GnapEngine::scene04_run() {
break;
case kHSPlatypus:
- if (_gnapActionStatus < 0 && isFlag(0)) {
+ if (_gnapActionStatus < 0 && isFlag(kGFPlatypus)) {
if (_grabCursorSpriteIndex == kItemDisguise) {
gnapUseDisguiseOnPlatypus();
} else if (_grabCursorSpriteIndex >= 0) {
@@ -185,7 +185,7 @@ void GnapEngine::scene04_run() {
} else {
switch (_verbCursor) {
case LOOK_CURSOR:
- if (isFlag(5))
+ if (isFlag(kGFKeysTaken))
playGnapMoan1(_platX, _platY);
else
playGnapScratchingHead(_platX, _platY);
@@ -325,7 +325,7 @@ void GnapEngine::scene04_run() {
_isLeavingScene = 1;
gnapWalkTo(_hotspotsWalkPos[5].x, _hotspotsWalkPos[5].y, 0, 0x107AE, 1);
_gnapActionStatus = kASLeaveScene;
- if (isFlag(0))
+ if (isFlag(kGFPlatypus))
platypusWalkTo(_hotspotsWalkPos[5].x, _hotspotsWalkPos[5].y, -1, 0x107C7, 1);
if (_cursorValue == 1)
_newSceneNum = 2;
@@ -338,7 +338,7 @@ void GnapEngine::scene04_run() {
if (_gnapActionStatus < 0) {
if (_grabCursorSpriteIndex >= 0) {
playGnapShowCurrItem(_hotspotsWalkPos[_sceneClickedHotspot].x, _hotspotsWalkPos[_sceneClickedHotspot].y, 2, 3);
- } else if (isFlag(5)) {
+ } else if (isFlag(kGFKeysTaken)) {
playGnapImpossible(0, 0);
} else {
switch (_verbCursor) {
@@ -369,7 +369,7 @@ void GnapEngine::scene04_run() {
_isLeavingScene = 1;
gnapWalkTo(_hotspotsWalkPos[8].x, _hotspotsWalkPos[8].y, 0, 0x107AB, 1);
_gnapActionStatus = kASLeaveScene;
- if (isFlag(0))
+ if (isFlag(kGFPlatypus))
platypusWalkTo(_hotspotsWalkPos[8].x, _hotspotsWalkPos[8].y + 1, -1, 0x107C1, 1);
if (_cursorValue == 1)
_newSceneNum = 5;
@@ -399,7 +399,7 @@ void GnapEngine::scene04_run() {
playSound(0x1091C, 1);
if (!_isLeavingScene) {
- if (_beaverActionStatus < 0 && isFlag(0))
+ if (_beaverActionStatus < 0 && isFlag(kGFPlatypus))
beaverSub426234();
if (_gnapActionStatus < 0)
updateGnapIdleSequence2();
@@ -537,7 +537,7 @@ void GnapEngine::scene04_updateAnimations() {
_gameSys->setAnimation(0, 0, 2);
invAdd(kItemTwig);
setGrabCursorSprite(kItemTwig);
- setFlag(3);
+ setFlag(kGFTwigTaken);
scene04_updateHotspots();
}
diff --git a/engines/gnap/scenes/scene05.cpp b/engines/gnap/scenes/scene05.cpp
index aebd783359..805de4f212 100644
--- a/engines/gnap/scenes/scene05.cpp
+++ b/engines/gnap/scenes/scene05.cpp
@@ -55,7 +55,7 @@ int GnapEngine::scene05_init() {
_gameSys->setAnimation(0, 0, 0);
_gameSys->setAnimation(0, 0, 1);
_gameSys->setAnimation(0, 0, 3);
- return isFlag(7) ? 0x151 : 0x150;
+ return isFlag(kGFBarnPadlockOpen) ? 0x151 : 0x150;
}
void GnapEngine::scene05_updateHotspots() {
@@ -69,9 +69,9 @@ void GnapEngine::scene05_updateHotspots() {
setHotspot(kHSWalkArea2, 422, 0, 800, 487);
setHotspot(kHSWalkArea3, 0, 0, 104, 499);
setDeviceHotspot(kHSDevice, -1, -1, -1, -1);
- if (isFlag(0))
+ if (isFlag(kGFPlatypus))
_hotspots[kHSPlatypus]._flags = SF_WALKABLE | SF_TALK_CURSOR | SF_GRAB_CURSOR | SF_LOOK_CURSOR;
- if (isFlag(7))
+ if (isFlag(kGFBarnPadlockOpen))
_hotspots[kHSPadlock]._flags = SF_EXIT_U_CURSOR;
_hotspotsCount = 10;
}
@@ -90,22 +90,22 @@ void GnapEngine::scene05_run() {
_timers[5] = getRandom(10) + 30;
_timers[6] = getRandom(150) + 300;
- if (isFlag(7))
+ if (isFlag(kGFBarnPadlockOpen))
_gameSys->insertSequence(0x14A, 141, 0, 0, kSeqNone, 0, 0, 0);
queueInsertDeviceIcon();
if (_prevSceneNum != 6 && _prevSceneNum != 36) {
initGnapPos(-1, 8, kDirBottomRight);
- if (isFlag(0))
+ if (isFlag(kGFPlatypus))
initBeaverPos(-1, 9, kDirNone);
endSceneInit();
- if (isFlag(0))
+ if (isFlag(kGFPlatypus))
platypusWalkTo(2, 8, -1, 0x107C2, 1);
gnapWalkTo(2, 9, -1, 0x107B9, 1);
} else {
initGnapPos(6, 8, kDirBottomRight);
- if (isFlag(0))
+ if (isFlag(kGFPlatypus))
initBeaverPos(7, 9, kDirNone);
endSceneInit();
}
@@ -130,7 +130,7 @@ void GnapEngine::scene05_run() {
break;
case kHSPlatypus:
- if (_gnapActionStatus < 0 && isFlag(0)) {
+ if (_gnapActionStatus < 0 && isFlag(kGFPlatypus)) {
if (_grabCursorSpriteIndex == kItemDisguise) {
gnapUseDisguiseOnPlatypus();
} else if (_grabCursorSpriteIndex >= 0) {
@@ -138,7 +138,7 @@ void GnapEngine::scene05_run() {
} else {
switch (_verbCursor) {
case LOOK_CURSOR:
- if (isFlag(5))
+ if (isFlag(kGFKeysTaken))
playGnapMoan1(_platX, _platY);
else
playGnapScratchingHead(_platX, _platY);
@@ -162,7 +162,7 @@ void GnapEngine::scene05_run() {
if (_gnapActionStatus < 0 && _beaverActionStatus < 0) {
if (_grabCursorSpriteIndex >= 0) {
playGnapShowCurrItem(_hotspotsWalkPos[1].x - 2, _hotspotsWalkPos[1].y, 4, 5);
- } else if (isFlag(2)) {
+ } else if (isFlag(kGFNeedleTaken)) {
playGnapImpossible(0, 0);
} else {
switch (_verbCursor) {
@@ -174,7 +174,7 @@ void GnapEngine::scene05_run() {
playGnapImpossible(0, 0);
break;
case PLAT_CURSOR:
- if (isFlag(0)) {
+ if (isFlag(kGFPlatypus)) {
gnapUseDeviceOnBeaver();
if (platypusWalkTo(_hotspotsWalkPos[1].x, _hotspotsWalkPos[1].y, 1, 0x107C2, 1)) {
_beaverActionStatus = kASPlatSearchHaystack;
@@ -246,7 +246,7 @@ void GnapEngine::scene05_run() {
break;
case kHSPadlock:
- if (isFlag(7)) {
+ if (isFlag(kGFBarnPadlockOpen)) {
_isLeavingScene = true;
gnapWalkTo(_hotspotsWalkPos[2].x - 1, _hotspotsWalkPos[2].y + 1, 0, -1, 1);
_gnapActionStatus = kASEnterBarn;
@@ -286,7 +286,7 @@ void GnapEngine::scene05_run() {
_isLeavingScene = true;
gnapWalkTo(_hotspotsWalkPos[4].x, _hotspotsWalkPos[4].y, 0, 0x107AF, 1);
_gnapActionStatus = kASLeaveScene;
- if (isFlag(0))
+ if (isFlag(kGFPlatypus))
platypusWalkTo(_hotspotsWalkPos[4].x, _hotspotsWalkPos[4].y + 1, -1, 0x107C7, 1);
if (_cursorValue == 1)
_newSceneNum = 4;
@@ -320,7 +320,7 @@ void GnapEngine::scene05_run() {
playSound(0x1091C, 1);
if (!_isLeavingScene) {
- if (isFlag(0))
+ if (isFlag(kGFPlatypus))
updateBeaverIdleSequence();
updateGnapIdleSequence();
if (!_timers[5]) {
@@ -375,7 +375,7 @@ void GnapEngine::scene05_updateAnimations() {
_gameSys->insertSequence(0x147, _gnapId, makeRid(_gnapSequenceDatNum, _gnapSequenceId), _gnapId, kSeqSyncWait, 0, 0, 0);
_gnapSequenceId = 0x147;
_gnapSequenceDatNum = 0;
- setFlag(7);
+ setFlag(kGFBarnPadlockOpen);
setFlag(11);
setGrabCursorSprite(-1);
_newSceneNum = 6;
@@ -425,7 +425,7 @@ void GnapEngine::scene05_updateAnimations() {
_beaverSequenceDatNum = 1;
_beaverId = 20 * _platY;
invAdd(kItemNeedle);
- setFlag(2);
+ setFlag(kGFNeedleTaken);
setGrabCursorSprite(kItemNeedle);
showCursor();
_timers[1] = 30;
diff --git a/engines/gnap/scenes/scene06.cpp b/engines/gnap/scenes/scene06.cpp
index 459d449656..8a374e1021 100644
--- a/engines/gnap/scenes/scene06.cpp
+++ b/engines/gnap/scenes/scene06.cpp
@@ -96,7 +96,7 @@ void GnapEngine::scene06_run() {
_timers[4] = getRandom(40) + 25;
- if (isFlag(4))
+ if (isFlag(kGFUnk04))
_gameSys->insertSequence(0xF7, 20, 0, 0, kSeqNone, 0, 0, 0);
else
_gameSys->insertSequence(0xF8, 20, 0, 0, kSeqNone, 0, 0, 0);
@@ -141,7 +141,7 @@ void GnapEngine::scene06_run() {
} else {
switch (_verbCursor) {
case LOOK_CURSOR:
- if (isFlag(5))
+ if (isFlag(kGFKeysTaken))
playGnapMoan1(_platX, _platY);
else
playGnapScratchingHead(_platX, _platY);
@@ -171,7 +171,7 @@ void GnapEngine::scene06_run() {
playGnapScratchingHead(5, 0);
break;
case GRAB_CURSOR:
- if (isFlag(4)) {
+ if (isFlag(kGFUnk04)) {
playGnapImpossible(0, 0);
} else if (triedDeviceOnGas) {
_hotspots[kHSWalkArea5]._flags |= SF_WALKABLE;
@@ -185,7 +185,7 @@ void GnapEngine::scene06_run() {
break;
case TALK_CURSOR:
case PLAT_CURSOR:
- if (isFlag(4))
+ if (isFlag(kGFUnk04))
playGnapImpossible(0, 0);
else
playGnapScratchingHead(5, 0);
@@ -391,7 +391,7 @@ void GnapEngine::scene06_updateAnimations() {
_gameSys->insertSequence(0x107C1, _beaverId, 0, 0, kSeqNone, 0, 450 - _platGridX, 384 - _platGridY);
_beaverSequenceId = 0x7C1;
_beaverSequenceDatNum = 1;
- setFlag(4);
+ setFlag(kGFUnk04);
_gnapActionStatus = -1;
showCursor();
}
diff --git a/engines/gnap/scenes/scene07.cpp b/engines/gnap/scenes/scene07.cpp
index 671ad9c9c6..d10c4096cb 100644
--- a/engines/gnap/scenes/scene07.cpp
+++ b/engines/gnap/scenes/scene07.cpp
@@ -53,7 +53,7 @@ void GnapEngine::scene07_updateHotspots() {
setHotspot(kHSWalkArea2, 325, 0, 799, 445, _isLeavingScene ? SF_WALKABLE : 0);
setHotspot(kHSWalkArea3, 160, 0, 325, 495);
setDeviceHotspot(kHSDevice, -1, -1, -1, -1);
- if (isFlag(0))
+ if (isFlag(kGFPlatypus))
_hotspots[kHSDice]._flags = SF_DISABLED;
_hotspotsCount = 7;
}
@@ -67,7 +67,7 @@ void GnapEngine::scene07_run() {
invRemove(kItemGas);
invRemove(kItemNeedle);
- if (!isFlag(0))
+ if (!isFlag(kGFPlatypus))
_gameSys->insertSequence(0x8D, 1, 0, 0, kSeqNone, 0, 0, 0);
if (_prevSceneNum == 8) {
@@ -147,7 +147,7 @@ void GnapEngine::scene07_run() {
case LOOK_CURSOR:
break;
case GRAB_CURSOR:
- setFlag(0);
+ setFlag(kGFPlatypus);
invAdd(kItemDice);
scene07_updateHotspots();
playGnapPullOutDevice(3, 3);
diff --git a/engines/gnap/scenes/scene08.cpp b/engines/gnap/scenes/scene08.cpp
index a1cbe07601..2dfb4d324f 100644
--- a/engines/gnap/scenes/scene08.cpp
+++ b/engines/gnap/scenes/scene08.cpp
@@ -67,7 +67,7 @@ void GnapEngine::scene08_updateHotspots() {
setHotspot(kHSWalkArea1, 290, 340, -1, -1);
setHotspot(kHSWalkArea2, 0, 0, 799, 420);
setDeviceHotspot(kHSDevice, -1, -1, -1, -1);
- if (isFlag(7))
+ if (isFlag(kGFBarnPadlockOpen))
_hotspots[kHSMeat]._flags = SF_WALKABLE | SF_DISABLED;
if (isFlag(8))
_hotspots[kHSBone]._flags = SF_WALKABLE | SF_DISABLED;
@@ -107,7 +107,7 @@ void GnapEngine::scene08_run() {
_timers[4] = getRandom(50) + 75;
- if (!isFlag(7))
+ if (!isFlag(kGFBarnPadlockOpen))
_gameSys->insertSequence(0x144, 1, 0, 0, kSeqNone, 0, 0, 0);
if (!isFlag(8))
@@ -473,7 +473,7 @@ void GnapEngine::scene08_updateAnimations() {
_gameSys->insertSequence(_s08_nextDogSequenceId, 100, _s08_currDogSequenceId, 100, kSeqSyncWait, 0, 0, 0);
switch (_s08_nextDogSequenceId) {
case 0x149:
- setFlag(7);
+ setFlag(kGFBarnPadlockOpen);
_hotspots[kHSMeat]._flags = SF_DISABLED | SF_WALKABLE;
_gameSys->removeSequence(0x144, 1, true);
break;
diff --git a/engines/gnap/scenes/scene10.cpp b/engines/gnap/scenes/scene10.cpp
index 6f5552fbea..6f9f47e817 100644
--- a/engines/gnap/scenes/scene10.cpp
+++ b/engines/gnap/scenes/scene10.cpp
@@ -78,7 +78,7 @@ void GnapEngine::scene10_run() {
_gameSys->insertSequence(0x103, 100, 0, 0, kSeqNone, 0, 0, 0);
_s10_nextCookSequenceId = 0x106;
- if (!isFlag(1))
+ if (!isFlag(kGFMudTaken))
_gameSys->insertSequence(0x107, 100, 0, 0, kSeqNone, 0, 0, 0);
queueInsertDeviceIcon();
@@ -125,7 +125,7 @@ void GnapEngine::scene10_run() {
} else {
switch (_verbCursor) {
case LOOK_CURSOR:
- if (isFlag(1))
+ if (isFlag(kGFMudTaken))
playGnapMoan1(_platX, _platY);
else
playGnapScratchingHead(_platX, _platY);
@@ -198,13 +198,13 @@ void GnapEngine::scene10_run() {
} else {
switch (_verbCursor) {
case LOOK_CURSOR:
- if (isFlag(1))
+ if (isFlag(kGFMudTaken))
playGnapMoan2(-1, -1);
else
playGnapScratchingHead(4, 3);
break;
case GRAB_CURSOR:
- if (isFlag(1))
+ if (isFlag(kGFMudTaken))
playGnapMoan2(-1, -1);
else {
gnapActionIdle(0x10C);
@@ -216,7 +216,7 @@ void GnapEngine::scene10_run() {
playGnapImpossible(0, 0);
break;
case PLAT_CURSOR:
- if (isFlag(1))
+ if (isFlag(kGFMudTaken))
playGnapMoan2(-1, -1);
else {
gnapActionIdle(0x10C);
@@ -247,11 +247,11 @@ void GnapEngine::scene10_run() {
playGnapImpossible(0, 0);
break;
case PLAT_CURSOR:
- if (isFlag(1))
+ if (isFlag(kGFMudTaken))
playGnapMoan2(-1, -1);
else {
invAdd(kItemTongs);
- setFlag(1);
+ setFlag(kGFMudTaken);
gnapActionIdle(0x10C);
gnapUseDeviceOnBeaver();
platypusWalkTo(7, 6, 1, 0x107D2, 1);
diff --git a/engines/gnap/scenes/scene12.cpp b/engines/gnap/scenes/scene12.cpp
index c83f0bd2d9..df26e4d0e1 100644
--- a/engines/gnap/scenes/scene12.cpp
+++ b/engines/gnap/scenes/scene12.cpp
@@ -497,7 +497,7 @@ void GnapEngine::scene12_updateAnimations() {
kSeqSyncWait, 0, 75 * _gnapX - _gnapGridX, 48 * _gnapY - _gnapGridY);
_gnapSequenceId = 0x7B7;
_gnapSequenceDatNum = 1;
- setFlag(3);
+ setFlag(kGFTwigTaken);
invAdd(kItemQuarterWithHole);
invRemove(kItemQuarter);
}
diff --git a/engines/gnap/scenes/scene14.cpp b/engines/gnap/scenes/scene14.cpp
index 1e22c84b57..47bb12f563 100644
--- a/engines/gnap/scenes/scene14.cpp
+++ b/engines/gnap/scenes/scene14.cpp
@@ -46,7 +46,7 @@ void GnapEngine::scene14_updateHotspots() {
setHotspot(kHSCoin, 330, 390, 375, 440, SF_PLAT_CURSOR | SF_TALK_CURSOR | SF_GRAB_CURSOR | SF_LOOK_CURSOR);
setHotspot(kHSToilet, 225, 250, 510, 500, SF_PLAT_CURSOR | SF_TALK_CURSOR | SF_GRAB_CURSOR | SF_LOOK_CURSOR);
setDeviceHotspot(kHSDevice, -1, -1, -1, -1);
- if (isFlag(2))
+ if (isFlag(kGFNeedleTaken))
_hotspots[kHSCoin]._flags = SF_DISABLED;
_hotspotsCount = 5;
}
@@ -56,15 +56,15 @@ void GnapEngine::scene14_run() {
queueInsertDeviceIcon();
- if (!isFlag(2))
+ if (!isFlag(kGFNeedleTaken))
_gameSys->insertSequence(0x23, 10, 0, 0, kSeqNone, 0, 0, 0);
endSceneInit();
- if (!isFlag(2) && invHas(kItemTongs))
+ if (!isFlag(kGFNeedleTaken) && invHas(kItemTongs))
_largeSprite = _gameSys->createSurface(1);
- if (!isFlag(2)) {
+ if (!isFlag(kGFNeedleTaken)) {
_gameSys->insertSequence(0x24, 10, 0x23, 10, kSeqSyncWait, 0, 0, 0);
_gnapSequenceId = 0x24;
_timers[2] = getRandom(40) + 50;
@@ -95,7 +95,7 @@ void GnapEngine::scene14_run() {
case kHSCoin:
if (_grabCursorSpriteIndex == kItemTongs) {
invAdd(kItemQuarter);
- setFlag(2);
+ setFlag(kGFNeedleTaken);
setGrabCursorSprite(-1);
hideCursor();
_gameSys->setAnimation(0x26, 10, 0);
@@ -151,7 +151,7 @@ void GnapEngine::scene14_run() {
checkGameKeys();
- if (!isFlag(2) && !_timers[2]) {
+ if (!isFlag(kGFNeedleTaken) && !_timers[2]) {
_gameSys->insertSequence(0x24, 10, _gnapSequenceId, 10, kSeqSyncWait, 0, 0, 0);
_gnapSequenceId = 0x24;
_timers[2] = getRandom(40) + 50;
diff --git a/engines/gnap/scenes/scene17.cpp b/engines/gnap/scenes/scene17.cpp
index ec580b971f..c502649c1d 100644
--- a/engines/gnap/scenes/scene17.cpp
+++ b/engines/gnap/scenes/scene17.cpp
@@ -72,7 +72,7 @@ void GnapEngine::scene17_updateHotspots() {
setHotspot(kHSWalkArea2, 541, 0, 800, 600);
setHotspot(kHSWalkArea3, 0, 204, 173, 468);
setDeviceHotspot(kHSDevice, -1, -1, -1, -1);
- if (isFlag(6))
+ if (isFlag(kGFGrassTaken))
_hotspots[kHSWrench]._flags = SF_NONE;
if (isFlag(26)) {
_hotspots[kHSDevice]._flags = SF_DISABLED;
@@ -150,7 +150,7 @@ void GnapEngine::scene17_run() {
queueInsertDeviceIcon();
- if (isFlag(6))
+ if (isFlag(kGFGrassTaken))
_s17_currWrenchSequenceId = 0x22D;
else
_s17_currWrenchSequenceId = 0x22F;
@@ -163,7 +163,7 @@ void GnapEngine::scene17_run() {
_gameSys->setAnimation(_s17_currWrenchSequenceId, 40, 2);
_gameSys->insertSequence(_s17_currWrenchSequenceId, 40, 0, 0, kSeqNone, 0, 0, 0);
- if (isFlag(6)) {
+ if (isFlag(kGFGrassTaken)) {
_gameSys->setAnimation(0, 0, 3);
} else {
_gameSys->setAnimation(_s17_currCarWindowSequenceId, 40, 3);
@@ -296,7 +296,7 @@ void GnapEngine::scene17_run() {
case kHSPlatypus:
if (_gnapActionStatus < 0) {
if (_grabCursorSpriteIndex == kItemJoint) {
- if (isFlag(6)) {
+ if (isFlag(kGFGrassTaken)) {
gnapUseJointOnPlatypus();
} else {
gnapUseDeviceOnBeaver();
@@ -330,7 +330,7 @@ void GnapEngine::scene17_run() {
case kHSWrench:
if (_gnapActionStatus < 0) {
- if (isFlag(6)) {
+ if (isFlag(kGFGrassTaken)) {
playGnapImpossible(0, 0);
} else if (_grabCursorSpriteIndex >= 0) {
playGnapShowCurrItem(_hotspotsWalkPos[_sceneClickedHotspot].x, _hotspotsWalkPos[_sceneClickedHotspot].y, 8, 7);
@@ -515,7 +515,7 @@ void GnapEngine::scene17_run() {
}
if (_beaverActionStatus < 0 && !_timers[5]) {
_timers[5] = getRandom(30) + 80;
- if (isFlag(6) && _s17_nextWrenchSequenceId == -1) {
+ if (isFlag(kGFGrassTaken) && _s17_nextWrenchSequenceId == -1) {
_s17_nextWrenchSequenceId = 0x236;
} else if (_s17_canTryGetWrench) {
switch (getRandom(6)) {
@@ -565,7 +565,7 @@ void GnapEngine::scene17_run() {
}
if (!_timers[6]) {
_timers[6] = getRandom(30) + 200;
- if (_s17_nextCarWindowSequenceId == -1 && !isFlag(6))
+ if (_s17_nextCarWindowSequenceId == -1 && !isFlag(kGFGrassTaken))
_s17_nextCarWindowSequenceId = 0x246;
}
playSoundA();
@@ -832,7 +832,7 @@ void GnapEngine::scene17_updateAnimations() {
_s17_nextCarWindowSequenceId = -1;
_s17_currWrenchSequenceId = 0x22D;
_s17_nextWrenchSequenceId = -1;
- setFlag(6);
+ setFlag(kGFGrassTaken);
_gnapActionStatus = -1;
_beaverActionStatus = 2;
scene17_updateHotspots();
diff --git a/engines/gnap/scenes/scene18.cpp b/engines/gnap/scenes/scene18.cpp
index b76e43072d..3e2301e96b 100644
--- a/engines/gnap/scenes/scene18.cpp
+++ b/engines/gnap/scenes/scene18.cpp
@@ -97,7 +97,7 @@ void GnapEngine::scene18_updateHotspots() {
} else {
_hotspots[kHSHydrantTopValve]._y1 = 246;
}
- } else if (isFlag(7)) {
+ } else if (isFlag(kGFBarnPadlockOpen)) {
_hotspots[kHSHydrantRightValve]._flags = SF_DISABLED;
_hotspots[kHSHydrantTopValve]._x1 = 105;
_hotspots[kHSHydrantTopValve]._x2 = 192;
@@ -294,7 +294,7 @@ void GnapEngine::scene18_closeHydrantValve() {
_gnapActionStatus = kASCloseRightValveNoGarbageCan;
scene18_waitForGnapAction();
}
- } else if (isFlag(7)) {
+ } else if (isFlag(kGFBarnPadlockOpen)) {
gnapWalkTo(_hotspotsWalkPos[kHSHydrantTopValve].x, _hotspotsWalkPos[kHSHydrantTopValve].y, 0, 0x107BA, 1);
_gnapActionStatus = kASCloseTopValve;
scene18_waitForGnapAction();
@@ -338,7 +338,7 @@ void GnapEngine::scene18_run() {
_gameSys->insertSequence(0x212, 39, 0, 0, kSeqLoop, 0, 0, 0);
_gameSys->insertSequence(0x20D, 39, 0, 0, kSeqLoop, 0, 0, 0);
playSound(0x22B, true);
- } else if (isFlag(7)) {
+ } else if (isFlag(kGFBarnPadlockOpen)) {
_gameSys->insertSequence(0x20E, 39, 0, 0, kSeqLoop, 0, 0, 0);
_gameSys->insertSequence(0x217, 39, 0, 0, kSeqLoop, 0, 0, 0);
playSound(0x22B, true);
@@ -542,7 +542,7 @@ void GnapEngine::scene18_run() {
if (isFlag(8)) {
scene18_gnapCarryGarbageCanTo(-1, -1, 0, -1, 2);
_gnapActionStatus = kASPutGarbageCanOnRunningHydrant;
- } else if (!isFlag(7)) {
+ } else if (!isFlag(kGFBarnPadlockOpen)) {
scene18_gnapCarryGarbageCanTo(-1, -1, 0, -1, 2);
_gnapActionStatus = kASPutGarbageCanOnHydrant;
} else {
@@ -571,7 +571,7 @@ void GnapEngine::scene18_run() {
playGnapScratchingHead(1, 5);
break;
case GRAB_CURSOR:
- if (isFlag(7)) {
+ if (isFlag(kGFBarnPadlockOpen)) {
_hotspots[kHSWalkArea2]._flags |= SF_WALKABLE;
gnapWalkTo(_hotspotsWalkPos[kHSHydrantTopValve].x, _hotspotsWalkPos[kHSHydrantTopValve].y, 0, 0x107BA, 1);
_hotspots[kHSWalkArea2]._flags &= ~SF_WALKABLE;
@@ -723,7 +723,7 @@ void GnapEngine::scene18_run() {
if (!isSoundPlaying(0x10940))
playSound(0x10940, true);
- if ((isFlag(8) || isFlag(7)) && !isSoundPlaying(0x22B) &&
+ if ((isFlag(8) || isFlag(kGFBarnPadlockOpen)) && !isSoundPlaying(0x22B) &&
_gnapActionStatus != kASOpenRightValveNoGarbageCanDone && _gnapActionStatus != kASOpenRightValveNoGarbageCan &&
_gnapActionStatus != kASOpenTopValve && _gnapActionStatus != kASOpenTopValveDone &&
_gnapActionStatus != kASOpenRightValveWithGarbageCan && _gnapActionStatus != kASOpenRightValveWithGarbageCanDone)
@@ -827,7 +827,7 @@ void GnapEngine::scene18_updateAnimations() {
_gnapActionStatus = -1;
break;
case kASOpenTopValve:
- setFlag(7);
+ setFlag(kGFBarnPadlockOpen);
scene18_updateHotspots();
playGnapPullOutDevice(2, 7);
playGnapUseDevice(0, 0);
@@ -862,7 +862,7 @@ void GnapEngine::scene18_updateAnimations() {
stopSound(0x22B);
_gnapSequenceDatNum = 0;
_gnapSequenceId = 0x206;
- clearFlag(7);
+ clearFlag(kGFBarnPadlockOpen);
invAdd(kItemWrench);
setGrabCursorSprite(kItemWrench);
scene18_updateHotspots();
diff --git a/engines/gnap/scenes/scene21.cpp b/engines/gnap/scenes/scene21.cpp
index 7d8157bd07..a6f42e10fa 100644
--- a/engines/gnap/scenes/scene21.cpp
+++ b/engines/gnap/scenes/scene21.cpp
@@ -48,7 +48,7 @@ enum {
int GnapEngine::scene21_init() {
_gameSys->setAnimation(0, 0, 3);
- return isFlag(3) ? 0x94 : 0x93;
+ return isFlag(kGFTwigTaken) ? 0x94 : 0x93;
}
void GnapEngine::scene21_updateHotspots() {
@@ -59,9 +59,9 @@ void GnapEngine::scene21_updateHotspots() {
setHotspot(kHSWalkArea1, 0, 0, 800, 440);
setHotspot(kHSWalkArea2, 698, 0, 800, 600);
setDeviceHotspot(kHSDevice, -1, -1, -1, -1);
- if (isFlag(4) || !isFlag(3))
+ if (isFlag(kGFUnk04) || !isFlag(kGFTwigTaken))
_hotspots[kHSBanana]._flags = SF_WALKABLE | SF_DISABLED;
- if (isFlag(3))
+ if (isFlag(kGFTwigTaken))
_hotspots[kHSOldLady]._flags = SF_DISABLED;
_hotspotsCount = 7;
}
@@ -75,19 +75,19 @@ void GnapEngine::scene21_run() {
queueInsertDeviceIcon();
- if (isFlag(3)) {
- if (isFlag(5)) {
+ if (isFlag(kGFTwigTaken)) {
+ if (isFlag(kGFKeysTaken)) {
initGnapPos(5, 8, kDirBottomRight);
initBeaverPos(6, 8, kDirNone);
_gameSys->insertSequence(0x8E, 2, 0, 0, kSeqNone, 0, 0, 0);
- if (!isFlag(4))
+ if (!isFlag(kGFUnk04))
_gameSys->insertSequence(0x8D, 59, 0, 0, kSeqNone, 0, 0, 0);
endSceneInit();
- clearFlag(5);
+ clearFlag(kGFKeysTaken);
} else {
initGnapPos(5, 11, kDirBottomRight);
initBeaverPos(6, 11, kDirNone);
- if (!isFlag(4))
+ if (!isFlag(kGFUnk04))
_gameSys->insertSequence(0x8D, 59, 0, 0, kSeqNone, 0, 0, 0);
endSceneInit();
gnapWalkTo(5, 8, -1, 0x107B9, 1);
@@ -237,7 +237,7 @@ void GnapEngine::scene21_run() {
if (!_isLeavingScene) {
updateBeaverIdleSequence();
updateGnapIdleSequence();
- if (!isFlag(3) && !_timers[4] && _s21_nextOldLadySequenceId == -1 && _gnapActionStatus == -1) {
+ if (!isFlag(kGFTwigTaken) && !_timers[4] && _s21_nextOldLadySequenceId == -1 && _gnapActionStatus == -1) {
_timers[4] = getRandom(30) + 50;
switch (getRandom(5)) {
case 0:
@@ -284,7 +284,7 @@ void GnapEngine::scene21_updateAnimations() {
case kASGrabBanana:
_gameSys->setAnimation(0x8C, 59, 0);
_gameSys->insertSequence(0x8C, 59, 141, 59, kSeqSyncWait, 0, 0, 0);
- setFlag(4);
+ setFlag(kGFUnk04);
invAdd(kItemBanana);
scene21_updateHotspots();
_gnapActionStatus = kASGrabBananaDone;
diff --git a/engines/gnap/scenes/scene25.cpp b/engines/gnap/scenes/scene25.cpp
index c93c194b94..42df9bd35e 100644
--- a/engines/gnap/scenes/scene25.cpp
+++ b/engines/gnap/scenes/scene25.cpp
@@ -220,7 +220,7 @@ void GnapEngine::scene25_run() {
case kHSExitInsideCircusWorld:
if (_gnapActionStatus < 0) {
- if (isFlag(2)) {
+ if (isFlag(kGFNeedleTaken)) {
_isLeavingScene = true;
_newSceneNum = 26;
_hotspots[kHSWalkArea1]._flags |= SF_WALKABLE;
@@ -368,7 +368,7 @@ void GnapEngine::scene25_updateAnimations() {
case kASShowTicketToVendor:
setGrabCursorSprite(-1);
invRemove(kItemTickets);
- setFlag(2);
+ setFlag(kGFNeedleTaken);
_gameSys->setAnimation(0x61, 40, 0);
_gameSys->insertSequence(0x61, 40, 0, 0, kSeqNone, 0, 0, 0);
_gnapActionStatus = kASShowTicketToVendorDone;
diff --git a/engines/gnap/scenes/scene27.cpp b/engines/gnap/scenes/scene27.cpp
index 02020d5211..e891e255d7 100644
--- a/engines/gnap/scenes/scene27.cpp
+++ b/engines/gnap/scenes/scene27.cpp
@@ -245,7 +245,7 @@ void GnapEngine::scene27_run() {
case kHSExitClown:
if (_gnapActionStatus < 0) {
- if (isFlag(0)) {
+ if (isFlag(kGFPlatypus)) {
_isLeavingScene = true;
_newSceneNum = 28;
gnapWalkTo(_hotspotsWalkPos[kHSExitClown].x, _hotspotsWalkPos[kHSExitClown].y, 0, 0x107AD, 1);
@@ -404,7 +404,7 @@ void GnapEngine::scene27_updateAnimations() {
_gnapActionStatus = kASEnterClownTent;
_s27_currJanitorSequenceId = _s27_nextJanitorSequenceId;
_s27_nextJanitorSequenceId = -1;
- setFlag(0);
+ setFlag(kGFPlatypus);
setGrabCursorSprite(-1);
invRemove(kItemPicture);
_newSceneNum = 28;
@@ -417,7 +417,6 @@ void GnapEngine::scene27_updateAnimations() {
break;
}
}
-
}
} // End of namespace Gnap
diff --git a/engines/gnap/scenes/scene28.cpp b/engines/gnap/scenes/scene28.cpp
index f7226e3a66..a2831e9f5b 100644
--- a/engines/gnap/scenes/scene28.cpp
+++ b/engines/gnap/scenes/scene28.cpp
@@ -81,7 +81,7 @@ void GnapEngine::scene28_run() {
if (isFlag(22))
_gameSys->insertSequence(0x112, 99, 0, 0, kSeqNone, 0, 0, 0);
- if (isFlag(1)) {
+ if (isFlag(kGFMudTaken)) {
if (isFlag(21)) {
_gameSys->setAnimation(0x11C, 39, 3);
_gameSys->insertSequence(0x11C, 39, 0, 0, kSeqNone, 0, 0, 0);
@@ -104,7 +104,7 @@ void GnapEngine::scene28_run() {
endSceneInit();
playSequences(0xF7, 0x121, 0x122, 0x123);
_s28_currClownSequenceId = 0x115;
- setFlag(1);
+ setFlag(kGFMudTaken);
_gameSys->setAnimation(0x115, 39, 3);
_gameSys->insertSequence(_s28_currClownSequenceId, 39, 0x11B, 39, kSeqSyncWait, 0, 0, 0);
_s28_nextClownSequenceId = -1;
diff --git a/engines/gnap/scenes/scene47.cpp b/engines/gnap/scenes/scene47.cpp
index d692e1d83d..37077e2876 100644
--- a/engines/gnap/scenes/scene47.cpp
+++ b/engines/gnap/scenes/scene47.cpp
@@ -130,7 +130,7 @@ void GnapEngine::scene47_initCutscene7() {
_s99_sequenceIdArr[2] = 0x314;
_s99_sequenceIdArr[3] = 0x31B;
int v1 = 4;
- if (!isFlag(3)) {
+ if (!isFlag(kGFTwigTaken)) {
_s99_sequenceIdArr[4] = 0x31C;
v1 = 5;
}
@@ -144,7 +144,7 @@ void GnapEngine::scene47_initCutscene7() {
_s99_sequenceIdArr[v0++] = 0x312;
_s99_sequenceIdArr[v0] = 0x31A;
v2 = v0 + 1;
- if (!isFlag(3))
+ if (!isFlag(kGFTwigTaken))
_s99_sequenceIdArr[v2++] = 0x31C;
if (!isFlag(26))
_s99_sequenceIdArr[v2++] = 0x31D;
diff --git a/engines/gnap/scenes/scenecore.cpp b/engines/gnap/scenes/scenecore.cpp
index 0825937fff..734c7371a9 100644
--- a/engines/gnap/scenes/scenecore.cpp
+++ b/engines/gnap/scenes/scenecore.cpp
@@ -599,8 +599,8 @@ void GnapEngine::runSceneLogic() {
} else if (_prevSceneNum == 21) {
scene47_initCutscene5();
_newSceneNum = 21;
- setFlag(3);
- setFlag(5);
+ setFlag(kGFTwigTaken);
+ setFlag(kGFKeysTaken);
} else if (_prevSceneNum == 30) {
scene47_initCutscene6();
_newSceneNum = 26;