aboutsummaryrefslogtreecommitdiff
path: root/engines/gnap
diff options
context:
space:
mode:
authorStrangerke2016-05-05 13:36:35 +0200
committerEugene Sandulenko2016-05-10 12:14:51 +0200
commit38a83d1770a35b82cdfd7b04c19fcccb174b157f (patch)
tree32e25efd12b18df9bb3fa76452620cc87cf872b6 /engines/gnap
parent45f27ea81c4aa3a4fbfa356a51f6b141447158d0 (diff)
downloadscummvm-rg350-38a83d1770a35b82cdfd7b04c19fcccb174b157f.tar.gz
scummvm-rg350-38a83d1770a35b82cdfd7b04c19fcccb174b157f.tar.bz2
scummvm-rg350-38a83d1770a35b82cdfd7b04c19fcccb174b157f.zip
GNAP: More character refactoring (WIP)
Diffstat (limited to 'engines/gnap')
-rw-r--r--engines/gnap/character.cpp76
-rw-r--r--engines/gnap/character.h8
-rw-r--r--engines/gnap/gnap.cpp46
-rw-r--r--engines/gnap/gnap.h6
-rw-r--r--engines/gnap/grid.cpp32
-rw-r--r--engines/gnap/scenes/group0.cpp94
-rw-r--r--engines/gnap/scenes/group1.cpp124
-rw-r--r--engines/gnap/scenes/group2.cpp106
-rw-r--r--engines/gnap/scenes/group3.cpp54
-rw-r--r--engines/gnap/scenes/group4.cpp90
10 files changed, 320 insertions, 316 deletions
diff --git a/engines/gnap/character.cpp b/engines/gnap/character.cpp
index c72f6337fa..4356862756 100644
--- a/engines/gnap/character.cpp
+++ b/engines/gnap/character.cpp
@@ -33,10 +33,14 @@ Character::Character(GnapEngine *vm) : _vm(vm) {
_sequenceId = 0;
_sequenceDatNum = 0;
_id = 0;
+ _gridX = 0;
+ _gridY = 0;
}
Character::~Character() {}
+/************************************************************************************************/
+
PlayerGnap::PlayerGnap(GnapEngine * vm) : Character(vm) {
_brainPulseNum = 0;
_brainPulseRndValue = 0;
@@ -407,7 +411,7 @@ void PlayerGnap::useJointOnPlatypus() {
_vm->_plat->_sequenceDatNum = 1;
_vm->_plat->_sequenceId = 0x876;
_vm->_plat->_idleFacing = kDirNone;
- _vm->_gnap->playSequence(0x107B5);
+ playSequence(0x107B5);
_vm->gnapWalkStep();
while (_vm->_gameSys->getAnimationStatus(0) != 2) {
_vm->updateMouseCursor();
@@ -416,7 +420,7 @@ void PlayerGnap::useJointOnPlatypus() {
_vm->_gameSys->setAnimation(0, 0, 0);
_actionStatus = -1;
} else {
- _vm->_gnap->playSequence(getSequenceId(gskScratchingHead, _vm->_plat->_pos.x, _vm->_plat->_pos.y) | 0x10000);
+ playSequence(getSequenceId(gskScratchingHead, _vm->_plat->_pos.x, _vm->_plat->_pos.y) | 0x10000);
}
}
@@ -432,11 +436,11 @@ void PlayerGnap::kissPlatypus(int callback) {
_sequenceId = 0x847;
_vm->_gameSys->insertSequence(0x107CB, _vm->_plat->_id,
makeRid(_vm->_plat->_sequenceDatNum, _vm->_plat->_sequenceId), _vm->_plat->_id,
- kSeqSyncWait, _vm->getSequenceTotalDuration(0x10847), 75 * _vm->_plat->_pos.x - _vm->_platGridX, 48 * _vm->_plat->_pos.y - _vm->_platGridY);
+ kSeqSyncWait, _vm->getSequenceTotalDuration(0x10847), 75 * _vm->_plat->_pos.x - _vm->_plat->_gridX, 48 * _vm->_plat->_pos.y - _vm->_plat->_gridY);
_vm->_plat->_sequenceDatNum = 1;
_vm->_plat->_sequenceId = 0x7CB;
_vm->_plat->_idleFacing = kDirNone;
- _vm->_gnap->playSequence(0x107B5);
+ playSequence(0x107B5);
while (_vm->_gameSys->getAnimationStatus(0) != 2) {
_vm->updateMouseCursor();
_vm->doCallback(callback);
@@ -445,23 +449,23 @@ void PlayerGnap::kissPlatypus(int callback) {
_vm->_gameSys->setAnimation(0, 0, 0);
_actionStatus = -1;
} else {
- _vm->_gnap->playSequence(getSequenceId(gskScratchingHead, _vm->_plat->_pos.x, _vm->_plat->_pos.y) | 0x10000);
+ playSequence(getSequenceId(gskScratchingHead, _vm->_plat->_pos.x, _vm->_plat->_pos.y) | 0x10000);
}
}
void PlayerGnap::useDeviceOnPlatypus() {
- _vm->_gnap->playSequence(makeRid(1, getSequenceId(gskPullOutDevice, _vm->_plat->_pos.x, _vm->_plat->_pos.y)));
+ playSequence(makeRid(1, getSequenceId(gskPullOutDevice, _vm->_plat->_pos.x, _vm->_plat->_pos.y)));
if (_vm->_plat->_idleFacing != kDirNone) {
_vm->_gameSys->insertSequence(makeRid(1, 0x7D5), _vm->_plat->_id,
makeRid(_vm->_plat->_sequenceDatNum, _vm->_plat->_sequenceId), _vm->_plat->_id,
- kSeqSyncWait, 0, 75 * _vm->_plat->_pos.x - _vm->_platGridX, 48 * _vm->_plat->_pos.y - _vm->_platGridY);
+ kSeqSyncWait, 0, 75 * _vm->_plat->_pos.x - _vm->_plat->_gridX, 48 * _vm->_plat->_pos.y - _vm->_plat->_gridY);
_vm->_plat->_sequenceId = 0x7D5;
_vm->_plat->_sequenceDatNum = 1;
} else {
_vm->_gameSys->insertSequence(makeRid(1, 0x7D4), _vm->_plat->_id,
makeRid(_vm->_plat->_sequenceDatNum, _vm->_plat->_sequenceId), _vm->_plat->_id,
- kSeqSyncWait, 0, 75 * _vm->_plat->_pos.x - _vm->_platGridX, 48 * _vm->_plat->_pos.y - _vm->_platGridY);
+ kSeqSyncWait, 0, 75 * _vm->_plat->_pos.x - _vm->_plat->_gridX, 48 * _vm->_plat->_pos.y - _vm->_plat->_gridY);
_vm->_plat->_sequenceId = 0x7D4;
_vm->_plat->_sequenceDatNum = 1;
}
@@ -469,7 +473,7 @@ void PlayerGnap::useDeviceOnPlatypus() {
int newSequenceId = getSequenceId(gskUseDevice, 0, 0);
_vm->_gameSys->insertSequence(makeRid(1, newSequenceId), _id,
makeRid(_sequenceDatNum, _sequenceId), _id,
- kSeqSyncWait, 0, 75 * _pos.x - _vm->_gnapGridX, 48 * _pos.y - _vm->_gnapGridY);
+ kSeqSyncWait, 0, 75 * _pos.x - _gridX, 48 * _pos.y - _gridY);
_sequenceId = newSequenceId;
_sequenceDatNum = 1;
}
@@ -484,7 +488,7 @@ void PlayerGnap::playSequence(int sequenceId) {
_vm->gnapIdle();
_vm->_gameSys->insertSequence(sequenceId, _id,
makeRid(_sequenceDatNum, _sequenceId), _id,
- kSeqScale | kSeqSyncWait, 0, 75 * _pos.x - _vm->_gnapGridX, 48 * _pos.y - _vm->_gnapGridY);
+ kSeqScale | kSeqSyncWait, 0, 75 * _pos.x - _gridX, 48 * _pos.y - _gridY);
_sequenceId = ridToEntryIndex(sequenceId);
_sequenceDatNum = ridToDatIndex(sequenceId);
}
@@ -522,13 +526,13 @@ void PlayerGnap::updateIdleSequence() {
if (_idleFacing == kDirBottomRight) {
_vm->_gameSys->insertSequence(0x107BD, _id,
makeRid(_sequenceDatNum, _sequenceId), _id,
- kSeqSyncWait, 0, 75 * _pos.x - _vm->_gnapGridX, 48 * _pos.y - _vm->_gnapGridY);
+ kSeqSyncWait, 0, 75 * _pos.x - _gridX, 48 * _pos.y - _gridY);
_sequenceId = 0x7BD;
_sequenceDatNum = 1;
} else if (_idleFacing == kDirBottomLeft) {
_vm->_gameSys->insertSequence(0x107BE, _id,
makeRid(_sequenceDatNum, _sequenceId), _id,
- kSeqSyncWait, 0, 75 * _pos.x - _vm->_gnapGridX, 48 * _pos.y - _vm->_gnapGridY);
+ kSeqSyncWait, 0, 75 * _pos.x - _gridX, 48 * _pos.y - _gridY);
_sequenceId = 0x7BE;
_sequenceDatNum = 1;
}
@@ -556,13 +560,13 @@ void PlayerGnap::updateIdleSequence2() {
if (_idleFacing == kDirBottomRight) {
_vm->_gameSys->insertSequence(0x107BD, _id,
makeRid(_sequenceDatNum, _sequenceId), _id,
- kSeqSyncWait, 0, 75 * _pos.x - _vm->_gnapGridX, 48 * _pos.y - _vm->_gnapGridY);
+ kSeqSyncWait, 0, 75 * _pos.x - _gridX, 48 * _pos.y - _gridY);
_sequenceId = 0x7BD;
_sequenceDatNum = 1;
} else if (_idleFacing == kDirBottomLeft) {
_vm->_gameSys->insertSequence(0x107BE, _id,
makeRid(_sequenceDatNum, _sequenceId), _id,
- kSeqSyncWait, 0, 75 * _pos.x - _vm->_gnapGridX, 48 * _pos.y - _vm->_gnapGridY);
+ kSeqSyncWait, 0, 75 * _pos.x - _gridX, 48 * _pos.y - _gridY);
_sequenceId = 0x7BE;
_sequenceDatNum = 1;
}
@@ -573,6 +577,27 @@ void PlayerGnap::updateIdleSequence2() {
}
}
+void PlayerGnap::initPos(int gridX, int gridY, Facing facing) {
+ _vm->_timers[2] = 30;
+ _vm->_timers[3] = 300;
+ _pos = Common::Point(gridX, gridY);
+ if (facing == kDirNone)
+ _idleFacing = kDirBottomRight;
+ else
+ _idleFacing = facing;
+ if (_idleFacing == kDirBottomLeft) {
+ _sequenceId = 0x7B8;
+ } else {
+ _sequenceId = 0x7B5;
+ _idleFacing = kDirBottomRight;
+ }
+ _id = 20 * _pos.y;
+ _sequenceDatNum = 1;
+ _vm->_gameSys->insertSequence(makeRid(1, _sequenceId), 20 * _pos.y,
+ 0, 0,
+ kSeqScale, 0, 75 * _pos.x - _gridX, 48 * _pos.y - _gridY);
+}
+
/************************************************************************************************/
PlayerPlat::PlayerPlat(GnapEngine * vm) : Character(vm) {}
@@ -594,7 +619,7 @@ int PlayerPlat::getSequenceId(int kind, int gridX, int gridY) {
void PlayerPlat::playSequence(int sequenceId) {
_vm->_gameSys->insertSequence(sequenceId, _id,
makeRid(_sequenceDatNum, _sequenceId), _id,
- kSeqScale | kSeqSyncWait, 0, 75 * _pos.x - _vm->_platGridX, 48 * _pos.y - _vm->_platGridY);
+ kSeqScale | kSeqSyncWait, 0, 75 * _pos.x - _gridX, 48 * _pos.y - _gridY);
_sequenceId = ridToEntryIndex(sequenceId);
_sequenceDatNum = ridToDatIndex(sequenceId);
}
@@ -665,4 +690,25 @@ void PlayerPlat::updateIdleSequence2() {
}
}
+void PlayerPlat::initPos(int gridX, int gridY, Facing facing) {
+ _vm->_timers[0] = 50;
+ _vm->_timers[1] = 20;
+ _pos = Common::Point(gridX, gridY);
+ if (facing == kDirNone)
+ _idleFacing = kDirNone;
+ else
+ _idleFacing = facing;
+ if (_idleFacing == kDirUnk4) {
+ _sequenceId = 0x7D1;
+ } else {
+ _sequenceId = 0x7C1;
+ _idleFacing = kDirNone;
+ }
+ _id = 20 * _pos.y;
+ _sequenceDatNum = 1;
+ _vm->_gameSys->insertSequence(makeRid(1, _sequenceId), 20 * _pos.y,
+ 0, 0,
+ kSeqScale, 0, 75 * _pos.x - _gridX, 48 * _pos.y - _gridY);
+}
+
} // End of namespace Gnap
diff --git a/engines/gnap/character.h b/engines/gnap/character.h
index 5e7d6ee3e5..39643972bb 100644
--- a/engines/gnap/character.h
+++ b/engines/gnap/character.h
@@ -45,6 +45,7 @@ public:
virtual void playSequence(int sequenceId) = 0;
virtual void updateIdleSequence() = 0;
virtual void updateIdleSequence2() = 0;
+ virtual void initPos(int gridX, int gridY, Facing facing) = 0;
Common::Point _pos;
Facing _idleFacing;
@@ -52,6 +53,8 @@ public:
int _sequenceId;
int _sequenceDatNum;
int _id;
+ int _gridX;
+ int _gridY;
protected:
GnapEngine *_vm;
@@ -61,6 +64,7 @@ class PlayerGnap : public Character {
public:
PlayerGnap(GnapEngine *vm);
virtual int getSequenceId(int kind, int gridX, int gridY);
+ virtual void initPos(int gridX, int gridY, Facing facing);
virtual void playSequence(int sequenceId);
virtual void updateIdleSequence();
virtual void updateIdleSequence2();
@@ -70,13 +74,15 @@ public:
void useDeviceOnPlatypus();
void useJointOnPlatypus();
- int _brainPulseNum, _brainPulseRndValue;
+ int _brainPulseNum;
+ int _brainPulseRndValue;
};
class PlayerPlat : public Character {
public:
PlayerPlat(GnapEngine *vm);
virtual int getSequenceId(int kind = 0, int gridX = 0, int gridY = 0);
+ virtual void initPos(int gridX, int gridY, Facing facing);
virtual void playSequence(int sequenceId);
virtual void updateIdleSequence();
virtual void updateIdleSequence2();
diff --git a/engines/gnap/gnap.cpp b/engines/gnap/gnap.cpp
index f72b7c6af3..78c7617c73 100644
--- a/engines/gnap/gnap.cpp
+++ b/engines/gnap/gnap.cpp
@@ -1129,7 +1129,7 @@ void GnapEngine::gnapIdle() {
_gnap->_sequenceId == 0x831 || _gnap->_sequenceId == 0x89A)) {
_gameSys->insertSequence(_gnap->getSequenceId(gskIdle, 0, 0) | 0x10000, _gnap->_id,
makeRid(_gnap->_sequenceDatNum, _gnap->_sequenceId), _gnap->_id,
- kSeqSyncExists, 0, 75 * _gnap->_pos.x - _gnapGridX, 48 * _gnap->_pos.y - _gnapGridY);
+ kSeqSyncExists, 0, 75 * _gnap->_pos.x - _gnap->_gridX, 48 * _gnap->_pos.y - _gnap->_gridY);
_gnap->_sequenceId = _gnap->getSequenceId(gskIdle, 0, 0);
_gnap->_sequenceDatNum = 1;
}
@@ -1140,7 +1140,7 @@ void GnapEngine::gnapActionIdle(int sequenceId) {
ridToEntryIndex(sequenceId) == _gnap->_sequenceId) {
_gameSys->insertSequence(_gnap->getSequenceId(gskIdle, 0, 0) | 0x10000, _gnap->_id,
makeRid(_gnap->_sequenceDatNum, _gnap->_sequenceId), _gnap->_id,
- kSeqSyncExists, 0, 75 * _gnap->_pos.x - _gnapGridX, 48 * _gnap->_pos.y - _gnapGridY);
+ kSeqSyncExists, 0, 75 * _gnap->_pos.x - _gnap->_gridX, 48 * _gnap->_pos.y - _gnap->_gridY);
_gnap->_sequenceId = _gnap->getSequenceId(gskIdle, 0, 0);
_gnap->_sequenceDatNum = 1;
}
@@ -1207,27 +1207,6 @@ bool GnapEngine::testWalk(int animationIndex, int someStatus, int gridX1, int gr
return false;
}
-void GnapEngine::initGnapPos(int gridX, int gridY, Facing facing) {
- _timers[2] = 30;
- _timers[3] = 300;
- _gnap->_pos = Common::Point(gridX, gridY);
- if (facing == kDirNone)
- _gnap->_idleFacing = kDirBottomRight;
- else
- _gnap->_idleFacing = facing;
- if (_gnap->_idleFacing == kDirBottomLeft) {
- _gnap->_sequenceId = 0x7B8;
- } else {
- _gnap->_sequenceId = 0x7B5;
- _gnap->_idleFacing = kDirBottomRight;
- }
- _gnap->_id = 20 * _gnap->_pos.y;
- _gnap->_sequenceDatNum = 1;
- _gameSys->insertSequence(makeRid(1, _gnap->_sequenceId), 20 * _gnap->_pos.y,
- 0, 0,
- kSeqScale, 0, 75 * _gnap->_pos.x - _gnapGridX, 48 * _gnap->_pos.y - _gnapGridY);
-}
-
void GnapEngine::doCallback(int callback) {
switch (callback) {
case 8:
@@ -1280,27 +1259,6 @@ void GnapEngine::gnapUseDisguiseOnPlatypus() {
setFlag(kGFPlatypusDisguised);
}
-void GnapEngine::initPlatypusPos(int gridX, int gridY, Facing facing) {
- _timers[0] = 50;
- _timers[1] = 20;
- _plat->_pos = Common::Point(gridX, gridY);
- if (facing == kDirNone)
- _plat->_idleFacing = kDirNone;
- else
- _plat->_idleFacing = facing;
- if (_plat->_idleFacing == kDirUnk4) {
- _plat->_sequenceId = 0x7D1;
- } else {
- _plat->_sequenceId = 0x7C1;
- _plat->_idleFacing = kDirNone;
- }
- _plat->_id = 20 * _plat->_pos.y;
- _plat->_sequenceDatNum = 1;
- _gameSys->insertSequence(makeRid(1, _plat->_sequenceId), 20 * _plat->_pos.y,
- 0, 0,
- kSeqScale, 0, 75 * _plat->_pos.x - _platGridX, 48 * _plat->_pos.y - _platGridY);
-}
-
////////////////////////////////////////////////////////////////////////////////
void GnapEngine::initGlobalSceneVars() {
diff --git a/engines/gnap/gnap.h b/engines/gnap/gnap.h
index d37b2de6e6..4cab40529e 100644
--- a/engines/gnap/gnap.h
+++ b/engines/gnap/gnap.h
@@ -475,8 +475,6 @@ public:
void updateMenuStatusQueryQuit();
// Grid common
- int _gnapGridX, _gnapGridY;
- int _platGridX, _platGridY;
int _gridMinX, _gridMinY;
int _gridMaxX, _gridMaxY;
bool isPointBlocked(int gridX, int gridY);
@@ -530,14 +528,10 @@ public:
void playGnapIdle(int gridX, int gridY);
void playGnapShowItem(int itemIndex, int gridLookX, int gridLookY);
void playGnapShowCurrItem(int gridX, int gridY, int gridLookX, int gridLookY);
- void initGnapPos(int gridX, int gridY, Facing facing);
void doCallback(int callback);
bool gnapPlatypusAction(int gridX, int gridY, int platSequenceId, int callback);
void gnapUseDisguiseOnPlatypus();
- // Platypus
- void initPlatypusPos(int gridX, int gridY, Facing facing);
-
// Scenes
int _toyUfoNextSequenceId, _toyUfoSequenceId;
int _toyUfoId;
diff --git a/engines/gnap/grid.cpp b/engines/gnap/grid.cpp
index ec0595f0a6..5c9b3ddee1 100644
--- a/engines/gnap/grid.cpp
+++ b/engines/gnap/grid.cpp
@@ -32,10 +32,10 @@ void GnapEngine::initSceneGrid(int gridMinX, int gridMinY, int gridMaxX, int gri
_gridMinY = gridMinY;
_gridMaxX = gridMaxX;
_gridMaxY = gridMaxY;
- _gnapGridX = 410 - gridMinX;
- _gnapGridY = 450 - gridMinY;
- _platGridX = 396 - gridMinX;
- _platGridY = 347 - gridMinY;
+ _gnap->_gridX = 410 - gridMinX;
+ _gnap->_gridY = 450 - gridMinY;
+ _plat->_gridX = 396 - gridMinX;
+ _plat->_gridY = 347 - gridMinY;
}
int GnapEngine::getGnapWalkSequenceId(int deltaX, int deltaY) {
@@ -587,13 +587,13 @@ bool GnapEngine::gnapWalkTo(int gridX, int gridY, int animationIndex, int sequen
if (index % 2) {
_gameSys->insertSequence(makeRid(datNum, 0x7AB), _gnapWalkNodes[index]._id,
makeRid(gnapSequenceDatNum, gnapSequenceId), gnapId,
- kSeqScale | kSeqSyncWait, 0, 75 * _gnapWalkNodes[index]._gridX1 - _gnapGridX, 48 * _gnapWalkNodes[index]._gridY1 - _gnapGridY);
+ kSeqScale | kSeqSyncWait, 0, 75 * _gnapWalkNodes[index]._gridX1 - _gnap->_gridX, 48 * _gnapWalkNodes[index]._gridY1 - _gnap->_gridY);
_gnapWalkNodes[index]._sequenceId = 0x7AB;
gnapSequenceId = 0x7AB;
} else {
_gameSys->insertSequence(makeRid(datNum, 0x7AC), _gnapWalkNodes[index]._id,
makeRid(gnapSequenceDatNum, gnapSequenceId), gnapId,
- kSeqScale | kSeqSyncWait, 0, 75 * _gnapWalkNodes[index]._gridX1 - _gnapGridX, 48 * _gnapWalkNodes[index]._gridY1 - _gnapGridY);
+ kSeqScale | kSeqSyncWait, 0, 75 * _gnapWalkNodes[index]._gridX1 - _gnap->_gridX, 48 * _gnapWalkNodes[index]._gridY1 - _gnap->_gridY);
_gnapWalkNodes[index]._sequenceId = 0x7AC;
gnapSequenceId = 0x7AC;
}
@@ -601,13 +601,13 @@ bool GnapEngine::gnapWalkTo(int gridX, int gridY, int animationIndex, int sequen
if (index % 2) {
_gameSys->insertSequence(makeRid(datNum, 0x7AF), _gnapWalkNodes[index]._id,
makeRid(gnapSequenceDatNum, gnapSequenceId), gnapId,
- kSeqScale | kSeqSyncWait, 0, 75 * _gnapWalkNodes[index]._gridX1 - _gnapGridX, 48 * _gnapWalkNodes[index]._gridY1 - _gnapGridY);
+ kSeqScale | kSeqSyncWait, 0, 75 * _gnapWalkNodes[index]._gridX1 - _gnap->_gridX, 48 * _gnapWalkNodes[index]._gridY1 - _gnap->_gridY);
_gnapWalkNodes[index]._sequenceId = 0x7AF;
gnapSequenceId = 0x7AF;
} else {
_gameSys->insertSequence(makeRid(datNum, 0x7B0), _gnapWalkNodes[index]._id,
makeRid(gnapSequenceDatNum, gnapSequenceId), gnapId,
- kSeqScale | kSeqSyncWait, 0, 75 * _gnapWalkNodes[index]._gridX1 - _gnapGridX, 48 * _gnapWalkNodes[index]._gridY1 - _gnapGridY);
+ kSeqScale | kSeqSyncWait, 0, 75 * _gnapWalkNodes[index]._gridX1 - _gnap->_gridX, 48 * _gnapWalkNodes[index]._gridY1 - _gnap->_gridY);
_gnapWalkNodes[index]._sequenceId = 0x7B0;
gnapSequenceId = 0x7B0;
}
@@ -619,7 +619,7 @@ bool GnapEngine::gnapWalkTo(int gridX, int gridY, int animationIndex, int sequen
int newSequenceId = getGnapWalkSequenceId(_gnapWalkNodes[index]._deltaX, _gnapWalkNodes[index]._deltaY);
_gameSys->insertSequence(makeRid(datNum, newSequenceId), _gnapWalkNodes[index]._id,
makeRid(gnapSequenceDatNum, gnapSequenceId), gnapId,
- kSeqScale | kSeqSyncWait, 0, 75 * _gnapWalkNodes[index]._gridX1 - _gnapGridX, 48 * _gnapWalkNodes[index]._gridY1 - _gnapGridY);
+ kSeqScale | kSeqSyncWait, 0, 75 * _gnapWalkNodes[index]._gridX1 - _gnap->_gridX, 48 * _gnapWalkNodes[index]._gridY1 - _gnap->_gridY);
_gnapWalkNodes[index]._sequenceId = newSequenceId;
gnapSequenceId = newSequenceId;
}
@@ -705,7 +705,7 @@ bool GnapEngine::gnapWalkTo(int gridX, int gridY, int animationIndex, int sequen
} else {
_gameSys->insertSequence(makeRid(_gnap->_sequenceDatNum, _gnap->_sequenceId), _gnap->_id,
makeRid(gnapSequenceDatNum, gnapSequenceId), gnapId,
- kSeqScale | kSeqSyncWait, 0, 75 * _gnapWalkDestX - _gnapGridX, 48 * _gnapWalkDestY - _gnapGridY);
+ kSeqScale | kSeqSyncWait, 0, 75 * _gnapWalkDestX - _gnap->_gridX, 48 * _gnapWalkDestY - _gnap->_gridY);
}
}
@@ -1239,13 +1239,13 @@ bool GnapEngine::platypusWalkTo(int gridX, int gridY, int animationIndex, int se
if (index % 2) {
_gameSys->insertSequence(makeRid(datNum, 0x7CD), _platWalkNodes[index]._id,
makeRid(platSequenceDatNum, platSequenceId), platId,
- kSeqScale | kSeqSyncWait, 0, 75 * _platWalkNodes[index]._gridX1 - _platGridX, 48 * _platWalkNodes[index]._gridY1 - _platGridY);
+ kSeqScale | kSeqSyncWait, 0, 75 * _platWalkNodes[index]._gridX1 - _plat->_gridX, 48 * _platWalkNodes[index]._gridY1 - _plat->_gridY);
_platWalkNodes[index]._sequenceId = 0x7CD;
platSequenceId = 0x7CD;
} else {
_gameSys->insertSequence(makeRid(datNum, 0x7CE), _platWalkNodes[index]._id,
makeRid(platSequenceDatNum, platSequenceId), platId,
- kSeqScale | kSeqSyncWait, 0, 75 * _platWalkNodes[index]._gridX1 - _platGridX, 48 * _platWalkNodes[index]._gridY1 - _platGridY);
+ kSeqScale | kSeqSyncWait, 0, 75 * _platWalkNodes[index]._gridX1 - _plat->_gridX, 48 * _platWalkNodes[index]._gridY1 - _plat->_gridY);
_platWalkNodes[index]._sequenceId = 0x7CE;
platSequenceId = 0x7CE;
}
@@ -1253,13 +1253,13 @@ bool GnapEngine::platypusWalkTo(int gridX, int gridY, int animationIndex, int se
if (index % 2) {
_gameSys->insertSequence(makeRid(datNum, 0x7CF), _platWalkNodes[index]._id,
makeRid(platSequenceDatNum, platSequenceId), platId,
- kSeqScale | kSeqSyncWait, 0, 75 * _platWalkNodes[index]._gridX1 - _platGridX, 48 * _platWalkNodes[index]._gridY1 - _platGridY);
+ kSeqScale | kSeqSyncWait, 0, 75 * _platWalkNodes[index]._gridX1 - _plat->_gridX, 48 * _platWalkNodes[index]._gridY1 - _plat->_gridY);
_platWalkNodes[index]._sequenceId = 0x7CF;
platSequenceId = 0x7CF;
} else {
_gameSys->insertSequence(makeRid(datNum, 0x7D0), _platWalkNodes[index]._id,
makeRid(platSequenceDatNum, platSequenceId), platId,
- kSeqScale | kSeqSyncWait, 0, 75 * _platWalkNodes[index]._gridX1 - _platGridX, 48 * _platWalkNodes[index]._gridY1 - _platGridY);
+ kSeqScale | kSeqSyncWait, 0, 75 * _platWalkNodes[index]._gridX1 - _plat->_gridX, 48 * _platWalkNodes[index]._gridY1 - _plat->_gridY);
_platWalkNodes[index]._sequenceId = 0x7D0;
platSequenceId = 0x7D0;
}
@@ -1271,7 +1271,7 @@ bool GnapEngine::platypusWalkTo(int gridX, int gridY, int animationIndex, int se
int newSequenceId = getPlatypusWalkSequenceId(_platWalkNodes[index]._deltaX, _platWalkNodes[index]._deltaY);
_gameSys->insertSequence(makeRid(datNum, newSequenceId), _platWalkNodes[index]._id,
makeRid(platSequenceDatNum, platSequenceId), platId,
- kSeqScale | kSeqSyncWait, 0, 75 * _platWalkNodes[index]._gridX1 - _platGridX, 48 * _platWalkNodes[index]._gridY1 - _platGridY);
+ kSeqScale | kSeqSyncWait, 0, 75 * _platWalkNodes[index]._gridX1 - _plat->_gridX, 48 * _platWalkNodes[index]._gridY1 - _plat->_gridY);
_platWalkNodes[index]._sequenceId = newSequenceId;
platSequenceId = newSequenceId;
}
@@ -1348,7 +1348,7 @@ bool GnapEngine::platypusWalkTo(int gridX, int gridY, int animationIndex, int se
else
_gameSys->insertSequence(makeRid(_plat->_sequenceDatNum, _plat->_sequenceId), _plat->_id,
makeRid(platSequenceDatNum, platSequenceId), platId,
- 9, 0, 75 * _platWalkDestX - _platGridX, 48 * _platWalkDestY - _platGridY);
+ 9, 0, 75 * _platWalkDestX - _plat->_gridX, 48 * _platWalkDestY - _plat->_gridY);
}
_plat->_pos = Common::Point(_platWalkDestX, _platWalkDestY);
diff --git a/engines/gnap/scenes/group0.cpp b/engines/gnap/scenes/group0.cpp
index 0ae1d2e934..3ba263dcbe 100644
--- a/engines/gnap/scenes/group0.cpp
+++ b/engines/gnap/scenes/group0.cpp
@@ -90,17 +90,17 @@ void Scene01::run() {
_vm->queueInsertDeviceIcon();
if (_vm->_prevSceneNum == 2) {
- _vm->initGnapPos(11, 6, kDirBottomLeft);
+ _vm->_gnap->initPos(11, 6, kDirBottomLeft);
if (_vm->isFlag(kGFPlatypus))
- _vm->initPlatypusPos(12, 6, kDirUnk4);
+ _vm->_plat->initPos(12, 6, kDirUnk4);
_vm->endSceneInit();
if (_vm->isFlag(kGFPlatypus))
_vm->platypusWalkTo(9, 6, -1, 0x107C2, 1);
_vm->gnapWalkTo(8, 6, -1, 0x107B9, 1);
} else {
- _vm->initGnapPos(1, 6, kDirBottomRight);
+ _vm->_gnap->initPos(1, 6, kDirBottomRight);
if (_vm->isFlag(kGFPlatypus))
- _vm->initPlatypusPos(1, 7, kDirNone);
+ _vm->_plat->initPos(1, 7, kDirNone);
_vm->endSceneInit();
}
@@ -412,18 +412,18 @@ void Scene02::run() {
switch (_vm->_prevSceneNum) {
case 3:
- _vm->initGnapPos(11, 6, kDirBottomLeft);
+ _vm->_gnap->initPos(11, 6, kDirBottomLeft);
if (_vm->isFlag(kGFPlatypus))
- _vm->initPlatypusPos(12, 6, kDirUnk4);
+ _vm->_plat->initPos(12, 6, kDirUnk4);
_vm->endSceneInit();
if (_vm->isFlag(kGFPlatypus))
_vm->platypusWalkTo(9, 6, -1, 0x107C2, 1);
_vm->gnapWalkTo(8, 6, -1, 0x107BA, 1);
break;
case 4:
- _vm->initGnapPos(_vm->_hotspotsWalkPos[6].x, _vm->_hotspotsWalkPos[6].y, kDirBottomLeft);
+ _vm->_gnap->initPos(_vm->_hotspotsWalkPos[6].x, _vm->_hotspotsWalkPos[6].y, kDirBottomLeft);
if (_vm->isFlag(kGFPlatypus))
- _vm->initPlatypusPos(_vm->_hotspotsWalkPos[6].x + 1, _vm->_hotspotsWalkPos[6].y, kDirUnk4);
+ _vm->_plat->initPos(_vm->_hotspotsWalkPos[6].x + 1, _vm->_hotspotsWalkPos[6].y, kDirUnk4);
_vm->endSceneInit();
_vm->gnapWalkTo(7, 6, 0, 0x107B9, 1);
if (_vm->isFlag(kGFPlatypus))
@@ -433,20 +433,20 @@ void Scene02::run() {
break;
case 47:
_vm->clearFlag(kGFUnk25);
- _vm->initGnapPos(5, 6, kDirBottomLeft);
- _vm->initPlatypusPos(6, 7, kDirUnk4);
+ _vm->_gnap->initPos(5, 6, kDirBottomLeft);
+ _vm->_plat->initPos(6, 7, kDirUnk4);
_vm->endSceneInit();
break;
case 49:
- _vm->initGnapPos(5, 6, kDirBottomRight);
+ _vm->_gnap->initPos(5, 6, kDirBottomRight);
if (_vm->isFlag(kGFPlatypus))
- _vm->initPlatypusPos(6, 7, kDirNone);
+ _vm->_plat->initPos(6, 7, kDirNone);
_vm->endSceneInit();
break;
default:
- _vm->initGnapPos(-1, 6, kDirBottomRight);
+ _vm->_gnap->initPos(-1, 6, kDirBottomRight);
if (_vm->isFlag(kGFPlatypus))
- _vm->initPlatypusPos(-1, 7, kDirNone);
+ _vm->_plat->initPos(-1, 7, kDirNone);
_vm->endSceneInit();
if (_vm->isFlag(kGFPlatypus))
_vm->platypusWalkTo(2, 7, -1, 0x107C2, 1);
@@ -794,7 +794,7 @@ void Scene02::updateAnimations() {
_vm->_timers[2] = 100;
break;
case kAS02GrabChickenDone:
- gameSys.insertSequence(0x107B5, _vm->_gnap->_id, 0x150, 179, kSeqSyncWait, 0, 75 * _vm->_gnap->_pos.x - _vm->_gnapGridX, 48 * _vm->_gnap->_pos.y - _vm->_gnapGridY);
+ gameSys.insertSequence(0x107B5, _vm->_gnap->_id, 0x150, 179, kSeqSyncWait, 0, 75 * _vm->_gnap->_pos.x - _vm->_gnap->_gridX, 48 * _vm->_gnap->_pos.y - _vm->_gnap->_gridY);
_vm->_gnap->_sequenceId = 0x7B5;
_vm->_gnap->_sequenceDatNum = 1;
_currChickenSequenceId = 0x14B;
@@ -893,7 +893,7 @@ void Scene03::run() {
gameSys.insertSequence(0x1CB, 251, 0, 0, kSeqLoop, 0, 0, 0);
_platypusHypnotized = false;
- _vm->initGnapPos(3, 4, kDirBottomRight);
+ _vm->_gnap->initPos(3, 4, kDirBottomRight);
gameSys.insertSequence(0x1C6, 253, 0, 0, kSeqNone, 0, 0, 0);
@@ -906,7 +906,7 @@ void Scene03::run() {
_vm->_timers[5] = _vm->getRandom(100) + 200;
if (_vm->isFlag(kGFPlatypus)) {
- _vm->initPlatypusPos(5, 4, kDirNone);
+ _vm->_plat->initPos(5, 4, kDirNone);
} else {
_vm->_timers[1] = _vm->getRandom(40) + 20;
gameSys.setAnimation(0x1C2, 99, 1);
@@ -1187,7 +1187,7 @@ void Scene03::updateAnimations() {
_vm->_plat->_idleFacing = kDirUnk4;
_vm->_plat->_id = 120;
gameSys.insertSequence(0x107CA, _vm->_plat->_id, 0x1BC, 99,
- kSeqSyncWait, 0, 75 * _vm->_plat->_pos.x - _vm->_platGridX, 48 * _vm->_plat->_pos.y - _vm->_platGridY);
+ kSeqSyncWait, 0, 75 * _vm->_plat->_pos.x - _vm->_plat->_gridX, 48 * _vm->_plat->_pos.y - _vm->_plat->_gridY);
gameSys.insertSequence(0x1B7, 99, 0, 0, kSeqNone, 0, 0, 0);
_vm->_plat->_sequenceDatNum = 1;
_vm->_plat->_sequenceId = 0x7CA;
@@ -1383,7 +1383,7 @@ void Scene04::run() {
_vm->_gnap->_id = 140;
_vm->_plat->_pos = Common::Point(6, 7);
_vm->_plat->_id = 141;
- gameSys.insertSequence(0x107B5, 140, 0, 0, kSeqNone, 0, 300 - _vm->_gnapGridX, 336 - _vm->_gnapGridY);
+ gameSys.insertSequence(0x107B5, 140, 0, 0, kSeqNone, 0, 300 - _vm->_gnap->_gridX, 336 - _vm->_gnap->_gridY);
gameSys.insertSequence(0x20C, 141, 0, 0, kSeqNone, 0, 0, 0);
gameSys.insertSequence(0x208, 121, 0, 0, kSeqNone, 0, 0, 0);
gameSys.insertSequence(0x209, 121, 0x208, 121, kSeqSyncWait, 0, 0, 0);
@@ -1401,21 +1401,21 @@ void Scene04::run() {
} else {
gameSys.insertSequence(0x209, 121, 0, 0, kSeqNone, 0, 0, 0);
if (_vm->_prevSceneNum == 2) {
- _vm->initGnapPos(5, 11, kDirUpRight);
+ _vm->_gnap->initPos(5, 11, kDirUpRight);
if (_vm->isFlag(kGFPlatypus))
- _vm->initPlatypusPos(6, 11, kDirUpLeft);
+ _vm->_plat->initPos(6, 11, kDirUpLeft);
_vm->endSceneInit();
if (_vm->isFlag(kGFPlatypus))
_vm->platypusWalkTo(5, 8, -1, 0x107C2, 1);
_vm->gnapWalkTo(6, 9, -1, 0x107BA, 1);
} else if (_vm->_prevSceneNum == 38) {
- _vm->initGnapPos(5, 7, kDirBottomRight);
- _vm->initPlatypusPos(4, 7, kDirNone);
+ _vm->_gnap->initPos(5, 7, kDirBottomRight);
+ _vm->_plat->initPos(4, 7, kDirNone);
_vm->endSceneInit();
} else {
- _vm->initGnapPos(12, 9, kDirBottomRight);
+ _vm->_gnap->initPos(12, 9, kDirBottomRight);
if (_vm->isFlag(kGFPlatypus))
- _vm->initPlatypusPos(12, 8, kDirNone);
+ _vm->_plat->initPos(12, 8, kDirNone);
_vm->endSceneInit();
if (_vm->isFlag(kGFPlatypus))
_vm->platypusWalkTo(9, 8, -1, 0x107C2, 1);
@@ -1715,7 +1715,7 @@ void Scene04::updateAnimations() {
_vm->_gnap->_pos = Common::Point(6, 7);
gameSys.insertSequence(0x107B5, _vm->_gnap->_id,
makeRid(_vm->_gnap->_sequenceDatNum, _vm->_gnap->_sequenceId), _vm->_gnap->_id,
- kSeqSyncWait, _vm->getSequenceTotalDuration(0x205) - 1, 450 - _vm->_gnapGridX, 336 - _vm->_gnapGridY);
+ kSeqSyncWait, _vm->getSequenceTotalDuration(0x205) - 1, 450 - _vm->_gnap->_gridX, 336 - _vm->_gnap->_gridY);
gameSys.setAnimation(0x107B5, _vm->_gnap->_id, 0);
_vm->_gnap->_sequenceId = 0x7B5;
_vm->_gnap->_sequenceDatNum = 1;
@@ -1746,7 +1746,7 @@ void Scene04::updateAnimations() {
gameSys.requestRemoveSequence(0x20B, 256);
gameSys.insertSequence(0x107B5, _vm->_gnap->_id,
makeRid(_vm->_gnap->_sequenceDatNum, _vm->_gnap->_sequenceId), 255,
- kSeqSyncWait, 0, 75 * _vm->_gnap->_pos.x - _vm->_gnapGridX, 48 * _vm->_gnap->_pos.y - _vm->_gnapGridY);
+ kSeqSyncWait, 0, 75 * _vm->_gnap->_pos.x - _vm->_gnap->_gridX, 48 * _vm->_gnap->_pos.y - _vm->_gnap->_gridY);
_vm->_gnap->_idleFacing = kDirBottomRight;
_vm->_gnap->_sequenceId = 0x7B5;
_vm->_gnap->_sequenceDatNum = 1;
@@ -1773,7 +1773,7 @@ void Scene04::updateAnimations() {
gameSys.removeSequence(0x20A, 256, true);
gameSys.insertSequence(0x107B5, _vm->_gnap->_id,
makeRid(_vm->_gnap->_sequenceDatNum, _vm->_gnap->_sequenceId), 255,
- kSeqSyncWait, 0, 75 * _vm->_gnap->_pos.x - _vm->_gnapGridX, 48 * _vm->_gnap->_pos.y - _vm->_gnapGridY);
+ kSeqSyncWait, 0, 75 * _vm->_gnap->_pos.x - _vm->_gnap->_gridX, 48 * _vm->_gnap->_pos.y - _vm->_gnap->_gridY);
_vm->_gnap->_sequenceId = 0x7B5;
_vm->_gnap->_sequenceDatNum = 1;
_vm->_gnap->_idleFacing = kDirBottomRight;
@@ -1884,17 +1884,17 @@ void Scene05::run() {
_vm->queueInsertDeviceIcon();
if (_vm->_prevSceneNum != 6 && _vm->_prevSceneNum != 36) {
- _vm->initGnapPos(-1, 8, kDirBottomRight);
+ _vm->_gnap->initPos(-1, 8, kDirBottomRight);
if (_vm->isFlag(kGFPlatypus))
- _vm->initPlatypusPos(-1, 9, kDirNone);
+ _vm->_plat->initPos(-1, 9, kDirNone);
_vm->endSceneInit();
if (_vm->isFlag(kGFPlatypus))
_vm->platypusWalkTo(2, 8, -1, 0x107C2, 1);
_vm->gnapWalkTo(2, 9, -1, 0x107B9, 1);
} else {
- _vm->initGnapPos(6, 8, kDirBottomRight);
+ _vm->_gnap->initPos(6, 8, kDirBottomRight);
if (_vm->isFlag(kGFPlatypus))
- _vm->initPlatypusPos(7, 9, kDirNone);
+ _vm->_plat->initPos(7, 9, kDirNone);
_vm->endSceneInit();
}
@@ -2189,7 +2189,7 @@ void Scene05::updateAnimations() {
case kAS05EnterBarn:
gameSys.insertSequence(0x107B1, 1,
makeRid(_vm->_gnap->_sequenceDatNum, _vm->_gnap->_sequenceId), _vm->_gnap->_id,
- kSeqSyncWait, 0, 75 * _vm->_gnap->_pos.x - _vm->_gnapGridX, 48 * _vm->_gnap->_pos.y - _vm->_gnapGridY);
+ kSeqSyncWait, 0, 75 * _vm->_gnap->_pos.x - _vm->_gnap->_gridX, 48 * _vm->_gnap->_pos.y - _vm->_gnap->_gridY);
gameSys.setAnimation(0x107B1, 1, 0);
_vm->_gnap->_actionStatus = kAS05LeaveScene;
break;
@@ -2204,7 +2204,7 @@ 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->_platGridX, 384 - _vm->_platGridY);
+ 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;
@@ -2315,8 +2315,8 @@ void Scene06::run() {
_vm->queueInsertDeviceIcon();
- _vm->initGnapPos(5, 12, kDirBottomRight);
- _vm->initPlatypusPos(6, 12, kDirNone);
+ _vm->_gnap->initPos(5, 12, kDirBottomRight);
+ _vm->_plat->initPos(6, 12, kDirNone);
_vm->endSceneInit();
_vm->platypusWalkTo(6, 8, -1, 0x107C2, 1);
@@ -2591,7 +2591,7 @@ void Scene06::updateAnimations() {
_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->_platGridX, 384 - _vm->_platGridY);
+ 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;
_vm->setFlag(kGFUnk04);
@@ -2619,7 +2619,7 @@ void Scene06::updateAnimations() {
_vm->_plat->_sequenceId = 0xFA;
_vm->_plat->_sequenceDatNum = 0;
gameSys.insertSequence(0x107B7, _vm->_gnap->_id, 0x100, _vm->_gnap->_id,
- kSeqSyncWait, 0, 75 * _vm->_gnap->_pos.x - _vm->_gnapGridX, 48 * _vm->_gnap->_pos.y - _vm->_gnapGridY);
+ kSeqSyncWait, 0, 75 * _vm->_gnap->_pos.x - _vm->_gnap->_gridX, 48 * _vm->_gnap->_pos.y - _vm->_gnap->_gridY);
_vm->_gnap->_sequenceId = 0x7B7;
_vm->_gnap->_sequenceDatNum = 1;
_currHorseSequenceId = _nextHorseSequenceId;
@@ -2681,8 +2681,8 @@ void Scene07::run() {
gameSys.insertSequence(0x8D, 1, 0, 0, kSeqNone, 0, 0, 0);
if (_vm->_prevSceneNum == 8) {
- _vm->initGnapPos(7, 7, kDirBottomLeft);
- _vm->initPlatypusPos(9, 7, kDirUnk4);
+ _vm->_gnap->initPos(7, 7, kDirBottomLeft);
+ _vm->_plat->initPos(9, 7, kDirUnk4);
_vm->endSceneInit();
} else {
_vm->_gnap->_pos = Common::Point(6, 7);
@@ -2761,7 +2761,7 @@ void Scene07::run() {
gameSys.insertSequence(0x8E, 1, 141, 1, kSeqSyncWait, 0, 0, 0);
gameSys.insertSequence(_vm->_gnap->getSequenceId(gskUseDevice, 0, 0) | 0x10000, _vm->_gnap->_id,
makeRid(_vm->_gnap->_sequenceDatNum, _vm->_gnap->_sequenceId), _vm->_gnap->_id,
- kSeqSyncWait, 0, 75 * _vm->_gnap->_pos.x - _vm->_gnapGridX, 48 * _vm->_gnap->_pos.y - _vm->_gnapGridY);
+ kSeqSyncWait, 0, 75 * _vm->_gnap->_pos.x - _vm->_gnap->_gridX, 48 * _vm->_gnap->_pos.y - _vm->_gnap->_gridY);
_vm->_gnap->_sequenceId = _vm->_gnap->getSequenceId(gskUseDevice, 0, 0);
_vm->_gnap->_sequenceDatNum = 1;
break;
@@ -2951,8 +2951,8 @@ void Scene08::run() {
if (!_vm->isFlag(kGFTruckKeysUsed))
gameSys.insertSequence(0x146, 1, 0, 0, kSeqNone, 0, 0, 0);
- _vm->initGnapPos(-1, 8, kDirBottomRight);
- _vm->initPlatypusPos(-1, 7, kDirNone);
+ _vm->_gnap->initPos(-1, 8, kDirBottomRight);
+ _vm->_plat->initPos(-1, 7, kDirNone);
_vm->endSceneInit();
@@ -3383,14 +3383,14 @@ void Scene09::run() {
gameSys.insertSequence(0x4B, 2, 0, 0, kSeqNone, 0, 0, 0);
if (_vm->_prevSceneNum == 8) {
- _vm->initGnapPos(11, 8, kDirBottomLeft);
- _vm->initPlatypusPos(12, 7, kDirUnk4);
+ _vm->_gnap->initPos(11, 8, kDirBottomLeft);
+ _vm->_plat->initPos(12, 7, kDirUnk4);
_vm->endSceneInit();
_vm->gnapWalkTo(9, 8, -1, 0x107BA, 1);
_vm->platypusWalkTo(9, 7, -1, 0x107D2, 1);
} else {
- _vm->initGnapPos(4, 7, kDirBottomRight);
- _vm->initPlatypusPos(5, 7, kDirNone);
+ _vm->_gnap->initPos(4, 7, kDirBottomRight);
+ _vm->_plat->initPos(5, 7, kDirNone);
_vm->endSceneInit();
}
diff --git a/engines/gnap/scenes/group1.cpp b/engines/gnap/scenes/group1.cpp
index 28eecf9846..3acce7f866 100644
--- a/engines/gnap/scenes/group1.cpp
+++ b/engines/gnap/scenes/group1.cpp
@@ -72,14 +72,14 @@ void Scene10::run() {
_vm->queueInsertDeviceIcon();
if (_vm->_prevSceneNum == 9) {
- _vm->initGnapPos(11, 8, kDirBottomLeft);
- _vm->initPlatypusPos(12, 7, kDirUnk4);
+ _vm->_gnap->initPos(11, 8, kDirBottomLeft);
+ _vm->_plat->initPos(12, 7, kDirUnk4);
_vm->endSceneInit();
_vm->gnapWalkTo(9, 8, -1, 0x107BA, 1);
_vm->platypusWalkTo(9, 7, -1, 0x107D2, 1);
} else {
- _vm->initGnapPos(-1, 7, kDirBottomRight);
- _vm->initPlatypusPos(-2, 8, kDirNone);
+ _vm->_gnap->initPos(-1, 7, kDirBottomRight);
+ _vm->_plat->initPos(-2, 8, kDirNone);
_vm->endSceneInit();
_vm->gnapWalkTo(1, 7, -1, 0x107B9, 1);
_vm->platypusWalkTo(1, 8, -1, 0x107C2, 1);
@@ -373,7 +373,7 @@ void Scene10::updateAnimations() {
gameSys.insertSequence(0x107C9, 160,
_vm->_plat->_sequenceId | (_vm->_plat->_sequenceDatNum << 16), _vm->_plat->_id,
kSeqSyncWait, _vm->getSequenceTotalDuration(0x109) + _vm->getSequenceTotalDuration(0x10A) + _vm->getSequenceTotalDuration(0x10843),
- 75 * _vm->_plat->_pos.x - _vm->_platGridX, 48 * _vm->_plat->_pos.y - _vm->_platGridY);
+ 75 * _vm->_plat->_pos.x - _vm->_plat->_gridX, 48 * _vm->_plat->_pos.y - _vm->_plat->_gridY);
gameSys.removeSequence(0x107, 100, true);
_currCookSequenceId = 0x109;
_nextCookSequenceId = 0x843;
@@ -534,23 +534,23 @@ void Scene11::run() {
switch (_vm->_prevSceneNum) {
case 13:
- _vm->initGnapPos(8, 5, kDirBottomLeft);
- _vm->initPlatypusPos(9, 6, kDirUnk4);
+ _vm->_gnap->initPos(8, 5, kDirBottomLeft);
+ _vm->_plat->initPos(9, 6, kDirUnk4);
break;
case 47:
- _vm->initGnapPos(8, 5, kDirBottomLeft);
- _vm->initPlatypusPos(9, 5, kDirUnk4);
+ _vm->_gnap->initPos(8, 5, kDirBottomLeft);
+ _vm->_plat->initPos(9, 5, kDirUnk4);
_currGoggleGuySequenceId = 0x1FA;
_currHookGuySequenceId = 0x1FF;
_vm->_timers[7] = 180;
break;
case 12:
- _vm->initGnapPos(-1, 9, kDirBottomRight);
- _vm->initPlatypusPos(-2, 8, kDirNone);
+ _vm->_gnap->initPos(-1, 9, kDirBottomRight);
+ _vm->_plat->initPos(-2, 8, kDirNone);
break;
default:
- _vm->initGnapPos(6, 6, kDirBottomLeft);
- _vm->initPlatypusPos(6, 5, kDirUnk4);
+ _vm->_gnap->initPos(6, 6, kDirBottomLeft);
+ _vm->_plat->initPos(6, 5, kDirUnk4);
break;
}
@@ -982,12 +982,12 @@ void Scene12::run() {
_vm->_timers[7] = _vm->getRandom(100) + 100;
if (_vm->_prevSceneNum == 15) {
- _vm->initGnapPos(5, 6, kDirBottomRight);
- _vm->initPlatypusPos(3, 7, kDirNone);
+ _vm->_gnap->initPos(5, 6, kDirBottomRight);
+ _vm->_plat->initPos(3, 7, kDirNone);
_vm->endSceneInit();
} else {
- _vm->initGnapPos(11, 8, kDirBottomLeft);
- _vm->initPlatypusPos(12, 8, kDirUnk4);
+ _vm->_gnap->initPos(11, 8, kDirBottomLeft);
+ _vm->_plat->initPos(12, 8, kDirUnk4);
_vm->endSceneInit();
_vm->gnapWalkTo(8, 8, -1, 0x107BA, 1);
_vm->platypusWalkTo(9, 8, -1, 0x107D2, 1);
@@ -1362,7 +1362,7 @@ void Scene12::updateAnimations() {
gameSys.insertSpriteDrawItem(_vm->_largeSprite, 0, 0, 300);
gameSys.insertSequence(0x10843, 301, makeRid(_vm->_gnap->_sequenceDatNum, _vm->_gnap->_sequenceId), _vm->_gnap->_id, kSeqSyncWait, 0, 0, 0);
gameSys.insertSequence(0x107B7, _vm->_gnap->_id, 0x10843, 301,
- kSeqSyncWait, 0, 75 * _vm->_gnap->_pos.x - _vm->_gnapGridX, 48 * _vm->_gnap->_pos.y - _vm->_gnapGridY);
+ kSeqSyncWait, 0, 75 * _vm->_gnap->_pos.x - _vm->_gnap->_gridX, 48 * _vm->_gnap->_pos.y - _vm->_gnap->_gridY);
_vm->_gnap->_sequenceId = 0x7B7;
_vm->_gnap->_sequenceDatNum = 1;
_vm->setFlag(kGFTwigTaken);
@@ -1486,11 +1486,11 @@ void Scene13::run() {
gameSys.insertSequence(0xAA, 256, 0, 0, kSeqNone, 0, 0, 0);
if (_vm->_prevSceneNum == 14) {
- _vm->initGnapPos(6, 6, kDirBottomLeft);
- _vm->initPlatypusPos(9, 8, kDirNone);
+ _vm->_gnap->initPos(6, 6, kDirBottomLeft);
+ _vm->_plat->initPos(9, 8, kDirNone);
} else {
- _vm->initGnapPos(3, 7, kDirBottomRight);
- _vm->initPlatypusPos(2, 7, kDirNone);
+ _vm->_gnap->initPos(3, 7, kDirBottomRight);
+ _vm->_plat->initPos(2, 7, kDirNone);
}
_vm->endSceneInit();
@@ -1910,7 +1910,7 @@ void Scene14::run() {
_vm->playSound((_vm->getRandom(5) + 0x8D5) | 0x10000, false);
break;
case PLAT_CURSOR:
- gameSys.insertSequence(0x107A8, 1, 0, 0, kSeqNone, 0, 900 - _vm->_gnapGridX, 576 - _vm->_gnapGridY);
+ gameSys.insertSequence(0x107A8, 1, 0, 0, kSeqNone, 0, 900 - _vm->_gnap->_gridX, 576 - _vm->_gnap->_gridY);
break;
}
}
@@ -1918,7 +1918,7 @@ void Scene14::run() {
case kHS14Toilet:
if (_vm->_grabCursorSpriteIndex >= 0) {
- gameSys.insertSequence(0x107A8, 1, 0, 0, kSeqNone, 0, 900 - _vm->_gnapGridX, 576 - _vm->_gnapGridY);
+ gameSys.insertSequence(0x107A8, 1, 0, 0, kSeqNone, 0, 900 - _vm->_gnap->_gridX, 576 - _vm->_gnap->_gridY);
} else {
switch (_vm->_verbCursor) {
case LOOK_CURSOR:
@@ -1929,7 +1929,7 @@ void Scene14::run() {
_vm->playSound((_vm->getRandom(5) + 0x8D5) | 0x10000, false);
break;
case PLAT_CURSOR:
- gameSys.insertSequence(0x107A8, 1, 0, 0, kSeqNone, 0, 900 - _vm->_gnapGridX, 576 - _vm->_gnapGridY);
+ gameSys.insertSequence(0x107A8, 1, 0, 0, kSeqNone, 0, 900 - _vm->_gnap->_gridX, 576 - _vm->_gnap->_gridY);
break;
}
}
@@ -2068,7 +2068,7 @@ void Scene15::run() {
} else if (_vm->_grabCursorSpriteIndex == kItemDiceQuarterHole) {
_nextSlotSequenceId = 0xDB;
} else if (_vm->_grabCursorSpriteIndex >= 0) {
- gameSys.insertSequence(0x107A8, 1, 0, 0, kSeqNone, 0, 900 - _vm->_gnapGridX, 576 - _vm->_gnapGridY);
+ gameSys.insertSequence(0x107A8, 1, 0, 0, kSeqNone, 0, 900 - _vm->_gnap->_gridX, 576 - _vm->_gnap->_gridY);
} else {
switch (_vm->_verbCursor) {
case LOOK_CURSOR:
@@ -2079,7 +2079,7 @@ void Scene15::run() {
_vm->playSound((_vm->getRandom(5) + 0x8D5) | 0x10000, false);
break;
case PLAT_CURSOR:
- gameSys.insertSequence(0x107A8, 1, 0, 0, kSeqNone, 0, 900 - _vm->_gnapGridX, 576 - _vm->_gnapGridY);
+ gameSys.insertSequence(0x107A8, 1, 0, 0, kSeqNone, 0, 900 - _vm->_gnap->_gridX, 576 - _vm->_gnap->_gridY);
break;
}
}
@@ -2087,7 +2087,7 @@ void Scene15::run() {
case kHS15PlayButton:
if (_vm->_grabCursorSpriteIndex >= 0) {
- gameSys.insertSequence(0x107A8, 1, 0, 0, kSeqNone, 0, 900 - _vm->_gnapGridX, 576 - _vm->_gnapGridY);
+ gameSys.insertSequence(0x107A8, 1, 0, 0, kSeqNone, 0, 900 - _vm->_gnap->_gridX, 576 - _vm->_gnap->_gridY);
} else {
switch (_vm->_verbCursor) {
case LOOK_CURSOR:
@@ -2106,7 +2106,7 @@ void Scene15::run() {
_vm->playSound((_vm->getRandom(5) + 0x8D5) | 0x10000, false);
break;
case PLAT_CURSOR:
- gameSys.insertSequence(0x107A8, 1, 0, 0, kSeqNone, 0, 900 - _vm->_gnapGridX, 576 - _vm->_gnapGridY);
+ gameSys.insertSequence(0x107A8, 1, 0, 0, kSeqNone, 0, 900 - _vm->_gnap->_gridX, 576 - _vm->_gnap->_gridY);
break;
}
}
@@ -2119,7 +2119,7 @@ void Scene15::run() {
case kHS15Button5:
case kHS15Button6:
if (_vm->_grabCursorSpriteIndex >= 0) {
- gameSys.insertSequence(0x107A8, 1, 0, 0, kSeqNone, 0, 900 - _vm->_gnapGridX, 576 - _vm->_gnapGridY);
+ gameSys.insertSequence(0x107A8, 1, 0, 0, kSeqNone, 0, 900 - _vm->_gnap->_gridX, 576 - _vm->_gnap->_gridY);
} else {
switch (_vm->_verbCursor) {
case LOOK_CURSOR:
@@ -2132,7 +2132,7 @@ void Scene15::run() {
_vm->playSound((_vm->getRandom(5) + 0x8D5) | 0x10000, false);
break;
case PLAT_CURSOR:
- gameSys.insertSequence(0x107A8, 1, 0, 0, kSeqNone, 0, 900 - _vm->_gnapGridX, 576 - _vm->_gnapGridY);
+ gameSys.insertSequence(0x107A8, 1, 0, 0, kSeqNone, 0, 900 - _vm->_gnap->_gridX, 576 - _vm->_gnap->_gridY);
break;
}
}
@@ -2145,7 +2145,7 @@ void Scene15::run() {
case kHS15ButtonE:
case kHS15ButtonF:
if (_vm->_grabCursorSpriteIndex >= 0) {
- gameSys.insertSequence(0x107A8, 1, 0, 0, kSeqNone, 0, 900 - _vm->_gnapGridX, 576 - _vm->_gnapGridY);
+ gameSys.insertSequence(0x107A8, 1, 0, 0, kSeqNone, 0, 900 - _vm->_gnap->_gridX, 576 - _vm->_gnap->_gridY);
} else {
switch (_vm->_verbCursor) {
case LOOK_CURSOR:
@@ -2158,7 +2158,7 @@ void Scene15::run() {
_vm->playSound((_vm->getRandom(5) + 0x8D5) | 0x10000, false);
break;
case PLAT_CURSOR:
- gameSys.insertSequence(0x107A8, 1, 0, 0, kSeqNone, 0, 900 - _vm->_gnapGridX, 576 - _vm->_gnapGridY);
+ gameSys.insertSequence(0x107A8, 1, 0, 0, kSeqNone, 0, 900 - _vm->_gnap->_gridX, 576 - _vm->_gnap->_gridY);
break;
}
}
@@ -2415,13 +2415,13 @@ void Scene17::run() {
if (_vm->_prevSceneNum == 53 || _vm->_prevSceneNum == 18 || _vm->_prevSceneNum == 20 || _vm->_prevSceneNum == 19) {
if (_vm->_prevSceneNum == 20) {
- _vm->initGnapPos(4, 6, kDirBottomRight);
- _vm->initPlatypusPos(5, 6, kDirNone);
+ _vm->_gnap->initPos(4, 6, kDirBottomRight);
+ _vm->_plat->initPos(5, 6, kDirNone);
_vm->endSceneInit();
_vm->platypusWalkTo(5, 9, -1, 0x107C2, 1);
_vm->gnapWalkTo(4, 8, -1, 0x107B9, 1);
} else if (_vm->isFlag(kGFUnk27)) {
- _vm->initGnapPos(3, 9, kDirUpLeft);
+ _vm->_gnap->initPos(3, 9, kDirUpLeft);
_vm->_plat->_pos = _vm->_hotspotsWalkPos[2];
_vm->_plat->_id = 20 * _vm->_hotspotsWalkPos[2].y;
gameSys.insertSequence(0x25A, 20 * _vm->_hotspotsWalkPos[2].y, 0, 0, kSeqNone, 0, 0, 0);
@@ -2440,7 +2440,7 @@ void Scene17::run() {
} else if (_vm->isFlag(kGFUnk25)) {
_vm->clearFlag(kGFSpringTaken);
_vm->clearFlag(kGFUnk16);
- _vm->initPlatypusPos(7, 9, kDirNone);
+ _vm->_plat->initPos(7, 9, kDirNone);
_vm->_gnap->_pos = _vm->_hotspotsWalkPos[2];
_vm->_gnap->_id = 20 * _vm->_hotspotsWalkPos[2].y;
gameSys.insertSequence(601, 20 * _vm->_hotspotsWalkPos[2].y, 0, 0, kSeqNone, 0, 0, 0);
@@ -2456,7 +2456,7 @@ void Scene17::run() {
_vm->clearFlag(kGFSpringTaken);
_vm->clearFlag(kGFUnk16);
_vm->_sceneWaiting = true;
- _vm->initGnapPos(3, 9, kDirUpLeft);
+ _vm->_gnap->initPos(3, 9, kDirUpLeft);
_vm->_plat->_pos = _vm->_hotspotsWalkPos[2];
_vm->_plat->_id = 20 * _vm->_hotspotsWalkPos[2].y;
_currPhoneSequenceId = 0x251;
@@ -2469,19 +2469,19 @@ void Scene17::run() {
_vm->_plat->_actionStatus = kAS17PlatPhoningAssistant;
updateHotspots();
} else if (_vm->_prevSceneNum == 18) {
- _vm->initGnapPos(6, 6, kDirBottomRight);
- _vm->initPlatypusPos(5, 6, kDirNone);
+ _vm->_gnap->initPos(6, 6, kDirBottomRight);
+ _vm->_plat->initPos(5, 6, kDirNone);
_vm->endSceneInit();
_vm->platypusWalkTo(5, 9, -1, 0x107C2, 1);
_vm->gnapWalkTo(4, 8, -1, 0x107B9, 1);
} else {
if (_vm->isFlag(kGFSpringTaken)) {
- _vm->initGnapPos(_vm->_hotspotsWalkPos[2].x, _vm->_hotspotsWalkPos[2].y, kDirBottomRight);
- _vm->initPlatypusPos(1, 9, kDirNone);
+ _vm->_gnap->initPos(_vm->_hotspotsWalkPos[2].x, _vm->_hotspotsWalkPos[2].y, kDirBottomRight);
+ _vm->_plat->initPos(1, 9, kDirNone);
_vm->endSceneInit();
} else {
- _vm->initGnapPos(3, 7, kDirBottomRight);
- _vm->initPlatypusPos(1, 7, kDirNone);
+ _vm->_gnap->initPos(3, 7, kDirBottomRight);
+ _vm->_plat->initPos(1, 7, kDirNone);
_vm->endSceneInit();
}
_vm->clearFlag(kGFSpringTaken);
@@ -2499,7 +2499,7 @@ void Scene17::run() {
_vm->_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->_platGridX, 48 * _vm->_plat->_pos.y - _vm->_platGridY);
+ kSeqScale | kSeqSyncWait, 0, 75 * _vm->_plat->_pos.x - _vm->_plat->_gridX, 48 * _vm->_plat->_pos.y - _vm->_plat->_gridY);
gameSys.insertSequence(0x22C, 2, 0, 0, kSeqNone, 0, 0, 0);
// TODO delayTicksA(2, 9);
_vm->endSceneInit();
@@ -3210,7 +3210,7 @@ void Scene18::gnapCarryGarbageCanTo(int gridX) {
seqId2 += direction;
gameSys.insertSequence(seqId, seqId2,
gnapSeqId | (gnapDatNum << 16), gnapId,
- kSeqSyncWait, 0, 75 * gnapGridX - _vm->_gnapGridX, 48 * _vm->_gnap->_pos.y - _vm->_gnapGridY);
+ kSeqSyncWait, 0, 75 * gnapGridX - _vm->_gnap->_gridX, 48 * _vm->_gnap->_pos.y - _vm->_gnap->_gridY);
gnapSeqId = seqId;
gnapId = seqId2;
gnapDatNum = 0;
@@ -3234,7 +3234,7 @@ void Scene18::gnapCarryGarbageCanTo(int gridX) {
gameSys.setAnimation(makeRid(_vm->_gnap->_sequenceDatNum, _vm->_gnap->_sequenceId), _vm->_gnap->_id, 0);
gameSys.insertSequence(makeRid(_vm->_gnap->_sequenceDatNum, _vm->_gnap->_sequenceId), _vm->_gnap->_id,
gnapSeqId | (gnapDatNum << 16), gnapId,
- kSeqScale | kSeqSyncWait, 0, 75 * gnapGridX - _vm->_gnapGridX, 48 * _vm->_gnap->_pos.y - _vm->_gnapGridY);
+ kSeqScale | kSeqSyncWait, 0, 75 * gnapGridX - _vm->_gnap->_gridX, 48 * _vm->_gnap->_pos.y - _vm->_gnap->_gridY);
_vm->_gnap->_pos.x = gnapGridX;
}
@@ -3255,12 +3255,12 @@ void Scene18::putDownGarbageCan(int animationIndex) {
if (_vm->_gnap->_idleFacing != kDirNone && _vm->_gnap->_idleFacing != kDirBottomRight && _vm->_gnap->_idleFacing != kDirUpRight) {
gameSys.insertSequence(0x107BA, _vm->_gnap->_id,
makeRid(_vm->_gnap->_sequenceDatNum, _vm->_gnap->_sequenceId), _vm->_gnap->_id,
- kSeqSyncWait, 0, 75 * _vm->_gnap->_pos.x - _vm->_gnapGridX, 48 * _vm->_gnap->_pos.y - _vm->_gnapGridY);
+ kSeqSyncWait, 0, 75 * _vm->_gnap->_pos.x - _vm->_gnap->_gridX, 48 * _vm->_gnap->_pos.y - _vm->_gnap->_gridY);
_vm->_gnap->_sequenceId = 0x7BA;
} else {
gameSys.insertSequence(0x107B9, _vm->_gnap->_id,
makeRid(_vm->_gnap->_sequenceDatNum, _vm->_gnap->_sequenceId), _vm->_gnap->_id,
- kSeqSyncWait, 0, 75 * _vm->_gnap->_pos.x - _vm->_gnapGridX, 48 * _vm->_gnap->_pos.y - _vm->_gnapGridY);
+ kSeqSyncWait, 0, 75 * _vm->_gnap->_pos.x - _vm->_gnap->_gridX, 48 * _vm->_gnap->_pos.y - _vm->_gnap->_gridY);
_vm->_gnap->_sequenceId = 0x7B9;
}
_vm->_gnap->_sequenceDatNum = 1;
@@ -3361,9 +3361,9 @@ void Scene18::run() {
if (_vm->isFlag(kGFPlatypusTalkingToAssistant)) {
if (_vm->_prevSceneNum == 17)
- _vm->initGnapPos(4, 11, kDirBottomRight);
+ _vm->_gnap->initPos(4, 11, kDirBottomRight);
else
- _vm->initGnapPos(4, 7, kDirBottomRight);
+ _vm->_gnap->initPos(4, 7, kDirBottomRight);
_platPhoneCtr = _vm->getRandom(5);
if (_vm->isFlag(kGFUnk27)) {
gameSys.insertSequence(0x21E, 254, 0, 0, kSeqNone, 0, 0, 0);
@@ -3392,20 +3392,20 @@ void Scene18::run() {
_vm->_prevSceneNum = 19;
}
if (_vm->_prevSceneNum == 17) {
- _vm->initGnapPos(4, 11, kDirBottomRight);
- _vm->initPlatypusPos(5, 11, kDirNone);
+ _vm->_gnap->initPos(4, 11, kDirBottomRight);
+ _vm->_plat->initPos(5, 11, kDirNone);
_vm->endSceneInit();
_vm->gnapWalkTo(4, 8, -1, 0x107B9, 1);
_vm->platypusWalkTo(5, 9, -1, 0x107C2, 1);
} else if (_vm->_prevSceneNum == 19) {
- _vm->initGnapPos(7, 7, kDirBottomRight);
- _vm->initPlatypusPos(8, 7, kDirNone);
+ _vm->_gnap->initPos(7, 7, kDirBottomRight);
+ _vm->_plat->initPos(8, 7, kDirNone);
_vm->endSceneInit();
_vm->gnapWalkTo(7, 8, -1, 0x107B9, 1);
_vm->platypusWalkTo(8, 8, -1, 0x107C2, 1);
} else {
- _vm->initGnapPos(-1, 10, kDirBottomRight);
- _vm->initPlatypusPos(-1, 10, kDirNone);
+ _vm->_gnap->initPos(-1, 10, kDirBottomRight);
+ _vm->_plat->initPos(-1, 10, kDirNone);
_vm->endSceneInit();
_vm->gnapWalkTo(3, 7, -1, 0x107B9, 1);
_vm->platypusWalkTo(3, 8, -1, 0x107C2, 1);
@@ -3743,7 +3743,7 @@ void Scene18::run() {
if (!_vm->_timers[6]) {
_vm->_plat->_actionStatus = -1;
_vm->_sceneWaiting = false;
- _vm->initPlatypusPos(-1, 10, kDirNone);
+ _vm->_plat->initPos(-1, 10, kDirNone);
_vm->platypusWalkTo(3, 9, -1, 0x107C2, 1);
_vm->clearFlag(kGFPlatypusTalkingToAssistant);
}
@@ -3988,7 +3988,7 @@ void Scene18::updateAnimations() {
_vm->clearFlag(kGFTruckFilledWithGas);
_vm->invAdd(kItemWrench);
_vm->setGrabCursorSprite(kItemWrench);
- gameSys.insertSequence(0x107B5, _vm->_gnap->_id, 517, _vm->_gnap->_id, kSeqSyncWait, 0, 75 * _vm->_gnap->_pos.x - _vm->_gnapGridX, 48 * _vm->_gnap->_pos.y - _vm->_gnapGridY);
+ gameSys.insertSequence(0x107B5, _vm->_gnap->_id, 517, _vm->_gnap->_id, kSeqSyncWait, 0, 75 * _vm->_gnap->_pos.x - _vm->_gnap->_gridX, 48 * _vm->_gnap->_pos.y - _vm->_gnap->_gridY);
updateHotspots();
_vm->_gnap->_sequenceDatNum = 1;
_vm->_gnap->_sequenceId = 0x7B5;
@@ -4099,7 +4099,7 @@ void Scene19::run() {
gameSys.insertSequence(0x69, 19, 0, 0, kSeqNone, 0, 0, 0);
if (_vm->isFlag(kGFPlatypusTalkingToAssistant)) {
- _vm->initGnapPos(3, 6, kDirBottomRight);
+ _vm->_gnap->initPos(3, 6, kDirBottomRight);
_currShopAssistantSequenceId = kS19ShopAssistantSequenceIds[_vm->getRandom(5)];
_nextShopAssistantSequenceId = _currShopAssistantSequenceId;
gameSys.setAnimation(_currShopAssistantSequenceId, 20, 4);
@@ -4115,8 +4115,8 @@ void Scene19::run() {
gameSys.setAnimation(0x6D, 20, 4);
gameSys.insertSequence(_currShopAssistantSequenceId, 20, 0, 0, kSeqNone, 0, 0, 0);
_vm->_timers[6] = _vm->getRandom(40) + 50;
- _vm->initGnapPos(3, 6, kDirBottomRight);
- _vm->initPlatypusPos(4, 6, kDirNone);
+ _vm->_gnap->initPos(3, 6, kDirBottomRight);
+ _vm->_plat->initPos(4, 6, kDirNone);
_vm->endSceneInit();
_vm->gnapWalkTo(4, 9, -1, 0x107B9, 1);
_vm->platypusWalkTo(5, 9, -1, 0x107C2, 1);
diff --git a/engines/gnap/scenes/group2.cpp b/engines/gnap/scenes/group2.cpp
index 820a14e206..237000dfe2 100644
--- a/engines/gnap/scenes/group2.cpp
+++ b/engines/gnap/scenes/group2.cpp
@@ -206,43 +206,43 @@ void Scene20::run() {
// checkGameAppStatus();
_vm->gameUpdateTick();
}
- _vm->initGnapPos(11, 8, kDirBottomLeft);
- _vm->initPlatypusPos(11, 9, kDirUnk4);
+ _vm->_gnap->initPos(11, 8, kDirBottomLeft);
+ _vm->_plat->initPos(11, 9, kDirUnk4);
_vm->gnapWalkTo(5, 8, -1, 0x107BA, 1);
_vm->platypusWalkTo(6, 9, -1, 0x107C2, 1);
} else {
switch (_vm->_prevSceneNum) {
case 17:
- _vm->initGnapPos(5, 11, kDirBottomRight);
- _vm->initPlatypusPos(6, 11, kDirNone);
+ _vm->_gnap->initPos(5, 11, kDirBottomRight);
+ _vm->_plat->initPos(6, 11, kDirNone);
_vm->endSceneInit();
_vm->gnapWalkTo(5, 8, -1, 0x107B9, 1);
_vm->platypusWalkTo(6, 9, -1, 0x107C2, 1);
break;
case 18:
- _vm->initGnapPos(11, 8, kDirBottomLeft);
- _vm->initPlatypusPos(11, 9, kDirUnk4);
+ _vm->_gnap->initPos(11, 8, kDirBottomLeft);
+ _vm->_plat->initPos(11, 9, kDirUnk4);
_vm->endSceneInit();
_vm->gnapWalkTo(5, 8, -1, 0x107BA, 1);
_vm->platypusWalkTo(6, 9, -1, 0x107C2, 1);
break;
case 21:
- _vm->initGnapPos(-1, 8, kDirBottomLeft);
- _vm->initPlatypusPos(-1, 9, kDirUnk4);
+ _vm->_gnap->initPos(-1, 8, kDirBottomLeft);
+ _vm->_plat->initPos(-1, 9, kDirUnk4);
_vm->endSceneInit();
_vm->gnapWalkTo(3, 8, -1, 0x107B9, 1);
_vm->platypusWalkTo(3, 9, -1, 0x107C2, 1);
break;
case 22:
- _vm->initGnapPos(7, 6, kDirBottomRight);
- _vm->initPlatypusPos(8, 6, kDirNone);
+ _vm->_gnap->initPos(7, 6, kDirBottomRight);
+ _vm->_plat->initPos(8, 6, kDirNone);
_vm->endSceneInit();
_vm->gnapWalkTo(8, 8, -1, 0x107B9, 1);
_vm->platypusWalkTo(9, 9, -1, 0x107C2, 1);
break;
default:
- _vm->initGnapPos(8, 6, kDirBottomLeft);
- _vm->initPlatypusPos(9, 6, kDirUnk4);
+ _vm->_gnap->initPos(8, 6, kDirBottomLeft);
+ _vm->_plat->initPos(9, 6, kDirUnk4);
_vm->endSceneInit();
_vm->_hotspots[kHS20WalkArea2]._flags |= SF_WALKABLE;
_vm->gnapWalkTo(8, 8, -1, 0x107BA, 1);
@@ -744,16 +744,16 @@ void Scene21::run() {
if (_vm->isFlag(kGFTwigTaken)) {
if (_vm->isFlag(kGFKeysTaken)) {
- _vm->initGnapPos(5, 8, kDirBottomRight);
- _vm->initPlatypusPos(6, 8, kDirNone);
+ _vm->_gnap->initPos(5, 8, kDirBottomRight);
+ _vm->_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);
_vm->endSceneInit();
_vm->clearFlag(kGFKeysTaken);
} else {
- _vm->initGnapPos(5, 11, kDirBottomRight);
- _vm->initPlatypusPos(6, 11, kDirNone);
+ _vm->_gnap->initPos(5, 11, kDirBottomRight);
+ _vm->_plat->initPos(6, 11, kDirNone);
if (!_vm->isFlag(kGFUnk04))
gameSys.insertSequence(0x8D, 59, 0, 0, kSeqNone, 0, 0, 0);
_vm->endSceneInit();
@@ -761,8 +761,8 @@ void Scene21::run() {
_vm->platypusWalkTo(6, 8, -1, 0x107C2, 1);
}
} else {
- _vm->initGnapPos(5, 11, kDirBottomRight);
- _vm->initPlatypusPos(6, 11, kDirNone);
+ _vm->_gnap->initPos(5, 11, kDirBottomRight);
+ _vm->_plat->initPos(6, 11, kDirNone);
_currOldLadySequenceId = 0x89;
gameSys.setAnimation(0x89, 79, 3);
gameSys.insertSequence(_currOldLadySequenceId, 79, 0, 0, kSeqNone, 0, 0, 0);
@@ -1043,12 +1043,12 @@ void Scene22::run() {
_vm->queueInsertDeviceIcon();
if (_vm->_prevSceneNum == 20) {
- _vm->initGnapPos(2, 8, kDirBottomRight);
- _vm->initPlatypusPos(1, 8, kDirNone);
+ _vm->_gnap->initPos(2, 8, kDirBottomRight);
+ _vm->_plat->initPos(1, 8, kDirNone);
_vm->endSceneInit();
} else {
- _vm->initGnapPos(11, _vm->_hotspotsWalkPos[kHS22ExitBackGrubCity].y, kDirBottomRight);
- _vm->initPlatypusPos(11, _vm->_hotspotsWalkPos[kHS22ExitBackGrubCity].y + 1, kDirNone);
+ _vm->_gnap->initPos(11, _vm->_hotspotsWalkPos[kHS22ExitBackGrubCity].y, kDirBottomRight);
+ _vm->_plat->initPos(11, _vm->_hotspotsWalkPos[kHS22ExitBackGrubCity].y + 1, kDirNone);
_vm->endSceneInit();
_vm->gnapWalkTo(8, 8, -1, 0x107B9, 1);
_vm->platypusWalkTo(9, 8, -1, 0x107C2, 1);
@@ -1293,8 +1293,8 @@ void Scene23::run() {
_vm->queueInsertDeviceIcon();
- _vm->initGnapPos(-1, 7, kDirBottomRight);
- _vm->initPlatypusPos(-2, 7, kDirNone);
+ _vm->_gnap->initPos(-1, 7, kDirBottomRight);
+ _vm->_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();
@@ -1566,14 +1566,14 @@ void Scene24::run() {
_vm->queueInsertDeviceIcon();
if (_vm->_prevSceneNum == 20) {
- _vm->initGnapPos(1, 8, kDirBottomRight);
- _vm->initPlatypusPos(2, 8, kDirNone);
+ _vm->_gnap->initPos(1, 8, kDirBottomRight);
+ _vm->_plat->initPos(2, 8, kDirNone);
_vm->endSceneInit();
_vm->gnapWalkTo(1, 9, -1, 0x107B9, 1);
_vm->platypusWalkTo(2, 9, -1, 0x107C2, 1);
} else {
- _vm->initGnapPos(8, 8, kDirBottomLeft);
- _vm->initPlatypusPos(8, 8, kDirUnk4);
+ _vm->_gnap->initPos(8, 8, kDirBottomLeft);
+ _vm->_plat->initPos(8, 8, kDirUnk4);
_vm->endSceneInit();
_vm->gnapWalkTo(2, 8, -1, 0x107BA, 1);
_vm->platypusWalkTo(3, 8, -1, 0x107C2, 1);
@@ -1815,14 +1815,14 @@ void Scene25::run() {
_vm->queueInsertDeviceIcon();
if (_vm->_prevSceneNum == 24) {
- _vm->initGnapPos(5, 11, kDirUpLeft);
- _vm->initPlatypusPos(6, 11, kDirUnk4);
+ _vm->_gnap->initPos(5, 11, kDirUpLeft);
+ _vm->_plat->initPos(6, 11, kDirUnk4);
_vm->endSceneInit();
_vm->gnapWalkTo(5, 7, -1, 0x107BA, 1);
_vm->platypusWalkTo(6, 7, -1, 0x107C2, 1);
} else {
- _vm->initGnapPos(5, 6, kDirBottomRight);
- _vm->initPlatypusPos(6, 6, kDirNone);
+ _vm->_gnap->initPos(5, 6, kDirBottomRight);
+ _vm->_plat->initPos(6, 6, kDirNone);
_vm->endSceneInit();
_vm->gnapWalkTo(5, 8, -1, 0x107B9, 1);
_vm->platypusWalkTo(6, 8, -1, 0x107C2, 1);
@@ -2134,14 +2134,14 @@ void Scene26::run() {
gameSys.insertSequence(0x5E, 40, 0, 0, kSeqLoop, 0, 0, 0);
if (_vm->_prevSceneNum == 25) {
- _vm->initGnapPos(-1, 8, kDirBottomRight);
- _vm->initPlatypusPos(-2, 8, kDirNone);
+ _vm->_gnap->initPos(-1, 8, kDirBottomRight);
+ _vm->_plat->initPos(-2, 8, kDirNone);
_vm->endSceneInit();
_vm->gnapWalkTo(2, 8, -1, 0x107B9, 1);
_vm->platypusWalkTo(1, 8, -1, 0x107C2, 1);
} else {
- _vm->initGnapPos(2, 8, kDirBottomRight);
- _vm->initPlatypusPos(3, 8, kDirNone);
+ _vm->_gnap->initPos(2, 8, kDirBottomRight);
+ _vm->_plat->initPos(3, 8, kDirNone);
_vm->endSceneInit();
}
@@ -2351,29 +2351,29 @@ void Scene27::run() {
switch (_vm->_prevSceneNum) {
case 26:
- _vm->initGnapPos(7, 12, kDirBottomRight);
- _vm->initPlatypusPos(6, 12, kDirNone);
+ _vm->_gnap->initPos(7, 12, kDirBottomRight);
+ _vm->_plat->initPos(6, 12, kDirNone);
_vm->endSceneInit();
_vm->gnapWalkTo(7, 8, -1, 0x107B9, 1);
_vm->platypusWalkTo(6, 8, -1, 0x107C2, 1);
break;
case 29:
- _vm->initGnapPos(-1, 8, kDirBottomRight);
- _vm->initPlatypusPos(-1, 9, kDirNone);
+ _vm->_gnap->initPos(-1, 8, kDirBottomRight);
+ _vm->_plat->initPos(-1, 9, kDirNone);
_vm->endSceneInit();
_vm->gnapWalkTo(3, 8, -1, 0x107B9, 1);
_vm->platypusWalkTo(3, 9, -1, 0x107C2, 1);
break;
case 31:
- _vm->initGnapPos(12, 8, kDirBottomLeft);
- _vm->initPlatypusPos(12, 9, kDirUnk4);
+ _vm->_gnap->initPos(12, 8, kDirBottomLeft);
+ _vm->_plat->initPos(12, 9, kDirUnk4);
_vm->endSceneInit();
_vm->gnapWalkTo(8, 8, -1, 0x107BA, 1);
_vm->platypusWalkTo(8, 9, -1, 0x107C2, 1);
break;
default:
- _vm->initGnapPos(6, 8, kDirBottomRight);
- _vm->initPlatypusPos(5, 9, kDirNone);
+ _vm->_gnap->initPos(6, 8, kDirBottomRight);
+ _vm->_plat->initPos(5, 9, kDirNone);
_vm->endSceneInit();
break;
}
@@ -2727,13 +2727,13 @@ void Scene28::run() {
gameSys.insertSequence(_currClownSequenceId, 39, 0, 0, kSeqNone, 0, 0, 0);
_vm->_timers[4] = _vm->getRandom(20) + 80;
}
- _vm->initGnapPos(8, 8, kDirBottomLeft);
- _vm->initPlatypusPos(9, 8, kDirUnk4);
+ _vm->_gnap->initPos(8, 8, kDirBottomLeft);
+ _vm->_plat->initPos(9, 8, kDirUnk4);
_vm->endSceneInit();
} else {
gameSys.insertSequence(0x11B, 39, 0, 0, kSeqNone, 0, 0, 0);
- _vm->initGnapPos(8, 8, kDirBottomLeft);
- _vm->initPlatypusPos(9, 8, kDirUnk4);
+ _vm->_gnap->initPos(8, 8, kDirBottomLeft);
+ _vm->_plat->initPos(9, 8, kDirUnk4);
_vm->endSceneInit();
_vm->playSequences(0xF7, 0x121, 0x122, 0x123);
_currClownSequenceId = 0x115;
@@ -3000,7 +3000,7 @@ void Scene28::updateAnimations() {
_vm->_gnap->_actionStatus = -1;
break;
case kAS28GrabHornFailsDone:
- gameSys.insertSequence(0x107B5, _vm->_gnap->_id, 281, 39, kSeqSyncWait, 0, 75 * _vm->_gnap->_pos.x - _vm->_gnapGridX, 48 * _vm->_gnap->_pos.y - _vm->_gnapGridY);
+ gameSys.insertSequence(0x107B5, _vm->_gnap->_id, 281, 39, kSeqSyncWait, 0, 75 * _vm->_gnap->_pos.x - _vm->_gnap->_gridX, 48 * _vm->_gnap->_pos.y - _vm->_gnap->_gridY);
_vm->_gnap->_sequenceId = 0x7B5;
_vm->_gnap->_sequenceDatNum = 1;
gameSys.insertSequence(0x11B, 39, 0, 0, kSeqNone, 0, 0, 0);
@@ -3128,14 +3128,14 @@ void Scene29::run() {
gameSys.insertSequence(0xF5, 38, 0, 0, kSeqLoop, 0, 0, 0);
if (_vm->_prevSceneNum == 27) {
- _vm->initGnapPos(12, 7, kDirBottomRight);
- _vm->initPlatypusPos(12, 8, kDirNone);
+ _vm->_gnap->initPos(12, 7, kDirBottomRight);
+ _vm->_plat->initPos(12, 8, kDirNone);
_vm->endSceneInit();
_vm->gnapWalkTo(8, 7, -1, 0x107B9, 1);
_vm->platypusWalkTo(8, 8, -1, 0x107C2, 1);
} else {
- _vm->initGnapPos(-1, 7, kDirBottomRight);
- _vm->initPlatypusPos(-2, 7, kDirNone);
+ _vm->_gnap->initPos(-1, 7, kDirBottomRight);
+ _vm->_plat->initPos(-2, 7, kDirNone);
_vm->endSceneInit();
_vm->gnapWalkTo(2, 7, -1, 0x107B9, 1);
_vm->platypusWalkTo(1, 7, -1, 0x107C2, 1);
diff --git a/engines/gnap/scenes/group3.cpp b/engines/gnap/scenes/group3.cpp
index b00224ba9c..c89d954906 100644
--- a/engines/gnap/scenes/group3.cpp
+++ b/engines/gnap/scenes/group3.cpp
@@ -64,8 +64,8 @@ void Scene30::run() {
_vm->_timers[4] = _vm->getRandom(100) + 300;
_kidSequenceId = 0x101;
- _vm->initGnapPos(7, 12, kDirBottomRight);
- _vm->initPlatypusPos(6, 12, kDirNone);
+ _vm->_gnap->initPos(7, 12, kDirBottomRight);
+ _vm->_plat->initPos(6, 12, kDirNone);
_vm->endSceneInit();
_vm->gnapWalkTo(7, 8, -1, 0x107B9, 1);
_vm->platypusWalkTo(6, 8, -1, 0x107C2, 1);
@@ -312,14 +312,14 @@ void Scene31::run() {
_vm->_timers[5] = _vm->getRandom(50) + 180;
if (_vm->_prevSceneNum == 27) {
- _vm->initGnapPos(-1, 8, kDirBottomLeft);
- _vm->initPlatypusPos(-1, 9, kDirUnk4);
+ _vm->_gnap->initPos(-1, 8, kDirBottomLeft);
+ _vm->_plat->initPos(-1, 9, kDirUnk4);
_vm->endSceneInit();
_vm->gnapWalkTo(3, 8, -1, 0x107BA, 1);
_vm->platypusWalkTo(3, 9, -1, 0x107D2, 1);
} else {
- _vm->initGnapPos(7, 12, kDirBottomRight);
- _vm->initPlatypusPos(6, 12, kDirNone);
+ _vm->_gnap->initPos(7, 12, kDirBottomRight);
+ _vm->_plat->initPos(6, 12, kDirNone);
_vm->endSceneInit();
_vm->gnapWalkTo(7, 8, -1, 0x107BA, 1);
_vm->platypusWalkTo(6, 8, -1, 0x107D2, 1);
@@ -664,14 +664,14 @@ void Scene32::run() {
_vm->_timers[4] = _vm->getRandom(100) + 300;
if (_vm->_prevSceneNum == 33) {
- _vm->initGnapPos(11, 6, kDirBottomLeft);
- _vm->initPlatypusPos(12, 6, kDirUnk4);
+ _vm->_gnap->initPos(11, 6, kDirBottomLeft);
+ _vm->_plat->initPos(12, 6, kDirUnk4);
_vm->endSceneInit();
_vm->platypusWalkTo(9, 6, -1, 0x107D2, 1);
_vm->gnapWalkTo(8, 6, -1, 0x107BA, 1);
} else {
- _vm->initGnapPos(1, 6, kDirBottomRight);
- _vm->initPlatypusPos(1, 7, kDirNone);
+ _vm->_gnap->initPos(1, 6, kDirBottomRight);
+ _vm->_plat->initPos(1, 7, kDirNone);
_vm->endSceneInit();
}
@@ -826,27 +826,27 @@ void Scene33::run() {
switch (_vm->_prevSceneNum) {
case 34:
- _vm->initGnapPos(11, 7, kDirBottomLeft);
- _vm->initPlatypusPos(12, 7, kDirUnk4);
+ _vm->_gnap->initPos(11, 7, kDirBottomLeft);
+ _vm->_plat->initPos(12, 7, kDirUnk4);
_vm->endSceneInit();
_vm->gnapWalkTo(8, 7, -1, 0x107BA, 1);
_vm->platypusWalkTo(9, 7, -1, 0x107D2, 1);
break;
case 37:
- _vm->initGnapPos(7, 7, kDirBottomRight);
- _vm->initPlatypusPos(8, 7, kDirNone);
+ _vm->_gnap->initPos(7, 7, kDirBottomRight);
+ _vm->_plat->initPos(8, 7, kDirNone);
_vm->endSceneInit();
break;
case 32:
- _vm->initGnapPos(-1, 6, kDirBottomRight);
- _vm->initPlatypusPos(-1, 7, kDirNone);
+ _vm->_gnap->initPos(-1, 6, kDirBottomRight);
+ _vm->_plat->initPos(-1, 7, kDirNone);
_vm->endSceneInit();
_vm->platypusWalkTo(2, 7, -1, 0x107C2, 1);
_vm->gnapWalkTo(2, 8, -1, 0x107B9, 1);
break;
default:
- _vm->initGnapPos(3, 7, kDirBottomRight);
- _vm->initPlatypusPos(2, 7, kDirNone);
+ _vm->_gnap->initPos(3, 7, kDirBottomRight);
+ _vm->_plat->initPos(2, 7, kDirNone);
_vm->endSceneInit();
break;
}
@@ -1032,7 +1032,7 @@ void Scene33::updateAnimations() {
_vm->_timers[2] = 100;
break;
case kAS33UseChickenDone:
- gameSys.insertSequence(0x107B5, _vm->_gnap->_id, 0x81, 179, kSeqSyncWait, 0, 75 * _vm->_gnap->_pos.x - _vm->_gnapGridX, 48 * _vm->_gnap->_pos.y - _vm->_gnapGridY);
+ gameSys.insertSequence(0x107B5, _vm->_gnap->_id, 0x81, 179, kSeqSyncWait, 0, 75 * _vm->_gnap->_pos.x - _vm->_gnap->_gridX, 48 * _vm->_gnap->_pos.y - _vm->_gnap->_gridY);
_vm->_gnap->_sequenceId = 0x7B5;
_vm->_gnap->_sequenceDatNum = 1;
_currChickenSequenceId = 0x7E;
@@ -1122,11 +1122,11 @@ void Scene38::run() {
_vm->_gameSys->insertSequence(0x9B, 0, 0, 0, kSeqNone, 0, 0, 0);
if (_vm->_prevSceneNum == 39) {
- _vm->initGnapPos(3, 7, kDirBottomLeft);
- _vm->initPlatypusPos(4, 7, kDirUnk4);
+ _vm->_gnap->initPos(3, 7, kDirBottomLeft);
+ _vm->_plat->initPos(4, 7, kDirUnk4);
} else {
- _vm->initGnapPos(3, 8, kDirBottomRight);
- _vm->initPlatypusPos(4, 8, kDirNone);
+ _vm->_gnap->initPos(3, 8, kDirBottomRight);
+ _vm->_plat->initPos(4, 8, kDirNone);
}
_vm->endSceneInit();
@@ -1420,12 +1420,12 @@ void Scene39::run() {
_nextGuySequenceId = -1;
if (_vm->_prevSceneNum == 38) {
- _vm->initGnapPos(3, 7, kDirUpRight);
- _vm->initPlatypusPos(2, 7, kDirUpLeft);
+ _vm->_gnap->initPos(3, 7, kDirUpRight);
+ _vm->_plat->initPos(2, 7, kDirUpLeft);
_vm->endSceneInit();
} else {
- _vm->initGnapPos(4, 7, kDirBottomRight);
- _vm->initPlatypusPos(5, 7, kDirNone);
+ _vm->_gnap->initPos(4, 7, kDirBottomRight);
+ _vm->_plat->initPos(5, 7, kDirNone);
_vm->endSceneInit();
}
diff --git a/engines/gnap/scenes/group4.cpp b/engines/gnap/scenes/group4.cpp
index 6ec914db59..e5e56510b3 100644
--- a/engines/gnap/scenes/group4.cpp
+++ b/engines/gnap/scenes/group4.cpp
@@ -270,23 +270,23 @@ void Scene41::run() {
_vm->_gnap->_id = 140;
gameSys.insertSequence(0x120, 140, 0, 0, kSeqNone, 0, 0, 0);
gameSys.setAnimation(makeRid(_vm->_gnap->_sequenceDatNum, _vm->_gnap->_sequenceId), _vm->_gnap->_id, 0);
- _vm->initPlatypusPos(8, 10, kDirBottomLeft);
+ _vm->_plat->initPos(8, 10, kDirBottomLeft);
_vm->endSceneInit();
} else if (_vm->_prevSceneNum == 45) {
- _vm->initGnapPos(-1, 8, kDirUpRight);
- _vm->initPlatypusPos(-2, 8, kDirUpLeft);
+ _vm->_gnap->initPos(-1, 8, kDirUpRight);
+ _vm->_plat->initPos(-2, 8, kDirUpLeft);
_vm->endSceneInit();
_vm->platypusWalkTo(1, 8, -1, 0x107C2, 1);
_vm->gnapWalkTo(2, 8, -1, 0x107B9, 1);
} else if (_vm->_prevSceneNum == 42) {
- _vm->initGnapPos(11, 8, kDirUpRight);
- _vm->initPlatypusPos(11, 9, kDirUpLeft);
+ _vm->_gnap->initPos(11, 8, kDirUpRight);
+ _vm->_plat->initPos(11, 9, kDirUpLeft);
_vm->endSceneInit();
_vm->gnapWalkTo(8, 8, -1, 0x107BA, 1);
_vm->platypusWalkTo(9, 8, -1, 0x107D2, 1);
} else {
- _vm->initGnapPos(5, 8, kDirBottomRight);
- _vm->initPlatypusPos(6, 8, kDirBottomLeft);
+ _vm->_gnap->initPos(5, 8, kDirBottomRight);
+ _vm->_plat->initPos(6, 8, kDirBottomLeft);
_vm->endSceneInit();
}
@@ -785,20 +785,20 @@ void Scene42::run() {
if (_vm->_toyUfoSequenceId == 0x872)
_vm->setGrabCursorSprite(-1);
} else if (_vm->_prevSceneNum == 41) {
- _vm->initGnapPos(-1, 8, kDirUpRight);
- _vm->initPlatypusPos(-1, 9, kDirUpLeft);
+ _vm->_gnap->initPos(-1, 8, kDirUpRight);
+ _vm->_plat->initPos(-1, 9, kDirUpLeft);
_vm->endSceneInit();
_vm->gnapWalkTo(2, 8, -1, 0x107B9, 1);
_vm->platypusWalkTo(1, 8, -1, 0x107C2, 1);
} else if (_vm->_prevSceneNum == 43) {
- _vm->initGnapPos(11, 8, kDirUpRight);
- _vm->initPlatypusPos(11, 9, kDirUpLeft);
+ _vm->_gnap->initPos(11, 8, kDirUpRight);
+ _vm->_plat->initPos(11, 9, kDirUpLeft);
_vm->endSceneInit();
_vm->gnapWalkTo(8, 8, -1, 0x107BA, 1);
_vm->platypusWalkTo(9, 8, -1, 0x107D2, 1);
} else {
- _vm->initGnapPos(5, 11, kDirUpRight);
- _vm->initPlatypusPos(6, 11, kDirUpLeft);
+ _vm->_gnap->initPos(5, 11, kDirUpRight);
+ _vm->_plat->initPos(6, 11, kDirUpLeft);
_vm->endSceneInit();
_vm->gnapWalkTo(5, 8, -1, 0x107BA, 1);
_vm->platypusWalkTo(6, 8, -1, 0x107C2, 1);
@@ -1065,7 +1065,7 @@ void Scene42::updateAnimations() {
gameSys.insertSequence(0x107B7, _vm->_gnap->_id,
makeRid(_vm->_gnap->_sequenceDatNum, _vm->_gnap->_sequenceId), _vm->_gnap->_id,
kSeqSyncWait, _vm->getSequenceTotalDuration(_nextBBQVendorSequenceId),
- 75 * _vm->_gnap->_pos.x - _vm->_gnapGridX, 48 * _vm->_gnap->_pos.y - _vm->_gnapGridY);
+ 75 * _vm->_gnap->_pos.x - _vm->_gnap->_gridX, 48 * _vm->_gnap->_pos.y - _vm->_gnap->_gridY);
_vm->_gnap->_sequenceDatNum = 1;
} else {
gameSys.insertSequence(sequenceId, _vm->_gnap->_id,
@@ -1227,28 +1227,28 @@ void Scene43::run() {
} else {
switch (_vm->_prevSceneNum) {
case 42:
- _vm->initGnapPos(-1, 8, kDirUpRight);
- _vm->initPlatypusPos(-1, 9, kDirUpLeft);
+ _vm->_gnap->initPos(-1, 8, kDirUpRight);
+ _vm->_plat->initPos(-1, 9, kDirUpLeft);
_vm->endSceneInit();
_vm->gnapWalkTo(2, 8, -1, 0x107B9, 1);
_vm->platypusWalkTo(1, 8, -1, 0x107C2, 1);
break;
case 44:
- _vm->initGnapPos(11, 8, kDirUpRight);
- _vm->initPlatypusPos(11, 9, kDirUpLeft);
+ _vm->_gnap->initPos(11, 8, kDirUpRight);
+ _vm->_plat->initPos(11, 9, kDirUpLeft);
_vm->endSceneInit();
_vm->gnapWalkTo(8, 8, -1, 0x107BA, 1);
_vm->platypusWalkTo(9, 8, -1, 0x107D2, 1);
break;
case 54:
- _vm->initGnapPos(4, 7, kDirBottomLeft);
- _vm->initPlatypusPos(11, 8, kDirUpLeft);
+ _vm->_gnap->initPos(4, 7, kDirBottomLeft);
+ _vm->_plat->initPos(11, 8, kDirUpLeft);
_vm->endSceneInit();
_vm->platypusWalkTo(9, 8, -1, 0x107D2, 1);
break;
default:
- _vm->initGnapPos(5, 11, kDirUpRight);
- _vm->initPlatypusPos(6, 11, kDirUpLeft);
+ _vm->_gnap->initPos(5, 11, kDirUpRight);
+ _vm->_plat->initPos(6, 11, kDirUpLeft);
_vm->endSceneInit();
_vm->gnapWalkTo(5, 8, -1, 0x107BA, 1);
_vm->platypusWalkTo(6, 8, -1, 0x107C2, 1);
@@ -1681,23 +1681,23 @@ void Scene44::run() {
} else {
switch (_vm->_prevSceneNum) {
case 43:
- _vm->initGnapPos(-1, 8, kDirUpRight);
- _vm->initPlatypusPos(-1, 7, kDirUpLeft);
+ _vm->_gnap->initPos(-1, 8, kDirUpRight);
+ _vm->_plat->initPos(-1, 7, kDirUpLeft);
_vm->endSceneInit();
_vm->gnapWalkTo(2, 8, -1, 0x107B9, 1);
_vm->platypusWalkTo(1, 8, -1, 0x107C2, 1);
break;
case 46:
- _vm->initGnapPos(11, 8, kDirUpRight);
- _vm->initPlatypusPos(11, 8, kDirUpLeft);
+ _vm->_gnap->initPos(11, 8, kDirUpRight);
+ _vm->_plat->initPos(11, 8, kDirUpLeft);
_vm->endSceneInit();
_vm->gnapWalkTo(6, 8, -1, 0x107BA, 1);
_vm->platypusWalkTo(7, 8, -1, 0x107D2, 1);
break;
case 50:
- _vm->initGnapPos(4, 8, kDirBottomRight);
+ _vm->_gnap->initPos(4, 8, kDirBottomRight);
if (_vm->_sceneSavegameLoaded) {
- _vm->initPlatypusPos(_vm->_hotspotsWalkPos[4].x, _vm->_hotspotsWalkPos[4].y, kDirUnk4);
+ _vm->_plat->initPos(_vm->_hotspotsWalkPos[4].x, _vm->_hotspotsWalkPos[4].y, kDirUnk4);
} else if (!_vm->isFlag(kGFUnk13)) {
_vm->_timers[0] = 50;
_vm->_timers[1] = 20;
@@ -1711,8 +1711,8 @@ void Scene44::run() {
_vm->endSceneInit();
break;
default:
- _vm->initGnapPos(5, 11, kDirUpRight);
- _vm->initPlatypusPos(6, 11, kDirUpLeft);
+ _vm->_gnap->initPos(5, 11, kDirUpRight);
+ _vm->_plat->initPos(6, 11, kDirUpLeft);
_vm->endSceneInit();
_vm->platypusWalkTo(6, 8, -1, 0x107C2, 1);
_vm->gnapWalkTo(5, 8, -1, 0x107BA, 1);
@@ -2019,7 +2019,7 @@ void Scene44::updateAnimations() {
if (gameSys.getAnimationStatus(2) == 2) {
if (_nextKissingLadySequenceId == 0xF6) {
gameSys.insertSequence(_nextKissingLadySequenceId, 1, _currKissingLadySequenceId, 1, kSeqSyncWait, 0, 0, 0);
- _vm->initPlatypusPos(5, 8, kDirNone);
+ _vm->_plat->initPos(5, 8, kDirNone);
_currKissingLadySequenceId = _nextKissingLadySequenceId;
_nextKissingLadySequenceId = -1;
gameSys.setAnimation(0, 0, 2);
@@ -2147,23 +2147,23 @@ void Scene45::run() {
gameSys.setAnimation(0x9E, 1, 0);
_vm->_gnap->_actionStatus = 1;
gameSys.insertSequence(_vm->_gnap->_sequenceId, _vm->_gnap->_id, 0, 0, kSeqNone, 0, 0, 0);
- _vm->initPlatypusPos(4, 8, kDirNone);
+ _vm->_plat->initPos(4, 8, kDirNone);
_vm->endSceneInit();
} else if (_vm->_prevSceneNum == 46) {
- _vm->initGnapPos(-1, 8, kDirUpRight);
- _vm->initPlatypusPos(-1, 9, kDirUpLeft);
+ _vm->_gnap->initPos(-1, 8, kDirUpRight);
+ _vm->_plat->initPos(-1, 9, kDirUpLeft);
_vm->endSceneInit();
_vm->platypusWalkTo(4, 8, -1, 0x107C2, 1);
_vm->gnapWalkTo(2, 7, -1, 0x107B9, 1);
} else if (_vm->_prevSceneNum == 41) {
- _vm->initGnapPos(11, 8, kDirUpRight);
- _vm->initPlatypusPos(11, 9, kDirUpLeft);
+ _vm->_gnap->initPos(11, 8, kDirUpRight);
+ _vm->_plat->initPos(11, 9, kDirUpLeft);
_vm->endSceneInit();
_vm->platypusWalkTo(4, 8, -1, 0x107D2, 1);
_vm->gnapWalkTo(10, 9, -1, 0x107BA, 1);
} else {
- _vm->initGnapPos(2, 11, kDirUpRight);
- _vm->initPlatypusPos(6, 11, kDirUpLeft);
+ _vm->_gnap->initPos(2, 11, kDirUpRight);
+ _vm->_plat->initPos(6, 11, kDirUpLeft);
_vm->endSceneInit();
_vm->platypusWalkTo(4, 8, -1, 0x107C2, 1);
_vm->gnapWalkTo(2, 7, -1, 0x107B9, 1);
@@ -2201,7 +2201,7 @@ void Scene45::run() {
gameSys.setAnimation(0x107BD, _vm->_gnap->_id, 0);
gameSys.insertSequence(0x107BD, _vm->_gnap->_id,
makeRid(_vm->_gnap->_sequenceDatNum, _vm->_gnap->_sequenceId), _vm->_gnap->_id,
- kSeqSyncWait, 0, 75 * _vm->_gnap->_pos.x - _vm->_gnapGridX, 48 * _vm->_gnap->_pos.y - _vm->_gnapGridY);
+ kSeqSyncWait, 0, 75 * _vm->_gnap->_pos.x - _vm->_gnap->_gridX, 48 * _vm->_gnap->_pos.y - _vm->_gnap->_gridY);
_vm->removeFullScreenSprite();
_vm->showCursor();
_vm->_gnap->_sequenceId = 0x7BD;
@@ -2514,20 +2514,20 @@ void Scene46::run() {
gameSys.insertSequence(_vm->_toyUfoSequenceId | 0x10000, _vm->_toyUfoId, 0, 0, kSeqNone, 0, _vm->_toyUfoX - 274, _vm->_toyUfoY - 128);
_vm->endSceneInit();
} else if (_vm->_prevSceneNum == 44) {
- _vm->initGnapPos(-1, 8, kDirUpRight);
- _vm->initPlatypusPos(-1, 8, kDirUpLeft);
+ _vm->_gnap->initPos(-1, 8, kDirUpRight);
+ _vm->_plat->initPos(-1, 8, kDirUpLeft);
_vm->endSceneInit();
_vm->platypusWalkTo(1, 8, -1, 0x107C2, 1);
_vm->gnapWalkTo(2, 8, -1, 0x107B9, 1);
} else if (_vm->_prevSceneNum == 45) {
- _vm->initGnapPos(11, 8, kDirUpRight);
- _vm->initPlatypusPos(12, 8, kDirUpLeft);
+ _vm->_gnap->initPos(11, 8, kDirUpRight);
+ _vm->_plat->initPos(12, 8, kDirUpLeft);
_vm->endSceneInit();
_vm->gnapWalkTo(8, 8, -1, 0x107BA, 1);
_vm->platypusWalkTo(9, 8, -1, 0x107D2, 1);
} else {
- _vm->initGnapPos(5, 11, kDirUpRight);
- _vm->initPlatypusPos(6, 11, kDirUpLeft);
+ _vm->_gnap->initPos(5, 11, kDirUpRight);
+ _vm->_plat->initPos(6, 11, kDirUpLeft);
_vm->endSceneInit();
_vm->platypusWalkTo(5, 8, -1, 0x107C2, 1);
_vm->gnapWalkTo(6, 8, -1, 0x107BA, 1);