aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStrangerke2016-05-07 22:09:25 +0200
committerEugene Sandulenko2016-05-10 12:14:54 +0200
commit951fab48530ab6b411ce396f459bf66d120ce05d (patch)
tree5a76fcc2369873846d035bdf9e5e523be863b5d7
parentb3bf17a315092b38c675360dcf360a54c054d791 (diff)
downloadscummvm-rg350-951fab48530ab6b411ce396f459bf66d120ce05d.tar.gz
scummvm-rg350-951fab48530ab6b411ce396f459bf66d120ce05d.tar.bz2
scummvm-rg350-951fab48530ab6b411ce396f459bf66d120ce05d.zip
GNAP: Move walkTo and walkStep to Character
-rw-r--r--engines/gnap/character.cpp400
-rw-r--r--engines/gnap/character.h30
-rw-r--r--engines/gnap/gnap.cpp10
-rw-r--r--engines/gnap/gnap.h30
-rw-r--r--engines/gnap/grid.cpp1561
-rw-r--r--engines/gnap/scenes/group0.cpp240
-rw-r--r--engines/gnap/scenes/group1.cpp264
-rw-r--r--engines/gnap/scenes/group2.cpp286
-rw-r--r--engines/gnap/scenes/group3.cpp120
-rw-r--r--engines/gnap/scenes/group4.cpp194
10 files changed, 1548 insertions, 1587 deletions
diff --git a/engines/gnap/character.cpp b/engines/gnap/character.cpp
index 9503bfdd39..a15f4e9cad 100644
--- a/engines/gnap/character.cpp
+++ b/engines/gnap/character.cpp
@@ -35,10 +35,76 @@ Character::Character(GnapEngine *vm) : _vm(vm) {
_id = 0;
_gridX = 0;
_gridY = 0;
+
+ _walkNodesCount = 0;
+ _walkDestX = _walkDestY = 0;
+ _walkDeltaX = _walkDeltaY = 0;
+ _walkDirX = _walkDirY = 0;
+ _walkDirXIncr = _walkDirYIncr = 0;
+
+ for(int i = 0; i < kMaxGridStructs; i++) {
+ _walkNodes[i]._id = 0;
+ _walkNodes[i]._sequenceId = 0;
+ _walkNodes[i]._deltaX = 0;
+ _walkNodes[i]._deltaY = 0;
+ _walkNodes[i]._gridX1 = 0;
+ _walkNodes[i]._gridY1 = 0;
+ }
}
Character::~Character() {}
+void Character::walkStep() {
+ for (int i = 1; i < _vm->_gridMaxX; ++i) {
+ Common::Point checkPt = Common::Point(_pos.x + i, _pos.y);
+ if (!_vm->isPointBlocked(checkPt)) {
+ walkTo(checkPt, -1, -1, 1);
+ break;
+ }
+
+ checkPt = Common::Point(_pos.x - i, _pos.y);
+ if (!_vm->isPointBlocked(checkPt)) {
+ walkTo(checkPt, -1, -1, 1);
+ break;
+ }
+
+ checkPt = Common::Point(_pos.x, _pos.y + 1);
+ if (!_vm->isPointBlocked(checkPt)) {
+ walkTo(checkPt, -1, -1, 1);
+ break;
+ }
+
+ checkPt = Common::Point(_pos.x, _pos.y - 1);
+ if (!_vm->isPointBlocked(checkPt)) {
+ walkTo(checkPt, -1, -1, 1);
+ break;
+ }
+
+ checkPt = Common::Point(_pos.x + 1, _pos.y + 1);
+ if (!_vm->isPointBlocked(checkPt)) {
+ walkTo(checkPt, -1, -1, 1);
+ break;
+ }
+
+ checkPt = Common::Point(_pos.x - 1, _pos.y + 1);
+ if (!_vm->isPointBlocked(checkPt)) {
+ walkTo(checkPt, -1, -1, 1);
+ break;
+ }
+
+ checkPt = Common::Point(_pos.x + 1, _pos.y - 1);
+ if (!_vm->isPointBlocked(checkPt)) {
+ walkTo(checkPt, -1, -1, 1);
+ break;
+ }
+
+ checkPt = Common::Point(_pos.x - 1, _pos.y - 1);
+ if (!_vm->isPointBlocked(checkPt)) {
+ walkTo(checkPt, -1, -1, 1);
+ break;
+ }
+ }
+}
/************************************************************************************************/
PlayerGnap::PlayerGnap(GnapEngine * vm) : Character(vm) {
@@ -412,7 +478,7 @@ void PlayerGnap::useJointOnPlatypus() {
_vm->_plat->_sequenceId = 0x876;
_vm->_plat->_idleFacing = kDirNone;
playSequence(0x107B5);
- _vm->gnapWalkStep();
+ _vm->_gnap->walkStep();
while (_vm->_gameSys->getAnimationStatus(0) != 2) {
_vm->updateMouseCursor();
_vm->gameUpdateTick();
@@ -608,6 +674,180 @@ int PlayerGnap::getWalkSequenceId(int deltaX, int deltaY) {
return walkSequenceIds[3 * deltaX + 3 + 1 + deltaY];
}
+bool PlayerGnap::walkTo(Common::Point gridPos, int animationIndex, int sequenceId, int flags) {
+ int datNum = flags & 3;
+ bool done = false;
+
+ _vm->_timers[2] = 200;
+ _vm->_timers[3] = 300;
+
+ int gridX = gridPos.x;
+ if (gridX < 0)
+ gridX = (_vm->_leftClickMouseX - _vm->_gridMinX + 37) / 75;
+
+ int gridY = gridPos.y;
+ if (gridY < 0)
+ gridY = (_vm->_leftClickMouseY - _vm->_gridMinY + 24) / 48;
+
+ _walkDestX = CLIP(gridX, 0, _vm->_gridMaxX - 1);
+ _walkDestY = CLIP(gridY, 0, _vm->_gridMaxY - 1);
+
+ if (animationIndex >= 0 && _walkDestX == _vm->_plat->_pos.x && _walkDestY == _vm->_plat->_pos.y)
+ _vm->platypusMakeRoom();
+
+ if (findPath1(_pos.x, _pos.y, 0))
+ done = true;
+
+ if (!done && findPath2(_pos.x, _pos.y, 0))
+ done = true;
+
+ if (!done && findPath3(_pos.x, _pos.y))
+ done = true;
+
+ if (!done && findPath4(_pos.x, _pos.y))
+ done = true;
+
+ _vm->gnapIdle();
+
+ int gnapSequenceId = _sequenceId;
+ int gnapId = _id;
+ int gnapSequenceDatNum = _sequenceDatNum;
+
+ debugC(kDebugBasic, "_gnap->_walkNodesCount: %d", _walkNodesCount);
+
+ for (int index = 0; index < _walkNodesCount; ++index) {
+ _walkNodes[index]._id = index + 20 * _walkNodes[index]._gridY1;
+ if (_walkNodes[index]._deltaX == 1 && _walkNodes[index]._deltaY == 0) {
+ if (index % 2) {
+ _vm->_gameSys->insertSequence(makeRid(datNum, 0x7AB), _walkNodes[index]._id,
+ makeRid(gnapSequenceDatNum, gnapSequenceId), gnapId,
+ kSeqScale | kSeqSyncWait, 0, 75 * _walkNodes[index]._gridX1 - _gridX, 48 * _walkNodes[index]._gridY1 - _gridY);
+ _walkNodes[index]._sequenceId = 0x7AB;
+ gnapSequenceId = 0x7AB;
+ } else {
+ _vm->_gameSys->insertSequence(makeRid(datNum, 0x7AC), _walkNodes[index]._id,
+ makeRid(gnapSequenceDatNum, gnapSequenceId), gnapId,
+ kSeqScale | kSeqSyncWait, 0, 75 * _walkNodes[index]._gridX1 - _gridX, 48 * _walkNodes[index]._gridY1 - _gridY);
+ _walkNodes[index]._sequenceId = 0x7AC;
+ gnapSequenceId = 0x7AC;
+ }
+ } else if (_walkNodes[index]._deltaX == -1 && _walkNodes[index]._deltaY == 0) {
+ if (index % 2) {
+ _vm->_gameSys->insertSequence(makeRid(datNum, 0x7AF), _walkNodes[index]._id,
+ makeRid(gnapSequenceDatNum, gnapSequenceId), gnapId,
+ kSeqScale | kSeqSyncWait, 0, 75 * _walkNodes[index]._gridX1 - _gridX, 48 * _walkNodes[index]._gridY1 - _gridY);
+ _walkNodes[index]._sequenceId = 0x7AF;
+ gnapSequenceId = 0x7AF;
+ } else {
+ _vm->_gameSys->insertSequence(makeRid(datNum, 0x7B0), _walkNodes[index]._id,
+ makeRid(gnapSequenceDatNum, gnapSequenceId), gnapId,
+ kSeqScale | kSeqSyncWait, 0, 75 * _walkNodes[index]._gridX1 - _gridX, 48 * _walkNodes[index]._gridY1 - _gridY);
+ _walkNodes[index]._sequenceId = 0x7B0;
+ gnapSequenceId = 0x7B0;
+ }
+ } else {
+ if (_walkNodes[index]._deltaY == -1)
+ _walkNodes[index]._id -= 10;
+ else
+ _walkNodes[index]._id += 10;
+ int newSequenceId = getWalkSequenceId(_walkNodes[index]._deltaX, _walkNodes[index]._deltaY);
+ _vm->_gameSys->insertSequence(makeRid(datNum, newSequenceId), _walkNodes[index]._id,
+ makeRid(gnapSequenceDatNum, gnapSequenceId), gnapId,
+ kSeqScale | kSeqSyncWait, 0, 75 * _walkNodes[index]._gridX1 - _gridX, 48 * _walkNodes[index]._gridY1 - _gridY);
+ _walkNodes[index]._sequenceId = newSequenceId;
+ gnapSequenceId = newSequenceId;
+ }
+ gnapId = _walkNodes[index]._id;
+ gnapSequenceDatNum = datNum;
+ }
+
+ if (flags & 8) {
+ if (_walkNodesCount > 0) {
+ _sequenceId = gnapSequenceId;
+ _id = gnapId;
+ _idleFacing = _vm->getGnapWalkFacing(_walkNodes[_walkNodesCount - 1]._deltaX, _walkNodes[_walkNodesCount - 1]._deltaY);
+ _sequenceDatNum = datNum;
+ if (animationIndex >= 0)
+ _vm->_gameSys->setAnimation(makeRid(_sequenceDatNum, _sequenceId), _id, animationIndex);
+ } else if (animationIndex >= 0) {
+ _vm->_gameSys->setAnimation(0x107D3, 1, animationIndex);
+ _vm->_gameSys->insertSequence(0x107D3, 1, 0, 0, kSeqNone, 0, 0, 0);
+ }
+ } else {
+ if (sequenceId >= 0 && sequenceId != -1) {
+ _sequenceId = ridToEntryIndex(sequenceId);
+ _sequenceDatNum = ridToDatIndex(sequenceId);
+ if (_sequenceId == 0x7B9) {
+ _idleFacing = kDirBottomRight;
+ } else {
+ switch (_sequenceId) {
+ case 0x7BA:
+ _idleFacing = kDirBottomLeft;
+ break;
+ case 0x7BB:
+ _idleFacing = kDirUpRight;
+ break;
+ case 0x7BC:
+ _idleFacing = kDirUpLeft;
+ break;
+ }
+ }
+ } else {
+ if (_walkNodesCount > 0) {
+ _sequenceId = _vm->getGnapWalkStopSequenceId(_walkNodes[_walkNodesCount - 1]._deltaX, _walkNodes[_walkNodesCount - 1]._deltaY);
+ _idleFacing = _vm->getGnapWalkFacing(_walkNodes[_walkNodesCount - 1]._deltaX, _walkNodes[_walkNodesCount - 1]._deltaY);
+ } else if (gridX >= 0 || gridY >= 0) {
+ switch (_idleFacing) {
+ case kDirBottomRight:
+ _sequenceId = 0x7B9;
+ break;
+ case kDirBottomLeft:
+ _sequenceId = 0x7BA;
+ break;
+ case kDirUpRight:
+ _sequenceId = 0x7BB;
+ break;
+ default:
+ _sequenceId = 0x7BC;
+ break;
+ }
+ } else {
+ //TODO: simplify the checks by using v10 and v11
+ int v10 = _vm->_leftClickMouseX - (_vm->_gridMinX + 75 * _pos.x);
+ int v11 = _vm->_leftClickMouseY - (_vm->_gridMinY + 48 * _pos.y);
+ if (_vm->_leftClickMouseX == _vm->_gridMinX + 75 * _pos.x)
+ ++v10;
+ if (_vm->_leftClickMouseY == _vm->_gridMinY + 48 * _pos.y)
+ v11 = 1;
+ _sequenceId = _vm->getGnapWalkStopSequenceId(v10 / abs(v10), v11 / abs(v11));
+ _idleFacing = _vm->getGnapWalkFacing(v10 / abs(v10), v11 / abs(v11));
+ }
+ _sequenceDatNum = datNum;
+ }
+
+ if (animationIndex < 0) {
+ _id = 20 * _walkDestY + 1;
+ } else {
+ _id = _walkNodesCount + animationIndex + 20 * _walkDestY;
+ _vm->_gameSys->setAnimation(makeRid(_sequenceDatNum, _sequenceId), _walkNodesCount + animationIndex + 20 * _walkDestY, animationIndex);
+ }
+
+ if (flags & 4) {
+ _vm->_gameSys->insertSequence(makeRid(_sequenceDatNum, _sequenceId), _id,
+ makeRid(gnapSequenceDatNum, gnapSequenceId), gnapId,
+ kSeqScale | kSeqSyncWait, 0, 0, 0);
+ } else {
+ _vm->_gameSys->insertSequence(makeRid(_sequenceDatNum, _sequenceId), _id,
+ makeRid(gnapSequenceDatNum, gnapSequenceId), gnapId,
+ kSeqScale | kSeqSyncWait, 0, 75 * _walkDestX - _gridX, 48 * _walkDestY - _gridY);
+ }
+ }
+
+ _pos = Common::Point(_walkDestX, _walkDestY);
+
+ return done;
+}
+
/************************************************************************************************/
PlayerPlat::PlayerPlat(GnapEngine * vm) : Character(vm) {}
@@ -731,4 +971,162 @@ int PlayerPlat::getWalkSequenceId(int deltaX, int deltaY) {
return walkSequenceIds[3 * deltaX + 3 + 1 + deltaY];
}
+bool PlayerPlat::walkTo(Common::Point gridPos, int animationIndex, int sequenceId, int flags) {
+ int datNum = flags & 3;
+ bool done = false;
+
+ _vm->_timers[1] = 60;
+
+ int gridX = gridPos.x;
+ if (gridX < 0)
+ gridX = (_vm->_leftClickMouseX - _vm->_gridMinX + 37) / 75;
+
+ int gridY = gridPos.y;
+ if (gridY < 0)
+ gridY = (_vm->_leftClickMouseY - _vm->_gridMinY + 24) / 48;
+
+ _walkDestX = CLIP(gridX, 0, _vm->_gridMaxX - 1);
+ _walkDestY = CLIP(gridY, 0, _vm->_gridMaxY - 1);
+
+ if (animationIndex >= 0 && _vm->_gnap->_pos == Common::Point(_walkDestX, _walkDestY))
+ _vm->_gnap->walkStep();
+
+ if (findPath1(_pos.x, _pos.y, 0))
+ done = true;
+
+ if (!done && findPath2(_pos.x, _pos.y, 0))
+ done = true;
+
+ if (!done && findPath3(_pos.x, _pos.y))
+ done = true;
+
+ if (!done && findPath4(_pos.x, _pos.y))
+ done = true;
+
+ int platSequenceId = _sequenceId;
+ int platId = _id;
+ int platSequenceDatNum = _sequenceDatNum;
+
+ for (int index = 0; index < _walkNodesCount; ++index) {
+ _walkNodes[index]._id = index + 20 * _walkNodes[index]._gridY1;
+ if (_walkNodes[index]._deltaX == 1 && _walkNodes[index]._deltaY == 0) {
+ if (index % 2) {
+ _vm->_gameSys->insertSequence(makeRid(datNum, 0x7CD), _walkNodes[index]._id,
+ makeRid(platSequenceDatNum, platSequenceId), platId,
+ kSeqScale | kSeqSyncWait, 0, 75 * _walkNodes[index]._gridX1 - _gridX, 48 * _walkNodes[index]._gridY1 - _gridY);
+ _walkNodes[index]._sequenceId = 0x7CD;
+ platSequenceId = 0x7CD;
+ } else {
+ _vm->_gameSys->insertSequence(makeRid(datNum, 0x7CE), _walkNodes[index]._id,
+ makeRid(platSequenceDatNum, platSequenceId), platId,
+ kSeqScale | kSeqSyncWait, 0, 75 * _walkNodes[index]._gridX1 - _gridX, 48 * _walkNodes[index]._gridY1 - _gridY);
+ _walkNodes[index]._sequenceId = 0x7CE;
+ platSequenceId = 0x7CE;
+ }
+ } else if (_walkNodes[index]._deltaX == -1 && _walkNodes[index]._deltaY == 0) {
+ if (index % 2) {
+ _vm->_gameSys->insertSequence(makeRid(datNum, 0x7CF), _walkNodes[index]._id,
+ makeRid(platSequenceDatNum, platSequenceId), platId,
+ kSeqScale | kSeqSyncWait, 0, 75 * _walkNodes[index]._gridX1 - _gridX, 48 * _walkNodes[index]._gridY1 - _gridY);
+ _walkNodes[index]._sequenceId = 0x7CF;
+ platSequenceId = 0x7CF;
+ } else {
+ _vm->_gameSys->insertSequence(makeRid(datNum, 0x7D0), _walkNodes[index]._id,
+ makeRid(platSequenceDatNum, platSequenceId), platId,
+ kSeqScale | kSeqSyncWait, 0, 75 * _walkNodes[index]._gridX1 - _gridX, 48 * _walkNodes[index]._gridY1 - _gridY);
+ _walkNodes[index]._sequenceId = 0x7D0;
+ platSequenceId = 0x7D0;
+ }
+ } else {
+ if (_walkNodes[index]._deltaY == -1)
+ _walkNodes[index]._id -= 10;
+ else
+ _walkNodes[index]._id += 10;
+ int newSequenceId = getWalkSequenceId(_walkNodes[index]._deltaX, _walkNodes[index]._deltaY);
+ _vm->_gameSys->insertSequence(makeRid(datNum, newSequenceId), _walkNodes[index]._id,
+ makeRid(platSequenceDatNum, platSequenceId), platId,
+ kSeqScale | kSeqSyncWait, 0, 75 * _walkNodes[index]._gridX1 - _gridX, 48 * _walkNodes[index]._gridY1 - _gridY);
+ _walkNodes[index]._sequenceId = newSequenceId;
+ platSequenceId = newSequenceId;
+ }
+ platId = _walkNodes[index]._id;
+ platSequenceDatNum = datNum;
+ }
+
+ if (flags & 8) {
+ if (_walkNodesCount > 0) {
+ _sequenceId = platSequenceId;
+ _id = platId;
+ _sequenceDatNum = datNum;
+ // CHECKME Not sure if this is correct...
+ if (_walkNodes[_walkNodesCount - 1]._deltaX > 0)
+ _idleFacing = kDirNone;
+ else if (_walkNodes[_walkNodesCount - 1]._deltaX < 0)
+ _idleFacing = kDirUnk4;
+ else if (_walkNodes[_walkNodesCount - 1]._gridX1 % 2)
+ _idleFacing = kDirUnk4;
+ else
+ _idleFacing = kDirNone;
+ if (animationIndex >= 0)
+ _vm->_gameSys->setAnimation(makeRid(_sequenceDatNum, _sequenceId), _id, animationIndex);
+ } else if (animationIndex >= 0) {
+ _vm->_gameSys->setAnimation(0x107D3, 1, animationIndex);
+ _vm->_gameSys->insertSequence(0x107D3, 1, 0, 0, kSeqNone, 0, 0, 0);
+ }
+ } else {
+ if (sequenceId >= 0 && sequenceId != -1) {
+ _sequenceId = ridToEntryIndex(sequenceId);
+ _sequenceDatNum = ridToDatIndex(sequenceId);
+ if (_sequenceId == 0x7C2) {
+ _idleFacing = kDirNone;
+ } else if (_sequenceId == 0x7D2) {
+ _idleFacing = kDirUnk4;
+ }
+ } else {
+ if (_walkNodesCount > 0) {
+ if (_walkNodes[_walkNodesCount - 1]._deltaX > 0) {
+ _sequenceId = 0x7C2;
+ _idleFacing = kDirNone;
+ } else if (_walkNodes[_walkNodesCount - 1]._deltaX < 0) {
+ _sequenceId = 0x7D2;
+ _idleFacing = kDirUnk4;
+ } else if (_walkNodes[0]._deltaX > 0) {
+ _sequenceId = 0x7C2;
+ _idleFacing = kDirNone;
+ } else if (_walkNodes[0]._deltaX < 0) {
+ _sequenceId = 0x7D2;
+ _idleFacing = kDirUnk4;
+ } else {
+ _sequenceId = 0x7D2;
+ _idleFacing = kDirUnk4;
+ }
+ } else if (_idleFacing != kDirNone) {
+ _sequenceId = 0x7D2;
+ } else {
+ _sequenceId = 0x7C2;
+ }
+ _sequenceDatNum = datNum;
+ }
+
+ if (animationIndex < 0) {
+ _id = 20 * _walkDestY;
+ } else {
+ _id = animationIndex + 20 * _walkDestY;
+ _vm->_gameSys->setAnimation(makeRid(_sequenceDatNum, _sequenceId), animationIndex + 20 * _walkDestY, animationIndex);
+ }
+
+ if (flags & 4)
+ _vm->_gameSys->insertSequence(makeRid(_sequenceDatNum, _sequenceId), _id,
+ makeRid(platSequenceDatNum, platSequenceId), platId,
+ 9, 0, 0, 0);
+ else
+ _vm->_gameSys->insertSequence(makeRid(_sequenceDatNum, _sequenceId), _id,
+ makeRid(platSequenceDatNum, platSequenceId), platId,
+ 9, 0, 75 * _walkDestX - _gridX, 48 * _walkDestY - _gridY);
+ }
+
+ _pos = Common::Point(_walkDestX, _walkDestY);
+
+ return done;
+}
} // End of namespace Gnap
diff --git a/engines/gnap/character.h b/engines/gnap/character.h
index ddfc7190e6..c36b0a2295 100644
--- a/engines/gnap/character.h
+++ b/engines/gnap/character.h
@@ -36,17 +36,29 @@ enum Facing {
kDirUpRight = 7
};
+struct GridStruct {
+ int _deltaX, _deltaY;
+ int _gridX1, _gridY1;
+ int _sequenceId;
+ int _id;
+};
+
+const int kMaxGridStructs = 30;
+
class Character {
public:
Character(GnapEngine *vm);
~Character();
+ void walkStep();
+
virtual int getSequenceId(int kind, int gridX, int gridY) = 0;
virtual void playSequence(int sequenceId) = 0;
virtual void updateIdleSequence() = 0;
virtual void updateIdleSequence2() = 0;
virtual void initPos(int gridX, int gridY, Facing facing) = 0;
virtual int getWalkSequenceId(int deltaX, int deltaY) = 0;
+ virtual bool walkTo(Common::Point gridPos, int animationIndex, int sequenceId, int flags) = 0;
Common::Point _pos;
Facing _idleFacing;
@@ -56,6 +68,10 @@ public:
int _id;
int _gridX;
int _gridY;
+ int _walkNodesCount;
+ GridStruct _walkNodes[kMaxGridStructs];
+ int _walkDestX, _walkDestY;
+ int _walkDeltaX, _walkDeltaY, _walkDirX, _walkDirY, _walkDirXIncr, _walkDirYIncr;
protected:
GnapEngine *_vm;
@@ -70,6 +86,7 @@ public:
virtual void updateIdleSequence();
virtual void updateIdleSequence2();
virtual int getWalkSequenceId(int deltaX, int deltaY);
+ virtual bool walkTo(Common::Point gridPos, int animationIndex, int sequenceId, int flags);
void initBrainPulseRndValue();
void kissPlatypus(int callback);
@@ -78,6 +95,12 @@ public:
int _brainPulseNum;
int _brainPulseRndValue;
+
+private:
+ bool findPath1(int gridX, int gridY, int index);
+ bool findPath2(int gridX, int gridY, int index);
+ bool findPath3(int gridX, int gridY);
+ bool findPath4(int gridX, int gridY);
};
class PlayerPlat : public Character {
@@ -89,6 +112,13 @@ public:
virtual void updateIdleSequence();
virtual void updateIdleSequence2();
virtual int getWalkSequenceId(int deltaX, int deltaY);
+ virtual bool walkTo(Common::Point gridPos, int animationIndex, int sequenceId, int flags);
+
+private:
+ bool findPath1(int gridX, int gridY, int index);
+ bool findPath2(int gridX, int gridY, int index);
+ bool findPath3(int gridX, int gridY);
+ bool findPath4(int gridX, int gridY);
};
} // End of namespace Gnap
diff --git a/engines/gnap/gnap.cpp b/engines/gnap/gnap.cpp
index 9f1ae26150..42d5277dc6 100644
--- a/engines/gnap/gnap.cpp
+++ b/engines/gnap/gnap.cpp
@@ -1189,7 +1189,7 @@ void GnapEngine::playGnapShowItem(int itemIndex, int gridLookX, int gridLookY) {
void GnapEngine::playGnapShowCurrItem(int gridX, int gridY, int gridLookX, int gridLookY) {
if (_plat->_pos.x == gridX && _plat->_pos.y == gridY)
platypusMakeRoom();
- gnapWalkTo(Common::Point(gridX, gridY), -1, -1, 1);
+ _gnap->walkTo(Common::Point(gridX, gridY), -1, -1, 1);
playGnapShowItem(_grabCursorSpriteIndex, gridLookX, gridLookY);
}
@@ -1199,8 +1199,8 @@ bool GnapEngine::testWalk(int animationIndex, int someStatus, int gridX1, int gr
_gameSys->setAnimation(0, 0, animationIndex);
_gnap->_actionStatus = -1;
_plat->_actionStatus = -1;
- gnapWalkTo(Common::Point(gridX1, gridY1), -1, -1, 1);
- platypusWalkTo(Common::Point(gridX2, gridY2), -1, -1, 1);
+ _gnap->walkTo(Common::Point(gridX1, gridY1), -1, -1, 1);
+ _plat->walkTo(Common::Point(gridX2, gridY2), -1, -1, 1);
_mouseClickState._left = false;
return true;
}
@@ -1224,12 +1224,12 @@ bool GnapEngine::gnapPlatypusAction(int gridX, int gridY, int platSequenceId, in
_gnap->_actionStatus = 100;
Common::Point checkPt = _plat->_pos + Common::Point(gridX, gridY);
if (isPointBlocked(checkPt) && (_gnap->_pos != checkPt)) {
- platypusWalkStep();
+ _plat->walkStep();
checkPt = _plat->_pos + Common::Point(gridX, gridY);
}
if (!isPointBlocked(checkPt) && (_gnap->_pos != checkPt)) {
- gnapWalkTo(checkPt, 0, 0x107B9, 1);
+ _gnap->walkTo(checkPt, 0, 0x107B9, 1);
while (_gameSys->getAnimationStatus(0) != 2) {
updateMouseCursor();
doCallback(callback);
diff --git a/engines/gnap/gnap.h b/engines/gnap/gnap.h
index 59326b0511..db9368d98d 100644
--- a/engines/gnap/gnap.h
+++ b/engines/gnap/gnap.h
@@ -75,14 +75,6 @@ struct Hotspot {
}
};
-struct GridStruct {
- int _deltaX, _deltaY;
- int _gridX1, _gridY1;
- int _sequenceId;
- int _id;
-};
-
-const int kMaxGridStructs = 30;
const int kMaxTimers = 10;
enum GnapDebugChannels {
@@ -483,32 +475,10 @@ public:
bool testWalk(int animationIndex, int someStatus, int gridX1, int gridY1, int gridX2, int gridY2);
// Gnap walking
- int _gnapWalkNodesCount;
- GridStruct _gnapWalkNodes[kMaxGridStructs];
- int _gnapWalkDestX, _gnapWalkDestY;
- int _gnapWalkDeltaX, _gnapWalkDeltaY, _gnapWalkDirX, _gnapWalkDirY, _gnapWalkDirXIncr, _gnapWalkDirYIncr;
-
int getGnapWalkStopSequenceId(int deltaX, int deltaY);
Facing getGnapWalkFacing(int deltaX, int deltaY);
- bool gnapFindPath1(int gridX, int gridY, int index);
- bool gnapFindPath2(int gridX, int gridY, int index);
- bool gnapFindPath3(int gridX, int gridY);
- bool gnapFindPath4(int gridX, int gridY);
- bool gnapWalkTo(Common::Point gridPos, int animationIndex, int sequenceId, int flags);
- void gnapWalkStep();
// Platypus walking
- int _platWalkNodesCount;
- GridStruct _platWalkNodes[kMaxGridStructs];
- int _platWalkDestX, _platWalkDestY;
- int _platWalkDeltaX, _platWalkDeltaY, _platWalkDirX, _platWalkDirY, _platWalkDirXIncr, _platWalkDirYIncr;
-
- bool platFindPath1(int gridX, int gridY, int index);
- bool platFindPath2(int gridX, int gridY, int index);
- bool platFindPath3(int gridX, int gridY);
- bool platFindPath4(int gridX, int gridY);
- bool platypusWalkTo(Common::Point gridPos, int animationIndex, int sequenceId, int flags);
- void platypusWalkStep();
void platypusMakeRoom();
// Gnap
diff --git a/engines/gnap/grid.cpp b/engines/gnap/grid.cpp
index 568fe2520e..d4aed8dbc0 100644
--- a/engines/gnap/grid.cpp
+++ b/engines/gnap/grid.cpp
@@ -81,176 +81,81 @@ bool GnapEngine::isPointBlocked(int gridX, int gridY) {
}
return false;
-
}
-bool GnapEngine::gnapFindPath4(int gridX, int gridY) {
- bool result = false;
-
- _gnapWalkNodesCount = 0;
- _gnapWalkDirXIncr = 0;
- _gnapWalkDirYIncr = 0;
- _gnapWalkDeltaX = ABS(_gnapWalkDestX - gridX);
- _gnapWalkDeltaY = ABS(_gnapWalkDestY - gridY);
-
- if (_gnapWalkDeltaX)
- _gnapWalkDirX = (_gnapWalkDestX - gridX) / _gnapWalkDeltaX;
- else
- _gnapWalkDirX = 0;
-
- if (_gnapWalkDeltaY)
- _gnapWalkDirY = (_gnapWalkDestY - gridY) / _gnapWalkDeltaY;
- else
- _gnapWalkDirY = 0;
-
- while (_gnapWalkDirXIncr < _gnapWalkDeltaX && _gnapWalkDirYIncr < _gnapWalkDeltaY) {
- _gnapWalkNodes[_gnapWalkNodesCount]._gridX1 = gridX + _gnapWalkDirX * _gnapWalkDirXIncr;
- _gnapWalkNodes[_gnapWalkNodesCount]._gridY1 = gridY + _gnapWalkDirY * _gnapWalkDirYIncr;
- if (!isPointBlocked(_gnapWalkDirX + _gnapWalkNodes[_gnapWalkNodesCount]._gridX1, _gnapWalkDirY + _gnapWalkNodes[_gnapWalkNodesCount]._gridY1)) {
- _gnapWalkNodes[_gnapWalkNodesCount]._deltaX = _gnapWalkDirX;
- _gnapWalkNodes[_gnapWalkNodesCount]._deltaY = _gnapWalkDirY;
- ++_gnapWalkDirXIncr;
- ++_gnapWalkDirYIncr;
- } else if (_gnapWalkDeltaY - _gnapWalkDirYIncr > _gnapWalkDeltaX - _gnapWalkDirXIncr) {
- if (!isPointBlocked(_gnapWalkNodes[_gnapWalkNodesCount]._gridX1, _gnapWalkDirY + _gnapWalkNodes[_gnapWalkNodesCount]._gridY1)) {
- _gnapWalkNodes[_gnapWalkNodesCount]._deltaX = 0;
- _gnapWalkNodes[_gnapWalkNodesCount]._deltaY = _gnapWalkDirY;
- ++_gnapWalkDirYIncr;
- } else if (!isPointBlocked(_gnapWalkDirX + _gnapWalkNodes[_gnapWalkNodesCount]._gridX1, _gnapWalkNodes[_gnapWalkNodesCount]._gridY1)) {
- _gnapWalkNodes[_gnapWalkNodesCount]._deltaX = _gnapWalkDirX;
- _gnapWalkNodes[_gnapWalkNodesCount]._deltaY = 0;
- ++_gnapWalkDirXIncr;
- } else {
- _gnapWalkDeltaX = _gnapWalkDirXIncr;
- _gnapWalkDeltaY = _gnapWalkDirYIncr;
- --_gnapWalkNodesCount;
- }
- } else {
- if (!isPointBlocked(_gnapWalkDirX + _gnapWalkNodes[_gnapWalkNodesCount]._gridX1, _gnapWalkNodes[_gnapWalkNodesCount]._gridY1)) {
- _gnapWalkNodes[_gnapWalkNodesCount]._deltaX = _gnapWalkDirX;
- _gnapWalkNodes[_gnapWalkNodesCount]._deltaY = 0;
- ++_gnapWalkDirXIncr;
- } else if (!isPointBlocked(_gnapWalkNodes[_gnapWalkNodesCount]._gridX1, _gnapWalkDirY + _gnapWalkNodes[_gnapWalkNodesCount]._gridY1)) {
- _gnapWalkNodes[_gnapWalkNodesCount]._deltaX = 0;
- _gnapWalkNodes[_gnapWalkNodesCount]._deltaY = _gnapWalkDirY;
- ++_gnapWalkDirYIncr;
- } else {
- _gnapWalkDeltaX = _gnapWalkDirXIncr;
- _gnapWalkDeltaY = _gnapWalkDirYIncr;
- --_gnapWalkNodesCount;
- }
- }
- ++_gnapWalkNodesCount;
- }
-
- while (_gnapWalkDirXIncr < _gnapWalkDeltaX) {
- _gnapWalkNodes[_gnapWalkNodesCount]._gridX1 = gridX + _gnapWalkDirX * _gnapWalkDirXIncr;
- _gnapWalkNodes[_gnapWalkNodesCount]._gridY1 = _gnapWalkDestY;
- if (!isPointBlocked(_gnapWalkDirX + _gnapWalkNodes[_gnapWalkNodesCount]._gridX1, _gnapWalkDestY)) {
- _gnapWalkNodes[_gnapWalkNodesCount]._deltaX = _gnapWalkDirX;
- _gnapWalkNodes[_gnapWalkNodesCount]._deltaY = 0;
- ++_gnapWalkDirXIncr;
- ++_gnapWalkNodesCount;
- } else {
- _gnapWalkDeltaX = _gnapWalkDirXIncr;
- }
- }
-
- while (_gnapWalkDirYIncr < _gnapWalkDeltaY) {
- _gnapWalkNodes[_gnapWalkNodesCount]._gridX1 = _gnapWalkDestX;
- _gnapWalkNodes[_gnapWalkNodesCount]._gridY1 = gridY + _gnapWalkDirY * _gnapWalkDirYIncr;
- if (!isPointBlocked(_gnapWalkDestX, _gnapWalkDirY + _gnapWalkNodes[_gnapWalkNodesCount]._gridY1)) {
- _gnapWalkNodes[_gnapWalkNodesCount]._deltaX = 0;
- _gnapWalkNodes[_gnapWalkNodesCount]._deltaY = _gnapWalkDirY;
- ++_gnapWalkDirYIncr;
- ++_gnapWalkNodesCount;
- } else {
- _gnapWalkDeltaY = _gnapWalkDirYIncr;
- }
- }
-
- if (gridX + _gnapWalkDirX * _gnapWalkDirXIncr != _gnapWalkDestX || gridY + _gnapWalkDirY * _gnapWalkDirYIncr != _gnapWalkDestY) {
- _gnapWalkDestX = gridX + _gnapWalkDirX * _gnapWalkDirXIncr;
- _gnapWalkDestY = gridY + _gnapWalkDirY * _gnapWalkDirYIncr;
- result = false;
- } else {
- result = true;
- }
+/******************************************************************************/
- return result;
-}
+bool PlayerGnap::findPath1(int gridX, int gridY, int index) {
+ _walkNodesCount = index;
+ _walkDirXIncr = 0;
+ _walkDirYIncr = 0;
+ _walkDeltaX = ABS(_walkDestX - gridX);
+ _walkDeltaY = ABS(_walkDestY - gridY);
-bool GnapEngine::gnapFindPath1(int gridX, int gridY, int index) {
- _gnapWalkNodesCount = index;
- _gnapWalkDirXIncr = 0;
- _gnapWalkDirYIncr = 0;
- _gnapWalkDeltaX = ABS(_gnapWalkDestX - gridX);
- _gnapWalkDeltaY = ABS(_gnapWalkDestY - gridY);
-
- if (_gnapWalkDeltaX)
- _gnapWalkDirX = (_gnapWalkDestX - gridX) / _gnapWalkDeltaX;
+ if (_walkDeltaX)
+ _walkDirX = (_walkDestX - gridX) / _walkDeltaX;
else
- _gnapWalkDirX = 0;
+ _walkDirX = 0;
- if (_gnapWalkDeltaY)
- _gnapWalkDirY = (_gnapWalkDestY - gridY) / _gnapWalkDeltaY;
+ if (_walkDeltaY)
+ _walkDirY = (_walkDestY - gridY) / _walkDeltaY;
else
- _gnapWalkDirY = 0;
-
- while (_gnapWalkDirXIncr < _gnapWalkDeltaX && _gnapWalkDirYIncr < _gnapWalkDeltaY) {
- _gnapWalkNodes[_gnapWalkNodesCount]._gridX1 = gridX + _gnapWalkDirX * _gnapWalkDirXIncr;
- _gnapWalkNodes[_gnapWalkNodesCount]._gridY1 = gridY + _gnapWalkDirY * _gnapWalkDirYIncr;
- if (!isPointBlocked(_gnapWalkDirX + _gnapWalkNodes[_gnapWalkNodesCount]._gridX1, _gnapWalkDirY + _gnapWalkNodes[_gnapWalkNodesCount]._gridY1)) {
- _gnapWalkNodes[_gnapWalkNodesCount]._deltaX = _gnapWalkDirX;
- _gnapWalkNodes[_gnapWalkNodesCount]._deltaY = _gnapWalkDirY;
- ++_gnapWalkDirXIncr;
- ++_gnapWalkDirYIncr;
- } else if (_gnapWalkDeltaY - _gnapWalkDirYIncr > _gnapWalkDeltaX - _gnapWalkDirXIncr) {
- if (!isPointBlocked(_gnapWalkNodes[_gnapWalkNodesCount]._gridX1, _gnapWalkDirY + _gnapWalkNodes[_gnapWalkNodesCount]._gridY1)) {
- _gnapWalkNodes[_gnapWalkNodesCount]._deltaX = 0;
- _gnapWalkNodes[_gnapWalkNodesCount]._deltaY = _gnapWalkDirY;
- ++_gnapWalkDirYIncr;
- } else if (!isPointBlocked(_gnapWalkDirX + _gnapWalkNodes[_gnapWalkNodesCount]._gridX1, _gnapWalkNodes[_gnapWalkNodesCount]._gridY1)) {
- _gnapWalkNodes[_gnapWalkNodesCount]._deltaX = _gnapWalkDirX;
- _gnapWalkNodes[_gnapWalkNodesCount]._deltaY = 0;
- ++_gnapWalkDirXIncr;
+ _walkDirY = 0;
+
+ while (_walkDirXIncr < _walkDeltaX && _walkDirYIncr < _walkDeltaY) {
+ _walkNodes[_walkNodesCount]._gridX1 = gridX + _walkDirX * _walkDirXIncr;
+ _walkNodes[_walkNodesCount]._gridY1 = gridY + _walkDirY * _walkDirYIncr;
+ if (!_vm->isPointBlocked(_walkDirX + _walkNodes[_walkNodesCount]._gridX1, _walkDirY + _walkNodes[_walkNodesCount]._gridY1)) {
+ _walkNodes[_walkNodesCount]._deltaX = _walkDirX;
+ _walkNodes[_walkNodesCount]._deltaY = _walkDirY;
+ ++_walkDirXIncr;
+ ++_walkDirYIncr;
+ } else if (_walkDeltaY - _walkDirYIncr > _walkDeltaX - _walkDirXIncr) {
+ if (!_vm->isPointBlocked(_walkNodes[_walkNodesCount]._gridX1, _walkDirY + _walkNodes[_walkNodesCount]._gridY1)) {
+ _walkNodes[_walkNodesCount]._deltaX = 0;
+ _walkNodes[_walkNodesCount]._deltaY = _walkDirY;
+ ++_walkDirYIncr;
+ } else if (!_vm->isPointBlocked(_walkDirX + _walkNodes[_walkNodesCount]._gridX1, _walkNodes[_walkNodesCount]._gridY1)) {
+ _walkNodes[_walkNodesCount]._deltaX = _walkDirX;
+ _walkNodes[_walkNodesCount]._deltaY = 0;
+ ++_walkDirXIncr;
} else
return false;
} else {
- if (!isPointBlocked(_gnapWalkDirX + _gnapWalkNodes[_gnapWalkNodesCount]._gridX1, _gnapWalkNodes[_gnapWalkNodesCount]._gridY1)) {
- _gnapWalkNodes[_gnapWalkNodesCount]._deltaX = _gnapWalkDirX;
- _gnapWalkNodes[_gnapWalkNodesCount]._deltaY = 0;
- ++_gnapWalkDirXIncr;
- } else if (!isPointBlocked(_gnapWalkNodes[_gnapWalkNodesCount]._gridX1, _gnapWalkDirY + _gnapWalkNodes[_gnapWalkNodesCount]._gridY1)) {
- _gnapWalkNodes[_gnapWalkNodesCount]._deltaX = 0;
- _gnapWalkNodes[_gnapWalkNodesCount]._deltaY = _gnapWalkDirY;
- ++_gnapWalkDirYIncr;
+ if (!_vm->isPointBlocked(_walkDirX + _walkNodes[_walkNodesCount]._gridX1, _walkNodes[_walkNodesCount]._gridY1)) {
+ _walkNodes[_walkNodesCount]._deltaX = _walkDirX;
+ _walkNodes[_walkNodesCount]._deltaY = 0;
+ ++_walkDirXIncr;
+ } else if (!_vm->isPointBlocked(_walkNodes[_walkNodesCount]._gridX1, _walkDirY + _walkNodes[_walkNodesCount]._gridY1)) {
+ _walkNodes[_walkNodesCount]._deltaX = 0;
+ _walkNodes[_walkNodesCount]._deltaY = _walkDirY;
+ ++_walkDirYIncr;
} else
return false;
}
- ++_gnapWalkNodesCount;
+ ++_walkNodesCount;
}
- while (_gnapWalkDirXIncr < _gnapWalkDeltaX) {
- _gnapWalkNodes[_gnapWalkNodesCount]._gridX1 = gridX + _gnapWalkDirX * _gnapWalkDirXIncr;
- _gnapWalkNodes[_gnapWalkNodesCount]._gridY1 = _gnapWalkDestY;
- if (!isPointBlocked(_gnapWalkDirX + _gnapWalkNodes[_gnapWalkNodesCount]._gridX1, _gnapWalkDestY)) {
- _gnapWalkNodes[_gnapWalkNodesCount]._deltaX = _gnapWalkDirX;
- _gnapWalkNodes[_gnapWalkNodesCount]._deltaY = 0;
- ++_gnapWalkDirXIncr;
- ++_gnapWalkNodesCount;
+ while (_walkDirXIncr < _walkDeltaX) {
+ _walkNodes[_walkNodesCount]._gridX1 = gridX + _walkDirX * _walkDirXIncr;
+ _walkNodes[_walkNodesCount]._gridY1 = _walkDestY;
+ if (!_vm->isPointBlocked(_walkDirX + _walkNodes[_walkNodesCount]._gridX1, _walkDestY)) {
+ _walkNodes[_walkNodesCount]._deltaX = _walkDirX;
+ _walkNodes[_walkNodesCount]._deltaY = 0;
+ ++_walkDirXIncr;
+ ++_walkNodesCount;
} else
return false;
}
- while (_gnapWalkDirYIncr < _gnapWalkDeltaY) {
- _gnapWalkNodes[_gnapWalkNodesCount]._gridX1 = _gnapWalkDestX;
- _gnapWalkNodes[_gnapWalkNodesCount]._gridY1 = gridY + _gnapWalkDirY * _gnapWalkDirYIncr;
- if (!isPointBlocked(_gnapWalkDestX, _gnapWalkDirY + _gnapWalkNodes[_gnapWalkNodesCount]._gridY1)) {
- _gnapWalkNodes[_gnapWalkNodesCount]._deltaX = 0;
- _gnapWalkNodes[_gnapWalkNodesCount]._deltaY = _gnapWalkDirY;
- ++_gnapWalkDirYIncr;
- ++_gnapWalkNodesCount;
+ while (_walkDirYIncr < _walkDeltaY) {
+ _walkNodes[_walkNodesCount]._gridX1 = _walkDestX;
+ _walkNodes[_walkNodesCount]._gridY1 = gridY + _walkDirY * _walkDirYIncr;
+ if (!_vm->isPointBlocked(_walkDestX, _walkDirY + _walkNodes[_walkNodesCount]._gridY1)) {
+ _walkNodes[_walkNodesCount]._deltaX = 0;
+ _walkNodes[_walkNodesCount]._deltaY = _walkDirY;
+ ++_walkDirYIncr;
+ ++_walkNodesCount;
} else
return false;
}
@@ -258,101 +163,101 @@ bool GnapEngine::gnapFindPath1(int gridX, int gridY, int index) {
return true;
}
-bool GnapEngine::gnapFindPath2(int gridX, int gridY, int index) {
- _gnapWalkNodesCount = index;
- _gnapWalkDirXIncr = 0;
- _gnapWalkDirYIncr = 0;
- _gnapWalkDeltaX = ABS(_gnapWalkDestX - gridX);
- _gnapWalkDeltaY = ABS(_gnapWalkDestY - gridY);
+bool PlayerGnap::findPath2(int gridX, int gridY, int index) {
+ _walkNodesCount = index;
+ _walkDirXIncr = 0;
+ _walkDirYIncr = 0;
+ _walkDeltaX = ABS(_walkDestX - gridX);
+ _walkDeltaY = ABS(_walkDestY - gridY);
- if (_gnapWalkDeltaX)
- _gnapWalkDirX = (_gnapWalkDestX - gridX) / _gnapWalkDeltaX;
+ if (_walkDeltaX)
+ _walkDirX = (_walkDestX - gridX) / _walkDeltaX;
else
- _gnapWalkDirX = 0;
+ _walkDirX = 0;
- if (_gnapWalkDeltaY)
- _gnapWalkDirY = (_gnapWalkDestY - gridY) / _gnapWalkDeltaY;
+ if (_walkDeltaY)
+ _walkDirY = (_walkDestY - gridY) / _walkDeltaY;
else
- _gnapWalkDirY = 0;
-
- while (_gnapWalkDeltaY < _gnapWalkDeltaX - _gnapWalkDirXIncr) {
- _gnapWalkNodes[_gnapWalkNodesCount]._gridX1 = gridX + _gnapWalkDirX * _gnapWalkDirXIncr;
- _gnapWalkNodes[_gnapWalkNodesCount]._gridY1 = gridY;
- if (!isPointBlocked(_gnapWalkDirX + _gnapWalkNodes[_gnapWalkNodesCount]._gridX1, gridY)) {
- _gnapWalkNodes[_gnapWalkNodesCount]._deltaX = _gnapWalkDirX;
- _gnapWalkNodes[_gnapWalkNodesCount]._deltaY = 0;
- ++_gnapWalkDirXIncr;
- ++_gnapWalkNodesCount;
+ _walkDirY = 0;
+
+ while (_walkDeltaY < _walkDeltaX - _walkDirXIncr) {
+ _walkNodes[_walkNodesCount]._gridX1 = gridX + _walkDirX * _walkDirXIncr;
+ _walkNodes[_walkNodesCount]._gridY1 = gridY;
+ if (!_vm->isPointBlocked(_walkDirX + _walkNodes[_walkNodesCount]._gridX1, gridY)) {
+ _walkNodes[_walkNodesCount]._deltaX = _walkDirX;
+ _walkNodes[_walkNodesCount]._deltaY = 0;
+ ++_walkDirXIncr;
+ ++_walkNodesCount;
} else
return false;
}
- while (_gnapWalkDeltaX < _gnapWalkDeltaY - _gnapWalkDirYIncr) {
- _gnapWalkNodes[_gnapWalkNodesCount]._gridX1 = gridX;
- _gnapWalkNodes[_gnapWalkNodesCount]._gridY1 = gridY + _gnapWalkDirY * _gnapWalkDirYIncr;
- if (!isPointBlocked(gridX, _gnapWalkDirY + _gnapWalkNodes[_gnapWalkNodesCount]._gridY1)) {
- _gnapWalkNodes[_gnapWalkNodesCount]._deltaX = 0;
- _gnapWalkNodes[_gnapWalkNodesCount]._deltaY = _gnapWalkDirY;
- ++_gnapWalkDirYIncr;
- ++_gnapWalkNodesCount;
+ while (_walkDeltaX < _walkDeltaY - _walkDirYIncr) {
+ _walkNodes[_walkNodesCount]._gridX1 = gridX;
+ _walkNodes[_walkNodesCount]._gridY1 = gridY + _walkDirY * _walkDirYIncr;
+ if (!_vm->isPointBlocked(gridX, _walkDirY + _walkNodes[_walkNodesCount]._gridY1)) {
+ _walkNodes[_walkNodesCount]._deltaX = 0;
+ _walkNodes[_walkNodesCount]._deltaY = _walkDirY;
+ ++_walkDirYIncr;
+ ++_walkNodesCount;
} else
return false;
}
- while (_gnapWalkDirXIncr < _gnapWalkDeltaX && _gnapWalkDirYIncr < _gnapWalkDeltaY) {
- _gnapWalkNodes[_gnapWalkNodesCount]._gridX1 = gridX + _gnapWalkDirX * _gnapWalkDirXIncr;
- _gnapWalkNodes[_gnapWalkNodesCount]._gridY1 = gridY + _gnapWalkDirY * _gnapWalkDirYIncr;
- if (!isPointBlocked(_gnapWalkDirX + _gnapWalkNodes[_gnapWalkNodesCount]._gridX1, _gnapWalkDirY + _gnapWalkNodes[_gnapWalkNodesCount]._gridY1)) {
- _gnapWalkNodes[_gnapWalkNodesCount]._deltaX = _gnapWalkDirX;
- _gnapWalkNodes[_gnapWalkNodesCount]._deltaY = _gnapWalkDirY;
- ++_gnapWalkDirXIncr;
- ++_gnapWalkDirYIncr;
- } else if (_gnapWalkDeltaY - _gnapWalkDirYIncr > _gnapWalkDeltaX - _gnapWalkDirXIncr) {
- if (!isPointBlocked(_gnapWalkNodes[_gnapWalkNodesCount]._gridX1, _gnapWalkDirY + _gnapWalkNodes[_gnapWalkNodesCount]._gridY1)) {
- _gnapWalkNodes[_gnapWalkNodesCount]._deltaX = 0;
- _gnapWalkNodes[_gnapWalkNodesCount]._deltaY = _gnapWalkDirY;
- ++_gnapWalkDirYIncr;
- } else if (!isPointBlocked(_gnapWalkDirX + _gnapWalkNodes[_gnapWalkNodesCount]._gridX1, _gnapWalkNodes[_gnapWalkNodesCount]._gridY1)) {
- _gnapWalkNodes[_gnapWalkNodesCount]._deltaX = _gnapWalkDirX;
- _gnapWalkNodes[_gnapWalkNodesCount]._deltaY = 0;
- ++_gnapWalkDirXIncr;
+ while (_walkDirXIncr < _walkDeltaX && _walkDirYIncr < _walkDeltaY) {
+ _walkNodes[_walkNodesCount]._gridX1 = gridX + _walkDirX * _walkDirXIncr;
+ _walkNodes[_walkNodesCount]._gridY1 = gridY + _walkDirY * _walkDirYIncr;
+ if (!_vm->isPointBlocked(_walkDirX + _walkNodes[_walkNodesCount]._gridX1, _walkDirY + _walkNodes[_walkNodesCount]._gridY1)) {
+ _walkNodes[_walkNodesCount]._deltaX = _walkDirX;
+ _walkNodes[_walkNodesCount]._deltaY = _walkDirY;
+ ++_walkDirXIncr;
+ ++_walkDirYIncr;
+ } else if (_walkDeltaY - _walkDirYIncr > _walkDeltaX - _walkDirXIncr) {
+ if (!_vm->isPointBlocked(_walkNodes[_walkNodesCount]._gridX1, _walkDirY + _walkNodes[_walkNodesCount]._gridY1)) {
+ _walkNodes[_walkNodesCount]._deltaX = 0;
+ _walkNodes[_walkNodesCount]._deltaY = _walkDirY;
+ ++_walkDirYIncr;
+ } else if (!_vm->isPointBlocked(_walkDirX + _walkNodes[_walkNodesCount]._gridX1, _walkNodes[_walkNodesCount]._gridY1)) {
+ _walkNodes[_walkNodesCount]._deltaX = _walkDirX;
+ _walkNodes[_walkNodesCount]._deltaY = 0;
+ ++_walkDirXIncr;
} else
return false;
} else {
- if (!isPointBlocked(_gnapWalkDirX + _gnapWalkNodes[_gnapWalkNodesCount]._gridX1, _gnapWalkNodes[_gnapWalkNodesCount]._gridY1)) {
- _gnapWalkNodes[_gnapWalkNodesCount]._deltaX = _gnapWalkDirX;
- _gnapWalkNodes[_gnapWalkNodesCount]._deltaY = 0;
- ++_gnapWalkDirXIncr;
- } else if (!isPointBlocked(_gnapWalkNodes[_gnapWalkNodesCount]._gridX1, _gnapWalkDirY + _gnapWalkNodes[_gnapWalkNodesCount]._gridY1)) {
- _gnapWalkNodes[_gnapWalkNodesCount]._deltaX = 0;
- _gnapWalkNodes[_gnapWalkNodesCount]._deltaY = _gnapWalkDirY;
- ++_gnapWalkDirYIncr;
+ if (!_vm->isPointBlocked(_walkDirX + _walkNodes[_walkNodesCount]._gridX1, _walkNodes[_walkNodesCount]._gridY1)) {
+ _walkNodes[_walkNodesCount]._deltaX = _walkDirX;
+ _walkNodes[_walkNodesCount]._deltaY = 0;
+ ++_walkDirXIncr;
+ } else if (!_vm->isPointBlocked(_walkNodes[_walkNodesCount]._gridX1, _walkDirY + _walkNodes[_walkNodesCount]._gridY1)) {
+ _walkNodes[_walkNodesCount]._deltaX = 0;
+ _walkNodes[_walkNodesCount]._deltaY = _walkDirY;
+ ++_walkDirYIncr;
} else
return false;
}
- ++_gnapWalkNodesCount;
+ ++_walkNodesCount;
}
- while (_gnapWalkDirXIncr < _gnapWalkDeltaX) {
- _gnapWalkNodes[_gnapWalkNodesCount]._gridX1 = gridX + _gnapWalkDirX * _gnapWalkDirXIncr;
- _gnapWalkNodes[_gnapWalkNodesCount]._gridY1 = _gnapWalkDestY;
- if (!isPointBlocked(_gnapWalkDirX + _gnapWalkNodes[_gnapWalkNodesCount]._gridX1, _gnapWalkDestY)) {
- _gnapWalkNodes[_gnapWalkNodesCount]._deltaX = _gnapWalkDirX;
- _gnapWalkNodes[_gnapWalkNodesCount]._deltaY = 0;
- ++_gnapWalkDirXIncr;
- ++_gnapWalkNodesCount;
+ while (_walkDirXIncr < _walkDeltaX) {
+ _walkNodes[_walkNodesCount]._gridX1 = gridX + _walkDirX * _walkDirXIncr;
+ _walkNodes[_walkNodesCount]._gridY1 = _walkDestY;
+ if (!_vm->isPointBlocked(_walkDirX + _walkNodes[_walkNodesCount]._gridX1, _walkDestY)) {
+ _walkNodes[_walkNodesCount]._deltaX = _walkDirX;
+ _walkNodes[_walkNodesCount]._deltaY = 0;
+ ++_walkDirXIncr;
+ ++_walkNodesCount;
} else
return false;
}
- while (_gnapWalkDirYIncr < _gnapWalkDeltaY) {
- _gnapWalkNodes[_gnapWalkNodesCount]._gridX1 = _gnapWalkDestX;
- _gnapWalkNodes[_gnapWalkNodesCount]._gridY1 = gridY + _gnapWalkDirY * _gnapWalkDirYIncr;
- if (!isPointBlocked(_gnapWalkDestX, _gnapWalkDirY + _gnapWalkNodes[_gnapWalkNodesCount]._gridY1)) {
- _gnapWalkNodes[_gnapWalkNodesCount]._deltaX = 0;
- _gnapWalkNodes[_gnapWalkNodesCount]._deltaY = _gnapWalkDirY;
- ++_gnapWalkDirYIncr;
- ++_gnapWalkNodesCount;
+ while (_walkDirYIncr < _walkDeltaY) {
+ _walkNodes[_walkNodesCount]._gridX1 = _walkDestX;
+ _walkNodes[_walkNodesCount]._gridY1 = gridY + _walkDirY * _walkDirYIncr;
+ if (!_vm->isPointBlocked(_walkDestX, _walkDirY + _walkNodes[_walkNodesCount]._gridY1)) {
+ _walkNodes[_walkNodesCount]._deltaX = 0;
+ _walkNodes[_walkNodesCount]._deltaY = _walkDirY;
+ ++_walkDirYIncr;
+ ++_walkNodesCount;
} else
return false;
}
@@ -360,167 +265,167 @@ bool GnapEngine::gnapFindPath2(int gridX, int gridY, int index) {
return true;
}
-bool GnapEngine::gnapFindPath3(int gridX, int gridY) {
+bool PlayerGnap::findPath3(int gridX, int gridY) {
int gridIncr = 1;
bool done = false;
- while (!done && gridIncr < _gridMaxX) {
- if (!isPointBlocked(gridX + gridIncr, gridY) && gnapFindPath1(gridX + gridIncr, gridY, gridIncr)) {
+ while (!done && gridIncr < _vm->_gridMaxX) {
+ if (!_vm->isPointBlocked(gridX + gridIncr, gridY) && findPath1(gridX + gridIncr, gridY, gridIncr)) {
for (int i = 0; i < gridIncr; ++i) {
- _gnapWalkNodes[i]._gridX1 = gridX + i;
- _gnapWalkNodes[i]._gridY1 = gridY;
- _gnapWalkNodes[i]._deltaX = 1;
- _gnapWalkNodes[i]._deltaY = 0;
+ _walkNodes[i]._gridX1 = gridX + i;
+ _walkNodes[i]._gridY1 = gridY;
+ _walkNodes[i]._deltaX = 1;
+ _walkNodes[i]._deltaY = 0;
}
done = true;
break;
}
- if (!isPointBlocked(gridX - gridIncr, gridY) && gnapFindPath1(gridX - gridIncr, gridY, gridIncr)) {
+ if (!_vm->isPointBlocked(gridX - gridIncr, gridY) && findPath1(gridX - gridIncr, gridY, gridIncr)) {
for (int i = 0; i < gridIncr; ++i) {
- _gnapWalkNodes[i]._gridX1 = gridX - i;
- _gnapWalkNodes[i]._gridY1 = gridY;
- _gnapWalkNodes[i]._deltaX = -1;
- _gnapWalkNodes[i]._deltaY = 0;
+ _walkNodes[i]._gridX1 = gridX - i;
+ _walkNodes[i]._gridY1 = gridY;
+ _walkNodes[i]._deltaX = -1;
+ _walkNodes[i]._deltaY = 0;
}
done = true;
break;
}
- if (!isPointBlocked(gridX, gridY + gridIncr) && gnapFindPath1(gridX, gridY + gridIncr, gridIncr)) {
+ if (!_vm->isPointBlocked(gridX, gridY + gridIncr) && findPath1(gridX, gridY + gridIncr, gridIncr)) {
for (int i = 0; i < gridIncr; ++i) {
- _gnapWalkNodes[i]._gridX1 = gridX;
- _gnapWalkNodes[i]._gridY1 = gridY + i;
- _gnapWalkNodes[i]._deltaX = 0;
- _gnapWalkNodes[i]._deltaY = 1;
+ _walkNodes[i]._gridX1 = gridX;
+ _walkNodes[i]._gridY1 = gridY + i;
+ _walkNodes[i]._deltaX = 0;
+ _walkNodes[i]._deltaY = 1;
}
done = true;
break;
}
- if (!isPointBlocked(gridX, gridY - gridIncr) && gnapFindPath1(gridX, gridY - gridIncr, gridIncr)) {
+ if (!_vm->isPointBlocked(gridX, gridY - gridIncr) && findPath1(gridX, gridY - gridIncr, gridIncr)) {
for (int i = 0; i < gridIncr; ++i) {
- _gnapWalkNodes[i]._gridX1 = gridX;
- _gnapWalkNodes[i]._gridY1 = gridY - i;
- _gnapWalkNodes[i]._deltaX = 0;
- _gnapWalkNodes[i]._deltaY = -1;
+ _walkNodes[i]._gridX1 = gridX;
+ _walkNodes[i]._gridY1 = gridY - i;
+ _walkNodes[i]._deltaX = 0;
+ _walkNodes[i]._deltaY = -1;
}
done = true;
break;
}
- if (!isPointBlocked(gridX + gridIncr, gridY + gridIncr) && gnapFindPath1(gridX + gridIncr, gridY + gridIncr, gridIncr)) {
+ if (!_vm->isPointBlocked(gridX + gridIncr, gridY + gridIncr) && findPath1(gridX + gridIncr, gridY + gridIncr, gridIncr)) {
for (int i = 0; i < gridIncr; ++i) {
- _gnapWalkNodes[i]._gridX1 = gridX + i;
- _gnapWalkNodes[i]._gridY1 = gridY + i;
- _gnapWalkNodes[i]._deltaX = 1;
- _gnapWalkNodes[i]._deltaY = 1;
+ _walkNodes[i]._gridX1 = gridX + i;
+ _walkNodes[i]._gridY1 = gridY + i;
+ _walkNodes[i]._deltaX = 1;
+ _walkNodes[i]._deltaY = 1;
}
done = true;
break;
}
- if (!isPointBlocked(gridX - gridIncr, gridY + gridIncr) && gnapFindPath1(gridX - gridIncr, gridY + gridIncr, gridIncr)) {
+ if (!_vm->isPointBlocked(gridX - gridIncr, gridY + gridIncr) && findPath1(gridX - gridIncr, gridY + gridIncr, gridIncr)) {
for (int i = 0; i < gridIncr; ++i) {
- _gnapWalkNodes[i]._gridX1 = gridX - i;
- _gnapWalkNodes[i]._gridY1 = gridY + i;
- _gnapWalkNodes[i]._deltaX = -1;
- _gnapWalkNodes[i]._deltaY = 1;
+ _walkNodes[i]._gridX1 = gridX - i;
+ _walkNodes[i]._gridY1 = gridY + i;
+ _walkNodes[i]._deltaX = -1;
+ _walkNodes[i]._deltaY = 1;
}
done = true;
break;
}
- if (!isPointBlocked(gridX + gridIncr, gridY - gridIncr) && gnapFindPath1(gridX + gridIncr, gridY - gridIncr, gridIncr)) {
+ if (!_vm->isPointBlocked(gridX + gridIncr, gridY - gridIncr) && findPath1(gridX + gridIncr, gridY - gridIncr, gridIncr)) {
for (int i = 0; i < gridIncr; ++i) {
- _gnapWalkNodes[i]._gridX1 = gridX + i;
- _gnapWalkNodes[i]._gridY1 = gridY - i;
- _gnapWalkNodes[i]._deltaX = 1;
- _gnapWalkNodes[i]._deltaY = -1;
+ _walkNodes[i]._gridX1 = gridX + i;
+ _walkNodes[i]._gridY1 = gridY - i;
+ _walkNodes[i]._deltaX = 1;
+ _walkNodes[i]._deltaY = -1;
}
done = true;
break;
}
- if (!isPointBlocked(gridX - gridIncr, gridY - gridIncr) && gnapFindPath1(gridX - gridIncr, gridY - gridIncr, gridIncr)) {
+ if (!_vm->isPointBlocked(gridX - gridIncr, gridY - gridIncr) && findPath1(gridX - gridIncr, gridY - gridIncr, gridIncr)) {
for (int i = 0; i < gridIncr; ++i) {
- _gnapWalkNodes[i]._gridX1 = gridX - i;
- _gnapWalkNodes[i]._gridY1 = gridY - i;
- _gnapWalkNodes[i]._deltaX = -1;
- _gnapWalkNodes[i]._deltaY = -1;
+ _walkNodes[i]._gridX1 = gridX - i;
+ _walkNodes[i]._gridY1 = gridY - i;
+ _walkNodes[i]._deltaX = -1;
+ _walkNodes[i]._deltaY = -1;
}
done = true;
break;
}
- if (!isPointBlocked(gridX + gridIncr, gridY) && gnapFindPath2(gridX + gridIncr, gridY, gridIncr)) {
+ if (!_vm->isPointBlocked(gridX + gridIncr, gridY) && findPath2(gridX + gridIncr, gridY, gridIncr)) {
for (int i = 0; i < gridIncr; ++i) {
- _gnapWalkNodes[i]._gridX1 = gridX + i;
- _gnapWalkNodes[i]._gridY1 = gridY;
- _gnapWalkNodes[i]._deltaX = 1;
- _gnapWalkNodes[i]._deltaY = 0;
+ _walkNodes[i]._gridX1 = gridX + i;
+ _walkNodes[i]._gridY1 = gridY;
+ _walkNodes[i]._deltaX = 1;
+ _walkNodes[i]._deltaY = 0;
}
done = true;
break;
}
- if (!isPointBlocked(gridX - gridIncr, gridY) && gnapFindPath2(gridX - gridIncr, gridY, gridIncr)) {
+ if (!_vm->isPointBlocked(gridX - gridIncr, gridY) && findPath2(gridX - gridIncr, gridY, gridIncr)) {
for (int i = 0; i < gridIncr; ++i) {
- _gnapWalkNodes[i]._gridX1 = gridX - i;
- _gnapWalkNodes[i]._gridY1 = gridY;
- _gnapWalkNodes[i]._deltaX = -1;
- _gnapWalkNodes[i]._deltaY = 0;
+ _walkNodes[i]._gridX1 = gridX - i;
+ _walkNodes[i]._gridY1 = gridY;
+ _walkNodes[i]._deltaX = -1;
+ _walkNodes[i]._deltaY = 0;
}
done = true;
break;
}
- if (!isPointBlocked(gridX, gridY + gridIncr) && gnapFindPath2(gridX, gridY + gridIncr, gridIncr)) {
+ if (!_vm->isPointBlocked(gridX, gridY + gridIncr) && findPath2(gridX, gridY + gridIncr, gridIncr)) {
for (int i = 0; i < gridIncr; ++i) {
- _gnapWalkNodes[i]._gridX1 = gridX;
- _gnapWalkNodes[i]._gridY1 = gridY + i;
- _gnapWalkNodes[i]._deltaX = 0;
- _gnapWalkNodes[i]._deltaY = 1;
+ _walkNodes[i]._gridX1 = gridX;
+ _walkNodes[i]._gridY1 = gridY + i;
+ _walkNodes[i]._deltaX = 0;
+ _walkNodes[i]._deltaY = 1;
}
done = true;
break;
}
- if (!isPointBlocked(gridX, gridY - gridIncr) && gnapFindPath2(gridX, gridY - gridIncr, gridIncr)) {
+ if (!_vm->isPointBlocked(gridX, gridY - gridIncr) && findPath2(gridX, gridY - gridIncr, gridIncr)) {
for (int i = 0; i < gridIncr; ++i) {
- _gnapWalkNodes[i]._gridX1 = gridX;
- _gnapWalkNodes[i]._gridY1 = gridY - i;
- _gnapWalkNodes[i]._deltaX = 0;
- _gnapWalkNodes[i]._deltaY = -1;
+ _walkNodes[i]._gridX1 = gridX;
+ _walkNodes[i]._gridY1 = gridY - i;
+ _walkNodes[i]._deltaX = 0;
+ _walkNodes[i]._deltaY = -1;
}
done = true;
break;
}
- if (!isPointBlocked(gridX + gridIncr, gridY + gridIncr) && gnapFindPath2(gridX + gridIncr, gridY + gridIncr, gridIncr)) {
+ if (!_vm->isPointBlocked(gridX + gridIncr, gridY + gridIncr) && findPath2(gridX + gridIncr, gridY + gridIncr, gridIncr)) {
for (int i = 0; i < gridIncr; ++i) {
- _gnapWalkNodes[i]._gridX1 = gridX + i;
- _gnapWalkNodes[i]._gridY1 = gridY + i;
- _gnapWalkNodes[i]._deltaX = 1;
- _gnapWalkNodes[i]._deltaY = 1;
+ _walkNodes[i]._gridX1 = gridX + i;
+ _walkNodes[i]._gridY1 = gridY + i;
+ _walkNodes[i]._deltaX = 1;
+ _walkNodes[i]._deltaY = 1;
}
done = true;
break;
}
- if (!isPointBlocked(gridX - gridIncr, gridY + gridIncr) && gnapFindPath2(gridX - gridIncr, gridY + gridIncr, gridIncr)) {
+ if (!_vm->isPointBlocked(gridX - gridIncr, gridY + gridIncr) && findPath2(gridX - gridIncr, gridY + gridIncr, gridIncr)) {
for (int i = 0; i < gridIncr; ++i) {
- _gnapWalkNodes[i]._gridX1 = gridX - i;
- _gnapWalkNodes[i]._gridY1 = gridY + i;
- _gnapWalkNodes[i]._deltaX = -1;
- _gnapWalkNodes[i]._deltaY = 1;
+ _walkNodes[i]._gridX1 = gridX - i;
+ _walkNodes[i]._gridY1 = gridY + i;
+ _walkNodes[i]._deltaX = -1;
+ _walkNodes[i]._deltaY = 1;
}
done = true;
break;
}
- if (!isPointBlocked(gridX + gridIncr, gridY - gridIncr) && gnapFindPath2(gridX + gridIncr, gridY - gridIncr, gridIncr)) {
+ if (!_vm->isPointBlocked(gridX + gridIncr, gridY - gridIncr) && findPath2(gridX + gridIncr, gridY - gridIncr, gridIncr)) {
for (int i = 0; i < gridIncr; ++i) {
- _gnapWalkNodes[i]._gridX1 = gridX + i;
- _gnapWalkNodes[i]._gridY1 = gridY - i;
- _gnapWalkNodes[i]._deltaX = 1;
- _gnapWalkNodes[i]._deltaY = -1;
+ _walkNodes[i]._gridX1 = gridX + i;
+ _walkNodes[i]._gridY1 = gridY - i;
+ _walkNodes[i]._deltaX = 1;
+ _walkNodes[i]._deltaY = -1;
}
done = true;
break;
}
- if (!isPointBlocked(gridX - gridIncr, gridY - gridIncr) && gnapFindPath2(gridX - gridIncr, gridY - gridIncr, gridIncr)) {
+ if (!_vm->isPointBlocked(gridX - gridIncr, gridY - gridIncr) && findPath2(gridX - gridIncr, gridY - gridIncr, gridIncr)) {
for (int i = 0; i < gridIncr; ++i) {
- _gnapWalkNodes[i]._gridX1 = gridX - i;
- _gnapWalkNodes[i]._gridY1 = gridY - i;
- _gnapWalkNodes[i]._deltaX = -1;
- _gnapWalkNodes[i]._deltaY = -1;
+ _walkNodes[i]._gridX1 = gridX - i;
+ _walkNodes[i]._gridY1 = gridY - i;
+ _walkNodes[i]._deltaX = -1;
+ _walkNodes[i]._deltaY = -1;
}
done = true;
break;
@@ -531,323 +436,94 @@ bool GnapEngine::gnapFindPath3(int gridX, int gridY) {
return done;
}
-bool GnapEngine::gnapWalkTo(Common::Point gridPos, int animationIndex, int sequenceId, int flags) {
- int datNum = flags & 3;
- bool done = false;
-
- _timers[2] = 200;
- _timers[3] = 300;
-
- int gridX = gridPos.x;
- if (gridX < 0)
- gridX = (_leftClickMouseX - _gridMinX + 37) / 75;
-
- int gridY = gridPos.y;
- if (gridY < 0)
- gridY = (_leftClickMouseY - _gridMinY + 24) / 48;
-
- _gnapWalkDestX = CLIP(gridX, 0, _gridMaxX - 1);
- _gnapWalkDestY = CLIP(gridY, 0, _gridMaxY - 1);
-
- if (animationIndex >= 0 && _gnapWalkDestX == _plat->_pos.x && _gnapWalkDestY == _plat->_pos.y)
- platypusMakeRoom();
-
- // TODO: Simplify the cascade of Ifs
- if (gnapFindPath1(_gnap->_pos.x, _gnap->_pos.y, 0))
- done = true;
-
- if (!done && gnapFindPath2(_gnap->_pos.x, _gnap->_pos.y, 0))
- done = true;
-
- if (!done && gnapFindPath3(_gnap->_pos.x, _gnap->_pos.y))
- done = true;
-
- if (!done && gnapFindPath4(_gnap->_pos.x, _gnap->_pos.y))
- done = true;
-
- gnapIdle();
-
- int gnapSequenceId = _gnap->_sequenceId;
- int gnapId = _gnap->_id;
- int gnapSequenceDatNum = _gnap->_sequenceDatNum;
-
- debugC(kDebugBasic, "_gnapWalkNodesCount: %d", _gnapWalkNodesCount);
-
- for (int index = 0; index < _gnapWalkNodesCount; ++index) {
- _gnapWalkNodes[index]._id = index + 20 * _gnapWalkNodes[index]._gridY1;
- if (_gnapWalkNodes[index]._deltaX == 1 && _gnapWalkNodes[index]._deltaY == 0) {
- if (index % 2) {
- _gameSys->insertSequence(makeRid(datNum, 0x7AB), _gnapWalkNodes[index]._id,
- makeRid(gnapSequenceDatNum, gnapSequenceId), gnapId,
- 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 - _gnap->_gridX, 48 * _gnapWalkNodes[index]._gridY1 - _gnap->_gridY);
- _gnapWalkNodes[index]._sequenceId = 0x7AC;
- gnapSequenceId = 0x7AC;
- }
- } else if (_gnapWalkNodes[index]._deltaX == -1 && _gnapWalkNodes[index]._deltaY == 0) {
- if (index % 2) {
- _gameSys->insertSequence(makeRid(datNum, 0x7AF), _gnapWalkNodes[index]._id,
- makeRid(gnapSequenceDatNum, gnapSequenceId), gnapId,
- 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 - _gnap->_gridX, 48 * _gnapWalkNodes[index]._gridY1 - _gnap->_gridY);
- _gnapWalkNodes[index]._sequenceId = 0x7B0;
- gnapSequenceId = 0x7B0;
- }
- } else {
- if (_gnapWalkNodes[index]._deltaY == -1)
- _gnapWalkNodes[index]._id -= 10;
- else
- _gnapWalkNodes[index]._id += 10;
- int newSequenceId = _gnap->getWalkSequenceId(_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 - _gnap->_gridX, 48 * _gnapWalkNodes[index]._gridY1 - _gnap->_gridY);
- _gnapWalkNodes[index]._sequenceId = newSequenceId;
- gnapSequenceId = newSequenceId;
- }
- gnapId = _gnapWalkNodes[index]._id;
- gnapSequenceDatNum = datNum;
- }
-
- if (flags & 8) {
- if (_gnapWalkNodesCount > 0) {
- _gnap->_sequenceId = gnapSequenceId;
- _gnap->_id = gnapId;
- _gnap->_idleFacing = getGnapWalkFacing(_gnapWalkNodes[_gnapWalkNodesCount - 1]._deltaX, _gnapWalkNodes[_gnapWalkNodesCount - 1]._deltaY);
- _gnap->_sequenceDatNum = datNum;
- if (animationIndex >= 0)
- _gameSys->setAnimation(makeRid(_gnap->_sequenceDatNum, _gnap->_sequenceId), _gnap->_id, animationIndex);
- } else if (animationIndex >= 0) {
- _gameSys->setAnimation(0x107D3, 1, animationIndex);
- _gameSys->insertSequence(0x107D3, 1, 0, 0, kSeqNone, 0, 0, 0);
- }
- } else {
- if (sequenceId >= 0 && sequenceId != -1) {
- _gnap->_sequenceId = ridToEntryIndex(sequenceId);
- _gnap->_sequenceDatNum = ridToDatIndex(sequenceId);
- if (_gnap->_sequenceId == 0x7B9) {
- _gnap->_idleFacing = kDirBottomRight;
- } else {
- switch (_gnap->_sequenceId) {
- case 0x7BA:
- _gnap->_idleFacing = kDirBottomLeft;
- break;
- case 0x7BB:
- _gnap->_idleFacing = kDirUpRight;
- break;
- case 0x7BC:
- _gnap->_idleFacing = kDirUpLeft;
- break;
- }
- }
- } else {
- if (_gnapWalkNodesCount > 0) {
- _gnap->_sequenceId = getGnapWalkStopSequenceId(_gnapWalkNodes[_gnapWalkNodesCount - 1]._deltaX, _gnapWalkNodes[_gnapWalkNodesCount - 1]._deltaY);
- _gnap->_idleFacing = getGnapWalkFacing(_gnapWalkNodes[_gnapWalkNodesCount - 1]._deltaX, _gnapWalkNodes[_gnapWalkNodesCount - 1]._deltaY);
- } else if (gridX >= 0 || gridY >= 0) {
- switch (_gnap->_idleFacing) {
- case kDirBottomRight:
- _gnap->_sequenceId = 0x7B9;
- break;
- case kDirBottomLeft:
- _gnap->_sequenceId = 0x7BA;
- break;
- case kDirUpRight:
- _gnap->_sequenceId = 0x7BB;
- break;
- default:
- _gnap->_sequenceId = 0x7BC;
- break;
- }
- } else {
- //TODO: simplify the checks by using v10 and v11
- int v10 = _leftClickMouseX - (_gridMinX + 75 * _gnap->_pos.x);
- int v11 = _leftClickMouseY - (_gridMinY + 48 * _gnap->_pos.y);
- if (_leftClickMouseX == _gridMinX + 75 * _gnap->_pos.x)
- ++v10;
- if (_leftClickMouseY == _gridMinY + 48 * _gnap->_pos.y)
- v11 = 1;
- _gnap->_sequenceId = getGnapWalkStopSequenceId(v10 / abs(v10), v11 / abs(v11));
- _gnap->_idleFacing = getGnapWalkFacing(v10 / abs(v10), v11 / abs(v11));
- }
- _gnap->_sequenceDatNum = datNum;
- }
-
- if (animationIndex < 0) {
- _gnap->_id = 20 * _gnapWalkDestY + 1;
- } else {
- _gnap->_id = _gnapWalkNodesCount + animationIndex + 20 * _gnapWalkDestY;
- _gameSys->setAnimation(makeRid(_gnap->_sequenceDatNum, _gnap->_sequenceId), _gnapWalkNodesCount + animationIndex + 20 * _gnapWalkDestY, animationIndex);
- }
-
- if (flags & 4) {
- _gameSys->insertSequence(makeRid(_gnap->_sequenceDatNum, _gnap->_sequenceId), _gnap->_id,
- makeRid(gnapSequenceDatNum, gnapSequenceId), gnapId,
- kSeqScale | kSeqSyncWait, 0, 0, 0);
- } else {
- _gameSys->insertSequence(makeRid(_gnap->_sequenceDatNum, _gnap->_sequenceId), _gnap->_id,
- makeRid(gnapSequenceDatNum, gnapSequenceId), gnapId,
- kSeqScale | kSeqSyncWait, 0, 75 * _gnapWalkDestX - _gnap->_gridX, 48 * _gnapWalkDestY - _gnap->_gridY);
- }
- }
-
- _gnap->_pos = Common::Point(_gnapWalkDestX, _gnapWalkDestY);
-
- return done;
-}
-
-void GnapEngine::gnapWalkStep() {
- for (int i = 1; i < _gridMaxX; ++i) {
- Common::Point checkPt = Common::Point(_gnap->_pos.x + i, _gnap->_pos.y);
- if (!isPointBlocked(checkPt)) {
- gnapWalkTo(checkPt, -1, -1, 1);
- break;
- }
-
- checkPt = Common::Point(_gnap->_pos.x - i, _gnap->_pos.y);
- if (!isPointBlocked(checkPt)) {
- gnapWalkTo(checkPt, -1, -1, 1);
- break;
- }
-
- checkPt = Common::Point(_gnap->_pos.x, _gnap->_pos.y + 1);
- if (!isPointBlocked(checkPt)) {
- gnapWalkTo(checkPt, -1, -1, 1);
- break;
- }
-
- checkPt = Common::Point(_gnap->_pos.x, _gnap->_pos.y - 1);
- if (!isPointBlocked(checkPt)) {
- gnapWalkTo(checkPt, -1, -1, 1);
- break;
- }
-
- checkPt = Common::Point(_gnap->_pos.x + 1, _gnap->_pos.y + 1);
- if (!isPointBlocked(checkPt)) {
- gnapWalkTo(checkPt, -1, -1, 1);
- break;
- }
-
- checkPt = Common::Point(_gnap->_pos.x - 1, _gnap->_pos.y + 1);
- if (!isPointBlocked(checkPt)) {
- gnapWalkTo(checkPt, -1, -1, 1);
- break;
- }
-
- checkPt = Common::Point(_gnap->_pos.x + 1, _gnap->_pos.y - 1);
- if (!isPointBlocked(checkPt)) {
- gnapWalkTo(checkPt, -1, -1, 1);
- break;
- }
-
- checkPt = Common::Point(_gnap->_pos.x - 1, _gnap->_pos.y - 1);
- if (!isPointBlocked(checkPt)) {
- gnapWalkTo(checkPt, -1, -1, 1);
- break;
- }
- }
-}
-
-////////////////////////////////////////////////////////////////////////////////
-
-bool GnapEngine::platFindPath4(int gridX, int gridY) {
+bool PlayerGnap::findPath4(int gridX, int gridY) {
bool result = false;
- _platWalkNodesCount = 0;
- _platWalkDirXIncr = 0;
- _platWalkDirYIncr = 0;
- _platWalkDeltaX = ABS(_platWalkDestX - gridX);
- _platWalkDeltaY = ABS(_platWalkDestY - gridY);
+ _walkNodesCount = 0;
+ _walkDirXIncr = 0;
+ _walkDirYIncr = 0;
+ _walkDeltaX = ABS(_walkDestX - gridX);
+ _walkDeltaY = ABS(_walkDestY - gridY);
- if (_platWalkDeltaX)
- _platWalkDirX = (_platWalkDestX - gridX) / _platWalkDeltaX;
+ if (_walkDeltaX)
+ _walkDirX = (_walkDestX - gridX) / _walkDeltaX;
else
- _platWalkDirX = 0;
+ _walkDirX = 0;
- if (_platWalkDeltaY)
- _platWalkDirY = (_platWalkDestY - gridY) / _platWalkDeltaY;
+ if (_walkDeltaY)
+ _walkDirY = (_walkDestY - gridY) / _walkDeltaY;
else
- _platWalkDirY = 0;
-
- while (_platWalkDirXIncr < _platWalkDeltaX && _platWalkDirYIncr < _platWalkDeltaY) {
- _platWalkNodes[_platWalkNodesCount]._gridX1 = gridX + _platWalkDirX * _platWalkDirXIncr;
- _platWalkNodes[_platWalkNodesCount]._gridY1 = gridY + _platWalkDirY * _platWalkDirYIncr;
- if (!isPointBlocked(_platWalkDirX + _platWalkNodes[_platWalkNodesCount]._gridX1, _platWalkDirY + _platWalkNodes[_platWalkNodesCount]._gridY1)) {
- _platWalkNodes[_platWalkNodesCount]._deltaX = _platWalkDirX;
- _platWalkNodes[_platWalkNodesCount]._deltaY = _platWalkDirY;
- ++_platWalkDirXIncr;
- ++_platWalkDirYIncr;
- } else if (_platWalkDeltaY - _platWalkDirYIncr > _platWalkDeltaX - _platWalkDirXIncr) {
- if (!isPointBlocked(_platWalkNodes[_platWalkNodesCount]._gridX1, _platWalkDirY + _platWalkNodes[_platWalkNodesCount]._gridY1)) {
- _platWalkNodes[_platWalkNodesCount]._deltaX = 0;
- _platWalkNodes[_platWalkNodesCount]._deltaY = _platWalkDirY;
- ++_platWalkDirYIncr;
- } else if (!isPointBlocked(_platWalkDirX + _platWalkNodes[_platWalkNodesCount]._gridX1, _platWalkNodes[_platWalkNodesCount]._gridY1)) {
- _platWalkNodes[_platWalkNodesCount]._deltaX = _platWalkDirX;
- _platWalkNodes[_platWalkNodesCount]._deltaY = 0;
- ++_platWalkDirXIncr;
+ _walkDirY = 0;
+
+ while (_walkDirXIncr < _walkDeltaX && _walkDirYIncr < _walkDeltaY) {
+ _walkNodes[_walkNodesCount]._gridX1 = gridX + _walkDirX * _walkDirXIncr;
+ _walkNodes[_walkNodesCount]._gridY1 = gridY + _walkDirY * _walkDirYIncr;
+ if (!_vm->isPointBlocked(_walkDirX + _walkNodes[_walkNodesCount]._gridX1, _walkDirY + _walkNodes[_walkNodesCount]._gridY1)) {
+ _walkNodes[_walkNodesCount]._deltaX = _walkDirX;
+ _walkNodes[_walkNodesCount]._deltaY = _walkDirY;
+ ++_walkDirXIncr;
+ ++_walkDirYIncr;
+ } else if (_walkDeltaY - _walkDirYIncr > _walkDeltaX - _walkDirXIncr) {
+ if (!_vm->isPointBlocked(_walkNodes[_walkNodesCount]._gridX1, _walkDirY + _walkNodes[_walkNodesCount]._gridY1)) {
+ _walkNodes[_walkNodesCount]._deltaX = 0;
+ _walkNodes[_walkNodesCount]._deltaY = _walkDirY;
+ ++_walkDirYIncr;
+ } else if (!_vm->isPointBlocked(_walkDirX + _walkNodes[_walkNodesCount]._gridX1, _walkNodes[_walkNodesCount]._gridY1)) {
+ _walkNodes[_walkNodesCount]._deltaX = _walkDirX;
+ _walkNodes[_walkNodesCount]._deltaY = 0;
+ ++_walkDirXIncr;
} else {
- _platWalkDeltaX = _platWalkDirXIncr;
- _platWalkDeltaY = _platWalkDirYIncr;
- --_platWalkNodesCount;
+ _walkDeltaX = _walkDirXIncr;
+ _walkDeltaY = _walkDirYIncr;
+ --_walkNodesCount;
}
} else {
- if (!isPointBlocked(_platWalkDirX + _platWalkNodes[_platWalkNodesCount]._gridX1, _platWalkNodes[_platWalkNodesCount]._gridY1)) {
- _platWalkNodes[_platWalkNodesCount]._deltaX = _platWalkDirX;
- _platWalkNodes[_platWalkNodesCount]._deltaY = 0;
- ++_platWalkDirXIncr;
- } else if (!isPointBlocked(_platWalkNodes[_platWalkNodesCount]._gridX1, _platWalkDirY + _platWalkNodes[_platWalkNodesCount]._gridY1)) {
- _platWalkNodes[_platWalkNodesCount]._deltaX = 0;
- _platWalkNodes[_platWalkNodesCount]._deltaY = _platWalkDirY;
- ++_platWalkDirYIncr;
+ if (!_vm->isPointBlocked(_walkDirX + _walkNodes[_walkNodesCount]._gridX1, _walkNodes[_walkNodesCount]._gridY1)) {
+ _walkNodes[_walkNodesCount]._deltaX = _walkDirX;
+ _walkNodes[_walkNodesCount]._deltaY = 0;
+ ++_walkDirXIncr;
+ } else if (!_vm->isPointBlocked(_walkNodes[_walkNodesCount]._gridX1, _walkDirY + _walkNodes[_walkNodesCount]._gridY1)) {
+ _walkNodes[_walkNodesCount]._deltaX = 0;
+ _walkNodes[_walkNodesCount]._deltaY = _walkDirY;
+ ++_walkDirYIncr;
} else {
- _platWalkDeltaX = _platWalkDirXIncr;
- _platWalkDeltaY = _platWalkDirYIncr;
- --_platWalkNodesCount;
+ _walkDeltaX = _walkDirXIncr;
+ _walkDeltaY = _walkDirYIncr;
+ --_walkNodesCount;
}
}
- ++_platWalkNodesCount;
+ ++_walkNodesCount;
}
- while (_platWalkDirXIncr < _platWalkDeltaX) {
- _platWalkNodes[_platWalkNodesCount]._gridX1 = gridX + _platWalkDirX * _platWalkDirXIncr;
- _platWalkNodes[_platWalkNodesCount]._gridY1 = _platWalkDestY;
- if (!isPointBlocked(_platWalkDirX + _platWalkNodes[_platWalkNodesCount]._gridX1, _platWalkDestY)) {
- _platWalkNodes[_platWalkNodesCount]._deltaX = _platWalkDirX;
- _platWalkNodes[_platWalkNodesCount]._deltaY = 0;
- ++_platWalkDirXIncr;
- ++_platWalkNodesCount;
+ while (_walkDirXIncr < _walkDeltaX) {
+ _walkNodes[_walkNodesCount]._gridX1 = gridX + _walkDirX * _walkDirXIncr;
+ _walkNodes[_walkNodesCount]._gridY1 = _walkDestY;
+ if (!_vm->isPointBlocked(_walkDirX + _walkNodes[_walkNodesCount]._gridX1, _walkDestY)) {
+ _walkNodes[_walkNodesCount]._deltaX = _walkDirX;
+ _walkNodes[_walkNodesCount]._deltaY = 0;
+ ++_walkDirXIncr;
+ ++_walkNodesCount;
} else {
- _platWalkDeltaX = _platWalkDirXIncr;
+ _walkDeltaX = _walkDirXIncr;
}
}
- while (_platWalkDirYIncr < _platWalkDeltaY) {
- _platWalkNodes[_platWalkNodesCount]._gridX1 = _platWalkDestX;
- _platWalkNodes[_platWalkNodesCount]._gridY1 = gridY + _platWalkDirY * _platWalkDirYIncr;
- if (!isPointBlocked(_platWalkDestX, _platWalkDirY + _platWalkNodes[_platWalkNodesCount]._gridY1)) {
- _platWalkNodes[_platWalkNodesCount]._deltaX = 0;
- _platWalkNodes[_platWalkNodesCount]._deltaY = _platWalkDirY;
- ++_platWalkDirYIncr;
- ++_platWalkNodesCount;
+ while (_walkDirYIncr < _walkDeltaY) {
+ _walkNodes[_walkNodesCount]._gridX1 = _walkDestX;
+ _walkNodes[_walkNodesCount]._gridY1 = gridY + _walkDirY * _walkDirYIncr;
+ if (!_vm->isPointBlocked(_walkDestX, _walkDirY + _walkNodes[_walkNodesCount]._gridY1)) {
+ _walkNodes[_walkNodesCount]._deltaX = 0;
+ _walkNodes[_walkNodesCount]._deltaY = _walkDirY;
+ ++_walkDirYIncr;
+ ++_walkNodesCount;
} else {
- _platWalkDeltaY = _platWalkDirYIncr;
+ _walkDeltaY = _walkDirYIncr;
}
}
- if (gridX + _platWalkDirX * _platWalkDirXIncr != _platWalkDestX || gridY + _platWalkDirY * _platWalkDirYIncr != _platWalkDestY) {
- _platWalkDestX = gridX + _platWalkDirX * _platWalkDirXIncr;
- _platWalkDestY = gridY + _platWalkDirY * _platWalkDirYIncr;
+ if (gridX + _walkDirX * _walkDirXIncr != _walkDestX || gridY + _walkDirY * _walkDirYIncr != _walkDestY) {
+ _walkDestX = gridX + _walkDirX * _walkDirXIncr;
+ _walkDestY = gridY + _walkDirY * _walkDirYIncr;
result = false;
} else {
result = true;
@@ -856,77 +532,79 @@ bool GnapEngine::platFindPath4(int gridX, int gridY) {
return result;
}
-bool GnapEngine::platFindPath1(int gridX, int gridY, int index) {
- _platWalkNodesCount = index;
- _platWalkDirXIncr = 0;
- _platWalkDirYIncr = 0;
- _platWalkDeltaX = ABS(_platWalkDestX - gridX);
- _platWalkDeltaY = ABS(_platWalkDestY - gridY);
+/******************************************************************************/
- if (_platWalkDeltaX)
- _platWalkDirX = (_platWalkDestX - gridX) / _platWalkDeltaX;
+bool PlayerPlat::findPath1(int gridX, int gridY, int index) {
+ _walkNodesCount = index;
+ _walkDirXIncr = 0;
+ _walkDirYIncr = 0;
+ _walkDeltaX = ABS(_walkDestX - gridX);
+ _walkDeltaY = ABS(_walkDestY - gridY);
+
+ if (_walkDeltaX)
+ _walkDirX = (_walkDestX - gridX) / _walkDeltaX;
else
- _platWalkDirX = 0;
+ _walkDirX = 0;
- if (_platWalkDeltaY)
- _platWalkDirY = (_platWalkDestY - gridY) / _platWalkDeltaY;
+ if (_walkDeltaY)
+ _walkDirY = (_walkDestY - gridY) / _walkDeltaY;
else
- _platWalkDirY = 0;
-
- while (_platWalkDirXIncr < _platWalkDeltaX && _platWalkDirYIncr < _platWalkDeltaY) {
- _platWalkNodes[_platWalkNodesCount]._gridX1 = gridX + _platWalkDirX * _platWalkDirXIncr;
- _platWalkNodes[_platWalkNodesCount]._gridY1 = gridY + _platWalkDirY * _platWalkDirYIncr;
- if (!isPointBlocked(_platWalkDirX + _platWalkNodes[_platWalkNodesCount]._gridX1, _platWalkDirY + _platWalkNodes[_platWalkNodesCount]._gridY1)) {
- _platWalkNodes[_platWalkNodesCount]._deltaX = _platWalkDirX;
- _platWalkNodes[_platWalkNodesCount]._deltaY = _platWalkDirY;
- ++_platWalkDirXIncr;
- ++_platWalkDirYIncr;
- } else if (_platWalkDeltaY - _platWalkDirYIncr > _platWalkDeltaX - _platWalkDirXIncr) {
- if (!isPointBlocked(_platWalkNodes[_platWalkNodesCount]._gridX1, _platWalkDirY + _platWalkNodes[_platWalkNodesCount]._gridY1)) {
- _platWalkNodes[_platWalkNodesCount]._deltaX = 0;
- _platWalkNodes[_platWalkNodesCount]._deltaY = _platWalkDirY;
- ++_platWalkDirYIncr;
- } else if (!isPointBlocked(_platWalkDirX + _platWalkNodes[_platWalkNodesCount]._gridX1, _platWalkNodes[_platWalkNodesCount]._gridY1)) {
- _platWalkNodes[_platWalkNodesCount]._deltaX = _platWalkDirX;
- _platWalkNodes[_platWalkNodesCount]._deltaY = 0;
- ++_platWalkDirXIncr;
+ _walkDirY = 0;
+
+ while (_walkDirXIncr < _walkDeltaX && _walkDirYIncr < _walkDeltaY) {
+ _walkNodes[_walkNodesCount]._gridX1 = gridX + _walkDirX * _walkDirXIncr;
+ _walkNodes[_walkNodesCount]._gridY1 = gridY + _walkDirY * _walkDirYIncr;
+ if (!_vm->isPointBlocked(_walkDirX + _walkNodes[_walkNodesCount]._gridX1, _walkDirY + _walkNodes[_walkNodesCount]._gridY1)) {
+ _walkNodes[_walkNodesCount]._deltaX = _walkDirX;
+ _walkNodes[_walkNodesCount]._deltaY = _walkDirY;
+ ++_walkDirXIncr;
+ ++_walkDirYIncr;
+ } else if (_walkDeltaY - _walkDirYIncr > _walkDeltaX - _walkDirXIncr) {
+ if (!_vm->isPointBlocked(_walkNodes[_walkNodesCount]._gridX1, _walkDirY + _walkNodes[_walkNodesCount]._gridY1)) {
+ _walkNodes[_walkNodesCount]._deltaX = 0;
+ _walkNodes[_walkNodesCount]._deltaY = _walkDirY;
+ ++_walkDirYIncr;
+ } else if (!_vm->isPointBlocked(_walkDirX + _walkNodes[_walkNodesCount]._gridX1, _walkNodes[_walkNodesCount]._gridY1)) {
+ _walkNodes[_walkNodesCount]._deltaX = _walkDirX;
+ _walkNodes[_walkNodesCount]._deltaY = 0;
+ ++_walkDirXIncr;
} else
return false;
} else {
- if (!isPointBlocked(_platWalkDirX + _platWalkNodes[_platWalkNodesCount]._gridX1, _platWalkNodes[_platWalkNodesCount]._gridY1)) {
- _platWalkNodes[_platWalkNodesCount]._deltaX = _platWalkDirX;
- _platWalkNodes[_platWalkNodesCount]._deltaY = 0;
- ++_platWalkDirXIncr;
- } else if (!isPointBlocked(_platWalkNodes[_platWalkNodesCount]._gridX1, _platWalkDirY + _platWalkNodes[_platWalkNodesCount]._gridY1)) {
- _platWalkNodes[_platWalkNodesCount]._deltaX = 0;
- _platWalkNodes[_platWalkNodesCount]._deltaY = _platWalkDirY;
- ++_platWalkDirYIncr;
+ if (!_vm->isPointBlocked(_walkDirX + _walkNodes[_walkNodesCount]._gridX1, _walkNodes[_walkNodesCount]._gridY1)) {
+ _walkNodes[_walkNodesCount]._deltaX = _walkDirX;
+ _walkNodes[_walkNodesCount]._deltaY = 0;
+ ++_walkDirXIncr;
+ } else if (!_vm->isPointBlocked(_walkNodes[_walkNodesCount]._gridX1, _walkDirY + _walkNodes[_walkNodesCount]._gridY1)) {
+ _walkNodes[_walkNodesCount]._deltaX = 0;
+ _walkNodes[_walkNodesCount]._deltaY = _walkDirY;
+ ++_walkDirYIncr;
} else
return false;
}
- ++_platWalkNodesCount;
+ ++_walkNodesCount;
}
- while (_platWalkDirXIncr < _platWalkDeltaX) {
- _platWalkNodes[_platWalkNodesCount]._gridX1 = gridX + _platWalkDirX * _platWalkDirXIncr;
- _platWalkNodes[_platWalkNodesCount]._gridY1 = _platWalkDestY;
- if (!isPointBlocked(_platWalkDirX + _platWalkNodes[_platWalkNodesCount]._gridX1, _platWalkDestY)) {
- _platWalkNodes[_platWalkNodesCount]._deltaX = _platWalkDirX;
- _platWalkNodes[_platWalkNodesCount]._deltaY = 0;
- ++_platWalkDirXIncr;
- ++_platWalkNodesCount;
+ while (_walkDirXIncr < _walkDeltaX) {
+ _walkNodes[_walkNodesCount]._gridX1 = gridX + _walkDirX * _walkDirXIncr;
+ _walkNodes[_walkNodesCount]._gridY1 = _walkDestY;
+ if (!_vm->isPointBlocked(_walkDirX + _walkNodes[_walkNodesCount]._gridX1, _walkDestY)) {
+ _walkNodes[_walkNodesCount]._deltaX = _walkDirX;
+ _walkNodes[_walkNodesCount]._deltaY = 0;
+ ++_walkDirXIncr;
+ ++_walkNodesCount;
} else
return false;
}
- while (_platWalkDirYIncr < _platWalkDeltaY) {
- _platWalkNodes[_platWalkNodesCount]._gridX1 = _platWalkDestX;
- _platWalkNodes[_platWalkNodesCount]._gridY1 = gridY + _platWalkDirY * _platWalkDirYIncr;
- if (!isPointBlocked(_platWalkDestX, _platWalkDirY + _platWalkNodes[_platWalkNodesCount]._gridY1)) {
- _platWalkNodes[_platWalkNodesCount]._deltaX = 0;
- _platWalkNodes[_platWalkNodesCount]._deltaY = _platWalkDirY;
- ++_platWalkDirYIncr;
- ++_platWalkNodesCount;
+ while (_walkDirYIncr < _walkDeltaY) {
+ _walkNodes[_walkNodesCount]._gridX1 = _walkDestX;
+ _walkNodes[_walkNodesCount]._gridY1 = gridY + _walkDirY * _walkDirYIncr;
+ if (!_vm->isPointBlocked(_walkDestX, _walkDirY + _walkNodes[_walkNodesCount]._gridY1)) {
+ _walkNodes[_walkNodesCount]._deltaX = 0;
+ _walkNodes[_walkNodesCount]._deltaY = _walkDirY;
+ ++_walkDirYIncr;
+ ++_walkNodesCount;
} else
return false;
}
@@ -934,101 +612,101 @@ bool GnapEngine::platFindPath1(int gridX, int gridY, int index) {
return true;
}
-bool GnapEngine::platFindPath2(int gridX, int gridY, int index) {
- _platWalkNodesCount = index;
- _platWalkDirXIncr = 0;
- _platWalkDirYIncr = 0;
- _platWalkDeltaX = ABS(_platWalkDestX - gridX);
- _platWalkDeltaY = ABS(_platWalkDestY - gridY);
+bool PlayerPlat::findPath2(int gridX, int gridY, int index) {
+ _walkNodesCount = index;
+ _walkDirXIncr = 0;
+ _walkDirYIncr = 0;
+ _walkDeltaX = ABS(_walkDestX - gridX);
+ _walkDeltaY = ABS(_walkDestY - gridY);
- if (_platWalkDeltaX)
- _platWalkDirX = (_platWalkDestX - gridX) / _platWalkDeltaX;
+ if (_walkDeltaX)
+ _walkDirX = (_walkDestX - gridX) / _walkDeltaX;
else
- _platWalkDirX = 0;
+ _walkDirX = 0;
- if (_platWalkDeltaY)
- _platWalkDirY = (_platWalkDestY - gridY) / _platWalkDeltaY;
+ if (_walkDeltaY)
+ _walkDirY = (_walkDestY - gridY) / _walkDeltaY;
else
- _platWalkDirY = 0;
-
- while (_platWalkDeltaY < _platWalkDeltaX - _platWalkDirXIncr) {
- _platWalkNodes[_platWalkNodesCount]._gridX1 = gridX + _platWalkDirX * _platWalkDirXIncr;
- _platWalkNodes[_platWalkNodesCount]._gridY1 = gridY;
- if (!isPointBlocked(_platWalkDirX + _platWalkNodes[_platWalkNodesCount]._gridX1, gridY)) {
- _platWalkNodes[_platWalkNodesCount]._deltaX = _platWalkDirX;
- _platWalkNodes[_platWalkNodesCount]._deltaY = 0;
- ++_platWalkDirXIncr;
- ++_platWalkNodesCount;
+ _walkDirY = 0;
+
+ while (_walkDeltaY < _walkDeltaX - _walkDirXIncr) {
+ _walkNodes[_walkNodesCount]._gridX1 = gridX + _walkDirX * _walkDirXIncr;
+ _walkNodes[_walkNodesCount]._gridY1 = gridY;
+ if (!_vm->isPointBlocked(_walkDirX + _walkNodes[_walkNodesCount]._gridX1, gridY)) {
+ _walkNodes[_walkNodesCount]._deltaX = _walkDirX;
+ _walkNodes[_walkNodesCount]._deltaY = 0;
+ ++_walkDirXIncr;
+ ++_walkNodesCount;
} else
return false;
}
- while (_platWalkDeltaX < _platWalkDeltaY - _platWalkDirYIncr) {
- _platWalkNodes[_platWalkNodesCount]._gridX1 = gridX;
- _platWalkNodes[_platWalkNodesCount]._gridY1 = gridY + _platWalkDirY * _platWalkDirYIncr;
- if (!isPointBlocked(gridX, _platWalkDirY + _platWalkNodes[_platWalkNodesCount]._gridY1)) {
- _platWalkNodes[_platWalkNodesCount]._deltaX = 0;
- _platWalkNodes[_platWalkNodesCount]._deltaY = _platWalkDirY;
- ++_platWalkDirYIncr;
- ++_platWalkNodesCount;
+ while (_walkDeltaX < _walkDeltaY - _walkDirYIncr) {
+ _walkNodes[_walkNodesCount]._gridX1 = gridX;
+ _walkNodes[_walkNodesCount]._gridY1 = gridY + _walkDirY * _walkDirYIncr;
+ if (!_vm->isPointBlocked(gridX, _walkDirY + _walkNodes[_walkNodesCount]._gridY1)) {
+ _walkNodes[_walkNodesCount]._deltaX = 0;
+ _walkNodes[_walkNodesCount]._deltaY = _walkDirY;
+ ++_walkDirYIncr;
+ ++_walkNodesCount;
} else
return false;
}
- while (_platWalkDirXIncr < _platWalkDeltaX && _platWalkDirYIncr < _platWalkDeltaY) {
- _platWalkNodes[_platWalkNodesCount]._gridX1 = gridX + _platWalkDirX * _platWalkDirXIncr;
- _platWalkNodes[_platWalkNodesCount]._gridY1 = gridY + _platWalkDirY * _platWalkDirYIncr;
- if (!isPointBlocked(_platWalkDirX + _platWalkNodes[_platWalkNodesCount]._gridX1, _platWalkDirY + _platWalkNodes[_platWalkNodesCount]._gridY1)) {
- _platWalkNodes[_platWalkNodesCount]._deltaX = _platWalkDirX;
- _platWalkNodes[_platWalkNodesCount]._deltaY = _platWalkDirY;
- ++_platWalkDirXIncr;
- ++_platWalkDirYIncr;
- } else if (_platWalkDeltaY - _platWalkDirYIncr > _platWalkDeltaX - _platWalkDirXIncr) {
- if (!isPointBlocked(_platWalkNodes[_platWalkNodesCount]._gridX1, _platWalkDirY + _platWalkNodes[_platWalkNodesCount]._gridY1)) {
- _platWalkNodes[_platWalkNodesCount]._deltaX = 0;
- _platWalkNodes[_platWalkNodesCount]._deltaY = _platWalkDirY;
- ++_platWalkDirYIncr;
- } else if (!isPointBlocked(_platWalkDirX + _platWalkNodes[_platWalkNodesCount]._gridX1, _platWalkNodes[_platWalkNodesCount]._gridY1)) {
- _platWalkNodes[_platWalkNodesCount]._deltaX = _platWalkDirX;
- _platWalkNodes[_platWalkNodesCount]._deltaY = 0;
- ++_platWalkDirXIncr;
+ while (_walkDirXIncr < _walkDeltaX && _walkDirYIncr < _walkDeltaY) {
+ _walkNodes[_walkNodesCount]._gridX1 = gridX + _walkDirX * _walkDirXIncr;
+ _walkNodes[_walkNodesCount]._gridY1 = gridY + _walkDirY * _walkDirYIncr;
+ if (!_vm->isPointBlocked(_walkDirX + _walkNodes[_walkNodesCount]._gridX1, _walkDirY + _walkNodes[_walkNodesCount]._gridY1)) {
+ _walkNodes[_walkNodesCount]._deltaX = _walkDirX;
+ _walkNodes[_walkNodesCount]._deltaY = _walkDirY;
+ ++_walkDirXIncr;
+ ++_walkDirYIncr;
+ } else if (_walkDeltaY - _walkDirYIncr > _walkDeltaX - _walkDirXIncr) {
+ if (!_vm->isPointBlocked(_walkNodes[_walkNodesCount]._gridX1, _walkDirY + _walkNodes[_walkNodesCount]._gridY1)) {
+ _walkNodes[_walkNodesCount]._deltaX = 0;
+ _walkNodes[_walkNodesCount]._deltaY = _walkDirY;
+ ++_walkDirYIncr;
+ } else if (!_vm->isPointBlocked(_walkDirX + _walkNodes[_walkNodesCount]._gridX1, _walkNodes[_walkNodesCount]._gridY1)) {
+ _walkNodes[_walkNodesCount]._deltaX = _walkDirX;
+ _walkNodes[_walkNodesCount]._deltaY = 0;
+ ++_walkDirXIncr;
} else
return false;
} else {
- if (!isPointBlocked(_platWalkDirX + _platWalkNodes[_platWalkNodesCount]._gridX1, _platWalkNodes[_platWalkNodesCount]._gridY1)) {
- _platWalkNodes[_platWalkNodesCount]._deltaX = _platWalkDirX;
- _platWalkNodes[_platWalkNodesCount]._deltaY = 0;
- ++_platWalkDirXIncr;
- } else if (!isPointBlocked(_platWalkNodes[_platWalkNodesCount]._gridX1, _platWalkDirY + _platWalkNodes[_platWalkNodesCount]._gridY1)) {
- _platWalkNodes[_platWalkNodesCount]._deltaX = 0;
- _platWalkNodes[_platWalkNodesCount]._deltaY = _platWalkDirY;
- ++_platWalkDirYIncr;
+ if (!_vm->isPointBlocked(_walkDirX + _walkNodes[_walkNodesCount]._gridX1, _walkNodes[_walkNodesCount]._gridY1)) {
+ _walkNodes[_walkNodesCount]._deltaX = _walkDirX;
+ _walkNodes[_walkNodesCount]._deltaY = 0;
+ ++_walkDirXIncr;
+ } else if (!_vm->isPointBlocked(_walkNodes[_walkNodesCount]._gridX1, _walkDirY + _walkNodes[_walkNodesCount]._gridY1)) {
+ _walkNodes[_walkNodesCount]._deltaX = 0;
+ _walkNodes[_walkNodesCount]._deltaY = _walkDirY;
+ ++_walkDirYIncr;
} else
return false;
}
- ++_platWalkNodesCount;
+ ++_walkNodesCount;
}
- while (_platWalkDirXIncr < _platWalkDeltaX) {
- _platWalkNodes[_platWalkNodesCount]._gridX1 = gridX + _platWalkDirX * _platWalkDirXIncr;
- _platWalkNodes[_platWalkNodesCount]._gridY1 = _platWalkDestY;
- if (!isPointBlocked(_platWalkDirX + _platWalkNodes[_platWalkNodesCount]._gridX1, _platWalkDestY)) {
- _platWalkNodes[_platWalkNodesCount]._deltaX = _platWalkDirX;
- _platWalkNodes[_platWalkNodesCount]._deltaY = 0;
- ++_platWalkDirXIncr;
- ++_platWalkNodesCount;
+ while (_walkDirXIncr < _walkDeltaX) {
+ _walkNodes[_walkNodesCount]._gridX1 = gridX + _walkDirX * _walkDirXIncr;
+ _walkNodes[_walkNodesCount]._gridY1 = _walkDestY;
+ if (!_vm->isPointBlocked(_walkDirX + _walkNodes[_walkNodesCount]._gridX1, _walkDestY)) {
+ _walkNodes[_walkNodesCount]._deltaX = _walkDirX;
+ _walkNodes[_walkNodesCount]._deltaY = 0;
+ ++_walkDirXIncr;
+ ++_walkNodesCount;
} else
return false;
}
- while (_platWalkDirYIncr < _platWalkDeltaY) {
- _platWalkNodes[_platWalkNodesCount]._gridX1 = _platWalkDestX;
- _platWalkNodes[_platWalkNodesCount]._gridY1 = gridY + _platWalkDirY * _platWalkDirYIncr;
- if (!isPointBlocked(_platWalkDestX, _platWalkDirY + _platWalkNodes[_platWalkNodesCount]._gridY1)) {
- _platWalkNodes[_platWalkNodesCount]._deltaX = 0;
- _platWalkNodes[_platWalkNodesCount]._deltaY = _platWalkDirY;
- ++_platWalkDirYIncr;
- ++_platWalkNodesCount;
+ while (_walkDirYIncr < _walkDeltaY) {
+ _walkNodes[_walkNodesCount]._gridX1 = _walkDestX;
+ _walkNodes[_walkNodesCount]._gridY1 = gridY + _walkDirY * _walkDirYIncr;
+ if (!_vm->isPointBlocked(_walkDestX, _walkDirY + _walkNodes[_walkNodesCount]._gridY1)) {
+ _walkNodes[_walkNodesCount]._deltaX = 0;
+ _walkNodes[_walkNodesCount]._deltaY = _walkDirY;
+ ++_walkDirYIncr;
+ ++_walkNodesCount;
} else
return false;
}
@@ -1036,167 +714,167 @@ bool GnapEngine::platFindPath2(int gridX, int gridY, int index) {
return true;
}
-bool GnapEngine::platFindPath3(int gridX, int gridY) {
+bool PlayerPlat::findPath3(int gridX, int gridY) {
int gridIncr = 1;
bool done = false;
- while (!done && gridIncr < _gridMaxX) {
- if (!isPointBlocked(_plat->_pos.x + gridIncr, _plat->_pos.y) && platFindPath1(_plat->_pos.x + gridIncr, _plat->_pos.y, gridIncr)) {
+ while (!done && gridIncr < _vm->_gridMaxX) {
+ if (!_vm->isPointBlocked(_pos.x + gridIncr, _pos.y) && findPath1(_pos.x + gridIncr, _pos.y, gridIncr)) {
for (int i = 0; i < gridIncr; ++i) {
- _platWalkNodes[i]._gridX1 = _plat->_pos.x + i;
- _platWalkNodes[i]._gridY1 = _plat->_pos.y;
- _platWalkNodes[i]._deltaX = 1;
- _platWalkNodes[i]._deltaY = 0;
+ _walkNodes[i]._gridX1 = _pos.x + i;
+ _walkNodes[i]._gridY1 = _pos.y;
+ _walkNodes[i]._deltaX = 1;
+ _walkNodes[i]._deltaY = 0;
}
done = true;
break;
}
- if (!isPointBlocked(_plat->_pos.x - gridIncr, _plat->_pos.y) && platFindPath1(_plat->_pos.x - gridIncr, _plat->_pos.y, gridIncr)) {
+ if (!_vm->isPointBlocked(_pos.x - gridIncr, _pos.y) && findPath1(_pos.x - gridIncr, _pos.y, gridIncr)) {
for (int i = 0; i < gridIncr; ++i) {
- _platWalkNodes[i]._gridX1 = _plat->_pos.x - i;
- _platWalkNodes[i]._gridY1 = _plat->_pos.y;
- _platWalkNodes[i]._deltaX = -1;
- _platWalkNodes[i]._deltaY = 0;
+ _walkNodes[i]._gridX1 = _pos.x - i;
+ _walkNodes[i]._gridY1 = _pos.y;
+ _walkNodes[i]._deltaX = -1;
+ _walkNodes[i]._deltaY = 0;
}
done = true;
break;
}
- if (!isPointBlocked(_plat->_pos.x, _plat->_pos.y + gridIncr) && platFindPath1(_plat->_pos.x, _plat->_pos.y + gridIncr, gridIncr)) {
+ if (!_vm->isPointBlocked(_pos.x, _pos.y + gridIncr) && findPath1(_pos.x, _pos.y + gridIncr, gridIncr)) {
for (int i = 0; i < gridIncr; ++i) {
- _platWalkNodes[i]._gridX1 = _plat->_pos.x;
- _platWalkNodes[i]._gridY1 = _plat->_pos.y + i;
- _platWalkNodes[i]._deltaX = 0;
- _platWalkNodes[i]._deltaY = 1;
+ _walkNodes[i]._gridX1 = _pos.x;
+ _walkNodes[i]._gridY1 = _pos.y + i;
+ _walkNodes[i]._deltaX = 0;
+ _walkNodes[i]._deltaY = 1;
}
done = true;
break;
}
- if (!isPointBlocked(_plat->_pos.x, _plat->_pos.y - gridIncr) && platFindPath1(_plat->_pos.x, _plat->_pos.y - gridIncr, gridIncr)) {
+ if (!_vm->isPointBlocked(_pos.x, _pos.y - gridIncr) && findPath1(_pos.x, _pos.y - gridIncr, gridIncr)) {
for (int i = 0; i < gridIncr; ++i) {
- _platWalkNodes[i]._gridX1 = _plat->_pos.x;
- _platWalkNodes[i]._gridY1 = _plat->_pos.y - i;
- _platWalkNodes[i]._deltaX = 0;
- _platWalkNodes[i]._deltaY = -1;
+ _walkNodes[i]._gridX1 = _pos.x;
+ _walkNodes[i]._gridY1 = _pos.y - i;
+ _walkNodes[i]._deltaX = 0;
+ _walkNodes[i]._deltaY = -1;
}
done = true;
break;
}
- if (!isPointBlocked(_plat->_pos.x + gridIncr, _plat->_pos.y + gridIncr) && platFindPath1(_plat->_pos.x + gridIncr, _plat->_pos.y + gridIncr, gridIncr)) {
+ if (!_vm->isPointBlocked(_pos.x + gridIncr, _pos.y + gridIncr) && findPath1(_pos.x + gridIncr, _pos.y + gridIncr, gridIncr)) {
for (int i = 0; i < gridIncr; ++i) {
- _platWalkNodes[i]._gridX1 = _plat->_pos.x + i;
- _platWalkNodes[i]._gridY1 = _plat->_pos.y + i;
- _platWalkNodes[i]._deltaX = 1;
- _platWalkNodes[i]._deltaY = 1;
+ _walkNodes[i]._gridX1 = _pos.x + i;
+ _walkNodes[i]._gridY1 = _pos.y + i;
+ _walkNodes[i]._deltaX = 1;
+ _walkNodes[i]._deltaY = 1;
}
done = true;
break;
}
- if (!isPointBlocked(_plat->_pos.x - gridIncr, _plat->_pos.y + gridIncr) && platFindPath1(_plat->_pos.x - gridIncr, _plat->_pos.y + gridIncr, gridIncr)) {
+ if (!_vm->isPointBlocked(_pos.x - gridIncr, _pos.y + gridIncr) && findPath1(_pos.x - gridIncr, _pos.y + gridIncr, gridIncr)) {
for (int i = 0; i < gridIncr; ++i) {
- _platWalkNodes[i]._gridX1 = _plat->_pos.x - i;
- _platWalkNodes[i]._gridY1 = _plat->_pos.y + i;
- _platWalkNodes[i]._deltaX = -1;
- _platWalkNodes[i]._deltaY = 1;
+ _walkNodes[i]._gridX1 = _pos.x - i;
+ _walkNodes[i]._gridY1 = _pos.y + i;
+ _walkNodes[i]._deltaX = -1;
+ _walkNodes[i]._deltaY = 1;
}
done = true;
break;
}
- if (!isPointBlocked(_plat->_pos.x + gridIncr, _plat->_pos.y - gridIncr) && platFindPath1(_plat->_pos.x + gridIncr, _plat->_pos.y - gridIncr, gridIncr)) {
+ if (!_vm->isPointBlocked(_pos.x + gridIncr, _pos.y - gridIncr) && findPath1(_pos.x + gridIncr, _pos.y - gridIncr, gridIncr)) {
for (int i = 0; i < gridIncr; ++i) {
- _platWalkNodes[i]._gridX1 = _plat->_pos.x + i;
- _platWalkNodes[i]._gridY1 = _plat->_pos.y - i;
- _platWalkNodes[i]._deltaX = 1;
- _platWalkNodes[i]._deltaY = -1;
+ _walkNodes[i]._gridX1 = _pos.x + i;
+ _walkNodes[i]._gridY1 = _pos.y - i;
+ _walkNodes[i]._deltaX = 1;
+ _walkNodes[i]._deltaY = -1;
}
done = true;
break;
}
- if (!isPointBlocked(_plat->_pos.x - gridIncr, _plat->_pos.y - gridIncr) && platFindPath1(_plat->_pos.x - gridIncr, _plat->_pos.y - gridIncr, gridIncr)) {
+ if (!_vm->isPointBlocked(_pos.x - gridIncr, _pos.y - gridIncr) && findPath1(_pos.x - gridIncr, _pos.y - gridIncr, gridIncr)) {
for (int i = 0; i < gridIncr; ++i) {
- _platWalkNodes[i]._gridX1 = _plat->_pos.x - i;
- _platWalkNodes[i]._gridY1 = _plat->_pos.y - i;
- _platWalkNodes[i]._deltaX = -1;
- _platWalkNodes[i]._deltaY = -1;
+ _walkNodes[i]._gridX1 = _pos.x - i;
+ _walkNodes[i]._gridY1 = _pos.y - i;
+ _walkNodes[i]._deltaX = -1;
+ _walkNodes[i]._deltaY = -1;
}
done = true;
break;
}
- if (!isPointBlocked(_plat->_pos.x + gridIncr, _plat->_pos.y) && platFindPath2(_plat->_pos.x + gridIncr, _plat->_pos.y, gridIncr)) {
+ if (!_vm->isPointBlocked(_pos.x + gridIncr, _pos.y) && findPath2(_pos.x + gridIncr, _pos.y, gridIncr)) {
for (int i = 0; i < gridIncr; ++i) {
- _platWalkNodes[i]._gridX1 = _plat->_pos.x + i;
- _platWalkNodes[i]._gridY1 = _plat->_pos.y;
- _platWalkNodes[i]._deltaX = 1;
- _platWalkNodes[i]._deltaY = 0;
+ _walkNodes[i]._gridX1 = _pos.x + i;
+ _walkNodes[i]._gridY1 = _pos.y;
+ _walkNodes[i]._deltaX = 1;
+ _walkNodes[i]._deltaY = 0;
}
done = true;
break;
}
- if (!isPointBlocked(_plat->_pos.x - gridIncr, _plat->_pos.y) && platFindPath2(_plat->_pos.x - gridIncr, _plat->_pos.y, gridIncr)) {
+ if (!_vm->isPointBlocked(_pos.x - gridIncr, _pos.y) && findPath2(_pos.x - gridIncr, _pos.y, gridIncr)) {
for (int i = 0; i < gridIncr; ++i) {
- _platWalkNodes[i]._gridX1 = _plat->_pos.x - i;
- _platWalkNodes[i]._gridY1 = _plat->_pos.y;
- _platWalkNodes[i]._deltaX = -1;
- _platWalkNodes[i]._deltaY = 0;
+ _walkNodes[i]._gridX1 = _pos.x - i;
+ _walkNodes[i]._gridY1 = _pos.y;
+ _walkNodes[i]._deltaX = -1;
+ _walkNodes[i]._deltaY = 0;
}
done = true;
break;
}
- if (!isPointBlocked(_plat->_pos.x, _plat->_pos.y + gridIncr) && platFindPath2(_plat->_pos.x, _plat->_pos.y + gridIncr, gridIncr)) {
+ if (!_vm->isPointBlocked(_pos.x, _pos.y + gridIncr) && findPath2(_pos.x, _pos.y + gridIncr, gridIncr)) {
for (int i = 0; i < gridIncr; ++i) {
- _platWalkNodes[i]._gridX1 = _plat->_pos.x;
- _platWalkNodes[i]._gridY1 = _plat->_pos.y + i;
- _platWalkNodes[i]._deltaX = 0;
- _platWalkNodes[i]._deltaY = 1;
+ _walkNodes[i]._gridX1 = _pos.x;
+ _walkNodes[i]._gridY1 = _pos.y + i;
+ _walkNodes[i]._deltaX = 0;
+ _walkNodes[i]._deltaY = 1;
}
done = true;
break;
}
- if (!isPointBlocked(_plat->_pos.x, _plat->_pos.y - gridIncr) && platFindPath2(_plat->_pos.x, _plat->_pos.y - gridIncr, gridIncr)) {
+ if (!_vm->isPointBlocked(_pos.x, _pos.y - gridIncr) && findPath2(_pos.x, _pos.y - gridIncr, gridIncr)) {
for (int i = 0; i < gridIncr; ++i) {
- _platWalkNodes[i]._gridX1 = _plat->_pos.x;
- _platWalkNodes[i]._gridY1 = _plat->_pos.y - i;
- _platWalkNodes[i]._deltaX = 0;
- _platWalkNodes[i]._deltaY = -1;
+ _walkNodes[i]._gridX1 = _pos.x;
+ _walkNodes[i]._gridY1 = _pos.y - i;
+ _walkNodes[i]._deltaX = 0;
+ _walkNodes[i]._deltaY = -1;
}
done = true;
break;
}
- if (!isPointBlocked(_plat->_pos.x + gridIncr, _plat->_pos.y + gridIncr) && platFindPath2(_plat->_pos.x + gridIncr, _plat->_pos.y + gridIncr, gridIncr)) {
+ if (!_vm->isPointBlocked(_pos.x + gridIncr, _pos.y + gridIncr) && findPath2(_pos.x + gridIncr, _pos.y + gridIncr, gridIncr)) {
for (int i = 0; i < gridIncr; ++i) {
- _platWalkNodes[i]._gridX1 = _plat->_pos.x + i;
- _platWalkNodes[i]._gridY1 = _plat->_pos.y + i;
- _platWalkNodes[i]._deltaX = 1;
- _platWalkNodes[i]._deltaY = 1;
+ _walkNodes[i]._gridX1 = _pos.x + i;
+ _walkNodes[i]._gridY1 = _pos.y + i;
+ _walkNodes[i]._deltaX = 1;
+ _walkNodes[i]._deltaY = 1;
}
done = true;
break;
}
- if (!isPointBlocked(_plat->_pos.x - gridIncr, _plat->_pos.y + gridIncr) && platFindPath2(_plat->_pos.x - gridIncr, _plat->_pos.y + gridIncr, gridIncr)) {
+ if (!_vm->isPointBlocked(_pos.x - gridIncr, _pos.y + gridIncr) && findPath2(_pos.x - gridIncr, _pos.y + gridIncr, gridIncr)) {
for (int i = 0; i < gridIncr; ++i) {
- _platWalkNodes[i]._gridX1 = _plat->_pos.x - i;
- _platWalkNodes[i]._gridY1 = _plat->_pos.y + i;
- _platWalkNodes[i]._deltaX = -1;
- _platWalkNodes[i]._deltaY = 1;
+ _walkNodes[i]._gridX1 = _pos.x - i;
+ _walkNodes[i]._gridY1 = _pos.y + i;
+ _walkNodes[i]._deltaX = -1;
+ _walkNodes[i]._deltaY = 1;
}
done = true;
break;
}
- if (!isPointBlocked(_plat->_pos.x + gridIncr, _plat->_pos.y - gridIncr) && platFindPath2(_plat->_pos.x + gridIncr, _plat->_pos.y - gridIncr, gridIncr)) {
+ if (!_vm->isPointBlocked(_pos.x + gridIncr, _pos.y - gridIncr) && findPath2(_pos.x + gridIncr, _pos.y - gridIncr, gridIncr)) {
for (int i = 0; i < gridIncr; ++i) {
- _platWalkNodes[i]._gridX1 = _plat->_pos.x + i;
- _platWalkNodes[i]._gridY1 = _plat->_pos.y - i;
- _platWalkNodes[i]._deltaX = 1;
- _platWalkNodes[i]._deltaY = -1;
+ _walkNodes[i]._gridX1 = _pos.x + i;
+ _walkNodes[i]._gridY1 = _pos.y - i;
+ _walkNodes[i]._deltaX = 1;
+ _walkNodes[i]._deltaY = -1;
}
done = true;
break;
}
- if (!isPointBlocked(_plat->_pos.x - gridIncr, _plat->_pos.y - gridIncr) && platFindPath2(_plat->_pos.x - gridIncr, _plat->_pos.y - gridIncr, gridIncr)) {
+ if (!_vm->isPointBlocked(_pos.x - gridIncr, _pos.y - gridIncr) && findPath2(_pos.x - gridIncr, _pos.y - gridIncr, gridIncr)) {
for (int i = 0; i < gridIncr; ++i) {
- _platWalkNodes[i]._gridX1 = _plat->_pos.x - i;
- _platWalkNodes[i]._gridY1 = _plat->_pos.y - i;
- _platWalkNodes[i]._deltaX = -1;
- _platWalkNodes[i]._deltaY = -1;
+ _walkNodes[i]._gridX1 = _pos.x - i;
+ _walkNodes[i]._gridY1 = _pos.y - i;
+ _walkNodes[i]._deltaX = -1;
+ _walkNodes[i]._deltaY = -1;
}
done = true;
break;
@@ -1207,215 +885,100 @@ bool GnapEngine::platFindPath3(int gridX, int gridY) {
return done;
}
-bool GnapEngine::platypusWalkTo(Common::Point gridPos, int animationIndex, int sequenceId, int flags) {
- int datNum = flags & 3;
- bool done = false;
-
- _timers[1] = 60;
-
- int gridX = gridPos.x;
- if (gridX < 0)
- gridX = (_leftClickMouseX - _gridMinX + 37) / 75;
-
- int gridY = gridPos.y;
- if (gridY < 0)
- gridY = (_leftClickMouseY - _gridMinY + 24) / 48;
-
- _platWalkDestX = CLIP(gridX, 0, _gridMaxX - 1);
- _platWalkDestY = CLIP(gridY, 0, _gridMaxY - 1);
-
- if (animationIndex >= 0 && _gnap->_pos == Common::Point(_platWalkDestX, _platWalkDestY))
- gnapWalkStep();
-
- if (platFindPath1(_plat->_pos.x, _plat->_pos.y, 0))
- done = true;
-
- if (!done && platFindPath2(_plat->_pos.x, _plat->_pos.y, 0))
- done = true;
-
- if (!done && platFindPath3(_plat->_pos.x, _plat->_pos.y))
- done = true;
+bool PlayerPlat::findPath4(int gridX, int gridY) {
+ bool result = false;
- if (!done && platFindPath4(_plat->_pos.x, _plat->_pos.y))
- done = true;
+ _walkNodesCount = 0;
+ _walkDirXIncr = 0;
+ _walkDirYIncr = 0;
+ _walkDeltaX = ABS(_walkDestX - gridX);
+ _walkDeltaY = ABS(_walkDestY - gridY);
- int platSequenceId = _plat->_sequenceId;
- int platId = _plat->_id;
- int platSequenceDatNum = _plat->_sequenceDatNum;
+ if (_walkDeltaX)
+ _walkDirX = (_walkDestX - gridX) / _walkDeltaX;
+ else
+ _walkDirX = 0;
- for (int index = 0; index < _platWalkNodesCount; ++index) {
- _platWalkNodes[index]._id = index + 20 * _platWalkNodes[index]._gridY1;
- if (_platWalkNodes[index]._deltaX == 1 && _platWalkNodes[index]._deltaY == 0) {
- if (index % 2) {
- _gameSys->insertSequence(makeRid(datNum, 0x7CD), _platWalkNodes[index]._id,
- makeRid(platSequenceDatNum, platSequenceId), platId,
- kSeqScale | kSeqSyncWait, 0, 75 * _platWalkNodes[index]._gridX1 - _plat->_gridX, 48 * _platWalkNodes[index]._gridY1 - _plat->_gridY);
- _platWalkNodes[index]._sequenceId = 0x7CD;
- platSequenceId = 0x7CD;
+ if (_walkDeltaY)
+ _walkDirY = (_walkDestY - gridY) / _walkDeltaY;
+ else
+ _walkDirY = 0;
+
+ while (_walkDirXIncr < _walkDeltaX && _walkDirYIncr < _walkDeltaY) {
+ _walkNodes[_walkNodesCount]._gridX1 = gridX + _walkDirX * _walkDirXIncr;
+ _walkNodes[_walkNodesCount]._gridY1 = gridY + _walkDirY * _walkDirYIncr;
+ if (!_vm->isPointBlocked(_walkDirX + _walkNodes[_walkNodesCount]._gridX1, _walkDirY + _walkNodes[_walkNodesCount]._gridY1)) {
+ _walkNodes[_walkNodesCount]._deltaX = _walkDirX;
+ _walkNodes[_walkNodesCount]._deltaY = _walkDirY;
+ ++_walkDirXIncr;
+ ++_walkDirYIncr;
+ } else if (_walkDeltaY - _walkDirYIncr > _walkDeltaX - _walkDirXIncr) {
+ if (!_vm->isPointBlocked(_walkNodes[_walkNodesCount]._gridX1, _walkDirY + _walkNodes[_walkNodesCount]._gridY1)) {
+ _walkNodes[_walkNodesCount]._deltaX = 0;
+ _walkNodes[_walkNodesCount]._deltaY = _walkDirY;
+ ++_walkDirYIncr;
+ } else if (!_vm->isPointBlocked(_walkDirX + _walkNodes[_walkNodesCount]._gridX1, _walkNodes[_walkNodesCount]._gridY1)) {
+ _walkNodes[_walkNodesCount]._deltaX = _walkDirX;
+ _walkNodes[_walkNodesCount]._deltaY = 0;
+ ++_walkDirXIncr;
} else {
- _gameSys->insertSequence(makeRid(datNum, 0x7CE), _platWalkNodes[index]._id,
- makeRid(platSequenceDatNum, platSequenceId), platId,
- kSeqScale | kSeqSyncWait, 0, 75 * _platWalkNodes[index]._gridX1 - _plat->_gridX, 48 * _platWalkNodes[index]._gridY1 - _plat->_gridY);
- _platWalkNodes[index]._sequenceId = 0x7CE;
- platSequenceId = 0x7CE;
+ _walkDeltaX = _walkDirXIncr;
+ _walkDeltaY = _walkDirYIncr;
+ --_walkNodesCount;
}
- } else if (_platWalkNodes[index]._deltaX == -1 && _platWalkNodes[index]._deltaY == 0) {
- if (index % 2) {
- _gameSys->insertSequence(makeRid(datNum, 0x7CF), _platWalkNodes[index]._id,
- makeRid(platSequenceDatNum, platSequenceId), platId,
- kSeqScale | kSeqSyncWait, 0, 75 * _platWalkNodes[index]._gridX1 - _plat->_gridX, 48 * _platWalkNodes[index]._gridY1 - _plat->_gridY);
- _platWalkNodes[index]._sequenceId = 0x7CF;
- platSequenceId = 0x7CF;
+ } else {
+ if (!_vm->isPointBlocked(_walkDirX + _walkNodes[_walkNodesCount]._gridX1, _walkNodes[_walkNodesCount]._gridY1)) {
+ _walkNodes[_walkNodesCount]._deltaX = _walkDirX;
+ _walkNodes[_walkNodesCount]._deltaY = 0;
+ ++_walkDirXIncr;
+ } else if (!_vm->isPointBlocked(_walkNodes[_walkNodesCount]._gridX1, _walkDirY + _walkNodes[_walkNodesCount]._gridY1)) {
+ _walkNodes[_walkNodesCount]._deltaX = 0;
+ _walkNodes[_walkNodesCount]._deltaY = _walkDirY;
+ ++_walkDirYIncr;
} else {
- _gameSys->insertSequence(makeRid(datNum, 0x7D0), _platWalkNodes[index]._id,
- makeRid(platSequenceDatNum, platSequenceId), platId,
- kSeqScale | kSeqSyncWait, 0, 75 * _platWalkNodes[index]._gridX1 - _plat->_gridX, 48 * _platWalkNodes[index]._gridY1 - _plat->_gridY);
- _platWalkNodes[index]._sequenceId = 0x7D0;
- platSequenceId = 0x7D0;
+ _walkDeltaX = _walkDirXIncr;
+ _walkDeltaY = _walkDirYIncr;
+ --_walkNodesCount;
}
- } else {
- if (_platWalkNodes[index]._deltaY == -1)
- _platWalkNodes[index]._id -= 10;
- else
- _platWalkNodes[index]._id += 10;
- int newSequenceId = _plat->getWalkSequenceId(_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 - _plat->_gridX, 48 * _platWalkNodes[index]._gridY1 - _plat->_gridY);
- _platWalkNodes[index]._sequenceId = newSequenceId;
- platSequenceId = newSequenceId;
}
- platId = _platWalkNodes[index]._id;
- platSequenceDatNum = datNum;
+ ++_walkNodesCount;
}
- if (flags & 8) {
- if (_platWalkNodesCount > 0) {
- _plat->_sequenceId = platSequenceId;
- _plat->_id = platId;
- _plat->_sequenceDatNum = datNum;
- // CHECKME Not sure if this is correct...
- if (_platWalkNodes[_platWalkNodesCount - 1]._deltaX > 0)
- _plat->_idleFacing = kDirNone;
- else if (_platWalkNodes[_platWalkNodesCount - 1]._deltaX < 0)
- _plat->_idleFacing = kDirUnk4;
- else if (_platWalkNodes[_platWalkNodesCount - 1]._gridX1 % 2)
- _plat->_idleFacing = kDirUnk4;
- else
- _plat->_idleFacing = kDirNone;
- if (animationIndex >= 0)
- _gameSys->setAnimation(makeRid(_plat->_sequenceDatNum, _plat->_sequenceId), _plat->_id, animationIndex);
- } else if (animationIndex >= 0) {
- _gameSys->setAnimation(0x107D3, 1, animationIndex);
- _gameSys->insertSequence(0x107D3, 1, 0, 0, kSeqNone, 0, 0, 0);
- }
- } else {
- if (sequenceId >= 0 && sequenceId != -1) {
- _plat->_sequenceId = ridToEntryIndex(sequenceId);
- _plat->_sequenceDatNum = ridToDatIndex(sequenceId);
- if (_plat->_sequenceId == 0x7C2) {
- _plat->_idleFacing = kDirNone;
- } else if (_plat->_sequenceId == 0x7D2) {
- _plat->_idleFacing = kDirUnk4;
- }
+ while (_walkDirXIncr < _walkDeltaX) {
+ _walkNodes[_walkNodesCount]._gridX1 = gridX + _walkDirX * _walkDirXIncr;
+ _walkNodes[_walkNodesCount]._gridY1 = _walkDestY;
+ if (!_vm->isPointBlocked(_walkDirX + _walkNodes[_walkNodesCount]._gridX1, _walkDestY)) {
+ _walkNodes[_walkNodesCount]._deltaX = _walkDirX;
+ _walkNodes[_walkNodesCount]._deltaY = 0;
+ ++_walkDirXIncr;
+ ++_walkNodesCount;
} else {
- if (_platWalkNodesCount > 0) {
- if (_platWalkNodes[_platWalkNodesCount - 1]._deltaX > 0) {
- _plat->_sequenceId = 0x7C2;
- _plat->_idleFacing = kDirNone;
- } else if (_platWalkNodes[_platWalkNodesCount - 1]._deltaX < 0) {
- _plat->_sequenceId = 0x7D2;
- _plat->_idleFacing = kDirUnk4;
- } else if (_platWalkNodes[0]._deltaX > 0) {
- _plat->_sequenceId = 0x7C2;
- _plat->_idleFacing = kDirNone;
- } else if (_platWalkNodes[0]._deltaX < 0) {
- _plat->_sequenceId = 0x7D2;
- _plat->_idleFacing = kDirUnk4;
- } else {
- _plat->_sequenceId = 0x7D2;
- _plat->_idleFacing = kDirUnk4;
- }
- } else if (_plat->_idleFacing != kDirNone) {
- _plat->_sequenceId = 0x7D2;
- } else {
- _plat->_sequenceId = 0x7C2;
- }
- _plat->_sequenceDatNum = datNum;
+ _walkDeltaX = _walkDirXIncr;
}
+ }
- if (animationIndex < 0) {
- _plat->_id = 20 * _platWalkDestY;
+ while (_walkDirYIncr < _walkDeltaY) {
+ _walkNodes[_walkNodesCount]._gridX1 = _walkDestX;
+ _walkNodes[_walkNodesCount]._gridY1 = gridY + _walkDirY * _walkDirYIncr;
+ if (!_vm->isPointBlocked(_walkDestX, _walkDirY + _walkNodes[_walkNodesCount]._gridY1)) {
+ _walkNodes[_walkNodesCount]._deltaX = 0;
+ _walkNodes[_walkNodesCount]._deltaY = _walkDirY;
+ ++_walkDirYIncr;
+ ++_walkNodesCount;
} else {
- _plat->_id = animationIndex + 20 * _platWalkDestY;
- _gameSys->setAnimation(makeRid(_plat->_sequenceDatNum, _plat->_sequenceId), animationIndex + 20 * _platWalkDestY, animationIndex);
+ _walkDeltaY = _walkDirYIncr;
}
-
- if (flags & 4)
- _gameSys->insertSequence(makeRid(_plat->_sequenceDatNum, _plat->_sequenceId), _plat->_id,
- makeRid(platSequenceDatNum, platSequenceId), platId,
- 9, 0, 0, 0);
- else
- _gameSys->insertSequence(makeRid(_plat->_sequenceDatNum, _plat->_sequenceId), _plat->_id,
- makeRid(platSequenceDatNum, platSequenceId), platId,
- 9, 0, 75 * _platWalkDestX - _plat->_gridX, 48 * _platWalkDestY - _plat->_gridY);
}
- _plat->_pos = Common::Point(_platWalkDestX, _platWalkDestY);
-
- return done;
-}
-
-void GnapEngine::platypusWalkStep() {
- for (int i = 1; i < _gridMaxX; ++i) {
- Common::Point checkPt = Common::Point(_plat->_pos.x + i, _plat->_pos.y);
- if (!isPointBlocked(checkPt)) {
- platypusWalkTo(checkPt, -1, -1, 1);
- break;
- }
-
- checkPt = Common::Point(_plat->_pos.x - i, _plat->_pos.y);
- if (!isPointBlocked(checkPt)) {
- platypusWalkTo(checkPt, -1, -1, 1);
- break;
- }
-
- checkPt = Common::Point(_plat->_pos.x, _plat->_pos.y + 1);
- if (!isPointBlocked(checkPt)) {
- platypusWalkTo(checkPt, -1, -1, 1);
- break;
- }
-
- checkPt = Common::Point(_plat->_pos.x, _plat->_pos.y - 1);
- if (!isPointBlocked(checkPt)) {
- platypusWalkTo(checkPt, -1, -1, 1);
- break;
- }
-
- checkPt = Common::Point(_plat->_pos.x + 1, _plat->_pos.y + 1);
- if (!isPointBlocked(checkPt)) {
- platypusWalkTo(checkPt, -1, -1, 1);
- break;
- }
-
- checkPt = Common::Point(_plat->_pos.x - 1, _plat->_pos.y + 1);
- if (!isPointBlocked(checkPt)) {
- platypusWalkTo(checkPt, -1, -1, 1);
- break;
- }
-
- checkPt = Common::Point(_plat->_pos.x + 1, _plat->_pos.y - 1);
- if (!isPointBlocked(checkPt)) {
- platypusWalkTo(checkPt, -1, -1, 1);
- break;
- }
-
- checkPt = Common::Point(_plat->_pos.x - 1, _plat->_pos.y - 1);
- if (!isPointBlocked(checkPt)) {
- platypusWalkTo(checkPt, -1, -1, 1);
- break;
- }
+ if (gridX + _walkDirX * _walkDirXIncr != _walkDestX || gridY + _walkDirY * _walkDirYIncr != _walkDestY) {
+ _walkDestX = gridX + _walkDirX * _walkDirXIncr;
+ _walkDestY = gridY + _walkDirY * _walkDirYIncr;
+ result = false;
+ } else {
+ result = true;
}
+
+ return result;
}
void GnapEngine::platypusMakeRoom() {
@@ -1425,7 +988,7 @@ void GnapEngine::platypusMakeRoom() {
rndGridX = getRandom(_gridMaxX);
} while (ABS(rndGridX - _plat->_pos.x) > 4 || ABS(rndGridY - _plat->_pos.y) > 3 ||
isPointBlocked(rndGridX, rndGridY));
- platypusWalkTo(Common::Point(rndGridX, rndGridY), -1, -1, 1);
+ _plat->walkTo(Common::Point(rndGridX, rndGridY), -1, -1, 1);
}
} // End of namespace Gnap
diff --git a/engines/gnap/scenes/group0.cpp b/engines/gnap/scenes/group0.cpp
index 8eeb4bf4d4..c16a1e7f45 100644
--- a/engines/gnap/scenes/group0.cpp
+++ b/engines/gnap/scenes/group0.cpp
@@ -95,8 +95,8 @@ void Scene01::run() {
_vm->_plat->initPos(12, 6, kDirUnk4);
_vm->endSceneInit();
if (_vm->isFlag(kGFPlatypus))
- _vm->platypusWalkTo(Common::Point(9, 6), -1, 0x107C2, 1);
- _vm->gnapWalkTo(Common::Point(8, 6), -1, 0x107B9, 1);
+ _vm->_plat->walkTo(Common::Point(9, 6), -1, 0x107C2, 1);
+ _vm->_gnap->walkTo(Common::Point(8, 6), -1, 0x107B9, 1);
} else {
_vm->_gnap->initPos(1, 6, kDirBottomRight);
if (_vm->isFlag(kGFPlatypus))
@@ -158,7 +158,7 @@ void Scene01::run() {
switch (_vm->_verbCursor) {
case LOOK_CURSOR:
_vm->_gnap->_idleFacing = kDirUpLeft;
- if (_vm->gnapWalkTo(_vm->_hotspotsWalkPos[4], 0, _vm->_gnap->getSequenceId(gskIdle, 0, 0) | 0x10000, 1))
+ if (_vm->_gnap->walkTo(_vm->_hotspotsWalkPos[4], 0, _vm->_gnap->getSequenceId(gskIdle, 0, 0) | 0x10000, 1))
_vm->_gnap->_actionStatus = kAS01LookSpaceship;
break;
case GRAB_CURSOR:
@@ -181,7 +181,7 @@ void Scene01::run() {
_vm->playGnapScratchingHead(3, 3);
break;
case GRAB_CURSOR:
- _vm->gnapWalkTo(_vm->_hotspotsWalkPos[2], 0, _vm->_gnap->getSequenceId(gskIdle, 2, 3) | 0x10000, 1);
+ _vm->_gnap->walkTo(_vm->_hotspotsWalkPos[2], 0, _vm->_gnap->getSequenceId(gskIdle, 2, 3) | 0x10000, 1);
_vm->_gnap->_actionStatus = kAS01TakeMud;
break;
case TALK_CURSOR:
@@ -201,17 +201,17 @@ void Scene01::run() {
switch (_vm->_verbCursor) {
case LOOK_CURSOR:
_vm->_gnap->_idleFacing = kDirUpRight;
- _vm->gnapWalkTo(_vm->_hotspotsWalkPos[3], 0, _vm->_gnap->getSequenceId(gskIdle, 7, 2) | 0x10000, 1);
+ _vm->_gnap->walkTo(_vm->_hotspotsWalkPos[3], 0, _vm->_gnap->getSequenceId(gskIdle, 7, 2) | 0x10000, 1);
_vm->_gnap->_actionStatus = kAS01LookPigs;
break;
case GRAB_CURSOR:
_vm->_gnap->_idleFacing = kDirUpRight;
- _vm->gnapWalkTo(_vm->_hotspotsWalkPos[3], 0, _vm->_gnap->getSequenceId(gskIdle, 7, 2) | 0x10000, 1);
+ _vm->_gnap->walkTo(_vm->_hotspotsWalkPos[3], 0, _vm->_gnap->getSequenceId(gskIdle, 7, 2) | 0x10000, 1);
_vm->_gnap->_actionStatus = kAS01UsePigs;
break;
case TALK_CURSOR:
_vm->_gnap->_idleFacing = kDirUpRight;
- _vm->gnapWalkTo(_vm->_hotspotsWalkPos[3], 0, _vm->_gnap->getSequenceId(gskBrainPulsating, 7, 2) | 0x10000, 1);
+ _vm->_gnap->walkTo(_vm->_hotspotsWalkPos[3], 0, _vm->_gnap->getSequenceId(gskBrainPulsating, 7, 2) | 0x10000, 1);
_vm->_gnap->_actionStatus = kAS01LookPigs;
break;
case PLAT_CURSOR:
@@ -225,10 +225,10 @@ void Scene01::run() {
case kHS01ExitTruck:
if (_vm->_gnap->_actionStatus < 0) {
_vm->_isLeavingScene = true;
- _vm->gnapWalkTo(_vm->_hotspotsWalkPos[1], 0, 0x107AB, 1);
+ _vm->_gnap->walkTo(_vm->_hotspotsWalkPos[1], 0, 0x107AB, 1);
_vm->_gnap->_actionStatus = kAS01LeaveScene;
if (_vm->isFlag(kGFPlatypus))
- _vm->platypusWalkTo(_vm->_hotspotsWalkPos[1] + Common::Point(0, 1), -1, 0x107CD, 1);
+ _vm->_plat->walkTo(_vm->_hotspotsWalkPos[1] + Common::Point(0, 1), -1, 0x107CD, 1);
_vm->_newSceneNum = 2;
}
break;
@@ -242,12 +242,12 @@ void Scene01::run() {
case kHS01WalkArea7:
case kHS01WalkArea8:
if (_vm->_gnap->_actionStatus < 0)
- _vm->gnapWalkTo(Common::Point(-1, -1), -1, -1, 1);
+ _vm->_gnap->walkTo(Common::Point(-1, -1), -1, -1, 1);
break;
default:
if (_vm->_mouseClickState._left && _vm->_gnap->_actionStatus < 0) {
- _vm->gnapWalkTo(Common::Point(-1, -1), -1, -1, 1);
+ _vm->_gnap->walkTo(Common::Point(-1, -1), -1, -1, 1);
_vm->_mouseClickState._left = false;
}
break;
@@ -417,17 +417,17 @@ void Scene02::run() {
_vm->_plat->initPos(12, 6, kDirUnk4);
_vm->endSceneInit();
if (_vm->isFlag(kGFPlatypus))
- _vm->platypusWalkTo(Common::Point(9, 6), -1, 0x107C2, 1);
- _vm->gnapWalkTo(Common::Point(8, 6), -1, 0x107BA, 1);
+ _vm->_plat->walkTo(Common::Point(9, 6), -1, 0x107C2, 1);
+ _vm->_gnap->walkTo(Common::Point(8, 6), -1, 0x107BA, 1);
break;
case 4:
_vm->_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);
_vm->endSceneInit();
- _vm->gnapWalkTo(Common::Point(7, 6), 0, 0x107B9, 1);
+ _vm->_gnap->walkTo(Common::Point(7, 6), 0, 0x107B9, 1);
if (_vm->isFlag(kGFPlatypus))
- _vm->platypusWalkTo(Common::Point(8, 6), 1, 0x107C2, 1);
+ _vm->_plat->walkTo(Common::Point(8, 6), 1, 0x107C2, 1);
updateHotspots();
gameSys.waitForUpdate();
break;
@@ -449,8 +449,8 @@ void Scene02::run() {
_vm->_plat->initPos(-1, 7, kDirNone);
_vm->endSceneInit();
if (_vm->isFlag(kGFPlatypus))
- _vm->platypusWalkTo(Common::Point(2, 7), -1, 0x107C2, 1);
- _vm->gnapWalkTo(Common::Point(2, 8), -1, 0x107B9, 1);
+ _vm->_plat->walkTo(Common::Point(2, 7), -1, 0x107C2, 1);
+ _vm->_gnap->walkTo(Common::Point(2, 8), -1, 0x107B9, 1);
break;
}
@@ -505,7 +505,7 @@ void Scene02::run() {
if (_vm->_grabCursorSpriteIndex == kItemTwig) {
_vm->_gnap->_idleFacing = kDirUpRight;
Common::Point destPos = Common::Point(_vm->_hotspotsWalkPos[_vm->_sceneClickedHotspot].x, _vm->_hotspotsWalkPos[_vm->_sceneClickedHotspot].y + 1);
- _vm->gnapWalkTo(destPos, 0, _vm->_gnap->getSequenceId(gskIdle, 0, 0) | 0x10000, 1);
+ _vm->_gnap->walkTo(destPos, 0, _vm->_gnap->getSequenceId(gskIdle, 0, 0) | 0x10000, 1);
_vm->_gnap->_actionStatus = kAS02UseTwigWithChicken;
} else if (_vm->_grabCursorSpriteIndex >= 0) {
_vm->playGnapShowCurrItem(_vm->_hotspotsWalkPos[1].x, _vm->_hotspotsWalkPos[1].y + 1, 9, 8);
@@ -516,14 +516,14 @@ void Scene02::run() {
break;
case GRAB_CURSOR:
_vm->_gnap->_idleFacing = kDirBottomRight;
- if (_vm->gnapWalkTo(_vm->_hotspotsWalkPos[1], 0, _vm->_gnap->getSequenceId(gskIdle, 0, 0) | 0x10000, 1))
+ if (_vm->_gnap->walkTo(_vm->_hotspotsWalkPos[1], 0, _vm->_gnap->getSequenceId(gskIdle, 0, 0) | 0x10000, 1))
_vm->_gnap->_actionStatus = kAS02GrabChicken;
else
_vm->_gnap->_actionStatus = -1;
break;
case TALK_CURSOR:
_vm->_gnap->_idleFacing = kDirBottomRight;
- _vm->gnapWalkTo(_vm->_hotspotsWalkPos[1], 0, _vm->_gnap->getSequenceId(gskBrainPulsating, 0, 0) | 0x10000, 1);
+ _vm->_gnap->walkTo(_vm->_hotspotsWalkPos[1], 0, _vm->_gnap->getSequenceId(gskBrainPulsating, 0, 0) | 0x10000, 1);
_vm->_gnap->_actionStatus = kAS02TalkChicken;
break;
case PLAT_CURSOR:
@@ -538,7 +538,7 @@ void Scene02::run() {
case kHS02Truck2:
if (_vm->_gnap->_actionStatus < 0) {
if (_vm->_grabCursorSpriteIndex == kItemKeys) {
- if (_vm->gnapWalkTo(_vm->_hotspotsWalkPos[3], 0, _vm->_gnap->getSequenceId(gskIdle, 2, 2) | 0x10000, 1)) {
+ if (_vm->_gnap->walkTo(_vm->_hotspotsWalkPos[3], 0, _vm->_gnap->getSequenceId(gskIdle, 2, 2) | 0x10000, 1)) {
_vm->setGrabCursorSprite(-1);
_vm->invRemove(kItemKeys);
if (_vm->isFlag(kGFTruckFilledWithGas))
@@ -548,7 +548,7 @@ void Scene02::run() {
}
} else if (_vm->_grabCursorSpriteIndex == kItemGas) {
_vm->_hotspots[kHS02WalkArea4]._flags |= SF_WALKABLE;
- if (_vm->gnapWalkTo(_vm->_hotspotsWalkPos[2], 0, _vm->_gnap->getSequenceId(gskIdle, 2, 2) | 0x10000, 1))
+ if (_vm->_gnap->walkTo(_vm->_hotspotsWalkPos[2], 0, _vm->_gnap->getSequenceId(gskIdle, 2, 2) | 0x10000, 1))
_vm->_gnap->_actionStatus = kAS02UseGasWithTruck;
_vm->_hotspots[kHS02WalkArea4]._flags &= ~SF_WALKABLE;
} else if (_vm->_grabCursorSpriteIndex >= 0) {
@@ -560,7 +560,7 @@ void Scene02::run() {
break;
case GRAB_CURSOR:
if (_vm->isFlag(kGFTruckKeysUsed)) {
- if (_vm->gnapWalkTo(_vm->_hotspotsWalkPos[3], 0, _vm->_gnap->getSequenceId(gskIdle, 2, 2) | 0x10000, 1)) {
+ if (_vm->_gnap->walkTo(_vm->_hotspotsWalkPos[3], 0, _vm->_gnap->getSequenceId(gskIdle, 2, 2) | 0x10000, 1)) {
if (_vm->isFlag(kGFTruckFilledWithGas))
_vm->_gnap->_actionStatus = kAS02UseTruckGas;
else
@@ -568,7 +568,7 @@ void Scene02::run() {
}
} else {
_vm->_gnap->_idleFacing = kDirUnk4;
- if (_vm->gnapWalkTo(_vm->_hotspotsWalkPos[3], 0, _vm->_gnap->getSequenceId(gskIdle, 2, 2) | 0x10000, 1))
+ if (_vm->_gnap->walkTo(_vm->_hotspotsWalkPos[3], 0, _vm->_gnap->getSequenceId(gskIdle, 2, 2) | 0x10000, 1))
_vm->_gnap->_actionStatus = kAS02UseTruckNoKeys;
}
break;
@@ -592,7 +592,7 @@ void Scene02::run() {
break;
case GRAB_CURSOR:
_vm->_gnap->_idleFacing = kDirUpRight;
- _vm->gnapWalkTo(_vm->_hotspotsWalkPos[4], 0, _vm->_gnap->getSequenceId(gskIdle, 0, 0) | 0x10000, 1);
+ _vm->_gnap->walkTo(_vm->_hotspotsWalkPos[4], 0, _vm->_gnap->getSequenceId(gskIdle, 0, 0) | 0x10000, 1);
_vm->_gnap->_actionStatus = kAS02GrabTruckGrill;
break;
case TALK_CURSOR:
@@ -607,10 +607,10 @@ void Scene02::run() {
case kHS02ExitHouse:
if (_vm->_gnap->_actionStatus < 0) {
_vm->_isLeavingScene = true;
- _vm->gnapWalkTo(_vm->_hotspotsWalkPos[6], 0, 0x107AD, 1);
+ _vm->_gnap->walkTo(_vm->_hotspotsWalkPos[6], 0, 0x107AD, 1);
_vm->_gnap->_actionStatus = kAS02LeaveScene;
if (_vm->isFlag(kGFPlatypus))
- _vm->platypusWalkTo(_vm->_hotspotsWalkPos[6] + Common::Point(1, 0), -1, 0x107C1, 1);
+ _vm->_plat->walkTo(_vm->_hotspotsWalkPos[6] + Common::Point(1, 0), -1, 0x107C1, 1);
updateHotspots();
_vm->_newSceneNum = 4;
}
@@ -619,10 +619,10 @@ void Scene02::run() {
case kHS02ExitBarn:
if (_vm->_gnap->_actionStatus < 0) {
_vm->_isLeavingScene = true;
- _vm->gnapWalkTo(_vm->_hotspotsWalkPos[7], 0, 0x107AD, 1);
+ _vm->_gnap->walkTo(_vm->_hotspotsWalkPos[7], 0, 0x107AD, 1);
_vm->_gnap->_actionStatus = kAS02LeaveScene;
if (_vm->isFlag(kGFPlatypus))
- _vm->platypusWalkTo(_vm->_hotspotsWalkPos[7] + Common::Point(1, 0), -1, 0x107C1, 1);
+ _vm->_plat->walkTo(_vm->_hotspotsWalkPos[7] + Common::Point(1, 0), -1, 0x107C1, 1);
updateHotspots();
_vm->_newSceneNum = 5;
}
@@ -631,10 +631,10 @@ void Scene02::run() {
case kHS02ExitCreek:
if (_vm->_gnap->_actionStatus < 0) {
_vm->_isLeavingScene = true;
- _vm->gnapWalkTo(_vm->_hotspotsWalkPos[8], 0, 0x107AB, 1);
+ _vm->_gnap->walkTo(_vm->_hotspotsWalkPos[8], 0, 0x107AB, 1);
_vm->_gnap->_actionStatus = kAS02LeaveScene;
if (_vm->isFlag(kGFPlatypus))
- _vm->platypusWalkTo(_vm->_hotspotsWalkPos[8], -1, 0x107CD, 1);
+ _vm->_plat->walkTo(_vm->_hotspotsWalkPos[8], -1, 0x107CD, 1);
_vm->_newSceneNum = 3;
}
break;
@@ -642,10 +642,10 @@ void Scene02::run() {
case kHS02ExitPigpen:
if (_vm->_gnap->_actionStatus < 0) {
_vm->_isLeavingScene = true;
- _vm->gnapWalkTo(_vm->_hotspotsWalkPos[9], 0, 0x107AF, 1);
+ _vm->_gnap->walkTo(_vm->_hotspotsWalkPos[9], 0, 0x107AF, 1);
_vm->_gnap->_actionStatus = kAS02LeaveScene;
if (_vm->isFlag(kGFPlatypus))
- _vm->platypusWalkTo(_vm->_hotspotsWalkPos[9], -1, 0x107CF, 1);
+ _vm->_plat->walkTo(_vm->_hotspotsWalkPos[9], -1, 0x107CF, 1);
_vm->_newSceneNum = 1;
}
break;
@@ -655,12 +655,12 @@ void Scene02::run() {
case kHS02WalkArea3:
case kHS02WalkArea4:
if (_vm->_gnap->_actionStatus < 0)
- _vm->gnapWalkTo(Common::Point(-1, -1), -1, -1, 1);
+ _vm->_gnap->walkTo(Common::Point(-1, -1), -1, -1, 1);
break;
default:
if (_vm->_mouseClickState._left && _vm->_gnap->_actionStatus < 0) {
- _vm->gnapWalkTo(Common::Point(-1, -1), -1, -1, 1);
+ _vm->_gnap->walkTo(Common::Point(-1, -1), -1, -1, 1);
_vm->_mouseClickState._left = false;
}
break;
@@ -925,8 +925,8 @@ void Scene03::run() {
_vm->endSceneInit();
if (_vm->isFlag(kGFPlatypus))
- _vm->platypusWalkTo(Common::Point(4, 7), -1, 0x107C2, 1);
- _vm->gnapWalkTo(Common::Point(3, 6), -1, 0x107B9, 1);
+ _vm->_plat->walkTo(Common::Point(4, 7), -1, 0x107C2, 1);
+ _vm->_gnap->walkTo(Common::Point(3, 6), -1, 0x107B9, 1);
while (!_vm->_sceneDone) {
_vm->updateMouseCursor();
@@ -968,7 +968,7 @@ void Scene03::run() {
case kHS03Grass:
if (_vm->_gnap->_actionStatus < 0) {
if (_vm->isFlag(kGFGrassTaken)) {
- _vm->gnapWalkTo(Common::Point(-1, -1), -1, -1, 1);
+ _vm->_gnap->walkTo(Common::Point(-1, -1), -1, -1, 1);
} else if (_vm->_grabCursorSpriteIndex >= 0) {
_vm->playGnapShowItem(_vm->_grabCursorSpriteIndex, 9, 6);
} else {
@@ -996,10 +996,10 @@ void Scene03::run() {
if (_vm->_gnap->_actionStatus < 0) {
_vm->_isLeavingScene = true;
_vm->_hotspots[kHS03PlatypusWalkArea]._flags |= SF_WALKABLE;
- _vm->gnapWalkTo(_vm->_hotspotsWalkPos[2], 0, 0x107AD, 1);
+ _vm->_gnap->walkTo(_vm->_hotspotsWalkPos[2], 0, 0x107AD, 1);
_vm->_gnap->_actionStatus = kAS03LeaveScene;
if (_vm->isFlag(kGFPlatypus))
- _vm->platypusWalkTo(_vm->_hotspotsWalkPos[2], -1, 0x107C2, 1);
+ _vm->_plat->walkTo(_vm->_hotspotsWalkPos[2], -1, 0x107C2, 1);
_vm->_hotspots[kHS03PlatypusWalkArea]._flags &= ~SF_WALKABLE;
if (_vm->_cursorValue == 1)
_vm->_newSceneNum = 2;
@@ -1020,7 +1020,7 @@ void Scene03::run() {
case GRAB_CURSOR:
if (!_vm->isFlag(kGFPlatypus))
_vm->_hotspots[kHS03PlatypusWalkArea]._flags |= SF_WALKABLE;
- if (_vm->gnapWalkTo(_vm->_hotspotsWalkPos[3], 0, _vm->_gnap->getSequenceId(gskIdle, _vm->_hotspotsWalkPos[3].x + 1, _vm->_hotspotsWalkPos[3].y + 1) | 0x10000, 1))
+ if (_vm->_gnap->walkTo(_vm->_hotspotsWalkPos[3], 0, _vm->_gnap->getSequenceId(gskIdle, _vm->_hotspotsWalkPos[3].x + 1, _vm->_hotspotsWalkPos[3].y + 1) | 0x10000, 1))
_vm->_gnap->_actionStatus = kAS03GrabCreek;
if (!_vm->isFlag(kGFPlatypus))
_vm->_hotspots[kHS03PlatypusWalkArea]._flags &= ~SF_WALKABLE;
@@ -1037,7 +1037,7 @@ void Scene03::run() {
case kHS03TrappedPlatypus:
if (_vm->_gnap->_actionStatus < 0) {
if (_vm->isFlag(kGFPlatypus)) {
- _vm->gnapWalkTo(Common::Point(-1, -1), -1, -1, 1);
+ _vm->_gnap->walkTo(Common::Point(-1, -1), -1, -1, 1);
} else if (_vm->_grabCursorSpriteIndex >= 0) {
_vm->playGnapShowItem(_vm->_grabCursorSpriteIndex, 8, 4);
} else {
@@ -1047,10 +1047,10 @@ void Scene03::run() {
break;
case GRAB_CURSOR:
if (_platypusHypnotized) {
- _vm->gnapWalkTo(Common::Point(7, 6), 0, 0x107B5, 1);
+ _vm->_gnap->walkTo(Common::Point(7, 6), 0, 0x107B5, 1);
_vm->_gnap->_actionStatus = kAS03FreePlatypus;
} else {
- _vm->gnapWalkTo(_vm->_hotspotsWalkPos[4], 0, _vm->_gnap->getSequenceId(gskIdle, 0, 0) | 0x10000, 1);
+ _vm->_gnap->walkTo(_vm->_hotspotsWalkPos[4], 0, _vm->_gnap->getSequenceId(gskIdle, 0, 0) | 0x10000, 1);
if (_platypusScared)
_vm->_gnap->_actionStatus = kAS03GrabScaredPlatypus;
else
@@ -1062,7 +1062,7 @@ void Scene03::run() {
_vm->playGnapBrainPulsating(8, 4);
} else {
_vm->_gnap->_idleFacing = kDirBottomRight;
- _vm->gnapWalkTo(_vm->_hotspotsWalkPos[4], 0, _vm->_gnap->getSequenceId(gskIdle, 0, 0) | 0x10000, 1);
+ _vm->_gnap->walkTo(_vm->_hotspotsWalkPos[4], 0, _vm->_gnap->getSequenceId(gskIdle, 0, 0) | 0x10000, 1);
if (_platypusScared)
_vm->_gnap->_actionStatus = kAS03HypnotizeScaredPlat;
else
@@ -1088,15 +1088,15 @@ void Scene03::run() {
case kHS03WalkAreas2:
case kHS03WalkAreas3:
if (_vm->_gnap->_actionStatus < 0)
- _vm->gnapWalkTo(Common::Point(-1, -1), -1, -1, 1);
+ _vm->_gnap->walkTo(Common::Point(-1, -1), -1, -1, 1);
break;
case kHS03PlatypusWalkArea:
if (_vm->_gnap->_actionStatus < 0) {
if (_vm->isFlag(kGFPlatypus) || _platypusHypnotized) {
- _vm->gnapWalkTo(Common::Point(-1, -1), -1, -1, 1);
+ _vm->_gnap->walkTo(Common::Point(-1, -1), -1, -1, 1);
} else {
- _vm->gnapWalkTo(_vm->_hotspotsWalkPos[4], 0, 0x107B5, 1);
+ _vm->_gnap->walkTo(_vm->_hotspotsWalkPos[4], 0, 0x107B5, 1);
if (_platypusScared)
_vm->_gnap->_actionStatus = kAS03GrabScaredPlatypus;
else
@@ -1107,7 +1107,7 @@ void Scene03::run() {
default:
if (_vm->_mouseClickState._left && _vm->_gnap->_actionStatus < 0) {
- _vm->gnapWalkTo(Common::Point(-1, -1), -1, -1, 1);
+ _vm->_gnap->walkTo(Common::Point(-1, -1), -1, -1, 1);
_vm->_mouseClickState._left = false;
}
break;
@@ -1406,8 +1406,8 @@ void Scene04::run() {
_vm->_plat->initPos(6, 11, kDirUpLeft);
_vm->endSceneInit();
if (_vm->isFlag(kGFPlatypus))
- _vm->platypusWalkTo(Common::Point(5, 8), -1, 0x107C2, 1);
- _vm->gnapWalkTo(Common::Point(6, 9), -1, 0x107BA, 1);
+ _vm->_plat->walkTo(Common::Point(5, 8), -1, 0x107C2, 1);
+ _vm->_gnap->walkTo(Common::Point(6, 9), -1, 0x107BA, 1);
} else if (_vm->_prevSceneNum == 38) {
_vm->_gnap->initPos(5, 7, kDirBottomRight);
_vm->_plat->initPos(4, 7, kDirNone);
@@ -1418,8 +1418,8 @@ void Scene04::run() {
_vm->_plat->initPos(12, 8, kDirNone);
_vm->endSceneInit();
if (_vm->isFlag(kGFPlatypus))
- _vm->platypusWalkTo(Common::Point(9, 8), -1, 0x107C2, 1);
- _vm->gnapWalkTo(Common::Point(9, 9), -1, 0x107BA, 1);
+ _vm->_plat->walkTo(Common::Point(9, 8), -1, 0x107C2, 1);
+ _vm->_gnap->walkTo(Common::Point(9, 9), -1, 0x107BA, 1);
}
}
@@ -1507,7 +1507,7 @@ void Scene04::run() {
break;
case GRAB_CURSOR:
_vm->_gnap->_idleFacing = kDirUpRight;
- _vm->gnapWalkTo(_vm->_hotspotsWalkPos[3], 0, _vm->_gnap->getSequenceId(gskIdle, 0, 0) | 0x10000, 1);
+ _vm->_gnap->walkTo(_vm->_hotspotsWalkPos[3], 0, _vm->_gnap->getSequenceId(gskIdle, 0, 0) | 0x10000, 1);
_vm->_gnap->_actionStatus = kAS04GrabAxe;
_vm->setFlag(kGFPlatypusTalkingToAssistant);
updateHotspots();
@@ -1528,19 +1528,19 @@ void Scene04::run() {
} else {
switch (_vm->_verbCursor) {
case LOOK_CURSOR:
- if (_vm->gnapWalkTo(_vm->_gnap->_pos, 0, -1, 1)) {
+ if (_vm->_gnap->walkTo(_vm->_gnap->_pos, 0, -1, 1)) {
_vm->playGnapMoan2(_vm->_hotspotsWalkPos[2].x, _vm->_hotspotsWalkPos[2].y);
_nextDogSequenceId = 0x20F;
}
break;
case GRAB_CURSOR:
_vm->_gnap->_idleFacing = kDirBottomRight;
- if (_vm->gnapWalkTo(_vm->_hotspotsWalkPos[2], 0, _vm->_gnap->getSequenceId(gskIdle, 0, 0) | 0x10000, 1))
+ if (_vm->_gnap->walkTo(_vm->_hotspotsWalkPos[2], 0, _vm->_gnap->getSequenceId(gskIdle, 0, 0) | 0x10000, 1))
_vm->_gnap->_actionStatus = kAS04GrabDog;
break;
case TALK_CURSOR:
_vm->_gnap->_idleFacing = kDirBottomRight;
- if (_vm->gnapWalkTo(_vm->_gnap->_pos, 0, -1, 1)) {
+ if (_vm->_gnap->walkTo(_vm->_gnap->_pos, 0, -1, 1)) {
_vm->playGnapBrainPulsating(_vm->_hotspotsWalkPos[2].x, _vm->_hotspotsWalkPos[2].y);
_nextDogSequenceId = 0x20E;
}
@@ -1565,13 +1565,13 @@ void Scene04::run() {
break;
case GRAB_CURSOR:
if (_vm->_cursorValue == 1) {
- _vm->gnapWalkTo(_vm->_hotspotsWalkPos[4], 0, 0x107BC, 1);
+ _vm->_gnap->walkTo(_vm->_hotspotsWalkPos[4], 0, 0x107BC, 1);
_vm->_gnap->_actionStatus = kAS04OpenDoor;
_vm->_timers[5] = 300;
_vm->_gnap->_idleFacing = kDirUpLeft;
} else {
_vm->_isLeavingScene = true;
- _vm->gnapWalkTo(_vm->_hotspotsWalkPos[4], 0, 0x107BC, 1);
+ _vm->_gnap->walkTo(_vm->_hotspotsWalkPos[4], 0, 0x107BC, 1);
_vm->_gnap->_actionStatus = kAS04LeaveScene;
_vm->_newSceneNum = 38;
}
@@ -1587,10 +1587,10 @@ void Scene04::run() {
case kHS04ExitTruck:
if (_vm->_gnap->_actionStatus < 0) {
_vm->_isLeavingScene = true;
- _vm->gnapWalkTo(_vm->_hotspotsWalkPos[5], 0, 0x107AE, 1);
+ _vm->_gnap->walkTo(_vm->_hotspotsWalkPos[5], 0, 0x107AE, 1);
_vm->_gnap->_actionStatus = kAS04LeaveScene;
if (_vm->isFlag(kGFPlatypus))
- _vm->platypusWalkTo(_vm->_hotspotsWalkPos[5], -1, 0x107C7, 1);
+ _vm->_plat->walkTo(_vm->_hotspotsWalkPos[5], -1, 0x107C7, 1);
if (_vm->_cursorValue == 1)
_vm->_newSceneNum = 2;
else
@@ -1607,7 +1607,7 @@ void Scene04::run() {
} else {
switch (_vm->_verbCursor) {
case LOOK_CURSOR:
- if (_vm->gnapWalkTo(_vm->_hotspotsWalkPos[7], 0, _vm->_gnap->getSequenceId(gskIdle, 10, 2) | 0x10000, 1)) {
+ if (_vm->_gnap->walkTo(_vm->_hotspotsWalkPos[7], 0, _vm->_gnap->getSequenceId(gskIdle, 10, 2) | 0x10000, 1)) {
if (_triedWindow) {
_vm->_gnap->_actionStatus = kAS04GetKeyAnother;
} else {
@@ -1631,10 +1631,10 @@ void Scene04::run() {
case kHS04ExitBarn:
if (_vm->_gnap->_actionStatus < 0) {
_vm->_isLeavingScene = true;
- _vm->gnapWalkTo(_vm->_hotspotsWalkPos[8], 0, 0x107AB, 1);
+ _vm->_gnap->walkTo(_vm->_hotspotsWalkPos[8], 0, 0x107AB, 1);
_vm->_gnap->_actionStatus = kAS04LeaveScene;
if (_vm->isFlag(kGFPlatypus))
- _vm->platypusWalkTo(_vm->_hotspotsWalkPos[8] + Common::Point(0, 1), -1, 0x107C1, 1);
+ _vm->_plat->walkTo(_vm->_hotspotsWalkPos[8] + Common::Point(0, 1), -1, 0x107C1, 1);
if (_vm->_cursorValue == 1)
_vm->_newSceneNum = 5;
else
@@ -1645,12 +1645,12 @@ void Scene04::run() {
case kHS04WalkArea1:
case kHS04WalkArea2:
if (_vm->_gnap->_actionStatus < 0)
- _vm->gnapWalkTo(Common::Point(-1, -1), -1, -1, 1);
+ _vm->_gnap->walkTo(Common::Point(-1, -1), -1, -1, 1);
break;
default:
if (_vm->_mouseClickState._left && _vm->_gnap->_actionStatus < 0) {
- _vm->gnapWalkTo(Common::Point(-1, -1), -1, -1, 1);
+ _vm->_gnap->walkTo(Common::Point(-1, -1), -1, -1, 1);
_vm->_mouseClickState._left = false;
}
break;
@@ -1889,8 +1889,8 @@ void Scene05::run() {
_vm->_plat->initPos(-1, 9, kDirNone);
_vm->endSceneInit();
if (_vm->isFlag(kGFPlatypus))
- _vm->platypusWalkTo(Common::Point(2, 8), -1, 0x107C2, 1);
- _vm->gnapWalkTo(Common::Point(2, 9), -1, 0x107B9, 1);
+ _vm->_plat->walkTo(Common::Point(2, 8), -1, 0x107C2, 1);
+ _vm->_gnap->walkTo(Common::Point(2, 9), -1, 0x107B9, 1);
} else {
_vm->_gnap->initPos(6, 8, kDirBottomRight);
if (_vm->isFlag(kGFPlatypus))
@@ -1962,12 +1962,12 @@ void Scene05::run() {
case PLAT_CURSOR:
if (_vm->isFlag(kGFPlatypus)) {
_vm->_gnap->useDeviceOnPlatypus();
- if (_vm->platypusWalkTo(_vm->_hotspotsWalkPos[1], 1, 0x107C2, 1)) {
+ if (_vm->_plat->walkTo(_vm->_hotspotsWalkPos[1], 1, 0x107C2, 1)) {
_vm->_plat->_actionStatus = kAS05PlatSearchHaystack;
_vm->_plat->_idleFacing = kDirUnk4;
}
if (_vm->_gnap->_pos.x == 4 && (_vm->_gnap->_pos.y == 8 || _vm->_gnap->_pos.y == 7))
- _vm->gnapWalkStep();
+ _vm->_gnap->walkStep();
_vm->playGnapIdle(_vm->_plat->_pos.x, _vm->_plat->_pos.y);
}
break;
@@ -1981,7 +1981,7 @@ void Scene05::run() {
if (_vm->_grabCursorSpriteIndex == kItemTwig) {
_vm->_gnap->_idleFacing = kDirUpRight;
Common::Point checkPt = _vm->_hotspotsWalkPos[_vm->_sceneClickedHotspot] + Common::Point(0, 1);
- _vm->gnapWalkTo(checkPt, 0, _vm->_gnap->getSequenceId(gskIdle, 0, 0) | 0x10000, 1);
+ _vm->_gnap->walkTo(checkPt, 0, _vm->_gnap->getSequenceId(gskIdle, 0, 0) | 0x10000, 1);
_vm->_gnap->_actionStatus = kAS05UseTwigWithChicken;
} else if (_vm->_grabCursorSpriteIndex >= 0)
_vm->playGnapShowCurrItem(_vm->_hotspotsWalkPos[_vm->_sceneClickedHotspot].x, _vm->_hotspotsWalkPos[_vm->_sceneClickedHotspot].y + 1, 9, 7);
@@ -1992,12 +1992,12 @@ void Scene05::run() {
break;
case GRAB_CURSOR:
_vm->_gnap->_idleFacing = kDirBottomRight;
- _vm->gnapWalkTo(_vm->_hotspotsWalkPos[5], 0, _vm->_gnap->getSequenceId(gskIdle, 0, 0) | 0x10000, 1);
+ _vm->_gnap->walkTo(_vm->_hotspotsWalkPos[5], 0, _vm->_gnap->getSequenceId(gskIdle, 0, 0) | 0x10000, 1);
_vm->_gnap->_actionStatus = kAS05GrabChicken;
break;
case TALK_CURSOR:
_vm->_gnap->_idleFacing = kDirBottomRight;
- _vm->gnapWalkTo(_vm->_hotspotsWalkPos[5], 0, _vm->_gnap->getSequenceId(gskBrainPulsating, 0, 0) | 0x10000, 1);
+ _vm->_gnap->walkTo(_vm->_hotspotsWalkPos[5], 0, _vm->_gnap->getSequenceId(gskBrainPulsating, 0, 0) | 0x10000, 1);
_vm->_gnap->_actionStatus = kAS05TalkChicken;
break;
case PLAT_CURSOR:
@@ -2019,7 +2019,7 @@ void Scene05::run() {
break;
case GRAB_CURSOR:
_vm->_gnap->_idleFacing = kDirBottomLeft;
- _vm->gnapWalkTo(_vm->_hotspotsWalkPos[3], 0, _vm->_gnap->getSequenceId(gskIdle, 0, 0) | 0x10000, 1);
+ _vm->_gnap->walkTo(_vm->_hotspotsWalkPos[3], 0, _vm->_gnap->getSequenceId(gskIdle, 0, 0) | 0x10000, 1);
_vm->_gnap->_actionStatus = kAS05GrabLadder;
break;
case TALK_CURSOR:
@@ -2035,7 +2035,7 @@ void Scene05::run() {
if (_vm->isFlag(kGFBarnPadlockOpen)) {
_vm->_isLeavingScene = true;
Common::Point destPt = _vm->_hotspotsWalkPos[2] + Common::Point(- 1, 1);
- _vm->gnapWalkTo(destPt, 0, -1, 1);
+ _vm->_gnap->walkTo(destPt, 0, -1, 1);
_vm->_gnap->_actionStatus = kAS05EnterBarn;
if (_vm->_cursorValue == 1)
_vm->_newSceneNum = 6;
@@ -2043,7 +2043,7 @@ void Scene05::run() {
_vm->_newSceneNum = 36;
} else if (_vm->_gnap->_actionStatus < 0) {
if (_vm->_grabCursorSpriteIndex == kItemNeedle) {
- if (_vm->gnapWalkTo(_vm->_hotspotsWalkPos[2], 0,
+ if (_vm->_gnap->walkTo(_vm->_hotspotsWalkPos[2], 0,
_vm->_gnap->getSequenceId(gskIdle, _vm->_hotspotsWalkPos[2].x, _vm->_hotspotsWalkPos[2].y) | 0x10000, 1))
_vm->_gnap->_actionStatus = kAS05PickPadlock;
} else if (_vm->_grabCursorSpriteIndex >= 0) {
@@ -2055,7 +2055,7 @@ void Scene05::run() {
break;
case GRAB_CURSOR:
_vm->_gnap->_idleFacing = kDirUpRight;
- _vm->gnapWalkTo(_vm->_hotspotsWalkPos[_vm->_sceneClickedHotspot], 0, _vm->_gnap->getSequenceId(gskIdle, 0, 0) | 0x10000, 1);
+ _vm->_gnap->walkTo(_vm->_hotspotsWalkPos[_vm->_sceneClickedHotspot], 0, _vm->_gnap->getSequenceId(gskIdle, 0, 0) | 0x10000, 1);
_vm->_gnap->_actionStatus = kAS05TryPickPadlock;
break;
case TALK_CURSOR:
@@ -2070,10 +2070,10 @@ void Scene05::run() {
case kHS05ExitHouse:
if (_vm->_gnap->_actionStatus < 0) {
_vm->_isLeavingScene = true;
- _vm->gnapWalkTo(_vm->_hotspotsWalkPos[4], 0, 0x107AF, 1);
+ _vm->_gnap->walkTo(_vm->_hotspotsWalkPos[4], 0, 0x107AF, 1);
_vm->_gnap->_actionStatus = kAS05LeaveScene;
if (_vm->isFlag(kGFPlatypus))
- _vm->platypusWalkTo(_vm->_hotspotsWalkPos[4] + Common::Point(0, 1), -1, 0x107C7, 1);
+ _vm->_plat->walkTo(_vm->_hotspotsWalkPos[4] + Common::Point(0, 1), -1, 0x107C7, 1);
if (_vm->_cursorValue == 1)
_vm->_newSceneNum = 4;
else
@@ -2084,7 +2084,7 @@ void Scene05::run() {
case kHS05WalkArea1:
case kHS05WalkArea2:
if (_vm->_gnap->_actionStatus < 0)
- _vm->gnapWalkTo(Common::Point(-1, -1), -1, -1, 1);
+ _vm->_gnap->walkTo(Common::Point(-1, -1), -1, -1, 1);
break;
case kHS05WalkArea3:
@@ -2093,7 +2093,7 @@ void Scene05::run() {
default:
if (_vm->_mouseClickState._left && _vm->_gnap->_actionStatus < 0) {
- _vm->gnapWalkTo(Common::Point(-1, -1), -1, -1, 1);
+ _vm->_gnap->walkTo(Common::Point(-1, -1), -1, -1, 1);
_vm->_mouseClickState._left = false;
}
break;
@@ -2319,8 +2319,8 @@ void Scene06::run() {
_vm->_plat->initPos(6, 12, kDirNone);
_vm->endSceneInit();
- _vm->platypusWalkTo(Common::Point(6, 8), -1, 0x107C2, 1);
- _vm->gnapWalkTo(Common::Point(5, 8), -1, 0x107B9, 1);
+ _vm->_plat->walkTo(Common::Point(6, 8), -1, 0x107C2, 1);
+ _vm->_gnap->walkTo(Common::Point(5, 8), -1, 0x107B9, 1);
while (!_vm->_sceneDone) {
_vm->updateMouseCursor();
@@ -2382,7 +2382,7 @@ void Scene06::run() {
_vm->playGnapImpossible(0, 0);
} else if (triedDeviceOnGas) {
_vm->_hotspots[kHS06WalkArea5]._flags |= SF_WALKABLE;
- _vm->gnapWalkTo(_vm->_hotspotsWalkPos[1], 0, 0x107BC, 1);
+ _vm->_gnap->walkTo(_vm->_hotspotsWalkPos[1], 0, 0x107BC, 1);
_vm->_hotspots[kHS06WalkArea5]._flags &= ~SF_WALKABLE;
_vm->_gnap->_actionStatus = kAS06TryToGetGas;
} else {
@@ -2415,7 +2415,7 @@ void Scene06::run() {
if (_vm->isFlag(kGFGasTaken))
_vm->playGnapImpossible(0, 0);
else {
- _vm->gnapWalkTo(_vm->_hotspotsWalkPos[2], 0, 0x107BB, 1);
+ _vm->_gnap->walkTo(_vm->_hotspotsWalkPos[2], 0, 0x107BB, 1);
_vm->_gnap->_actionStatus = kAS06TryToClimbLadder;
_vm->setFlag(kGFGasTaken);
}
@@ -2433,10 +2433,10 @@ void Scene06::run() {
if (_vm->_gnap->_actionStatus < 0) {
if (_vm->_grabCursorSpriteIndex == kItemTwig && _horseTurnedBack) {
_vm->_hotspots[kHS06WalkArea5]._flags |= SF_WALKABLE;
- _vm->gnapWalkTo(_vm->_hotspotsWalkPos[3], 0, 0x107BC, 1);
+ _vm->_gnap->walkTo(_vm->_hotspotsWalkPos[3], 0, 0x107BC, 1);
_vm->_hotspots[kHS06WalkArea5]._flags &= ~SF_WALKABLE;
_vm->_gnap->_idleFacing = kDirUpLeft;
- _vm->platypusWalkTo(Common::Point(6, 8), 1, 0x107C2, 1);
+ _vm->_plat->walkTo(Common::Point(6, 8), 1, 0x107C2, 1);
_vm->_plat->_idleFacing = kDirNone;
_vm->_gnap->_actionStatus = kAS06UseTwigOnHorse;
_vm->setGrabCursorSprite(-1);
@@ -2449,11 +2449,11 @@ void Scene06::run() {
break;
case TALK_CURSOR:
if (_horseTurnedBack) {
- _vm->gnapWalkTo(_vm->_hotspotsWalkPos[3], 0, _vm->_gnap->getSequenceId(gskBrainPulsating, 3, 2) | 0x10000, 1);
+ _vm->_gnap->walkTo(_vm->_hotspotsWalkPos[3], 0, _vm->_gnap->getSequenceId(gskBrainPulsating, 3, 2) | 0x10000, 1);
} else {
_vm->_gnap->_idleFacing = kDirBottomLeft;
_vm->_hotspots[kHS06WalkArea5]._flags |= SF_WALKABLE;
- _vm->gnapWalkTo(_vm->_hotspotsWalkPos[3], 0, _vm->_gnap->getSequenceId(gskBrainPulsating, 0, 0) | 0x10000, 1);
+ _vm->_gnap->walkTo(_vm->_hotspotsWalkPos[3], 0, _vm->_gnap->getSequenceId(gskBrainPulsating, 0, 0) | 0x10000, 1);
_vm->_hotspots[kHS06WalkArea5]._flags &= ~SF_WALKABLE;
_vm->_gnap->_actionStatus = kAS06TalkToHorse;
}
@@ -2470,7 +2470,7 @@ void Scene06::run() {
case kHS06ExitOutsideBarn:
if (_vm->_gnap->_actionStatus < 0) {
_vm->_isLeavingScene = true;
- _vm->gnapWalkTo(_vm->_hotspotsWalkPos[4], 0, 0x107AE, 1);
+ _vm->_gnap->walkTo(_vm->_hotspotsWalkPos[4], 0, 0x107AE, 1);
_vm->_gnap->_actionStatus = kAS06LeaveScene;
if (_vm->_cursorValue == 1)
_vm->_newSceneNum = 5;
@@ -2485,12 +2485,12 @@ void Scene06::run() {
case kHS06WalkArea4:
case kHS06WalkArea5:
if (_vm->_gnap->_actionStatus < 0)
- _vm->gnapWalkTo(Common::Point(-1, -1), -1, -1, 1);
+ _vm->_gnap->walkTo(Common::Point(-1, -1), -1, -1, 1);
break;
default:
if (_vm->_mouseClickState._left && _vm->_gnap->_actionStatus < 0) {
- _vm->gnapWalkTo(Common::Point(-1, -1), -1, -1, 1);
+ _vm->_gnap->walkTo(Common::Point(-1, -1), -1, -1, 1);
_vm->_mouseClickState._left = false;
}
break;
@@ -2739,9 +2739,9 @@ void Scene07::run() {
case kHS07ExitHouse:
_vm->_isLeavingScene = true;
if (_vm->_gnap->_pos.x > 8)
- _vm->gnapWalkTo(Common::Point(_vm->_gnap->_pos.x, 7), 0, 0x107AD, 1);
+ _vm->_gnap->walkTo(Common::Point(_vm->_gnap->_pos.x, 7), 0, 0x107AD, 1);
else
- _vm->gnapWalkTo(Common::Point(8, 7), 0, 0x107AD, 1);
+ _vm->_gnap->walkTo(Common::Point(8, 7), 0, 0x107AD, 1);
_vm->_gnap->_actionStatus = kAS07LeaveScene;
break;
@@ -2783,7 +2783,7 @@ void Scene07::run() {
case kHS07WalkArea1:
case kHS07WalkArea2:
- _vm->gnapWalkTo(Common::Point(-1, -1), -1, -1, 1);
+ _vm->_gnap->walkTo(Common::Point(-1, -1), -1, -1, 1);
break;
case kHS07WalkArea3:
@@ -2792,7 +2792,7 @@ void Scene07::run() {
default:
if (_vm->_mouseClickState._left) {
- _vm->gnapWalkTo(Common::Point(-1, -1), -1, -1, 1);
+ _vm->_gnap->walkTo(Common::Point(-1, -1), -1, -1, 1);
_vm->_mouseClickState._left = false;
}
break;
@@ -2956,8 +2956,8 @@ void Scene08::run() {
_vm->endSceneInit();
- _vm->gnapWalkTo(Common::Point(1, 8), -1, 0x107B9, 1);
- _vm->platypusWalkTo(Common::Point(1, 7), -1, 0x107C2, 1);
+ _vm->_gnap->walkTo(Common::Point(1, 8), -1, 0x107B9, 1);
+ _vm->_plat->walkTo(Common::Point(1, 7), -1, 0x107C2, 1);
_vm->_timers[5] = _vm->getRandom(40) + 50;
@@ -3011,18 +3011,18 @@ void Scene08::run() {
case kHS08ExitBackdoor:
_vm->_isLeavingScene = true;
_vm->gnapActionIdle(0x14D);
- _vm->gnapWalkTo(Common::Point(0, 6), 0, 0x107AF, 1);
+ _vm->_gnap->walkTo(Common::Point(0, 6), 0, 0x107AF, 1);
_vm->_gnap->_actionStatus = kAS08LeaveScene;
- _vm->platypusWalkTo(Common::Point(0, 7), 1, 0x107CF, 1);
+ _vm->_plat->walkTo(Common::Point(0, 7), 1, 0x107CF, 1);
_vm->_newSceneNum = 9;
break;
case kHS08ExitCrash:
_vm->_isLeavingScene = true;
_vm->gnapActionIdle(0x14D);
- _vm->gnapWalkTo(Common::Point(3, 9), 0, 0x107AE, 1);
+ _vm->_gnap->walkTo(Common::Point(3, 9), 0, 0x107AE, 1);
_vm->_gnap->_actionStatus = kAS08LeaveScene;
- _vm->platypusWalkTo(Common::Point(4, 9), 1, 0x107C1, 1);
+ _vm->_plat->walkTo(Common::Point(4, 9), 1, 0x107C1, 1);
_vm->_newSceneNum = 7;
break;
@@ -3033,7 +3033,7 @@ void Scene08::run() {
switch (_vm->_verbCursor) {
case LOOK_CURSOR:
_vm->gnapActionIdle(0x14D);
- _vm->gnapWalkTo(Common::Point(6, 6), 0, 0x107BB, 1);
+ _vm->_gnap->walkTo(Common::Point(6, 6), 0, 0x107BB, 1);
_vm->_gnap->_actionStatus = kAS08LookMan;
_vm->_gnap->_idleFacing = kDirUpRight;
break;
@@ -3043,13 +3043,13 @@ void Scene08::run() {
case TALK_CURSOR:
_vm->_gnap->_idleFacing = kDirUpLeft;
_vm->gnapActionIdle(0x14D);
- _vm->gnapWalkTo(Common::Point(8, 6), 0, _vm->_gnap->getSequenceId(gskBrainPulsating, 0, 0) | 0x10000, 1);
+ _vm->_gnap->walkTo(Common::Point(8, 6), 0, _vm->_gnap->getSequenceId(gskBrainPulsating, 0, 0) | 0x10000, 1);
_vm->_gnap->_actionStatus = kAS08TalkMan;
break;
case PLAT_CURSOR:
_vm->gnapActionIdle(0x14D);
_vm->_gnap->useDeviceOnPlatypus();
- _vm->platypusWalkTo(Common::Point(6, 6), 1, 0x107C2, 1);
+ _vm->_plat->walkTo(Common::Point(6, 6), 1, 0x107C2, 1);
_vm->_plat->_actionStatus = kAS08PlatWithMan;
_vm->_plat->_idleFacing = kDirNone;
_vm->playGnapIdle(6, 6);
@@ -3071,21 +3071,21 @@ void Scene08::run() {
_vm->_gnap->_actionStatus = kAS08LookDog;
break;
case GRAB_CURSOR:
- _vm->gnapWalkTo(Common::Point(4, 7), 0, 0x107BB, 1);
+ _vm->_gnap->walkTo(Common::Point(4, 7), 0, 0x107BB, 1);
_vm->_gnap->_actionStatus = kAS08GrabDog;
_vm->_gnap->_idleFacing = kDirUpRight;
break;
case TALK_CURSOR:
_vm->_gnap->_idleFacing = kDirUpRight;
_vm->gnapActionIdle(0x14D);
- _vm->gnapWalkTo(Common::Point(4, 7), 0, _vm->_gnap->getSequenceId(gskBrainPulsating, 0, 0) | 0x10000, 1);
+ _vm->_gnap->walkTo(Common::Point(4, 7), 0, _vm->_gnap->getSequenceId(gskBrainPulsating, 0, 0) | 0x10000, 1);
_vm->_gnap->_actionStatus = kAS08TalkDog;
break;
case PLAT_CURSOR:
_vm->setFlag(kGFSceneFlag1);
_vm->gnapActionIdle(0x14D);
_vm->_gnap->useDeviceOnPlatypus();
- _vm->platypusWalkTo(Common::Point(3, 7), 1, 0x107C2, 1);
+ _vm->_plat->walkTo(Common::Point(3, 7), 1, 0x107C2, 1);
_vm->_plat->_actionStatus = kAS08PlatWithDog;
_vm->_plat->_idleFacing = kDirNone;
_vm->playGnapIdle(3, 7);
@@ -3175,13 +3175,13 @@ void Scene08::run() {
case kHS08WalkArea1:
case kHS08WalkArea2:
_vm->gnapActionIdle(0x14D);
- _vm->gnapWalkTo(Common::Point(-1, 6), -1, -1, 1);
+ _vm->_gnap->walkTo(Common::Point(-1, 6), -1, -1, 1);
break;
default:
if (_vm->_mouseClickState._left) {
_vm->gnapActionIdle(0x14D);
- _vm->gnapWalkTo(Common::Point(-1, -1), -1, -1, 1);
+ _vm->_gnap->walkTo(Common::Point(-1, -1), -1, -1, 1);
_vm->_mouseClickState._left = false;
}
break;
@@ -3333,7 +3333,7 @@ void Scene08::updateAnimations() {
_vm->_plat->_idleFacing = kDirUnk4;
_vm->_plat->_sequenceDatNum = 0;
if (_vm->_gnap->_pos == Common::Point(1, 8))
- _vm->gnapWalkStep();
+ _vm->_gnap->walkStep();
} else if (_nextDogSequenceId != -1) {
gameSys.setAnimation(_nextDogSequenceId, 100, 3);
gameSys.insertSequence(_nextDogSequenceId, 100, _currDogSequenceId, 100, kSeqSyncWait, 0, 0, 0);
@@ -3386,8 +3386,8 @@ void Scene09::run() {
_vm->_gnap->initPos(11, 8, kDirBottomLeft);
_vm->_plat->initPos(12, 7, kDirUnk4);
_vm->endSceneInit();
- _vm->gnapWalkTo(Common::Point(9, 8), -1, 0x107BA, 1);
- _vm->platypusWalkTo(Common::Point(9, 7), -1, 0x107D2, 1);
+ _vm->_gnap->walkTo(Common::Point(9, 8), -1, 0x107BA, 1);
+ _vm->_plat->walkTo(Common::Point(9, 7), -1, 0x107D2, 1);
} else {
_vm->_gnap->initPos(4, 7, kDirBottomRight);
_vm->_plat->initPos(5, 7, kDirNone);
@@ -3439,18 +3439,18 @@ void Scene09::run() {
case kHS09ExitKitchen:
_vm->_isLeavingScene = true;
_vm->_newSceneNum = 10;
- _vm->gnapWalkTo(Common::Point(4, 7), 0, 0x107BF, 1);
+ _vm->_gnap->walkTo(Common::Point(4, 7), 0, 0x107BF, 1);
_vm->_gnap->_actionStatus = kAS09LeaveScene;
- _vm->platypusWalkTo(Common::Point(4, 8), -1, 0x107D2, 1);
+ _vm->_plat->walkTo(Common::Point(4, 8), -1, 0x107D2, 1);
_vm->_plat->_idleFacing = kDirUnk4;
break;
case kHS09ExitHouse:
_vm->_isLeavingScene = true;
_vm->_newSceneNum = 8;
- _vm->gnapWalkTo(Common::Point(10, -1), 0, 0x107AB, 1);
+ _vm->_gnap->walkTo(Common::Point(10, -1), 0, 0x107AB, 1);
_vm->_gnap->_actionStatus = kAS09LeaveScene;
- _vm->platypusWalkTo(Common::Point(10, -1), -1, 0x107CD, 1);
+ _vm->_plat->walkTo(Common::Point(10, -1), -1, 0x107CD, 1);
_vm->_plat->_idleFacing = kDirUnk4;
break;
@@ -3464,7 +3464,7 @@ void Scene09::run() {
break;
case GRAB_CURSOR:
_vm->_gnap->_actionStatus = kAS09SearchTrash;
- _vm->gnapWalkTo(Common::Point(9, 6), 0, 0x107BC, 1);
+ _vm->_gnap->walkTo(Common::Point(9, 6), 0, 0x107BC, 1);
break;
case TALK_CURSOR:
case PLAT_CURSOR:
@@ -3477,12 +3477,12 @@ void Scene09::run() {
case kHS09WalkArea1:
case kHS09WalkArea2:
case kHS09WalkArea3:
- _vm->gnapWalkTo(Common::Point(-1, -1), -1, -1, 1);
+ _vm->_gnap->walkTo(Common::Point(-1, -1), -1, -1, 1);
break;
default:
if (_vm->_mouseClickState._left) {
- _vm->gnapWalkTo(Common::Point(-1, -1), -1, -1, 1);
+ _vm->_gnap->walkTo(Common::Point(-1, -1), -1, -1, 1);
_vm->_mouseClickState._left = false;
}
break;
diff --git a/engines/gnap/scenes/group1.cpp b/engines/gnap/scenes/group1.cpp
index cb74bff32f..9033763c7e 100644
--- a/engines/gnap/scenes/group1.cpp
+++ b/engines/gnap/scenes/group1.cpp
@@ -75,14 +75,14 @@ void Scene10::run() {
_vm->_gnap->initPos(11, 8, kDirBottomLeft);
_vm->_plat->initPos(12, 7, kDirUnk4);
_vm->endSceneInit();
- _vm->gnapWalkTo(Common::Point(9, 8), -1, 0x107BA, 1);
- _vm->platypusWalkTo(Common::Point(9, 7), -1, 0x107D2, 1);
+ _vm->_gnap->walkTo(Common::Point(9, 8), -1, 0x107BA, 1);
+ _vm->_plat->walkTo(Common::Point(9, 7), -1, 0x107D2, 1);
} else {
_vm->_gnap->initPos(-1, 7, kDirBottomRight);
_vm->_plat->initPos(-2, 8, kDirNone);
_vm->endSceneInit();
- _vm->gnapWalkTo(Common::Point(1, 7), -1, 0x107B9, 1);
- _vm->platypusWalkTo(Common::Point(1, 8), -1, 0x107C2, 1);
+ _vm->_gnap->walkTo(Common::Point(1, 7), -1, 0x107B9, 1);
+ _vm->_plat->walkTo(Common::Point(1, 8), -1, 0x107C2, 1);
}
_vm->_timers[4] = _vm->getRandom(80) + 150;
@@ -132,18 +132,18 @@ void Scene10::run() {
case kHS10ExitBar:
_vm->_isLeavingScene = true;
_vm->gnapActionIdle(0x10C);
- _vm->gnapWalkTo(Common::Point(0, 7), 0, 0x107AF, 1);
+ _vm->_gnap->walkTo(Common::Point(0, 7), 0, 0x107AF, 1);
_vm->_gnap->_actionStatus = kAS10LeaveScene;
- _vm->platypusWalkTo(Common::Point(0, 7), -1, 0x107CF, 1);
+ _vm->_plat->walkTo(Common::Point(0, 7), -1, 0x107CF, 1);
_vm->_newSceneNum = 11;
break;
case kHS10ExitBackdoor:
_vm->_isLeavingScene = true;
_vm->gnapActionIdle(0x10C);
- _vm->gnapWalkTo(Common::Point(2, 9), 0, 0x107AE, 1);
+ _vm->_gnap->walkTo(Common::Point(2, 9), 0, 0x107AE, 1);
_vm->_gnap->_actionStatus = kAS10LeaveScene;
- _vm->platypusWalkTo(Common::Point(3, 9), -1, 0x107C7, 1);
+ _vm->_plat->walkTo(Common::Point(3, 9), -1, 0x107C7, 1);
_vm->_newSceneNum = 9;
break;
@@ -164,14 +164,14 @@ void Scene10::run() {
case TALK_CURSOR:
_vm->_gnap->_idleFacing = kDirUpRight;
_vm->gnapActionIdle(0x10C);
- _vm->gnapWalkTo(Common::Point(4, 8), 0, _vm->_gnap->getSequenceId(gskBrainPulsating, 0, 0) | 0x10000, 1);
+ _vm->_gnap->walkTo(Common::Point(4, 8), 0, _vm->_gnap->getSequenceId(gskBrainPulsating, 0, 0) | 0x10000, 1);
_vm->_gnap->_actionStatus = kAS10AnnoyCook;
break;
case PLAT_CURSOR:
_vm->gnapActionIdle(0x10C);
_vm->_gnap->useDeviceOnPlatypus();
- _vm->platypusWalkTo(Common::Point(4, 6), -1, -1, 1);
- _vm->gnapWalkTo(Common::Point(4, 8), 0, 0x107BB, 1);
+ _vm->_plat->walkTo(Common::Point(4, 6), -1, -1, 1);
+ _vm->_gnap->walkTo(Common::Point(4, 8), 0, 0x107BB, 1);
_vm->_gnap->_actionStatus = kAS10AnnoyCook;
break;
}
@@ -194,7 +194,7 @@ void Scene10::run() {
_vm->playGnapMoan2(-1, -1);
else {
_vm->gnapActionIdle(0x10C);
- _vm->gnapWalkTo(Common::Point(4, 8), 0, 0x107BB, 1);
+ _vm->_gnap->walkTo(Common::Point(4, 8), 0, 0x107BB, 1);
_vm->_gnap->_actionStatus = kAS10AnnoyCook;
}
break;
@@ -207,8 +207,8 @@ void Scene10::run() {
else {
_vm->gnapActionIdle(0x10C);
_vm->_gnap->useDeviceOnPlatypus();
- _vm->platypusWalkTo(Common::Point(3, 7), -1, -1, 1);
- _vm->gnapWalkTo(Common::Point(4, 8), 0, 0x107BB, 1);
+ _vm->_plat->walkTo(Common::Point(3, 7), -1, -1, 1);
+ _vm->_gnap->walkTo(Common::Point(4, 8), 0, 0x107BB, 1);
_vm->_gnap->_actionStatus = kAS10AnnoyCook;
}
break;
@@ -226,7 +226,7 @@ void Scene10::run() {
break;
case GRAB_CURSOR:
_vm->gnapActionIdle(0x10C);
- _vm->gnapWalkTo(Common::Point(4, 8), 0, 0x107BB, 1);
+ _vm->_gnap->walkTo(Common::Point(4, 8), 0, 0x107BB, 1);
_vm->_gnap->_actionStatus = kAS10AnnoyCook;
break;
case TALK_CURSOR:
@@ -240,7 +240,7 @@ void Scene10::run() {
_vm->setFlag(kGFMudTaken);
_vm->gnapActionIdle(0x10C);
_vm->_gnap->useDeviceOnPlatypus();
- _vm->platypusWalkTo(Common::Point(7, 6), 1, 0x107D2, 1);
+ _vm->_plat->walkTo(Common::Point(7, 6), 1, 0x107D2, 1);
_vm->_plat->_actionStatus = kAS10PlatWithBox;
_vm->_plat->_idleFacing = kDirUnk4;
_vm->_largeSprite = gameSys.createSurface(0xC3);
@@ -261,7 +261,7 @@ void Scene10::run() {
break;
case GRAB_CURSOR:
_vm->gnapActionIdle(0x10C);
- _vm->gnapWalkTo(Common::Point(9, 6), 0, 0x107BB, 1);
+ _vm->_gnap->walkTo(Common::Point(9, 6), 0, 0x107BB, 1);
gameSys.insertSequence(0x10E, 120, makeRid(_vm->_gnap->_sequenceDatNum, _vm->_gnap->_sequenceId), _vm->_gnap->_id, kSeqSyncWait, 0, 0, 0);
_vm->_gnap->_sequenceId = 0x10E;
_vm->_gnap->_id = 120;
@@ -283,7 +283,7 @@ void Scene10::run() {
case kHS10WalkArea3:
case kHS10WalkArea4:
_vm->gnapActionIdle(0x10C);
- _vm->gnapWalkTo(Common::Point(-1, -1), -1, -1, 1);
+ _vm->_gnap->walkTo(Common::Point(-1, -1), -1, -1, 1);
break;
case kHS10Device:
@@ -296,7 +296,7 @@ void Scene10::run() {
default:
if (_vm->_mouseClickState._left) {
_vm->gnapActionIdle(0x10C);
- _vm->gnapWalkTo(Common::Point(-1, -1), -1, -1, 1);
+ _vm->_gnap->walkTo(Common::Point(-1, -1), -1, -1, 1);
_vm->_mouseClickState._left = false;
}
break;
@@ -401,7 +401,7 @@ void Scene10::updateAnimations() {
if (_vm->_plat->_actionStatus == kAS10PlatWithBox)
_vm->_plat->_actionStatus = -1;
if (_vm->_gnap->_pos == Common::Point(4, 8))
- _vm->gnapWalkStep();
+ _vm->_gnap->walkStep();
break;
default:
gameSys.insertSequence(_nextCookSequenceId, 100, _currCookSequenceId, 100, kSeqSyncWait, 0, 0, 0);
@@ -573,8 +573,8 @@ void Scene11::run() {
_vm->endSceneInit();
if (_vm->_prevSceneNum == 12) {
- _vm->gnapWalkTo(Common::Point(2, 8), -1, 0x107B9, 1);
- _vm->platypusWalkTo(Common::Point(1, 8), -1, 0x107C2, 1);
+ _vm->_gnap->walkTo(Common::Point(2, 8), -1, 0x107B9, 1);
+ _vm->_plat->walkTo(Common::Point(1, 8), -1, 0x107C2, 1);
}
gameSys.insertSequence(0x208, 256, 0, 0, kSeqNone, 40, 0, 0);
@@ -612,32 +612,32 @@ void Scene11::run() {
case kHS11ExitKitchen:
_vm->_isLeavingScene = true;
- _vm->gnapWalkTo(Common::Point(6, 5), 0, 0x107BF, 1);
+ _vm->_gnap->walkTo(Common::Point(6, 5), 0, 0x107BF, 1);
_vm->_gnap->_actionStatus = kAS11LeaveScene;
- _vm->platypusWalkTo(Common::Point(6, 6), -1, -1, 1);
+ _vm->_plat->walkTo(Common::Point(6, 6), -1, -1, 1);
_vm->_newSceneNum = 10;
break;
case kHS11ExitToilet:
_vm->_isLeavingScene = true;
- _vm->gnapWalkTo(Common::Point(8, 5), 0, 0x107BF, 1);
+ _vm->_gnap->walkTo(Common::Point(8, 5), 0, 0x107BF, 1);
_vm->_gnap->_actionStatus = kAS11LeaveScene;
- _vm->platypusWalkTo(Common::Point(8, 6), -1, -1, 1);
+ _vm->_plat->walkTo(Common::Point(8, 6), -1, -1, 1);
_vm->_newSceneNum = 13;
break;
case kHS11ExitLeft:
_vm->_isLeavingScene = true;
- _vm->gnapWalkTo(Common::Point(-1, 8), 0, 0x107AF, 1);
+ _vm->_gnap->walkTo(Common::Point(-1, 8), 0, 0x107AF, 1);
_vm->_gnap->_actionStatus = kAS11LeaveScene;
- _vm->platypusWalkTo(Common::Point(-1, 9), -1, 0x107CF, 1);
+ _vm->_plat->walkTo(Common::Point(-1, 9), -1, 0x107CF, 1);
_vm->_newSceneNum = 12;
break;
case kHS11GoggleGuy:
if (_vm->_gnap->_actionStatus < 0) {
if (_vm->_grabCursorSpriteIndex == kItemMagazine) {
- _vm->gnapWalkTo(Common::Point(3, 7), 0, 0x107BC, 1);
+ _vm->_gnap->walkTo(Common::Point(3, 7), 0, 0x107BC, 1);
_vm->_gnap->_actionStatus = kAS11ShowMagazineToGoggleGuy;
_vm->playGnapShowItem(_vm->_grabCursorSpriteIndex, 2, 0);
} else if (_vm->_grabCursorSpriteIndex >= 0) {
@@ -653,7 +653,7 @@ void Scene11::run() {
break;
case TALK_CURSOR:
_vm->_gnap->_idleFacing = kDirUpLeft;
- _vm->gnapWalkTo(Common::Point(3, 7), 0, _vm->_gnap->getSequenceId(gskBrainPulsating, 0, 0) | 0x10000, 1);
+ _vm->_gnap->walkTo(Common::Point(3, 7), 0, _vm->_gnap->getSequenceId(gskBrainPulsating, 0, 0) | 0x10000, 1);
_vm->_gnap->_actionStatus = kAS11TalkGoggleGuy;
break;
}
@@ -665,7 +665,7 @@ void Scene11::run() {
if (_vm->_gnap->_actionStatus < 0) {
_vm->_gnap->_idleFacing = kDirUpRight;
if (_vm->_grabCursorSpriteIndex >= 0) {
- _vm->gnapWalkTo(Common::Point(5, 6), 0, 0x107BC, 9);
+ _vm->_gnap->walkTo(Common::Point(5, 6), 0, 0x107BC, 9);
_vm->_gnap->_actionStatus = kAS11ShowItemToHookGuy;
_vm->playGnapShowItem(_vm->_grabCursorSpriteIndex, 4, 0);
} else {
@@ -674,12 +674,12 @@ void Scene11::run() {
_vm->_gnap->playSequence(_vm->_gnap->getSequenceId(gskDeflect, 3, 6) | 0x10000);
break;
case GRAB_CURSOR:
- _vm->gnapWalkTo(Common::Point(5, 6), 0, 0x107BC, 1);
+ _vm->_gnap->walkTo(Common::Point(5, 6), 0, 0x107BC, 1);
_vm->_gnap->_actionStatus = kAS11GrabHookGuy;
break;
case TALK_CURSOR:
_vm->_gnap->_idleFacing = kDirBottomLeft;
- _vm->gnapWalkTo(Common::Point(5, 6), 0, _vm->_gnap->getSequenceId(gskBrainPulsating, 0, 0) | 0x10000, 1);
+ _vm->_gnap->walkTo(Common::Point(5, 6), 0, _vm->_gnap->getSequenceId(gskBrainPulsating, 0, 0) | 0x10000, 1);
_vm->_gnap->_actionStatus = kAS11TalkHookGuy;
break;
case PLAT_CURSOR:
@@ -700,7 +700,7 @@ void Scene11::run() {
_vm->playGnapScratchingHead(9, 8);
break;
case GRAB_CURSOR:
- _vm->gnapWalkTo(Common::Point(9, 8), 0, 0x107BA, 1);
+ _vm->_gnap->walkTo(Common::Point(9, 8), 0, 0x107BA, 1);
_vm->_gnap->_actionStatus = kAS11GrabBillardBall;
break;
case TALK_CURSOR:
@@ -718,7 +718,7 @@ void Scene11::run() {
case kHS11WalkArea4:
case kHS11WalkArea5:
if (_vm->_gnap->_actionStatus < 0)
- _vm->gnapWalkTo(Common::Point(-1, -1), -1, -1, 1);
+ _vm->_gnap->walkTo(Common::Point(-1, -1), -1, -1, 1);
break;
case kHS11Device:
@@ -730,7 +730,7 @@ void Scene11::run() {
default:
if (_vm->_mouseClickState._left && _vm->_gnap->_actionStatus < 0) {
- _vm->gnapWalkTo(Common::Point(-1, -1), -1, -1, 1);
+ _vm->_gnap->walkTo(Common::Point(-1, -1), -1, -1, 1);
_vm->_mouseClickState._left = false;
}
break;
@@ -989,8 +989,8 @@ void Scene12::run() {
_vm->_gnap->initPos(11, 8, kDirBottomLeft);
_vm->_plat->initPos(12, 8, kDirUnk4);
_vm->endSceneInit();
- _vm->gnapWalkTo(Common::Point(8, 8), -1, 0x107BA, 1);
- _vm->platypusWalkTo(Common::Point(9, 8), -1, 0x107D2, 1);
+ _vm->_gnap->walkTo(Common::Point(8, 8), -1, 0x107BA, 1);
+ _vm->_plat->walkTo(Common::Point(9, 8), -1, 0x107D2, 1);
}
while (!_vm->_sceneDone) {
@@ -1030,27 +1030,27 @@ void Scene12::run() {
case kHS12ExitRight:
_vm->_isLeavingScene = true;
- _vm->gnapWalkTo(Common::Point(10, -1), 0, 0x107AB, 1);
+ _vm->_gnap->walkTo(Common::Point(10, -1), 0, 0x107AB, 1);
_vm->_gnap->_actionStatus = kAS12LeaveScene;
- _vm->platypusWalkTo(Common::Point(10, -1), -1, -1, 1);
+ _vm->_plat->walkTo(Common::Point(10, -1), -1, -1, 1);
_vm->_newSceneNum = 11;
break;
case kHS12ToothGuy:
if (_vm->_grabCursorSpriteIndex == kItemQuarter) {
_vm->_largeSprite = gameSys.createSurface(0x141);
- _vm->gnapWalkTo(Common::Point(3, 7), 0, 0x107BC, 9);
+ _vm->_gnap->walkTo(Common::Point(3, 7), 0, 0x107BC, 9);
_vm->_gnap->_idleFacing = kDirUpLeft;
_vm->_gnap->_actionStatus = kAS12QuarterToToothGuy;
_vm->playGnapShowItem(_vm->_grabCursorSpriteIndex, 2, 0);
_vm->setGrabCursorSprite(-1);
} else if (_vm->_grabCursorSpriteIndex == kItemQuarterWithHole) {
- _vm->gnapWalkTo(Common::Point(3, 7), 0, 0x107BC, 9);
+ _vm->_gnap->walkTo(Common::Point(3, 7), 0, 0x107BC, 9);
_vm->_gnap->_idleFacing = kDirUpLeft;
_vm->_gnap->_actionStatus = kAS12QuarterWithHoleToToothGuy;
_vm->playGnapShowItem(_vm->_grabCursorSpriteIndex, 2, 0);
} else if (_vm->_grabCursorSpriteIndex >= 0) {
- _vm->gnapWalkTo(Common::Point(3, 7), 0, 0x107BC, 9);
+ _vm->_gnap->walkTo(Common::Point(3, 7), 0, 0x107BC, 9);
_vm->_gnap->_idleFacing = kDirUpLeft;
_vm->_gnap->_actionStatus = kAS12ShowItemToToothGuy;
_vm->playGnapShowItem(_vm->_grabCursorSpriteIndex, 2, 0);
@@ -1060,17 +1060,17 @@ void Scene12::run() {
_vm->playGnapScratchingHead(1, 2);
break;
case GRAB_CURSOR:
- _vm->gnapWalkTo(Common::Point(3, 7), 0, 0x107BC, 1);
+ _vm->_gnap->walkTo(Common::Point(3, 7), 0, 0x107BC, 1);
_vm->_gnap->_actionStatus = kAS12GrabToothGuy;
break;
case TALK_CURSOR:
_vm->_gnap->_idleFacing = kDirUpLeft;
- _vm->gnapWalkTo(Common::Point(3, 7), 0, _vm->_gnap->getSequenceId(gskBrainPulsating, 0, 0) | 0x10000, 1);
+ _vm->_gnap->walkTo(Common::Point(3, 7), 0, _vm->_gnap->getSequenceId(gskBrainPulsating, 0, 0) | 0x10000, 1);
_vm->_gnap->_actionStatus = kAS12TalkToothGuy;
break;
case PLAT_CURSOR:
_vm->_gnap->useDeviceOnPlatypus();
- _vm->platypusWalkTo(Common::Point(3, 7), 1, 0x107D2, 1);
+ _vm->_plat->walkTo(Common::Point(3, 7), 1, 0x107D2, 1);
_vm->_plat->_actionStatus = kAS12PlatWithToothGuy;
_vm->_plat->_idleFacing = kDirUnk4;
_vm->playGnapIdle(2, 7);
@@ -1081,19 +1081,19 @@ void Scene12::run() {
case kHS12Barkeeper:
if (_vm->_grabCursorSpriteIndex == kItemQuarter || _vm->_grabCursorSpriteIndex == kItemQuarterWithHole) {
- _vm->gnapWalkTo(Common::Point(6, 6), 0, 0x107BB, 9);
+ _vm->_gnap->walkTo(Common::Point(6, 6), 0, 0x107BB, 9);
_vm->_gnap->_idleFacing = kDirUpRight;
_vm->_gnap->_actionStatus = kAS12QuarterWithBarkeeper;
_vm->playGnapShowItem(_vm->_grabCursorSpriteIndex, 7, 0);
} else if (_vm->_grabCursorSpriteIndex >= 0) {
- _vm->gnapWalkTo(Common::Point(6, 6), 0, 0x107BB, 9);
+ _vm->_gnap->walkTo(Common::Point(6, 6), 0, 0x107BB, 9);
_vm->_gnap->_idleFacing = kDirUpRight;
_vm->_gnap->_actionStatus = kAS12ShowItemToBarkeeper;
_vm->playGnapShowItem(_vm->_grabCursorSpriteIndex, 7, 0);
} else {
switch (_vm->_verbCursor) {
case LOOK_CURSOR:
- _vm->gnapWalkTo(Common::Point(6, 6), 0, 0x107BB, 1);
+ _vm->_gnap->walkTo(Common::Point(6, 6), 0, 0x107BB, 1);
_vm->_gnap->_idleFacing = kDirUpRight;
_vm->_gnap->_actionStatus = kAS12LookBarkeeper;
break;
@@ -1102,7 +1102,7 @@ void Scene12::run() {
break;
case TALK_CURSOR:
_vm->_gnap->_idleFacing = kDirUpRight;
- _vm->gnapWalkTo(Common::Point(6, 6), 0, _vm->_gnap->getSequenceId(gskBrainPulsating, 0, 0) | 0x10000, 1);
+ _vm->_gnap->walkTo(Common::Point(6, 6), 0, _vm->_gnap->getSequenceId(gskBrainPulsating, 0, 0) | 0x10000, 1);
_vm->_gnap->_actionStatus = kAS12TalkBarkeeper;
break;
case PLAT_CURSOR:
@@ -1116,31 +1116,31 @@ void Scene12::run() {
case kHS12BeardGuy:
if (_vm->_grabCursorSpriteIndex >= 0) {
- _vm->gnapWalkTo(Common::Point(7, 6), 0, 0x107BB, 9);
+ _vm->_gnap->walkTo(Common::Point(7, 6), 0, 0x107BB, 9);
_vm->_gnap->_idleFacing = kDirUpRight;
_vm->_gnap->_actionStatus = kAS12ShowItemToBeardGuy;
_vm->playGnapShowItem(_vm->_grabCursorSpriteIndex, 8, 0);
} else {
switch (_vm->_verbCursor) {
case LOOK_CURSOR:
- _vm->gnapWalkTo(Common::Point(7, 6), 0, 0x107BB, 1);
+ _vm->_gnap->walkTo(Common::Point(7, 6), 0, 0x107BB, 1);
_vm->_gnap->_idleFacing = kDirUpRight;
_vm->_gnap->_actionStatus = kAS12LookBeardGuy;
break;
case GRAB_CURSOR:
// NOTE Bug in the original. It has 9 as flags which seems wrong here.
- _vm->gnapWalkTo(Common::Point(7, 6), 0, 0x107BB, 1);
+ _vm->_gnap->walkTo(Common::Point(7, 6), 0, 0x107BB, 1);
_vm->_gnap->_idleFacing = kDirUpRight;
_vm->_gnap->_actionStatus = kAS12GrabBeardGuy;
break;
case TALK_CURSOR:
_vm->_gnap->_idleFacing = kDirUpRight;
- _vm->gnapWalkTo(Common::Point(7, 6), 0, _vm->_gnap->getSequenceId(gskBrainPulsating, 0, 0) | 0x10000, 1);
+ _vm->_gnap->walkTo(Common::Point(7, 6), 0, _vm->_gnap->getSequenceId(gskBrainPulsating, 0, 0) | 0x10000, 1);
_vm->_gnap->_actionStatus = kAS12TalkBeardGuy;
break;
case PLAT_CURSOR:
_vm->_gnap->useDeviceOnPlatypus();
- _vm->platypusWalkTo(Common::Point(7, 6), 1, 0x107C2, 1);
+ _vm->_plat->walkTo(Common::Point(7, 6), 1, 0x107C2, 1);
_vm->_plat->_actionStatus = kAS12PlatWithBeardGuy;
_vm->_plat->_idleFacing = kDirNone;
_vm->playGnapIdle(7, 6);
@@ -1152,7 +1152,7 @@ void Scene12::run() {
case kHS12Jukebox:
_vm->_newSceneNum = 15;
_vm->_isLeavingScene = true;
- _vm->gnapWalkTo(Common::Point(5, 6), 0, 0x107BC, 1);
+ _vm->_gnap->walkTo(Common::Point(5, 6), 0, 0x107BC, 1);
_vm->_gnap->_actionStatus = kAS12LeaveScene;
break;
@@ -1161,12 +1161,12 @@ void Scene12::run() {
case kHS12WalkArea3:
case kHS12WalkArea4:
if (_vm->_gnap->_actionStatus < 0)
- _vm->gnapWalkTo(Common::Point(-1, -1), -1, -1, 1);
+ _vm->_gnap->walkTo(Common::Point(-1, -1), -1, -1, 1);
break;
default:
if (_vm->_mouseClickState._left && _vm->_gnap->_actionStatus < 0) {
- _vm->gnapWalkTo(Common::Point(-1, -1), -1, -1, 1);
+ _vm->_gnap->walkTo(Common::Point(-1, -1), -1, -1, 1);
_vm->_mouseClickState._left = false;
}
break;
@@ -1539,9 +1539,9 @@ void Scene13::run() {
case kHS13ExitBar:
_vm->_isLeavingScene = true;
- _vm->gnapWalkTo(Common::Point(2, 7), 0, 0x107C0, 1);
+ _vm->_gnap->walkTo(Common::Point(2, 7), 0, 0x107C0, 1);
_vm->_gnap->_actionStatus = kAS13LeaveScene;
- _vm->platypusWalkTo(Common::Point(2, 8), -1, -1, 1);
+ _vm->_plat->walkTo(Common::Point(2, 8), -1, -1, 1);
if (_vm->isFlag(kGFUnk14) || _vm->isFlag(kGFSpringTaken)) {
_vm->_newSceneNum = 11;
} else {
@@ -1569,7 +1569,7 @@ void Scene13::run() {
_vm->_gnap->_idleFacing = kDirUpRight;
_vm->_gnap->_sequenceDatNum = 0;
} else {
- _vm->gnapWalkTo(Common::Point(5, 5), 0, 0x107BB, 1);
+ _vm->_gnap->walkTo(Common::Point(5, 5), 0, 0x107BB, 1);
_vm->_gnap->_actionStatus = kAS13BackToilet;
_vm->_gnap->_idleFacing = kDirUpRight;
}
@@ -1590,7 +1590,7 @@ void Scene13::run() {
case GRAB_CURSOR:
case TALK_CURSOR:
case PLAT_CURSOR:
- _vm->gnapWalkTo(Common::Point(6, 7), 0, 0xA9, 5);
+ _vm->_gnap->walkTo(Common::Point(6, 7), 0, 0xA9, 5);
_vm->_gnap->_actionStatus = kAS13FrontToilet;
_vm->_gnap->_idleFacing = kDirBottomRight;
break;
@@ -1604,7 +1604,7 @@ void Scene13::run() {
} else {
switch (_vm->_verbCursor) {
case LOOK_CURSOR:
- _vm->gnapWalkTo(Common::Point(7, 7), 0, 0x107BB, 1);
+ _vm->_gnap->walkTo(Common::Point(7, 7), 0, 0x107BB, 1);
_vm->_gnap->_actionStatus = kAS13LookScribble;
_vm->_gnap->_idleFacing = kDirUpRight;
break;
@@ -1613,7 +1613,7 @@ void Scene13::run() {
break;
case TALK_CURSOR:
_vm->_gnap->_idleFacing = kDirUpRight;
- _vm->gnapWalkTo(Common::Point(7, 7), -1, _vm->_gnap->getSequenceId(gskBrainPulsating, 0, 0), 1);
+ _vm->_gnap->walkTo(Common::Point(7, 7), -1, _vm->_gnap->getSequenceId(gskBrainPulsating, 0, 0), 1);
break;
case PLAT_CURSOR:
_vm->playGnapImpossible(0, 0);
@@ -1629,11 +1629,11 @@ void Scene13::run() {
switch (_vm->_verbCursor) {
case LOOK_CURSOR:
_vm->_gnap->playSequence(_vm->_gnap->getSequenceId(gskDeflect, 9, 6));
- _vm->gnapWalkTo(_vm->_gnap->_pos, 0, -1, 1);
+ _vm->_gnap->walkTo(_vm->_gnap->_pos, 0, -1, 1);
_vm->_gnap->_actionStatus = kAS13Wait;
break;
case GRAB_CURSOR:
- _vm->gnapWalkTo(Common::Point(8, 7), 0, -1, 1);
+ _vm->_gnap->walkTo(Common::Point(8, 7), 0, -1, 1);
_vm->_gnap->_actionStatus = kAS13GrabUrinal;
break;
case TALK_CURSOR:
@@ -1651,11 +1651,11 @@ void Scene13::run() {
switch (_vm->_verbCursor) {
case LOOK_CURSOR:
_vm->_gnap->playSequence(_vm->_gnap->getSequenceId(gskDeflect, 5, 9));
- _vm->gnapWalkTo(_vm->_gnap->_pos, 0, -1, 1);
+ _vm->_gnap->walkTo(_vm->_gnap->_pos, 0, -1, 1);
_vm->_gnap->_actionStatus = kAS13Wait;
break;
case GRAB_CURSOR:
- _vm->gnapWalkTo(Common::Point(4, 8), 0, 0x107B9, 1);
+ _vm->_gnap->walkTo(Common::Point(4, 8), 0, 0x107B9, 1);
_vm->_gnap->_actionStatus = kAS13GrabSink;
break;
case TALK_CURSOR:
@@ -1674,7 +1674,7 @@ void Scene13::run() {
case kHS13WalkArea7:
case kHS13WalkArea8:
case kHS13WalkArea9:
- _vm->gnapWalkTo(Common::Point(-1, -1), -1, -1, 1);
+ _vm->_gnap->walkTo(Common::Point(-1, -1), -1, -1, 1);
break;
case kHS13WalkArea1:
@@ -1683,7 +1683,7 @@ void Scene13::run() {
default:
if (_vm->_mouseClickState._left) {
- _vm->gnapWalkTo(Common::Point(-1, -1), -1, -1, 1);
+ _vm->_gnap->walkTo(Common::Point(-1, -1), -1, -1, 1);
_vm->_mouseClickState._left = false;
}
break;
@@ -1694,7 +1694,7 @@ void Scene13::run() {
if (!_vm->_isLeavingScene) {
_vm->_plat->updateIdleSequence();
if (_vm->_plat->_pos.y == 5 || _vm->_plat->_pos.y == 6)
- _vm->platypusWalkTo(Common::Point(-1, 7), -1, -1, 1);
+ _vm->_plat->walkTo(Common::Point(-1, 7), -1, -1, 1);
if (_vm->_gnap->_actionStatus < 0)
_vm->_gnap->updateIdleSequence();
if (!_vm->_timers[4]) {
@@ -2322,7 +2322,7 @@ void Scene17::update() {
_vm->updateMouseCursor();
_vm->updateGrabCursorSprite(0, 0);
if (_vm->_mouseClickState._left) {
- _vm->gnapWalkTo(Common::Point(-1, -1), -1, -1, 1);
+ _vm->_gnap->walkTo(Common::Point(-1, -1), -1, -1, 1);
_vm->_mouseClickState._left = false;
}
}
@@ -2418,8 +2418,8 @@ void Scene17::run() {
_vm->_gnap->initPos(4, 6, kDirBottomRight);
_vm->_plat->initPos(5, 6, kDirNone);
_vm->endSceneInit();
- _vm->platypusWalkTo(Common::Point(5, 9), -1, 0x107C2, 1);
- _vm->gnapWalkTo(Common::Point(4, 8), -1, 0x107B9, 1);
+ _vm->_plat->walkTo(Common::Point(5, 9), -1, 0x107C2, 1);
+ _vm->_gnap->walkTo(Common::Point(4, 8), -1, 0x107B9, 1);
} else if (_vm->isFlag(kGFUnk27)) {
_vm->_gnap->initPos(3, 9, kDirUpLeft);
_vm->_plat->_pos = _vm->_hotspotsWalkPos[2];
@@ -2472,8 +2472,8 @@ void Scene17::run() {
_vm->_gnap->initPos(6, 6, kDirBottomRight);
_vm->_plat->initPos(5, 6, kDirNone);
_vm->endSceneInit();
- _vm->platypusWalkTo(Common::Point(5, 9), -1, 0x107C2, 1);
- _vm->gnapWalkTo(Common::Point(4, 8), -1, 0x107B9, 1);
+ _vm->_plat->walkTo(Common::Point(5, 9), -1, 0x107C2, 1);
+ _vm->_gnap->walkTo(Common::Point(4, 8), -1, 0x107B9, 1);
} else {
if (_vm->isFlag(kGFSpringTaken)) {
_vm->_gnap->initPos(_vm->_hotspotsWalkPos[2].x, _vm->_hotspotsWalkPos[2].y, kDirBottomRight);
@@ -2506,7 +2506,7 @@ void Scene17::run() {
_vm->_plat->_sequenceId = 0x7C1;
_vm->_plat->_sequenceDatNum = 1;
_vm->_plat->_idleFacing = kDirBottomRight;
- _vm->platypusWalkTo(Common::Point(2, 9), -1, 0x107C2, 1);
+ _vm->_plat->walkTo(Common::Point(2, 9), -1, 0x107C2, 1);
}
while (!_vm->_sceneDone) {
@@ -2531,8 +2531,8 @@ void Scene17::run() {
_vm->_gnap->useJointOnPlatypus();
} else {
_vm->_gnap->useDeviceOnPlatypus();
- _vm->platypusWalkTo(_vm->_hotspotsWalkPos[6], 1, 0x107C2, 1);
- _vm->gnapWalkTo(_vm->_hotspotsWalkPos[6] + Common::Point(1, 0), 0, 0x107BA, 1);
+ _vm->_plat->walkTo(_vm->_hotspotsWalkPos[6], 1, 0x107C2, 1);
+ _vm->_gnap->walkTo(_vm->_hotspotsWalkPos[6] + Common::Point(1, 0), 0, 0x107BA, 1);
_vm->_plat->_actionStatus = kAS17GetWrench1;
_vm->_gnap->_actionStatus = kAS17GetWrench1;
_vm->_timers[5] = _vm->getRandom(30) + 80;
@@ -2578,7 +2578,7 @@ void Scene17::run() {
if (_canTryGetWrench) {
platHangUpPhone();
_vm->_gnap->useDeviceOnPlatypus();
- _vm->platypusWalkTo(_vm->_hotspotsWalkPos[6] + Common::Point(1, 0), 1, 0x107C2, 1);
+ _vm->_plat->walkTo(_vm->_hotspotsWalkPos[6] + Common::Point(1, 0), 1, 0x107C2, 1);
_vm->_plat->_actionStatus = kAS17TryGetWrench;
_vm->_gnap->_actionStatus = kAS17TryGetWrench;
_vm->_timers[5] = _vm->getRandom(30) + 80;
@@ -2593,7 +2593,7 @@ void Scene17::run() {
case kHS17Phone1:
if (_vm->_gnap->_actionStatus < 0) {
if (_vm->_grabCursorSpriteIndex == kItemDiceQuarterHole) {
- _vm->gnapWalkTo(_vm->_hotspotsWalkPos[2], 0, _vm->_gnap->getSequenceId(gskIdle, 0, 0) | 0x10000, 1);
+ _vm->_gnap->walkTo(_vm->_hotspotsWalkPos[2], 0, _vm->_gnap->getSequenceId(gskIdle, 0, 0) | 0x10000, 1);
_vm->_gnap->_actionStatus = kAS17PutCoinIntoPhone;
} else if (_vm->_grabCursorSpriteIndex >= 0) {
_vm->playGnapShowCurrItem(_vm->_hotspotsWalkPos[2].x, _vm->_hotspotsWalkPos[2].y, 1, 3);
@@ -2605,7 +2605,7 @@ void Scene17::run() {
case GRAB_CURSOR:
if (_vm->isFlag(kGFUnk18)) {
platHangUpPhone();
- _vm->gnapWalkTo(_vm->_gnap->_pos, 0, _vm->_gnap->getSequenceId(gskIdle, _vm->_hotspotsWalkPos[2].x, _vm->_hotspotsWalkPos[2].y) | 0x10000, 1);
+ _vm->_gnap->walkTo(_vm->_gnap->_pos, 0, _vm->_gnap->getSequenceId(gskIdle, _vm->_hotspotsWalkPos[2].x, _vm->_hotspotsWalkPos[2].y) | 0x10000, 1);
_vm->_gnap->_actionStatus = kAS17GetCoinFromPhone;
} else
_vm->playGnapImpossible(0, 0);
@@ -2619,7 +2619,7 @@ void Scene17::run() {
_vm->_isLeavingScene = true;
_vm->_gnap->useDeviceOnPlatypus();
_vm->_plat->_idleFacing = kDirUpLeft;
- _vm->platypusWalkTo(_vm->_hotspotsWalkPos[2], 1, 0x107C2, 1);
+ _vm->_plat->walkTo(_vm->_hotspotsWalkPos[2], 1, 0x107C2, 1);
_vm->setFlag(kGFUnk16);
_vm->_plat->_actionStatus = kAS17PlatUsePhone;
_vm->_gnap->_actionStatus = kAS17PlatUsePhone;
@@ -2634,7 +2634,7 @@ void Scene17::run() {
case kHS17Phone2:
if (_vm->_gnap->_actionStatus < 0) {
if (_vm->_grabCursorSpriteIndex == kItemDiceQuarterHole) {
- _vm->gnapWalkTo(_vm->_hotspotsWalkPos[2], 0, _vm->_gnap->getSequenceId(gskIdle, 0, 0) | 0x10000, 1);
+ _vm->_gnap->walkTo(_vm->_hotspotsWalkPos[2], 0, _vm->_gnap->getSequenceId(gskIdle, 0, 0) | 0x10000, 1);
_vm->_gnap->_actionStatus = kAS17PutCoinIntoPhone;
} else if (_vm->_grabCursorSpriteIndex >= 0) {
_vm->playGnapShowCurrItem(_vm->_hotspotsWalkPos[2].x, _vm->_hotspotsWalkPos[2].y, 1, 3);
@@ -2648,7 +2648,7 @@ void Scene17::run() {
platHangUpPhone();
_vm->_isLeavingScene = true;
_vm->_gnap->_idleFacing = kDirUpLeft;
- _vm->gnapWalkTo(_vm->_hotspotsWalkPos[2], 0, _vm->_gnap->getSequenceId(gskIdle, 0, 0) | 0x10000, 1);
+ _vm->_gnap->walkTo(_vm->_hotspotsWalkPos[2], 0, _vm->_gnap->getSequenceId(gskIdle, 0, 0) | 0x10000, 1);
_vm->_gnap->_actionStatus = kAS17GnapUsePhone;
_vm->setFlag(kGFSpringTaken);
} else
@@ -2663,7 +2663,7 @@ void Scene17::run() {
_vm->_isLeavingScene = true;
_vm->_gnap->useDeviceOnPlatypus();
_vm->_plat->_idleFacing = kDirUpLeft;
- _vm->platypusWalkTo(_vm->_hotspotsWalkPos[2], 1, 0x107C2, 1);
+ _vm->_plat->walkTo(_vm->_hotspotsWalkPos[2], 1, 0x107C2, 1);
_vm->setFlag(kGFUnk16);
_vm->_plat->_actionStatus = kAS17PlatUsePhone;
_vm->_gnap->_actionStatus = kAS17PlatUsePhone;
@@ -2680,10 +2680,10 @@ void Scene17::run() {
_vm->_isLeavingScene = true;
_vm->_newSceneNum = 18;
_vm->_gnap->_idleFacing = kDirUpRight;
- _vm->gnapWalkTo(_vm->_hotspotsWalkPos[5], 0, 0x107BB, 1);
+ _vm->_gnap->walkTo(_vm->_hotspotsWalkPos[5], 0, 0x107BB, 1);
_vm->_gnap->_actionStatus = kAS17LeaveScene;
if (_vm->_plat->_actionStatus != kAS17PlatPhoningAssistant)
- _vm->platypusWalkTo(_vm->_hotspotsWalkPos[5] + Common::Point(-1, 0), -1, 0x107C2, 1);
+ _vm->_plat->walkTo(_vm->_hotspotsWalkPos[5] + Common::Point(-1, 0), -1, 0x107C2, 1);
}
break;
@@ -2693,9 +2693,9 @@ void Scene17::run() {
_vm->_isLeavingScene = true;
_vm->_newSceneNum = 20;
_vm->_gnap->_idleFacing = kDirUpLeft;
- _vm->gnapWalkTo(_vm->_hotspotsWalkPos[3], 0, 0x107BC, 1);
+ _vm->_gnap->walkTo(_vm->_hotspotsWalkPos[3], 0, 0x107BC, 1);
_vm->_gnap->_actionStatus = kAS17LeaveScene;
- _vm->platypusWalkTo(_vm->_hotspotsWalkPos[3] + Common::Point(1, 0), -1, 0x107C2, 1);
+ _vm->_plat->walkTo(_vm->_hotspotsWalkPos[3] + Common::Point(1, 0), -1, 0x107C2, 1);
}
break;
@@ -2703,12 +2703,12 @@ void Scene17::run() {
case kHS17WalkArea2:
case kHS17WalkArea3:
if (_vm->_gnap->_actionStatus < 0)
- _vm->gnapWalkTo(Common::Point(-1, -1), -1, -1, 1);
+ _vm->_gnap->walkTo(Common::Point(-1, -1), -1, -1, 1);
break;
default:
if (_vm->_mouseClickState._left && _vm->_gnap->_actionStatus < 0) {
- _vm->gnapWalkTo(Common::Point(-1, -1), -1, -1, 1);
+ _vm->_gnap->walkTo(Common::Point(-1, -1), -1, -1, 1);
_vm->_mouseClickState._left = 0;
}
break;
@@ -2998,7 +2998,7 @@ void Scene17::updateAnimations() {
_vm->_plat->_sequenceDatNum = 0;
_vm->_gnap->_sequenceId = 0x875;
_vm->_plat->_sequenceId = 0x23F;
- _vm->gnapWalkTo(Common::Point(3, 8), -1, 0x107B9, 1);
+ _vm->_gnap->walkTo(Common::Point(3, 8), -1, 0x107B9, 1);
_vm->_plat->_actionStatus = kAS17GetWrench2;
}
break;
@@ -3302,7 +3302,7 @@ void Scene18::closeHydrantValve() {
_vm->_gnap->_actionStatus = kAS18LeaveScene;
_vm->updateMouseCursor();
if (_vm->isFlag(kGFTruckFilledWithGas)) {
- _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS18HydrantRightValve], 0, 0x107BA, 1);
+ _vm->_gnap->walkTo(_vm->_hotspotsWalkPos[kHS18HydrantRightValve], 0, 0x107BA, 1);
if (_vm->isFlag(kGFTruckKeysUsed)) {
_vm->_gnap->_actionStatus = kAS18CloseRightValveWithGarbageCan;
waitForGnapAction();
@@ -3311,7 +3311,7 @@ void Scene18::closeHydrantValve() {
waitForGnapAction();
}
} else if (_vm->isFlag(kGFBarnPadlockOpen)) {
- _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS18HydrantTopValve], 0, 0x107BA, 1);
+ _vm->_gnap->walkTo(_vm->_hotspotsWalkPos[kHS18HydrantTopValve], 0, 0x107BA, 1);
_vm->_gnap->_actionStatus = kAS18CloseTopValve;
waitForGnapAction();
}
@@ -3384,7 +3384,7 @@ void Scene18::run() {
} else {
gameSys.setAnimation(_currPhoneSequenceId, 254, 3);
}
- _vm->gnapWalkTo(Common::Point(4, 8), -1, 0x107B9, 1);
+ _vm->_gnap->walkTo(Common::Point(4, 8), -1, 0x107B9, 1);
} else {
if (_vm->isFlag(kGFGnapControlsToyUFO)) {
_vm->clearFlag(kGFGnapControlsToyUFO);
@@ -3395,20 +3395,20 @@ void Scene18::run() {
_vm->_gnap->initPos(4, 11, kDirBottomRight);
_vm->_plat->initPos(5, 11, kDirNone);
_vm->endSceneInit();
- _vm->gnapWalkTo(Common::Point(4, 8), -1, 0x107B9, 1);
- _vm->platypusWalkTo(Common::Point(5, 9), -1, 0x107C2, 1);
+ _vm->_gnap->walkTo(Common::Point(4, 8), -1, 0x107B9, 1);
+ _vm->_plat->walkTo(Common::Point(5, 9), -1, 0x107C2, 1);
} else if (_vm->_prevSceneNum == 19) {
_vm->_gnap->initPos(7, 7, kDirBottomRight);
_vm->_plat->initPos(8, 7, kDirNone);
_vm->endSceneInit();
- _vm->gnapWalkTo(Common::Point(7, 8), -1, 0x107B9, 1);
- _vm->platypusWalkTo(Common::Point(8, 8), -1, 0x107C2, 1);
+ _vm->_gnap->walkTo(Common::Point(7, 8), -1, 0x107B9, 1);
+ _vm->_plat->walkTo(Common::Point(8, 8), -1, 0x107C2, 1);
} else {
_vm->_gnap->initPos(-1, 10, kDirBottomRight);
_vm->_plat->initPos(-1, 10, kDirNone);
_vm->endSceneInit();
- _vm->gnapWalkTo(Common::Point(3, 7), -1, 0x107B9, 1);
- _vm->platypusWalkTo(Common::Point(3, 8), -1, 0x107C2, 1);
+ _vm->_gnap->walkTo(Common::Point(3, 7), -1, 0x107B9, 1);
+ _vm->_plat->walkTo(Common::Point(3, 8), -1, 0x107C2, 1);
}
}
@@ -3476,7 +3476,7 @@ void Scene18::run() {
_vm->playGnapScratchingHead(3, 2);
break;
case GRAB_CURSOR:
- _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS18CowboyHat], 0, _vm->_gnap->getSequenceId(gskPullOutDeviceNonWorking, 3, 2) | 0x10000, 1);
+ _vm->_gnap->walkTo(_vm->_hotspotsWalkPos[kHS18CowboyHat], 0, _vm->_gnap->getSequenceId(gskPullOutDeviceNonWorking, 3, 2) | 0x10000, 1);
break;
case TALK_CURSOR:
case PLAT_CURSOR:
@@ -3513,12 +3513,12 @@ void Scene18::run() {
break;
case GRAB_CURSOR:
if (!_vm->isFlag(kGFTruckKeysUsed)) {
- _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS18GarbageCan] + Common::Point((_vm->_gnap->_pos.x < _vm->_s18GarbageCanPos ? 1 : -1), 0),
+ _vm->_gnap->walkTo(_vm->_hotspotsWalkPos[kHS18GarbageCan] + Common::Point((_vm->_gnap->_pos.x < _vm->_s18GarbageCanPos ? 1 : -1), 0),
-1, -1, 1);
- _vm->gnapWalkTo(_vm->_gnap->_pos, 0, _vm->_gnap->getSequenceId(gskIdle, _vm->_s18GarbageCanPos, _vm->_gnap->_pos.y) | 0x10000, 1);
+ _vm->_gnap->walkTo(_vm->_gnap->_pos, 0, _vm->_gnap->getSequenceId(gskIdle, _vm->_s18GarbageCanPos, _vm->_gnap->_pos.y) | 0x10000, 1);
_vm->_gnap->_actionStatus = kAS18GrabGarbageCanFromStreet;
} else if (!_vm->isFlag(kGFTruckFilledWithGas)) {
- if (_vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS18GarbageCan], 0, -1, 1))
+ if (_vm->_gnap->walkTo(_vm->_hotspotsWalkPos[kHS18GarbageCan], 0, -1, 1))
_vm->_gnap->_actionStatus = kAS18GrabGarbageCanFromHydrant;
}
break;
@@ -3570,7 +3570,7 @@ void Scene18::run() {
}
} else {
if (_vm->_grabCursorSpriteIndex == kItemWrench) {
- _vm->gnapWalkTo(_vm->_gnap->_pos, 0, _vm->_gnap->getSequenceId(gskIdle, 2, 8) | 0x10000, 1);
+ _vm->_gnap->walkTo(_vm->_gnap->_pos, 0, _vm->_gnap->getSequenceId(gskIdle, 2, 8) | 0x10000, 1);
_vm->_gnap->_actionStatus = kAS18OpenTopValve;
} else if (_vm->_grabCursorSpriteIndex >= 0) {
_vm->playGnapShowCurrItem(_vm->_hotspotsWalkPos[kHS18HydrantTopValve].x, _vm->_hotspotsWalkPos[kHS18HydrantTopValve].y, 1, 5);
@@ -3582,7 +3582,7 @@ void Scene18::run() {
case GRAB_CURSOR:
if (_vm->isFlag(kGFBarnPadlockOpen)) {
_vm->_hotspots[kHS18WalkArea2]._flags |= SF_WALKABLE;
- _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS18HydrantTopValve], 0, 0x107BA, 1);
+ _vm->_gnap->walkTo(_vm->_hotspotsWalkPos[kHS18HydrantTopValve], 0, 0x107BA, 1);
_vm->_hotspots[kHS18WalkArea2]._flags &= ~SF_WALKABLE;
_vm->_gnap->_actionStatus = kAS18CloseTopValve;
} else
@@ -3612,7 +3612,7 @@ void Scene18::run() {
putDownGarbageCan(0);
}
if (_vm->_grabCursorSpriteIndex == kItemWrench) {
- _vm->gnapWalkTo(_vm->_gnap->_pos, 0, _vm->_gnap->getSequenceId(gskIdle, 2, 8) | 0x10000, 1);
+ _vm->_gnap->walkTo(_vm->_gnap->_pos, 0, _vm->_gnap->getSequenceId(gskIdle, 2, 8) | 0x10000, 1);
if (_vm->isFlag(kGFTruckKeysUsed))
_vm->_gnap->_actionStatus = kAS18OpenRightValveWithGarbageCan;
else
@@ -3626,7 +3626,7 @@ void Scene18::run() {
break;
case GRAB_CURSOR:
if (_vm->isFlag(kGFTruckFilledWithGas)) {
- _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS18HydrantRightValve], 0, 0x107BA, 1);
+ _vm->_gnap->walkTo(_vm->_hotspotsWalkPos[kHS18HydrantRightValve], 0, 0x107BA, 1);
if (_vm->isFlag(kGFTruckKeysUsed))
_vm->_gnap->_actionStatus = kAS18CloseRightValveWithGarbageCan;
else
@@ -3654,10 +3654,10 @@ void Scene18::run() {
} else {
_vm->_isLeavingScene = true;
_vm->_newSceneNum = 19;
- _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS18ExitToyStore], 0, 0x107C0, 1);
+ _vm->_gnap->walkTo(_vm->_hotspotsWalkPos[kHS18ExitToyStore], 0, 0x107C0, 1);
_vm->_gnap->_actionStatus = kAS18LeaveScene;
if (!_vm->isFlag(kGFPlatypusTalkingToAssistant))
- _vm->platypusWalkTo(_vm->_hotspotsWalkPos[kHS18ExitToyStore] + Common::Point(1, 0), -1, 0x107C2, 1);
+ _vm->_plat->walkTo(_vm->_hotspotsWalkPos[kHS18ExitToyStore] + Common::Point(1, 0), -1, 0x107C2, 1);
}
}
break;
@@ -3671,12 +3671,12 @@ void Scene18::run() {
closeHydrantValve();
_vm->_isLeavingScene = true;
_vm->_newSceneNum = 17;
- _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS18ExitPhoneBooth], 0, 0x107AE, 1);
+ _vm->_gnap->walkTo(_vm->_hotspotsWalkPos[kHS18ExitPhoneBooth], 0, 0x107AE, 1);
_vm->_gnap->_actionStatus = kAS18LeaveScene;
if (_vm->isFlag(kGFPlatypusTalkingToAssistant))
_vm->setFlag(kGFUnk27);
else
- _vm->platypusWalkTo(_vm->_hotspotsWalkPos[kHS18ExitPhoneBooth] + Common::Point(1, 0), -1, 0x107C2, 1);
+ _vm->_plat->walkTo(_vm->_hotspotsWalkPos[kHS18ExitPhoneBooth] + Common::Point(1, 0), -1, 0x107C2, 1);
}
break;
@@ -3690,12 +3690,12 @@ void Scene18::run() {
_vm->_isLeavingScene = true;
_vm->_newSceneNum = 20;
_vm->_hotspots[kHS18WalkArea2]._flags |= SF_WALKABLE;
- _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS18ExitGrubCity], 0, 0x107B2, 1);
+ _vm->_gnap->walkTo(_vm->_hotspotsWalkPos[kHS18ExitGrubCity], 0, 0x107B2, 1);
_vm->_gnap->_actionStatus = kAS18LeaveScene;
if (_vm->isFlag(kGFPlatypusTalkingToAssistant))
platEndPhoning(false);
else
- _vm->platypusWalkTo(_vm->_hotspotsWalkPos[kHS18ExitGrubCity] + Common::Point(0, -1), -1, 0x107CF, 1);
+ _vm->_plat->walkTo(_vm->_hotspotsWalkPos[kHS18ExitGrubCity] + Common::Point(0, -1), -1, 0x107CF, 1);
_vm->_hotspots[kHS18WalkArea2]._flags &= ~SF_WALKABLE;
}
break;
@@ -3707,7 +3707,7 @@ void Scene18::run() {
gnapCarryGarbageCanTo(-1);
putDownGarbageCan(0);
} else {
- _vm->gnapWalkTo(Common::Point(-1, -1), -1, -1, 1);
+ _vm->_gnap->walkTo(Common::Point(-1, -1), -1, -1, 1);
}
_vm->_mouseClickState._left = false;
}
@@ -3719,7 +3719,7 @@ void Scene18::run() {
gnapCarryGarbageCanTo(-1);
putDownGarbageCan(0);
} else {
- _vm->gnapWalkTo(Common::Point(-1, -1), -1, -1, 1);
+ _vm->_gnap->walkTo(Common::Point(-1, -1), -1, -1, 1);
}
_vm->_mouseClickState._left = false;
}
@@ -3744,7 +3744,7 @@ void Scene18::run() {
_vm->_plat->_actionStatus = -1;
_vm->_sceneWaiting = false;
_vm->_plat->initPos(-1, 10, kDirNone);
- _vm->platypusWalkTo(Common::Point(3, 9), -1, 0x107C2, 1);
+ _vm->_plat->walkTo(Common::Point(3, 9), -1, 0x107C2, 1);
_vm->clearFlag(kGFPlatypusTalkingToAssistant);
}
} else {
@@ -3840,7 +3840,7 @@ void Scene18::updateAnimations() {
_vm->playGnapUseDevice(0, 0);
gameSys.insertSequence(0x20C, 19, 0, 0, kSeqNone, 0, 0, 0);
_vm->_hotspots[kHS18WalkArea2]._flags |= SF_WALKABLE;
- _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS18HydrantTopValve], 0, 0x107BB, 1);
+ _vm->_gnap->walkTo(_vm->_hotspotsWalkPos[kHS18HydrantTopValve], 0, 0x107BB, 1);
_vm->_hotspots[kHS18WalkArea2]._flags &= ~SF_WALKABLE;
_vm->_gnap->_actionStatus = kAS18OpenTopValveDone;
break;
@@ -3938,7 +3938,7 @@ void Scene18::updateAnimations() {
_vm->playGnapUseDevice(0, 0);
gameSys.insertSequence(0x20B, 19, 0, 0, kSeqNone, 0, 0, 0);
_vm->_hotspots[kHS18WalkArea2]._flags |= SF_WALKABLE;
- _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS18HydrantRightValve], 0, 0x107BA, 1);
+ _vm->_gnap->walkTo(_vm->_hotspotsWalkPos[kHS18HydrantRightValve], 0, 0x107BA, 1);
_vm->_hotspots[kHS18WalkArea2]._flags &= ~SF_WALKABLE;
if (_vm->_gnap->_actionStatus == kAS18OpenRightValveNoGarbageCan)
_vm->_gnap->_actionStatus = kAS18OpenRightValveNoGarbageCanDone;
@@ -4107,7 +4107,7 @@ void Scene19::run() {
gameSys.insertSequence(_currShopAssistantSequenceId, 20, 0, 0, kSeqNone, 0, 0, 0);
_shopAssistantCtr = 0;
_vm->endSceneInit();
- _vm->gnapWalkTo(Common::Point(4, 9), -1, 0x107B9, 1);
+ _vm->_gnap->walkTo(Common::Point(4, 9), -1, 0x107B9, 1);
updateHotspots();
} else {
_currShopAssistantSequenceId = 0x6D;
@@ -4118,8 +4118,8 @@ void Scene19::run() {
_vm->_gnap->initPos(3, 6, kDirBottomRight);
_vm->_plat->initPos(4, 6, kDirNone);
_vm->endSceneInit();
- _vm->gnapWalkTo(Common::Point(4, 9), -1, 0x107B9, 1);
- _vm->platypusWalkTo(Common::Point(5, 9), -1, 0x107C2, 1);
+ _vm->_gnap->walkTo(Common::Point(4, 9), -1, 0x107B9, 1);
+ _vm->_plat->walkTo(Common::Point(5, 9), -1, 0x107C2, 1);
}
while (!_vm->_sceneDone) {
@@ -4170,12 +4170,12 @@ void Scene19::run() {
_vm->_isLeavingScene = true;
_vm->_newSceneNum = 18;
_vm->_hotspots[kHS19WalkArea1]._flags |= SF_WALKABLE;
- _vm->gnapWalkTo(_vm->_hotspotsWalkPos[1], 0, 0x107B2, 1);
+ _vm->_gnap->walkTo(_vm->_hotspotsWalkPos[1], 0, 0x107B2, 1);
_vm->_gnap->_actionStatus = kAS19LeaveScene;
if (_vm->isFlag(kGFPlatypusTalkingToAssistant))
_vm->setFlag(kGFUnk27);
else
- _vm->platypusWalkTo(_vm->_hotspotsWalkPos[1] + Common::Point(1, 0), -1, 0x107C5, 1);
+ _vm->_plat->walkTo(_vm->_hotspotsWalkPos[1] + Common::Point(1, 0), -1, 0x107C5, 1);
_vm->_hotspots[kHS19WalkArea1]._flags &= ~SF_WALKABLE;
}
break;
@@ -4191,7 +4191,7 @@ void Scene19::run() {
break;
case GRAB_CURSOR:
if (!_vm->isFlag(kGFPictureTaken)) {
- _vm->gnapWalkTo(_vm->_gnap->_pos, 0, _vm->_gnap->getSequenceId(gskIdle, _vm->_hotspotsWalkPos[_vm->_sceneClickedHotspot].x, _vm->_hotspotsWalkPos[_vm->_sceneClickedHotspot].y) | 0x10000, 1);
+ _vm->_gnap->walkTo(_vm->_gnap->_pos, 0, _vm->_gnap->getSequenceId(gskIdle, _vm->_hotspotsWalkPos[_vm->_sceneClickedHotspot].x, _vm->_hotspotsWalkPos[_vm->_sceneClickedHotspot].y) | 0x10000, 1);
_vm->_gnap->_actionStatus = kAS19GrabPicture;
}
break;
@@ -4215,7 +4215,7 @@ void Scene19::run() {
break;
case TALK_CURSOR:
_vm->_gnap->_idleFacing = kDirUpRight;
- _vm->gnapWalkTo(_vm->_hotspotsWalkPos[_vm->_sceneClickedHotspot], 0, _vm->_gnap->getSequenceId(gskBrainPulsating, 0, 0) | 0x10000, 1);
+ _vm->_gnap->walkTo(_vm->_hotspotsWalkPos[_vm->_sceneClickedHotspot], 0, _vm->_gnap->getSequenceId(gskBrainPulsating, 0, 0) | 0x10000, 1);
_vm->_gnap->_actionStatus = kAS19TalkShopAssistant;
break;
case GRAB_CURSOR:
@@ -4243,7 +4243,7 @@ void Scene19::run() {
_vm->playGnapMoan2(_vm->_hotspotsWalkPos[_vm->_sceneClickedHotspot].x, _vm->_hotspotsWalkPos[_vm->_sceneClickedHotspot].y);
break;
case GRAB_CURSOR:
- _vm->gnapWalkTo(_vm->_hotspotsWalkPos[_vm->_sceneClickedHotspot], 0, -1, 1);
+ _vm->_gnap->walkTo(_vm->_hotspotsWalkPos[_vm->_sceneClickedHotspot], 0, -1, 1);
_vm->playGnapIdle(_vm->_hotspotsWalkPos[_vm->_sceneClickedHotspot].x, _vm->_hotspotsWalkPos[_vm->_sceneClickedHotspot].y);
_vm->_gnap->_actionStatus = kAS19GrabToy;
break;
@@ -4266,7 +4266,7 @@ void Scene19::run() {
_vm->playGnapScratchingHead(9, 1);
break;
case GRAB_CURSOR:
- _vm->gnapWalkTo(_vm->_hotspotsWalkPos[_vm->_sceneClickedHotspot], 0, -1, 1);
+ _vm->_gnap->walkTo(_vm->_hotspotsWalkPos[_vm->_sceneClickedHotspot], 0, -1, 1);
_vm->playGnapIdle(8, 2);
_vm->_gnap->_actionStatus = kAS19UsePhone;
break;
@@ -4283,12 +4283,12 @@ void Scene19::run() {
case kHS19WalkArea2:
case kHS19WalkArea3:
if (_vm->_gnap->_actionStatus < 0)
- _vm->gnapWalkTo(Common::Point(-1, -1), -1, -1, 1);
+ _vm->_gnap->walkTo(Common::Point(-1, -1), -1, -1, 1);
break;
default:
if (_vm->_mouseClickState._left) {
- _vm->gnapWalkTo(Common::Point(-1, -1), -1, -1, 1);
+ _vm->_gnap->walkTo(Common::Point(-1, -1), -1, -1, 1);
_vm->_mouseClickState._left = 0;
}
}
diff --git a/engines/gnap/scenes/group2.cpp b/engines/gnap/scenes/group2.cpp
index e02b2fa8b5..582aa5bae1 100644
--- a/engines/gnap/scenes/group2.cpp
+++ b/engines/gnap/scenes/group2.cpp
@@ -208,45 +208,45 @@ void Scene20::run() {
}
_vm->_gnap->initPos(11, 8, kDirBottomLeft);
_vm->_plat->initPos(11, 9, kDirUnk4);
- _vm->gnapWalkTo(Common::Point(5, 8), -1, 0x107BA, 1);
- _vm->platypusWalkTo(Common::Point(6, 9), -1, 0x107C2, 1);
+ _vm->_gnap->walkTo(Common::Point(5, 8), -1, 0x107BA, 1);
+ _vm->_plat->walkTo(Common::Point(6, 9), -1, 0x107C2, 1);
} else {
switch (_vm->_prevSceneNum) {
case 17:
_vm->_gnap->initPos(5, 11, kDirBottomRight);
_vm->_plat->initPos(6, 11, kDirNone);
_vm->endSceneInit();
- _vm->gnapWalkTo(Common::Point(5, 8), -1, 0x107B9, 1);
- _vm->platypusWalkTo(Common::Point(6, 9), -1, 0x107C2, 1);
+ _vm->_gnap->walkTo(Common::Point(5, 8), -1, 0x107B9, 1);
+ _vm->_plat->walkTo(Common::Point(6, 9), -1, 0x107C2, 1);
break;
case 18:
_vm->_gnap->initPos(11, 8, kDirBottomLeft);
_vm->_plat->initPos(11, 9, kDirUnk4);
_vm->endSceneInit();
- _vm->gnapWalkTo(Common::Point(5, 8), -1, 0x107BA, 1);
- _vm->platypusWalkTo(Common::Point(6, 9), -1, 0x107C2, 1);
+ _vm->_gnap->walkTo(Common::Point(5, 8), -1, 0x107BA, 1);
+ _vm->_plat->walkTo(Common::Point(6, 9), -1, 0x107C2, 1);
break;
case 21:
_vm->_gnap->initPos(-1, 8, kDirBottomLeft);
_vm->_plat->initPos(-1, 9, kDirUnk4);
_vm->endSceneInit();
- _vm->gnapWalkTo(Common::Point(3, 8), -1, 0x107B9, 1);
- _vm->platypusWalkTo(Common::Point(3, 9), -1, 0x107C2, 1);
+ _vm->_gnap->walkTo(Common::Point(3, 8), -1, 0x107B9, 1);
+ _vm->_plat->walkTo(Common::Point(3, 9), -1, 0x107C2, 1);
break;
case 22:
_vm->_gnap->initPos(7, 6, kDirBottomRight);
_vm->_plat->initPos(8, 6, kDirNone);
_vm->endSceneInit();
- _vm->gnapWalkTo(Common::Point(8, 8), -1, 0x107B9, 1);
- _vm->platypusWalkTo(Common::Point(9, 9), -1, 0x107C2, 1);
+ _vm->_gnap->walkTo(Common::Point(8, 8), -1, 0x107B9, 1);
+ _vm->_plat->walkTo(Common::Point(9, 9), -1, 0x107C2, 1);
break;
default:
_vm->_gnap->initPos(8, 6, kDirBottomLeft);
_vm->_plat->initPos(9, 6, kDirUnk4);
_vm->endSceneInit();
_vm->_hotspots[kHS20WalkArea2]._flags |= SF_WALKABLE;
- _vm->gnapWalkTo(Common::Point(8, 8), -1, 0x107BA, 1);
- _vm->platypusWalkTo(Common::Point(9, 9), -1, 0x107C2, 1);
+ _vm->_gnap->walkTo(Common::Point(8, 8), -1, 0x107BA, 1);
+ _vm->_plat->walkTo(Common::Point(9, 9), -1, 0x107C2, 1);
_vm->_hotspots[kHS20WalkArea2]._flags &= ~SF_WALKABLE;
break;
}
@@ -302,9 +302,9 @@ void Scene20::run() {
_vm->_timers[4] = 0;
_vm->_isLeavingScene = true;
_vm->_newSceneNum = 21;
- _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS20ExitParkingLot], 0, 0x107AF, 1);
+ _vm->_gnap->walkTo(_vm->_hotspotsWalkPos[kHS20ExitParkingLot], 0, 0x107AF, 1);
_vm->_gnap->_actionStatus = kAS20LeaveScene;
- _vm->platypusWalkTo(_vm->_hotspotsWalkPos[kHS20ExitParkingLot] + Common::Point(0, 1), -1, 0x107CF, 1);
+ _vm->_plat->walkTo(_vm->_hotspotsWalkPos[kHS20ExitParkingLot] + Common::Point(0, 1), -1, 0x107CF, 1);
_vm->_plat->_idleFacing = kDirUnk4;
}
break;
@@ -315,9 +315,9 @@ void Scene20::run() {
_vm->_timers[4] = 0;
_vm->_isLeavingScene = true;
_vm->_newSceneNum = 17;
- _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS20ExitPhone], 0, 0x107AE, 1);
+ _vm->_gnap->walkTo(_vm->_hotspotsWalkPos[kHS20ExitPhone], 0, 0x107AE, 1);
_vm->_gnap->_actionStatus = kAS20LeaveScene;
- _vm->platypusWalkTo(_vm->_hotspotsWalkPos[kHS20ExitPhone] + Common::Point(1, 0), -1, 0x107C2, 1);
+ _vm->_plat->walkTo(_vm->_hotspotsWalkPos[kHS20ExitPhone] + Common::Point(1, 0), -1, 0x107C2, 1);
}
break;
@@ -328,9 +328,9 @@ void Scene20::run() {
_vm->_isLeavingScene = true;
_vm->_newSceneNum = 18;
_vm->_hotspots[kHS20WalkArea2]._flags |= SF_WALKABLE;
- _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS20ExitOutsideToyStore], 0, 0x107AB, 1);
+ _vm->_gnap->walkTo(_vm->_hotspotsWalkPos[kHS20ExitOutsideToyStore], 0, 0x107AB, 1);
_vm->_gnap->_actionStatus = kAS20LeaveScene;
- _vm->platypusWalkTo(_vm->_hotspotsWalkPos[kHS20ExitOutsideToyStore] + Common::Point(0, 1), -1, 0x107CD, 1);
+ _vm->_plat->walkTo(_vm->_hotspotsWalkPos[kHS20ExitOutsideToyStore] + Common::Point(0, 1), -1, 0x107CD, 1);
_vm->_hotspots[kHS20WalkArea2]._flags &= ~SF_WALKABLE;
}
break;
@@ -341,9 +341,9 @@ void Scene20::run() {
_vm->_timers[4] = 0;
_vm->_isLeavingScene = true;
_vm->_newSceneNum = 22;
- _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS20ExitInsideGrubCity] + Common::Point(0, - 1), 0, 0x107BB, 1);
+ _vm->_gnap->walkTo(_vm->_hotspotsWalkPos[kHS20ExitInsideGrubCity] + Common::Point(0, - 1), 0, 0x107BB, 1);
_vm->_gnap->_actionStatus = kAS20LeaveScene;
- _vm->platypusWalkTo(_vm->_hotspotsWalkPos[kHS20ExitInsideGrubCity] + Common::Point(1, 0), -1, 0x107C2, 1);
+ _vm->_plat->walkTo(_vm->_hotspotsWalkPos[kHS20ExitInsideGrubCity] + Common::Point(1, 0), -1, 0x107C2, 1);
_vm->_plat->_idleFacing = kDirUnk4;
}
break;
@@ -354,9 +354,9 @@ void Scene20::run() {
_vm->_timers[4] = 0;
_vm->_isLeavingScene = true;
_vm->_newSceneNum = 24;
- _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS20ExitOutsideCircusWorld], 0, 0x107BB, 1);
+ _vm->_gnap->walkTo(_vm->_hotspotsWalkPos[kHS20ExitOutsideCircusWorld], 0, 0x107BB, 1);
_vm->_gnap->_actionStatus = kAS20LeaveScene;
- _vm->platypusWalkTo(_vm->_hotspotsWalkPos[kHS20ExitOutsideCircusWorld] + Common::Point(1, 0), -1, 0x107C2, 1);
+ _vm->_plat->walkTo(_vm->_hotspotsWalkPos[kHS20ExitOutsideCircusWorld] + Common::Point(1, 0), -1, 0x107C2, 1);
}
break;
@@ -371,7 +371,7 @@ void Scene20::run() {
break;
case GRAB_CURSOR:
_vm->_gnap->_idleFacing = kDirUpRight;
- _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS20StonerGuy], 0, _vm->_gnap->getSequenceId(gskIdle, 0, 0) | 0x10000, 1);
+ _vm->_gnap->walkTo(_vm->_hotspotsWalkPos[kHS20StonerGuy], 0, _vm->_gnap->getSequenceId(gskIdle, 0, 0) | 0x10000, 1);
if (_stonerGuyShowingJoint)
_vm->_gnap->_actionStatus = kAS20GrabJoint;
else
@@ -379,7 +379,7 @@ void Scene20::run() {
break;
case TALK_CURSOR:
_vm->_gnap->_idleFacing = kDirUpRight;
- _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS20StonerGuy], 0, _vm->_gnap->getSequenceId(gskBrainPulsating, 0, 0) | 0x10000, 1);
+ _vm->_gnap->walkTo(_vm->_hotspotsWalkPos[kHS20StonerGuy], 0, _vm->_gnap->getSequenceId(gskBrainPulsating, 0, 0) | 0x10000, 1);
if (_vm->isFlag(kGFJointTaken))
_vm->_gnap->_actionStatus = kAS20TalkStonerGuyNoJoint;
else
@@ -405,12 +405,12 @@ void Scene20::run() {
case GRAB_CURSOR:
_stonerGuyShowingJoint = false;
_vm->_gnap->_idleFacing = kDirUpLeft;
- _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS20GroceryStoreGuy], 0, _vm->_gnap->getSequenceId(gskIdle, 0, 0) | 0x10000, 1);
+ _vm->_gnap->walkTo(_vm->_hotspotsWalkPos[kHS20GroceryStoreGuy], 0, _vm->_gnap->getSequenceId(gskIdle, 0, 0) | 0x10000, 1);
_vm->_gnap->_actionStatus = kAS20GrabGroceryStoreGuy;
break;
case TALK_CURSOR:
_vm->_gnap->_idleFacing = kDirUpLeft;
- _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS20GroceryStoreGuy], 0, _vm->_gnap->getSequenceId(gskBrainPulsating, 0, 0) | 0x10000, 1);
+ _vm->_gnap->walkTo(_vm->_hotspotsWalkPos[kHS20GroceryStoreGuy], 0, _vm->_gnap->getSequenceId(gskBrainPulsating, 0, 0) | 0x10000, 1);
_vm->_gnap->_actionStatus = kAS20TalkGroceryStoreGuy;
break;
case PLAT_CURSOR:
@@ -425,7 +425,7 @@ void Scene20::run() {
if (_vm->_gnap->_actionStatus < 0) {
if (_vm->_grabCursorSpriteIndex == kItemCowboyHat) {
_vm->_gnap->_idleFacing = kDirUpRight;
- _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS20GroceryStoreHat], 0, _vm->_gnap->getSequenceId(gskIdle, 0, 0) | 0x10000, 1);
+ _vm->_gnap->walkTo(_vm->_hotspotsWalkPos[kHS20GroceryStoreHat], 0, _vm->_gnap->getSequenceId(gskIdle, 0, 0) | 0x10000, 1);
_vm->_gnap->_actionStatus = kAS20SwitchGroceryStoreHat;
} else if (_vm->_grabCursorSpriteIndex >= 0) {
_vm->playGnapShowCurrItem(_vm->_hotspotsWalkPos[kHS20GroceryStoreHat].x, _vm->_hotspotsWalkPos[kHS20GroceryStoreHat].y, 1, 6);
@@ -437,7 +437,7 @@ void Scene20::run() {
case GRAB_CURSOR:
_stonerGuyShowingJoint = false;
_vm->_gnap->_idleFacing = kDirUpLeft;
- _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS20GroceryStoreGuy], 0, _vm->_gnap->getSequenceId(gskIdle, 0, 0) | 0x10000, 1);
+ _vm->_gnap->walkTo(_vm->_hotspotsWalkPos[kHS20GroceryStoreGuy], 0, _vm->_gnap->getSequenceId(gskIdle, 0, 0) | 0x10000, 1);
_vm->_gnap->_actionStatus = kAS20GrabGroceryStoreHat;
break;
case TALK_CURSOR:
@@ -451,12 +451,12 @@ void Scene20::run() {
case kHS20WalkArea1:
case kHS20WalkArea2:
- _vm->gnapWalkTo(Common::Point(-1, -1), -1, -1, 1);
+ _vm->_gnap->walkTo(Common::Point(-1, -1), -1, -1, 1);
break;
default:
if (_vm->_mouseClickState._left) {
- _vm->gnapWalkTo(Common::Point(-1, -1), -1, -1, 1);
+ _vm->_gnap->walkTo(Common::Point(-1, -1), -1, -1, 1);
_vm->_mouseClickState._left = false;
}
break;
@@ -625,7 +625,7 @@ void Scene20::updateAnimations() {
_vm->showCursor();
_vm->setGrabCursorSprite(kItemGroceryStoreHat);
_vm->_gnap->_idleFacing = kDirBottomRight;
- _vm->gnapWalkTo(Common::Point(3, 8), -1, _vm->_gnap->getSequenceId(gskIdle, 0, 0) | 0x10000, 1);
+ _vm->_gnap->walkTo(Common::Point(3, 8), -1, _vm->_gnap->getSequenceId(gskIdle, 0, 0) | 0x10000, 1);
_vm->_gnap->_actionStatus = -1;
break;
case kAS20GrabJointDone:
@@ -674,7 +674,7 @@ void Scene20::updateAnimations() {
_currGroceryStoreGuySequenceId = 377;
_nextGroceryStoreGuySequenceId = -1;
_nextStonerGuySequenceId = -1;
- _vm->gnapWalkTo(Common::Point(4, 8), -1, 0x107BB, 1);
+ _vm->_gnap->walkTo(Common::Point(4, 8), -1, 0x107BB, 1);
break;
case 0x17C:
gameSys.setAnimation(0, 0, 3);
@@ -757,8 +757,8 @@ void Scene21::run() {
if (!_vm->isFlag(kGFUnk04))
gameSys.insertSequence(0x8D, 59, 0, 0, kSeqNone, 0, 0, 0);
_vm->endSceneInit();
- _vm->gnapWalkTo(Common::Point(5, 8), -1, 0x107B9, 1);
- _vm->platypusWalkTo(Common::Point(6, 8), -1, 0x107C2, 1);
+ _vm->_gnap->walkTo(Common::Point(5, 8), -1, 0x107B9, 1);
+ _vm->_plat->walkTo(Common::Point(6, 8), -1, 0x107C2, 1);
}
} else {
_vm->_gnap->initPos(5, 11, kDirBottomRight);
@@ -769,8 +769,8 @@ void Scene21::run() {
_nextOldLadySequenceId = -1;
_vm->_timers[4] = _vm->getRandom(30) + 50;
_vm->endSceneInit();
- _vm->gnapWalkTo(Common::Point(5, 8), -1, 0x107B9, 1);
- _vm->platypusWalkTo(Common::Point(6, 8), -1, 0x107C2, 1);
+ _vm->_gnap->walkTo(Common::Point(5, 8), -1, 0x107B9, 1);
+ _vm->_plat->walkTo(Common::Point(6, 8), -1, 0x107C2, 1);
}
while (!_vm->_sceneDone) {
@@ -824,7 +824,7 @@ void Scene21::run() {
_vm->playGnapScratchingHead(2, 5);
break;
case GRAB_CURSOR:
- _vm->gnapWalkTo(_vm->_gnap->_pos, 0, _vm->_gnap->getSequenceId(gskIdle, _vm->_hotspotsWalkPos[kHS21Banana].x, _vm->_hotspotsWalkPos[kHS21Banana].y) | 0x10000, 1);
+ _vm->_gnap->walkTo(_vm->_gnap->_pos, 0, _vm->_gnap->getSequenceId(gskIdle, _vm->_hotspotsWalkPos[kHS21Banana].x, _vm->_hotspotsWalkPos[kHS21Banana].y) | 0x10000, 1);
_vm->playGnapPullOutDevice(2, 5);
_vm->playGnapUseDevice(0, 0);
_vm->_gnap->_actionStatus = kAS21GrabBanana;
@@ -841,7 +841,7 @@ void Scene21::run() {
if (_vm->_gnap->_actionStatus < 0) {
if (_vm->_grabCursorSpriteIndex == kItemGroceryStoreHat) {
_vm->_newSceneNum = 47;
- _vm->gnapWalkTo(Common::Point(4, 6), 0, _vm->_gnap->getSequenceId(gskIdle, 0, 0) | 0x10000, 1);
+ _vm->_gnap->walkTo(Common::Point(4, 6), 0, _vm->_gnap->getSequenceId(gskIdle, 0, 0) | 0x10000, 1);
_vm->_gnap->_actionStatus = kAS21UseHatWithOldLady;
} else if (_vm->_grabCursorSpriteIndex >= 0) {
_vm->playGnapShowCurrItem(4, 6, 7, 4);
@@ -853,13 +853,13 @@ void Scene21::run() {
case GRAB_CURSOR:
_vm->_gnap->_idleFacing = kDirUpLeft;
_vm->_hotspots[kHS21WalkArea1]._flags |= SF_WALKABLE;
- _vm->gnapWalkTo(Common::Point(7, 6), 0, _vm->_gnap->getSequenceId(gskIdle, 0, 0) | 0x10000, 1);
+ _vm->_gnap->walkTo(Common::Point(7, 6), 0, _vm->_gnap->getSequenceId(gskIdle, 0, 0) | 0x10000, 1);
_vm->_gnap->_actionStatus = kAS21GrabOldLady;
_vm->_hotspots[kHS21WalkArea1]._flags &= ~SF_WALKABLE;
break;
case TALK_CURSOR:
_vm->_gnap->_idleFacing = kDirUpRight;
- _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS21OldLady], 0, _vm->_gnap->getSequenceId(gskBrainPulsating, 0, 0) | 0x10000, 1);
+ _vm->_gnap->walkTo(_vm->_hotspotsWalkPos[kHS21OldLady], 0, _vm->_gnap->getSequenceId(gskBrainPulsating, 0, 0) | 0x10000, 1);
_vm->_gnap->_actionStatus = kAS21TalkOldLady;
break;
case PLAT_CURSOR:
@@ -874,20 +874,20 @@ void Scene21::run() {
if (_vm->_gnap->_actionStatus < 0) {
_vm->_isLeavingScene = true;
_vm->_newSceneNum = 20;
- _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS21ExitOutsideGrubCity], 0, 0x107B3, 1);
+ _vm->_gnap->walkTo(_vm->_hotspotsWalkPos[kHS21ExitOutsideGrubCity], 0, 0x107B3, 1);
_vm->_gnap->_actionStatus = kAS21LeaveScene;
- _vm->platypusWalkTo(_vm->_hotspotsWalkPos[kHS21ExitOutsideGrubCity] + Common::Point(1, 0), -1, 0x107C2, 1);
+ _vm->_plat->walkTo(_vm->_hotspotsWalkPos[kHS21ExitOutsideGrubCity] + Common::Point(1, 0), -1, 0x107C2, 1);
}
break;
case kHS21WalkArea1:
case kHS21WalkArea2:
- _vm->gnapWalkTo(Common::Point(-1, -1), -1, -1, 1);
+ _vm->_gnap->walkTo(Common::Point(-1, -1), -1, -1, 1);
break;
default:
if (_vm->_mouseClickState._left) {
- _vm->gnapWalkTo(Common::Point(-1, -1), -1, -1, 1);
+ _vm->_gnap->walkTo(Common::Point(-1, -1), -1, -1, 1);
_vm->_mouseClickState._left = false;
}
break;
@@ -1050,8 +1050,8 @@ void Scene22::run() {
_vm->_gnap->initPos(11, _vm->_hotspotsWalkPos[kHS22ExitBackGrubCity].y, kDirBottomRight);
_vm->_plat->initPos(11, _vm->_hotspotsWalkPos[kHS22ExitBackGrubCity].y + 1, kDirNone);
_vm->endSceneInit();
- _vm->gnapWalkTo(Common::Point(8, 8), -1, 0x107B9, 1);
- _vm->platypusWalkTo(Common::Point(9, 8), -1, 0x107C2, 1);
+ _vm->_gnap->walkTo(Common::Point(8, 8), -1, 0x107B9, 1);
+ _vm->_plat->walkTo(Common::Point(9, 8), -1, 0x107C2, 1);
}
if (_vm->isFlag(kGFSceneFlag1)) {
@@ -1134,9 +1134,9 @@ void Scene22::run() {
if (_vm->_gnap->_actionStatus < 0) {
_vm->_isLeavingScene = true;
_vm->_newSceneNum = 20;
- _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS22ExitOutsideGrubCity], 0, 0x107AF, 1);
+ _vm->_gnap->walkTo(_vm->_hotspotsWalkPos[kHS22ExitOutsideGrubCity], 0, 0x107AF, 1);
_vm->_gnap->_actionStatus = kAS22LeaveScene;
- _vm->platypusWalkTo(_vm->_hotspotsWalkPos[kHS22ExitOutsideGrubCity] + Common::Point(0, 1), -1, 0x107C2, 1);
+ _vm->_plat->walkTo(_vm->_hotspotsWalkPos[kHS22ExitOutsideGrubCity] + Common::Point(0, 1), -1, 0x107C2, 1);
}
break;
@@ -1144,9 +1144,9 @@ void Scene22::run() {
if (_vm->_gnap->_actionStatus < 0) {
_vm->_isLeavingScene = true;
_vm->_newSceneNum = 23;
- _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS22ExitBackGrubCity], 0, 0x107AB, 1);
+ _vm->_gnap->walkTo(_vm->_hotspotsWalkPos[kHS22ExitBackGrubCity], 0, 0x107AB, 1);
_vm->_gnap->_actionStatus = kAS22LeaveScene;
- _vm->platypusWalkTo(_vm->_hotspotsWalkPos[kHS22ExitBackGrubCity] + Common::Point(0, 1), -1, 0x107C2, 1);
+ _vm->_plat->walkTo(_vm->_hotspotsWalkPos[kHS22ExitBackGrubCity] + Common::Point(0, 1), -1, 0x107C2, 1);
}
break;
@@ -1164,7 +1164,7 @@ void Scene22::run() {
break;
case TALK_CURSOR:
_vm->_gnap->_idleFacing = kDirUpRight;
- _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS22Cashier], 0, _vm->_gnap->getSequenceId(gskBrainPulsating, 0, 0) | 0x10000, 1);
+ _vm->_gnap->walkTo(_vm->_hotspotsWalkPos[kHS22Cashier], 0, _vm->_gnap->getSequenceId(gskBrainPulsating, 0, 0) | 0x10000, 1);
_vm->_gnap->_actionStatus = kAS22TalkCashier;
break;
case PLAT_CURSOR:
@@ -1177,12 +1177,12 @@ void Scene22::run() {
case kHS22WalkArea1:
case kHS22WalkArea2:
- _vm->gnapWalkTo(Common::Point(-1, -1), -1, -1, 1);
+ _vm->_gnap->walkTo(Common::Point(-1, -1), -1, -1, 1);
break;
default:
if (_vm->_mouseClickState._left) {
- _vm->gnapWalkTo(Common::Point(-1, -1), -1, -1, 1);
+ _vm->_gnap->walkTo(Common::Point(-1, -1), -1, -1, 1);
_vm->_mouseClickState._left = false;
}
break;
@@ -1298,12 +1298,12 @@ void Scene23::run() {
gameSys.insertSequence(0xBF, 2, 0, 0, kSeqNone, 0, 0, 0);
_vm->endSceneInit();
- _vm->platypusWalkTo(Common::Point(1, 7), -1, 0x107C2, 1);
+ _vm->_plat->walkTo(Common::Point(1, 7), -1, 0x107C2, 1);
if (_vm->isFlag(kGFUnk24)) {
- _vm->gnapWalkTo(Common::Point(2, 7), -1, 0x107B9, 1);
+ _vm->_gnap->walkTo(Common::Point(2, 7), -1, 0x107B9, 1);
} else {
- _vm->gnapWalkTo(Common::Point(2, 7), 0, 0x107B9, 1);
+ _vm->_gnap->walkTo(Common::Point(2, 7), 0, 0x107B9, 1);
while (gameSys.getAnimationStatus(0) != 2)
_vm->gameUpdateTick();
_vm->playSequences(0x48, 0xBA, 0xBB, 0xBC);
@@ -1363,7 +1363,7 @@ void Scene23::run() {
if (_vm->isFlag(kGFSceneFlag1))
_vm->playGnapMoan2(0, 0);
else {
- _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS23Cereals], 0, _vm->_gnap->getSequenceId(gskIdle, 0, 0) | 0x10000, 1);
+ _vm->_gnap->walkTo(_vm->_hotspotsWalkPos[kHS23Cereals], 0, _vm->_gnap->getSequenceId(gskIdle, 0, 0) | 0x10000, 1);
_vm->_gnap->_actionStatus = kAS23LookCereals;
}
break;
@@ -1372,7 +1372,7 @@ void Scene23::run() {
_vm->playGnapImpossible(0, 0);
else {
_vm->_gnap->_idleFacing = kDirBottomRight;
- _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS23Cereals], 0, _vm->_gnap->getSequenceId(gskIdle, 0, 0) | 0x10000, 1);
+ _vm->_gnap->walkTo(_vm->_hotspotsWalkPos[kHS23Cereals], 0, _vm->_gnap->getSequenceId(gskIdle, 0, 0) | 0x10000, 1);
_vm->setFlag(kGFSceneFlag1);
_vm->_gnap->_actionStatus = kAS23GrabCereals;
_vm->invAdd(kItemCereals);
@@ -1391,21 +1391,21 @@ void Scene23::run() {
if (_vm->_gnap->_actionStatus < 0) {
_vm->_isLeavingScene = true;
_vm->_newSceneNum = 22;
- _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS23ExitFrontGrubCity], 0, 0x107AF, 1);
+ _vm->_gnap->walkTo(_vm->_hotspotsWalkPos[kHS23ExitFrontGrubCity], 0, 0x107AF, 1);
_vm->_gnap->_actionStatus = kAS23LeaveScene;
- _vm->platypusWalkTo(_vm->_hotspotsWalkPos[kHS23ExitFrontGrubCity] + Common::Point(0, -1), -1, 0x107C2, 1);
+ _vm->_plat->walkTo(_vm->_hotspotsWalkPos[kHS23ExitFrontGrubCity] + Common::Point(0, -1), -1, 0x107C2, 1);
}
break;
case kHS23WalkArea1:
case kHS23WalkArea2:
if (_vm->_gnap->_actionStatus < 0)
- _vm->gnapWalkTo(Common::Point(-1, -1), -1, -1, 1);
+ _vm->_gnap->walkTo(Common::Point(-1, -1), -1, -1, 1);
break;
default:
if (_vm->_mouseClickState._left) {
- _vm->gnapWalkTo(Common::Point(-1, -1), -1, -1, 1);
+ _vm->_gnap->walkTo(Common::Point(-1, -1), -1, -1, 1);
_vm->_mouseClickState._left = false;
}
break;
@@ -1566,14 +1566,14 @@ void Scene24::run() {
_vm->_gnap->initPos(1, 8, kDirBottomRight);
_vm->_plat->initPos(2, 8, kDirNone);
_vm->endSceneInit();
- _vm->gnapWalkTo(Common::Point(1, 9), -1, 0x107B9, 1);
- _vm->platypusWalkTo(Common::Point(2, 9), -1, 0x107C2, 1);
+ _vm->_gnap->walkTo(Common::Point(1, 9), -1, 0x107B9, 1);
+ _vm->_plat->walkTo(Common::Point(2, 9), -1, 0x107C2, 1);
} else {
_vm->_gnap->initPos(8, 8, kDirBottomLeft);
_vm->_plat->initPos(8, 8, kDirUnk4);
_vm->endSceneInit();
- _vm->gnapWalkTo(Common::Point(2, 8), -1, 0x107BA, 1);
- _vm->platypusWalkTo(Common::Point(3, 8), -1, 0x107C2, 1);
+ _vm->_gnap->walkTo(Common::Point(2, 8), -1, 0x107BA, 1);
+ _vm->_plat->walkTo(Common::Point(3, 8), -1, 0x107C2, 1);
}
while (!_vm->_sceneDone) {
@@ -1624,9 +1624,9 @@ void Scene24::run() {
if (_vm->_gnap->_actionStatus < 0) {
_vm->_isLeavingScene = true;
_vm->_newSceneNum = 25;
- _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS24ExitCircusWorld], 0, 0x107AB, 1);
+ _vm->_gnap->walkTo(_vm->_hotspotsWalkPos[kHS24ExitCircusWorld], 0, 0x107AB, 1);
_vm->_gnap->_actionStatus = kAS24LeaveScene;
- _vm->platypusWalkTo(_vm->_hotspotsWalkPos[kHS24ExitCircusWorld] + Common::Point(1, 0), -1, 0x107C2, 1);
+ _vm->_plat->walkTo(_vm->_hotspotsWalkPos[kHS24ExitCircusWorld] + Common::Point(1, 0), -1, 0x107C2, 1);
}
break;
@@ -1635,9 +1635,9 @@ void Scene24::run() {
_vm->_isLeavingScene = true;
_vm->_newSceneNum = 20;
_vm->_gnap->_idleFacing = kDirUpRight;
- _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS24ExitOutsideGrubCity], 0, _vm->_gnap->getSequenceId(gskIdle, 0, 0) | 0x10000, 1);
+ _vm->_gnap->walkTo(_vm->_hotspotsWalkPos[kHS24ExitOutsideGrubCity], 0, _vm->_gnap->getSequenceId(gskIdle, 0, 0) | 0x10000, 1);
_vm->_gnap->_actionStatus = kAS24LeaveScene;
- _vm->platypusWalkTo(_vm->_hotspotsWalkPos[kHS24ExitOutsideGrubCity] + Common::Point(1, 0), -1, 0x107C2, 1);
+ _vm->_plat->walkTo(_vm->_hotspotsWalkPos[kHS24ExitOutsideGrubCity] + Common::Point(1, 0), -1, 0x107C2, 1);
}
break;
@@ -1645,12 +1645,12 @@ void Scene24::run() {
case kHS24WalkArea2:
case kHS24WalkArea3:
if (_vm->_gnap->_actionStatus == -1)
- _vm->gnapWalkTo(Common::Point(-1, -1), -1, -1, 1);
+ _vm->_gnap->walkTo(Common::Point(-1, -1), -1, -1, 1);
break;
default:
if (_vm->_mouseClickState._left) {
- _vm->gnapWalkTo(Common::Point(-1, -1), -1, -1, 1);
+ _vm->_gnap->walkTo(Common::Point(-1, -1), -1, -1, 1);
_vm->_mouseClickState._left = false;
}
break;
@@ -1815,14 +1815,14 @@ void Scene25::run() {
_vm->_gnap->initPos(5, 11, kDirUpLeft);
_vm->_plat->initPos(6, 11, kDirUnk4);
_vm->endSceneInit();
- _vm->gnapWalkTo(Common::Point(5, 7), -1, 0x107BA, 1);
- _vm->platypusWalkTo(Common::Point(6, 7), -1, 0x107C2, 1);
+ _vm->_gnap->walkTo(Common::Point(5, 7), -1, 0x107BA, 1);
+ _vm->_plat->walkTo(Common::Point(6, 7), -1, 0x107C2, 1);
} else {
_vm->_gnap->initPos(5, 6, kDirBottomRight);
_vm->_plat->initPos(6, 6, kDirNone);
_vm->endSceneInit();
- _vm->gnapWalkTo(Common::Point(5, 8), -1, 0x107B9, 1);
- _vm->platypusWalkTo(Common::Point(6, 8), -1, 0x107C2, 1);
+ _vm->_gnap->walkTo(Common::Point(5, 8), -1, 0x107B9, 1);
+ _vm->_plat->walkTo(Common::Point(6, 8), -1, 0x107C2, 1);
}
while (!_vm->_sceneDone) {
@@ -1870,7 +1870,7 @@ void Scene25::run() {
if (_vm->_gnap->_actionStatus < 0) {
if (_vm->_grabCursorSpriteIndex == kItemTickets) {
_vm->_gnap->_actionStatus = kAS25ShowTicketToVendor;
- _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS25TicketVendor], 0, _vm->_gnap->getSequenceId(gskIdle, 9, 4) | 0x10000, 1);
+ _vm->_gnap->walkTo(_vm->_hotspotsWalkPos[kHS25TicketVendor], 0, _vm->_gnap->getSequenceId(gskIdle, 9, 4) | 0x10000, 1);
_vm->playGnapPullOutDevice(0, 0);
_vm->playGnapUseDevice(0, 0);
} else if (_vm->_grabCursorSpriteIndex >= 0) {
@@ -1884,7 +1884,7 @@ void Scene25::run() {
break;
case TALK_CURSOR:
_vm->_gnap->_idleFacing = kDirUpRight;
- _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS25TicketVendor], 0, _vm->_gnap->getSequenceId(gskBrainPulsating, 0, 0) | 0x10000, 1);
+ _vm->_gnap->walkTo(_vm->_hotspotsWalkPos[kHS25TicketVendor], 0, _vm->_gnap->getSequenceId(gskBrainPulsating, 0, 0) | 0x10000, 1);
_vm->_gnap->_actionStatus = kAS25TalkTicketVendor;
break;
case GRAB_CURSOR:
@@ -1900,9 +1900,9 @@ void Scene25::run() {
if (_vm->_gnap->_actionStatus < 0) {
_vm->_isLeavingScene = true;
_vm->_newSceneNum = 24;
- _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS25ExitOutsideCircusWorld], 0, 0x107B4, 1);
+ _vm->_gnap->walkTo(_vm->_hotspotsWalkPos[kHS25ExitOutsideCircusWorld], 0, 0x107B4, 1);
_vm->_gnap->_actionStatus = kAS25LeaveScene;
- _vm->platypusWalkTo(_vm->_hotspotsWalkPos[kHS25ExitOutsideCircusWorld] + Common::Point(1, 0), -1, 0x107C2, 1);
+ _vm->_plat->walkTo(_vm->_hotspotsWalkPos[kHS25ExitOutsideCircusWorld] + Common::Point(1, 0), -1, 0x107C2, 1);
}
break;
@@ -1912,13 +1912,13 @@ void Scene25::run() {
_vm->_isLeavingScene = true;
_vm->_newSceneNum = 26;
_vm->_hotspots[kHS25WalkArea1]._flags |= SF_WALKABLE;
- _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS25ExitInsideCircusWorld], 0, 0x107B1, 1);
+ _vm->_gnap->walkTo(_vm->_hotspotsWalkPos[kHS25ExitInsideCircusWorld], 0, 0x107B1, 1);
_vm->_gnap->_actionStatus = kAS25LeaveScene;
- _vm->platypusWalkTo(_vm->_hotspotsWalkPos[kHS25ExitInsideCircusWorld] + Common::Point(1, 0), -1, 0x107C2, 1);
+ _vm->_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;
- _vm->gnapWalkTo(Common::Point(4, 5), 0, 0x107BB, 1);
+ _vm->_gnap->walkTo(Common::Point(4, 5), 0, 0x107BB, 1);
_vm->_gnap->_actionStatus = kAS25EnterCircusWihoutTicket;
_vm->_hotspots[kHS25WalkArea1]._flags &= ~SF_WALKABLE;
}
@@ -1935,7 +1935,7 @@ void Scene25::run() {
} else {
switch (_vm->_verbCursor) {
case LOOK_CURSOR:
- _vm->gnapWalkTo(_vm->_hotspotsWalkPos[_vm->_sceneClickedHotspot], -1, -1, 1);
+ _vm->_gnap->walkTo(_vm->_hotspotsWalkPos[_vm->_sceneClickedHotspot], -1, -1, 1);
if (_vm->_sceneClickedHotspot == 5 || _vm->_sceneClickedHotspot == 6)
_vm->_gnap->_idleFacing = kDirUpLeft;
else if (_vm->_sceneClickedHotspot == 8)
@@ -1958,12 +1958,12 @@ void Scene25::run() {
case kHS25WalkArea1:
case kHS25WalkArea2:
if (_vm->_gnap->_actionStatus < 0)
- _vm->gnapWalkTo(Common::Point(-1, -1), -1, -1, 1);
+ _vm->_gnap->walkTo(Common::Point(-1, -1), -1, -1, 1);
break;
default:
if (_vm->_mouseClickState._left) {
- _vm->gnapWalkTo(Common::Point(-1, -1), -1, -1, 1);
+ _vm->_gnap->walkTo(Common::Point(-1, -1), -1, -1, 1);
_vm->_mouseClickState._left = false;
}
break;
@@ -2044,7 +2044,7 @@ void Scene25::updateAnimations() {
_nextTicketVendorSequenceId = -1;
_vm->_hotspots[kHS25WalkArea1]._flags |= SF_WALKABLE;
_vm->playGnapIdle(0, 0);
- _vm->gnapWalkTo(_vm->_hotspotsWalkPos[3], -1, 0x107BB, 1);
+ _vm->_gnap->walkTo(_vm->_hotspotsWalkPos[3], -1, 0x107BB, 1);
_vm->_hotspots[kHS25WalkArea1]._flags &= ~SF_WALKABLE;
_vm->_gnap->_actionStatus = kAS25EnterCircusWihoutTicketDone;
break;
@@ -2133,8 +2133,8 @@ void Scene26::run() {
_vm->_gnap->initPos(-1, 8, kDirBottomRight);
_vm->_plat->initPos(-2, 8, kDirNone);
_vm->endSceneInit();
- _vm->gnapWalkTo(Common::Point(2, 8), -1, 0x107B9, 1);
- _vm->platypusWalkTo(Common::Point(1, 8), -1, 0x107C2, 1);
+ _vm->_gnap->walkTo(Common::Point(2, 8), -1, 0x107B9, 1);
+ _vm->_plat->walkTo(Common::Point(1, 8), -1, 0x107C2, 1);
} else {
_vm->_gnap->initPos(2, 8, kDirBottomRight);
_vm->_plat->initPos(3, 8, kDirNone);
@@ -2186,7 +2186,7 @@ void Scene26::run() {
if (_vm->_gnap->_actionStatus < 0) {
_vm->_isLeavingScene = true;
_vm->_newSceneNum = 25;
- _vm->gnapWalkTo(Common::Point(-1, _vm->_hotspotsWalkPos[kHS26ExitOutsideCircusWorld].y), 0, 0x107AE, 1);
+ _vm->_gnap->walkTo(Common::Point(-1, _vm->_hotspotsWalkPos[kHS26ExitOutsideCircusWorld].y), 0, 0x107AE, 1);
_vm->_gnap->_actionStatus = kAS26LeaveScene;
}
break;
@@ -2195,7 +2195,7 @@ void Scene26::run() {
if (_vm->_gnap->_actionStatus < 0) {
_vm->_isLeavingScene = true;
_vm->_newSceneNum = 27;
- _vm->gnapWalkTo(Common::Point(-1, _vm->_hotspotsWalkPos[kHS26ExitOutsideClown].y), 0, 0x107BC, 1);
+ _vm->_gnap->walkTo(Common::Point(-1, _vm->_hotspotsWalkPos[kHS26ExitOutsideClown].y), 0, 0x107BC, 1);
_vm->_gnap->_actionStatus = kAS26LeaveScene;
}
break;
@@ -2204,7 +2204,7 @@ void Scene26::run() {
if (_vm->_gnap->_actionStatus < 0) {
_vm->_isLeavingScene = true;
_vm->_newSceneNum = 29;
- _vm->gnapWalkTo(Common::Point(-1, _vm->_hotspotsWalkPos[kHS26ExitArcade].y), 0, 0x107BC, 1);
+ _vm->_gnap->walkTo(Common::Point(-1, _vm->_hotspotsWalkPos[kHS26ExitArcade].y), 0, 0x107BC, 1);
_vm->_gnap->_actionStatus = kAS26LeaveScene;
}
break;
@@ -2213,7 +2213,7 @@ void Scene26::run() {
if (_vm->_gnap->_actionStatus < 0) {
_vm->_isLeavingScene = true;
_vm->_newSceneNum = 30;
- _vm->gnapWalkTo(Common::Point(-1, _vm->_hotspotsWalkPos[kHS26ExitElephant].y), 0, 0x107BC, 1);
+ _vm->_gnap->walkTo(Common::Point(-1, _vm->_hotspotsWalkPos[kHS26ExitElephant].y), 0, 0x107BC, 1);
_vm->_gnap->_actionStatus = kAS26LeaveScene;
}
break;
@@ -2222,7 +2222,7 @@ void Scene26::run() {
if (_vm->_gnap->_actionStatus < 0) {
_vm->_isLeavingScene = true;
_vm->_newSceneNum = 31;
- _vm->gnapWalkTo(Common::Point(-1, _vm->_hotspotsWalkPos[kHS26ExitBeerStand].y), 0, 0x107BB, 1);
+ _vm->_gnap->walkTo(Common::Point(-1, _vm->_hotspotsWalkPos[kHS26ExitBeerStand].y), 0, 0x107BB, 1);
_vm->_gnap->_actionStatus = kAS26LeaveScene;
}
break;
@@ -2230,12 +2230,12 @@ void Scene26::run() {
case kHS26WalkArea1:
case kHS26WalkArea2:
if (_vm->_gnap->_actionStatus < 0)
- _vm->gnapWalkTo(Common::Point(-1, -1), -1, -1, 1);
+ _vm->_gnap->walkTo(Common::Point(-1, -1), -1, -1, 1);
break;
default:
if (_vm->_mouseClickState._left) {
- _vm->gnapWalkTo(Common::Point(-1, -1), -1, -1, 1);
+ _vm->_gnap->walkTo(Common::Point(-1, -1), -1, -1, 1);
_vm->_mouseClickState._left = false;
}
break;
@@ -2350,22 +2350,22 @@ void Scene27::run() {
_vm->_gnap->initPos(7, 12, kDirBottomRight);
_vm->_plat->initPos(6, 12, kDirNone);
_vm->endSceneInit();
- _vm->gnapWalkTo(Common::Point(7, 8), -1, 0x107B9, 1);
- _vm->platypusWalkTo(Common::Point(6, 8), -1, 0x107C2, 1);
+ _vm->_gnap->walkTo(Common::Point(7, 8), -1, 0x107B9, 1);
+ _vm->_plat->walkTo(Common::Point(6, 8), -1, 0x107C2, 1);
break;
case 29:
_vm->_gnap->initPos(-1, 8, kDirBottomRight);
_vm->_plat->initPos(-1, 9, kDirNone);
_vm->endSceneInit();
- _vm->gnapWalkTo(Common::Point(3, 8), -1, 0x107B9, 1);
- _vm->platypusWalkTo(Common::Point(3, 9), -1, 0x107C2, 1);
+ _vm->_gnap->walkTo(Common::Point(3, 8), -1, 0x107B9, 1);
+ _vm->_plat->walkTo(Common::Point(3, 9), -1, 0x107C2, 1);
break;
case 31:
_vm->_gnap->initPos(12, 8, kDirBottomLeft);
_vm->_plat->initPos(12, 9, kDirUnk4);
_vm->endSceneInit();
- _vm->gnapWalkTo(Common::Point(8, 8), -1, 0x107BA, 1);
- _vm->platypusWalkTo(Common::Point(8, 9), -1, 0x107C2, 1);
+ _vm->_gnap->walkTo(Common::Point(8, 8), -1, 0x107BA, 1);
+ _vm->_plat->walkTo(Common::Point(8, 9), -1, 0x107C2, 1);
break;
default:
_vm->_gnap->initPos(6, 8, kDirBottomRight);
@@ -2420,7 +2420,7 @@ void Scene27::run() {
if (_vm->_gnap->_actionStatus < 0) {
if (_vm->_grabCursorSpriteIndex == kItemPicture) {
_vm->_gnap->_idleFacing = kDirUpLeft;
- if (_vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS27Janitor], 0, 0x107BC, 1))
+ if (_vm->_gnap->walkTo(_vm->_hotspotsWalkPos[kHS27Janitor], 0, 0x107BC, 1))
_vm->_gnap->_actionStatus = kAS27ShowPictureToJanitor;
} else if (_vm->_grabCursorSpriteIndex >= 0) {
_vm->playGnapShowCurrItem(_vm->_hotspotsWalkPos[kHS27Janitor].x, _vm->_hotspotsWalkPos[kHS27Janitor].y, 7, 3);
@@ -2431,7 +2431,7 @@ void Scene27::run() {
break;
case TALK_CURSOR:
_vm->_gnap->_idleFacing = kDirUpLeft;
- _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS27Janitor], 0, _vm->_gnap->getSequenceId(gskBrainPulsating, 0, 0) | 0x10000, 1);
+ _vm->_gnap->walkTo(_vm->_hotspotsWalkPos[kHS27Janitor], 0, _vm->_gnap->getSequenceId(gskBrainPulsating, 0, 0) | 0x10000, 1);
_vm->_gnap->_actionStatus = kAS27TalkJanitor;
break;
case GRAB_CURSOR:
@@ -2454,7 +2454,7 @@ void Scene27::run() {
break;
case GRAB_CURSOR:
_vm->_gnap->_idleFacing = kDirUpLeft;
- _vm->gnapWalkTo(_vm->_gnap->_pos, 0, _vm->_gnap->getSequenceId(gskIdle, _vm->_hotspotsWalkPos[kHS27Bucket].x, _vm->_hotspotsWalkPos[kHS27Bucket].y) | 0x10000, 1);
+ _vm->_gnap->walkTo(_vm->_gnap->_pos, 0, _vm->_gnap->getSequenceId(gskIdle, _vm->_hotspotsWalkPos[kHS27Bucket].x, _vm->_hotspotsWalkPos[kHS27Bucket].y) | 0x10000, 1);
_vm->_gnap->_actionStatus = kAS27GrabBucket;
break;
case TALK_CURSOR:
@@ -2470,9 +2470,9 @@ void Scene27::run() {
if (_vm->_gnap->_actionStatus < 0) {
_vm->_isLeavingScene = true;
_vm->_newSceneNum = 26;
- _vm->gnapWalkTo(Common::Point(-1, _vm->_hotspotsWalkPos[kHS27ExitCircus].y), 0, 0x107AE, 1);
+ _vm->_gnap->walkTo(Common::Point(-1, _vm->_hotspotsWalkPos[kHS27ExitCircus].y), 0, 0x107AE, 1);
_vm->_gnap->_actionStatus = kAS27LeaveScene;
- _vm->platypusWalkTo(_vm->_hotspotsWalkPos[kHS27ExitCircus] + Common::Point(1, 0), -1, 0x107C7, 1);
+ _vm->_plat->walkTo(_vm->_hotspotsWalkPos[kHS27ExitCircus] + Common::Point(1, 0), -1, 0x107C7, 1);
}
break;
@@ -2480,9 +2480,9 @@ void Scene27::run() {
if (_vm->_gnap->_actionStatus < 0) {
_vm->_isLeavingScene = true;
_vm->_newSceneNum = 29;
- _vm->gnapWalkTo(Common::Point(-1, _vm->_hotspotsWalkPos[kHS27ExitArcade].y), 0, 0x107AF, 1);
+ _vm->_gnap->walkTo(Common::Point(-1, _vm->_hotspotsWalkPos[kHS27ExitArcade].y), 0, 0x107AF, 1);
_vm->_gnap->_actionStatus = kAS27LeaveScene;
- _vm->platypusWalkTo(_vm->_hotspotsWalkPos[kHS27ExitArcade] + Common::Point(0, 1), -1, 0x107CF, 1);
+ _vm->_plat->walkTo(_vm->_hotspotsWalkPos[kHS27ExitArcade] + Common::Point(0, 1), -1, 0x107CF, 1);
}
break;
@@ -2490,9 +2490,9 @@ void Scene27::run() {
if (_vm->_gnap->_actionStatus < 0) {
_vm->_isLeavingScene = true;
_vm->_newSceneNum = 31;
- _vm->gnapWalkTo(Common::Point(-1, _vm->_hotspotsWalkPos[kHS27ExitBeerStand].y), 0, 0x107AB, 1);
+ _vm->_gnap->walkTo(Common::Point(-1, _vm->_hotspotsWalkPos[kHS27ExitBeerStand].y), 0, 0x107AB, 1);
_vm->_gnap->_actionStatus = kAS27LeaveScene;
- _vm->platypusWalkTo(_vm->_hotspotsWalkPos[kHS27ExitBeerStand] + Common::Point(0, 1), -1, 0x107CD, 1);
+ _vm->_plat->walkTo(_vm->_hotspotsWalkPos[kHS27ExitBeerStand] + Common::Point(0, 1), -1, 0x107CD, 1);
}
break;
@@ -2501,12 +2501,12 @@ void Scene27::run() {
if (_vm->isFlag(kGFPlatypus)) {
_vm->_isLeavingScene = true;
_vm->_newSceneNum = 28;
- _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS27ExitClown], 0, 0x107AD, 1);
+ _vm->_gnap->walkTo(_vm->_hotspotsWalkPos[kHS27ExitClown], 0, 0x107AD, 1);
_vm->_gnap->_actionStatus = kAS27LeaveScene;
- _vm->platypusWalkTo(_vm->_hotspotsWalkPos[kHS27ExitClown] + Common::Point(1, 0), -1, 0x107C4, 1);
+ _vm->_plat->walkTo(_vm->_hotspotsWalkPos[kHS27ExitClown] + Common::Point(1, 0), -1, 0x107C4, 1);
} else {
_vm->_hotspots[kHS27WalkArea1]._flags |= SF_WALKABLE;
- _vm->gnapWalkTo(Common::Point(_vm->_hotspotsWalkPos[kHS27ExitClown].x, 7), 0, 0x107BC, 1);
+ _vm->_gnap->walkTo(Common::Point(_vm->_hotspotsWalkPos[kHS27ExitClown].x, 7), 0, 0x107BC, 1);
_vm->_hotspots[kHS27WalkArea1]._flags &= SF_WALKABLE;
_vm->_gnap->_actionStatus = kAS27TryEnterClownTent;
}
@@ -2515,12 +2515,12 @@ void Scene27::run() {
case kHS27WalkArea1:
if (_vm->_gnap->_actionStatus < 0)
- _vm->gnapWalkTo(Common::Point(-1, -1), -1, -1, 1);
+ _vm->_gnap->walkTo(Common::Point(-1, -1), -1, -1, 1);
break;
default:
if (_vm->_mouseClickState._left && _vm->_gnap->_actionStatus < 0) {
- _vm->gnapWalkTo(Common::Point(-1, -1), -1, -1, 1);
+ _vm->_gnap->walkTo(Common::Point(-1, -1), -1, -1, 1);
_vm->_mouseClickState._left = false;
}
break;
@@ -2614,12 +2614,12 @@ void Scene27::updateAnimations() {
break;
case kAS27TryEnterClownTentDone:
_vm->_hotspots[kHS27WalkArea1]._flags |= SF_WALKABLE;
- _vm->gnapWalkTo(Common::Point(_vm->_hotspotsWalkPos[7].x, 9), -1, 0x107BC, 1);
+ _vm->_gnap->walkTo(Common::Point(_vm->_hotspotsWalkPos[7].x, 9), -1, 0x107BC, 1);
_vm->_hotspots[kHS27WalkArea1]._flags &= ~SF_WALKABLE;
_vm->_gnap->_actionStatus = -1;
break;
case kAS27EnterClownTent:
- _vm->gnapWalkTo(_vm->_gnap->_pos, 0, 0x107B2, 1);
+ _vm->_gnap->walkTo(_vm->_gnap->_pos, 0, 0x107B2, 1);
_vm->_gnap->_actionStatus = kAS27LeaveScene;
break;
case kAS27LeaveScene:
@@ -2799,14 +2799,14 @@ void Scene28::run() {
case GRAB_CURSOR:
if (_vm->isFlag(kGFUnk21)) {
if (!_vm->invHas(kItemHorn)) {
- _vm->gnapWalkTo(_vm->_gnap->_pos, 0, _vm->_gnap->getSequenceId(gskIdle, _vm->_hotspotsWalkPos[kHS28Horn].x, _vm->_hotspotsWalkPos[kHS28Horn].y) | 0x10000, 1);
+ _vm->_gnap->walkTo(_vm->_gnap->_pos, 0, _vm->_gnap->getSequenceId(gskIdle, _vm->_hotspotsWalkPos[kHS28Horn].x, _vm->_hotspotsWalkPos[kHS28Horn].y) | 0x10000, 1);
_vm->_gnap->_actionStatus = kAS28GrabHornSuccess;
}
} else {
_vm->_gnap->_idleFacing = kDirUpLeft;
- _vm->gnapWalkTo(Common::Point(2, 8), 0, 0x107BB, 1);
+ _vm->_gnap->walkTo(Common::Point(2, 8), 0, 0x107BB, 1);
_vm->_hotspots[kHS28WalkArea1]._flags |= SF_WALKABLE;
- _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS28Horn], 0, 0x107BB, 1);
+ _vm->_gnap->walkTo(_vm->_hotspotsWalkPos[kHS28Horn], 0, 0x107BB, 1);
_vm->_hotspots[kHS28WalkArea1]._flags &= ~SF_WALKABLE;
_vm->_gnap->_actionStatus = kAS28GrabHornFails;
}
@@ -2829,13 +2829,13 @@ void Scene28::run() {
_vm->playGnapImpossible(0, 0);
} else if (_vm->_grabCursorSpriteIndex == kItemBucketWithBeer) {
_vm->_gnap->_idleFacing = kDirUpLeft;
- _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS28Clown], 0, 0x107BC, 1);
+ _vm->_gnap->walkTo(_vm->_hotspotsWalkPos[kHS28Clown], 0, 0x107BC, 1);
_vm->playGnapPullOutDevice(0, 0);
_vm->playGnapUseDevice(0, 0);
_vm->_gnap->_actionStatus = kAS28UseBeerBucketWithClown;
} else if (_vm->_grabCursorSpriteIndex == kItemBucketWithPill) {
_vm->_gnap->_idleFacing = kDirUpLeft;
- _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS28Clown], 0, 0x107BC, 1);
+ _vm->_gnap->walkTo(_vm->_hotspotsWalkPos[kHS28Clown], 0, 0x107BC, 1);
_vm->playGnapPullOutDevice(0, 0);
_vm->playGnapUseDevice(0, 0);
_vm->_gnap->_actionStatus = kAS28UsePillBucketWithClown;
@@ -2848,7 +2848,7 @@ void Scene28::run() {
break;
case TALK_CURSOR:
_vm->_gnap->_idleFacing = kDirUpLeft;
- _vm->gnapWalkTo(Common::Point(5, 8), 0, _vm->_gnap->getSequenceId(gskBrainPulsating, 0, 0) | 0x10000, 1);
+ _vm->_gnap->walkTo(Common::Point(5, 8), 0, _vm->_gnap->getSequenceId(gskBrainPulsating, 0, 0) | 0x10000, 1);
_vm->_gnap->_actionStatus = kAS28TalkClown;
break;
case GRAB_CURSOR:
@@ -2865,10 +2865,10 @@ void Scene28::run() {
_vm->_isLeavingScene = true;
_vm->_newSceneNum = 27;
_vm->_hotspots[kHS28WalkArea1]._flags |= SF_WALKABLE;
- _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS28ExitOutsideClown], 0, 0x107BF, 1);
+ _vm->_gnap->walkTo(_vm->_hotspotsWalkPos[kHS28ExitOutsideClown], 0, 0x107BF, 1);
_vm->_gnap->_actionStatus = kAS28LeaveScene;
_vm->_hotspots[kHS28WalkArea1]._flags &= ~SF_WALKABLE;
- _vm->platypusWalkTo(_vm->_hotspotsWalkPos[kHS28ExitOutsideClown] + Common::Point(-1, 0), -1, 0x107C2, 1);
+ _vm->_plat->walkTo(_vm->_hotspotsWalkPos[kHS28ExitOutsideClown] + Common::Point(-1, 0), -1, 0x107C2, 1);
}
break;
@@ -2884,7 +2884,7 @@ void Scene28::run() {
_vm->playGnapScratchingHead(8, 6);
break;
case GRAB_CURSOR:
- _vm->gnapWalkTo(_vm->_gnap->_pos, 0, _vm->_gnap->getSequenceId(gskIdle, _vm->_hotspotsWalkPos[kHS28EmptyBucket].x, _vm->_hotspotsWalkPos[kHS28EmptyBucket].y) | 0x10000, 1);
+ _vm->_gnap->walkTo(_vm->_gnap->_pos, 0, _vm->_gnap->getSequenceId(gskIdle, _vm->_hotspotsWalkPos[kHS28EmptyBucket].x, _vm->_hotspotsWalkPos[kHS28EmptyBucket].y) | 0x10000, 1);
_vm->_gnap->_actionStatus = kAS28GrabEmptyBucket;
break;
case TALK_CURSOR:
@@ -2899,12 +2899,12 @@ void Scene28::run() {
case kHS28WalkArea1:
case kHS28WalkArea2:
if (_vm->_gnap->_actionStatus < 0)
- _vm->gnapWalkTo(Common::Point(-1, -1), -1, -1, 1);
+ _vm->_gnap->walkTo(Common::Point(-1, -1), -1, -1, 1);
break;
default:
if (_vm->_mouseClickState._left && _vm->_gnap->_actionStatus < 0) {
- _vm->gnapWalkTo(Common::Point(-1, -1), -1, -1, 1);
+ _vm->_gnap->walkTo(Common::Point(-1, -1), -1, -1, 1);
_vm->_mouseClickState._left = false;
}
break;
@@ -3003,7 +3003,7 @@ void Scene28::updateAnimations() {
_currClownSequenceId = 0x11B;
_nextClownSequenceId = -1;
_vm->_gnap->_actionStatus = -1;
- _vm->gnapWalkTo(Common::Point(2, 8), -1, 0x107BB, 1);
+ _vm->_gnap->walkTo(Common::Point(2, 8), -1, 0x107BB, 1);
break;
case kAS28TalkClown:
_clownTalkCtr = (_clownTalkCtr + 1) % 2;
@@ -3127,14 +3127,14 @@ void Scene29::run() {
_vm->_gnap->initPos(12, 7, kDirBottomRight);
_vm->_plat->initPos(12, 8, kDirNone);
_vm->endSceneInit();
- _vm->gnapWalkTo(Common::Point(8, 7), -1, 0x107B9, 1);
- _vm->platypusWalkTo(Common::Point(8, 8), -1, 0x107C2, 1);
+ _vm->_gnap->walkTo(Common::Point(8, 7), -1, 0x107B9, 1);
+ _vm->_plat->walkTo(Common::Point(8, 8), -1, 0x107C2, 1);
} else {
_vm->_gnap->initPos(-1, 7, kDirBottomRight);
_vm->_plat->initPos(-2, 7, kDirNone);
_vm->endSceneInit();
- _vm->gnapWalkTo(Common::Point(2, 7), -1, 0x107B9, 1);
- _vm->platypusWalkTo(Common::Point(1, 7), -1, 0x107C2, 1);
+ _vm->_gnap->walkTo(Common::Point(2, 7), -1, 0x107B9, 1);
+ _vm->_plat->walkTo(Common::Point(1, 7), -1, 0x107C2, 1);
}
while (!_vm->_sceneDone) {
@@ -3182,7 +3182,7 @@ void Scene29::run() {
if (_vm->_gnap->_actionStatus < 0) {
if (_vm->_grabCursorSpriteIndex == kItemBanana) {
_vm->_gnap->_idleFacing = kDirBottomRight;
- _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS29Monkey], 0, _vm->_gnap->getSequenceId(gskIdle, 0, 0) | 0x10000, 1);
+ _vm->_gnap->walkTo(_vm->_hotspotsWalkPos[kHS29Monkey], 0, _vm->_gnap->getSequenceId(gskIdle, 0, 0) | 0x10000, 1);
_vm->_gnap->_actionStatus = kAS29UseBananaWithMonkey;
_vm->_newSceneNum = 51;
_vm->_isLeavingScene = true;
@@ -3210,9 +3210,9 @@ void Scene29::run() {
if (_vm->_gnap->_actionStatus < 0) {
_vm->_isLeavingScene = true;
_vm->_newSceneNum = 26;
- _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS29ExitCircus], 0, 0x107AE, 1);
+ _vm->_gnap->walkTo(_vm->_hotspotsWalkPos[kHS29ExitCircus], 0, 0x107AE, 1);
_vm->_gnap->_actionStatus = kAS29LeaveScene;
- _vm->platypusWalkTo(_vm->_hotspotsWalkPos[kHS29ExitCircus] + Common::Point(1, 0), -1, -1, 1);
+ _vm->_plat->walkTo(_vm->_hotspotsWalkPos[kHS29ExitCircus] + Common::Point(1, 0), -1, -1, 1);
}
break;
@@ -3220,9 +3220,9 @@ void Scene29::run() {
if (_vm->_gnap->_actionStatus < 0) {
_vm->_isLeavingScene = true;
_vm->_newSceneNum = 27;
- _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS29ExitOutsideClown], 0, 0x107AB, 1);
+ _vm->_gnap->walkTo(_vm->_hotspotsWalkPos[kHS29ExitOutsideClown], 0, 0x107AB, 1);
_vm->_gnap->_actionStatus = kAS29LeaveScene;
- _vm->platypusWalkTo(_vm->_hotspotsWalkPos[kHS29ExitOutsideClown] + Common::Point(0, -1), -1, 0x107CD, 1);
+ _vm->_plat->walkTo(_vm->_hotspotsWalkPos[kHS29ExitOutsideClown] + Common::Point(0, -1), -1, 0x107CD, 1);
}
break;
@@ -3232,7 +3232,7 @@ void Scene29::run() {
_vm->setGrabCursorSprite(-1);
_vm->_isLeavingScene = true;
_vm->_newSceneNum = 52;
- _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS29Aracde], 0, -1, 1);
+ _vm->_gnap->walkTo(_vm->_hotspotsWalkPos[kHS29Aracde], 0, -1, 1);
_vm->playGnapIdle(_vm->_hotspotsWalkPos[kHS29Aracde].x, _vm->_hotspotsWalkPos[kHS29Aracde].y);
_vm->_gnap->_actionStatus = kAS29LeaveScene;
} else if (_vm->_grabCursorSpriteIndex >= 0) {
@@ -3254,12 +3254,12 @@ void Scene29::run() {
case kHS29WalkArea1:
if (_vm->_gnap->_actionStatus < 0)
- _vm->gnapWalkTo(Common::Point(-1, -1), -1, -1, 1);
+ _vm->_gnap->walkTo(Common::Point(-1, -1), -1, -1, 1);
break;
default:
if (_vm->_mouseClickState._left) {
- _vm->gnapWalkTo(Common::Point(-1, -1), -1, -1, 1);
+ _vm->_gnap->walkTo(Common::Point(-1, -1), -1, -1, 1);
_vm->_mouseClickState._left = false;
}
break;
@@ -3351,7 +3351,7 @@ void Scene29::updateAnimations() {
_vm->_timers[5] = 30;
while (_vm->_timers[5])
_vm->gameUpdateTick();
- _vm->platypusWalkTo(Common::Point(0, 8), 1, 0x107CF, 1);
+ _vm->_plat->walkTo(Common::Point(0, 8), 1, 0x107CF, 1);
while (gameSys.getAnimationStatus(1) != 2)
_vm->gameUpdateTick();
} else if (_nextMonkeySequenceId == -1) {
diff --git a/engines/gnap/scenes/group3.cpp b/engines/gnap/scenes/group3.cpp
index 8a91123571..99cd34be69 100644
--- a/engines/gnap/scenes/group3.cpp
+++ b/engines/gnap/scenes/group3.cpp
@@ -67,8 +67,8 @@ void Scene30::run() {
_vm->_gnap->initPos(7, 12, kDirBottomRight);
_vm->_plat->initPos(6, 12, kDirNone);
_vm->endSceneInit();
- _vm->gnapWalkTo(Common::Point(7, 8), -1, 0x107B9, 1);
- _vm->platypusWalkTo(Common::Point(6, 8), -1, 0x107C2, 1);
+ _vm->_gnap->walkTo(Common::Point(7, 8), -1, 0x107B9, 1);
+ _vm->_plat->walkTo(Common::Point(6, 8), -1, 0x107C2, 1);
while (!_vm->_sceneDone) {
_vm->updateMouseCursor();
@@ -115,7 +115,7 @@ void Scene30::run() {
if (_vm->_gnap->_actionStatus < 0) {
if (_vm->_grabCursorSpriteIndex == kItemDiceQuarterHole && !_vm->isFlag(kGFUnk23)) {
_vm->_hotspots[kHS30WalkArea1]._flags |= SF_WALKABLE;
- _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS30PillMachine], 0, 0x107BC, 1);
+ _vm->_gnap->walkTo(_vm->_hotspotsWalkPos[kHS30PillMachine], 0, 0x107BC, 1);
_vm->_hotspots[kHS30WalkArea1]._flags &= ~SF_WALKABLE;
_vm->_gnap->_actionStatus = kAS30UsePillMachine;
hasTakenPill = true;
@@ -124,7 +124,7 @@ void Scene30::run() {
} else {
switch (_vm->_verbCursor) {
case LOOK_CURSOR:
- _vm->gnapWalkTo(Common::Point(9, 8), 0, 0x107BC, 1);
+ _vm->_gnap->walkTo(Common::Point(9, 8), 0, 0x107BC, 1);
_vm->_gnap->_actionStatus = kAS30LookPillMachine;
break;
case GRAB_CURSOR:
@@ -146,20 +146,20 @@ void Scene30::run() {
_vm->_newSceneNum = 47;
else
_vm->_newSceneNum = 26;
- _vm->gnapWalkTo(Common::Point(-1, _vm->_hotspotsWalkPos[kHS30ExitCircus].y), 0, 0x107AE, 1);
+ _vm->_gnap->walkTo(Common::Point(-1, _vm->_hotspotsWalkPos[kHS30ExitCircus].y), 0, 0x107AE, 1);
_vm->_gnap->_actionStatus = kAS30LeaveScene;
- _vm->platypusWalkTo(_vm->_hotspotsWalkPos[kHS30ExitCircus] + Common::Point(1, 0), -1, 0x107C2, 1);
+ _vm->_plat->walkTo(_vm->_hotspotsWalkPos[kHS30ExitCircus] + Common::Point(1, 0), -1, 0x107C2, 1);
}
break;
case kHS30WalkArea1:
if (_vm->_gnap->_actionStatus < 0)
- _vm->gnapWalkTo(Common::Point(-1, -1), -1, -1, 1);
+ _vm->_gnap->walkTo(Common::Point(-1, -1), -1, -1, 1);
break;
default:
if (_vm->_mouseClickState._left) {
- _vm->gnapWalkTo(Common::Point(-1, -1), -1, -1, 1);
+ _vm->_gnap->walkTo(Common::Point(-1, -1), -1, -1, 1);
_vm->_mouseClickState._left = false;
}
break;
@@ -254,7 +254,7 @@ void Scene30::updateAnimations() {
break;
case kAS30UsePillMachine4:
gameSys.insertSequence(0x106, 1, 0, 0, kSeqNone, 0, 0, 0);
- _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS30PillMachine] + Common::Point(0, 1), -1, 0x107BC, 1);
+ _vm->_gnap->walkTo(_vm->_hotspotsWalkPos[kHS30PillMachine] + Common::Point(0, 1), -1, 0x107BC, 1);
_vm->_gnap->_actionStatus = -1;
break;
case kAS30LookPillMachine:
@@ -315,14 +315,14 @@ void Scene31::run() {
_vm->_gnap->initPos(-1, 8, kDirBottomLeft);
_vm->_plat->initPos(-1, 9, kDirUnk4);
_vm->endSceneInit();
- _vm->gnapWalkTo(Common::Point(3, 8), -1, 0x107BA, 1);
- _vm->platypusWalkTo(Common::Point(3, 9), -1, 0x107D2, 1);
+ _vm->_gnap->walkTo(Common::Point(3, 8), -1, 0x107BA, 1);
+ _vm->_plat->walkTo(Common::Point(3, 9), -1, 0x107D2, 1);
} else {
_vm->_gnap->initPos(7, 12, kDirBottomRight);
_vm->_plat->initPos(6, 12, kDirNone);
_vm->endSceneInit();
- _vm->gnapWalkTo(Common::Point(7, 8), -1, 0x107BA, 1);
- _vm->platypusWalkTo(Common::Point(6, 8), -1, 0x107D2, 1);
+ _vm->_gnap->walkTo(Common::Point(7, 8), -1, 0x107BA, 1);
+ _vm->_plat->walkTo(Common::Point(6, 8), -1, 0x107D2, 1);
}
while (!_vm->_sceneDone) {
@@ -381,9 +381,9 @@ void Scene31::run() {
_vm->playGnapScratchingHead(2, 2);
break;
case GRAB_CURSOR:
- _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS31MeasuringClown] + Common::Point(0, 1), -1, -1, 1);
+ _vm->_gnap->walkTo(_vm->_hotspotsWalkPos[kHS31MeasuringClown] + Common::Point(0, 1), -1, -1, 1);
_vm->_hotspots[kHS31WalkArea1]._flags |= SF_WALKABLE;
- _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS31MeasuringClown], 0, 0x107B9, 1);
+ _vm->_gnap->walkTo(_vm->_hotspotsWalkPos[kHS31MeasuringClown], 0, 0x107B9, 1);
_vm->_hotspots[kHS31WalkArea1]._flags &= ~SF_WALKABLE;
_vm->_gnap->_actionStatus = kAS31UseMeasuringClown;
_vm->_timers[4] = 300;
@@ -394,9 +394,9 @@ void Scene31::run() {
case PLAT_CURSOR:
if (!_vm->invHas(kItemBucketWithBeer)) {
_vm->_gnap->useDeviceOnPlatypus();
- _vm->platypusWalkTo(_vm->_hotspotsWalkPos[kHS31MeasuringClown] + Common::Point(0, 1), 1, 0x107C2, 1);
+ _vm->_plat->walkTo(_vm->_hotspotsWalkPos[kHS31MeasuringClown] + Common::Point(0, 1), 1, 0x107C2, 1);
_vm->_hotspots[kHS31WalkArea1]._flags |= SF_WALKABLE;
- _vm->platypusWalkTo(_vm->_hotspotsWalkPos[kHS31MeasuringClown], 1, 0x107C2, 1);
+ _vm->_plat->walkTo(_vm->_hotspotsWalkPos[kHS31MeasuringClown], 1, 0x107C2, 1);
_vm->_hotspots[kHS31WalkArea1]._flags &= ~SF_WALKABLE;
_vm->_plat->_actionStatus = kAS31PlatMeasuringClown;
_vm->_gnap->_actionStatus = kAS31PlatMeasuringClown;
@@ -413,12 +413,12 @@ void Scene31::run() {
if (_vm->_gnap->_actionStatus < 0 || _vm->_gnap->_actionStatus == kAS31PlatMeasuringClown) {
if (_vm->_grabCursorSpriteIndex == kItemEmptyBucket && _beerGuyDistracted) {
_vm->setGrabCursorSprite(-1);
- _vm->gnapWalkTo(_vm->_gnap->_pos, -1, _vm->_gnap->getSequenceId(gskIdle, _vm->_hotspotsWalkPos[kHS31BeerBarrel].x, _vm->_hotspotsWalkPos[kHS31BeerBarrel].y) | 0x10000, 1);
+ _vm->_gnap->walkTo(_vm->_gnap->_pos, -1, _vm->_gnap->getSequenceId(gskIdle, _vm->_hotspotsWalkPos[kHS31BeerBarrel].x, _vm->_hotspotsWalkPos[kHS31BeerBarrel].y) | 0x10000, 1);
_clerkMeasureMaxCtr += 5;
gameSys.insertSequence(0xF8, 59, 0, 0, kSeqNone, 0, 0, 0);
_vm->playGnapPullOutDevice(6, 8);
_vm->playGnapUseDevice(0, 0);
- _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS31BeerBarrel], 0, 0x107BC, 1);
+ _vm->_gnap->walkTo(_vm->_hotspotsWalkPos[kHS31BeerBarrel], 0, 0x107BC, 1);
_vm->_gnap->_actionStatus = kAS31FillEmptyBucketWithBeer;
_vm->_timers[4] = 300;
} else if (_vm->_grabCursorSpriteIndex >= 0) {
@@ -432,7 +432,7 @@ void Scene31::run() {
if (_beerGuyDistracted) {
_vm->playGnapScratchingHead(6, 2);
} else {
- _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS31BeerBarrel], 0, 0x107BC, 1);
+ _vm->_gnap->walkTo(_vm->_hotspotsWalkPos[kHS31BeerBarrel], 0, 0x107BC, 1);
_vm->_gnap->_actionStatus = kAS31UseBeerBarrel;
_vm->_gnap->_idleFacing = kDirUpLeft;
}
@@ -450,9 +450,9 @@ void Scene31::run() {
if (_vm->_gnap->_actionStatus < 0) {
_vm->_isLeavingScene = true;
_vm->_newSceneNum = 26;
- _vm->gnapWalkTo(Common::Point(-1, _vm->_hotspotsWalkPos[kHS31ExitCircus].y), 0, 0x107AE, 1);
+ _vm->_gnap->walkTo(Common::Point(-1, _vm->_hotspotsWalkPos[kHS31ExitCircus].y), 0, 0x107AE, 1);
_vm->_gnap->_actionStatus = kAS31LeaveScene;
- _vm->platypusWalkTo(_vm->_hotspotsWalkPos[kHS31ExitCircus] + Common::Point(1, 0), -1, -1, 1);
+ _vm->_plat->walkTo(_vm->_hotspotsWalkPos[kHS31ExitCircus] + Common::Point(1, 0), -1, -1, 1);
}
break;
@@ -460,20 +460,20 @@ void Scene31::run() {
if (_vm->_gnap->_actionStatus < 0) {
_vm->_isLeavingScene = true;
_vm->_newSceneNum = 27;
- _vm->gnapWalkTo(Common::Point(-1, _vm->_hotspotsWalkPos[kHS31ExitOutsideClown].y), 0, 0x107AF, 1);
+ _vm->_gnap->walkTo(Common::Point(-1, _vm->_hotspotsWalkPos[kHS31ExitOutsideClown].y), 0, 0x107AF, 1);
_vm->_gnap->_actionStatus = kAS31LeaveScene;
- _vm->platypusWalkTo(_vm->_hotspotsWalkPos[kHS31ExitOutsideClown] + Common::Point(0, 1), -1, 0x107CF, 1);
+ _vm->_plat->walkTo(_vm->_hotspotsWalkPos[kHS31ExitOutsideClown] + Common::Point(0, 1), -1, 0x107CF, 1);
}
break;
case kHS31WalkArea1:
if (_vm->_gnap->_actionStatus < 0)
- _vm->gnapWalkTo(Common::Point(-1, -1), -1, -1, 1);
+ _vm->_gnap->walkTo(Common::Point(-1, -1), -1, -1, 1);
break;
default:
if (_vm->_mouseClickState._left) {
- _vm->gnapWalkTo(Common::Point(-1, -1), -1, -1, 1);
+ _vm->_gnap->walkTo(Common::Point(-1, -1), -1, -1, 1);
_vm->_mouseClickState._left = false;
}
break;
@@ -667,8 +667,8 @@ void Scene32::run() {
_vm->_gnap->initPos(11, 6, kDirBottomLeft);
_vm->_plat->initPos(12, 6, kDirUnk4);
_vm->endSceneInit();
- _vm->platypusWalkTo(Common::Point(9, 6), -1, 0x107D2, 1);
- _vm->gnapWalkTo(Common::Point(8, 6), -1, 0x107BA, 1);
+ _vm->_plat->walkTo(Common::Point(9, 6), -1, 0x107D2, 1);
+ _vm->_gnap->walkTo(Common::Point(8, 6), -1, 0x107BA, 1);
} else {
_vm->_gnap->initPos(1, 6, kDirBottomRight);
_vm->_plat->initPos(1, 7, kDirNone);
@@ -719,9 +719,9 @@ void Scene32::run() {
if (_vm->_gnap->_actionStatus < 0) {
_vm->_isLeavingScene = true;
_vm->setGrabCursorSprite(-1);
- _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS32ExitTruck], 0, 0x107AB, 1);
+ _vm->_gnap->walkTo(_vm->_hotspotsWalkPos[kHS32ExitTruck], 0, 0x107AB, 1);
_vm->_gnap->_actionStatus = kAS32LeaveScene;
- _vm->platypusWalkTo(_vm->_hotspotsWalkPos[kHS32ExitTruck] + Common::Point(0, 1), -1, 0x107CD, 1);
+ _vm->_plat->walkTo(_vm->_hotspotsWalkPos[kHS32ExitTruck] + Common::Point(0, 1), -1, 0x107CD, 1);
_vm->_newSceneNum = 33;
}
break;
@@ -735,13 +735,13 @@ void Scene32::run() {
case kHS32WalkArea7:
case kHS32WalkArea8:
if (_vm->_gnap->_actionStatus < 0)
- _vm->gnapWalkTo(Common::Point(-1, -1), -1, -1, 1);
+ _vm->_gnap->walkTo(Common::Point(-1, -1), -1, -1, 1);
break;
}
if (_vm->_mouseClickState._left && _vm->_gnap->_actionStatus < 0) {
- _vm->gnapWalkTo(Common::Point(-1, -1), -1, -1, 1);
+ _vm->_gnap->walkTo(Common::Point(-1, -1), -1, -1, 1);
_vm->_mouseClickState._left = 0;
}
@@ -829,8 +829,8 @@ void Scene33::run() {
_vm->_gnap->initPos(11, 7, kDirBottomLeft);
_vm->_plat->initPos(12, 7, kDirUnk4);
_vm->endSceneInit();
- _vm->gnapWalkTo(Common::Point(8, 7), -1, 0x107BA, 1);
- _vm->platypusWalkTo(Common::Point(9, 7), -1, 0x107D2, 1);
+ _vm->_gnap->walkTo(Common::Point(8, 7), -1, 0x107BA, 1);
+ _vm->_plat->walkTo(Common::Point(9, 7), -1, 0x107D2, 1);
break;
case 37:
_vm->_gnap->initPos(7, 7, kDirBottomRight);
@@ -841,8 +841,8 @@ void Scene33::run() {
_vm->_gnap->initPos(-1, 6, kDirBottomRight);
_vm->_plat->initPos(-1, 7, kDirNone);
_vm->endSceneInit();
- _vm->platypusWalkTo(Common::Point(2, 7), -1, 0x107C2, 1);
- _vm->gnapWalkTo(Common::Point(2, 8), -1, 0x107B9, 1);
+ _vm->_plat->walkTo(Common::Point(2, 7), -1, 0x107C2, 1);
+ _vm->_gnap->walkTo(Common::Point(2, 8), -1, 0x107B9, 1);
break;
default:
_vm->_gnap->initPos(3, 7, kDirBottomRight);
@@ -899,14 +899,14 @@ void Scene33::run() {
switch (_vm->_verbCursor) {
case GRAB_CURSOR:
_vm->_gnap->_idleFacing = kDirBottomRight;
- if (_vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS33Chicken], 0, _vm->_gnap->getSequenceId(gskIdle, 0, 0) | 0x10000, 1))
+ if (_vm->_gnap->walkTo(_vm->_hotspotsWalkPos[kHS33Chicken], 0, _vm->_gnap->getSequenceId(gskIdle, 0, 0) | 0x10000, 1))
_vm->_gnap->_actionStatus = kAS33UseChicken;
else
_vm->_gnap->_actionStatus = -1;
break;
case TALK_CURSOR:
_vm->_gnap->_idleFacing = kDirBottomRight;
- _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS33Chicken], 0, _vm->_gnap->getSequenceId(gskBrainPulsating, 0, 0) | 0x10000, 1);
+ _vm->_gnap->walkTo(_vm->_hotspotsWalkPos[kHS33Chicken], 0, _vm->_gnap->getSequenceId(gskBrainPulsating, 0, 0) | 0x10000, 1);
_vm->_gnap->_actionStatus = kAS33TalkChicken;
break;
case LOOK_CURSOR:
@@ -924,9 +924,9 @@ void Scene33::run() {
_vm->_gnap->_actionStatus = kAS33LeaveScene;
_vm->_newSceneNum = 37;
if (_vm->_gnap->_pos.x > 6)
- _vm->gnapWalkTo(_vm->_gnap->_pos, 0, 0x107AD, 1);
+ _vm->_gnap->walkTo(_vm->_gnap->_pos, 0, 0x107AD, 1);
else
- _vm->gnapWalkTo(Common::Point(6, 7), 0, 0x107B1, 1);
+ _vm->_gnap->walkTo(Common::Point(6, 7), 0, 0x107B1, 1);
}
break;
@@ -936,18 +936,18 @@ void Scene33::run() {
_vm->_gnap->_actionStatus = kAS33LeaveScene;
_vm->_newSceneNum = 35;
if (_vm->_gnap->_pos.x > 7)
- _vm->gnapWalkTo(_vm->_gnap->_pos, 0, 0x107AD, 1);
+ _vm->_gnap->walkTo(_vm->_gnap->_pos, 0, 0x107AD, 1);
else
- _vm->gnapWalkTo(Common::Point(7, 7), 0, 0x107B1, 1);
+ _vm->_gnap->walkTo(Common::Point(7, 7), 0, 0x107B1, 1);
}
break;
case kHS33ExitCreek:
if (_vm->_gnap->_actionStatus < 0) {
_vm->_isLeavingScene = true;
- _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS33ExitCreek], 0, 0x107AB, 1);
+ _vm->_gnap->walkTo(_vm->_hotspotsWalkPos[kHS33ExitCreek], 0, 0x107AB, 1);
_vm->_gnap->_actionStatus = kAS33LeaveScene;
- _vm->platypusWalkTo(_vm->_hotspotsWalkPos[kHS33ExitCreek], -1, 0x107CD, 1);
+ _vm->_plat->walkTo(_vm->_hotspotsWalkPos[kHS33ExitCreek], -1, 0x107CD, 1);
_vm->_newSceneNum = 34;
}
break;
@@ -955,9 +955,9 @@ void Scene33::run() {
case kHS33ExitPigpen:
if (_vm->_gnap->_actionStatus < 0) {
_vm->_isLeavingScene = true;
- _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS33ExitPigpen], 0, 0x107AF, 1);
+ _vm->_gnap->walkTo(_vm->_hotspotsWalkPos[kHS33ExitPigpen], 0, 0x107AF, 1);
_vm->_gnap->_actionStatus = kAS33LeaveScene;
- _vm->platypusWalkTo(_vm->_hotspotsWalkPos[kHS33ExitPigpen], -1, 0x107CF, 1);
+ _vm->_plat->walkTo(_vm->_hotspotsWalkPos[kHS33ExitPigpen], -1, 0x107CF, 1);
_vm->_newSceneNum = 32;
}
break;
@@ -965,12 +965,12 @@ void Scene33::run() {
case kHS33WalkArea1:
case kHS33WalkArea2:
if (_vm->_gnap->_actionStatus < 0)
- _vm->gnapWalkTo(Common::Point(-1, -1), -1, -1, 1);
+ _vm->_gnap->walkTo(Common::Point(-1, -1), -1, -1, 1);
break;
default:
if (_vm->_mouseClickState._left && _vm->_gnap->_actionStatus < 0) {
- _vm->gnapWalkTo(Common::Point(-1, -1), -1, -1, 1);
+ _vm->_gnap->walkTo(Common::Point(-1, -1), -1, -1, 1);
_vm->_mouseClickState._left = false;
}
break;
@@ -1172,7 +1172,7 @@ void Scene38::run() {
_vm->_gnap->_actionStatus = kAS38ReleaseHuntingTrophy;
} else {
_vm->_isLeavingScene = true;
- _vm->gnapWalkTo(Common::Point(-1, -1), 0, 0x107AE, 1);
+ _vm->_gnap->walkTo(Common::Point(-1, -1), 0, 0x107AE, 1);
_vm->_gnap->_actionStatus = kAS38LeaveScene;
_vm->_newSceneNum = 37;
}
@@ -1186,7 +1186,7 @@ void Scene38::run() {
} else if (_vm->_plat->_actionStatus == kAS38PlatypusHoldingTrapDoor) {
_vm->_sceneWaiting = false;
_vm->_isLeavingScene = true;
- _vm->gnapWalkTo(Common::Point(5, 7), 0, 0x107BB, 1);
+ _vm->_gnap->walkTo(Common::Point(5, 7), 0, 0x107BB, 1);
_vm->_newSceneNum = 39;
_vm->_gnap->_actionStatus = kAS38ExitCave;
}
@@ -1215,8 +1215,8 @@ void Scene38::run() {
if (_vm->_plat->_actionStatus == kAS38PlatypusHoldingTrapDoor)
_vm->playGnapImpossible(0, 0);
else {
- _vm->gnapWalkTo(Common::Point(3, 6), 0, 0x107BB, 1);
- _vm->platypusWalkTo(Common::Point(4, 8), -1, -1, 1);
+ _vm->_gnap->walkTo(Common::Point(3, 6), 0, 0x107BB, 1);
+ _vm->_plat->walkTo(Common::Point(4, 8), -1, -1, 1);
_vm->_gnap->_actionStatus = kAS38UseHuntingTrophy;
}
break;
@@ -1243,7 +1243,7 @@ void Scene38::run() {
if (_vm->_gnap->_actionStatus == kAS38HoldingHuntingTrophy)
_vm->_gnap->_actionStatus = kAS38ReleaseHuntingTrophy;
else if (_vm->_gnap->_actionStatus < 0)
- _vm->gnapWalkTo(Common::Point(-1, -1), -1, -1, 1);
+ _vm->_gnap->walkTo(Common::Point(-1, -1), -1, -1, 1);
break;
default:
@@ -1251,7 +1251,7 @@ void Scene38::run() {
if (_vm->_gnap->_actionStatus == kAS38HoldingHuntingTrophy)
_vm->_gnap->_actionStatus = kAS38ReleaseHuntingTrophy;
else if (_vm->_gnap->_actionStatus < 0)
- _vm->gnapWalkTo(Common::Point(-1, -1), -1, -1, 1);
+ _vm->_gnap->walkTo(Common::Point(-1, -1), -1, -1, 1);
_vm->_mouseClickState._left = false;
}
break;
@@ -1327,7 +1327,7 @@ void Scene38::updateAnimations() {
_vm->_gnap->_idleFacing = kDirBottomRight;
if (_vm->_isLeavingScene) {
_vm->_sceneWaiting = false;
- _vm->gnapWalkTo(Common::Point(5, 7), 0, 0x107BB, 1);
+ _vm->_gnap->walkTo(Common::Point(5, 7), 0, 0x107BB, 1);
_vm->_newSceneNum = 39;
_vm->_gnap->_actionStatus = kAS38ExitCave;
} else {
@@ -1355,7 +1355,7 @@ void Scene38::updateAnimations() {
_vm->_plat->playSequence(0x107D5);
else
_vm->_plat->playSequence(0x107D4);
- _vm->platypusWalkTo(Common::Point(8, 7), -1, 0x107D2, 1);
+ _vm->_plat->walkTo(Common::Point(8, 7), -1, 0x107D2, 1);
gameSys.insertSequence(0xA1, _vm->_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;
@@ -1478,7 +1478,7 @@ void Scene39::run() {
if (_vm->_gnap->_actionStatus < 0) {
_vm->_isLeavingScene = true;
_vm->_sceneDone = true;
- _vm->gnapWalkTo(_vm->_gnap->_pos, 0, 0x107AB, 1);
+ _vm->_gnap->walkTo(_vm->_gnap->_pos, 0, 0x107AB, 1);
_vm->_gnap->_actionStatus = kAS39LeaveScene;
_vm->_newSceneNum = 40;
}
@@ -1491,7 +1491,7 @@ void Scene39::run() {
} else {
switch (_vm->_verbCursor) {
case LOOK_CURSOR:
- _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS39Sign], 0, -1, 1);
+ _vm->_gnap->walkTo(_vm->_hotspotsWalkPos[kHS39Sign], 0, -1, 1);
_vm->playGnapIdle(_vm->_hotspotsWalkPos[kHS39Sign].x, _vm->_hotspotsWalkPos[kHS39Sign].y);
_vm->showFullScreenSprite(0x1C);
break;
@@ -1516,12 +1516,12 @@ void Scene39::run() {
case kHS39WalkArea1:
case kHS39WalkArea2:
if (_vm->_gnap->_actionStatus < 0)
- _vm->gnapWalkTo(Common::Point(-1, -1), -1, -1, 1);
+ _vm->_gnap->walkTo(Common::Point(-1, -1), -1, -1, 1);
break;
default:
if (_vm->_mouseClickState._left && _vm->_gnap->_actionStatus < 0) {
- _vm->gnapWalkTo(Common::Point(-1, -1), -1, -1, 1);
+ _vm->_gnap->walkTo(Common::Point(-1, -1), -1, -1, 1);
_vm->_mouseClickState._left = false;
}
break;
diff --git a/engines/gnap/scenes/group4.cpp b/engines/gnap/scenes/group4.cpp
index b805c1052c..7d7be662dc 100644
--- a/engines/gnap/scenes/group4.cpp
+++ b/engines/gnap/scenes/group4.cpp
@@ -276,14 +276,14 @@ void Scene41::run() {
_vm->_gnap->initPos(-1, 8, kDirUpRight);
_vm->_plat->initPos(-2, 8, kDirUpLeft);
_vm->endSceneInit();
- _vm->platypusWalkTo(Common::Point(1, 8), -1, 0x107C2, 1);
- _vm->gnapWalkTo(Common::Point(2, 8), -1, 0x107B9, 1);
+ _vm->_plat->walkTo(Common::Point(1, 8), -1, 0x107C2, 1);
+ _vm->_gnap->walkTo(Common::Point(2, 8), -1, 0x107B9, 1);
} else if (_vm->_prevSceneNum == 42) {
_vm->_gnap->initPos(11, 8, kDirUpRight);
_vm->_plat->initPos(11, 9, kDirUpLeft);
_vm->endSceneInit();
- _vm->gnapWalkTo(Common::Point(8, 8), -1, 0x107BA, 1);
- _vm->platypusWalkTo(Common::Point(9, 8), -1, 0x107D2, 1);
+ _vm->_gnap->walkTo(Common::Point(8, 8), -1, 0x107BA, 1);
+ _vm->_plat->walkTo(Common::Point(9, 8), -1, 0x107D2, 1);
} else {
_vm->_gnap->initPos(5, 8, kDirBottomRight);
_vm->_plat->initPos(6, 8, kDirBottomLeft);
@@ -374,31 +374,31 @@ void Scene41::run() {
case kHS41ExitCave:
_vm->_isLeavingScene = true;
- _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS41ExitCave], 0, 0x107AE, 1);
+ _vm->_gnap->walkTo(_vm->_hotspotsWalkPos[kHS41ExitCave], 0, 0x107AE, 1);
_vm->_gnap->_actionStatus = kAS41LeaveScene;
_vm->_newSceneNum = 40;
break;
case kHS41Exit:
_vm->_isLeavingScene = true;
- _vm->gnapWalkTo(Common::Point(_vm->_hotspotsWalkPos[kHS41Exit].x, -1), 0, 0x107AF, 1);
+ _vm->_gnap->walkTo(Common::Point(_vm->_hotspotsWalkPos[kHS41Exit].x, -1), 0, 0x107AF, 1);
_vm->_gnap->_actionStatus = kAS41LeaveScene;
- _vm->platypusWalkTo(Common::Point(_vm->_hotspotsWalkPos[kHS41Exit].x, -1), -1, 0x107CF, 1);
+ _vm->_plat->walkTo(Common::Point(_vm->_hotspotsWalkPos[kHS41Exit].x, -1), -1, 0x107CF, 1);
_vm->_newSceneNum = 45;
break;
case kHS41ExitBBQ:
_vm->_isLeavingScene = true;
- _vm->gnapWalkTo(Common::Point(_vm->_hotspotsWalkPos[kHS41ExitBBQ].x, -1), 0, 0x107AB, 1);
+ _vm->_gnap->walkTo(Common::Point(_vm->_hotspotsWalkPos[kHS41ExitBBQ].x, -1), 0, 0x107AB, 1);
_vm->_gnap->_actionStatus = kAS41LeaveScene;
- _vm->platypusWalkTo(Common::Point(_vm->_hotspotsWalkPos[kHS41ExitBBQ].x, -1), -1, 0x107CD, 1);
+ _vm->_plat->walkTo(Common::Point(_vm->_hotspotsWalkPos[kHS41ExitBBQ].x, -1), -1, 0x107CD, 1);
_vm->_newSceneNum = 42;
break;
case kHS41ToyVendor:
if (_vm->_grabCursorSpriteIndex == kItemDiceQuarterHole) {
_vm->_gnap->_actionStatus = kAS41UseQuarterWithToyVendor;
- _vm->gnapWalkTo(Common::Point(4, 7), 0, 0x107BB, 9);
+ _vm->_gnap->walkTo(Common::Point(4, 7), 0, 0x107BB, 9);
_vm->playGnapShowItem(_vm->_grabCursorSpriteIndex, 5, 0);
} else if (_vm->_grabCursorSpriteIndex >= 0) {
_vm->playGnapShowCurrItem(4, 7, 5, 0);
@@ -412,7 +412,7 @@ void Scene41::run() {
break;
case TALK_CURSOR:
_vm->_gnap->_idleFacing = kDirUpRight;
- _vm->gnapWalkTo(Common::Point(4, 7), 0, _vm->_gnap->getSequenceId(gskBrainPulsating, 0, 0) | 0x10000, 1);
+ _vm->_gnap->walkTo(Common::Point(4, 7), 0, _vm->_gnap->getSequenceId(gskBrainPulsating, 0, 0) | 0x10000, 1);
_vm->_gnap->_actionStatus = kAS41TalkToyVendor;
break;
case PLAT_CURSOR:
@@ -424,7 +424,7 @@ void Scene41::run() {
case kHS41Kid:
if (_vm->_grabCursorSpriteIndex == kItemChickenBucket) {
- _vm->gnapWalkTo(Common::Point(7, 7), 0, 0x107BB, 1);
+ _vm->_gnap->walkTo(Common::Point(7, 7), 0, 0x107BB, 1);
_vm->_gnap->_idleFacing = kDirUpRight;
_vm->_gnap->_actionStatus = kAS41UseChickenBucketWithKid;
} else if (_vm->_grabCursorSpriteIndex >= 0) {
@@ -435,13 +435,13 @@ void Scene41::run() {
_vm->playGnapScratchingHead(9, 0);
break;
case GRAB_CURSOR:
- _vm->gnapWalkTo(Common::Point(7, 7), 0, 0x107BB, 1);
+ _vm->_gnap->walkTo(Common::Point(7, 7), 0, 0x107BB, 1);
_vm->_gnap->_idleFacing = kDirUpRight;
_vm->_gnap->_actionStatus = kAS41GrabKid;
break;
case TALK_CURSOR:
_vm->_gnap->_idleFacing = kDirUpRight;
- _vm->gnapWalkTo(Common::Point(7, 7), 0, _vm->_gnap->getSequenceId(gskBrainPulsating, 0, 0) | 0x10000, 1);
+ _vm->_gnap->walkTo(Common::Point(7, 7), 0, _vm->_gnap->getSequenceId(gskBrainPulsating, 0, 0) | 0x10000, 1);
break;
case PLAT_CURSOR:
_vm->playGnapImpossible(0, 0);
@@ -460,7 +460,7 @@ void Scene41::run() {
case kHS41WalkArea1:
if (_vm->_gnap->_actionStatus < 0)
- _vm->gnapWalkTo(Common::Point(-1, -1), -1, -1, 1);
+ _vm->_gnap->walkTo(Common::Point(-1, -1), -1, -1, 1);
break;
}
}
@@ -503,7 +503,7 @@ void Scene41::run() {
_vm->_toyUfoActionStatus = kAS41ToyUfoRefresh;
_vm->toyUfoFlyTo(-1, -1, 0, 799, 0, 300, 2);
} else {
- _vm->gnapWalkTo(Common::Point(-1, -1), -1, -1, 1);
+ _vm->_gnap->walkTo(Common::Point(-1, -1), -1, -1, 1);
}
}
@@ -788,20 +788,20 @@ void Scene42::run() {
_vm->_gnap->initPos(-1, 8, kDirUpRight);
_vm->_plat->initPos(-1, 9, kDirUpLeft);
_vm->endSceneInit();
- _vm->gnapWalkTo(Common::Point(2, 8), -1, 0x107B9, 1);
- _vm->platypusWalkTo(Common::Point(1, 8), -1, 0x107C2, 1);
+ _vm->_gnap->walkTo(Common::Point(2, 8), -1, 0x107B9, 1);
+ _vm->_plat->walkTo(Common::Point(1, 8), -1, 0x107C2, 1);
} else if (_vm->_prevSceneNum == 43) {
_vm->_gnap->initPos(11, 8, kDirUpRight);
_vm->_plat->initPos(11, 9, kDirUpLeft);
_vm->endSceneInit();
- _vm->gnapWalkTo(Common::Point(8, 8), -1, 0x107BA, 1);
- _vm->platypusWalkTo(Common::Point(9, 8), -1, 0x107D2, 1);
+ _vm->_gnap->walkTo(Common::Point(8, 8), -1, 0x107BA, 1);
+ _vm->_plat->walkTo(Common::Point(9, 8), -1, 0x107D2, 1);
} else {
_vm->_gnap->initPos(5, 11, kDirUpRight);
_vm->_plat->initPos(6, 11, kDirUpLeft);
_vm->endSceneInit();
- _vm->gnapWalkTo(Common::Point(5, 8), -1, 0x107BA, 1);
- _vm->platypusWalkTo(Common::Point(6, 8), -1, 0x107C2, 1);
+ _vm->_gnap->walkTo(Common::Point(5, 8), -1, 0x107BA, 1);
+ _vm->_plat->walkTo(Common::Point(6, 8), -1, 0x107C2, 1);
}
while (!_vm->_sceneDone) {
@@ -886,34 +886,34 @@ void Scene42::run() {
case kHS42ExitUfoParty:
_vm->_isLeavingScene = true;
- _vm->gnapWalkTo(Common::Point(_vm->_gnap->_pos.x, _vm->_hotspotsWalkPos[kHS42ExitUfoParty].y), 0, 0x107AE, 1);
+ _vm->_gnap->walkTo(Common::Point(_vm->_gnap->_pos.x, _vm->_hotspotsWalkPos[kHS42ExitUfoParty].y), 0, 0x107AE, 1);
_vm->_gnap->_actionStatus = kAS42LeaveScene;
- _vm->platypusWalkTo(Common::Point(_vm->_plat->_pos.x, _vm->_hotspotsWalkPos[kHS42ExitUfoParty].y), -1, 0x107C7, 1);
+ _vm->_plat->walkTo(Common::Point(_vm->_plat->_pos.x, _vm->_hotspotsWalkPos[kHS42ExitUfoParty].y), -1, 0x107C7, 1);
_vm->_newSceneNum = 40;
break;
case kHS42ExitToyStand:
_vm->_isLeavingScene = true;
- _vm->gnapWalkTo(Common::Point(_vm->_hotspotsWalkPos[kHS42ExitToyStand].x, _vm->_gnap->_pos.y), 0, 0x107AF, 1);
+ _vm->_gnap->walkTo(Common::Point(_vm->_hotspotsWalkPos[kHS42ExitToyStand].x, _vm->_gnap->_pos.y), 0, 0x107AF, 1);
_vm->_gnap->_actionStatus = kAS42LeaveScene;
- _vm->platypusWalkTo(_vm->_hotspotsWalkPos[kHS42ExitToyStand], -1, 0x107CF, 1);
+ _vm->_plat->walkTo(_vm->_hotspotsWalkPos[kHS42ExitToyStand], -1, 0x107CF, 1);
_vm->_newSceneNum = 41;
break;
case kHS42ExitUfo:
_vm->_isLeavingScene = true;
- _vm->gnapWalkTo(Common::Point(_vm->_hotspotsWalkPos[kHS42ExitUfo].x, _vm->_gnap->_pos.y), 0, 0x107AB, 1);
+ _vm->_gnap->walkTo(Common::Point(_vm->_hotspotsWalkPos[kHS42ExitUfo].x, _vm->_gnap->_pos.y), 0, 0x107AB, 1);
_vm->_gnap->_actionStatus = kAS42LeaveScene;
- _vm->platypusWalkTo(_vm->_hotspotsWalkPos[kHS42ExitUfo], -1, 0x107CD, 1);
+ _vm->_plat->walkTo(_vm->_hotspotsWalkPos[kHS42ExitUfo], -1, 0x107CD, 1);
_vm->_newSceneNum = 43;
break;
case kHS42BBQVendor:
if (_vm->_grabCursorSpriteIndex == kItemDiceQuarterHole) {
- _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS42BBQVendor], 0, 0x107BB, 1);
+ _vm->_gnap->walkTo(_vm->_hotspotsWalkPos[kHS42BBQVendor], 0, 0x107BB, 1);
_vm->_gnap->_actionStatus = kAS42UseQuarterWithBBQVendor;
if (_vm->_plat->_pos.y < 9)
- _vm->platypusWalkTo(Common::Point(_vm->_plat->_pos.x, 9), -1, -1, 1);
+ _vm->_plat->walkTo(Common::Point(_vm->_plat->_pos.x, 9), -1, -1, 1);
} else if (_vm->_grabCursorSpriteIndex >= 0) {
_vm->playGnapShowCurrItem(_vm->_hotspotsWalkPos[kHS42BBQVendor].x, _vm->_hotspotsWalkPos[kHS42BBQVendor].y, _vm->_hotspotsWalkPos[kHS42BBQVendor].x + 1, 0);
} else {
@@ -923,7 +923,7 @@ void Scene42::run() {
break;
case TALK_CURSOR:
_vm->_gnap->_idleFacing = kDirUpRight;
- _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS42BBQVendor], 0, _vm->_gnap->getSequenceId(gskBrainPulsating, 0, 0) | 0x10000, 1);
+ _vm->_gnap->walkTo(_vm->_hotspotsWalkPos[kHS42BBQVendor], 0, _vm->_gnap->getSequenceId(gskBrainPulsating, 0, 0) | 0x10000, 1);
_vm->_gnap->_actionStatus = kAS42TalkBBQVendor;
break;
case GRAB_CURSOR:
@@ -943,7 +943,7 @@ void Scene42::run() {
_vm->playGnapScratchingHead(_vm->_hotspotsWalkPos[kHS42ChickenLeg].x - 1, 0);
break;
case GRAB_CURSOR:
- _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS42ChickenLeg], 0, 0x107BC, 1);
+ _vm->_gnap->walkTo(_vm->_hotspotsWalkPos[kHS42ChickenLeg], 0, 0x107BC, 1);
_vm->_gnap->_actionStatus = kAS42GrabChickenLeg;
break;
case TALK_CURSOR:
@@ -957,7 +957,7 @@ void Scene42::run() {
case kHS42WalkArea1:
case kHS42WalkArea2:
if (_vm->_gnap->_actionStatus < 0)
- _vm->gnapWalkTo(Common::Point(-1, -1), -1, -1, 1);
+ _vm->_gnap->walkTo(Common::Point(-1, -1), -1, -1, 1);
break;
}
@@ -969,7 +969,7 @@ void Scene42::run() {
_vm->_toyUfoActionStatus = kAS42ToyUfoRefresh;
_vm->toyUfoFlyTo(-1, -1, 0, 799, 0, 300, 3);
} else {
- _vm->gnapWalkTo(Common::Point(-1, -1), -1, -1, 1);
+ _vm->_gnap->walkTo(Common::Point(-1, -1), -1, -1, 1);
}
}
@@ -1230,28 +1230,28 @@ void Scene43::run() {
_vm->_gnap->initPos(-1, 8, kDirUpRight);
_vm->_plat->initPos(-1, 9, kDirUpLeft);
_vm->endSceneInit();
- _vm->gnapWalkTo(Common::Point(2, 8), -1, 0x107B9, 1);
- _vm->platypusWalkTo(Common::Point(1, 8), -1, 0x107C2, 1);
+ _vm->_gnap->walkTo(Common::Point(2, 8), -1, 0x107B9, 1);
+ _vm->_plat->walkTo(Common::Point(1, 8), -1, 0x107C2, 1);
break;
case 44:
_vm->_gnap->initPos(11, 8, kDirUpRight);
_vm->_plat->initPos(11, 9, kDirUpLeft);
_vm->endSceneInit();
- _vm->gnapWalkTo(Common::Point(8, 8), -1, 0x107BA, 1);
- _vm->platypusWalkTo(Common::Point(9, 8), -1, 0x107D2, 1);
+ _vm->_gnap->walkTo(Common::Point(8, 8), -1, 0x107BA, 1);
+ _vm->_plat->walkTo(Common::Point(9, 8), -1, 0x107D2, 1);
break;
case 54:
_vm->_gnap->initPos(4, 7, kDirBottomLeft);
_vm->_plat->initPos(11, 8, kDirUpLeft);
_vm->endSceneInit();
- _vm->platypusWalkTo(Common::Point(9, 8), -1, 0x107D2, 1);
+ _vm->_plat->walkTo(Common::Point(9, 8), -1, 0x107D2, 1);
break;
default:
_vm->_gnap->initPos(5, 11, kDirUpRight);
_vm->_plat->initPos(6, 11, kDirUpLeft);
_vm->endSceneInit();
- _vm->gnapWalkTo(Common::Point(5, 8), -1, 0x107BA, 1);
- _vm->platypusWalkTo(Common::Point(6, 8), -1, 0x107C2, 1);
+ _vm->_gnap->walkTo(Common::Point(5, 8), -1, 0x107BA, 1);
+ _vm->_plat->walkTo(Common::Point(6, 8), -1, 0x107C2, 1);
break;
}
}
@@ -1344,25 +1344,25 @@ void Scene43::run() {
case kHS43ExitUfoParty:
_vm->_isLeavingScene = true;
- _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS43ExitUfoParty], 0, 0x107AE, 1);
+ _vm->_gnap->walkTo(_vm->_hotspotsWalkPos[kHS43ExitUfoParty], 0, 0x107AE, 1);
_vm->_gnap->_actionStatus = 0;
- _vm->platypusWalkTo(_vm->_hotspotsWalkPos[kHS43ExitUfoParty], -1, 0x107C7, 1);
+ _vm->_plat->walkTo(_vm->_hotspotsWalkPos[kHS43ExitUfoParty], -1, 0x107C7, 1);
_vm->_newSceneNum = 40;
break;
case kHS43ExitBBQ:
_vm->_isLeavingScene = true;
- _vm->gnapWalkTo(Common::Point(_vm->_hotspotsWalkPos[kHS43ExitBBQ].x, _vm->_gnap->_pos.y), 0, 0x107AF, 1);
+ _vm->_gnap->walkTo(Common::Point(_vm->_hotspotsWalkPos[kHS43ExitBBQ].x, _vm->_gnap->_pos.y), 0, 0x107AF, 1);
_vm->_gnap->_actionStatus = 0;
- _vm->platypusWalkTo(_vm->_hotspotsWalkPos[kHS43ExitBBQ], -1, 0x107CF, 1);
+ _vm->_plat->walkTo(_vm->_hotspotsWalkPos[kHS43ExitBBQ], -1, 0x107CF, 1);
_vm->_newSceneNum = 42;
break;
case kHS43ExitKissinBooth:
_vm->_isLeavingScene = true;
- _vm->gnapWalkTo(Common::Point(_vm->_hotspotsWalkPos[kHS43ExitKissinBooth].x, _vm->_gnap->_pos.y), 0, 0x107AB, 1);
+ _vm->_gnap->walkTo(Common::Point(_vm->_hotspotsWalkPos[kHS43ExitKissinBooth].x, _vm->_gnap->_pos.y), 0, 0x107AB, 1);
_vm->_gnap->_actionStatus = 0;
- _vm->platypusWalkTo(_vm->_hotspotsWalkPos[kHS43ExitKissinBooth], -1, 0x107CD, 1);
+ _vm->_plat->walkTo(_vm->_hotspotsWalkPos[kHS43ExitKissinBooth], -1, 0x107CD, 1);
_vm->_newSceneNum = 44;
break;
@@ -1376,7 +1376,7 @@ void Scene43::run() {
break;
case TALK_CURSOR:
_vm->_gnap->_idleFacing = kDirUpRight;
- _vm->gnapWalkTo(Common::Point(5, 8), 0, _vm->_gnap->getSequenceId(gskBrainPulsating, 0, 0) | 0x10000, 1);
+ _vm->_gnap->walkTo(Common::Point(5, 8), 0, _vm->_gnap->getSequenceId(gskBrainPulsating, 0, 0) | 0x10000, 1);
_vm->_gnap->_actionStatus = 2;
break;
case GRAB_CURSOR:
@@ -1398,7 +1398,7 @@ void Scene43::run() {
break;
case GRAB_CURSOR:
_vm->_gnap->_idleFacing = kDirUpRight;
- _vm->gnapWalkTo(Common::Point(3, 7), 0, 67515, 1);
+ _vm->_gnap->walkTo(Common::Point(3, 7), 0, 67515, 1);
_vm->_gnap->_actionStatus = 1;
break;
case TALK_CURSOR:
@@ -1412,7 +1412,7 @@ void Scene43::run() {
case kHS43WalkArea1:
case kHS43WalkArea2:
if (_vm->_gnap->_actionStatus < 0)
- _vm->gnapWalkTo(Common::Point(-1, -1), -1, -1, 1);
+ _vm->_gnap->walkTo(Common::Point(-1, -1), -1, -1, 1);
break;
}
}
@@ -1423,7 +1423,7 @@ void Scene43::run() {
_vm->_toyUfoActionStatus = 5;
_vm->toyUfoFlyTo(-1, -1, 0, 799, 0, 300, 3);
} else {
- _vm->gnapWalkTo(Common::Point(-1, -1), -1, -1, 1);
+ _vm->_gnap->walkTo(Common::Point(-1, -1), -1, -1, 1);
}
}
@@ -1684,15 +1684,15 @@ void Scene44::run() {
_vm->_gnap->initPos(-1, 8, kDirUpRight);
_vm->_plat->initPos(-1, 7, kDirUpLeft);
_vm->endSceneInit();
- _vm->gnapWalkTo(Common::Point(2, 8), -1, 0x107B9, 1);
- _vm->platypusWalkTo(Common::Point(1, 8), -1, 0x107C2, 1);
+ _vm->_gnap->walkTo(Common::Point(2, 8), -1, 0x107B9, 1);
+ _vm->_plat->walkTo(Common::Point(1, 8), -1, 0x107C2, 1);
break;
case 46:
_vm->_gnap->initPos(11, 8, kDirUpRight);
_vm->_plat->initPos(11, 8, kDirUpLeft);
_vm->endSceneInit();
- _vm->gnapWalkTo(Common::Point(6, 8), -1, 0x107BA, 1);
- _vm->platypusWalkTo(Common::Point(7, 8), -1, 0x107D2, 1);
+ _vm->_gnap->walkTo(Common::Point(6, 8), -1, 0x107BA, 1);
+ _vm->_plat->walkTo(Common::Point(7, 8), -1, 0x107D2, 1);
break;
case 50:
_vm->_gnap->initPos(4, 8, kDirBottomRight);
@@ -1714,8 +1714,8 @@ void Scene44::run() {
_vm->_gnap->initPos(5, 11, kDirUpRight);
_vm->_plat->initPos(6, 11, kDirUpLeft);
_vm->endSceneInit();
- _vm->platypusWalkTo(Common::Point(6, 8), -1, 0x107C2, 1);
- _vm->gnapWalkTo(Common::Point(5, 8), -1, 0x107BA, 1);
+ _vm->_plat->walkTo(Common::Point(6, 8), -1, 0x107C2, 1);
+ _vm->_gnap->walkTo(Common::Point(5, 8), -1, 0x107BA, 1);
break;
}
}
@@ -1792,22 +1792,22 @@ void Scene44::run() {
case kHS44ExitUfoParty:
_vm->_isLeavingScene = true;
- _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS44ExitUfoParty], 0, 0x107AE, 1);
+ _vm->_gnap->walkTo(_vm->_hotspotsWalkPos[kHS44ExitUfoParty], 0, 0x107AE, 1);
_vm->_gnap->_actionStatus = 0;
_vm->_newSceneNum = 40;
break;
case kHS44ExitUfo:
_vm->_isLeavingScene = true;
- _vm->gnapWalkTo(Common::Point(_vm->_hotspotsWalkPos[kHS44ExitUfo].x, _vm->_gnap->_pos.y), 0, 0x107AF, 1);
+ _vm->_gnap->walkTo(Common::Point(_vm->_hotspotsWalkPos[kHS44ExitUfo].x, _vm->_gnap->_pos.y), 0, 0x107AF, 1);
_vm->_gnap->_actionStatus = 0;
- _vm->platypusWalkTo(Common::Point(_vm->_hotspotsWalkPos[kHS44ExitUfo].x, _vm->_plat->_pos.y), -1, 0x107CF, 1);
+ _vm->_plat->walkTo(Common::Point(_vm->_hotspotsWalkPos[kHS44ExitUfo].x, _vm->_plat->_pos.y), -1, 0x107CF, 1);
_vm->_newSceneNum = 43;
break;
case kHS44ExitShow:
_vm->_isLeavingScene = true;
- _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS44ExitShow], 0, 0x107AB, 1);
+ _vm->_gnap->walkTo(_vm->_hotspotsWalkPos[kHS44ExitShow], 0, 0x107AB, 1);
_vm->_gnap->_actionStatus = 0;
_vm->_newSceneNum = 46;
break;
@@ -1815,7 +1815,7 @@ void Scene44::run() {
case kHS44KissingLady:
if (_vm->_grabCursorSpriteIndex >= 0) {
_vm->_gnap->_actionStatus = 2;
- _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS44KissingLady], 0, -1, 9);
+ _vm->_gnap->walkTo(_vm->_hotspotsWalkPos[kHS44KissingLady], 0, -1, 9);
_vm->playGnapShowItem(_vm->_grabCursorSpriteIndex, _vm->_hotspotsWalkPos[kHS44KissingLady].x - 1, _vm->_hotspotsWalkPos[kHS44KissingLady].y);
} else {
switch (_vm->_verbCursor) {
@@ -1827,14 +1827,14 @@ void Scene44::run() {
break;
case TALK_CURSOR:
_vm->_gnap->_idleFacing = kDirUpLeft;
- _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS44KissingLady], 0, _vm->_gnap->getSequenceId(gskBrainPulsating, 0, 0) | 0x10000, 1);
+ _vm->_gnap->walkTo(_vm->_hotspotsWalkPos[kHS44KissingLady], 0, _vm->_gnap->getSequenceId(gskBrainPulsating, 0, 0) | 0x10000, 1);
_vm->_gnap->_actionStatus = 1;
break;
case PLAT_CURSOR:
_vm->_gnap->useDeviceOnPlatypus();
- _vm->platypusWalkTo(Common::Point(6, 7), 1, 0x107D2, 1);
+ _vm->_plat->walkTo(Common::Point(6, 7), 1, 0x107D2, 1);
if (_vm->_gnap->_pos == Common::Point(7, 7))
- _vm->gnapWalkStep();
+ _vm->_gnap->walkStep();
_vm->playGnapIdle(5, 7);
_vm->_plat->_actionStatus = 4;
break;
@@ -1881,7 +1881,7 @@ void Scene44::run() {
break;
case TALK_CURSOR:
_vm->_gnap->_idleFacing = kDirUpRight;
- _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS44SpringGuy], -1, _vm->_gnap->getSequenceId(gskBrainPulsating, 0, 0) | 0x10000, 1);
+ _vm->_gnap->walkTo(_vm->_hotspotsWalkPos[kHS44SpringGuy], -1, _vm->_gnap->getSequenceId(gskBrainPulsating, 0, 0) | 0x10000, 1);
break;
case GRAB_CURSOR:
case PLAT_CURSOR:
@@ -1894,7 +1894,7 @@ void Scene44::run() {
case kHS44WalkArea1:
case kHS44WalkArea2:
if (_vm->_gnap->_actionStatus < 0)
- _vm->gnapWalkTo(Common::Point(-1, -1), -1, -1, 1);
+ _vm->_gnap->walkTo(Common::Point(-1, -1), -1, -1, 1);
break;
}
@@ -1906,7 +1906,7 @@ void Scene44::run() {
_vm->_toyUfoActionStatus = 7;
_vm->toyUfoFlyTo(-1, -1, 0, 799, 0, 300, 3);
} else {
- _vm->gnapWalkTo(Common::Point(-1, -1), -1, -1, 1);
+ _vm->_gnap->walkTo(Common::Point(-1, -1), -1, -1, 1);
}
}
@@ -2153,20 +2153,20 @@ void Scene45::run() {
_vm->_gnap->initPos(-1, 8, kDirUpRight);
_vm->_plat->initPos(-1, 9, kDirUpLeft);
_vm->endSceneInit();
- _vm->platypusWalkTo(Common::Point(4, 8), -1, 0x107C2, 1);
- _vm->gnapWalkTo(Common::Point(2, 7), -1, 0x107B9, 1);
+ _vm->_plat->walkTo(Common::Point(4, 8), -1, 0x107C2, 1);
+ _vm->_gnap->walkTo(Common::Point(2, 7), -1, 0x107B9, 1);
} else if (_vm->_prevSceneNum == 41) {
_vm->_gnap->initPos(11, 8, kDirUpRight);
_vm->_plat->initPos(11, 9, kDirUpLeft);
_vm->endSceneInit();
- _vm->platypusWalkTo(Common::Point(4, 8), -1, 0x107D2, 1);
- _vm->gnapWalkTo(Common::Point(10, 9), -1, 0x107BA, 1);
+ _vm->_plat->walkTo(Common::Point(4, 8), -1, 0x107D2, 1);
+ _vm->_gnap->walkTo(Common::Point(10, 9), -1, 0x107BA, 1);
} else {
_vm->_gnap->initPos(2, 11, kDirUpRight);
_vm->_plat->initPos(6, 11, kDirUpLeft);
_vm->endSceneInit();
- _vm->platypusWalkTo(Common::Point(4, 8), -1, 0x107C2, 1);
- _vm->gnapWalkTo(Common::Point(2, 7), -1, 0x107B9, 1);
+ _vm->_plat->walkTo(Common::Point(4, 8), -1, 0x107C2, 1);
+ _vm->_gnap->walkTo(Common::Point(2, 7), -1, 0x107B9, 1);
}
if (!_vm->isFlag(kGFUnk21) && !_vm->isFlag(kGFGnapControlsToyUFO)) {
@@ -2284,7 +2284,7 @@ void Scene45::run() {
case kHS45ExitUfoParty:
if (_vm->_gnap->_actionStatus < 0) {
_vm->_isLeavingScene = true;
- _vm->gnapWalkTo(Common::Point(_vm->_gnap->_pos.x, _vm->_hotspotsWalkPos[kHS45ExitUfoParty].y), 0, 0x107AE, 1);
+ _vm->_gnap->walkTo(Common::Point(_vm->_gnap->_pos.x, _vm->_hotspotsWalkPos[kHS45ExitUfoParty].y), 0, 0x107AE, 1);
_vm->_gnap->_actionStatus = 0;
_vm->_newSceneNum = 40;
}
@@ -2293,9 +2293,9 @@ void Scene45::run() {
case kHS45ExitShoe:
if (_vm->_gnap->_actionStatus < 0) {
_vm->_isLeavingScene = true;
- _vm->gnapWalkTo(Common::Point(_vm->_hotspotsWalkPos[kHS45ExitShoe].x, _vm->_gnap->_pos.y), 0, 0x107AF, 1);
+ _vm->_gnap->walkTo(Common::Point(_vm->_hotspotsWalkPos[kHS45ExitShoe].x, _vm->_gnap->_pos.y), 0, 0x107AF, 1);
_vm->_gnap->_actionStatus = 0;
- _vm->platypusWalkTo(Common::Point(_vm->_hotspotsWalkPos[kHS45ExitShoe].x, _vm->_plat->_pos.y), -1, 0x107CF, 1);
+ _vm->_plat->walkTo(Common::Point(_vm->_hotspotsWalkPos[kHS45ExitShoe].x, _vm->_plat->_pos.y), -1, 0x107CF, 1);
_vm->_newSceneNum = 46;
}
break;
@@ -2303,9 +2303,9 @@ void Scene45::run() {
case kHS45ExitRight:
if (_vm->_gnap->_actionStatus < 0) {
_vm->_isLeavingScene = true;
- _vm->gnapWalkTo(Common::Point(_vm->_hotspotsWalkPos[kHS45ExitRight].x, _vm->_gnap->_pos.y), 0, 0x107AB, 1);
+ _vm->_gnap->walkTo(Common::Point(_vm->_hotspotsWalkPos[kHS45ExitRight].x, _vm->_gnap->_pos.y), 0, 0x107AB, 1);
_vm->_gnap->_actionStatus = 0;
- _vm->platypusWalkTo(Common::Point(_vm->_hotspotsWalkPos[kHS45ExitRight].x, _vm->_plat->_pos.y), -1, 0x107CD, 1);
+ _vm->_plat->walkTo(Common::Point(_vm->_hotspotsWalkPos[kHS45ExitRight].x, _vm->_plat->_pos.y), -1, 0x107CD, 1);
_vm->_newSceneNum = 41;
}
break;
@@ -2320,7 +2320,7 @@ void Scene45::run() {
case kHS45DiscoBall:
if (_vm->_gnap->_actionStatus < 0) {
if (_vm->_grabCursorSpriteIndex == kItemSpring) {
- _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS45DiscoBall], 0, 0x9F, 5);
+ _vm->_gnap->walkTo(_vm->_hotspotsWalkPos[kHS45DiscoBall], 0, 0x9F, 5);
_vm->_gnap->_actionStatus = 1;
_vm->setGrabCursorSprite(-1);
_vm->invRemove(kItemSpring);
@@ -2343,7 +2343,7 @@ void Scene45::run() {
case kHS45WalkArea1:
if (_vm->_gnap->_actionStatus < 0)
- _vm->gnapWalkTo(Common::Point(-1, -1), -1, -1, 1);
+ _vm->_gnap->walkTo(Common::Point(-1, -1), -1, -1, 1);
break;
}
}
@@ -2354,7 +2354,7 @@ void Scene45::run() {
_vm->_toyUfoActionStatus = 3;
_vm->toyUfoFlyTo(-1, -1, 0, 799, 0, 300, 5);
} else {
- _vm->gnapWalkTo(Common::Point(-1, -1), -1, -1, 1);
+ _vm->_gnap->walkTo(Common::Point(-1, -1), -1, -1, 1);
}
}
@@ -2517,20 +2517,20 @@ void Scene46::run() {
_vm->_gnap->initPos(-1, 8, kDirUpRight);
_vm->_plat->initPos(-1, 8, kDirUpLeft);
_vm->endSceneInit();
- _vm->platypusWalkTo(Common::Point(1, 8), -1, 0x107C2, 1);
- _vm->gnapWalkTo(Common::Point(2, 8), -1, 0x107B9, 1);
+ _vm->_plat->walkTo(Common::Point(1, 8), -1, 0x107C2, 1);
+ _vm->_gnap->walkTo(Common::Point(2, 8), -1, 0x107B9, 1);
} else if (_vm->_prevSceneNum == 45) {
_vm->_gnap->initPos(11, 8, kDirUpRight);
_vm->_plat->initPos(12, 8, kDirUpLeft);
_vm->endSceneInit();
- _vm->gnapWalkTo(Common::Point(8, 8), -1, 0x107BA, 1);
- _vm->platypusWalkTo(Common::Point(9, 8), -1, 0x107D2, 1);
+ _vm->_gnap->walkTo(Common::Point(8, 8), -1, 0x107BA, 1);
+ _vm->_plat->walkTo(Common::Point(9, 8), -1, 0x107D2, 1);
} else {
_vm->_gnap->initPos(5, 11, kDirUpRight);
_vm->_plat->initPos(6, 11, kDirUpLeft);
_vm->endSceneInit();
- _vm->platypusWalkTo(Common::Point(5, 8), -1, 0x107C2, 1);
- _vm->gnapWalkTo(Common::Point(6, 8), -1, 0x107BA, 1);
+ _vm->_plat->walkTo(Common::Point(5, 8), -1, 0x107C2, 1);
+ _vm->_gnap->walkTo(Common::Point(6, 8), -1, 0x107BA, 1);
}
_vm->_timers[4] = _vm->getRandom(50) + 80;
@@ -2614,7 +2614,7 @@ void Scene46::run() {
break;
case TALK_CURSOR:
_vm->_gnap->_idleFacing = kDirUpLeft;
- _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS46SackGuy], 0, _vm->_gnap->getSequenceId(gskBrainPulsating, 0, 0) | 0x10000, 1);
+ _vm->_gnap->walkTo(_vm->_hotspotsWalkPos[kHS46SackGuy], 0, _vm->_gnap->getSequenceId(gskBrainPulsating, 0, 0) | 0x10000, 1);
_vm->_gnap->_actionStatus = 2;
break;
case GRAB_CURSOR:
@@ -2635,7 +2635,7 @@ void Scene46::run() {
break;
case TALK_CURSOR:
_vm->_gnap->_idleFacing = kDirUpRight;
- _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS46ItchyGuy], 0, _vm->_gnap->getSequenceId(gskBrainPulsating, 0, 0) | 0x10000, 1);
+ _vm->_gnap->walkTo(_vm->_hotspotsWalkPos[kHS46ItchyGuy], 0, _vm->_gnap->getSequenceId(gskBrainPulsating, 0, 0) | 0x10000, 1);
_vm->_gnap->_actionStatus = 1;
break;
case GRAB_CURSOR:
@@ -2648,30 +2648,30 @@ void Scene46::run() {
case kHS46ExitUfoParty:
_vm->_isLeavingScene = true;
- _vm->gnapWalkTo(Common::Point(_vm->_gnap->_pos.x, _vm->_hotspotsWalkPos[kHS46ExitUfoParty].y), 0, 0x107AE, 1);
+ _vm->_gnap->walkTo(Common::Point(_vm->_gnap->_pos.x, _vm->_hotspotsWalkPos[kHS46ExitUfoParty].y), 0, 0x107AE, 1);
_vm->_gnap->_actionStatus = 0;
_vm->_newSceneNum = 40;
break;
case kHS46ExitKissinBooth:
_vm->_isLeavingScene = true;
- _vm->gnapWalkTo(Common::Point(_vm->_hotspotsWalkPos[kHS46ExitKissinBooth].x, _vm->_gnap->_pos.y), 0, 0x107AF, 1);
+ _vm->_gnap->walkTo(Common::Point(_vm->_hotspotsWalkPos[kHS46ExitKissinBooth].x, _vm->_gnap->_pos.y), 0, 0x107AF, 1);
_vm->_gnap->_actionStatus = 0;
- _vm->platypusWalkTo(Common::Point(_vm->_hotspotsWalkPos[kHS46ExitKissinBooth].x, _vm->_plat->_pos.y), -1, 0x107CF, 1);
+ _vm->_plat->walkTo(Common::Point(_vm->_hotspotsWalkPos[kHS46ExitKissinBooth].x, _vm->_plat->_pos.y), -1, 0x107CF, 1);
_vm->_newSceneNum = 44;
break;
case kHS46ExitDisco:
_vm->_isLeavingScene = true;
- _vm->gnapWalkTo(Common::Point(_vm->_hotspotsWalkPos[kHS46ExitDisco].x, _vm->_gnap->_pos.y), 0, 0x107AB, 1);
+ _vm->_gnap->walkTo(Common::Point(_vm->_hotspotsWalkPos[kHS46ExitDisco].x, _vm->_gnap->_pos.y), 0, 0x107AB, 1);
_vm->_gnap->_actionStatus = 0;
- _vm->platypusWalkTo(Common::Point(_vm->_hotspotsWalkPos[kHS46ExitDisco].x, _vm->_plat->_pos.y), -1, 0x107CD, 1);
+ _vm->_plat->walkTo(Common::Point(_vm->_hotspotsWalkPos[kHS46ExitDisco].x, _vm->_plat->_pos.y), -1, 0x107CD, 1);
_vm->_newSceneNum = 45;
break;
case kHS46WalkArea1:
if (_vm->_gnap->_actionStatus < 0)
- _vm->gnapWalkTo(Common::Point(-1, -1), -1, -1, 1);
+ _vm->_gnap->walkTo(Common::Point(-1, -1), -1, -1, 1);
break;
}
}
@@ -2682,7 +2682,7 @@ void Scene46::run() {
_vm->_toyUfoActionStatus = 4;
_vm->toyUfoFlyTo(-1, -1, 0, 799, 0, 300, 2);
} else {
- _vm->gnapWalkTo(Common::Point(-1, -1), -1, -1, 1);
+ _vm->_gnap->walkTo(Common::Point(-1, -1), -1, -1, 1);
}
}