aboutsummaryrefslogtreecommitdiff
path: root/engines/gnap/scenes
diff options
context:
space:
mode:
authorStrangerke2016-05-08 11:01:21 +0200
committerEugene Sandulenko2016-05-10 12:14:55 +0200
commit6e9243d125153cac1a342d716b0c18f06c88323e (patch)
tree9207292daf1e63f08935ff425b0deec383046f58 /engines/gnap/scenes
parentfdabbcc16ab90b47a14eda8c168ab206a92780f1 (diff)
downloadscummvm-rg350-6e9243d125153cac1a342d716b0c18f06c88323e.tar.gz
scummvm-rg350-6e9243d125153cac1a342d716b0c18f06c88323e.tar.bz2
scummvm-rg350-6e9243d125153cac1a342d716b0c18f06c88323e.zip
GNAP: Reduce dereferencing of _plat
Diffstat (limited to 'engines/gnap/scenes')
-rw-r--r--engines/gnap/scenes/group0.cpp402
-rw-r--r--engines/gnap/scenes/group1.cpp416
-rw-r--r--engines/gnap/scenes/group2.cpp231
-rw-r--r--engines/gnap/scenes/group3.cpp193
-rw-r--r--engines/gnap/scenes/group4.cpp269
5 files changed, 784 insertions, 727 deletions
diff --git a/engines/gnap/scenes/group0.cpp b/engines/gnap/scenes/group0.cpp
index f5e8307def..972bbfa907 100644
--- a/engines/gnap/scenes/group0.cpp
+++ b/engines/gnap/scenes/group0.cpp
@@ -73,6 +73,7 @@ void Scene01::run() {
// which is also set in the global game flags.
GameSys& gameSys = *_vm->_gameSys;
PlayerGnap& gnap = *_vm->_gnap;
+ PlayerPlat& plat = *_vm->_plat;
_vm->playSound(0x1091C, true);
_vm->startSoundTimerC(5);
@@ -93,15 +94,15 @@ void Scene01::run() {
if (_vm->_prevSceneNum == 2) {
gnap.initPos(11, 6, kDirBottomLeft);
if (_vm->isFlag(kGFPlatypus))
- _vm->_plat->initPos(12, 6, kDirUnk4);
+ plat.initPos(12, 6, kDirUnk4);
_vm->endSceneInit();
if (_vm->isFlag(kGFPlatypus))
- _vm->_plat->walkTo(Common::Point(9, 6), -1, 0x107C2, 1);
+ plat.walkTo(Common::Point(9, 6), -1, 0x107C2, 1);
gnap.walkTo(Common::Point(8, 6), -1, 0x107B9, 1);
} else {
gnap.initPos(1, 6, kDirBottomRight);
if (_vm->isFlag(kGFPlatypus))
- _vm->_plat->initPos(1, 7, kDirNone);
+ plat.initPos(1, 7, kDirNone);
_vm->endSceneInit();
}
@@ -132,16 +133,16 @@ void Scene01::run() {
switch (_vm->_verbCursor) {
case LOOK_CURSOR:
if (_vm->isFlag(kGFKeysTaken))
- gnap.playMoan1(_vm->_plat->_pos.x, _vm->_plat->_pos.y);
+ gnap.playMoan1(plat._pos.x, plat._pos.y);
else
- gnap.playScratchingHead(_vm->_plat->_pos.x, _vm->_plat->_pos.y);
+ gnap.playScratchingHead(plat._pos.x, plat._pos.y);
break;
case GRAB_CURSOR:
gnap.kissPlatypus(0);
break;
case TALK_CURSOR:
- gnap.playBrainPulsating(_vm->_plat->_pos.x, _vm->_plat->_pos.y);
- _vm->_plat->playSequence(_vm->_plat->getSequenceId());
+ gnap.playBrainPulsating(plat._pos.x, plat._pos.y);
+ plat.playSequence(plat.getSequenceId());
break;
case PLAT_CURSOR:
gnap.playImpossible(0, 0);
@@ -229,7 +230,7 @@ void Scene01::run() {
gnap.walkTo(_vm->_hotspotsWalkPos[1], 0, 0x107AB, 1);
gnap._actionStatus = kAS01LeaveScene;
if (_vm->isFlag(kGFPlatypus))
- _vm->_plat->walkTo(_vm->_hotspotsWalkPos[1] + Common::Point(0, 1), -1, 0x107CD, 1);
+ plat.walkTo(_vm->_hotspotsWalkPos[1] + Common::Point(0, 1), -1, 0x107CD, 1);
_vm->_newSceneNum = 2;
}
break;
@@ -261,8 +262,8 @@ void Scene01::run() {
_vm->playSound(0x1091C, true);
if (!_vm->_isLeavingScene) {
- if (_vm->_plat->_actionStatus < 0 && _vm->isFlag(kGFPlatypus))
- _vm->_plat->updateIdleSequence();
+ if (plat._actionStatus < 0 && _vm->isFlag(kGFPlatypus))
+ plat.updateIdleSequence();
if (gnap._actionStatus < 0)
gnap.updateIdleSequence();
if (_vm->_timers[4] == 0) {
@@ -399,6 +400,7 @@ void Scene02::updateHotspots() {
void Scene02::run() {
GameSys& gameSys = *_vm->_gameSys;
PlayerGnap& gnap = *_vm->_gnap;
+ PlayerPlat& plat = *_vm->_plat;
_vm->playSound(0x1091C, true);
_vm->startSoundTimerC(6);
@@ -417,42 +419,42 @@ void Scene02::run() {
case 3:
gnap.initPos(11, 6, kDirBottomLeft);
if (_vm->isFlag(kGFPlatypus))
- _vm->_plat->initPos(12, 6, kDirUnk4);
+ plat.initPos(12, 6, kDirUnk4);
_vm->endSceneInit();
if (_vm->isFlag(kGFPlatypus))
- _vm->_plat->walkTo(Common::Point(9, 6), -1, 0x107C2, 1);
+ plat.walkTo(Common::Point(9, 6), -1, 0x107C2, 1);
gnap.walkTo(Common::Point(8, 6), -1, 0x107BA, 1);
break;
case 4:
gnap.initPos(_vm->_hotspotsWalkPos[6].x, _vm->_hotspotsWalkPos[6].y, kDirBottomLeft);
if (_vm->isFlag(kGFPlatypus))
- _vm->_plat->initPos(_vm->_hotspotsWalkPos[6].x + 1, _vm->_hotspotsWalkPos[6].y, kDirUnk4);
+ plat.initPos(_vm->_hotspotsWalkPos[6].x + 1, _vm->_hotspotsWalkPos[6].y, kDirUnk4);
_vm->endSceneInit();
gnap.walkTo(Common::Point(7, 6), 0, 0x107B9, 1);
if (_vm->isFlag(kGFPlatypus))
- _vm->_plat->walkTo(Common::Point(8, 6), 1, 0x107C2, 1);
+ plat.walkTo(Common::Point(8, 6), 1, 0x107C2, 1);
updateHotspots();
gameSys.waitForUpdate();
break;
case 47:
_vm->clearFlag(kGFUnk25);
gnap.initPos(5, 6, kDirBottomLeft);
- _vm->_plat->initPos(6, 7, kDirUnk4);
+ plat.initPos(6, 7, kDirUnk4);
_vm->endSceneInit();
break;
case 49:
gnap.initPos(5, 6, kDirBottomRight);
if (_vm->isFlag(kGFPlatypus))
- _vm->_plat->initPos(6, 7, kDirNone);
+ plat.initPos(6, 7, kDirNone);
_vm->endSceneInit();
break;
default:
gnap.initPos(-1, 6, kDirBottomRight);
if (_vm->isFlag(kGFPlatypus))
- _vm->_plat->initPos(-1, 7, kDirNone);
+ plat.initPos(-1, 7, kDirNone);
_vm->endSceneInit();
if (_vm->isFlag(kGFPlatypus))
- _vm->_plat->walkTo(Common::Point(2, 7), -1, 0x107C2, 1);
+ plat.walkTo(Common::Point(2, 7), -1, 0x107C2, 1);
gnap.walkTo(Common::Point(2, 8), -1, 0x107B9, 1);
break;
}
@@ -484,16 +486,16 @@ void Scene02::run() {
switch (_vm->_verbCursor) {
case LOOK_CURSOR:
if (_vm->isFlag(kGFKeysTaken))
- gnap.playMoan1(_vm->_plat->_pos.x, _vm->_plat->_pos.y);
+ gnap.playMoan1(plat._pos.x, plat._pos.y);
else
- gnap.playScratchingHead(_vm->_plat->_pos.x, _vm->_plat->_pos.y);
+ gnap.playScratchingHead(plat._pos.x, plat._pos.y);
break;
case GRAB_CURSOR:
gnap.kissPlatypus(0);
break;
case TALK_CURSOR:
- gnap.playBrainPulsating(_vm->_plat->_pos.x, _vm->_plat->_pos.y);
- _vm->_plat->playSequence(_vm->_plat->getSequenceId());
+ gnap.playBrainPulsating(plat._pos.x, plat._pos.y);
+ plat.playSequence(plat.getSequenceId());
break;
case PLAT_CURSOR:
gnap.playImpossible(0, 0);
@@ -613,7 +615,7 @@ void Scene02::run() {
gnap.walkTo(_vm->_hotspotsWalkPos[6], 0, 0x107AD, 1);
gnap._actionStatus = kAS02LeaveScene;
if (_vm->isFlag(kGFPlatypus))
- _vm->_plat->walkTo(_vm->_hotspotsWalkPos[6] + Common::Point(1, 0), -1, 0x107C1, 1);
+ plat.walkTo(_vm->_hotspotsWalkPos[6] + Common::Point(1, 0), -1, 0x107C1, 1);
updateHotspots();
_vm->_newSceneNum = 4;
}
@@ -625,7 +627,7 @@ void Scene02::run() {
gnap.walkTo(_vm->_hotspotsWalkPos[7], 0, 0x107AD, 1);
gnap._actionStatus = kAS02LeaveScene;
if (_vm->isFlag(kGFPlatypus))
- _vm->_plat->walkTo(_vm->_hotspotsWalkPos[7] + Common::Point(1, 0), -1, 0x107C1, 1);
+ plat.walkTo(_vm->_hotspotsWalkPos[7] + Common::Point(1, 0), -1, 0x107C1, 1);
updateHotspots();
_vm->_newSceneNum = 5;
}
@@ -637,7 +639,7 @@ void Scene02::run() {
gnap.walkTo(_vm->_hotspotsWalkPos[8], 0, 0x107AB, 1);
gnap._actionStatus = kAS02LeaveScene;
if (_vm->isFlag(kGFPlatypus))
- _vm->_plat->walkTo(_vm->_hotspotsWalkPos[8], -1, 0x107CD, 1);
+ plat.walkTo(_vm->_hotspotsWalkPos[8], -1, 0x107CD, 1);
_vm->_newSceneNum = 3;
}
break;
@@ -648,7 +650,7 @@ void Scene02::run() {
gnap.walkTo(_vm->_hotspotsWalkPos[9], 0, 0x107AF, 1);
gnap._actionStatus = kAS02LeaveScene;
if (_vm->isFlag(kGFPlatypus))
- _vm->_plat->walkTo(_vm->_hotspotsWalkPos[9], -1, 0x107CF, 1);
+ plat.walkTo(_vm->_hotspotsWalkPos[9], -1, 0x107CF, 1);
_vm->_newSceneNum = 1;
}
break;
@@ -675,8 +677,8 @@ void Scene02::run() {
_vm->playSound(0x1091C, true);
if (!_vm->_isLeavingScene) {
- if (_vm->_plat->_actionStatus < 0 && _vm->isFlag(kGFPlatypus))
- _vm->_plat->updateIdleSequence();
+ if (plat._actionStatus < 0 && _vm->isFlag(kGFPlatypus))
+ plat.updateIdleSequence();
if (gnap._actionStatus < 0)
gnap.updateIdleSequence();
if (!_vm->_timers[4]) {
@@ -890,6 +892,7 @@ void Scene03::updateHotspots() {
void Scene03::run() {
GameSys& gameSys = *_vm->_gameSys;
PlayerGnap& gnap = *_vm->_gnap;
+ PlayerPlat& plat = *_vm->_plat;
_vm->playSound(0x10925, true);
_vm->startSoundTimerC(7);
@@ -911,13 +914,13 @@ void Scene03::run() {
_vm->_timers[5] = _vm->getRandom(100) + 200;
if (_vm->isFlag(kGFPlatypus)) {
- _vm->_plat->initPos(5, 4, kDirNone);
+ plat.initPos(5, 4, kDirNone);
} else {
_vm->_timers[1] = _vm->getRandom(40) + 20;
gameSys.setAnimation(0x1C2, 99, 1);
gameSys.insertSequence(0x1C2, 99, 0, 0, kSeqNone, 0, 0, 0);
- _vm->_plat->_sequenceId = 0x1C2;
- _vm->_plat->_sequenceDatNum = 0;
+ plat._sequenceId = 0x1C2;
+ plat._sequenceDatNum = 0;
}
gameSys.insertSequence(0x1C4, 255, 0, 0, kSeqNone, 0, 0, 0);
@@ -930,7 +933,7 @@ void Scene03::run() {
_vm->endSceneInit();
if (_vm->isFlag(kGFPlatypus))
- _vm->_plat->walkTo(Common::Point(4, 7), -1, 0x107C2, 1);
+ plat.walkTo(Common::Point(4, 7), -1, 0x107C2, 1);
gnap.walkTo(Common::Point(3, 6), -1, 0x107B9, 1);
while (!_vm->_sceneDone) {
@@ -951,16 +954,16 @@ void Scene03::run() {
switch (_vm->_verbCursor) {
case LOOK_CURSOR:
if (_vm->isFlag(kGFKeysTaken))
- gnap.playMoan1(_vm->_plat->_pos.x, _vm->_plat->_pos.y);
+ gnap.playMoan1(plat._pos.x, plat._pos.y);
else
- gnap.playScratchingHead(_vm->_plat->_pos.x, _vm->_plat->_pos.y);
+ gnap.playScratchingHead(plat._pos.x, plat._pos.y);
break;
case GRAB_CURSOR:
gnap.kissPlatypus(0);
break;
case TALK_CURSOR:
- gnap.playBrainPulsating(_vm->_plat->_pos.x, _vm->_plat->_pos.y);
- _vm->_plat->playSequence(_vm->_plat->getSequenceId());
+ gnap.playBrainPulsating(plat._pos.x, plat._pos.y);
+ plat.playSequence(plat.getSequenceId());
break;
case PLAT_CURSOR:
gnap.playImpossible(0, 0);
@@ -1004,7 +1007,7 @@ void Scene03::run() {
gnap.walkTo(_vm->_hotspotsWalkPos[2], 0, 0x107AD, 1);
gnap._actionStatus = kAS03LeaveScene;
if (_vm->isFlag(kGFPlatypus))
- _vm->_plat->walkTo(_vm->_hotspotsWalkPos[2], -1, 0x107C2, 1);
+ plat.walkTo(_vm->_hotspotsWalkPos[2], -1, 0x107C2, 1);
_vm->_hotspots[kHS03PlatypusWalkArea]._flags &= ~SF_WALKABLE;
if (_vm->_cursorValue == 1)
_vm->_newSceneNum = 2;
@@ -1125,18 +1128,18 @@ void Scene03::run() {
_vm->playSound(0x10925, true);
if (!_vm->_isLeavingScene) {
- if (_vm->_plat->_actionStatus < 0 && _vm->isFlag(kGFPlatypus))
- _vm->_plat->updateIdleSequence();
+ if (plat._actionStatus < 0 && _vm->isFlag(kGFPlatypus))
+ plat.updateIdleSequence();
if (gnap._actionStatus < 0)
gnap.updateIdleSequence();
if (!_vm->_timers[1] && !_platypusScared) {
_vm->_timers[1] = _vm->getRandom(40) + 20;
- if (gnap._actionStatus < 0 && _vm->_plat->_actionStatus < 0 && !_vm->isFlag(kGFPlatypus) && !_platypusHypnotized)
+ if (gnap._actionStatus < 0 && plat._actionStatus < 0 && !_vm->isFlag(kGFPlatypus) && !_platypusHypnotized)
_nextPlatSequenceId = 450;
}
if (!_vm->_timers[6]) {
_vm->_timers[6] = _vm->getRandom(20) + 30;
- if (gnap._actionStatus < 0 && _vm->_plat->_actionStatus < 0 && _nextFrogSequenceId == -1) {
+ if (gnap._actionStatus < 0 && plat._actionStatus < 0 && _nextFrogSequenceId == -1) {
if (_vm->getRandom(5) == 1)
_nextFrogSequenceId = 0x1C6;
else
@@ -1146,12 +1149,12 @@ void Scene03::run() {
if (!_vm->_timers[4]) {
// Update bird animation
_vm->_timers[4] = _vm->getRandom(100) + 300;
- if (gnap._actionStatus < 0 && _vm->_plat->_actionStatus < 0)
+ if (gnap._actionStatus < 0 && plat._actionStatus < 0)
gameSys.insertSequence(_vm->getRandom(2) != 0 ? 0x1C8 : 0x1C3, 253, 0, 0, kSeqNone, 0, 0, 0);
}
if (!_vm->_timers[5]) {
_vm->_timers[5] = _vm->getRandom(100) + 200;
- if (gnap._actionStatus < 0 && _vm->_plat->_actionStatus < 0) {
+ if (gnap._actionStatus < 0 && plat._actionStatus < 0) {
gameSys.setAnimation(0x1C5, 253, 4);
gameSys.insertSequence(0x1C5, 253, 0, 0, kSeqNone, 0, 0, 0);
}
@@ -1177,6 +1180,7 @@ void Scene03::run() {
void Scene03::updateAnimations() {
GameSys& gameSys = *_vm->_gameSys;
PlayerGnap& gnap = *_vm->_gnap;
+ PlayerPlat& plat = *_vm->_plat;
if (gameSys.getAnimationStatus(0) == 2) {
gameSys.setAnimation(0, 0, 0);
@@ -1189,14 +1193,14 @@ void Scene03::updateAnimations() {
break;
case kAS03FreePlatypusDone:
gnap._actionStatus = -1;
- _vm->_plat->_pos = Common::Point(6, 6);
- _vm->_plat->_idleFacing = kDirUnk4;
- _vm->_plat->_id = 120;
- gameSys.insertSequence(0x107CA, _vm->_plat->_id, 0x1BC, 99,
- kSeqSyncWait, 0, 75 * _vm->_plat->_pos.x - _vm->_plat->_gridX, 48 * _vm->_plat->_pos.y - _vm->_plat->_gridY);
+ plat._pos = Common::Point(6, 6);
+ plat._idleFacing = kDirUnk4;
+ plat._id = 120;
+ gameSys.insertSequence(0x107CA, plat._id, 0x1BC, 99,
+ kSeqSyncWait, 0, 75 * plat._pos.x - plat._gridX, 48 * plat._pos.y - plat._gridY);
gameSys.insertSequence(0x1B7, 99, 0, 0, kSeqNone, 0, 0, 0);
- _vm->_plat->_sequenceDatNum = 1;
- _vm->_plat->_sequenceId = 0x7CA;
+ plat._sequenceDatNum = 1;
+ plat._sequenceId = 0x7CA;
_vm->setFlag(kGFPlatypus);
_nextPlatSequenceId = -1;
updateHotspots();
@@ -1210,16 +1214,16 @@ void Scene03::updateAnimations() {
_vm->gameUpdateTick();
_vm->removeFullScreenSprite();
gameSys.setAnimation(0x1BA, 99, 1);
- gameSys.insertSequence(0x1BA, 99, _vm->_plat->_sequenceId | (_vm->_plat->_sequenceDatNum << 16), 99, kSeqSyncExists, 0, 0, 0);
- _vm->_plat->_sequenceDatNum = 0;
- _vm->_plat->_sequenceId = 0x1BA;
+ gameSys.insertSequence(0x1BA, 99, plat._sequenceId | (plat._sequenceDatNum << 16), 99, kSeqSyncExists, 0, 0, 0);
+ plat._sequenceDatNum = 0;
+ plat._sequenceId = 0x1BA;
gnap._actionStatus = -1;
_platypusHypnotized = true;
updateHotspots();
break;
case kAS03HypnotizeScaredPlat:
gnap.playBrainPulsating(0, 0);
- gameSys.insertSequence(0x1BF, 99, _vm->_plat->_sequenceId | (_vm->_plat->_sequenceDatNum << 16), 99, kSeqSyncExists, 0, 0, 0);
+ gameSys.insertSequence(0x1BF, 99, plat._sequenceId | (plat._sequenceDatNum << 16), 99, kSeqSyncExists, 0, 0, 0);
gameSys.setAnimation(0x1BF, 99, 1);
while (gameSys.getAnimationStatus(1) != 2)
_vm->gameUpdateTick();
@@ -1231,8 +1235,8 @@ void Scene03::updateAnimations() {
_vm->removeFullScreenSprite();
gameSys.setAnimation(0x1BA, 99, 1);
gameSys.insertSequence(0x1BA, 99, 447, 99, kSeqSyncWait, 0, 0, 0);
- _vm->_plat->_sequenceDatNum = 0;
- _vm->_plat->_sequenceId = 0x1BA;
+ plat._sequenceDatNum = 0;
+ plat._sequenceId = 0x1BA;
gnap._actionStatus = -1;
_platypusHypnotized = true;
updateHotspots();
@@ -1263,19 +1267,19 @@ void Scene03::updateAnimations() {
gameSys.setAnimation(0, 0, 1);
_platypusScared = true;
gameSys.insertSequence(0x1B5, gnap._id, makeRid(gnap._sequenceDatNum, gnap._sequenceId), gnap._id, kSeqSyncWait, 0, 0, 0);
- gameSys.insertSequence(_nextPlatSequenceId, 99, _vm->_plat->_sequenceId | (_vm->_plat->_sequenceDatNum << 16), 99, kSeqSyncWait, 0, 0, 0);
+ gameSys.insertSequence(_nextPlatSequenceId, 99, plat._sequenceId | (plat._sequenceDatNum << 16), 99, kSeqSyncWait, 0, 0, 0);
gnap._sequenceId = 0x1B5;
gnap._sequenceDatNum = 0;
gnap._idleFacing = kDirNone;
- _vm->_plat->_sequenceId = _nextPlatSequenceId;
- _vm->_plat->_sequenceDatNum = 0;
+ plat._sequenceId = _nextPlatSequenceId;
+ plat._sequenceDatNum = 0;
gameSys.setAnimation(_nextPlatSequenceId, 99, 1);
_nextPlatSequenceId = -1;
gnap._actionStatus = -1;
} else if (_nextPlatSequenceId == 0x1BC) {
gnap._pos = Common::Point(3, 6);
gameSys.insertSequence(0x1B6, 120, makeRid(gnap._sequenceDatNum, gnap._sequenceId), gnap._id, kSeqSyncWait, 0, 0, 0);
- gameSys.insertSequence(0x1BC, 99, _vm->_plat->_sequenceId | (_vm->_plat->_sequenceDatNum << 16), 99, kSeqSyncWait, 0, 0, 0);
+ gameSys.insertSequence(0x1BC, 99, plat._sequenceId | (plat._sequenceDatNum << 16), 99, kSeqSyncWait, 0, 0, 0);
gameSys.setAnimation(0x1BC, 99, 0);
gnap._id = 20 * gnap._pos.y;
gnap._sequenceId = 0x1B6;
@@ -1285,17 +1289,17 @@ void Scene03::updateAnimations() {
_nextPlatSequenceId = -1;
} else if (_nextPlatSequenceId == 0x1C2 && !_platypusScared) {
gameSys.setAnimation(0, 0, 1);
- gameSys.insertSequence(0x1C2, 99, _vm->_plat->_sequenceId | (_vm->_plat->_sequenceDatNum << 16), 99, kSeqSyncWait, 0, 0, 0);
- _vm->_plat->_sequenceId = 0x1C2;
- _vm->_plat->_sequenceDatNum = 0;
+ gameSys.insertSequence(0x1C2, 99, plat._sequenceId | (plat._sequenceDatNum << 16), 99, kSeqSyncWait, 0, 0, 0);
+ plat._sequenceId = 0x1C2;
+ plat._sequenceDatNum = 0;
gameSys.setAnimation(0x1C2, 99, 1);
_nextPlatSequenceId = -1;
} else if (_nextPlatSequenceId == -1 && _platypusScared && !_platypusHypnotized) {
gameSys.setAnimation(0, 0, 1);
gameSys.setAnimation(0x1BE, 99, 1);
- gameSys.insertSequence(0x1BE, 99, _vm->_plat->_sequenceId | (_vm->_plat->_sequenceDatNum << 16), 99, kSeqSyncWait, 0, 0, 0);
- _vm->_plat->_sequenceId = 0x1BE;
- _vm->_plat->_sequenceDatNum = 0;
+ gameSys.insertSequence(0x1BE, 99, plat._sequenceId | (plat._sequenceDatNum << 16), 99, kSeqSyncWait, 0, 0, 0);
+ plat._sequenceId = 0x1BE;
+ plat._sequenceDatNum = 0;
_nextPlatSequenceId = -1;
}
}
@@ -1358,6 +1362,7 @@ void Scene04::updateHotspots() {
void Scene04::run() {
GameSys& gameSys = *_vm->_gameSys;
PlayerGnap& gnap = *_vm->_gnap;
+ PlayerPlat& plat = *_vm->_plat;
_vm->playSound(0x1091C, true);
_vm->startSoundTimerC(4);
@@ -1388,8 +1393,8 @@ void Scene04::run() {
_vm->setGrabCursorSprite(kItemKeys);
gnap._pos = Common::Point(4, 7);
gnap._id = 140;
- _vm->_plat->_pos = Common::Point(6, 7);
- _vm->_plat->_id = 141;
+ plat._pos = Common::Point(6, 7);
+ plat._id = 141;
gameSys.insertSequence(0x107B5, 140, 0, 0, kSeqNone, 0, 300 - gnap._gridX, 336 - gnap._gridY);
gameSys.insertSequence(0x20C, 141, 0, 0, kSeqNone, 0, 0, 0);
gameSys.insertSequence(0x208, 121, 0, 0, kSeqNone, 0, 0, 0);
@@ -1399,9 +1404,9 @@ void Scene04::run() {
_vm->invAdd(kItemKeys);
_vm->setFlag(kGFKeysTaken);
_vm->clearFlag(kGFPlatypusDisguised);
- _vm->_plat->_sequenceId = 0x20C;
- _vm->_plat->_sequenceDatNum = 0;
- _vm->_plat->_idleFacing = kDirBottomRight;
+ plat._sequenceId = 0x20C;
+ plat._sequenceDatNum = 0;
+ plat._idleFacing = kDirBottomRight;
gnap._sequenceId = 0x7B5;
gnap._sequenceDatNum = 1;
gameSys.waitForUpdate();
@@ -1410,22 +1415,22 @@ void Scene04::run() {
if (_vm->_prevSceneNum == 2) {
gnap.initPos(5, 11, kDirUpRight);
if (_vm->isFlag(kGFPlatypus))
- _vm->_plat->initPos(6, 11, kDirUpLeft);
+ plat.initPos(6, 11, kDirUpLeft);
_vm->endSceneInit();
if (_vm->isFlag(kGFPlatypus))
- _vm->_plat->walkTo(Common::Point(5, 8), -1, 0x107C2, 1);
+ plat.walkTo(Common::Point(5, 8), -1, 0x107C2, 1);
gnap.walkTo(Common::Point(6, 9), -1, 0x107BA, 1);
} else if (_vm->_prevSceneNum == 38) {
gnap.initPos(5, 7, kDirBottomRight);
- _vm->_plat->initPos(4, 7, kDirNone);
+ plat.initPos(4, 7, kDirNone);
_vm->endSceneInit();
} else {
gnap.initPos(12, 9, kDirBottomRight);
if (_vm->isFlag(kGFPlatypus))
- _vm->_plat->initPos(12, 8, kDirNone);
+ plat.initPos(12, 8, kDirNone);
_vm->endSceneInit();
if (_vm->isFlag(kGFPlatypus))
- _vm->_plat->walkTo(Common::Point(9, 8), -1, 0x107C2, 1);
+ plat.walkTo(Common::Point(9, 8), -1, 0x107C2, 1);
gnap.walkTo(Common::Point(9, 9), -1, 0x107BA, 1);
}
}
@@ -1457,19 +1462,19 @@ void Scene04::run() {
switch (_vm->_verbCursor) {
case LOOK_CURSOR:
if (_vm->isFlag(kGFKeysTaken))
- gnap.playMoan1(_vm->_plat->_pos.x, _vm->_plat->_pos.y);
+ gnap.playMoan1(plat._pos.x, plat._pos.y);
else
- gnap.playScratchingHead(_vm->_plat->_pos.x, _vm->_plat->_pos.y);
+ gnap.playScratchingHead(plat._pos.x, plat._pos.y);
break;
case GRAB_CURSOR:
if (_vm->_cursorValue == 4)
gnap.kissPlatypus(0);
else
- gnap.playMoan1(_vm->_plat->_pos.x, _vm->_plat->_pos.y);
+ gnap.playMoan1(plat._pos.x, plat._pos.y);
break;
case TALK_CURSOR:
- gnap.playBrainPulsating(_vm->_plat->_pos.x, _vm->_plat->_pos.y);
- _vm->_plat->playSequence(_vm->_plat->getSequenceId());
+ gnap.playBrainPulsating(plat._pos.x, plat._pos.y);
+ plat.playSequence(plat.getSequenceId());
break;
case PLAT_CURSOR:
gnap.playImpossible(0, 0);
@@ -1597,7 +1602,7 @@ void Scene04::run() {
gnap.walkTo(_vm->_hotspotsWalkPos[5], 0, 0x107AE, 1);
gnap._actionStatus = kAS04LeaveScene;
if (_vm->isFlag(kGFPlatypus))
- _vm->_plat->walkTo(_vm->_hotspotsWalkPos[5], -1, 0x107C7, 1);
+ plat.walkTo(_vm->_hotspotsWalkPos[5], -1, 0x107C7, 1);
if (_vm->_cursorValue == 1)
_vm->_newSceneNum = 2;
else
@@ -1641,7 +1646,7 @@ void Scene04::run() {
gnap.walkTo(_vm->_hotspotsWalkPos[8], 0, 0x107AB, 1);
gnap._actionStatus = kAS04LeaveScene;
if (_vm->isFlag(kGFPlatypus))
- _vm->_plat->walkTo(_vm->_hotspotsWalkPos[8] + Common::Point(0, 1), -1, 0x107C1, 1);
+ plat.walkTo(_vm->_hotspotsWalkPos[8] + Common::Point(0, 1), -1, 0x107C1, 1);
if (_vm->_cursorValue == 1)
_vm->_newSceneNum = 5;
else
@@ -1670,8 +1675,8 @@ void Scene04::run() {
_vm->playSound(0x1091C, true);
if (!_vm->_isLeavingScene) {
- if (_vm->_plat->_actionStatus < 0 && _vm->isFlag(kGFPlatypus))
- _vm->_plat->updateIdleSequence2();
+ if (plat._actionStatus < 0 && _vm->isFlag(kGFPlatypus))
+ plat.updateIdleSequence2();
if (gnap._actionStatus < 0)
gnap.updateIdleSequence2();
if (!_vm->_timers[5]) {
@@ -1874,6 +1879,7 @@ void Scene05::updateHotspots() {
void Scene05::run() {
GameSys& gameSys = *_vm->_gameSys;
PlayerGnap& gnap = *_vm->_gnap;
+ PlayerPlat& plat = *_vm->_plat;
_vm->playSound(0x1091C, true);
_vm->startSoundTimerC(7);
@@ -1895,15 +1901,15 @@ void Scene05::run() {
if (_vm->_prevSceneNum != 6 && _vm->_prevSceneNum != 36) {
gnap.initPos(-1, 8, kDirBottomRight);
if (_vm->isFlag(kGFPlatypus))
- _vm->_plat->initPos(-1, 9, kDirNone);
+ plat.initPos(-1, 9, kDirNone);
_vm->endSceneInit();
if (_vm->isFlag(kGFPlatypus))
- _vm->_plat->walkTo(Common::Point(2, 8), -1, 0x107C2, 1);
+ plat.walkTo(Common::Point(2, 8), -1, 0x107C2, 1);
gnap.walkTo(Common::Point(2, 9), -1, 0x107B9, 1);
} else {
gnap.initPos(6, 8, kDirBottomRight);
if (_vm->isFlag(kGFPlatypus))
- _vm->_plat->initPos(7, 9, kDirNone);
+ plat.initPos(7, 9, kDirNone);
_vm->endSceneInit();
}
@@ -1934,16 +1940,16 @@ void Scene05::run() {
switch (_vm->_verbCursor) {
case LOOK_CURSOR:
if (_vm->isFlag(kGFKeysTaken))
- gnap.playMoan1(_vm->_plat->_pos.x, _vm->_plat->_pos.y);
+ gnap.playMoan1(plat._pos.x, plat._pos.y);
else
- gnap.playScratchingHead(_vm->_plat->_pos.x, _vm->_plat->_pos.y);
+ gnap.playScratchingHead(plat._pos.x, plat._pos.y);
break;
case GRAB_CURSOR:
gnap.kissPlatypus(0);
break;
case TALK_CURSOR:
- gnap.playBrainPulsating(_vm->_plat->_pos.x, _vm->_plat->_pos.y);
- _vm->_plat->playSequence(_vm->_plat->getSequenceId());
+ gnap.playBrainPulsating(plat._pos.x, plat._pos.y);
+ plat.playSequence(plat.getSequenceId());
break;
case PLAT_CURSOR:
gnap.playImpossible(0, 0);
@@ -1954,7 +1960,7 @@ void Scene05::run() {
break;
case kHS05Haystack:
- if (gnap._actionStatus < 0 && _vm->_plat->_actionStatus < 0) {
+ if (gnap._actionStatus < 0 && plat._actionStatus < 0) {
if (_vm->_grabCursorSpriteIndex >= 0) {
gnap.playShowCurrItem(_vm->_hotspotsWalkPos[1].x - 2, _vm->_hotspotsWalkPos[1].y, 4, 5);
} else if (_vm->isFlag(kGFNeedleTaken)) {
@@ -1971,13 +1977,13 @@ void Scene05::run() {
case PLAT_CURSOR:
if (_vm->isFlag(kGFPlatypus)) {
gnap.useDeviceOnPlatypus();
- if (_vm->_plat->walkTo(_vm->_hotspotsWalkPos[1], 1, 0x107C2, 1)) {
- _vm->_plat->_actionStatus = kAS05PlatSearchHaystack;
- _vm->_plat->_idleFacing = kDirUnk4;
+ if (plat.walkTo(_vm->_hotspotsWalkPos[1], 1, 0x107C2, 1)) {
+ plat._actionStatus = kAS05PlatSearchHaystack;
+ plat._idleFacing = kDirUnk4;
}
if (gnap._pos.x == 4 && (gnap._pos.y == 8 || gnap._pos.y == 7))
gnap.walkStep();
- gnap.playIdle(_vm->_plat->_pos.x, _vm->_plat->_pos.y);
+ gnap.playIdle(plat._pos.x, plat._pos.y);
}
break;
}
@@ -2082,7 +2088,7 @@ void Scene05::run() {
gnap.walkTo(_vm->_hotspotsWalkPos[4], 0, 0x107AF, 1);
gnap._actionStatus = kAS05LeaveScene;
if (_vm->isFlag(kGFPlatypus))
- _vm->_plat->walkTo(_vm->_hotspotsWalkPos[4] + Common::Point(0, 1), -1, 0x107C7, 1);
+ plat.walkTo(_vm->_hotspotsWalkPos[4] + Common::Point(0, 1), -1, 0x107C7, 1);
if (_vm->_cursorValue == 1)
_vm->_newSceneNum = 4;
else
@@ -2116,7 +2122,7 @@ void Scene05::run() {
if (!_vm->_isLeavingScene) {
if (_vm->isFlag(kGFPlatypus))
- _vm->_plat->updateIdleSequence();
+ plat.updateIdleSequence();
gnap.updateIdleSequence();
if (!_vm->_timers[5]) {
_vm->_timers[5] = _vm->getRandom(20) + 30;
@@ -2212,27 +2218,28 @@ void Scene05::updateAnimations() {
}
if (gameSys.getAnimationStatus(1) == 2) {
- if (_vm->_plat->_sequenceId == 0x146) {
- _vm->_plat->_pos = Common::Point(4, 8);
- gameSys.insertSequence(0x107C1, 160, 0x146, 256, kSeqSyncWait, 0, 300 - _vm->_plat->_gridX, 384 - _vm->_plat->_gridY);
- _vm->_plat->_sequenceId = 0x7C1;
- _vm->_plat->_sequenceDatNum = 1;
- _vm->_plat->_id = 20 * _vm->_plat->_pos.y;
+ PlayerPlat& plat = *_vm->_plat;
+ if (plat._sequenceId == 0x146) {
+ plat._pos = Common::Point(4, 8);
+ gameSys.insertSequence(0x107C1, 160, 0x146, 256, kSeqSyncWait, 0, 300 - plat._gridX, 384 - plat._gridY);
+ plat._sequenceId = 0x7C1;
+ plat._sequenceDatNum = 1;
+ plat._id = 20 * plat._pos.y;
_vm->invAdd(kItemNeedle);
_vm->setFlag(kGFNeedleTaken);
_vm->setGrabCursorSprite(kItemNeedle);
_vm->showCursor();
_vm->_timers[1] = 30;
- _vm->_plat->_actionStatus = -1;
+ plat._actionStatus = -1;
}
- if (_vm->_plat->_actionStatus == kAS05PlatSearchHaystack) {
+ if (plat._actionStatus == kAS05PlatSearchHaystack) {
gameSys.setAnimation(0, 0, 1);
- gameSys.insertSequence(0x145, _vm->_plat->_id, _vm->_plat->_sequenceId | (_vm->_plat->_sequenceDatNum << 16), _vm->_plat->_id, kSeqSyncWait, 0, 0, 0);
- gameSys.insertSequence(0x146, 256, 0x145, _vm->_plat->_id, kSeqSyncWait, 0, 0, 0);
+ gameSys.insertSequence(0x145, plat._id, plat._sequenceId | (plat._sequenceDatNum << 16), plat._id, kSeqSyncWait, 0, 0, 0);
+ gameSys.insertSequence(0x146, 256, 0x145, plat._id, kSeqSyncWait, 0, 0, 0);
_vm->hideCursor();
_vm->setGrabCursorSprite(-1);
- _vm->_plat->_sequenceId = 0x146;
- _vm->_plat->_sequenceDatNum = 0;
+ plat._sequenceId = 0x146;
+ plat._sequenceDatNum = 0;
gameSys.setAnimation(0x146, 256, 1);
_vm->_timers[1] = 300;
}
@@ -2303,6 +2310,8 @@ void Scene06::updateHotspots() {
void Scene06::run() {
GameSys& gameSys = *_vm->_gameSys;
PlayerGnap& gnap = *_vm->_gnap;
+ PlayerPlat& plat = *_vm->_plat;
+
bool triedDeviceOnGas = false;
_vm->startSoundTimerC(7);
@@ -2327,10 +2336,10 @@ void Scene06::run() {
_vm->queueInsertDeviceIcon();
gnap.initPos(5, 12, kDirBottomRight);
- _vm->_plat->initPos(6, 12, kDirNone);
+ plat.initPos(6, 12, kDirNone);
_vm->endSceneInit();
- _vm->_plat->walkTo(Common::Point(6, 8), -1, 0x107C2, 1);
+ plat.walkTo(Common::Point(6, 8), -1, 0x107C2, 1);
gnap.walkTo(Common::Point(5, 8), -1, 0x107B9, 1);
while (!_vm->_sceneDone) {
@@ -2360,16 +2369,16 @@ void Scene06::run() {
switch (_vm->_verbCursor) {
case LOOK_CURSOR:
if (_vm->isFlag(kGFKeysTaken))
- gnap.playMoan1(_vm->_plat->_pos.x, _vm->_plat->_pos.y);
+ gnap.playMoan1(plat._pos.x, plat._pos.y);
else
- gnap.playScratchingHead(_vm->_plat->_pos.x, _vm->_plat->_pos.y);
+ gnap.playScratchingHead(plat._pos.x, plat._pos.y);
break;
case GRAB_CURSOR:
gnap.kissPlatypus(0);
break;
case TALK_CURSOR:
- gnap.playBrainPulsating(_vm->_plat->_pos.x, _vm->_plat->_pos.y);
- _vm->_plat->playSequence(_vm->_plat->getSequenceId());
+ gnap.playBrainPulsating(plat._pos.x, plat._pos.y);
+ plat.playSequence(plat.getSequenceId());
break;
case PLAT_CURSOR:
gnap.playImpossible(0, 0);
@@ -2447,8 +2456,8 @@ void Scene06::run() {
gnap.walkTo(_vm->_hotspotsWalkPos[3], 0, 0x107BC, 1);
_vm->_hotspots[kHS06WalkArea5]._flags &= ~SF_WALKABLE;
gnap._idleFacing = kDirUpLeft;
- _vm->_plat->walkTo(Common::Point(6, 8), 1, 0x107C2, 1);
- _vm->_plat->_idleFacing = kDirNone;
+ plat.walkTo(Common::Point(6, 8), 1, 0x107C2, 1);
+ plat._idleFacing = kDirNone;
gnap._actionStatus = kAS06UseTwigOnHorse;
_vm->setGrabCursorSprite(-1);
} else if (_vm->_grabCursorSpriteIndex >= 0) {
@@ -2511,13 +2520,13 @@ void Scene06::run() {
updateAnimations();
if (!_vm->_isLeavingScene) {
- if (_vm->_plat->_actionStatus < 0)
- _vm->_plat->updateIdleSequence();
+ if (plat._actionStatus < 0)
+ plat.updateIdleSequence();
if (gnap._actionStatus < 0)
gnap.updateIdleSequence();
if (!_vm->_timers[4]) {
_vm->_timers[4] = _vm->getRandom(40) + 25;
- if (gnap._actionStatus < 0 && _vm->_plat->_actionStatus < 0 && _nextHorseSequenceId == -1) {
+ if (gnap._actionStatus < 0 && plat._actionStatus < 0 && _nextHorseSequenceId == -1) {
if (_horseTurnedBack) {
_nextHorseSequenceId = 0xF5;
} else {
@@ -2555,6 +2564,7 @@ void Scene06::run() {
void Scene06::updateAnimations() {
GameSys& gameSys = *_vm->_gameSys;
PlayerGnap& gnap = *_vm->_gnap;
+ PlayerPlat& plat = *_vm->_plat;
if (gameSys.getAnimationStatus(0) == 2) {
gameSys.setAnimation(0, 0, 0);
@@ -2595,17 +2605,17 @@ void Scene06::updateAnimations() {
if (gameSys.getAnimationStatus(1) == 2) {
gameSys.setAnimation(0, 0, 1);
- if (_vm->_plat->_sequenceId == 0xFA) {
+ if (plat._sequenceId == 0xFA) {
gameSys.setAnimation(0, 0, 1);
_vm->invAdd(kItemGas);
_vm->setFlag(kGFGasTaken);
_vm->_hotspots[kHS06Ladder]._flags = SF_DISABLED;
_vm->setGrabCursorSprite(kItemGas);
- _vm->_plat->_actionStatus = -1;
- _vm->_plat->_pos = Common::Point(6, 8);
- gameSys.insertSequence(0x107C1, _vm->_plat->_id, 0, 0, kSeqNone, 0, 450 - _vm->_plat->_gridX, 384 - _vm->_plat->_gridY);
- _vm->_plat->_sequenceId = 0x7C1;
- _vm->_plat->_sequenceDatNum = 1;
+ plat._actionStatus = -1;
+ plat._pos = Common::Point(6, 8);
+ gameSys.insertSequence(0x107C1, plat._id, 0, 0, kSeqNone, 0, 450 - plat._gridX, 384 - plat._gridY);
+ plat._sequenceId = 0x7C1;
+ plat._sequenceDatNum = 1;
_vm->setFlag(kGFUnk04);
gnap._actionStatus = -1;
_vm->showCursor();
@@ -2613,7 +2623,7 @@ void Scene06::updateAnimations() {
if (_nextPlatSequenceId == 0xFB) {
gameSys.setAnimation(0, 0, 1);
_nextHorseSequenceId = 0xF2;
- _vm->_plat->_actionStatus = 6;
+ plat._actionStatus = 6;
}
}
@@ -2626,10 +2636,10 @@ void Scene06::updateAnimations() {
gameSys.insertSequence(0xF2, 120, _currHorseSequenceId, 120, kSeqSyncWait, 0, 0, 0);
gameSys.insertSequence(0x100, gnap._id, makeRid(gnap._sequenceDatNum, gnap._sequenceId), gnap._id, kSeqSyncWait, 0, 0, 0);
gameSys.insertSequence(0xF7, 20, 0xF8, 20, kSeqSyncWait, 0, 0, 0);
- gameSys.insertSequence(0xFB, _vm->_plat->_id, _vm->_plat->_sequenceId | (_vm->_plat->_sequenceDatNum << 16), _vm->_plat->_id, kSeqSyncWait, 0, 0, 0);
- gameSys.insertSequence(0xFA, 256, 0xFB, _vm->_plat->_id, kSeqSyncWait, 0, 0, 0);
- _vm->_plat->_sequenceId = 0xFA;
- _vm->_plat->_sequenceDatNum = 0;
+ gameSys.insertSequence(0xFB, plat._id, plat._sequenceId | (plat._sequenceDatNum << 16), plat._id, kSeqSyncWait, 0, 0, 0);
+ gameSys.insertSequence(0xFA, 256, 0xFB, plat._id, kSeqSyncWait, 0, 0, 0);
+ plat._sequenceId = 0xFA;
+ plat._sequenceDatNum = 0;
gameSys.insertSequence(0x107B7, gnap._id, 0x100, gnap._id,
kSeqSyncWait, 0, 75 * gnap._pos.x - gnap._gridX, 48 * gnap._pos.y - gnap._gridY);
gnap._sequenceId = 0x7B7;
@@ -2682,6 +2692,7 @@ void Scene07::updateHotspots() {
void Scene07::run() {
GameSys& gameSys = *_vm->_gameSys;
PlayerGnap& gnap = *_vm->_gnap;
+ PlayerPlat& plat = *_vm->_plat;
_vm->queueInsertDeviceIcon();
gameSys.insertSequence(0x8C, 1, 0, 0, kSeqLoop, 0, 0, 0);
@@ -2695,7 +2706,7 @@ void Scene07::run() {
if (_vm->_prevSceneNum == 8) {
gnap.initPos(7, 7, kDirBottomLeft);
- _vm->_plat->initPos(9, 7, kDirUnk4);
+ plat.initPos(9, 7, kDirUnk4);
_vm->endSceneInit();
} else {
gnap._pos = Common::Point(6, 7);
@@ -2706,11 +2717,11 @@ void Scene07::run() {
gameSys.insertSequence(0x8F, 140, 0, 0, kSeqNone, 0, 0, 0);
gameSys.setAnimation(makeRid(gnap._sequenceDatNum, gnap._sequenceId), gnap._id, 0);
gnap._actionStatus = kAS07Wait;
- _vm->_plat->_pos = Common::Point(3, 8);
- _vm->_plat->_id = 160;
- _vm->_plat->_sequenceId = 0x91;
- _vm->_plat->_sequenceDatNum = 0;
- _vm->_plat->_idleFacing = kDirNone;
+ plat._pos = Common::Point(3, 8);
+ plat._id = 160;
+ plat._sequenceId = 0x91;
+ plat._sequenceDatNum = 0;
+ plat._idleFacing = kDirNone;
gameSys.insertSequence(0x91, 160, 0, 0, kSeqNone, 0, 0, 0);
_vm->endSceneInit();
}
@@ -2735,14 +2746,14 @@ void Scene07::run() {
case kHS07Platypus:
switch (_vm->_verbCursor) {
case LOOK_CURSOR:
- gnap.playMoan1(_vm->_plat->_pos.x, _vm->_plat->_pos.y);
+ gnap.playMoan1(plat._pos.x, plat._pos.y);
break;
case GRAB_CURSOR:
gnap.kissPlatypus(0);
break;
case TALK_CURSOR:
- gnap.playBrainPulsating(_vm->_plat->_pos.x, _vm->_plat->_pos.y);
- _vm->_plat->playSequence(_vm->_plat->getSequenceId());
+ gnap.playBrainPulsating(plat._pos.x, plat._pos.y);
+ plat.playSequence(plat.getSequenceId());
break;
case PLAT_CURSOR:
break;
@@ -2815,38 +2826,38 @@ void Scene07::run() {
if (!_vm->_isLeavingScene) {
gnap.updateIdleSequence();
- if (_vm->_plat->_actionStatus < 0 && gnap._actionStatus < 0) {
+ if (plat._actionStatus < 0 && gnap._actionStatus < 0) {
if (_vm->_timers[0]) {
if (!_vm->_timers[1]) {
_vm->_timers[1] = _vm->getRandom(20) + 30;
int gnapRandomValue = _vm->getRandom(20);
// TODO Cleanup
- if (_vm->_plat->_idleFacing != kDirNone) {
- if (gnapRandomValue != 0 || _vm->_plat->_sequenceId != 0x7CA) {
- if (gnapRandomValue != 1 || _vm->_plat->_sequenceId != 0x7CA) {
- if (_vm->_plat->_pos.y == 9)
- _vm->_plat->playSequence(0x107CA);
+ if (plat._idleFacing != kDirNone) {
+ if (gnapRandomValue != 0 || plat._sequenceId != 0x7CA) {
+ if (gnapRandomValue != 1 || plat._sequenceId != 0x7CA) {
+ if (plat._pos.y == 9)
+ plat.playSequence(0x107CA);
} else {
- _vm->_plat->playSequence(0x10845);
+ plat.playSequence(0x10845);
}
} else {
- _vm->_plat->playSequence(0x107CC);
+ plat.playSequence(0x107CC);
}
- } else if (gnapRandomValue != 0 || _vm->_plat->_sequenceId != 0x7C9) {
- if (gnapRandomValue != 1 || _vm->_plat->_sequenceId != 0x7C9) {
- if (_vm->_plat->_pos.y == 9)
- _vm->_plat->playSequence(0x107C9);
+ } else if (gnapRandomValue != 0 || plat._sequenceId != 0x7C9) {
+ if (gnapRandomValue != 1 || plat._sequenceId != 0x7C9) {
+ if (plat._pos.y == 9)
+ plat.playSequence(0x107C9);
} else {
- _vm->_plat->playSequence(0x10844);
+ plat.playSequence(0x10844);
}
} else {
- _vm->_plat->playSequence(0x107CB);
+ plat.playSequence(0x107CB);
}
- gameSys.setAnimation(_vm->_plat->_sequenceId | (_vm->_plat->_sequenceDatNum << 16), _vm->_plat->_id, 1);
+ gameSys.setAnimation(plat._sequenceId | (plat._sequenceDatNum << 16), plat._id, 1);
}
} else {
_vm->_timers[0] = _vm->getRandom(75) + 75;
- _vm->_plat->makeRoom();
+ plat.makeRoom();
}
} else {
_vm->_timers[0] = 100;
@@ -2937,6 +2948,7 @@ void Scene08::updateAnimationsCb() {
void Scene08::run() {
GameSys& gameSys = *_vm->_gameSys;
PlayerGnap& gnap = *_vm->_gnap;
+ PlayerPlat& plat = *_vm->_plat;
_vm->queueInsertDeviceIcon();
@@ -2967,12 +2979,12 @@ void Scene08::run() {
gameSys.insertSequence(0x146, 1, 0, 0, kSeqNone, 0, 0, 0);
gnap.initPos(-1, 8, kDirBottomRight);
- _vm->_plat->initPos(-1, 7, kDirNone);
+ plat.initPos(-1, 7, kDirNone);
_vm->endSceneInit();
gnap.walkTo(Common::Point(1, 8), -1, 0x107B9, 1);
- _vm->_plat->walkTo(Common::Point(1, 7), -1, 0x107C2, 1);
+ plat.walkTo(Common::Point(1, 7), -1, 0x107C2, 1);
_vm->_timers[5] = _vm->getRandom(40) + 50;
@@ -3005,17 +3017,17 @@ void Scene08::run() {
switch (_vm->_verbCursor) {
case LOOK_CURSOR:
if (_vm->isFlag(kGFSceneFlag1))
- gnap.playMoan1(_vm->_plat->_pos.x, _vm->_plat->_pos.y);
+ gnap.playMoan1(plat._pos.x, plat._pos.y);
else
- gnap.playScratchingHead(_vm->_plat->_pos.x, _vm->_plat->_pos.y);
+ gnap.playScratchingHead(plat._pos.x, plat._pos.y);
break;
case GRAB_CURSOR:
gnap.actionIdle(0x14D);
gnap.kissPlatypus(8);
break;
case TALK_CURSOR:
- gnap.playBrainPulsating(_vm->_plat->_pos.x, _vm->_plat->_pos.y);
- _vm->_plat->playSequence(_vm->_plat->getSequenceId());
+ gnap.playBrainPulsating(plat._pos.x, plat._pos.y);
+ plat.playSequence(plat.getSequenceId());
break;
case PLAT_CURSOR:
break;
@@ -3028,7 +3040,7 @@ void Scene08::run() {
gnap.actionIdle(0x14D);
gnap.walkTo(Common::Point(0, 6), 0, 0x107AF, 1);
gnap._actionStatus = kAS08LeaveScene;
- _vm->_plat->walkTo(Common::Point(0, 7), 1, 0x107CF, 1);
+ plat.walkTo(Common::Point(0, 7), 1, 0x107CF, 1);
_vm->_newSceneNum = 9;
break;
@@ -3037,7 +3049,7 @@ void Scene08::run() {
gnap.actionIdle(0x14D);
gnap.walkTo(Common::Point(3, 9), 0, 0x107AE, 1);
gnap._actionStatus = kAS08LeaveScene;
- _vm->_plat->walkTo(Common::Point(4, 9), 1, 0x107C1, 1);
+ plat.walkTo(Common::Point(4, 9), 1, 0x107C1, 1);
_vm->_newSceneNum = 7;
break;
@@ -3064,9 +3076,9 @@ void Scene08::run() {
case PLAT_CURSOR:
gnap.actionIdle(0x14D);
gnap.useDeviceOnPlatypus();
- _vm->_plat->walkTo(Common::Point(6, 6), 1, 0x107C2, 1);
- _vm->_plat->_actionStatus = kAS08PlatWithMan;
- _vm->_plat->_idleFacing = kDirNone;
+ plat.walkTo(Common::Point(6, 6), 1, 0x107C2, 1);
+ plat._actionStatus = kAS08PlatWithMan;
+ plat._idleFacing = kDirNone;
gnap.playIdle(6, 6);
break;
}
@@ -3100,9 +3112,9 @@ void Scene08::run() {
_vm->setFlag(kGFSceneFlag1);
gnap.actionIdle(0x14D);
gnap.useDeviceOnPlatypus();
- _vm->_plat->walkTo(Common::Point(3, 7), 1, 0x107C2, 1);
- _vm->_plat->_actionStatus = kAS08PlatWithDog;
- _vm->_plat->_idleFacing = kDirNone;
+ plat.walkTo(Common::Point(3, 7), 1, 0x107C2, 1);
+ plat._actionStatus = kAS08PlatWithDog;
+ plat._idleFacing = kDirNone;
gnap.playIdle(3, 7);
break;
}
@@ -3205,11 +3217,11 @@ void Scene08::run() {
updateAnimations();
if (!_vm->_isLeavingScene) {
- _vm->_plat->updateIdleSequence();
+ plat.updateIdleSequence();
gnap.updateIdleSequence();
if (!_vm->_timers[4]) {
_vm->_timers[4] = _vm->getRandom(50) + 125;
- if (gnap._actionStatus < 0 && _vm->_plat->_actionStatus < 0 && _nextManSequenceId == -1 &&
+ if (gnap._actionStatus < 0 && plat._actionStatus < 0 && _nextManSequenceId == -1 &&
(_currDogSequenceId == 0x134 || _currDogSequenceId == 0x135)) {
int _gnapRandomValue = _vm->getRandom(4);
switch (_gnapRandomValue) {
@@ -3248,6 +3260,7 @@ void Scene08::run() {
void Scene08::updateAnimations() {
GameSys& gameSys = *_vm->_gameSys;
PlayerGnap& gnap = *_vm->_gnap;
+ PlayerPlat& plat = *_vm->_plat;
if (gameSys.getAnimationStatus(0) == 2) {
gameSys.setAnimation(0, 0, 0);
@@ -3287,13 +3300,13 @@ void Scene08::updateAnimations() {
if (gameSys.getAnimationStatus(1) == 2) {
gameSys.setAnimation(0, 0, 1);
- switch (_vm->_plat->_actionStatus) {
+ switch (plat._actionStatus) {
case kAS08PlatWithDog:
_nextDogSequenceId = 0x147;
break;
case kAS08PlatWithMan:
_nextManSequenceId = 0x140;
- _vm->_plat->_actionStatus = -1;
+ plat._actionStatus = -1;
break;
}
}
@@ -3307,7 +3320,7 @@ void Scene08::updateAnimations() {
if (gameSys.getAnimationStatus(3) == 2) {
if (_currDogSequenceId == 0x147)
- _vm->_plat->_actionStatus = -1;
+ plat._actionStatus = -1;
if (_currDogSequenceId == 0x149 || _currDogSequenceId == 0x14A || _currDogSequenceId == 0x14B) {
if (_vm->getRandom(2) != 0)
_nextManSequenceId = 0x13D;
@@ -3340,14 +3353,14 @@ void Scene08::updateAnimations() {
} else if (_nextDogSequenceId == 0x147) {
gameSys.setAnimation(_nextDogSequenceId, 100, 3);
gameSys.insertSequence(_nextDogSequenceId, 100, _currDogSequenceId, 100, kSeqSyncWait, 0, 0, 0);
- gameSys.insertSequence(0x148, 160, _vm->_plat->_sequenceId | (_vm->_plat->_sequenceDatNum << 16), _vm->_plat->_id, kSeqSyncWait, 0, 0, 0);
+ gameSys.insertSequence(0x148, 160, plat._sequenceId | (plat._sequenceDatNum << 16), plat._id, kSeqSyncWait, 0, 0, 0);
_currDogSequenceId = _nextDogSequenceId;
_nextDogSequenceId = 0x134;
- _vm->_plat->_pos = Common::Point(1, 8);
- _vm->_plat->_id = 160;
- _vm->_plat->_sequenceId = 0x148;
- _vm->_plat->_idleFacing = kDirUnk4;
- _vm->_plat->_sequenceDatNum = 0;
+ plat._pos = Common::Point(1, 8);
+ plat._id = 160;
+ plat._sequenceId = 0x148;
+ plat._idleFacing = kDirUnk4;
+ plat._sequenceDatNum = 0;
if (gnap._pos == Common::Point(1, 8))
gnap.walkStep();
} else if (_nextDogSequenceId != -1) {
@@ -3393,6 +3406,7 @@ void Scene09::updateHotspots() {
void Scene09::run() {
GameSys& gameSys = *_vm->_gameSys;
PlayerGnap& gnap = *_vm->_gnap;
+ PlayerPlat& plat = *_vm->_plat;
_vm->queueInsertDeviceIcon();
@@ -3401,13 +3415,13 @@ void Scene09::run() {
if (_vm->_prevSceneNum == 8) {
gnap.initPos(11, 8, kDirBottomLeft);
- _vm->_plat->initPos(12, 7, kDirUnk4);
+ plat.initPos(12, 7, kDirUnk4);
_vm->endSceneInit();
gnap.walkTo(Common::Point(9, 8), -1, 0x107BA, 1);
- _vm->_plat->walkTo(Common::Point(9, 7), -1, 0x107D2, 1);
+ plat.walkTo(Common::Point(9, 7), -1, 0x107D2, 1);
} else {
gnap.initPos(4, 7, kDirBottomRight);
- _vm->_plat->initPos(5, 7, kDirNone);
+ plat.initPos(5, 7, kDirNone);
_vm->endSceneInit();
}
@@ -3439,14 +3453,14 @@ void Scene09::run() {
case kHS09Platypus:
switch (_vm->_verbCursor) {
case LOOK_CURSOR:
- gnap.playMoan1(_vm->_plat->_pos.x, _vm->_plat->_pos.y);
+ gnap.playMoan1(plat._pos.x, plat._pos.y);
break;
case GRAB_CURSOR:
gnap.kissPlatypus(0);
break;
case TALK_CURSOR:
- gnap.playBrainPulsating(_vm->_plat->_pos.x, _vm->_plat->_pos.y);
- _vm->_plat->playSequence(_vm->_plat->getSequenceId());
+ gnap.playBrainPulsating(plat._pos.x, plat._pos.y);
+ plat.playSequence(plat.getSequenceId());
break;
case PLAT_CURSOR:
break;
@@ -3458,8 +3472,8 @@ void Scene09::run() {
_vm->_newSceneNum = 10;
gnap.walkTo(Common::Point(4, 7), 0, 0x107BF, 1);
gnap._actionStatus = kAS09LeaveScene;
- _vm->_plat->walkTo(Common::Point(4, 8), -1, 0x107D2, 1);
- _vm->_plat->_idleFacing = kDirUnk4;
+ plat.walkTo(Common::Point(4, 8), -1, 0x107D2, 1);
+ plat._idleFacing = kDirUnk4;
break;
case kHS09ExitHouse:
@@ -3467,8 +3481,8 @@ void Scene09::run() {
_vm->_newSceneNum = 8;
gnap.walkTo(Common::Point(10, -1), 0, 0x107AB, 1);
gnap._actionStatus = kAS09LeaveScene;
- _vm->_plat->walkTo(Common::Point(10, -1), -1, 0x107CD, 1);
- _vm->_plat->_idleFacing = kDirUnk4;
+ plat.walkTo(Common::Point(10, -1), -1, 0x107CD, 1);
+ plat._idleFacing = kDirUnk4;
break;
case kHS09Trash:
@@ -3508,7 +3522,7 @@ void Scene09::run() {
updateAnimations();
if (!_vm->_isLeavingScene && gnap._actionStatus != 1 && gnap._actionStatus != 2) {
- _vm->_plat->updateIdleSequence();
+ plat.updateIdleSequence();
gnap.updateIdleSequence();
if (!_vm->_timers[4]) {
_vm->_timers[4] = _vm->getRandom(150) + 100;
diff --git a/engines/gnap/scenes/group1.cpp b/engines/gnap/scenes/group1.cpp
index d8b2a3ce28..a4e4e9f49c 100644
--- a/engines/gnap/scenes/group1.cpp
+++ b/engines/gnap/scenes/group1.cpp
@@ -60,6 +60,7 @@ void Scene10::updateHotspots() {
void Scene10::run() {
GameSys& gameSys = *_vm->_gameSys;
PlayerGnap& gnap = *_vm->_gnap;
+ PlayerPlat& plat = *_vm->_plat;
_currCookSequenceId = 0x103;
@@ -74,16 +75,16 @@ void Scene10::run() {
if (_vm->_prevSceneNum == 9) {
gnap.initPos(11, 8, kDirBottomLeft);
- _vm->_plat->initPos(12, 7, kDirUnk4);
+ plat.initPos(12, 7, kDirUnk4);
_vm->endSceneInit();
gnap.walkTo(Common::Point(9, 8), -1, 0x107BA, 1);
- _vm->_plat->walkTo(Common::Point(9, 7), -1, 0x107D2, 1);
+ plat.walkTo(Common::Point(9, 7), -1, 0x107D2, 1);
} else {
gnap.initPos(-1, 7, kDirBottomRight);
- _vm->_plat->initPos(-2, 8, kDirNone);
+ plat.initPos(-2, 8, kDirNone);
_vm->endSceneInit();
gnap.walkTo(Common::Point(1, 7), -1, 0x107B9, 1);
- _vm->_plat->walkTo(Common::Point(1, 8), -1, 0x107C2, 1);
+ plat.walkTo(Common::Point(1, 8), -1, 0x107C2, 1);
}
_vm->_timers[4] = _vm->getRandom(80) + 150;
@@ -113,16 +114,16 @@ void Scene10::run() {
switch (_vm->_verbCursor) {
case LOOK_CURSOR:
if (_vm->isFlag(kGFMudTaken))
- gnap.playMoan1(_vm->_plat->_pos.x, _vm->_plat->_pos.y);
+ gnap.playMoan1(plat._pos.x, plat._pos.y);
else
- gnap.playScratchingHead(_vm->_plat->_pos.x, _vm->_plat->_pos.y);
+ gnap.playScratchingHead(plat._pos.x, plat._pos.y);
break;
case GRAB_CURSOR:
gnap.kissPlatypus(10);
break;
case TALK_CURSOR:
- gnap.playBrainPulsating(_vm->_plat->_pos.x, _vm->_plat->_pos.y);
- _vm->_plat->playSequence(_vm->_plat->getSequenceId());
+ gnap.playBrainPulsating(plat._pos.x, plat._pos.y);
+ plat.playSequence(plat.getSequenceId());
break;
case PLAT_CURSOR:
break;
@@ -135,7 +136,7 @@ void Scene10::run() {
gnap.actionIdle(0x10C);
gnap.walkTo(Common::Point(0, 7), 0, 0x107AF, 1);
gnap._actionStatus = kAS10LeaveScene;
- _vm->_plat->walkTo(Common::Point(0, 7), -1, 0x107CF, 1);
+ plat.walkTo(Common::Point(0, 7), -1, 0x107CF, 1);
_vm->_newSceneNum = 11;
break;
@@ -144,7 +145,7 @@ void Scene10::run() {
gnap.actionIdle(0x10C);
gnap.walkTo(Common::Point(2, 9), 0, 0x107AE, 1);
gnap._actionStatus = kAS10LeaveScene;
- _vm->_plat->walkTo(Common::Point(3, 9), -1, 0x107C7, 1);
+ plat.walkTo(Common::Point(3, 9), -1, 0x107C7, 1);
_vm->_newSceneNum = 9;
break;
@@ -171,7 +172,7 @@ void Scene10::run() {
case PLAT_CURSOR:
gnap.actionIdle(0x10C);
gnap.useDeviceOnPlatypus();
- _vm->_plat->walkTo(Common::Point(4, 6), -1, -1, 1);
+ plat.walkTo(Common::Point(4, 6), -1, -1, 1);
gnap.walkTo(Common::Point(4, 8), 0, 0x107BB, 1);
gnap._actionStatus = kAS10AnnoyCook;
break;
@@ -208,7 +209,7 @@ void Scene10::run() {
else {
gnap.actionIdle(0x10C);
gnap.useDeviceOnPlatypus();
- _vm->_plat->walkTo(Common::Point(3, 7), -1, -1, 1);
+ plat.walkTo(Common::Point(3, 7), -1, -1, 1);
gnap.walkTo(Common::Point(4, 8), 0, 0x107BB, 1);
gnap._actionStatus = kAS10AnnoyCook;
}
@@ -241,9 +242,9 @@ void Scene10::run() {
_vm->setFlag(kGFMudTaken);
gnap.actionIdle(0x10C);
gnap.useDeviceOnPlatypus();
- _vm->_plat->walkTo(Common::Point(7, 6), 1, 0x107D2, 1);
- _vm->_plat->_actionStatus = kAS10PlatWithBox;
- _vm->_plat->_idleFacing = kDirUnk4;
+ plat.walkTo(Common::Point(7, 6), 1, 0x107D2, 1);
+ plat._actionStatus = kAS10PlatWithBox;
+ plat._idleFacing = kDirUnk4;
_vm->_largeSprite = gameSys.createSurface(0xC3);
gnap.playIdle(7, 6);
}
@@ -306,7 +307,7 @@ void Scene10::run() {
updateAnimations();
if (!_vm->_isLeavingScene) {
- _vm->_plat->updateIdleSequence();
+ plat.updateIdleSequence();
gnap.updateIdleSequence();
if (!_vm->_timers[4]) {
_vm->_timers[4] = _vm->getRandom(80) + 150;
@@ -344,6 +345,7 @@ void Scene10::run() {
void Scene10::updateAnimations() {
GameSys& gameSys = *_vm->_gameSys;
PlayerGnap& gnap = *_vm->_gnap;
+ PlayerPlat& plat = *_vm->_plat;
if (gameSys.getAnimationStatus(0) == 2) {
gameSys.setAnimation(0, 0, 0);
@@ -359,7 +361,7 @@ void Scene10::updateAnimations() {
if (gameSys.getAnimationStatus(1) == 2) {
gameSys.setAnimation(0, 0, 1);
- switch (_vm->_plat->_actionStatus) {
+ switch (plat._actionStatus) {
case kAS10PlatWithBox:
_nextCookSequenceId = 0x109;
break;
@@ -370,19 +372,19 @@ void Scene10::updateAnimations() {
switch (_nextCookSequenceId) {
case 0x109:
- _vm->_plat->_pos = Common::Point(4, 8);
+ plat._pos = Common::Point(4, 8);
gameSys.insertSequence(0x109, 100, _currCookSequenceId, 100, kSeqSyncWait, 0, 0, 0);
gameSys.insertSequence(0x107C9, 160,
- _vm->_plat->_sequenceId | (_vm->_plat->_sequenceDatNum << 16), _vm->_plat->_id,
+ plat._sequenceId | (plat._sequenceDatNum << 16), plat._id,
kSeqSyncWait, _vm->getSequenceTotalDuration(0x109) + _vm->getSequenceTotalDuration(0x10A) + _vm->getSequenceTotalDuration(0x10843),
- 75 * _vm->_plat->_pos.x - _vm->_plat->_gridX, 48 * _vm->_plat->_pos.y - _vm->_plat->_gridY);
+ 75 * plat._pos.x - plat._gridX, 48 * plat._pos.y - plat._gridY);
gameSys.removeSequence(0x107, 100, true);
_currCookSequenceId = 0x109;
_nextCookSequenceId = 0x843;
- _vm->_plat->_sequenceId = 0x7C9;
- _vm->_plat->_id = 160;
- _vm->_plat->_idleFacing = kDirNone;
- _vm->_plat->_sequenceDatNum = 1;
+ plat._sequenceId = 0x7C9;
+ plat._id = 160;
+ plat._idleFacing = kDirNone;
+ plat._sequenceDatNum = 1;
break;
case 0x843:
_vm->hideCursor();
@@ -400,8 +402,8 @@ void Scene10::updateAnimations() {
_vm->delayTicksCursor(5);
_vm->deleteSurface(&_vm->_largeSprite);
_vm->setGrabCursorSprite(kItemTongs);
- if (_vm->_plat->_actionStatus == kAS10PlatWithBox)
- _vm->_plat->_actionStatus = -1;
+ if (plat._actionStatus == kAS10PlatWithBox)
+ plat._actionStatus = -1;
if (gnap._pos == Common::Point(4, 8))
gnap.walkStep();
break;
@@ -413,7 +415,7 @@ void Scene10::updateAnimations() {
switch (_currCookSequenceId) {
case 0x106:
- if (gnap._actionStatus >= 0 || _vm->_plat->_actionStatus >= 0)
+ if (gnap._actionStatus >= 0 || plat._actionStatus >= 0)
_nextCookSequenceId = 0x106;
else {
int rnd = _vm->getRandom(7);
@@ -434,7 +436,7 @@ void Scene10::updateAnimations() {
}
break;
case 0x103:
- if (gnap._actionStatus >= 0 || _vm->_plat->_actionStatus >= 0)
+ if (gnap._actionStatus >= 0 || plat._actionStatus >= 0)
_nextCookSequenceId = 0x106;
else if (_vm->getRandom(7) == 0)
_nextCookSequenceId = 0x104;
@@ -442,7 +444,7 @@ void Scene10::updateAnimations() {
_nextCookSequenceId = 0x106;
break;
case 0x104:
- if (gnap._actionStatus >= 0 || _vm->_plat->_actionStatus >= 0)
+ if (gnap._actionStatus >= 0 || plat._actionStatus >= 0)
_nextCookSequenceId = 0x106;
else if (_vm->getRandom(7) == 0)
_nextCookSequenceId = 0x103;
@@ -450,7 +452,7 @@ void Scene10::updateAnimations() {
_nextCookSequenceId = 0x106;
break;
case 0x105:
- if (gnap._actionStatus >= 0 || _vm->_plat->_actionStatus >= 0)
+ if (gnap._actionStatus >= 0 || plat._actionStatus >= 0)
_nextCookSequenceId = 0x106;
else {
int rnd = _vm->getRandom(7);
@@ -472,7 +474,7 @@ void Scene10::updateAnimations() {
gnap._idleFacing = kDirUpRight;
gnap._sequenceDatNum = 0;
gnap._actionStatus = -1;
- _vm->_plat->_actionStatus = -1;
+ plat._actionStatus = -1;
break;
}
if (_currCookSequenceId == 0x843)
@@ -536,6 +538,7 @@ void Scene11::updateHotspots() {
void Scene11::run() {
GameSys& gameSys = *_vm->_gameSys;
PlayerGnap& gnap = *_vm->_gnap;
+ PlayerPlat& plat = *_vm->_plat;
bool flag = true;
@@ -548,22 +551,22 @@ void Scene11::run() {
switch (_vm->_prevSceneNum) {
case 13:
gnap.initPos(8, 5, kDirBottomLeft);
- _vm->_plat->initPos(9, 6, kDirUnk4);
+ plat.initPos(9, 6, kDirUnk4);
break;
case 47:
gnap.initPos(8, 5, kDirBottomLeft);
- _vm->_plat->initPos(9, 5, kDirUnk4);
+ plat.initPos(9, 5, kDirUnk4);
_currGoggleGuySequenceId = 0x1FA;
_currHookGuySequenceId = 0x1FF;
_vm->_timers[7] = 180;
break;
case 12:
gnap.initPos(-1, 9, kDirBottomRight);
- _vm->_plat->initPos(-2, 8, kDirNone);
+ plat.initPos(-2, 8, kDirNone);
break;
default:
gnap.initPos(6, 6, kDirBottomLeft);
- _vm->_plat->initPos(6, 5, kDirUnk4);
+ plat.initPos(6, 5, kDirUnk4);
break;
}
@@ -587,7 +590,7 @@ void Scene11::run() {
if (_vm->_prevSceneNum == 12) {
gnap.walkTo(Common::Point(2, 8), -1, 0x107B9, 1);
- _vm->_plat->walkTo(Common::Point(1, 8), -1, 0x107C2, 1);
+ plat.walkTo(Common::Point(1, 8), -1, 0x107C2, 1);
}
gameSys.insertSequence(0x208, 256, 0, 0, kSeqNone, 40, 0, 0);
@@ -608,14 +611,14 @@ void Scene11::run() {
} else {
switch (_vm->_verbCursor) {
case LOOK_CURSOR:
- gnap.playMoan1(_vm->_plat->_pos.x, _vm->_plat->_pos.y);
+ gnap.playMoan1(plat._pos.x, plat._pos.y);
break;
case GRAB_CURSOR:
gnap.kissPlatypus(0);
break;
case TALK_CURSOR:
- gnap.playBrainPulsating(_vm->_plat->_pos.x, _vm->_plat->_pos.y);
- _vm->_plat->playSequence(_vm->_plat->getSequenceId());
+ gnap.playBrainPulsating(plat._pos.x, plat._pos.y);
+ plat.playSequence(plat.getSequenceId());
break;
case PLAT_CURSOR:
break;
@@ -627,7 +630,7 @@ void Scene11::run() {
_vm->_isLeavingScene = true;
gnap.walkTo(Common::Point(6, 5), 0, 0x107BF, 1);
gnap._actionStatus = kAS11LeaveScene;
- _vm->_plat->walkTo(Common::Point(6, 6), -1, -1, 1);
+ plat.walkTo(Common::Point(6, 6), -1, -1, 1);
_vm->_newSceneNum = 10;
break;
@@ -635,7 +638,7 @@ void Scene11::run() {
_vm->_isLeavingScene = true;
gnap.walkTo(Common::Point(8, 5), 0, 0x107BF, 1);
gnap._actionStatus = kAS11LeaveScene;
- _vm->_plat->walkTo(Common::Point(8, 6), -1, -1, 1);
+ plat.walkTo(Common::Point(8, 6), -1, -1, 1);
_vm->_newSceneNum = 13;
break;
@@ -643,7 +646,7 @@ void Scene11::run() {
_vm->_isLeavingScene = true;
gnap.walkTo(Common::Point(-1, 8), 0, 0x107AF, 1);
gnap._actionStatus = kAS11LeaveScene;
- _vm->_plat->walkTo(Common::Point(-1, 9), -1, 0x107CF, 1);
+ plat.walkTo(Common::Point(-1, 9), -1, 0x107CF, 1);
_vm->_newSceneNum = 12;
break;
@@ -758,11 +761,11 @@ void Scene11::run() {
gameSys.setAnimation(0x207, 257, 4);
gameSys.insertSequence(0x207, 257, 0, 0, kSeqNone, 0, 0, 0);
}
- _vm->_plat->updateIdleSequence2();
+ plat.updateIdleSequence2();
gnap.updateIdleSequence2();
if (!_vm->_timers[5]) {
_vm->_timers[5] = _vm->getRandom(100) + 75;
- if (gnap._actionStatus < 0 && _vm->_plat->_actionStatus < 0 && _nextGoggleGuySequenceId == -1) {
+ if (gnap._actionStatus < 0 && plat._actionStatus < 0 && _nextGoggleGuySequenceId == -1) {
if (_vm->getRandom(2))
_nextGoggleGuySequenceId = 0x1F6;
else
@@ -771,7 +774,7 @@ void Scene11::run() {
}
if (!_vm->_timers[4]) {
_vm->_timers[4] = _vm->getRandom(40) + 20;
- if (gnap._actionStatus < 0 && _vm->_plat->_actionStatus < 0 && _nextHookGuySequenceId == -1) {
+ if (gnap._actionStatus < 0 && plat._actionStatus < 0 && _nextHookGuySequenceId == -1) {
if (_currHookGuySequenceId == 0x201) {
switch (_vm->getRandom(7)) {
case 0:
@@ -967,6 +970,8 @@ void Scene12::updateHotspots() {
void Scene12::run() {
GameSys& gameSys = *_vm->_gameSys;
PlayerGnap& gnap = *_vm->_gnap;
+ PlayerPlat& plat = *_vm->_plat;
+
int v18 = 1;
_vm->queueInsertDeviceIcon();
@@ -998,14 +1003,14 @@ void Scene12::run() {
if (_vm->_prevSceneNum == 15) {
gnap.initPos(5, 6, kDirBottomRight);
- _vm->_plat->initPos(3, 7, kDirNone);
+ plat.initPos(3, 7, kDirNone);
_vm->endSceneInit();
} else {
gnap.initPos(11, 8, kDirBottomLeft);
- _vm->_plat->initPos(12, 8, kDirUnk4);
+ plat.initPos(12, 8, kDirUnk4);
_vm->endSceneInit();
gnap.walkTo(Common::Point(8, 8), -1, 0x107BA, 1);
- _vm->_plat->walkTo(Common::Point(9, 8), -1, 0x107D2, 1);
+ plat.walkTo(Common::Point(9, 8), -1, 0x107D2, 1);
}
while (!_vm->_sceneDone) {
@@ -1029,14 +1034,14 @@ void Scene12::run() {
case kHS12Platypus:
switch (_vm->_verbCursor) {
case LOOK_CURSOR:
- gnap.playMoan1(_vm->_plat->_pos.x, _vm->_plat->_pos.y);
+ gnap.playMoan1(plat._pos.x, plat._pos.y);
break;
case GRAB_CURSOR:
gnap.kissPlatypus(0);
break;
case TALK_CURSOR:
- gnap.playBrainPulsating(_vm->_plat->_pos.x, _vm->_plat->_pos.y);
- _vm->_plat->playSequence(_vm->_plat->getSequenceId());
+ gnap.playBrainPulsating(plat._pos.x, plat._pos.y);
+ plat.playSequence(plat.getSequenceId());
break;
case PLAT_CURSOR:
break;
@@ -1047,7 +1052,7 @@ void Scene12::run() {
_vm->_isLeavingScene = true;
gnap.walkTo(Common::Point(10, -1), 0, 0x107AB, 1);
gnap._actionStatus = kAS12LeaveScene;
- _vm->_plat->walkTo(Common::Point(10, -1), -1, -1, 1);
+ plat.walkTo(Common::Point(10, -1), -1, -1, 1);
_vm->_newSceneNum = 11;
break;
@@ -1085,9 +1090,9 @@ void Scene12::run() {
break;
case PLAT_CURSOR:
gnap.useDeviceOnPlatypus();
- _vm->_plat->walkTo(Common::Point(3, 7), 1, 0x107D2, 1);
- _vm->_plat->_actionStatus = kAS12PlatWithToothGuy;
- _vm->_plat->_idleFacing = kDirUnk4;
+ plat.walkTo(Common::Point(3, 7), 1, 0x107D2, 1);
+ plat._actionStatus = kAS12PlatWithToothGuy;
+ plat._idleFacing = kDirUnk4;
gnap.playIdle(2, 7);
break;
}
@@ -1121,7 +1126,7 @@ void Scene12::run() {
gnap._actionStatus = kAS12TalkBarkeeper;
break;
case PLAT_CURSOR:
- gnap.playPullOutDevice(_vm->_plat->_pos.x, _vm->_plat->_pos.y);
+ gnap.playPullOutDevice(plat._pos.x, plat._pos.y);
gameSys.setAnimation(makeRid(gnap._sequenceDatNum, gnap._sequenceId), gnap._id, 0);
gnap._actionStatus = kAS12PlatWithBarkeeper;
break;
@@ -1155,9 +1160,9 @@ void Scene12::run() {
break;
case PLAT_CURSOR:
gnap.useDeviceOnPlatypus();
- _vm->_plat->walkTo(Common::Point(7, 6), 1, 0x107C2, 1);
- _vm->_plat->_actionStatus = kAS12PlatWithBeardGuy;
- _vm->_plat->_idleFacing = kDirNone;
+ plat.walkTo(Common::Point(7, 6), 1, 0x107C2, 1);
+ plat._actionStatus = kAS12PlatWithBeardGuy;
+ plat._idleFacing = kDirNone;
gnap.playIdle(7, 6);
break;
}
@@ -1191,12 +1196,12 @@ void Scene12::run() {
updateAnimations();
if (!_vm->_isLeavingScene) {
- _vm->_plat->updateIdleSequence();
+ plat.updateIdleSequence();
gnap.updateIdleSequence();
if (!_vm->_timers[4]) {
_vm->_timers[4] = 15;
if (_nextToothGuySequenceId == -1) {
- if (v18 == 0 && _currBeardGuySequenceId == 0x202 && _currBarkeeperSequenceId == 0x203 && gnap._actionStatus < 0 && _vm->_plat->_actionStatus < 0) {
+ if (v18 == 0 && _currBeardGuySequenceId == 0x202 && _currBarkeeperSequenceId == 0x203 && gnap._actionStatus < 0 && plat._actionStatus < 0) {
if (_vm->getRandom(2) != 0)
_nextToothGuySequenceId = 0x1EC;
else
@@ -1208,8 +1213,8 @@ void Scene12::run() {
}
if (!_vm->_timers[5]) {
_vm->_timers[5] = _vm->getRandom(30) + 20;
- if (_nextBarkeeperSequenceId == -1 && gnap._actionStatus < 0 && _vm->_plat->_actionStatus < 0) {
- if (v18 == 0 && _currToothGuySequenceId == 0x200 && _currBeardGuySequenceId == 0x202 && gnap._actionStatus < 0 && _vm->_plat->_actionStatus < 0) {
+ if (_nextBarkeeperSequenceId == -1 && gnap._actionStatus < 0 && plat._actionStatus < 0) {
+ if (v18 == 0 && _currToothGuySequenceId == 0x200 && _currBeardGuySequenceId == 0x202 && gnap._actionStatus < 0 && plat._actionStatus < 0) {
if (_vm->getRandom(2) != 0)
_nextBarkeeperSequenceId = 0x208;
else
@@ -1221,8 +1226,8 @@ void Scene12::run() {
}
if (!_vm->_timers[6]) {
_vm->_timers[6] = _vm->getRandom(30) + 15;
- if (_nextBeardGuySequenceId == -1 && gnap._actionStatus < 0 && _vm->_plat->_actionStatus < 0) {
- if (v18 == 0 && _currToothGuySequenceId == 0x200 && _currBarkeeperSequenceId == 0x203 && gnap._actionStatus < 0 && _vm->_plat->_actionStatus < 0)
+ if (_nextBeardGuySequenceId == -1 && gnap._actionStatus < 0 && plat._actionStatus < 0) {
+ if (v18 == 0 && _currToothGuySequenceId == 0x200 && _currBarkeeperSequenceId == 0x203 && gnap._actionStatus < 0 && plat._actionStatus < 0)
_nextBeardGuySequenceId = 0x1F2;
else
_nextBeardGuySequenceId = 0x202;
@@ -1264,6 +1269,7 @@ void Scene12::run() {
void Scene12::updateAnimations() {
GameSys& gameSys = *_vm->_gameSys;
PlayerGnap& gnap = *_vm->_gnap;
+ PlayerPlat& plat = *_vm->_plat;
if (gameSys.getAnimationStatus(0) == 2) {
gameSys.setAnimation(0, 0, 0);
@@ -1359,7 +1365,7 @@ void Scene12::updateAnimations() {
if (gameSys.getAnimationStatus(1) == 2) {
gameSys.setAnimation(0, 0, 1);
- switch (_vm->_plat->_actionStatus) {
+ switch (plat._actionStatus) {
case kAS12PlatWithToothGuy:
_nextToothGuySequenceId = 0x1EB;
break;
@@ -1407,8 +1413,8 @@ void Scene12::updateAnimations() {
if (gnap._actionStatus >= kAS12TalkToothGuy && gnap._actionStatus <= kAS12QuarterToToothGuy && _currToothGuySequenceId != 0x1E9 &&
_currToothGuySequenceId != 0x1EC && _currToothGuySequenceId != 0x200)
gnap._actionStatus = -1;
- if (_vm->_plat->_actionStatus == kAS12PlatWithToothGuy)
- _vm->_plat->_actionStatus = -1;
+ if (plat._actionStatus == kAS12PlatWithToothGuy)
+ plat._actionStatus = -1;
}
}
@@ -1438,8 +1444,8 @@ void Scene12::updateAnimations() {
_vm->_timers[6] = _vm->getRandom(30) + 20;
if (gnap._actionStatus >= kAS12TalkBeardGuy && gnap._actionStatus <= kAS12ShowItemToBeardGuy && _currBeardGuySequenceId != 0x202 && _currBeardGuySequenceId != 0x1F2)
gnap._actionStatus = -1;
- if (_vm->_plat->_actionStatus == kAS12PlatWithBeardGuy)
- _vm->_plat->_actionStatus = -1;
+ if (plat._actionStatus == kAS12PlatWithBeardGuy)
+ plat._actionStatus = -1;
}
}
@@ -1496,6 +1502,7 @@ void Scene13::showScribble() {
void Scene13::run() {
GameSys& gameSys = *_vm->_gameSys;
PlayerGnap& gnap = *_vm->_gnap;
+ PlayerPlat& plat = *_vm->_plat;
int currSoundId = 0;
@@ -1504,10 +1511,10 @@ void Scene13::run() {
if (_vm->_prevSceneNum == 14) {
gnap.initPos(6, 6, kDirBottomLeft);
- _vm->_plat->initPos(9, 8, kDirNone);
+ plat.initPos(9, 8, kDirNone);
} else {
gnap.initPos(3, 7, kDirBottomRight);
- _vm->_plat->initPos(2, 7, kDirNone);
+ plat.initPos(2, 7, kDirNone);
}
_vm->endSceneInit();
@@ -1540,14 +1547,14 @@ void Scene13::run() {
case kHS13Platypus:
switch (_vm->_verbCursor) {
case LOOK_CURSOR:
- gnap.playMoan1(_vm->_plat->_pos.x, _vm->_plat->_pos.y);
+ gnap.playMoan1(plat._pos.x, plat._pos.y);
break;
case GRAB_CURSOR:
gnap.kissPlatypus(0);
break;
case TALK_CURSOR:
- gnap.playBrainPulsating(_vm->_plat->_pos.x, _vm->_plat->_pos.y);
- _vm->_plat->playSequence(_vm->_plat->getSequenceId());
+ gnap.playBrainPulsating(plat._pos.x, plat._pos.y);
+ plat.playSequence(plat.getSequenceId());
break;
case PLAT_CURSOR:
break;
@@ -1558,7 +1565,7 @@ void Scene13::run() {
_vm->_isLeavingScene = true;
gnap.walkTo(Common::Point(2, 7), 0, 0x107C0, 1);
gnap._actionStatus = kAS13LeaveScene;
- _vm->_plat->walkTo(Common::Point(2, 8), -1, -1, 1);
+ plat.walkTo(Common::Point(2, 8), -1, -1, 1);
if (_vm->isFlag(kGFUnk14) || _vm->isFlag(kGFSpringTaken)) {
_vm->_newSceneNum = 11;
} else {
@@ -1709,9 +1716,9 @@ void Scene13::run() {
updateAnimations();
if (!_vm->_isLeavingScene) {
- _vm->_plat->updateIdleSequence();
- if (_vm->_plat->_pos.y == 5 || _vm->_plat->_pos.y == 6)
- _vm->_plat->walkTo(Common::Point(-1, 7), -1, -1, 1);
+ plat.updateIdleSequence();
+ if (plat._pos.y == 5 || plat._pos.y == 6)
+ plat.walkTo(Common::Point(-1, 7), -1, -1, 1);
if (gnap._actionStatus < 0)
gnap.updateIdleSequence();
if (!_vm->_timers[4]) {
@@ -2350,22 +2357,23 @@ void Scene17::update() {
void Scene17::platHangUpPhone() {
GameSys& gameSys = *_vm->_gameSys;
PlayerGnap& gnap = *_vm->_gnap;
+ PlayerPlat& plat = *_vm->_plat;
int savedGnapActionStatus = gnap._actionStatus;
- if (_vm->_plat->_actionStatus == kAS17PlatPhoningAssistant) {
+ if (plat._actionStatus == kAS17PlatPhoningAssistant) {
gnap._actionStatus = kAS17PlatHangUpPhone;
_vm->updateMouseCursor();
_platPhoneCtr = 0;
- _vm->_plat->_actionStatus = -1;
+ plat._actionStatus = -1;
gameSys.setAnimation(0x257, 254, 4);
gameSys.insertSequence(0x257, 254, _currPhoneSequenceId, 254, kSeqSyncExists, 0, 0, 0);
while (gameSys.getAnimationStatus(4) != 2)
_vm->gameUpdateTick();
- gameSys.setAnimation(0x25B, _vm->_plat->_id, 1);
- gameSys.insertSequence(0x25B, _vm->_plat->_id, _vm->_plat->_sequenceId | (_vm->_plat->_sequenceDatNum << 16), _vm->_plat->_id, kSeqSyncWait, 0, 0, 0);
- _vm->_plat->_sequenceId = 0x25B;
- _vm->_plat->_sequenceDatNum = 0;
+ gameSys.setAnimation(0x25B, plat._id, 1);
+ gameSys.insertSequence(0x25B, plat._id, plat._sequenceId | (plat._sequenceDatNum << 16), plat._id, kSeqSyncWait, 0, 0, 0);
+ plat._sequenceId = 0x25B;
+ plat._sequenceDatNum = 0;
_currPhoneSequenceId = -1;
_nextPhoneSequenceId = -1;
_vm->clearFlag(kGFPlatypusTalkingToAssistant);
@@ -2380,6 +2388,7 @@ void Scene17::platHangUpPhone() {
void Scene17::run() {
GameSys& gameSys = *_vm->_gameSys;
PlayerGnap& gnap = *_vm->_gnap;
+ PlayerPlat& plat = *_vm->_plat;
_vm->playSound(0x10940, true);
_vm->startSoundTimerA(8);
@@ -2439,22 +2448,22 @@ void Scene17::run() {
if (_vm->_prevSceneNum == 53 || _vm->_prevSceneNum == 18 || _vm->_prevSceneNum == 20 || _vm->_prevSceneNum == 19) {
if (_vm->_prevSceneNum == 20) {
gnap.initPos(4, 6, kDirBottomRight);
- _vm->_plat->initPos(5, 6, kDirNone);
+ plat.initPos(5, 6, kDirNone);
_vm->endSceneInit();
- _vm->_plat->walkTo(Common::Point(5, 9), -1, 0x107C2, 1);
+ plat.walkTo(Common::Point(5, 9), -1, 0x107C2, 1);
gnap.walkTo(Common::Point(4, 8), -1, 0x107B9, 1);
} else if (_vm->isFlag(kGFUnk27)) {
gnap.initPos(3, 9, kDirUpLeft);
- _vm->_plat->_pos = _vm->_hotspotsWalkPos[2];
- _vm->_plat->_id = 20 * _vm->_hotspotsWalkPos[2].y;
+ plat._pos = _vm->_hotspotsWalkPos[2];
+ plat._id = 20 * _vm->_hotspotsWalkPos[2].y;
gameSys.insertSequence(0x25A, 20 * _vm->_hotspotsWalkPos[2].y, 0, 0, kSeqNone, 0, 0, 0);
gameSys.insertSequence(0x257, 254, 0, 0, kSeqNone, 0, 0, 0);
- _vm->_plat->_sequenceId = 0x25A;
- _vm->_plat->_sequenceDatNum = 0;
+ plat._sequenceId = 0x25A;
+ plat._sequenceDatNum = 0;
_vm->endSceneInit();
_vm->clearFlag(kGFSpringTaken);
_vm->clearFlag(kGFUnk16);
- _vm->_plat->_actionStatus = kAS17PlatPhoningAssistant;
+ plat._actionStatus = kAS17PlatPhoningAssistant;
platHangUpPhone();
gameSys.setAnimation(0, 0, 4);
_vm->clearFlag(kGFPlatypusTalkingToAssistant);
@@ -2463,7 +2472,7 @@ void Scene17::run() {
} else if (_vm->isFlag(kGFUnk25)) {
_vm->clearFlag(kGFSpringTaken);
_vm->clearFlag(kGFUnk16);
- _vm->_plat->initPos(7, 9, kDirNone);
+ plat.initPos(7, 9, kDirNone);
gnap._pos = _vm->_hotspotsWalkPos[2];
gnap._id = 20 * _vm->_hotspotsWalkPos[2].y;
gameSys.insertSequence(601, 20 * _vm->_hotspotsWalkPos[2].y, 0, 0, kSeqNone, 0, 0, 0);
@@ -2480,31 +2489,31 @@ void Scene17::run() {
_vm->clearFlag(kGFUnk16);
_vm->_sceneWaiting = true;
gnap.initPos(3, 9, kDirUpLeft);
- _vm->_plat->_pos = _vm->_hotspotsWalkPos[2];
- _vm->_plat->_id = 20 * _vm->_hotspotsWalkPos[2].y;
+ plat._pos = _vm->_hotspotsWalkPos[2];
+ plat._id = 20 * _vm->_hotspotsWalkPos[2].y;
_currPhoneSequenceId = 0x251;
gameSys.insertSequence(0x25A, 20 * _vm->_hotspotsWalkPos[2].y, 0, 0, kSeqNone, 0, 0, 0);
gameSys.insertSequence(_currPhoneSequenceId, 254, 0, 0, kSeqNone, 0, 0, 0);
- _vm->_plat->_sequenceId = 0x25A;
- _vm->_plat->_sequenceDatNum = 0;
+ plat._sequenceId = 0x25A;
+ plat._sequenceDatNum = 0;
_vm->endSceneInit();
gameSys.setAnimation(_currPhoneSequenceId, 254, 1);
- _vm->_plat->_actionStatus = kAS17PlatPhoningAssistant;
+ plat._actionStatus = kAS17PlatPhoningAssistant;
updateHotspots();
} else if (_vm->_prevSceneNum == 18) {
gnap.initPos(6, 6, kDirBottomRight);
- _vm->_plat->initPos(5, 6, kDirNone);
+ plat.initPos(5, 6, kDirNone);
_vm->endSceneInit();
- _vm->_plat->walkTo(Common::Point(5, 9), -1, 0x107C2, 1);
+ plat.walkTo(Common::Point(5, 9), -1, 0x107C2, 1);
gnap.walkTo(Common::Point(4, 8), -1, 0x107B9, 1);
} else {
if (_vm->isFlag(kGFSpringTaken)) {
gnap.initPos(_vm->_hotspotsWalkPos[2].x, _vm->_hotspotsWalkPos[2].y, kDirBottomRight);
- _vm->_plat->initPos(1, 9, kDirNone);
+ plat.initPos(1, 9, kDirNone);
_vm->endSceneInit();
} else {
gnap.initPos(3, 7, kDirBottomRight);
- _vm->_plat->initPos(1, 7, kDirNone);
+ plat.initPos(1, 7, kDirNone);
_vm->endSceneInit();
}
_vm->clearFlag(kGFSpringTaken);
@@ -2518,18 +2527,18 @@ void Scene17::run() {
gnap._sequenceDatNum = 0;
gnap._idleFacing = kDirBottomRight;
gameSys.insertSequence(makeRid(gnap._sequenceDatNum, gnap._sequenceId), gnap._id, 0, 0, kSeqNone, 0, 0, 0);
- _vm->_plat->_pos = Common::Point(-1, 8);
- _vm->_plat->_id = 160;
+ plat._pos = Common::Point(-1, 8);
+ plat._id = 160;
gameSys.insertSequence(0x241, 160, 0, 0, kSeqNone, 0, 0, 0);
- gameSys.insertSequence(0x107C1, _vm->_plat->_id, 0x241, _vm->_plat->_id,
- kSeqScale | kSeqSyncWait, 0, 75 * _vm->_plat->_pos.x - _vm->_plat->_gridX, 48 * _vm->_plat->_pos.y - _vm->_plat->_gridY);
+ gameSys.insertSequence(0x107C1, plat._id, 0x241, plat._id,
+ kSeqScale | kSeqSyncWait, 0, 75 * plat._pos.x - plat._gridX, 48 * plat._pos.y - plat._gridY);
gameSys.insertSequence(0x22C, 2, 0, 0, kSeqNone, 0, 0, 0);
// TODO delayTicksA(2, 9);
_vm->endSceneInit();
- _vm->_plat->_sequenceId = 0x7C1;
- _vm->_plat->_sequenceDatNum = 1;
- _vm->_plat->_idleFacing = kDirBottomRight;
- _vm->_plat->walkTo(Common::Point(2, 9), -1, 0x107C2, 1);
+ plat._sequenceId = 0x7C1;
+ plat._sequenceDatNum = 1;
+ plat._idleFacing = kDirBottomRight;
+ plat.walkTo(Common::Point(2, 9), -1, 0x107C2, 1);
}
while (!_vm->_sceneDone) {
@@ -2554,25 +2563,25 @@ void Scene17::run() {
gnap.useJointOnPlatypus();
} else {
gnap.useDeviceOnPlatypus();
- _vm->_plat->walkTo(_vm->_hotspotsWalkPos[6], 1, 0x107C2, 1);
+ plat.walkTo(_vm->_hotspotsWalkPos[6], 1, 0x107C2, 1);
gnap.walkTo(_vm->_hotspotsWalkPos[6] + Common::Point(1, 0), 0, 0x107BA, 1);
- _vm->_plat->_actionStatus = kAS17GetWrench1;
+ plat._actionStatus = kAS17GetWrench1;
gnap._actionStatus = kAS17GetWrench1;
_vm->_timers[5] = _vm->getRandom(30) + 80;
_vm->setGrabCursorSprite(-1);
_vm->invRemove(kItemJoint);
}
} else if (_vm->_grabCursorSpriteIndex >= 0) {
- gnap.playScratchingHead(_vm->_plat->_pos.x, _vm->_plat->_pos.y);
+ gnap.playScratchingHead(plat._pos.x, plat._pos.y);
} else {
switch (_vm->_verbCursor) {
case LOOK_CURSOR:
case GRAB_CURSOR:
- gnap.playScratchingHead(_vm->_plat->_pos.x, _vm->_plat->_pos.y);
+ gnap.playScratchingHead(plat._pos.x, plat._pos.y);
break;
case TALK_CURSOR:
- gnap.playBrainPulsating(_vm->_plat->_pos.x, _vm->_plat->_pos.y);
- _vm->_plat->playSequence(_vm->_plat->getSequenceId());
+ gnap.playBrainPulsating(plat._pos.x, plat._pos.y);
+ plat.playSequence(plat.getSequenceId());
break;
case PLAT_CURSOR:
gnap.playImpossible(0, 0);
@@ -2601,8 +2610,8 @@ void Scene17::run() {
if (_canTryGetWrench) {
platHangUpPhone();
gnap.useDeviceOnPlatypus();
- _vm->_plat->walkTo(_vm->_hotspotsWalkPos[6] + Common::Point(1, 0), 1, 0x107C2, 1);
- _vm->_plat->_actionStatus = kAS17TryGetWrench;
+ plat.walkTo(_vm->_hotspotsWalkPos[6] + Common::Point(1, 0), 1, 0x107C2, 1);
+ plat._actionStatus = kAS17TryGetWrench;
gnap._actionStatus = kAS17TryGetWrench;
_vm->_timers[5] = _vm->getRandom(30) + 80;
} else
@@ -2641,10 +2650,10 @@ void Scene17::run() {
platHangUpPhone();
_vm->_isLeavingScene = true;
gnap.useDeviceOnPlatypus();
- _vm->_plat->_idleFacing = kDirUpLeft;
- _vm->_plat->walkTo(_vm->_hotspotsWalkPos[2], 1, 0x107C2, 1);
+ plat._idleFacing = kDirUpLeft;
+ plat.walkTo(_vm->_hotspotsWalkPos[2], 1, 0x107C2, 1);
_vm->setFlag(kGFUnk16);
- _vm->_plat->_actionStatus = kAS17PlatUsePhone;
+ plat._actionStatus = kAS17PlatUsePhone;
gnap._actionStatus = kAS17PlatUsePhone;
} else
gnap.playImpossible(0, 0);
@@ -2685,10 +2694,10 @@ void Scene17::run() {
platHangUpPhone();
_vm->_isLeavingScene = true;
gnap.useDeviceOnPlatypus();
- _vm->_plat->_idleFacing = kDirUpLeft;
- _vm->_plat->walkTo(_vm->_hotspotsWalkPos[2], 1, 0x107C2, 1);
+ plat._idleFacing = kDirUpLeft;
+ plat.walkTo(_vm->_hotspotsWalkPos[2], 1, 0x107C2, 1);
_vm->setFlag(kGFUnk16);
- _vm->_plat->_actionStatus = kAS17PlatUsePhone;
+ plat._actionStatus = kAS17PlatUsePhone;
gnap._actionStatus = kAS17PlatUsePhone;
} else
gnap.playImpossible(0, 0);
@@ -2705,8 +2714,8 @@ void Scene17::run() {
gnap._idleFacing = kDirUpRight;
gnap.walkTo(_vm->_hotspotsWalkPos[5], 0, 0x107BB, 1);
gnap._actionStatus = kAS17LeaveScene;
- if (_vm->_plat->_actionStatus != kAS17PlatPhoningAssistant)
- _vm->_plat->walkTo(_vm->_hotspotsWalkPos[5] + Common::Point(-1, 0), -1, 0x107C2, 1);
+ if (plat._actionStatus != kAS17PlatPhoningAssistant)
+ plat.walkTo(_vm->_hotspotsWalkPos[5] + Common::Point(-1, 0), -1, 0x107C2, 1);
}
break;
@@ -2718,7 +2727,7 @@ void Scene17::run() {
gnap._idleFacing = kDirUpLeft;
gnap.walkTo(_vm->_hotspotsWalkPos[3], 0, 0x107BC, 1);
gnap._actionStatus = kAS17LeaveScene;
- _vm->_plat->walkTo(_vm->_hotspotsWalkPos[3] + Common::Point(1, 0), -1, 0x107C2, 1);
+ plat.walkTo(_vm->_hotspotsWalkPos[3] + Common::Point(1, 0), -1, 0x107C2, 1);
}
break;
@@ -2743,17 +2752,17 @@ void Scene17::run() {
_vm->playSound(0x10940, true);
if (!_vm->_isLeavingScene) {
- if (_vm->_plat->_actionStatus < 0)
- _vm->_plat->updateIdleSequence2();
+ if (plat._actionStatus < 0)
+ plat.updateIdleSequence2();
gnap.updateIdleSequence2();
if (!_vm->_timers[4]) {
_vm->_timers[4] = _vm->getRandom(100) + 200;
- if (gnap._actionStatus < 0 && _vm->_plat->_actionStatus < 0)
+ if (gnap._actionStatus < 0 && plat._actionStatus < 0)
gameSys.insertSequence(0x22B, 21, 0, 0, kSeqNone, 0, 0, 0);
}
if (!_vm->_timers[7]) {
_vm->_timers[7] = _vm->getRandom(100) + 100;
- if (gnap._actionStatus < 0 && _vm->_plat->_actionStatus < 0) {
+ if (gnap._actionStatus < 0 && plat._actionStatus < 0) {
switch (_vm->getRandom(3)) {
case 0:
gameSys.insertSequence(0x25C, 255, 0, 0, kSeqNone, 0, 0, 0);
@@ -2767,7 +2776,7 @@ void Scene17::run() {
}
}
}
- if (_vm->_plat->_actionStatus < 0 && !_vm->_timers[5]) {
+ if (plat._actionStatus < 0 && !_vm->_timers[5]) {
_vm->_timers[5] = _vm->getRandom(30) + 80;
if (_vm->isFlag(kGFGrassTaken) && _nextWrenchSequenceId == -1) {
_nextWrenchSequenceId = 0x236;
@@ -2844,6 +2853,7 @@ void Scene17::updateAnimations() {
GameSys& gameSys = *_vm->_gameSys;
PlayerGnap& gnap = *_vm->_gnap;
+ PlayerPlat& plat = *_vm->_plat;
if (gameSys.getAnimationStatus(0) == 2) {
gameSys.setAnimation(0, 0, 0);
@@ -2898,9 +2908,9 @@ void Scene17::updateAnimations() {
if (gameSys.getAnimationStatus(1) == 2) {
gameSys.setAnimation(0, 0, 1);
- switch (_vm->_plat->_actionStatus) {
+ switch (plat._actionStatus) {
case kAS17TryGetWrench:
- _vm->_plat->_actionStatus = -1;
+ plat._actionStatus = -1;
++_platTryGetWrenchCtr;
if (_platTryGetWrenchCtr % 2 != 0)
_nextWrenchSequenceId = 0x233;
@@ -2915,16 +2925,16 @@ void Scene17::updateAnimations() {
_nextCarWindowSequenceId = 0x249;
break;
case kAS17GetWrenchDone:
- _vm->_plat->_actionStatus = -1;
+ plat._actionStatus = -1;
_vm->invAdd(kItemWrench);
_vm->setGrabCursorSprite(kItemWrench);
break;
case kAS17PlatUsePhone:
- gameSys.setAnimation(0x24E, _vm->_plat->_id, 1);
- gameSys.insertSequence(0x24E, _vm->_plat->_id, _vm->_plat->_sequenceId | (_vm->_plat->_sequenceDatNum << 16), _vm->_plat->_id, kSeqSyncWait, 0, 0, 0);
- _vm->_plat->_sequenceDatNum = 0;
- _vm->_plat->_sequenceId = 0x24E;
- _vm->_plat->_actionStatus = kAS17LeaveScene;
+ gameSys.setAnimation(0x24E, plat._id, 1);
+ gameSys.insertSequence(0x24E, plat._id, plat._sequenceId | (plat._sequenceDatNum << 16), plat._id, kSeqSyncWait, 0, 0, 0);
+ plat._sequenceDatNum = 0;
+ plat._sequenceId = 0x24E;
+ plat._actionStatus = kAS17LeaveScene;
_vm->_newSceneNum = 53;
break;
case kAS17PlatPhoningAssistant:
@@ -2933,10 +2943,10 @@ void Scene17::updateAnimations() {
_platPhoneCtr = 0;
_nextPhoneSequenceId = -1;
_currPhoneSequenceId = -1;
- gameSys.insertSequence(0x25B, _vm->_plat->_id, 0x25A, _vm->_plat->_id, kSeqSyncWait, 0, 0, 0);
- _vm->_plat->_sequenceDatNum = 0;
- _vm->_plat->_sequenceId = 0x25B;
- _vm->_plat->_actionStatus = -1;
+ gameSys.insertSequence(0x25B, plat._id, 0x25A, plat._id, kSeqSyncWait, 0, 0, 0);
+ plat._sequenceDatNum = 0;
+ plat._sequenceId = 0x25B;
+ plat._actionStatus = -1;
_vm->clearFlag(kGFPlatypusTalkingToAssistant);
_vm->_sceneWaiting = false;
updateHotspots();
@@ -2944,9 +2954,9 @@ void Scene17::updateAnimations() {
_nextPhoneSequenceId = kPlatPhoneSequenceIds[_platPhoneCtr];
gameSys.setAnimation(_nextPhoneSequenceId, 254, 1);
gameSys.insertSequence(_nextPhoneSequenceId, 254, _currPhoneSequenceId, 254, kSeqSyncWait, 0, 0, 0);
- gameSys.insertSequence(0x25A, _vm->_plat->_id, 0x25A, _vm->_plat->_id, kSeqSyncWait, 0, 0, 0);
- _vm->_plat->_sequenceDatNum = 0;
- _vm->_plat->_sequenceId = 0x25A;
+ gameSys.insertSequence(0x25A, plat._id, 0x25A, plat._id, kSeqSyncWait, 0, 0, 0);
+ plat._sequenceDatNum = 0;
+ plat._sequenceId = 0x25A;
_currPhoneSequenceId = _nextPhoneSequenceId;
}
break;
@@ -2960,27 +2970,27 @@ void Scene17::updateAnimations() {
switch (_nextWrenchSequenceId) {
case 0x233:
gnap._actionStatus = -1;
- gameSys.insertSequence(0x243, _vm->_plat->_id,
- _vm->_plat->_sequenceId | (_vm->_plat->_sequenceDatNum << 16), _vm->_plat->_id,
+ gameSys.insertSequence(0x243, plat._id,
+ plat._sequenceId | (plat._sequenceDatNum << 16), plat._id,
kSeqSyncWait, 0, 0, 0);
gameSys.insertSequence(_nextWrenchSequenceId, 40, _currWrenchSequenceId, 40, kSeqSyncWait, 0, 0, 0);
_currWrenchSequenceId = _nextWrenchSequenceId;
_nextWrenchSequenceId = -1;
- _vm->_plat->_sequenceId = 0x243;
- _vm->_plat->_sequenceDatNum = 0;
- gameSys.setAnimation(0x243, _vm->_plat->_id, 1);
+ plat._sequenceId = 0x243;
+ plat._sequenceDatNum = 0;
+ gameSys.setAnimation(0x243, plat._id, 1);
break;
case 0x234:
gnap._actionStatus = -1;
- gameSys.insertSequence(0x242, _vm->_plat->_id,
- _vm->_plat->_sequenceId | (_vm->_plat->_sequenceDatNum << 16), _vm->_plat->_id,
+ gameSys.insertSequence(0x242, plat._id,
+ plat._sequenceId | (plat._sequenceDatNum << 16), plat._id,
kSeqSyncWait, 0, 0, 0);
gameSys.insertSequence(_nextWrenchSequenceId, 40, _currWrenchSequenceId, 40, kSeqSyncWait, 0, 0, 0);
_currWrenchSequenceId = _nextWrenchSequenceId;
_nextWrenchSequenceId = -1;
- _vm->_plat->_sequenceId = 0x242;
- _vm->_plat->_sequenceDatNum = 0;
- gameSys.setAnimation(0x242, _vm->_plat->_id, 1);
+ plat._sequenceId = 0x242;
+ plat._sequenceDatNum = 0;
+ gameSys.setAnimation(0x242, plat._id, 1);
break;
case 0x231:
if (_vm->getRandom(2) != 0)
@@ -3013,17 +3023,17 @@ void Scene17::updateAnimations() {
_currWrenchSequenceId = 0x22E;
_canTryGetWrench = false;
}
- gameSys.setAnimation(0x23F, _vm->_plat->_id, 1);
+ gameSys.setAnimation(0x23F, plat._id, 1);
gameSys.insertSequence(0x10875, gnap._id, makeRid(gnap._sequenceDatNum, gnap._sequenceId), gnap._id, kSeqSyncWait, 0, 0, 0);
- gameSys.insertSequence(0x23F, _vm->_plat->_id,
- _vm->_plat->_sequenceId | (_vm->_plat->_sequenceDatNum << 16), _vm->_plat->_id,
+ gameSys.insertSequence(0x23F, plat._id,
+ plat._sequenceId | (plat._sequenceDatNum << 16), plat._id,
kSeqSyncWait, 0, 0, 0);
gnap._sequenceDatNum = 1;
- _vm->_plat->_sequenceDatNum = 0;
+ plat._sequenceDatNum = 0;
gnap._sequenceId = 0x875;
- _vm->_plat->_sequenceId = 0x23F;
+ plat._sequenceId = 0x23F;
gnap.walkTo(Common::Point(3, 8), -1, 0x107B9, 1);
- _vm->_plat->_actionStatus = kAS17GetWrench2;
+ plat._actionStatus = kAS17GetWrench2;
}
break;
default:
@@ -3061,15 +3071,15 @@ void Scene17::updateAnimations() {
break;
case 0x249:
gameSys.setAnimation(0x230, 40, 2);
- gameSys.setAnimation(0x240, _vm->_plat->_id, 1);
+ gameSys.setAnimation(0x240, plat._id, 1);
gameSys.insertSequence(0x230, 40, _currWrenchSequenceId, 40, kSeqSyncWait, 0, 0, 0);
gameSys.insertSequence(_nextCarWindowSequenceId, 40, _currCarWindowSequenceId, 40, kSeqSyncWait, 0, 0, 0);
- gameSys.insertSequence(0x240, _vm->_plat->_id, _vm->_plat->_sequenceId, _vm->_plat->_id, kSeqSyncWait, 0, 0, 0);
+ gameSys.insertSequence(0x240, plat._id, plat._sequenceId, plat._id, kSeqSyncWait, 0, 0, 0);
gameSys.insertSequence(0x23E, gnap._id, makeRid(gnap._sequenceDatNum, gnap._sequenceId), gnap._id, kSeqSyncWait, 0, 0, 0);
gnap._sequenceId = 0x23E;
gnap._sequenceDatNum = 0;
- _vm->_plat->_sequenceId = 0x240;
- _vm->_plat->_sequenceDatNum = 0;
+ plat._sequenceId = 0x240;
+ plat._sequenceDatNum = 0;
gameSys.setAnimation(0x24A, 40, 3);
gameSys.insertSequence(0x24A, 40, _nextCarWindowSequenceId, 40, kSeqSyncWait, 0, 0, 0);
while (gameSys.getAnimationStatus(2) != 2) {
@@ -3088,7 +3098,7 @@ void Scene17::updateAnimations() {
_nextWrenchSequenceId = -1;
_vm->setFlag(kGFGrassTaken);
gnap._actionStatus = -1;
- _vm->_plat->_actionStatus = 2;
+ plat._actionStatus = 2;
updateHotspots();
_vm->_timers[5] = _vm->getRandom(30) + 80;
break;
@@ -3207,12 +3217,13 @@ void Scene18::gnapCarryGarbageCanTo(int gridX) {
else
direction = -1;
} else {
- if (gnap._pos.y == _vm->_plat->_pos.y) {
+ PlayerPlat& plat = *_vm->_plat;
+ if (gnap._pos.y == plat._pos.y) {
if (nextGridX >= gnap._pos.x) {
- if (nextGridX >= _vm->_plat->_pos.x && gnap._pos.x <= _vm->_plat->_pos.x)
- _vm->_plat->makeRoom();
- } else if (nextGridX <= _vm->_plat->_pos.x && gnap._pos.x >= _vm->_plat->_pos.x) {
- _vm->_plat->makeRoom();
+ if (nextGridX >= plat._pos.x && gnap._pos.x <= plat._pos.x)
+ plat.makeRoom();
+ } else if (nextGridX <= plat._pos.x && gnap._pos.x >= plat._pos.x) {
+ plat.makeRoom();
}
}
gnapSeqId = gnap._sequenceId;
@@ -3299,11 +3310,12 @@ void Scene18::putDownGarbageCan(int animationIndex) {
void Scene18::platEndPhoning(bool platFl) {
GameSys& gameSys = *_vm->_gameSys;
+ PlayerPlat& plat = *_vm->_plat;
if (_vm->isFlag(kGFPlatypusTalkingToAssistant)) {
_platPhoneIter = 0;
_platPhoneCtr = 0;
- _vm->_plat->_actionStatus = -1;
+ plat._actionStatus = -1;
if (_currPhoneSequenceId != -1) {
gameSys.setAnimation(0x21E, 254, 3);
gameSys.insertSequence(0x21E, 254, _currPhoneSequenceId, 254, kSeqSyncExists, 0, 0, 0);
@@ -3314,7 +3326,7 @@ void Scene18::platEndPhoning(bool platFl) {
gameSys.setAnimation(0, 0, 3);
_vm->clearFlag(kGFPlatypusTalkingToAssistant);
if (platFl) {
- _vm->_plat->_actionStatus = kAS18PlatComesHere;
+ plat._actionStatus = kAS18PlatComesHere;
_vm->_timers[6] = 50;
_vm->_sceneWaiting = true;
}
@@ -3357,6 +3369,7 @@ void Scene18::waitForGnapAction() {
void Scene18::run() {
GameSys& gameSys = *_vm->_gameSys;
PlayerGnap& gnap = *_vm->_gnap;
+ PlayerPlat& plat = *_vm->_plat;
_cowboyHatSurface = nullptr;
@@ -3424,22 +3437,22 @@ void Scene18::run() {
}
if (_vm->_prevSceneNum == 17) {
gnap.initPos(4, 11, kDirBottomRight);
- _vm->_plat->initPos(5, 11, kDirNone);
+ plat.initPos(5, 11, kDirNone);
_vm->endSceneInit();
gnap.walkTo(Common::Point(4, 8), -1, 0x107B9, 1);
- _vm->_plat->walkTo(Common::Point(5, 9), -1, 0x107C2, 1);
+ plat.walkTo(Common::Point(5, 9), -1, 0x107C2, 1);
} else if (_vm->_prevSceneNum == 19) {
gnap.initPos(7, 7, kDirBottomRight);
- _vm->_plat->initPos(8, 7, kDirNone);
+ plat.initPos(8, 7, kDirNone);
_vm->endSceneInit();
gnap.walkTo(Common::Point(7, 8), -1, 0x107B9, 1);
- _vm->_plat->walkTo(Common::Point(8, 8), -1, 0x107C2, 1);
+ plat.walkTo(Common::Point(8, 8), -1, 0x107C2, 1);
} else {
gnap.initPos(-1, 10, kDirBottomRight);
- _vm->_plat->initPos(-1, 10, kDirNone);
+ plat.initPos(-1, 10, kDirNone);
_vm->endSceneInit();
gnap.walkTo(Common::Point(3, 7), -1, 0x107B9, 1);
- _vm->_plat->walkTo(Common::Point(3, 8), -1, 0x107C2, 1);
+ plat.walkTo(Common::Point(3, 8), -1, 0x107C2, 1);
}
}
@@ -3469,18 +3482,18 @@ void Scene18::run() {
if (_vm->_grabCursorSpriteIndex == kItemJoint) {
gnap.useJointOnPlatypus();
} else if (_vm->_grabCursorSpriteIndex >= 0) {
- gnap.playShowItem(_vm->_grabCursorSpriteIndex, _vm->_plat->_pos.x, _vm->_plat->_pos.y);
+ gnap.playShowItem(_vm->_grabCursorSpriteIndex, plat._pos.x, plat._pos.y);
} else {
switch (_vm->_verbCursor) {
case LOOK_CURSOR:
- gnap.playMoan1(_vm->_plat->_pos.x, _vm->_plat->_pos.y);
+ gnap.playMoan1(plat._pos.x, plat._pos.y);
break;
case GRAB_CURSOR:
gnap.kissPlatypus(0);
break;
case TALK_CURSOR:
- gnap.playBrainPulsating(_vm->_plat->_pos.x, _vm->_plat->_pos.y);
- _vm->_plat->playSequence(_vm->_plat->getSequenceId());
+ gnap.playBrainPulsating(plat._pos.x, plat._pos.y);
+ plat.playSequence(plat.getSequenceId());
break;
case PLAT_CURSOR:
gnap.playImpossible(0, 0);
@@ -3688,7 +3701,7 @@ void Scene18::run() {
gnap.walkTo(_vm->_hotspotsWalkPos[kHS18ExitToyStore], 0, 0x107C0, 1);
gnap._actionStatus = kAS18LeaveScene;
if (!_vm->isFlag(kGFPlatypusTalkingToAssistant))
- _vm->_plat->walkTo(_vm->_hotspotsWalkPos[kHS18ExitToyStore] + Common::Point(1, 0), -1, 0x107C2, 1);
+ plat.walkTo(_vm->_hotspotsWalkPos[kHS18ExitToyStore] + Common::Point(1, 0), -1, 0x107C2, 1);
}
}
break;
@@ -3707,7 +3720,7 @@ void Scene18::run() {
if (_vm->isFlag(kGFPlatypusTalkingToAssistant))
_vm->setFlag(kGFUnk27);
else
- _vm->_plat->walkTo(_vm->_hotspotsWalkPos[kHS18ExitPhoneBooth] + Common::Point(1, 0), -1, 0x107C2, 1);
+ plat.walkTo(_vm->_hotspotsWalkPos[kHS18ExitPhoneBooth] + Common::Point(1, 0), -1, 0x107C2, 1);
}
break;
@@ -3726,7 +3739,7 @@ void Scene18::run() {
if (_vm->isFlag(kGFPlatypusTalkingToAssistant))
platEndPhoning(false);
else
- _vm->_plat->walkTo(_vm->_hotspotsWalkPos[kHS18ExitGrubCity] + Common::Point(0, -1), -1, 0x107CF, 1);
+ plat.walkTo(_vm->_hotspotsWalkPos[kHS18ExitGrubCity] + Common::Point(0, -1), -1, 0x107CF, 1);
_vm->_hotspots[kHS18WalkArea2]._flags &= ~SF_WALKABLE;
}
break;
@@ -3770,18 +3783,18 @@ void Scene18::run() {
if (!_vm->_isLeavingScene) {
if (!_vm->isFlag(kGFPlatypusTalkingToAssistant)) {
- if (_vm->_plat->_actionStatus == kAS18PlatComesHere) {
+ if (plat._actionStatus == kAS18PlatComesHere) {
if (!_vm->_timers[6]) {
- _vm->_plat->_actionStatus = -1;
+ plat._actionStatus = -1;
_vm->_sceneWaiting = false;
- _vm->_plat->initPos(-1, 10, kDirNone);
- _vm->_plat->walkTo(Common::Point(3, 9), -1, 0x107C2, 1);
+ plat.initPos(-1, 10, kDirNone);
+ plat.walkTo(Common::Point(3, 9), -1, 0x107C2, 1);
_vm->clearFlag(kGFPlatypusTalkingToAssistant);
}
} else {
_vm->_hotspots[kHS18WalkArea1]._y2 += 48;
_vm->_hotspots[kHS18WalkArea2]._x1 += 75;
- _vm->_plat->updateIdleSequence();
+ plat.updateIdleSequence();
_vm->_hotspots[kHS18WalkArea2]._x1 -= 75;
_vm->_hotspots[kHS18WalkArea1]._y2 -= 48;
}
@@ -4120,6 +4133,7 @@ void Scene19::updateHotspots() {
void Scene19::run() {
GameSys& gameSys = *_vm->_gameSys;
PlayerGnap& gnap = *_vm->_gnap;
+ PlayerPlat& plat = *_vm->_plat;
_vm->queueInsertDeviceIcon();
_toyGrabCtr = 0;
@@ -4149,10 +4163,10 @@ void Scene19::run() {
gameSys.insertSequence(_currShopAssistantSequenceId, 20, 0, 0, kSeqNone, 0, 0, 0);
_vm->_timers[6] = _vm->getRandom(40) + 50;
gnap.initPos(3, 6, kDirBottomRight);
- _vm->_plat->initPos(4, 6, kDirNone);
+ plat.initPos(4, 6, kDirNone);
_vm->endSceneInit();
gnap.walkTo(Common::Point(4, 9), -1, 0x107B9, 1);
- _vm->_plat->walkTo(Common::Point(5, 9), -1, 0x107C2, 1);
+ plat.walkTo(Common::Point(5, 9), -1, 0x107C2, 1);
}
while (!_vm->_sceneDone) {
@@ -4177,18 +4191,18 @@ void Scene19::run() {
if (_vm->_grabCursorSpriteIndex == kItemJoint) {
gnap.useJointOnPlatypus();
} else if (_vm->_grabCursorSpriteIndex >= 0) {
- gnap.playImpossible(_vm->_plat->_pos.x, _vm->_plat->_pos.y);
+ gnap.playImpossible(plat._pos.x, plat._pos.y);
} else {
switch (_vm->_verbCursor) {
case LOOK_CURSOR:
- gnap.playMoan1(_vm->_plat->_pos.x, _vm->_plat->_pos.y);
+ gnap.playMoan1(plat._pos.x, plat._pos.y);
break;
case GRAB_CURSOR:
gnap.kissPlatypus(0);
break;
case TALK_CURSOR:
- gnap.playBrainPulsating(_vm->_plat->_pos.x, _vm->_plat->_pos.y);
- _vm->_plat->playSequence(_vm->_plat->getSequenceId());
+ gnap.playBrainPulsating(plat._pos.x, plat._pos.y);
+ plat.playSequence(plat.getSequenceId());
break;
case PLAT_CURSOR:
gnap.playImpossible(0, 0);
@@ -4208,7 +4222,7 @@ void Scene19::run() {
if (_vm->isFlag(kGFPlatypusTalkingToAssistant))
_vm->setFlag(kGFUnk27);
else
- _vm->_plat->walkTo(_vm->_hotspotsWalkPos[1] + Common::Point(1, 0), -1, 0x107C5, 1);
+ plat.walkTo(_vm->_hotspotsWalkPos[1] + Common::Point(1, 0), -1, 0x107C5, 1);
_vm->_hotspots[kHS19WalkArea1]._flags &= ~SF_WALKABLE;
}
break;
@@ -4331,7 +4345,7 @@ void Scene19::run() {
if (!_vm->_isLeavingScene) {
gnap.updateIdleSequence();
if (!_vm->isFlag(kGFPlatypusTalkingToAssistant)) {
- _vm->_plat->updateIdleSequence();
+ plat.updateIdleSequence();
if (!_vm->_timers[6] && _nextShopAssistantSequenceId == -1) {
_vm->_timers[6] = _vm->getRandom(40) + 50;
if (_vm->getRandom(4) != 0) {
diff --git a/engines/gnap/scenes/group2.cpp b/engines/gnap/scenes/group2.cpp
index c4f578de93..f3a677ae14 100644
--- a/engines/gnap/scenes/group2.cpp
+++ b/engines/gnap/scenes/group2.cpp
@@ -160,6 +160,7 @@ void Scene20::stopSounds() {
void Scene20::run() {
GameSys& gameSys = *_vm->_gameSys;
PlayerGnap& gnap = *_vm->_gnap;
+ PlayerPlat& plat = *_vm->_plat;
_vm->playSound(0x10940, true);
_vm->startSoundTimerA(8);
@@ -209,46 +210,46 @@ void Scene20::run() {
_vm->gameUpdateTick();
}
gnap.initPos(11, 8, kDirBottomLeft);
- _vm->_plat->initPos(11, 9, kDirUnk4);
+ plat.initPos(11, 9, kDirUnk4);
gnap.walkTo(Common::Point(5, 8), -1, 0x107BA, 1);
- _vm->_plat->walkTo(Common::Point(6, 9), -1, 0x107C2, 1);
+ plat.walkTo(Common::Point(6, 9), -1, 0x107C2, 1);
} else {
switch (_vm->_prevSceneNum) {
case 17:
gnap.initPos(5, 11, kDirBottomRight);
- _vm->_plat->initPos(6, 11, kDirNone);
+ plat.initPos(6, 11, kDirNone);
_vm->endSceneInit();
gnap.walkTo(Common::Point(5, 8), -1, 0x107B9, 1);
- _vm->_plat->walkTo(Common::Point(6, 9), -1, 0x107C2, 1);
+ plat.walkTo(Common::Point(6, 9), -1, 0x107C2, 1);
break;
case 18:
gnap.initPos(11, 8, kDirBottomLeft);
- _vm->_plat->initPos(11, 9, kDirUnk4);
+ plat.initPos(11, 9, kDirUnk4);
_vm->endSceneInit();
gnap.walkTo(Common::Point(5, 8), -1, 0x107BA, 1);
- _vm->_plat->walkTo(Common::Point(6, 9), -1, 0x107C2, 1);
+ plat.walkTo(Common::Point(6, 9), -1, 0x107C2, 1);
break;
case 21:
gnap.initPos(-1, 8, kDirBottomLeft);
- _vm->_plat->initPos(-1, 9, kDirUnk4);
+ plat.initPos(-1, 9, kDirUnk4);
_vm->endSceneInit();
gnap.walkTo(Common::Point(3, 8), -1, 0x107B9, 1);
- _vm->_plat->walkTo(Common::Point(3, 9), -1, 0x107C2, 1);
+ plat.walkTo(Common::Point(3, 9), -1, 0x107C2, 1);
break;
case 22:
gnap.initPos(7, 6, kDirBottomRight);
- _vm->_plat->initPos(8, 6, kDirNone);
+ plat.initPos(8, 6, kDirNone);
_vm->endSceneInit();
gnap.walkTo(Common::Point(8, 8), -1, 0x107B9, 1);
- _vm->_plat->walkTo(Common::Point(9, 9), -1, 0x107C2, 1);
+ plat.walkTo(Common::Point(9, 9), -1, 0x107C2, 1);
break;
default:
gnap.initPos(8, 6, kDirBottomLeft);
- _vm->_plat->initPos(9, 6, kDirUnk4);
+ plat.initPos(9, 6, kDirUnk4);
_vm->endSceneInit();
_vm->_hotspots[kHS20WalkArea2]._flags |= SF_WALKABLE;
gnap.walkTo(Common::Point(8, 8), -1, 0x107BA, 1);
- _vm->_plat->walkTo(Common::Point(9, 9), -1, 0x107C2, 1);
+ plat.walkTo(Common::Point(9, 9), -1, 0x107C2, 1);
_vm->_hotspots[kHS20WalkArea2]._flags &= ~SF_WALKABLE;
break;
}
@@ -281,14 +282,14 @@ void Scene20::run() {
} else {
switch (_vm->_verbCursor) {
case LOOK_CURSOR:
- gnap.playScratchingHead(_vm->_plat->_pos.x, _vm->_plat->_pos.y);
+ gnap.playScratchingHead(plat._pos.x, plat._pos.y);
break;
case GRAB_CURSOR:
gnap.kissPlatypus(20);
break;
case TALK_CURSOR:
- gnap.playBrainPulsating(_vm->_plat->_pos.x, _vm->_plat->_pos.y);
- _vm->_plat->playSequence(_vm->_plat->getSequenceId());
+ gnap.playBrainPulsating(plat._pos.x, plat._pos.y);
+ plat.playSequence(plat.getSequenceId());
break;
case PLAT_CURSOR:
gnap.playImpossible(0, 0);
@@ -306,8 +307,8 @@ void Scene20::run() {
_vm->_newSceneNum = 21;
gnap.walkTo(_vm->_hotspotsWalkPos[kHS20ExitParkingLot], 0, 0x107AF, 1);
gnap._actionStatus = kAS20LeaveScene;
- _vm->_plat->walkTo(_vm->_hotspotsWalkPos[kHS20ExitParkingLot] + Common::Point(0, 1), -1, 0x107CF, 1);
- _vm->_plat->_idleFacing = kDirUnk4;
+ plat.walkTo(_vm->_hotspotsWalkPos[kHS20ExitParkingLot] + Common::Point(0, 1), -1, 0x107CF, 1);
+ plat._idleFacing = kDirUnk4;
}
break;
@@ -319,7 +320,7 @@ void Scene20::run() {
_vm->_newSceneNum = 17;
gnap.walkTo(_vm->_hotspotsWalkPos[kHS20ExitPhone], 0, 0x107AE, 1);
gnap._actionStatus = kAS20LeaveScene;
- _vm->_plat->walkTo(_vm->_hotspotsWalkPos[kHS20ExitPhone] + Common::Point(1, 0), -1, 0x107C2, 1);
+ plat.walkTo(_vm->_hotspotsWalkPos[kHS20ExitPhone] + Common::Point(1, 0), -1, 0x107C2, 1);
}
break;
@@ -332,7 +333,7 @@ void Scene20::run() {
_vm->_hotspots[kHS20WalkArea2]._flags |= SF_WALKABLE;
gnap.walkTo(_vm->_hotspotsWalkPos[kHS20ExitOutsideToyStore], 0, 0x107AB, 1);
gnap._actionStatus = kAS20LeaveScene;
- _vm->_plat->walkTo(_vm->_hotspotsWalkPos[kHS20ExitOutsideToyStore] + Common::Point(0, 1), -1, 0x107CD, 1);
+ plat.walkTo(_vm->_hotspotsWalkPos[kHS20ExitOutsideToyStore] + Common::Point(0, 1), -1, 0x107CD, 1);
_vm->_hotspots[kHS20WalkArea2]._flags &= ~SF_WALKABLE;
}
break;
@@ -345,8 +346,8 @@ void Scene20::run() {
_vm->_newSceneNum = 22;
gnap.walkTo(_vm->_hotspotsWalkPos[kHS20ExitInsideGrubCity] + Common::Point(0, - 1), 0, 0x107BB, 1);
gnap._actionStatus = kAS20LeaveScene;
- _vm->_plat->walkTo(_vm->_hotspotsWalkPos[kHS20ExitInsideGrubCity] + Common::Point(1, 0), -1, 0x107C2, 1);
- _vm->_plat->_idleFacing = kDirUnk4;
+ plat.walkTo(_vm->_hotspotsWalkPos[kHS20ExitInsideGrubCity] + Common::Point(1, 0), -1, 0x107C2, 1);
+ plat._idleFacing = kDirUnk4;
}
break;
@@ -358,7 +359,7 @@ void Scene20::run() {
_vm->_newSceneNum = 24;
gnap.walkTo(_vm->_hotspotsWalkPos[kHS20ExitOutsideCircusWorld], 0, 0x107BB, 1);
gnap._actionStatus = kAS20LeaveScene;
- _vm->_plat->walkTo(_vm->_hotspotsWalkPos[kHS20ExitOutsideCircusWorld] + Common::Point(1, 0), -1, 0x107C2, 1);
+ plat.walkTo(_vm->_hotspotsWalkPos[kHS20ExitOutsideCircusWorld] + Common::Point(1, 0), -1, 0x107C2, 1);
}
break;
@@ -471,9 +472,9 @@ void Scene20::run() {
_vm->playSound(0x10940, true);
if (!_vm->_isLeavingScene) {
- if (_vm->_plat->_actionStatus < 0) {
+ if (plat._actionStatus < 0) {
_vm->_hotspots[kHS20WalkArea1]._y2 += 48;
- _vm->_plat->updateIdleSequence();
+ plat.updateIdleSequence();
_vm->_hotspots[kHS20WalkArea1]._y2 -= 48;
}
if (gnap._actionStatus < 0)
@@ -487,7 +488,7 @@ void Scene20::run() {
}
if (!_vm->_timers[7]) {
_vm->_timers[7] = _vm->getRandom(100) + 100;
- if (gnap._actionStatus < 0 && _vm->_plat->_actionStatus < 0) {
+ if (gnap._actionStatus < 0 && plat._actionStatus < 0) {
switch (_vm->getRandom(3)) {
case 0:
gameSys.insertSequence(0x183, 253, 0, 0, kSeqNone, 0, 0, 0);
@@ -740,6 +741,7 @@ void Scene21::updateHotspots() {
void Scene21::run() {
GameSys& gameSys = *_vm->_gameSys;
PlayerGnap& gnap = *_vm->_gnap;
+ PlayerPlat& plat = *_vm->_plat;
_vm->playSound(0x10940, true);
_vm->startSoundTimerA(6);
@@ -749,7 +751,7 @@ void Scene21::run() {
if (_vm->isFlag(kGFTwigTaken)) {
if (_vm->isFlag(kGFKeysTaken)) {
gnap.initPos(5, 8, kDirBottomRight);
- _vm->_plat->initPos(6, 8, kDirNone);
+ plat.initPos(6, 8, kDirNone);
gameSys.insertSequence(0x8E, 2, 0, 0, kSeqNone, 0, 0, 0);
if (!_vm->isFlag(kGFUnk04))
gameSys.insertSequence(0x8D, 59, 0, 0, kSeqNone, 0, 0, 0);
@@ -757,16 +759,16 @@ void Scene21::run() {
_vm->clearFlag(kGFKeysTaken);
} else {
gnap.initPos(5, 11, kDirBottomRight);
- _vm->_plat->initPos(6, 11, kDirNone);
+ plat.initPos(6, 11, kDirNone);
if (!_vm->isFlag(kGFUnk04))
gameSys.insertSequence(0x8D, 59, 0, 0, kSeqNone, 0, 0, 0);
_vm->endSceneInit();
gnap.walkTo(Common::Point(5, 8), -1, 0x107B9, 1);
- _vm->_plat->walkTo(Common::Point(6, 8), -1, 0x107C2, 1);
+ plat.walkTo(Common::Point(6, 8), -1, 0x107C2, 1);
}
} else {
gnap.initPos(5, 11, kDirBottomRight);
- _vm->_plat->initPos(6, 11, kDirNone);
+ plat.initPos(6, 11, kDirNone);
_currOldLadySequenceId = 0x89;
gameSys.setAnimation(0x89, 79, 3);
gameSys.insertSequence(_currOldLadySequenceId, 79, 0, 0, kSeqNone, 0, 0, 0);
@@ -774,7 +776,7 @@ void Scene21::run() {
_vm->_timers[4] = _vm->getRandom(30) + 50;
_vm->endSceneInit();
gnap.walkTo(Common::Point(5, 8), -1, 0x107B9, 1);
- _vm->_plat->walkTo(Common::Point(6, 8), -1, 0x107C2, 1);
+ plat.walkTo(Common::Point(6, 8), -1, 0x107C2, 1);
}
while (!_vm->_sceneDone) {
@@ -801,14 +803,14 @@ void Scene21::run() {
} else {
switch (_vm->_verbCursor) {
case LOOK_CURSOR:
- gnap.playScratchingHead(_vm->_plat->_pos.x, _vm->_plat->_pos.y);
+ gnap.playScratchingHead(plat._pos.x, plat._pos.y);
break;
case GRAB_CURSOR:
gnap.kissPlatypus(0);
break;
case TALK_CURSOR:
- gnap.playBrainPulsating(_vm->_plat->_pos.x, _vm->_plat->_pos.y);
- _vm->_plat->playSequence(_vm->_plat->getSequenceId());
+ gnap.playBrainPulsating(plat._pos.x, plat._pos.y);
+ plat.playSequence(plat.getSequenceId());
break;
case PLAT_CURSOR:
gnap.playImpossible(0, 0);
@@ -880,7 +882,7 @@ void Scene21::run() {
_vm->_newSceneNum = 20;
gnap.walkTo(_vm->_hotspotsWalkPos[kHS21ExitOutsideGrubCity], 0, 0x107B3, 1);
gnap._actionStatus = kAS21LeaveScene;
- _vm->_plat->walkTo(_vm->_hotspotsWalkPos[kHS21ExitOutsideGrubCity] + Common::Point(1, 0), -1, 0x107C2, 1);
+ plat.walkTo(_vm->_hotspotsWalkPos[kHS21ExitOutsideGrubCity] + Common::Point(1, 0), -1, 0x107C2, 1);
}
break;
@@ -904,7 +906,7 @@ void Scene21::run() {
_vm->playSound(0x10940, true);
if (!_vm->_isLeavingScene) {
- _vm->_plat->updateIdleSequence();
+ plat.updateIdleSequence();
gnap.updateIdleSequence();
if (!_vm->isFlag(kGFTwigTaken) && !_vm->_timers[4] && _nextOldLadySequenceId == -1 && gnap._actionStatus == -1) {
_vm->_timers[4] = _vm->getRandom(30) + 50;
@@ -1035,6 +1037,7 @@ void Scene22::updateHotspots() {
void Scene22::run() {
GameSys& gameSys = *_vm->_gameSys;
PlayerGnap& gnap = *_vm->_gnap;
+ PlayerPlat& plat = *_vm->_plat;
gameSys.insertSequence(0x5D, 254, 0, 0, kSeqNone, 0, 0, 0);
@@ -1050,14 +1053,14 @@ void Scene22::run() {
if (_vm->_prevSceneNum == 20) {
gnap.initPos(2, 8, kDirBottomRight);
- _vm->_plat->initPos(1, 8, kDirNone);
+ plat.initPos(1, 8, kDirNone);
_vm->endSceneInit();
} else {
gnap.initPos(11, _vm->_hotspotsWalkPos[kHS22ExitBackGrubCity].y, kDirBottomRight);
- _vm->_plat->initPos(11, _vm->_hotspotsWalkPos[kHS22ExitBackGrubCity].y + 1, kDirNone);
+ plat.initPos(11, _vm->_hotspotsWalkPos[kHS22ExitBackGrubCity].y + 1, kDirNone);
_vm->endSceneInit();
gnap.walkTo(Common::Point(8, 8), -1, 0x107B9, 1);
- _vm->_plat->walkTo(Common::Point(9, 8), -1, 0x107C2, 1);
+ plat.walkTo(Common::Point(9, 8), -1, 0x107C2, 1);
}
if (_vm->isFlag(kGFSceneFlag1)) {
@@ -1119,14 +1122,14 @@ void Scene22::run() {
} else {
switch (_vm->_verbCursor) {
case LOOK_CURSOR:
- gnap.playScratchingHead(_vm->_plat->_pos.x, _vm->_plat->_pos.y);
+ gnap.playScratchingHead(plat._pos.x, plat._pos.y);
break;
case GRAB_CURSOR:
gnap.kissPlatypus(0);
break;
case TALK_CURSOR:
- gnap.playBrainPulsating(_vm->_plat->_pos.x, _vm->_plat->_pos.y);
- _vm->_plat->playSequence(_vm->_plat->getSequenceId());
+ gnap.playBrainPulsating(plat._pos.x, plat._pos.y);
+ plat.playSequence(plat.getSequenceId());
break;
case PLAT_CURSOR:
gnap.playImpossible(0, 0);
@@ -1142,7 +1145,7 @@ void Scene22::run() {
_vm->_newSceneNum = 20;
gnap.walkTo(_vm->_hotspotsWalkPos[kHS22ExitOutsideGrubCity], 0, 0x107AF, 1);
gnap._actionStatus = kAS22LeaveScene;
- _vm->_plat->walkTo(_vm->_hotspotsWalkPos[kHS22ExitOutsideGrubCity] + Common::Point(0, 1), -1, 0x107C2, 1);
+ plat.walkTo(_vm->_hotspotsWalkPos[kHS22ExitOutsideGrubCity] + Common::Point(0, 1), -1, 0x107C2, 1);
}
break;
@@ -1152,7 +1155,7 @@ void Scene22::run() {
_vm->_newSceneNum = 23;
gnap.walkTo(_vm->_hotspotsWalkPos[kHS22ExitBackGrubCity], 0, 0x107AB, 1);
gnap._actionStatus = kAS22LeaveScene;
- _vm->_plat->walkTo(_vm->_hotspotsWalkPos[kHS22ExitBackGrubCity] + Common::Point(0, 1), -1, 0x107C2, 1);
+ plat.walkTo(_vm->_hotspotsWalkPos[kHS22ExitBackGrubCity] + Common::Point(0, 1), -1, 0x107C2, 1);
}
break;
@@ -1197,7 +1200,7 @@ void Scene22::run() {
updateAnimations();
if (!_vm->_isLeavingScene) {
- _vm->_plat->updateIdleSequence();
+ plat.updateIdleSequence();
gnap.updateIdleSequence();
if (!_vm->_timers[6] && _nextCashierSequenceId == -1) {
_vm->_timers[6] = _vm->getRandom(30) + 20;
@@ -1288,6 +1291,7 @@ void Scene23::updateHotspots() {
void Scene23::run() {
GameSys& gameSys = *_vm->_gameSys;
PlayerGnap& gnap = *_vm->_gnap;
+ PlayerPlat& plat = *_vm->_plat;
_vm->_timers[4] = _vm->getRandom(100) + 200;
_vm->_timers[5] = _vm->getRandom(100) + 200;
@@ -1301,12 +1305,12 @@ void Scene23::run() {
_vm->queueInsertDeviceIcon();
gnap.initPos(-1, 7, kDirBottomRight);
- _vm->_plat->initPos(-2, 7, kDirNone);
+ plat.initPos(-2, 7, kDirNone);
gameSys.insertSequence(0xBD, 255, 0, 0, kSeqNone, 0, 0, 0);
gameSys.insertSequence(0xBF, 2, 0, 0, kSeqNone, 0, 0, 0);
_vm->endSceneInit();
- _vm->_plat->walkTo(Common::Point(1, 7), -1, 0x107C2, 1);
+ plat.walkTo(Common::Point(1, 7), -1, 0x107C2, 1);
if (_vm->isFlag(kGFUnk24)) {
gnap.walkTo(Common::Point(2, 7), -1, 0x107B9, 1);
@@ -1344,14 +1348,14 @@ void Scene23::run() {
} else {
switch (_vm->_verbCursor) {
case LOOK_CURSOR:
- gnap.playScratchingHead(_vm->_plat->_pos.x, _vm->_plat->_pos.y);
+ gnap.playScratchingHead(plat._pos.x, plat._pos.y);
break;
case GRAB_CURSOR:
gnap.kissPlatypus(0);
break;
case TALK_CURSOR:
- gnap.playBrainPulsating(_vm->_plat->_pos.x, _vm->_plat->_pos.y);
- _vm->_plat->playSequence(_vm->_plat->getSequenceId());
+ gnap.playBrainPulsating(plat._pos.x, plat._pos.y);
+ plat.playSequence(plat.getSequenceId());
break;
case PLAT_CURSOR:
gnap.playImpossible(0, 0);
@@ -1401,7 +1405,7 @@ void Scene23::run() {
_vm->_newSceneNum = 22;
gnap.walkTo(_vm->_hotspotsWalkPos[kHS23ExitFrontGrubCity], 0, 0x107AF, 1);
gnap._actionStatus = kAS23LeaveScene;
- _vm->_plat->walkTo(_vm->_hotspotsWalkPos[kHS23ExitFrontGrubCity] + Common::Point(0, -1), -1, 0x107C2, 1);
+ plat.walkTo(_vm->_hotspotsWalkPos[kHS23ExitFrontGrubCity] + Common::Point(0, -1), -1, 0x107C2, 1);
}
break;
@@ -1422,7 +1426,7 @@ void Scene23::run() {
updateAnimations();
if (!_vm->_isLeavingScene) {
- _vm->_plat->updateIdleSequence();
+ plat.updateIdleSequence();
gnap.updateIdleSequence();
if (!_vm->_timers[4] && gnap._actionStatus == -1) {
_vm->_timers[4] = _vm->getRandom(100) + 200;
@@ -1546,6 +1550,8 @@ void Scene24::updateHotspots() {
void Scene24::run() {
GameSys& gameSys = *_vm->_gameSys;
PlayerGnap& gnap = *_vm->_gnap;
+ PlayerPlat& plat = *_vm->_plat;
+
int counter = 0;
_vm->playSound(0x10940, true);
@@ -1574,16 +1580,16 @@ void Scene24::run() {
if (_vm->_prevSceneNum == 20) {
gnap.initPos(1, 8, kDirBottomRight);
- _vm->_plat->initPos(2, 8, kDirNone);
+ plat.initPos(2, 8, kDirNone);
_vm->endSceneInit();
gnap.walkTo(Common::Point(1, 9), -1, 0x107B9, 1);
- _vm->_plat->walkTo(Common::Point(2, 9), -1, 0x107C2, 1);
+ plat.walkTo(Common::Point(2, 9), -1, 0x107C2, 1);
} else {
gnap.initPos(8, 8, kDirBottomLeft);
- _vm->_plat->initPos(8, 8, kDirUnk4);
+ plat.initPos(8, 8, kDirUnk4);
_vm->endSceneInit();
gnap.walkTo(Common::Point(2, 8), -1, 0x107BA, 1);
- _vm->_plat->walkTo(Common::Point(3, 8), -1, 0x107C2, 1);
+ plat.walkTo(Common::Point(3, 8), -1, 0x107C2, 1);
}
while (!_vm->_sceneDone) {
@@ -1613,14 +1619,14 @@ void Scene24::run() {
} else {
switch (_vm->_verbCursor) {
case LOOK_CURSOR:
- gnap.playScratchingHead(_vm->_plat->_pos.x, _vm->_plat->_pos.y);
+ gnap.playScratchingHead(plat._pos.x, plat._pos.y);
break;
case GRAB_CURSOR:
gnap.kissPlatypus(0);
break;
case TALK_CURSOR:
- gnap.playBrainPulsating(_vm->_plat->_pos.x, _vm->_plat->_pos.y);
- _vm->_plat->playSequence(_vm->_plat->getSequenceId());
+ gnap.playBrainPulsating(plat._pos.x, plat._pos.y);
+ plat.playSequence(plat.getSequenceId());
break;
case PLAT_CURSOR:
gnap.playImpossible(0, 0);
@@ -1636,7 +1642,7 @@ void Scene24::run() {
_vm->_newSceneNum = 25;
gnap.walkTo(_vm->_hotspotsWalkPos[kHS24ExitCircusWorld], 0, 0x107AB, 1);
gnap._actionStatus = kAS24LeaveScene;
- _vm->_plat->walkTo(_vm->_hotspotsWalkPos[kHS24ExitCircusWorld] + Common::Point(1, 0), -1, 0x107C2, 1);
+ plat.walkTo(_vm->_hotspotsWalkPos[kHS24ExitCircusWorld] + Common::Point(1, 0), -1, 0x107C2, 1);
}
break;
@@ -1647,7 +1653,7 @@ void Scene24::run() {
gnap._idleFacing = kDirUpRight;
gnap.walkTo(_vm->_hotspotsWalkPos[kHS24ExitOutsideGrubCity], 0, gnap.getSequenceId(gskIdle, Common::Point(0, 0)) | 0x10000, 1);
gnap._actionStatus = kAS24LeaveScene;
- _vm->_plat->walkTo(_vm->_hotspotsWalkPos[kHS24ExitOutsideGrubCity] + Common::Point(1, 0), -1, 0x107C2, 1);
+ plat.walkTo(_vm->_hotspotsWalkPos[kHS24ExitOutsideGrubCity] + Common::Point(1, 0), -1, 0x107C2, 1);
}
break;
@@ -1672,7 +1678,7 @@ void Scene24::run() {
_vm->playSound(0x10940, true);
if (!_vm->_isLeavingScene) {
- _vm->_plat->updateIdleSequence();
+ plat.updateIdleSequence();
gnap.updateIdleSequence();
if (!_vm->_timers[4]) {
_vm->_timers[4] = _vm->getRandom(20) + 50;
@@ -1810,6 +1816,7 @@ void Scene25::playAnims(int index) {
void Scene25::run() {
GameSys& gameSys = *_vm->_gameSys;
PlayerGnap& gnap = *_vm->_gnap;
+ PlayerPlat& plat = *_vm->_plat;
_vm->playSound(0x10940, true);
_vm->startSoundTimerA(5);
@@ -1825,16 +1832,16 @@ void Scene25::run() {
if (_vm->_prevSceneNum == 24) {
gnap.initPos(5, 11, kDirUpLeft);
- _vm->_plat->initPos(6, 11, kDirUnk4);
+ plat.initPos(6, 11, kDirUnk4);
_vm->endSceneInit();
gnap.walkTo(Common::Point(5, 7), -1, 0x107BA, 1);
- _vm->_plat->walkTo(Common::Point(6, 7), -1, 0x107C2, 1);
+ plat.walkTo(Common::Point(6, 7), -1, 0x107C2, 1);
} else {
gnap.initPos(5, 6, kDirBottomRight);
- _vm->_plat->initPos(6, 6, kDirNone);
+ plat.initPos(6, 6, kDirNone);
_vm->endSceneInit();
gnap.walkTo(Common::Point(5, 8), -1, 0x107B9, 1);
- _vm->_plat->walkTo(Common::Point(6, 8), -1, 0x107C2, 1);
+ plat.walkTo(Common::Point(6, 8), -1, 0x107C2, 1);
}
while (!_vm->_sceneDone) {
@@ -1861,14 +1868,14 @@ void Scene25::run() {
} else {
switch (_vm->_verbCursor) {
case LOOK_CURSOR:
- gnap.playScratchingHead(_vm->_plat->_pos.x, _vm->_plat->_pos.y);
+ gnap.playScratchingHead(plat._pos.x, plat._pos.y);
break;
case GRAB_CURSOR:
gnap.kissPlatypus(0);
break;
case TALK_CURSOR:
- gnap.playBrainPulsating(_vm->_plat->_pos.x, _vm->_plat->_pos.y);
- _vm->_plat->playSequence(_vm->_plat->getSequenceId());
+ gnap.playBrainPulsating(plat._pos.x, plat._pos.y);
+ plat.playSequence(plat.getSequenceId());
break;
case PLAT_CURSOR:
gnap.playImpossible(0, 0);
@@ -1914,7 +1921,7 @@ void Scene25::run() {
_vm->_newSceneNum = 24;
gnap.walkTo(_vm->_hotspotsWalkPos[kHS25ExitOutsideCircusWorld], 0, 0x107B4, 1);
gnap._actionStatus = kAS25LeaveScene;
- _vm->_plat->walkTo(_vm->_hotspotsWalkPos[kHS25ExitOutsideCircusWorld] + Common::Point(1, 0), -1, 0x107C2, 1);
+ plat.walkTo(_vm->_hotspotsWalkPos[kHS25ExitOutsideCircusWorld] + Common::Point(1, 0), -1, 0x107C2, 1);
}
break;
@@ -1926,7 +1933,7 @@ void Scene25::run() {
_vm->_hotspots[kHS25WalkArea1]._flags |= SF_WALKABLE;
gnap.walkTo(_vm->_hotspotsWalkPos[kHS25ExitInsideCircusWorld], 0, 0x107B1, 1);
gnap._actionStatus = kAS25LeaveScene;
- _vm->_plat->walkTo(_vm->_hotspotsWalkPos[kHS25ExitInsideCircusWorld] + Common::Point(1, 0), -1, 0x107C2, 1);
+ plat.walkTo(_vm->_hotspotsWalkPos[kHS25ExitInsideCircusWorld] + Common::Point(1, 0), -1, 0x107C2, 1);
_vm->_hotspots[kHS25WalkArea1]._flags &= ~SF_WALKABLE;
} else {
_vm->_hotspots[kHS25WalkArea1]._flags |= SF_WALKABLE;
@@ -1984,7 +1991,7 @@ void Scene25::run() {
updateAnimations();
if (!_vm->_isLeavingScene) {
- _vm->_plat->updateIdleSequence();
+ plat.updateIdleSequence();
gnap.updateIdleSequence();
if (!_vm->_timers[4] && _nextTicketVendorSequenceId == -1 && gnap._actionStatus == -1) {
_vm->_timers[4] = _vm->getRandom(20) + 20;
@@ -2123,6 +2130,7 @@ void Scene26::updateHotspots() {
void Scene26::run() {
GameSys& gameSys = *_vm->_gameSys;
PlayerGnap& gnap = *_vm->_gnap;
+ PlayerPlat& plat = *_vm->_plat;
_vm->startSoundTimerB(7);
_vm->playSound(0x1093B, true);
@@ -2145,13 +2153,13 @@ void Scene26::run() {
if (_vm->_prevSceneNum == 25) {
gnap.initPos(-1, 8, kDirBottomRight);
- _vm->_plat->initPos(-2, 8, kDirNone);
+ plat.initPos(-2, 8, kDirNone);
_vm->endSceneInit();
gnap.walkTo(Common::Point(2, 8), -1, 0x107B9, 1);
- _vm->_plat->walkTo(Common::Point(1, 8), -1, 0x107C2, 1);
+ plat.walkTo(Common::Point(1, 8), -1, 0x107C2, 1);
} else {
gnap.initPos(2, 8, kDirBottomRight);
- _vm->_plat->initPos(3, 8, kDirNone);
+ plat.initPos(3, 8, kDirNone);
_vm->endSceneInit();
}
@@ -2179,14 +2187,14 @@ void Scene26::run() {
} else {
switch (_vm->_verbCursor) {
case LOOK_CURSOR:
- gnap.playMoan1(_vm->_plat->_pos.x, _vm->_plat->_pos.y);
+ gnap.playMoan1(plat._pos.x, plat._pos.y);
break;
case GRAB_CURSOR:
gnap.kissPlatypus(0);
break;
case TALK_CURSOR:
- gnap.playBrainPulsating(_vm->_plat->_pos.x, _vm->_plat->_pos.y);
- _vm->_plat->playSequence(_vm->_plat->getSequenceId());
+ gnap.playBrainPulsating(plat._pos.x, plat._pos.y);
+ plat.playSequence(plat.getSequenceId());
break;
case PLAT_CURSOR:
gnap.playImpossible(0, 0);
@@ -2261,7 +2269,7 @@ void Scene26::run() {
_vm->playSound(0x1093B, true);
if (!_vm->_isLeavingScene) {
- _vm->_plat->updateIdleSequence();
+ plat.updateIdleSequence();
gnap.updateIdleSequence();
if (!_vm->_timers[5] && _nextKidSequenceId == -1) {
_vm->_timers[5] = _vm->getRandom(20) + 50;
@@ -2341,6 +2349,7 @@ void Scene27::updateHotspots() {
void Scene27::run() {
GameSys& gameSys = *_vm->_gameSys;
PlayerGnap& gnap = *_vm->_gnap;
+ PlayerPlat& plat = *_vm->_plat;
_vm->playSound(0x1093B, true);
_vm->startSoundTimerB(4);
@@ -2364,28 +2373,28 @@ void Scene27::run() {
switch (_vm->_prevSceneNum) {
case 26:
gnap.initPos(7, 12, kDirBottomRight);
- _vm->_plat->initPos(6, 12, kDirNone);
+ plat.initPos(6, 12, kDirNone);
_vm->endSceneInit();
gnap.walkTo(Common::Point(7, 8), -1, 0x107B9, 1);
- _vm->_plat->walkTo(Common::Point(6, 8), -1, 0x107C2, 1);
+ plat.walkTo(Common::Point(6, 8), -1, 0x107C2, 1);
break;
case 29:
gnap.initPos(-1, 8, kDirBottomRight);
- _vm->_plat->initPos(-1, 9, kDirNone);
+ plat.initPos(-1, 9, kDirNone);
_vm->endSceneInit();
gnap.walkTo(Common::Point(3, 8), -1, 0x107B9, 1);
- _vm->_plat->walkTo(Common::Point(3, 9), -1, 0x107C2, 1);
+ plat.walkTo(Common::Point(3, 9), -1, 0x107C2, 1);
break;
case 31:
gnap.initPos(12, 8, kDirBottomLeft);
- _vm->_plat->initPos(12, 9, kDirUnk4);
+ plat.initPos(12, 9, kDirUnk4);
_vm->endSceneInit();
gnap.walkTo(Common::Point(8, 8), -1, 0x107BA, 1);
- _vm->_plat->walkTo(Common::Point(8, 9), -1, 0x107C2, 1);
+ plat.walkTo(Common::Point(8, 9), -1, 0x107C2, 1);
break;
default:
gnap.initPos(6, 8, kDirBottomRight);
- _vm->_plat->initPos(5, 9, kDirNone);
+ plat.initPos(5, 9, kDirNone);
_vm->endSceneInit();
break;
}
@@ -2415,14 +2424,14 @@ void Scene27::run() {
} else {
switch (_vm->_verbCursor) {
case LOOK_CURSOR:
- gnap.playMoan1(_vm->_plat->_pos.x, _vm->_plat->_pos.y);
+ gnap.playMoan1(plat._pos.x, plat._pos.y);
break;
case GRAB_CURSOR:
gnap.kissPlatypus(0);
break;
case TALK_CURSOR:
- gnap.playBrainPulsating(_vm->_plat->_pos.x, _vm->_plat->_pos.y);
- _vm->_plat->playSequence(_vm->_plat->getSequenceId());
+ gnap.playBrainPulsating(plat._pos.x, plat._pos.y);
+ plat.playSequence(plat.getSequenceId());
break;
case PLAT_CURSOR:
gnap.playImpossible(0, 0);
@@ -2488,7 +2497,7 @@ void Scene27::run() {
_vm->_newSceneNum = 26;
gnap.walkTo(Common::Point(-1, _vm->_hotspotsWalkPos[kHS27ExitCircus].y), 0, 0x107AE, 1);
gnap._actionStatus = kAS27LeaveScene;
- _vm->_plat->walkTo(_vm->_hotspotsWalkPos[kHS27ExitCircus] + Common::Point(1, 0), -1, 0x107C7, 1);
+ plat.walkTo(_vm->_hotspotsWalkPos[kHS27ExitCircus] + Common::Point(1, 0), -1, 0x107C7, 1);
}
break;
@@ -2498,7 +2507,7 @@ void Scene27::run() {
_vm->_newSceneNum = 29;
gnap.walkTo(Common::Point(-1, _vm->_hotspotsWalkPos[kHS27ExitArcade].y), 0, 0x107AF, 1);
gnap._actionStatus = kAS27LeaveScene;
- _vm->_plat->walkTo(_vm->_hotspotsWalkPos[kHS27ExitArcade] + Common::Point(0, 1), -1, 0x107CF, 1);
+ plat.walkTo(_vm->_hotspotsWalkPos[kHS27ExitArcade] + Common::Point(0, 1), -1, 0x107CF, 1);
}
break;
@@ -2508,7 +2517,7 @@ void Scene27::run() {
_vm->_newSceneNum = 31;
gnap.walkTo(Common::Point(-1, _vm->_hotspotsWalkPos[kHS27ExitBeerStand].y), 0, 0x107AB, 1);
gnap._actionStatus = kAS27LeaveScene;
- _vm->_plat->walkTo(_vm->_hotspotsWalkPos[kHS27ExitBeerStand] + Common::Point(0, 1), -1, 0x107CD, 1);
+ plat.walkTo(_vm->_hotspotsWalkPos[kHS27ExitBeerStand] + Common::Point(0, 1), -1, 0x107CD, 1);
}
break;
@@ -2519,7 +2528,7 @@ void Scene27::run() {
_vm->_newSceneNum = 28;
gnap.walkTo(_vm->_hotspotsWalkPos[kHS27ExitClown], 0, 0x107AD, 1);
gnap._actionStatus = kAS27LeaveScene;
- _vm->_plat->walkTo(_vm->_hotspotsWalkPos[kHS27ExitClown] + Common::Point(1, 0), -1, 0x107C4, 1);
+ plat.walkTo(_vm->_hotspotsWalkPos[kHS27ExitClown] + Common::Point(1, 0), -1, 0x107C4, 1);
} else {
_vm->_hotspots[kHS27WalkArea1]._flags |= SF_WALKABLE;
gnap.walkTo(Common::Point(_vm->_hotspotsWalkPos[kHS27ExitClown].x, 7), 0, 0x107BC, 1);
@@ -2549,7 +2558,7 @@ void Scene27::run() {
_vm->playSound(0x1093B, true);
if (!_vm->_isLeavingScene) {
- _vm->_plat->updateIdleSequence();
+ plat.updateIdleSequence();
if (gnap._actionStatus < 0)
gnap.updateIdleSequence();
if (_vm->_debugLevel == 4)
@@ -2719,6 +2728,7 @@ void Scene28::updateHotspots() {
void Scene28::run() {
GameSys& gameSys = *_vm->_gameSys;
PlayerGnap& gnap = *_vm->_gnap;
+ PlayerPlat& plat = *_vm->_plat;
_vm->playSound(0x1093C, true);
_nextClownSequenceId = -1;
@@ -2742,12 +2752,12 @@ void Scene28::run() {
_vm->_timers[4] = _vm->getRandom(20) + 80;
}
gnap.initPos(8, 8, kDirBottomLeft);
- _vm->_plat->initPos(9, 8, kDirUnk4);
+ plat.initPos(9, 8, kDirUnk4);
_vm->endSceneInit();
} else {
gameSys.insertSequence(0x11B, 39, 0, 0, kSeqNone, 0, 0, 0);
gnap.initPos(8, 8, kDirBottomLeft);
- _vm->_plat->initPos(9, 8, kDirUnk4);
+ plat.initPos(9, 8, kDirUnk4);
_vm->endSceneInit();
_vm->playSequences(0xF7, 0x121, 0x122, 0x123);
_currClownSequenceId = 0x115;
@@ -2788,14 +2798,14 @@ void Scene28::run() {
} else {
switch (_vm->_verbCursor) {
case LOOK_CURSOR:
- gnap.playMoan1(_vm->_plat->_pos.x, _vm->_plat->_pos.y);
+ gnap.playMoan1(plat._pos.x, plat._pos.y);
break;
case GRAB_CURSOR:
gnap.kissPlatypus(0);
break;
case TALK_CURSOR:
- gnap.playBrainPulsating(_vm->_plat->_pos.x, _vm->_plat->_pos.y);
- _vm->_plat->playSequence(_vm->_plat->getSequenceId());
+ gnap.playBrainPulsating(plat._pos.x, plat._pos.y);
+ plat.playSequence(plat.getSequenceId());
break;
case PLAT_CURSOR:
gnap.playImpossible(0, 0);
@@ -2886,7 +2896,7 @@ void Scene28::run() {
gnap.walkTo(_vm->_hotspotsWalkPos[kHS28ExitOutsideClown], 0, 0x107BF, 1);
gnap._actionStatus = kAS28LeaveScene;
_vm->_hotspots[kHS28WalkArea1]._flags &= ~SF_WALKABLE;
- _vm->_plat->walkTo(_vm->_hotspotsWalkPos[kHS28ExitOutsideClown] + Common::Point(-1, 0), -1, 0x107C2, 1);
+ plat.walkTo(_vm->_hotspotsWalkPos[kHS28ExitOutsideClown] + Common::Point(-1, 0), -1, 0x107C2, 1);
}
break;
@@ -2934,7 +2944,7 @@ void Scene28::run() {
_vm->playSound(0x1093C, true);
if (!_vm->_isLeavingScene) {
- _vm->_plat->updateIdleSequence();
+ plat.updateIdleSequence();
gnap.updateIdleSequence();
if (!_vm->_timers[4]) {
_vm->_timers[4] = _vm->getRandom(20) + 80;
@@ -3118,6 +3128,7 @@ void Scene29::updateHotspots() {
void Scene29::run() {
GameSys& gameSys = *_vm->_gameSys;
PlayerGnap& gnap = *_vm->_gnap;
+ PlayerPlat& plat = *_vm->_plat;
_vm->playSound(0x1093B, true);
_vm->startSoundTimerB(6);
@@ -3145,16 +3156,16 @@ void Scene29::run() {
if (_vm->_prevSceneNum == 27) {
gnap.initPos(12, 7, kDirBottomRight);
- _vm->_plat->initPos(12, 8, kDirNone);
+ plat.initPos(12, 8, kDirNone);
_vm->endSceneInit();
gnap.walkTo(Common::Point(8, 7), -1, 0x107B9, 1);
- _vm->_plat->walkTo(Common::Point(8, 8), -1, 0x107C2, 1);
+ plat.walkTo(Common::Point(8, 8), -1, 0x107C2, 1);
} else {
gnap.initPos(-1, 7, kDirBottomRight);
- _vm->_plat->initPos(-2, 7, kDirNone);
+ plat.initPos(-2, 7, kDirNone);
_vm->endSceneInit();
gnap.walkTo(Common::Point(2, 7), -1, 0x107B9, 1);
- _vm->_plat->walkTo(Common::Point(1, 7), -1, 0x107C2, 1);
+ plat.walkTo(Common::Point(1, 7), -1, 0x107C2, 1);
}
while (!_vm->_sceneDone) {
@@ -3181,14 +3192,14 @@ void Scene29::run() {
} else {
switch (_vm->_verbCursor) {
case LOOK_CURSOR:
- gnap.playMoan1(_vm->_plat->_pos.x, _vm->_plat->_pos.y);
+ gnap.playMoan1(plat._pos.x, plat._pos.y);
break;
case GRAB_CURSOR:
gnap.kissPlatypus(0);
break;
case TALK_CURSOR:
- gnap.playBrainPulsating(_vm->_plat->_pos.x, _vm->_plat->_pos.y);
- _vm->_plat->playSequence(_vm->_plat->getSequenceId());
+ gnap.playBrainPulsating(plat._pos.x, plat._pos.y);
+ plat.playSequence(plat.getSequenceId());
break;
case PLAT_CURSOR:
gnap.playImpossible(0, 0);
@@ -3232,7 +3243,7 @@ void Scene29::run() {
_vm->_newSceneNum = 26;
gnap.walkTo(_vm->_hotspotsWalkPos[kHS29ExitCircus], 0, 0x107AE, 1);
gnap._actionStatus = kAS29LeaveScene;
- _vm->_plat->walkTo(_vm->_hotspotsWalkPos[kHS29ExitCircus] + Common::Point(1, 0), -1, -1, 1);
+ plat.walkTo(_vm->_hotspotsWalkPos[kHS29ExitCircus] + Common::Point(1, 0), -1, -1, 1);
}
break;
@@ -3242,7 +3253,7 @@ void Scene29::run() {
_vm->_newSceneNum = 27;
gnap.walkTo(_vm->_hotspotsWalkPos[kHS29ExitOutsideClown], 0, 0x107AB, 1);
gnap._actionStatus = kAS29LeaveScene;
- _vm->_plat->walkTo(_vm->_hotspotsWalkPos[kHS29ExitOutsideClown] + Common::Point(0, -1), -1, 0x107CD, 1);
+ plat.walkTo(_vm->_hotspotsWalkPos[kHS29ExitOutsideClown] + Common::Point(0, -1), -1, 0x107CD, 1);
}
break;
@@ -3293,7 +3304,7 @@ void Scene29::run() {
if (!_vm->_isLeavingScene) {
if (gnap._actionStatus < 0) {
gnap.updateIdleSequence();
- _vm->_plat->updateIdleSequence();
+ plat.updateIdleSequence();
}
if (!_vm->_timers[4]) {
if (_vm->invHas(kItemHorn)) {
diff --git a/engines/gnap/scenes/group3.cpp b/engines/gnap/scenes/group3.cpp
index c0050c1567..a740d21a7e 100644
--- a/engines/gnap/scenes/group3.cpp
+++ b/engines/gnap/scenes/group3.cpp
@@ -47,6 +47,7 @@ void Scene30::updateHotspots() {
void Scene30::run() {
GameSys& gameSys = *_vm->_gameSys;
PlayerGnap& gnap = *_vm->_gnap;
+ PlayerPlat& plat = *_vm->_plat;
bool hasTakenPill = false;
@@ -67,10 +68,10 @@ void Scene30::run() {
_kidSequenceId = 0x101;
gnap.initPos(7, 12, kDirBottomRight);
- _vm->_plat->initPos(6, 12, kDirNone);
+ plat.initPos(6, 12, kDirNone);
_vm->endSceneInit();
gnap.walkTo(Common::Point(7, 8), -1, 0x107B9, 1);
- _vm->_plat->walkTo(Common::Point(6, 8), -1, 0x107C2, 1);
+ plat.walkTo(Common::Point(6, 8), -1, 0x107C2, 1);
while (!_vm->_sceneDone) {
_vm->updateMouseCursor();
@@ -96,14 +97,14 @@ void Scene30::run() {
} else {
switch (_vm->_verbCursor) {
case LOOK_CURSOR:
- gnap.playMoan1(_vm->_plat->_pos.x, _vm->_plat->_pos.y);
+ gnap.playMoan1(plat._pos.x, plat._pos.y);
break;
case GRAB_CURSOR:
gnap.kissPlatypus(0);
break;
case TALK_CURSOR:
- gnap.playBrainPulsating(_vm->_plat->_pos.x, _vm->_plat->_pos.y);
- _vm->_plat->playSequence(_vm->_plat->getSequenceId());
+ gnap.playBrainPulsating(plat._pos.x, plat._pos.y);
+ plat.playSequence(plat.getSequenceId());
break;
case PLAT_CURSOR:
gnap.playImpossible(0, 0);
@@ -150,7 +151,7 @@ void Scene30::run() {
_vm->_newSceneNum = 26;
gnap.walkTo(Common::Point(-1, _vm->_hotspotsWalkPos[kHS30ExitCircus].y), 0, 0x107AE, 1);
gnap._actionStatus = kAS30LeaveScene;
- _vm->_plat->walkTo(_vm->_hotspotsWalkPos[kHS30ExitCircus] + Common::Point(1, 0), -1, 0x107C2, 1);
+ plat.walkTo(_vm->_hotspotsWalkPos[kHS30ExitCircus] + Common::Point(1, 0), -1, 0x107C2, 1);
}
break;
@@ -173,7 +174,7 @@ void Scene30::run() {
_vm->playSound(0x1093B, true);
if (!_vm->_isLeavingScene) {
- _vm->_plat->updateIdleSequence();
+ plat.updateIdleSequence();
if (gnap._actionStatus < 0)
gnap.updateIdleSequence();
if (!_vm->_timers[4]) {
@@ -299,6 +300,7 @@ void Scene31::updateHotspots() {
void Scene31::run() {
GameSys& gameSys = *_vm->_gameSys;
PlayerGnap& gnap = *_vm->_gnap;
+ PlayerPlat& plat = *_vm->_plat;
_vm->playSound(0x1093B, true);
_vm->startSoundTimerB(6);
@@ -317,16 +319,16 @@ void Scene31::run() {
if (_vm->_prevSceneNum == 27) {
gnap.initPos(-1, 8, kDirBottomLeft);
- _vm->_plat->initPos(-1, 9, kDirUnk4);
+ plat.initPos(-1, 9, kDirUnk4);
_vm->endSceneInit();
gnap.walkTo(Common::Point(3, 8), -1, 0x107BA, 1);
- _vm->_plat->walkTo(Common::Point(3, 9), -1, 0x107D2, 1);
+ plat.walkTo(Common::Point(3, 9), -1, 0x107D2, 1);
} else {
gnap.initPos(7, 12, kDirBottomRight);
- _vm->_plat->initPos(6, 12, kDirNone);
+ plat.initPos(6, 12, kDirNone);
_vm->endSceneInit();
gnap.walkTo(Common::Point(7, 8), -1, 0x107BA, 1);
- _vm->_plat->walkTo(Common::Point(6, 8), -1, 0x107D2, 1);
+ plat.walkTo(Common::Point(6, 8), -1, 0x107D2, 1);
}
while (!_vm->_sceneDone) {
@@ -353,14 +355,14 @@ void Scene31::run() {
} else {
switch (_vm->_verbCursor) {
case LOOK_CURSOR:
- gnap.playMoan1(_vm->_plat->_pos.x, _vm->_plat->_pos.y);
+ gnap.playMoan1(plat._pos.x, plat._pos.y);
break;
case GRAB_CURSOR:
gnap.kissPlatypus(0);
break;
case TALK_CURSOR:
- gnap.playBrainPulsating(_vm->_plat->_pos.x, _vm->_plat->_pos.y);
- _vm->_plat->playSequence(_vm->_plat->getSequenceId());
+ gnap.playBrainPulsating(plat._pos.x, plat._pos.y);
+ plat.playSequence(plat.getSequenceId());
break;
case PLAT_CURSOR:
gnap.playImpossible(0, 0);
@@ -398,11 +400,11 @@ void Scene31::run() {
case PLAT_CURSOR:
if (!_vm->invHas(kItemBucketWithBeer)) {
gnap.useDeviceOnPlatypus();
- _vm->_plat->walkTo(_vm->_hotspotsWalkPos[kHS31MeasuringClown] + Common::Point(0, 1), 1, 0x107C2, 1);
+ plat.walkTo(_vm->_hotspotsWalkPos[kHS31MeasuringClown] + Common::Point(0, 1), 1, 0x107C2, 1);
_vm->_hotspots[kHS31WalkArea1]._flags |= SF_WALKABLE;
- _vm->_plat->walkTo(_vm->_hotspotsWalkPos[kHS31MeasuringClown], 1, 0x107C2, 1);
+ plat.walkTo(_vm->_hotspotsWalkPos[kHS31MeasuringClown], 1, 0x107C2, 1);
_vm->_hotspots[kHS31WalkArea1]._flags &= ~SF_WALKABLE;
- _vm->_plat->_actionStatus = kAS31PlatMeasuringClown;
+ plat._actionStatus = kAS31PlatMeasuringClown;
gnap._actionStatus = kAS31PlatMeasuringClown;
_vm->_timers[4] = 300;
} else
@@ -456,7 +458,7 @@ void Scene31::run() {
_vm->_newSceneNum = 26;
gnap.walkTo(Common::Point(-1, _vm->_hotspotsWalkPos[kHS31ExitCircus].y), 0, 0x107AE, 1);
gnap._actionStatus = kAS31LeaveScene;
- _vm->_plat->walkTo(_vm->_hotspotsWalkPos[kHS31ExitCircus] + Common::Point(1, 0), -1, -1, 1);
+ plat.walkTo(_vm->_hotspotsWalkPos[kHS31ExitCircus] + Common::Point(1, 0), -1, -1, 1);
}
break;
@@ -466,7 +468,7 @@ void Scene31::run() {
_vm->_newSceneNum = 27;
gnap.walkTo(Common::Point(-1, _vm->_hotspotsWalkPos[kHS31ExitOutsideClown].y), 0, 0x107AF, 1);
gnap._actionStatus = kAS31LeaveScene;
- _vm->_plat->walkTo(_vm->_hotspotsWalkPos[kHS31ExitOutsideClown] + Common::Point(0, 1), -1, 0x107CF, 1);
+ plat.walkTo(_vm->_hotspotsWalkPos[kHS31ExitOutsideClown] + Common::Point(0, 1), -1, 0x107CF, 1);
}
break;
@@ -489,8 +491,8 @@ void Scene31::run() {
_vm->playSound(0x1093B, true);
if (!_vm->_isLeavingScene) {
- if (_vm->_plat->_actionStatus < 0)
- _vm->_plat->updateIdleSequence();
+ if (plat._actionStatus < 0)
+ plat.updateIdleSequence();
if (gnap._actionStatus < 0)
gnap.updateIdleSequence();
if (!_vm->_timers[4]) {
@@ -539,6 +541,7 @@ void Scene31::run() {
void Scene31::updateAnimations() {
GameSys& gameSys = *_vm->_gameSys;
PlayerGnap& gnap = *_vm->_gnap;
+ PlayerPlat& plat = *_vm->_plat;
if (gameSys.getAnimationStatus(0) == 2) {
gameSys.setAnimation(0, 0, 0);
@@ -578,7 +581,7 @@ void Scene31::updateAnimations() {
if (gameSys.getAnimationStatus(1) == 2) {
gameSys.setAnimation(0, 0, 1);
- if (_vm->_plat->_actionStatus == kAS31PlatMeasuringClown) {
+ if (plat._actionStatus == kAS31PlatMeasuringClown) {
_vm->_sceneWaiting = true;
_beerGuyDistracted = true;
_nextClerkSequenceId = 0xFA;
@@ -599,7 +602,7 @@ void Scene31::updateAnimations() {
++_clerkMeasureCtr;
if (_clerkMeasureCtr >= _clerkMeasureMaxCtr) {
if (gnap._actionStatus != 5)
- _vm->_plat->_actionStatus = -1;
+ plat._actionStatus = -1;
_vm->_timers[0] = 40;
gameSys.insertSequence(0xFD, 39, _currClerkSequenceId, 39, kSeqSyncWait, 0, 0, 0);
_currClerkSequenceId = 0xFD;
@@ -663,6 +666,7 @@ void Scene32::updateHotspots() {
void Scene32::run() {
GameSys& gameSys = *_vm->_gameSys;
PlayerGnap& gnap = *_vm->_gnap;
+ PlayerPlat& plat = *_vm->_plat;
_vm->playSound(0x1091C, true);
_vm->startSoundTimerC(5);
@@ -671,13 +675,13 @@ void Scene32::run() {
if (_vm->_prevSceneNum == 33) {
gnap.initPos(11, 6, kDirBottomLeft);
- _vm->_plat->initPos(12, 6, kDirUnk4);
+ plat.initPos(12, 6, kDirUnk4);
_vm->endSceneInit();
- _vm->_plat->walkTo(Common::Point(9, 6), -1, 0x107D2, 1);
+ plat.walkTo(Common::Point(9, 6), -1, 0x107D2, 1);
gnap.walkTo(Common::Point(8, 6), -1, 0x107BA, 1);
} else {
gnap.initPos(1, 6, kDirBottomRight);
- _vm->_plat->initPos(1, 7, kDirNone);
+ plat.initPos(1, 7, kDirNone);
_vm->endSceneInit();
}
@@ -700,21 +704,21 @@ void Scene32::run() {
case kHS32Platypus:
if (gnap._actionStatus < 0) {
if (_vm->_grabCursorSpriteIndex >= 0) {
- gnap.playImpossible(_vm->_plat->_pos.x, _vm->_plat->_pos.y);
+ gnap.playImpossible(plat._pos.x, plat._pos.y);
} else {
switch (_vm->_verbCursor) {
case LOOK_CURSOR:
- gnap.playMoan1(_vm->_plat->_pos.x, _vm->_plat->_pos.y);
+ gnap.playMoan1(plat._pos.x, plat._pos.y);
break;
case GRAB_CURSOR:
gnap.kissPlatypus(0);
break;
case TALK_CURSOR:
- gnap.playBrainPulsating(_vm->_plat->_pos.x, _vm->_plat->_pos.y);
- _vm->_plat->playSequence(_vm->_plat->getSequenceId());
+ gnap.playBrainPulsating(plat._pos.x, plat._pos.y);
+ plat.playSequence(plat.getSequenceId());
break;
case PLAT_CURSOR:
- gnap.playImpossible(_vm->_plat->_pos.x, _vm->_plat->_pos.y);
+ gnap.playImpossible(plat._pos.x, plat._pos.y);
break;
}
}
@@ -727,7 +731,7 @@ void Scene32::run() {
_vm->setGrabCursorSprite(-1);
gnap.walkTo(_vm->_hotspotsWalkPos[kHS32ExitTruck], 0, 0x107AB, 1);
gnap._actionStatus = kAS32LeaveScene;
- _vm->_plat->walkTo(_vm->_hotspotsWalkPos[kHS32ExitTruck] + Common::Point(0, 1), -1, 0x107CD, 1);
+ plat.walkTo(_vm->_hotspotsWalkPos[kHS32ExitTruck] + Common::Point(0, 1), -1, 0x107CD, 1);
_vm->_newSceneNum = 33;
}
break;
@@ -757,8 +761,8 @@ void Scene32::run() {
_vm->playSound(0x1091C, true);
if (!_vm->_isLeavingScene) {
- if (_vm->_plat->_actionStatus < 0)
- _vm->_plat->updateIdleSequence();
+ if (plat._actionStatus < 0)
+ plat.updateIdleSequence();
if (gnap._actionStatus < 0)
gnap.updateIdleSequence();
if (!_vm->_timers[4]) {
@@ -819,6 +823,7 @@ void Scene33::updateHotspots() {
void Scene33::run() {
GameSys& gameSys = *_vm->_gameSys;
PlayerGnap& gnap = *_vm->_gnap;
+ PlayerPlat& plat = *_vm->_plat;
_vm->playSound(0x1091C, true);
_vm->startSoundTimerC(6);
@@ -834,26 +839,26 @@ void Scene33::run() {
switch (_vm->_prevSceneNum) {
case 34:
gnap.initPos(11, 7, kDirBottomLeft);
- _vm->_plat->initPos(12, 7, kDirUnk4);
+ plat.initPos(12, 7, kDirUnk4);
_vm->endSceneInit();
gnap.walkTo(Common::Point(8, 7), -1, 0x107BA, 1);
- _vm->_plat->walkTo(Common::Point(9, 7), -1, 0x107D2, 1);
+ plat.walkTo(Common::Point(9, 7), -1, 0x107D2, 1);
break;
case 37:
gnap.initPos(7, 7, kDirBottomRight);
- _vm->_plat->initPos(8, 7, kDirNone);
+ plat.initPos(8, 7, kDirNone);
_vm->endSceneInit();
break;
case 32:
gnap.initPos(-1, 6, kDirBottomRight);
- _vm->_plat->initPos(-1, 7, kDirNone);
+ plat.initPos(-1, 7, kDirNone);
_vm->endSceneInit();
- _vm->_plat->walkTo(Common::Point(2, 7), -1, 0x107C2, 1);
+ plat.walkTo(Common::Point(2, 7), -1, 0x107C2, 1);
gnap.walkTo(Common::Point(2, 8), -1, 0x107B9, 1);
break;
default:
gnap.initPos(3, 7, kDirBottomRight);
- _vm->_plat->initPos(2, 7, kDirNone);
+ plat.initPos(2, 7, kDirNone);
_vm->endSceneInit();
break;
}
@@ -877,21 +882,21 @@ void Scene33::run() {
case kHS33Platypus:
if (gnap._actionStatus < 0) {
if (_vm->_grabCursorSpriteIndex >= 0) {
- gnap.playImpossible(_vm->_plat->_pos.x, _vm->_plat->_pos.y);
+ gnap.playImpossible(plat._pos.x, plat._pos.y);
} else {
switch (_vm->_verbCursor) {
case LOOK_CURSOR:
- gnap.playMoan1(_vm->_plat->_pos.x, _vm->_plat->_pos.y);
+ gnap.playMoan1(plat._pos.x, plat._pos.y);
break;
case GRAB_CURSOR:
gnap.kissPlatypus(0);
break;
case TALK_CURSOR:
- gnap.playBrainPulsating(_vm->_plat->_pos.x, _vm->_plat->_pos.y);
- _vm->_plat->playSequence(_vm->_plat->getSequenceId());
+ gnap.playBrainPulsating(plat._pos.x, plat._pos.y);
+ plat.playSequence(plat.getSequenceId());
break;
case PLAT_CURSOR:
- gnap.playImpossible(_vm->_plat->_pos.x, _vm->_plat->_pos.y);
+ gnap.playImpossible(plat._pos.x, plat._pos.y);
break;
}
}
@@ -954,7 +959,7 @@ void Scene33::run() {
_vm->_isLeavingScene = true;
gnap.walkTo(_vm->_hotspotsWalkPos[kHS33ExitCreek], 0, 0x107AB, 1);
gnap._actionStatus = kAS33LeaveScene;
- _vm->_plat->walkTo(_vm->_hotspotsWalkPos[kHS33ExitCreek], -1, 0x107CD, 1);
+ plat.walkTo(_vm->_hotspotsWalkPos[kHS33ExitCreek], -1, 0x107CD, 1);
_vm->_newSceneNum = 34;
}
break;
@@ -964,7 +969,7 @@ void Scene33::run() {
_vm->_isLeavingScene = true;
gnap.walkTo(_vm->_hotspotsWalkPos[kHS33ExitPigpen], 0, 0x107AF, 1);
gnap._actionStatus = kAS33LeaveScene;
- _vm->_plat->walkTo(_vm->_hotspotsWalkPos[kHS33ExitPigpen], -1, 0x107CF, 1);
+ plat.walkTo(_vm->_hotspotsWalkPos[kHS33ExitPigpen], -1, 0x107CF, 1);
_vm->_newSceneNum = 32;
}
break;
@@ -989,8 +994,8 @@ void Scene33::run() {
_vm->playSound(0x1091C, true);
if (!_vm->_isLeavingScene) {
- if (_vm->_plat->_actionStatus < 0)
- _vm->_plat->updateIdleSequence();
+ if (plat._actionStatus < 0)
+ plat.updateIdleSequence();
if (gnap._actionStatus < 0)
gnap.updateIdleSequence();
if (!_vm->_timers[4]) {
@@ -1094,6 +1099,7 @@ int Scene38::init() {
void Scene38::updateHotspots() {
PlayerGnap& gnap = *_vm->_gnap;
+ PlayerPlat& plat = *_vm->_plat;
_vm->setHotspot(kHS38Platypus, 0, 0, 0, 0, SF_WALKABLE | SF_TALK_CURSOR | SF_GRAB_CURSOR | SF_LOOK_CURSOR);
_vm->setHotspot(kHS38ExitHouse, 150, 585, 650, 600, SF_EXIT_D_CURSOR, 0, 8);
@@ -1108,37 +1114,38 @@ void Scene38::updateHotspots() {
_vm->setHotspot(kHS38WalkArea5, 770, 0, 799, 445);
_vm->setHotspot(kHS38WalkArea6, 393, 0, 698, 445, SF_WALKABLE | SF_DISABLED);
_vm->setDeviceHotspot(kHS38Device, -1, -1, -1, -1);
- if (_vm->_plat->_actionStatus == kAS38PlatypusHoldingTrapDoor)
+ if (plat._actionStatus == kAS38PlatypusHoldingTrapDoor)
_vm->_hotspots[kHS38Platypus]._flags = SF_WALKABLE | SF_DISABLED;
- if (_vm->_plat->_actionStatus == kAS38PlatypusHoldingTrapDoor)
+ if (plat._actionStatus == kAS38PlatypusHoldingTrapDoor)
_vm->_hotspots[kHS38ExitCave]._flags = SF_EXIT_D_CURSOR;
else if (gnap._actionStatus == kAS38HoldingHuntingTrophy)
_vm->_hotspots[kHS38ExitCave]._flags = SF_EXIT_D_CURSOR;
- if (_vm->_plat->_actionStatus == kAS38PlatypusHoldingTrapDoor)
+ if (plat._actionStatus == kAS38PlatypusHoldingTrapDoor)
_vm->_hotspots[kHS38TrapDoorLid1]._flags = SF_DISABLED;
else if (gnap._actionStatus == kAS38HoldingHuntingTrophy)
_vm->_hotspots[kHS38TrapDoorLid1]._flags = SF_PLAT_CURSOR | SF_TALK_CURSOR | SF_GRAB_CURSOR | SF_LOOK_CURSOR;
- if (_vm->_plat->_actionStatus == kAS38PlatypusHoldingTrapDoor)
+ if (plat._actionStatus == kAS38PlatypusHoldingTrapDoor)
_vm->_hotspots[kHS38TrapDoorLid2]._flags = SF_DISABLED;
else if (gnap._actionStatus == kAS38HoldingHuntingTrophy)
_vm->_hotspots[kHS38TrapDoorLid2]._flags = SF_PLAT_CURSOR | SF_TALK_CURSOR | SF_GRAB_CURSOR | SF_LOOK_CURSOR;
- if (_vm->_plat->_actionStatus == kAS38PlatypusHoldingTrapDoor)
+ if (plat._actionStatus == kAS38PlatypusHoldingTrapDoor)
_vm->_hotspots[kHS38WalkArea6]._flags = SF_NONE;
_vm->_hotspotsCount = 13;
}
void Scene38::run() {
PlayerGnap& gnap = *_vm->_gnap;
+ PlayerPlat& plat = *_vm->_plat;
_vm->queueInsertDeviceIcon();
_vm->_gameSys->insertSequence(0x9B, 0, 0, 0, kSeqNone, 0, 0, 0);
if (_vm->_prevSceneNum == 39) {
gnap.initPos(3, 7, kDirBottomLeft);
- _vm->_plat->initPos(4, 7, kDirUnk4);
+ plat.initPos(4, 7, kDirUnk4);
} else {
gnap.initPos(3, 8, kDirBottomRight);
- _vm->_plat->initPos(4, 8, kDirNone);
+ plat.initPos(4, 8, kDirNone);
}
_vm->endSceneInit();
@@ -1159,21 +1166,21 @@ void Scene38::run() {
if (gnap._actionStatus == kAS38HoldingHuntingTrophy) {
gnap._actionStatus = kAS38ReleaseHuntingTrophy;
} else if (_vm->_grabCursorSpriteIndex >= 0) {
- gnap.playImpossible(_vm->_plat->_pos.x, _vm->_plat->_pos.y);
+ gnap.playImpossible(plat._pos.x, plat._pos.y);
} else {
switch (_vm->_verbCursor) {
case LOOK_CURSOR:
- gnap.playMoan1(_vm->_plat->_pos.x, _vm->_plat->_pos.y);
+ gnap.playMoan1(plat._pos.x, plat._pos.y);
break;
case GRAB_CURSOR:
gnap.kissPlatypus(0);
break;
case TALK_CURSOR:
- gnap.playBrainPulsating(_vm->_plat->_pos.x, _vm->_plat->_pos.y);
- _vm->_plat->playSequence(_vm->_plat->getSequenceId());
+ gnap.playBrainPulsating(plat._pos.x, plat._pos.y);
+ plat.playSequence(plat.getSequenceId());
break;
case PLAT_CURSOR:
- gnap.playImpossible(_vm->_plat->_pos.x, _vm->_plat->_pos.y);
+ gnap.playImpossible(plat._pos.x, plat._pos.y);
break;
}
}
@@ -1193,9 +1200,9 @@ void Scene38::run() {
case kHS38ExitCave:
if (gnap._actionStatus == kAS38HoldingHuntingTrophy) {
gnap._actionStatus = kAS38ReleaseHuntingTrophy;
- if (_vm->_plat->_actionStatus == kAS38PlatypusHoldingTrapDoor)
+ if (plat._actionStatus == kAS38PlatypusHoldingTrapDoor)
_vm->_isLeavingScene = true;
- } else if (_vm->_plat->_actionStatus == kAS38PlatypusHoldingTrapDoor) {
+ } else if (plat._actionStatus == kAS38PlatypusHoldingTrapDoor) {
_vm->_sceneWaiting = false;
_vm->_isLeavingScene = true;
gnap.walkTo(Common::Point(5, 7), 0, 0x107BB, 1);
@@ -1207,7 +1214,7 @@ void Scene38::run() {
case kHS38TrapDoorLid1:
case kHS38TrapDoorLid2:
if (gnap._actionStatus == kAS38HoldingHuntingTrophy) {
- if (_vm->_verbCursor == PLAT_CURSOR && _vm->_plat->_actionStatus != kAS38PlatypusHoldingTrapDoor)
+ if (_vm->_verbCursor == PLAT_CURSOR && plat._actionStatus != kAS38PlatypusHoldingTrapDoor)
gnap._actionStatus = kAS38UsePlatypusWithTrapDoor;
else
gnap._actionStatus = kAS38ReleaseHuntingTrophy;
@@ -1224,11 +1231,11 @@ void Scene38::run() {
gnap.playScratchingHead(0, 0);
break;
case GRAB_CURSOR:
- if (_vm->_plat->_actionStatus == kAS38PlatypusHoldingTrapDoor)
+ if (plat._actionStatus == kAS38PlatypusHoldingTrapDoor)
gnap.playImpossible(0, 0);
else {
gnap.walkTo(Common::Point(3, 6), 0, 0x107BB, 1);
- _vm->_plat->walkTo(Common::Point(4, 8), -1, -1, 1);
+ plat.walkTo(Common::Point(4, 8), -1, -1, 1);
gnap._actionStatus = kAS38UseHuntingTrophy;
}
break;
@@ -1272,7 +1279,7 @@ void Scene38::run() {
updateAnimations();
if (!_vm->_isLeavingScene) {
- _vm->_plat->updateIdleSequence();
+ plat.updateIdleSequence();
gnap.updateIdleSequence();
}
@@ -1291,6 +1298,7 @@ void Scene38::run() {
void Scene38::updateAnimations() {
GameSys& gameSys = *_vm->_gameSys;
PlayerGnap& gnap = *_vm->_gnap;
+ PlayerPlat& plat = *_vm->_plat;
if (gameSys.getAnimationStatus(0) == 2) {
gameSys.setAnimation(0, 0, 0);
@@ -1299,7 +1307,7 @@ void Scene38::updateAnimations() {
_vm->_sceneDone = true;
break;
case kAS38ExitCave:
- gameSys.removeSequence(_vm->_plat->_sequenceId | (_vm->_plat->_sequenceDatNum << 16), _vm->_plat->_id, true);
+ gameSys.removeSequence(plat._sequenceId | (plat._sequenceDatNum << 16), plat._id, true);
gameSys.insertSequence(0xA3, gnap._id, makeRid(gnap._sequenceDatNum, gnap._sequenceId), gnap._id, kSeqSyncWait, 0, 0, 0);
gnap._sequenceId = 0xA3;
gnap._sequenceDatNum = 0;
@@ -1316,7 +1324,7 @@ void Scene38::updateAnimations() {
updateHotspots();
break;
case kAS38HoldingHuntingTrophy:
- if (_vm->_plat->_actionStatus != kAS38PlatypusHoldingTrapDoor)
+ if (plat._actionStatus != kAS38PlatypusHoldingTrapDoor)
_vm->_sceneWaiting = true;
if (gnap._sequenceId == 0xA4) {
gameSys.insertSequence(0x9D, gnap._id, makeRid(gnap._sequenceDatNum, gnap._sequenceId), gnap._id, kSeqSyncWait, 0, 0, 0);
@@ -1332,7 +1340,7 @@ void Scene38::updateAnimations() {
if (gnap._sequenceId == 0x9E) {
gameSys.insertSequence(0x9B, 0, 0, 0, kSeqNone, 0, 0, 0);
gnap._actionStatus = -1;
- } else if (_vm->_plat->_actionStatus == kAS38PlatypusHoldingTrapDoor) {
+ } else if (plat._actionStatus == kAS38PlatypusHoldingTrapDoor) {
gameSys.insertSequence(0xA0, gnap._id, makeRid(gnap._sequenceDatNum, gnap._sequenceId), gnap._id, kSeqSyncWait, 0, 0, 0);
gnap._sequenceId = 0xA0;
gnap._sequenceDatNum = 0;
@@ -1364,17 +1372,17 @@ void Scene38::updateAnimations() {
gnap._sequenceDatNum = 0;
gameSys.setAnimation(0x9F, gnap._id, 0);
gnap._actionStatus = kAS38HoldingHuntingTrophy;
- if (_vm->_plat->_idleFacing != kDirNone)
- _vm->_plat->playSequence(0x107D5);
+ if (plat._idleFacing != kDirNone)
+ plat.playSequence(0x107D5);
else
- _vm->_plat->playSequence(0x107D4);
- _vm->_plat->walkTo(Common::Point(8, 7), -1, 0x107D2, 1);
- gameSys.insertSequence(0xA1, gnap._id + 1, _vm->_plat->_sequenceId | (_vm->_plat->_sequenceDatNum << 16), _vm->_plat->_id, kSeqSyncWait, 0, 0, 0);
- _vm->_plat->_sequenceId = 0xA1;
- _vm->_plat->_sequenceDatNum = 0;
- _vm->_plat->_id = gnap._id + 1;
+ plat.playSequence(0x107D4);
+ plat.walkTo(Common::Point(8, 7), -1, 0x107D2, 1);
+ gameSys.insertSequence(0xA1, gnap._id + 1, plat._sequenceId | (plat._sequenceDatNum << 16), plat._id, kSeqSyncWait, 0, 0, 0);
+ plat._sequenceId = 0xA1;
+ plat._sequenceDatNum = 0;
+ plat._id = gnap._id + 1;
gameSys.setAnimation(0xA1, gnap._id + 1, 1);
- _vm->_plat->_actionStatus = kAS38PlatypusHoldingTrapDoor;
+ plat._actionStatus = kAS38PlatypusHoldingTrapDoor;
updateHotspots();
break;
}
@@ -1382,10 +1390,10 @@ void Scene38::updateAnimations() {
if (gameSys.getAnimationStatus(1) == 2) {
gameSys.setAnimation(0, 0, 1);
- if (_vm->_plat->_actionStatus == kAS38PlatypusHoldingTrapDoor) {
- gameSys.insertSequence(0xA2, _vm->_plat->_id, _vm->_plat->_sequenceId | (_vm->_plat->_sequenceDatNum << 16), _vm->_plat->_id, kSeqSyncWait, 0, 0, 0);
- _vm->_plat->_sequenceId = 0xA2;
- _vm->_plat->_sequenceDatNum = 0;
+ if (plat._actionStatus == kAS38PlatypusHoldingTrapDoor) {
+ gameSys.insertSequence(0xA2, plat._id, plat._sequenceId | (plat._sequenceDatNum << 16), plat._id, kSeqSyncWait, 0, 0, 0);
+ plat._sequenceId = 0xA2;
+ plat._sequenceDatNum = 0;
updateHotspots();
_vm->_sceneWaiting = true;
}
@@ -1421,6 +1429,7 @@ void Scene39::updateHotspots() {
void Scene39::run() {
GameSys& gameSys = *_vm->_gameSys;
PlayerGnap& gnap = *_vm->_gnap;
+ PlayerPlat& plat = *_vm->_plat;
// Bug in the original? Timer was never initialized.
_vm->_timers[5] = 0;
@@ -1435,11 +1444,11 @@ void Scene39::run() {
_nextGuySequenceId = -1;
if (_vm->_prevSceneNum == 38) {
gnap.initPos(3, 7, kDirUpRight);
- _vm->_plat->initPos(2, 7, kDirUpLeft);
+ plat.initPos(2, 7, kDirUpLeft);
_vm->endSceneInit();
} else {
gnap.initPos(4, 7, kDirBottomRight);
- _vm->_plat->initPos(5, 7, kDirNone);
+ plat.initPos(5, 7, kDirNone);
_vm->endSceneInit();
}
@@ -1467,21 +1476,21 @@ void Scene39::run() {
case kHS39Platypus:
if (gnap._actionStatus < 0) {
if (_vm->_grabCursorSpriteIndex >= 0) {
- gnap.playImpossible(_vm->_plat->_pos.x, _vm->_plat->_pos.y);
+ gnap.playImpossible(plat._pos.x, plat._pos.y);
} else {
switch (_vm->_verbCursor) {
case LOOK_CURSOR:
- gnap.playMoan1(_vm->_plat->_pos.x, _vm->_plat->_pos.y);
+ gnap.playMoan1(plat._pos.x, plat._pos.y);
break;
case GRAB_CURSOR:
gnap.kissPlatypus(0);
break;
case TALK_CURSOR:
- gnap.playBrainPulsating(_vm->_plat->_pos.x, _vm->_plat->_pos.y);
- _vm->_plat->playSequence(_vm->_plat->getSequenceId());
+ gnap.playBrainPulsating(plat._pos.x, plat._pos.y);
+ plat.playSequence(plat.getSequenceId());
break;
case PLAT_CURSOR:
- gnap.playImpossible(_vm->_plat->_pos.x, _vm->_plat->_pos.y);
+ gnap.playImpossible(plat._pos.x, plat._pos.y);
break;
}
}
@@ -1544,8 +1553,8 @@ void Scene39::run() {
updateAnimations();
if (!_vm->_isLeavingScene) {
- if (_vm->_plat->_actionStatus < 0)
- _vm->_plat->updateIdleSequence();
+ if (plat._actionStatus < 0)
+ plat.updateIdleSequence();
if (gnap._actionStatus < 0)
gnap.updateIdleSequence();
if (!_vm->_timers[5]) {
diff --git a/engines/gnap/scenes/group4.cpp b/engines/gnap/scenes/group4.cpp
index 154f837ea1..3cbfe4d967 100644
--- a/engines/gnap/scenes/group4.cpp
+++ b/engines/gnap/scenes/group4.cpp
@@ -53,6 +53,7 @@ void Scene40::updateHotspots() {
void Scene40::run() {
PlayerGnap& gnap = *_vm->_gnap;
+ PlayerPlat& plat = *_vm->_plat;
_vm->queueInsertDeviceIcon();
_vm->endSceneInit();
@@ -78,21 +79,21 @@ void Scene40::run() {
case kHS40Platypus:
if (gnap._actionStatus < 0) {
if (_vm->_grabCursorSpriteIndex >= 0) {
- gnap.playImpossible(_vm->_plat->_pos.x, _vm->_plat->_pos.y);
+ gnap.playImpossible(plat._pos.x, plat._pos.y);
} else {
switch (_vm->_verbCursor) {
case LOOK_CURSOR:
- gnap.playMoan1(_vm->_plat->_pos.x, _vm->_plat->_pos.y);
+ gnap.playMoan1(plat._pos.x, plat._pos.y);
break;
case GRAB_CURSOR:
gnap.kissPlatypus(0);
break;
case TALK_CURSOR:
- gnap.playBrainPulsating(_vm->_plat->_pos.x, _vm->_plat->_pos.y);
- _vm->_plat->playSequence(_vm->_plat->getSequenceId());
+ gnap.playBrainPulsating(plat._pos.x, plat._pos.y);
+ plat.playSequence(plat.getSequenceId());
break;
case PLAT_CURSOR:
- gnap.playImpossible(_vm->_plat->_pos.x, _vm->_plat->_pos.y);
+ gnap.playImpossible(plat._pos.x, plat._pos.y);
break;
}
}
@@ -224,6 +225,7 @@ void Scene41::updateHotspots() {
void Scene41::run() {
GameSys& gameSys = *_vm->_gameSys;
PlayerGnap& gnap = *_vm->_gnap;
+ PlayerPlat& plat = *_vm->_plat;
_vm->queueInsertDeviceIcon();
@@ -274,23 +276,23 @@ void Scene41::run() {
gnap._id = 140;
gameSys.insertSequence(0x120, 140, 0, 0, kSeqNone, 0, 0, 0);
gameSys.setAnimation(makeRid(gnap._sequenceDatNum, gnap._sequenceId), gnap._id, 0);
- _vm->_plat->initPos(8, 10, kDirBottomLeft);
+ plat.initPos(8, 10, kDirBottomLeft);
_vm->endSceneInit();
} else if (_vm->_prevSceneNum == 45) {
gnap.initPos(-1, 8, kDirUpRight);
- _vm->_plat->initPos(-2, 8, kDirUpLeft);
+ plat.initPos(-2, 8, kDirUpLeft);
_vm->endSceneInit();
- _vm->_plat->walkTo(Common::Point(1, 8), -1, 0x107C2, 1);
+ plat.walkTo(Common::Point(1, 8), -1, 0x107C2, 1);
gnap.walkTo(Common::Point(2, 8), -1, 0x107B9, 1);
} else if (_vm->_prevSceneNum == 42) {
gnap.initPos(11, 8, kDirUpRight);
- _vm->_plat->initPos(11, 9, kDirUpLeft);
+ plat.initPos(11, 9, kDirUpLeft);
_vm->endSceneInit();
gnap.walkTo(Common::Point(8, 8), -1, 0x107BA, 1);
- _vm->_plat->walkTo(Common::Point(9, 8), -1, 0x107D2, 1);
+ plat.walkTo(Common::Point(9, 8), -1, 0x107D2, 1);
} else {
gnap.initPos(5, 8, kDirBottomRight);
- _vm->_plat->initPos(6, 8, kDirBottomLeft);
+ plat.initPos(6, 8, kDirBottomLeft);
_vm->endSceneInit();
}
@@ -355,21 +357,21 @@ void Scene41::run() {
case kHS41Platypus:
if (gnap._actionStatus < 0) {
if (_vm->_grabCursorSpriteIndex >= 0) {
- gnap.playImpossible(_vm->_plat->_pos.x, _vm->_plat->_pos.y);
+ gnap.playImpossible(plat._pos.x, plat._pos.y);
} else {
switch (_vm->_verbCursor) {
case LOOK_CURSOR:
- gnap.playMoan1(_vm->_plat->_pos.x, _vm->_plat->_pos.y);
+ gnap.playMoan1(plat._pos.x, plat._pos.y);
break;
case GRAB_CURSOR:
gnap.kissPlatypus(0);
break;
case TALK_CURSOR:
- gnap.playBrainPulsating(_vm->_plat->_pos.x, _vm->_plat->_pos.y);
- _vm->_plat->playSequence(_vm->_plat->getSequenceId());
+ gnap.playBrainPulsating(plat._pos.x, plat._pos.y);
+ plat.playSequence(plat.getSequenceId());
break;
case PLAT_CURSOR:
- gnap.playImpossible(_vm->_plat->_pos.x, _vm->_plat->_pos.y);
+ gnap.playImpossible(plat._pos.x, plat._pos.y);
break;
}
}
@@ -387,7 +389,7 @@ void Scene41::run() {
_vm->_isLeavingScene = true;
gnap.walkTo(Common::Point(_vm->_hotspotsWalkPos[kHS41Exit].x, -1), 0, 0x107AF, 1);
gnap._actionStatus = kAS41LeaveScene;
- _vm->_plat->walkTo(Common::Point(_vm->_hotspotsWalkPos[kHS41Exit].x, -1), -1, 0x107CF, 1);
+ plat.walkTo(Common::Point(_vm->_hotspotsWalkPos[kHS41Exit].x, -1), -1, 0x107CF, 1);
_vm->_newSceneNum = 45;
break;
@@ -395,7 +397,7 @@ void Scene41::run() {
_vm->_isLeavingScene = true;
gnap.walkTo(Common::Point(_vm->_hotspotsWalkPos[kHS41ExitBBQ].x, -1), 0, 0x107AB, 1);
gnap._actionStatus = kAS41LeaveScene;
- _vm->_plat->walkTo(Common::Point(_vm->_hotspotsWalkPos[kHS41ExitBBQ].x, -1), -1, 0x107CD, 1);
+ plat.walkTo(Common::Point(_vm->_hotspotsWalkPos[kHS41ExitBBQ].x, -1), -1, 0x107CD, 1);
_vm->_newSceneNum = 42;
break;
@@ -514,13 +516,13 @@ void Scene41::run() {
updateAnimations();
if (!_vm->_isLeavingScene) {
- if (_vm->_plat->_actionStatus < 0)
- _vm->_plat->updateIdleSequence();
+ if (plat._actionStatus < 0)
+ plat.updateIdleSequence();
if (gnap._actionStatus < 0 && !_vm->isFlag(kGFGnapControlsToyUFO))
gnap.updateIdleSequence();
if (!_vm->_timers[4]) {
_vm->_timers[4] = _vm->getRandom(100) + 100;
- if (gnap._actionStatus < 0 && _vm->_plat->_actionStatus < 0 && _vm->_toyUfoActionStatus == -1 && _nextToyVendorSequenceId == -1) {
+ if (gnap._actionStatus < 0 && plat._actionStatus < 0 && _vm->_toyUfoActionStatus == -1 && _nextToyVendorSequenceId == -1) {
switch (_vm->getRandom(3)) {
case 0:
_nextToyVendorSequenceId = 0x113;
@@ -538,7 +540,7 @@ void Scene41::run() {
}
if (!_vm->_timers[5]) {
_vm->_timers[5] = _vm->getRandom(30) + 20;
- if (gnap._actionStatus < 0 && _vm->_plat->_actionStatus < 0 && _vm->_toyUfoActionStatus == -1 && _nextKidSequenceId == -1) {
+ if (gnap._actionStatus < 0 && plat._actionStatus < 0 && _vm->_toyUfoActionStatus == -1 && _nextKidSequenceId == -1) {
if (_vm->isFlag(kGFGnapControlsToyUFO))
_nextKidSequenceId = 0x11B;
else if (_vm->getRandom(3) != 0)
@@ -756,6 +758,7 @@ void Scene42::updateHotspots() {
void Scene42::run() {
GameSys& gameSys = *_vm->_gameSys;
PlayerGnap& gnap = *_vm->_gnap;
+ PlayerPlat& plat = *_vm->_plat;
_vm->queueInsertDeviceIcon();
@@ -792,22 +795,22 @@ void Scene42::run() {
_vm->setGrabCursorSprite(-1);
} else if (_vm->_prevSceneNum == 41) {
gnap.initPos(-1, 8, kDirUpRight);
- _vm->_plat->initPos(-1, 9, kDirUpLeft);
+ plat.initPos(-1, 9, kDirUpLeft);
_vm->endSceneInit();
gnap.walkTo(Common::Point(2, 8), -1, 0x107B9, 1);
- _vm->_plat->walkTo(Common::Point(1, 8), -1, 0x107C2, 1);
+ plat.walkTo(Common::Point(1, 8), -1, 0x107C2, 1);
} else if (_vm->_prevSceneNum == 43) {
gnap.initPos(11, 8, kDirUpRight);
- _vm->_plat->initPos(11, 9, kDirUpLeft);
+ plat.initPos(11, 9, kDirUpLeft);
_vm->endSceneInit();
gnap.walkTo(Common::Point(8, 8), -1, 0x107BA, 1);
- _vm->_plat->walkTo(Common::Point(9, 8), -1, 0x107D2, 1);
+ plat.walkTo(Common::Point(9, 8), -1, 0x107D2, 1);
} else {
gnap.initPos(5, 11, kDirUpRight);
- _vm->_plat->initPos(6, 11, kDirUpLeft);
+ plat.initPos(6, 11, kDirUpLeft);
_vm->endSceneInit();
gnap.walkTo(Common::Point(5, 8), -1, 0x107BA, 1);
- _vm->_plat->walkTo(Common::Point(6, 8), -1, 0x107C2, 1);
+ plat.walkTo(Common::Point(6, 8), -1, 0x107C2, 1);
}
while (!_vm->_sceneDone) {
@@ -869,21 +872,21 @@ void Scene42::run() {
case kHS42Platypus:
if (gnap._actionStatus < 0) {
if (_vm->_grabCursorSpriteIndex >= 0) {
- gnap.playImpossible(_vm->_plat->_pos.x, _vm->_plat->_pos.y);
+ gnap.playImpossible(plat._pos.x, plat._pos.y);
} else {
switch (_vm->_verbCursor) {
case LOOK_CURSOR:
- gnap.playMoan1(_vm->_plat->_pos.x, _vm->_plat->_pos.y);
+ gnap.playMoan1(plat._pos.x, plat._pos.y);
break;
case GRAB_CURSOR:
gnap.kissPlatypus(0);
break;
case TALK_CURSOR:
- gnap.playBrainPulsating(_vm->_plat->_pos.x, _vm->_plat->_pos.y);
- _vm->_plat->playSequence(_vm->_plat->getSequenceId());
+ gnap.playBrainPulsating(plat._pos.x, plat._pos.y);
+ plat.playSequence(plat.getSequenceId());
break;
case PLAT_CURSOR:
- gnap.playImpossible(_vm->_plat->_pos.x, _vm->_plat->_pos.y);
+ gnap.playImpossible(plat._pos.x, plat._pos.y);
break;
}
}
@@ -894,7 +897,7 @@ void Scene42::run() {
_vm->_isLeavingScene = true;
gnap.walkTo(Common::Point(gnap._pos.x, _vm->_hotspotsWalkPos[kHS42ExitUfoParty].y), 0, 0x107AE, 1);
gnap._actionStatus = kAS42LeaveScene;
- _vm->_plat->walkTo(Common::Point(_vm->_plat->_pos.x, _vm->_hotspotsWalkPos[kHS42ExitUfoParty].y), -1, 0x107C7, 1);
+ plat.walkTo(Common::Point(plat._pos.x, _vm->_hotspotsWalkPos[kHS42ExitUfoParty].y), -1, 0x107C7, 1);
_vm->_newSceneNum = 40;
break;
@@ -902,7 +905,7 @@ void Scene42::run() {
_vm->_isLeavingScene = true;
gnap.walkTo(Common::Point(_vm->_hotspotsWalkPos[kHS42ExitToyStand].x, gnap._pos.y), 0, 0x107AF, 1);
gnap._actionStatus = kAS42LeaveScene;
- _vm->_plat->walkTo(_vm->_hotspotsWalkPos[kHS42ExitToyStand], -1, 0x107CF, 1);
+ plat.walkTo(_vm->_hotspotsWalkPos[kHS42ExitToyStand], -1, 0x107CF, 1);
_vm->_newSceneNum = 41;
break;
@@ -910,7 +913,7 @@ void Scene42::run() {
_vm->_isLeavingScene = true;
gnap.walkTo(Common::Point(_vm->_hotspotsWalkPos[kHS42ExitUfo].x, gnap._pos.y), 0, 0x107AB, 1);
gnap._actionStatus = kAS42LeaveScene;
- _vm->_plat->walkTo(_vm->_hotspotsWalkPos[kHS42ExitUfo], -1, 0x107CD, 1);
+ plat.walkTo(_vm->_hotspotsWalkPos[kHS42ExitUfo], -1, 0x107CD, 1);
_vm->_newSceneNum = 43;
break;
@@ -918,8 +921,8 @@ void Scene42::run() {
if (_vm->_grabCursorSpriteIndex == kItemDiceQuarterHole) {
gnap.walkTo(_vm->_hotspotsWalkPos[kHS42BBQVendor], 0, 0x107BB, 1);
gnap._actionStatus = kAS42UseQuarterWithBBQVendor;
- if (_vm->_plat->_pos.y < 9)
- _vm->_plat->walkTo(Common::Point(_vm->_plat->_pos.x, 9), -1, -1, 1);
+ if (plat._pos.y < 9)
+ plat.walkTo(Common::Point(plat._pos.x, 9), -1, -1, 1);
} else if (_vm->_grabCursorSpriteIndex >= 0) {
gnap.playShowCurrItem(_vm->_hotspotsWalkPos[kHS42BBQVendor].x, _vm->_hotspotsWalkPos[kHS42BBQVendor].y, _vm->_hotspotsWalkPos[kHS42BBQVendor].x + 1, 0);
} else {
@@ -984,13 +987,13 @@ void Scene42::run() {
_vm->toyUfoCheckTimer();
if (!_vm->_isLeavingScene) {
- if (_vm->_plat->_actionStatus < 0 && !_vm->isFlag(kGFGnapControlsToyUFO))
- _vm->_plat->updateIdleSequence();
+ if (plat._actionStatus < 0 && !_vm->isFlag(kGFGnapControlsToyUFO))
+ plat.updateIdleSequence();
if (gnap._actionStatus < 0 && !_vm->isFlag(kGFGnapControlsToyUFO))
gnap.updateIdleSequence();
if (!_vm->_timers[4]) {
_vm->_timers[4] = _vm->getRandom(20) + 30;
- if (gnap._actionStatus < 0 && _vm->_plat->_actionStatus < 0 && _nextBBQVendorSequenceId == -1) {
+ if (gnap._actionStatus < 0 && plat._actionStatus < 0 && _nextBBQVendorSequenceId == -1) {
switch (_vm->getRandom(8)) {
case 0:
_nextBBQVendorSequenceId = 0x14C;
@@ -1208,6 +1211,7 @@ void Scene43::updateHotspots() {
void Scene43::run() {
GameSys& gameSys = *_vm->_gameSys;
PlayerGnap& gnap = *_vm->_gnap;
+ PlayerPlat& plat = *_vm->_plat;
_vm->queueInsertDeviceIcon();
@@ -1236,30 +1240,30 @@ void Scene43::run() {
switch (_vm->_prevSceneNum) {
case 42:
gnap.initPos(-1, 8, kDirUpRight);
- _vm->_plat->initPos(-1, 9, kDirUpLeft);
+ plat.initPos(-1, 9, kDirUpLeft);
_vm->endSceneInit();
gnap.walkTo(Common::Point(2, 8), -1, 0x107B9, 1);
- _vm->_plat->walkTo(Common::Point(1, 8), -1, 0x107C2, 1);
+ plat.walkTo(Common::Point(1, 8), -1, 0x107C2, 1);
break;
case 44:
gnap.initPos(11, 8, kDirUpRight);
- _vm->_plat->initPos(11, 9, kDirUpLeft);
+ plat.initPos(11, 9, kDirUpLeft);
_vm->endSceneInit();
gnap.walkTo(Common::Point(8, 8), -1, 0x107BA, 1);
- _vm->_plat->walkTo(Common::Point(9, 8), -1, 0x107D2, 1);
+ plat.walkTo(Common::Point(9, 8), -1, 0x107D2, 1);
break;
case 54:
gnap.initPos(4, 7, kDirBottomLeft);
- _vm->_plat->initPos(11, 8, kDirUpLeft);
+ plat.initPos(11, 8, kDirUpLeft);
_vm->endSceneInit();
- _vm->_plat->walkTo(Common::Point(9, 8), -1, 0x107D2, 1);
+ plat.walkTo(Common::Point(9, 8), -1, 0x107D2, 1);
break;
default:
gnap.initPos(5, 11, kDirUpRight);
- _vm->_plat->initPos(6, 11, kDirUpLeft);
+ plat.initPos(6, 11, kDirUpLeft);
_vm->endSceneInit();
gnap.walkTo(Common::Point(5, 8), -1, 0x107BA, 1);
- _vm->_plat->walkTo(Common::Point(6, 8), -1, 0x107C2, 1);
+ plat.walkTo(Common::Point(6, 8), -1, 0x107C2, 1);
break;
}
}
@@ -1329,21 +1333,21 @@ void Scene43::run() {
case kHS43Platypus:
if (gnap._actionStatus < 0) {
if (_vm->_grabCursorSpriteIndex >= 0) {
- gnap.playImpossible(_vm->_plat->_pos.x, _vm->_plat->_pos.y);
+ gnap.playImpossible(plat._pos.x, plat._pos.y);
} else {
switch (_vm->_verbCursor) {
case LOOK_CURSOR:
- gnap.playMoan1(_vm->_plat->_pos.x, _vm->_plat->_pos.y);
+ gnap.playMoan1(plat._pos.x, plat._pos.y);
break;
case GRAB_CURSOR:
gnap.kissPlatypus(0);
break;
case TALK_CURSOR:
- gnap.playBrainPulsating(_vm->_plat->_pos.x, _vm->_plat->_pos.y);
- _vm->_plat->playSequence(_vm->_plat->getSequenceId());
+ gnap.playBrainPulsating(plat._pos.x, plat._pos.y);
+ plat.playSequence(plat.getSequenceId());
break;
case PLAT_CURSOR:
- gnap.playImpossible(_vm->_plat->_pos.x, _vm->_plat->_pos.y);
+ gnap.playImpossible(plat._pos.x, plat._pos.y);
break;
}
}
@@ -1354,7 +1358,7 @@ void Scene43::run() {
_vm->_isLeavingScene = true;
gnap.walkTo(_vm->_hotspotsWalkPos[kHS43ExitUfoParty], 0, 0x107AE, 1);
gnap._actionStatus = 0;
- _vm->_plat->walkTo(_vm->_hotspotsWalkPos[kHS43ExitUfoParty], -1, 0x107C7, 1);
+ plat.walkTo(_vm->_hotspotsWalkPos[kHS43ExitUfoParty], -1, 0x107C7, 1);
_vm->_newSceneNum = 40;
break;
@@ -1362,7 +1366,7 @@ void Scene43::run() {
_vm->_isLeavingScene = true;
gnap.walkTo(Common::Point(_vm->_hotspotsWalkPos[kHS43ExitBBQ].x, gnap._pos.y), 0, 0x107AF, 1);
gnap._actionStatus = 0;
- _vm->_plat->walkTo(_vm->_hotspotsWalkPos[kHS43ExitBBQ], -1, 0x107CF, 1);
+ plat.walkTo(_vm->_hotspotsWalkPos[kHS43ExitBBQ], -1, 0x107CF, 1);
_vm->_newSceneNum = 42;
break;
@@ -1370,7 +1374,7 @@ void Scene43::run() {
_vm->_isLeavingScene = true;
gnap.walkTo(Common::Point(_vm->_hotspotsWalkPos[kHS43ExitKissinBooth].x, gnap._pos.y), 0, 0x107AB, 1);
gnap._actionStatus = 0;
- _vm->_plat->walkTo(_vm->_hotspotsWalkPos[kHS43ExitKissinBooth], -1, 0x107CD, 1);
+ plat.walkTo(_vm->_hotspotsWalkPos[kHS43ExitKissinBooth], -1, 0x107CD, 1);
_vm->_newSceneNum = 44;
break;
@@ -1440,13 +1444,13 @@ void Scene43::run() {
_vm->toyUfoCheckTimer();
if (!_vm->_isLeavingScene) {
- if (_vm->_plat->_actionStatus < 0 && !_vm->isFlag(kGFGnapControlsToyUFO))
- _vm->_plat->updateIdleSequence();
+ if (plat._actionStatus < 0 && !_vm->isFlag(kGFGnapControlsToyUFO))
+ plat.updateIdleSequence();
if (gnap._actionStatus < 0 && !_vm->isFlag(kGFGnapControlsToyUFO))
gnap.updateIdleSequence();
if (!_vm->_timers[4] && (!_vm->isFlag(kGFGnapControlsToyUFO) || !_vm->isFlag(kGFGroceryStoreHatTaken))) {
_vm->_timers[4] = _vm->getRandom(100) + 100;
- if (gnap._actionStatus < 0 && _vm->_plat->_actionStatus < 0 && _nextTwoHeadedGuySequenceId == -1) {
+ if (gnap._actionStatus < 0 && plat._actionStatus < 0 && _nextTwoHeadedGuySequenceId == -1) {
switch (_vm->getRandom(5)) {
case 0:
_nextTwoHeadedGuySequenceId = 0x13C;
@@ -1643,6 +1647,7 @@ void Scene44::updateHotspots() {
void Scene44::run() {
GameSys& gameSys = *_vm->_gameSys;
PlayerGnap& gnap = *_vm->_gnap;
+ PlayerPlat& plat = *_vm->_plat;
_vm->queueInsertDeviceIcon();
@@ -1692,39 +1697,39 @@ void Scene44::run() {
switch (_vm->_prevSceneNum) {
case 43:
gnap.initPos(-1, 8, kDirUpRight);
- _vm->_plat->initPos(-1, 7, kDirUpLeft);
+ plat.initPos(-1, 7, kDirUpLeft);
_vm->endSceneInit();
gnap.walkTo(Common::Point(2, 8), -1, 0x107B9, 1);
- _vm->_plat->walkTo(Common::Point(1, 8), -1, 0x107C2, 1);
+ plat.walkTo(Common::Point(1, 8), -1, 0x107C2, 1);
break;
case 46:
gnap.initPos(11, 8, kDirUpRight);
- _vm->_plat->initPos(11, 8, kDirUpLeft);
+ plat.initPos(11, 8, kDirUpLeft);
_vm->endSceneInit();
gnap.walkTo(Common::Point(6, 8), -1, 0x107BA, 1);
- _vm->_plat->walkTo(Common::Point(7, 8), -1, 0x107D2, 1);
+ plat.walkTo(Common::Point(7, 8), -1, 0x107D2, 1);
break;
case 50:
gnap.initPos(4, 8, kDirBottomRight);
if (_vm->_sceneSavegameLoaded) {
- _vm->_plat->initPos(_vm->_hotspotsWalkPos[4].x, _vm->_hotspotsWalkPos[4].y, kDirUnk4);
+ plat.initPos(_vm->_hotspotsWalkPos[4].x, _vm->_hotspotsWalkPos[4].y, kDirUnk4);
} else if (!_vm->isFlag(kGFUnk13)) {
_vm->_timers[0] = 50;
_vm->_timers[1] = 20;
- _vm->_plat->_pos = Common::Point(5, 8);
- _vm->_plat->_sequenceId = 0xFD;
- _vm->_plat->_idleFacing = kDirNone;
- _vm->_plat->_id = 160;
- _vm->_plat->_sequenceDatNum = 0;
+ plat._pos = Common::Point(5, 8);
+ plat._sequenceId = 0xFD;
+ plat._idleFacing = kDirNone;
+ plat._id = 160;
+ plat._sequenceDatNum = 0;
gameSys.insertSequence(0xFD, 160, 0, 0, kSeqNone, 0, 0, 0);
}
_vm->endSceneInit();
break;
default:
gnap.initPos(5, 11, kDirUpRight);
- _vm->_plat->initPos(6, 11, kDirUpLeft);
+ plat.initPos(6, 11, kDirUpLeft);
_vm->endSceneInit();
- _vm->_plat->walkTo(Common::Point(6, 8), -1, 0x107C2, 1);
+ plat.walkTo(Common::Point(6, 8), -1, 0x107C2, 1);
gnap.walkTo(Common::Point(5, 8), -1, 0x107BA, 1);
break;
}
@@ -1779,21 +1784,21 @@ void Scene44::run() {
case kHS44Platypus:
if (gnap._actionStatus < 0) {
if (_vm->_grabCursorSpriteIndex >= 0) {
- gnap.playImpossible(_vm->_plat->_pos.x, _vm->_plat->_pos.y);
+ gnap.playImpossible(plat._pos.x, plat._pos.y);
} else {
switch (_vm->_verbCursor) {
case LOOK_CURSOR:
- gnap.playMoan1(_vm->_plat->_pos.x, _vm->_plat->_pos.y);
+ gnap.playMoan1(plat._pos.x, plat._pos.y);
break;
case GRAB_CURSOR:
gnap.kissPlatypus(0);
break;
case TALK_CURSOR:
- gnap.playBrainPulsating(_vm->_plat->_pos.x, _vm->_plat->_pos.y);
- _vm->_plat->playSequence(_vm->_plat->getSequenceId());
+ gnap.playBrainPulsating(plat._pos.x, plat._pos.y);
+ plat.playSequence(plat.getSequenceId());
break;
case PLAT_CURSOR:
- gnap.playImpossible(_vm->_plat->_pos.x, _vm->_plat->_pos.y);
+ gnap.playImpossible(plat._pos.x, plat._pos.y);
break;
}
}
@@ -1811,7 +1816,7 @@ void Scene44::run() {
_vm->_isLeavingScene = true;
gnap.walkTo(Common::Point(_vm->_hotspotsWalkPos[kHS44ExitUfo].x, gnap._pos.y), 0, 0x107AF, 1);
gnap._actionStatus = 0;
- _vm->_plat->walkTo(Common::Point(_vm->_hotspotsWalkPos[kHS44ExitUfo].x, _vm->_plat->_pos.y), -1, 0x107CF, 1);
+ plat.walkTo(Common::Point(_vm->_hotspotsWalkPos[kHS44ExitUfo].x, plat._pos.y), -1, 0x107CF, 1);
_vm->_newSceneNum = 43;
break;
@@ -1842,11 +1847,11 @@ void Scene44::run() {
break;
case PLAT_CURSOR:
gnap.useDeviceOnPlatypus();
- _vm->_plat->walkTo(Common::Point(6, 7), 1, 0x107D2, 1);
+ plat.walkTo(Common::Point(6, 7), 1, 0x107D2, 1);
if (gnap._pos == Common::Point(7, 7))
gnap.walkStep();
gnap.playIdle(5, 7);
- _vm->_plat->_actionStatus = 4;
+ plat._actionStatus = 4;
break;
}
}
@@ -1924,13 +1929,13 @@ void Scene44::run() {
_vm->toyUfoCheckTimer();
if (!_vm->_isLeavingScene) {
- if (_vm->_plat->_actionStatus < 0 && !_vm->isFlag(kGFGnapControlsToyUFO) && _currKissingLadySequenceId != 0xF5)
- _vm->_plat->updateIdleSequence();
+ if (plat._actionStatus < 0 && !_vm->isFlag(kGFGnapControlsToyUFO) && _currKissingLadySequenceId != 0xF5)
+ plat.updateIdleSequence();
if (gnap._actionStatus < 0 && !_vm->isFlag(kGFGnapControlsToyUFO))
gnap.updateIdleSequence();
if (!_vm->_timers[4]) {
_vm->_timers[4] = _vm->getRandom(20) + 20;
- if (gnap._actionStatus < 0 && _vm->_plat->_actionStatus < 0 && _nextKissingLadySequenceId == -1) {
+ if (gnap._actionStatus < 0 && plat._actionStatus < 0 && _nextKissingLadySequenceId == -1) {
switch (_vm->getRandom(20)) {
case 0:
_nextKissingLadySequenceId = 0xED;
@@ -1957,7 +1962,7 @@ void Scene44::run() {
}
if (!_vm->_timers[5]) {
_vm->_timers[5] = _vm->getRandom(20) + 20;
- if (gnap._actionStatus < 0 && _vm->_plat->_actionStatus < 0 && _nextSpringGuySequenceId == -1) {
+ if (gnap._actionStatus < 0 && plat._actionStatus < 0 && _nextSpringGuySequenceId == -1) {
if (_vm->getRandom(5) != 0) {
if (!_vm->isFlag(kGFSpringTaken))
_nextSpringGuySequenceId = 0xF9;
@@ -1987,6 +1992,7 @@ void Scene44::run() {
void Scene44::updateAnimations() {
GameSys& gameSys = *_vm->_gameSys;
PlayerGnap& gnap = *_vm->_gnap;
+ PlayerPlat& plat = *_vm->_plat;
if (gameSys.getAnimationStatus(0) == 2) {
gameSys.setAnimation(0, 0, 0);
@@ -2006,15 +2012,15 @@ void Scene44::updateAnimations() {
if (gameSys.getAnimationStatus(1) == 2) {
gameSys.setAnimation(0, 0, 1);
- switch (_vm->_plat->_actionStatus) {
+ switch (plat._actionStatus) {
case 4:
if (gameSys.getAnimationStatus(2) == 2) {
- gameSys.insertSequence(0xFE, _vm->_plat->_id, _vm->_plat->_sequenceId | (_vm->_plat->_sequenceDatNum << 16), _vm->_plat->_id, kSeqSyncWait, 0, 0, 0);
- _vm->_plat->_sequenceId = 0xFE;
- _vm->_plat->_sequenceDatNum = 0;
- gameSys.setAnimation(0xFE, _vm->_plat->_id, 1);
+ gameSys.insertSequence(0xFE, plat._id, plat._sequenceId | (plat._sequenceDatNum << 16), plat._id, kSeqSyncWait, 0, 0, 0);
+ plat._sequenceId = 0xFE;
+ plat._sequenceDatNum = 0;
+ gameSys.setAnimation(0xFE, plat._id, 1);
gameSys.removeSequence(_currKissingLadySequenceId, 1, true);
- _vm->_plat->_actionStatus = 5;
+ plat._actionStatus = 5;
}
break;
case 5:
@@ -2022,7 +2028,7 @@ void Scene44::updateAnimations() {
_vm->_newSceneNum = 50;
break;
default:
- _vm->_plat->_actionStatus = -1;
+ plat._actionStatus = -1;
break;
}
}
@@ -2030,7 +2036,7 @@ void Scene44::updateAnimations() {
if (gameSys.getAnimationStatus(2) == 2) {
if (_nextKissingLadySequenceId == 0xF6) {
gameSys.insertSequence(_nextKissingLadySequenceId, 1, _currKissingLadySequenceId, 1, kSeqSyncWait, 0, 0, 0);
- _vm->_plat->initPos(5, 8, kDirNone);
+ plat.initPos(5, 8, kDirNone);
_currKissingLadySequenceId = _nextKissingLadySequenceId;
_nextKissingLadySequenceId = -1;
gameSys.setAnimation(0, 0, 2);
@@ -2126,6 +2132,7 @@ void Scene45::updateHotspots() {
void Scene45::run() {
GameSys& gameSys = *_vm->_gameSys;
PlayerGnap& gnap = *_vm->_gnap;
+ PlayerPlat& plat = *_vm->_plat;
if (!_vm->isSoundPlaying(0x1094A))
_vm->playSound(0x1094A, true);
@@ -2159,25 +2166,25 @@ void Scene45::run() {
gameSys.setAnimation(0x9E, 1, 0);
gnap._actionStatus = 1;
gameSys.insertSequence(gnap._sequenceId, gnap._id, 0, 0, kSeqNone, 0, 0, 0);
- _vm->_plat->initPos(4, 8, kDirNone);
+ plat.initPos(4, 8, kDirNone);
_vm->endSceneInit();
} else if (_vm->_prevSceneNum == 46) {
gnap.initPos(-1, 8, kDirUpRight);
- _vm->_plat->initPos(-1, 9, kDirUpLeft);
+ plat.initPos(-1, 9, kDirUpLeft);
_vm->endSceneInit();
- _vm->_plat->walkTo(Common::Point(4, 8), -1, 0x107C2, 1);
+ plat.walkTo(Common::Point(4, 8), -1, 0x107C2, 1);
gnap.walkTo(Common::Point(2, 7), -1, 0x107B9, 1);
} else if (_vm->_prevSceneNum == 41) {
gnap.initPos(11, 8, kDirUpRight);
- _vm->_plat->initPos(11, 9, kDirUpLeft);
+ plat.initPos(11, 9, kDirUpLeft);
_vm->endSceneInit();
- _vm->_plat->walkTo(Common::Point(4, 8), -1, 0x107D2, 1);
+ plat.walkTo(Common::Point(4, 8), -1, 0x107D2, 1);
gnap.walkTo(Common::Point(10, 9), -1, 0x107BA, 1);
} else {
gnap.initPos(2, 11, kDirUpRight);
- _vm->_plat->initPos(6, 11, kDirUpLeft);
+ plat.initPos(6, 11, kDirUpLeft);
_vm->endSceneInit();
- _vm->_plat->walkTo(Common::Point(4, 8), -1, 0x107C2, 1);
+ plat.walkTo(Common::Point(4, 8), -1, 0x107C2, 1);
gnap.walkTo(Common::Point(2, 7), -1, 0x107B9, 1);
}
@@ -2220,8 +2227,8 @@ void Scene45::run() {
gnap._sequenceDatNum = 1;
}
- _vm->_plat->playSequence(0x9A);
- gameSys.setAnimation(_vm->_plat->_sequenceId, _vm->_plat->_id, 1);
+ plat.playSequence(0x9A);
+ gameSys.setAnimation(plat._sequenceId, plat._id, 1);
while (!_vm->_sceneDone) {
if (!_vm->isSoundPlaying(0x1094A))
@@ -2270,23 +2277,23 @@ void Scene45::run() {
case kHS45Platypus:
if (gnap._actionStatus < 0) {
if (_vm->_grabCursorSpriteIndex >= 0) {
- gnap.playImpossible(_vm->_plat->_pos.x, _vm->_plat->_pos.y);
+ gnap.playImpossible(plat._pos.x, plat._pos.y);
} else {
switch (_vm->_verbCursor) {
case LOOK_CURSOR:
- gnap.playMoan1(_vm->_plat->_pos.x, _vm->_plat->_pos.y);
+ gnap.playMoan1(plat._pos.x, plat._pos.y);
break;
case GRAB_CURSOR:
gnap.kissPlatypus(0);
- _vm->_plat->playSequence(0x9A);
- gameSys.setAnimation(_vm->_plat->_sequenceId, _vm->_plat->_id, 1);
+ plat.playSequence(0x9A);
+ gameSys.setAnimation(plat._sequenceId, plat._id, 1);
break;
case TALK_CURSOR:
- gnap.playBrainPulsating(_vm->_plat->_pos.x, _vm->_plat->_pos.y);
- _vm->_plat->playSequence(_vm->_plat->getSequenceId());
+ gnap.playBrainPulsating(plat._pos.x, plat._pos.y);
+ plat.playSequence(plat.getSequenceId());
break;
case PLAT_CURSOR:
- gnap.playImpossible(_vm->_plat->_pos.x, _vm->_plat->_pos.y);
+ gnap.playImpossible(plat._pos.x, plat._pos.y);
break;
}
}
@@ -2307,7 +2314,7 @@ void Scene45::run() {
_vm->_isLeavingScene = true;
gnap.walkTo(Common::Point(_vm->_hotspotsWalkPos[kHS45ExitShoe].x, gnap._pos.y), 0, 0x107AF, 1);
gnap._actionStatus = 0;
- _vm->_plat->walkTo(Common::Point(_vm->_hotspotsWalkPos[kHS45ExitShoe].x, _vm->_plat->_pos.y), -1, 0x107CF, 1);
+ plat.walkTo(Common::Point(_vm->_hotspotsWalkPos[kHS45ExitShoe].x, plat._pos.y), -1, 0x107CF, 1);
_vm->_newSceneNum = 46;
}
break;
@@ -2317,7 +2324,7 @@ void Scene45::run() {
_vm->_isLeavingScene = true;
gnap.walkTo(Common::Point(_vm->_hotspotsWalkPos[kHS45ExitRight].x, gnap._pos.y), 0, 0x107AB, 1);
gnap._actionStatus = 0;
- _vm->_plat->walkTo(Common::Point(_vm->_hotspotsWalkPos[kHS45ExitRight].x, _vm->_plat->_pos.y), -1, 0x107CD, 1);
+ plat.walkTo(Common::Point(_vm->_hotspotsWalkPos[kHS45ExitRight].x, plat._pos.y), -1, 0x107CD, 1);
_vm->_newSceneNum = 41;
}
break;
@@ -2393,6 +2400,7 @@ void Scene45::run() {
void Scene45::updateAnimations() {
GameSys& gameSys = *_vm->_gameSys;
PlayerGnap& gnap = *_vm->_gnap;
+ PlayerPlat& plat = *_vm->_plat;
if (gameSys.getAnimationStatus(0) == 2) {
gameSys.setAnimation(0, 0, 0);
@@ -2418,10 +2426,10 @@ void Scene45::updateAnimations() {
if (gameSys.getAnimationStatus(1) == 2) {
gameSys.setAnimation(0, 0, 1);
if (_vm->getRandom(2) != 0)
- _vm->_plat->playSequence(0x9B);
+ plat.playSequence(0x9B);
else
- _vm->_plat->playSequence(0x9C);
- gameSys.setAnimation(_vm->_plat->_sequenceId, _vm->_plat->_id, 1);
+ plat.playSequence(0x9C);
+ gameSys.setAnimation(plat._sequenceId, plat._id, 1);
}
if (gameSys.getAnimationStatus(2) == 2) {
@@ -2501,6 +2509,7 @@ void Scene46::updateHotspots() {
void Scene46::run() {
GameSys& gameSys = *_vm->_gameSys;
PlayerGnap& gnap = *_vm->_gnap;
+ PlayerPlat& plat = *_vm->_plat;
_vm->queueInsertDeviceIcon();
gameSys.insertSequence(0x4D, 0, 0, 0, kSeqLoop, 0, 0, 0);
@@ -2529,21 +2538,21 @@ void Scene46::run() {
_vm->endSceneInit();
} else if (_vm->_prevSceneNum == 44) {
gnap.initPos(-1, 8, kDirUpRight);
- _vm->_plat->initPos(-1, 8, kDirUpLeft);
+ plat.initPos(-1, 8, kDirUpLeft);
_vm->endSceneInit();
- _vm->_plat->walkTo(Common::Point(1, 8), -1, 0x107C2, 1);
+ plat.walkTo(Common::Point(1, 8), -1, 0x107C2, 1);
gnap.walkTo(Common::Point(2, 8), -1, 0x107B9, 1);
} else if (_vm->_prevSceneNum == 45) {
gnap.initPos(11, 8, kDirUpRight);
- _vm->_plat->initPos(12, 8, kDirUpLeft);
+ plat.initPos(12, 8, kDirUpLeft);
_vm->endSceneInit();
gnap.walkTo(Common::Point(8, 8), -1, 0x107BA, 1);
- _vm->_plat->walkTo(Common::Point(9, 8), -1, 0x107D2, 1);
+ plat.walkTo(Common::Point(9, 8), -1, 0x107D2, 1);
} else {
gnap.initPos(5, 11, kDirUpRight);
- _vm->_plat->initPos(6, 11, kDirUpLeft);
+ plat.initPos(6, 11, kDirUpLeft);
_vm->endSceneInit();
- _vm->_plat->walkTo(Common::Point(5, 8), -1, 0x107C2, 1);
+ plat.walkTo(Common::Point(5, 8), -1, 0x107C2, 1);
gnap.walkTo(Common::Point(6, 8), -1, 0x107BA, 1);
}
@@ -2597,21 +2606,21 @@ void Scene46::run() {
case kHS46Platypus:
if (gnap._actionStatus < 0) {
if (_vm->_grabCursorSpriteIndex >= 0) {
- gnap.playImpossible(_vm->_plat->_pos.x, _vm->_plat->_pos.y);
+ gnap.playImpossible(plat._pos.x, plat._pos.y);
} else {
switch (_vm->_verbCursor) {
case LOOK_CURSOR:
- gnap.playMoan1(_vm->_plat->_pos.x, _vm->_plat->_pos.y);
+ gnap.playMoan1(plat._pos.x, plat._pos.y);
break;
case GRAB_CURSOR:
gnap.kissPlatypus(0);
break;
case TALK_CURSOR:
- gnap.playBrainPulsating(_vm->_plat->_pos.x, _vm->_plat->_pos.y);
- _vm->_plat->playSequence(_vm->_plat->getSequenceId());
+ gnap.playBrainPulsating(plat._pos.x, plat._pos.y);
+ plat.playSequence(plat.getSequenceId());
break;
case PLAT_CURSOR:
- gnap.playImpossible(_vm->_plat->_pos.x, _vm->_plat->_pos.y);
+ gnap.playImpossible(plat._pos.x, plat._pos.y);
break;
}
}
@@ -2671,7 +2680,7 @@ void Scene46::run() {
_vm->_isLeavingScene = true;
gnap.walkTo(Common::Point(_vm->_hotspotsWalkPos[kHS46ExitKissinBooth].x, gnap._pos.y), 0, 0x107AF, 1);
gnap._actionStatus = 0;
- _vm->_plat->walkTo(Common::Point(_vm->_hotspotsWalkPos[kHS46ExitKissinBooth].x, _vm->_plat->_pos.y), -1, 0x107CF, 1);
+ plat.walkTo(Common::Point(_vm->_hotspotsWalkPos[kHS46ExitKissinBooth].x, plat._pos.y), -1, 0x107CF, 1);
_vm->_newSceneNum = 44;
break;
@@ -2679,7 +2688,7 @@ void Scene46::run() {
_vm->_isLeavingScene = true;
gnap.walkTo(Common::Point(_vm->_hotspotsWalkPos[kHS46ExitDisco].x, gnap._pos.y), 0, 0x107AB, 1);
gnap._actionStatus = 0;
- _vm->_plat->walkTo(Common::Point(_vm->_hotspotsWalkPos[kHS46ExitDisco].x, _vm->_plat->_pos.y), -1, 0x107CD, 1);
+ plat.walkTo(Common::Point(_vm->_hotspotsWalkPos[kHS46ExitDisco].x, plat._pos.y), -1, 0x107CD, 1);
_vm->_newSceneNum = 45;
break;
@@ -2704,13 +2713,13 @@ void Scene46::run() {
_vm->toyUfoCheckTimer();
if (!_vm->_isLeavingScene) {
- if (_vm->_plat->_actionStatus < 0 && !_vm->isFlag(kGFGnapControlsToyUFO))
- _vm->_plat->updateIdleSequence();
+ if (plat._actionStatus < 0 && !_vm->isFlag(kGFGnapControlsToyUFO))
+ plat.updateIdleSequence();
if (gnap._actionStatus < 0 && !_vm->isFlag(kGFGnapControlsToyUFO))
gnap.updateIdleSequence();
if (!_vm->_timers[4]) {
_vm->_timers[4] = _vm->getRandom(50) + 80;
- if (gnap._actionStatus < 0 && _vm->_plat->_actionStatus < 0 && _nextItchyGuySequenceId == -1) {
+ if (gnap._actionStatus < 0 && plat._actionStatus < 0 && _nextItchyGuySequenceId == -1) {
if (_vm->getRandom(2) != 0)
_nextItchyGuySequenceId = 0x49;
else
@@ -2719,7 +2728,7 @@ void Scene46::run() {
}
if (!_vm->_timers[5]) {
_vm->_timers[5] = _vm->getRandom(50) + 80;
- if (gnap._actionStatus < 0 && _vm->_plat->_actionStatus < 0 && _nextSackGuySequenceId == -1)
+ if (gnap._actionStatus < 0 && plat._actionStatus < 0 && _nextSackGuySequenceId == -1)
_nextSackGuySequenceId = 0x4C;
}
}