diff options
Diffstat (limited to 'engines/gnap')
-rw-r--r-- | engines/gnap/character.cpp | 2 | ||||
-rw-r--r-- | engines/gnap/character.h | 4 | ||||
-rw-r--r-- | engines/gnap/gnap.cpp | 67 | ||||
-rw-r--r-- | engines/gnap/gnap.h | 5 | ||||
-rw-r--r-- | engines/gnap/grid.cpp | 169 | ||||
-rw-r--r-- | engines/gnap/scenes/group0.cpp | 102 | ||||
-rw-r--r-- | engines/gnap/scenes/group1.cpp | 76 | ||||
-rw-r--r-- | engines/gnap/scenes/group2.cpp | 44 | ||||
-rw-r--r-- | engines/gnap/scenes/group3.cpp | 42 | ||||
-rw-r--r-- | engines/gnap/scenes/group4.cpp | 77 |
10 files changed, 290 insertions, 298 deletions
diff --git a/engines/gnap/character.cpp b/engines/gnap/character.cpp index 6e4ade35a5..e0110ee329 100644 --- a/engines/gnap/character.cpp +++ b/engines/gnap/character.cpp @@ -34,4 +34,6 @@ Character::~Character() {} PlayerGnap::PlayerGnap(GnapEngine * vm) : Character(vm) {} +PlayerPlat::PlayerPlat(GnapEngine * vm) : Character(vm) {} + } // End of namespace Gnap diff --git a/engines/gnap/character.h b/engines/gnap/character.h index 5949b7a1eb..8012ab634e 100644 --- a/engines/gnap/character.h +++ b/engines/gnap/character.h @@ -53,6 +53,10 @@ public: PlayerGnap(GnapEngine *vm); }; +class PlayerPlat : public Character { +public: + PlayerPlat(GnapEngine *vm); +}; } // End of namespace Gnap #endif // GNAP_CHARACTER_H diff --git a/engines/gnap/gnap.cpp b/engines/gnap/gnap.cpp index ff9c79e9cd..76184fc58d 100644 --- a/engines/gnap/gnap.cpp +++ b/engines/gnap/gnap.cpp @@ -149,12 +149,14 @@ Common::Error GnapEngine::run() { _soundMan = new SoundMan(this); _debugger = new Debugger(this); _gnap = new PlayerGnap(this); + _plat = new PlayerPlat(this); _menuBackgroundSurface = nullptr; initGlobalSceneVars(); mainLoop(); + delete _plat; delete _gnap; delete _soundMan; delete _gameSys; @@ -373,10 +375,10 @@ void GnapEngine::updateCursorByHotspot() { setCursor(kDisabledCursors[_verbCursor]); } // Update platypus hotspot - _hotspots[0]._x1 = _gridMinX + 75 * _platX - 30; - _hotspots[0]._y1 = _gridMinY + 48 * _platY - 100; - _hotspots[0]._x2 = _gridMinX + 75 * _platX + 30; - _hotspots[0]._y2 = _gridMinY + 48 * _platY; + _hotspots[0]._x1 = _gridMinX + 75 * _plat->_pos.x - 30; + _hotspots[0]._y1 = _gridMinY + 48 * _plat->_pos.y - 100; + _hotspots[0]._x2 = _gridMinX + 75 * _plat->_pos.x + 30; + _hotspots[0]._y2 = _gridMinY + 48 * _plat->_pos.y; } int GnapEngine::getClickedHotspotId() { @@ -1544,7 +1546,7 @@ void GnapEngine::playGnapShowItem(int itemIndex, int gridLookX, int gridLookY) { } void GnapEngine::playGnapShowCurrItem(int gridX, int gridY, int gridLookX, int gridLookY) { - if (_platX == gridX && _platY == gridY) + if (_plat->_pos.x == gridX && _plat->_pos.y == gridY) platypusMakeRoom(); gnapWalkTo(gridX, gridY, -1, -1, 1); playGnapShowItem(_grabCursorSpriteIndex, gridLookX, gridLookY); @@ -1674,18 +1676,18 @@ void GnapEngine::gnapInitBrainPulseRndValue() { } void GnapEngine::gnapUseDeviceOnPlatypus() { - playGnapSequence(makeRid(1, getGnapSequenceId(gskPullOutDevice, _platX, _platY))); + playGnapSequence(makeRid(1, getGnapSequenceId(gskPullOutDevice, _plat->_pos.x, _plat->_pos.y))); - if (_platypusFacing != kDirNone) { + if (_plat->_idleFacing != kDirNone) { _gameSys->insertSequence(makeRid(1, 0x7D5), _platypusId, makeRid(_platypusSequenceDatNum, _platypusSequenceId), _platypusId, - kSeqSyncWait, 0, 75 * _platX - _platGridX, 48 * _platY - _platGridY); + kSeqSyncWait, 0, 75 * _plat->_pos.x - _platGridX, 48 * _plat->_pos.y - _platGridY); _platypusSequenceId = 0x7D5; _platypusSequenceDatNum = 1; } else { _gameSys->insertSequence(makeRid(1, 0x7D4), _platypusId, makeRid(_platypusSequenceDatNum, _platypusSequenceId), _platypusId, - kSeqSyncWait, 0, 75 * _platX - _platGridX, 48 * _platY - _platGridY); + kSeqSyncWait, 0, 75 * _plat->_pos.x - _platGridX, 48 * _plat->_pos.y - _platGridY); _platypusSequenceId = 0x7D4; _platypusSequenceDatNum = 1; } @@ -1713,17 +1715,17 @@ bool GnapEngine::gnapPlatypusAction(int gridX, int gridY, int platSequenceId, in if (_gnapActionStatus <= -1 && _platypusActionStatus <= -1) { _gnapActionStatus = 100; - if (isPointBlocked(_platX + gridX, _platY + gridY) && (_gnap->_pos != Common::Point(_platX + gridX, _platY + gridY))) + if (isPointBlocked(_plat->_pos.x + gridX, _plat->_pos.y + gridY) && (_gnap->_pos != Common::Point(_plat->_pos.x + gridX, _plat->_pos.y + gridY))) platypusWalkStep(); - if (!isPointBlocked(_platX + gridX, _platY + gridY) && (_gnap->_pos != Common::Point(_platX + gridX, _platY + gridY))) { - gnapWalkTo(_platX + gridX, _platY + gridY, 0, 0x107B9, 1); + if (!isPointBlocked(_plat->_pos.x + gridX, _plat->_pos.y + gridY) && (_gnap->_pos != Common::Point(_plat->_pos.x + gridX, _plat->_pos.y + gridY))) { + gnapWalkTo(_plat->_pos.x + gridX, _plat->_pos.y + gridY, 0, 0x107B9, 1); while (_gameSys->getAnimationStatus(0) != 2) { updateMouseCursor(); doCallback(callback); gameUpdateTick(); } _gameSys->setAnimation(0, 0, 0); - if (_gnap->_pos == Common::Point(_platX + gridX, _platY + gridY)) { + if (_gnap->_pos == Common::Point(_plat->_pos.x + gridX, _plat->_pos.y + gridY)) { _gameSys->setAnimation(platSequenceId, _platypusId, 1); playPlatypusSequence(platSequenceId); while (_gameSys->getAnimationStatus(1) != 2) { @@ -1751,10 +1753,10 @@ void GnapEngine::gnapKissPlatypus(int callback) { _gnapSequenceId = 0x847; _gameSys->insertSequence(0x107CB, _platypusId, makeRid(_platypusSequenceDatNum, _platypusSequenceId), _platypusId, - kSeqSyncWait, getSequenceTotalDuration(0x10847), 75 * _platX - _platGridX, 48 * _platY - _platGridY); + kSeqSyncWait, getSequenceTotalDuration(0x10847), 75 * _plat->_pos.x - _platGridX, 48 * _plat->_pos.y - _platGridY); _platypusSequenceDatNum = 1; _platypusSequenceId = 0x7CB; - _platypusFacing = kDirNone; + _plat->_idleFacing = kDirNone; playGnapSequence(0x107B5); while (_gameSys->getAnimationStatus(0) != 2) { updateMouseCursor(); @@ -1764,7 +1766,7 @@ void GnapEngine::gnapKissPlatypus(int callback) { _gameSys->setAnimation(0, 0, 0); _gnapActionStatus = -1; } else { - playGnapSequence(getGnapSequenceId(gskScratchingHead, _platX, _platY) | 0x10000); + playGnapSequence(getGnapSequenceId(gskScratchingHead, _plat->_pos.x, _plat->_pos.y) | 0x10000); } } @@ -1781,10 +1783,10 @@ void GnapEngine::gnapUseJointOnPlatypus() { _gnapSequenceId = 0x875; _gameSys->insertSequence(0x10876, _platypusId, _platypusSequenceId | (_platypusSequenceDatNum << 16), _platypusId, - kSeqSyncWait, 0, 15 * (5 * _platX - 25), 48 * (_platY - 7)); + kSeqSyncWait, 0, 15 * (5 * _plat->_pos.x - 25), 48 * (_plat->_pos.y - 7)); _platypusSequenceDatNum = 1; _platypusSequenceId = 0x876; - _platypusFacing = kDirNone; + _plat->_idleFacing = kDirNone; playGnapSequence(0x107B5); gnapWalkStep(); while (_gameSys->getAnimationStatus(0) != 2) { @@ -1794,7 +1796,7 @@ void GnapEngine::gnapUseJointOnPlatypus() { _gameSys->setAnimation(0, 0, 0); _gnapActionStatus = -1; } else { - playGnapSequence(getGnapSequenceId(gskScratchingHead, _platX, _platY) | 0x10000); + playGnapSequence(getGnapSequenceId(gskScratchingHead, _plat->_pos.x, _plat->_pos.y) | 0x10000); } } @@ -1815,9 +1817,9 @@ int GnapEngine::getPlatypusSequenceId() { int sequenceId = 0x7CB; - if (_platypusFacing != kDirNone) { + if (_plat->_idleFacing != kDirNone) { sequenceId = 0x7CC; - _platypusFacing = kDirUnk4; + _plat->_idleFacing = kDirUnk4; } return sequenceId | 0x10000; @@ -1826,7 +1828,7 @@ int GnapEngine::getPlatypusSequenceId() { void GnapEngine::playPlatypusSequence(int sequenceId) { _gameSys->insertSequence(sequenceId, _platypusId, makeRid(_platypusSequenceDatNum, _platypusSequenceId), _platypusId, - kSeqScale | kSeqSyncWait, 0, 75 * _platX - _platGridX, 48 * _platY - _platGridY); + kSeqScale | kSeqSyncWait, 0, 75 * _plat->_pos.x - _platGridX, 48 * _plat->_pos.y - _platGridY); _platypusSequenceId = ridToEntryIndex(sequenceId); _platypusSequenceDatNum = ridToDatIndex(sequenceId); } @@ -1837,7 +1839,7 @@ void GnapEngine::updatePlatypusIdleSequence() { if (_timers[1] == 0) { _timers[1] = getRandom(20) + 30; int rnd = getRandom(10); - if (_platypusFacing != kDirNone) { + if (_plat->_idleFacing != kDirNone) { if (rnd != 0 || _platypusSequenceId != 0x7CA) { if (rnd != 1 || _platypusSequenceId != 0x7CA) playPlatypusSequence(0x107CA); @@ -1874,7 +1876,7 @@ void GnapEngine::updatePlatypusIdleSequence2() { if (_timers[0]) { if (!_timers[1]) { _timers[1] = getRandom(20) + 30; - if (_platypusFacing != kDirNone) { + if (_plat->_idleFacing != kDirNone) { if (getRandom(10) >= 2 || _platypusSequenceId != 0x7CA) playPlatypusSequence(0x107CA); else @@ -1900,23 +1902,22 @@ void GnapEngine::updatePlatypusIdleSequence2() { void GnapEngine::initPlatypusPos(int gridX, int gridY, Facing facing) { _timers[0] = 50; _timers[1] = 20; - _platX = gridX; - _platY = gridY; + _plat->_pos = Common::Point(gridX, gridY); if (facing == kDirNone) - _platypusFacing = kDirNone; + _plat->_idleFacing = kDirNone; else - _platypusFacing = facing; - if (_platypusFacing == kDirUnk4) { + _plat->_idleFacing = facing; + if (_plat->_idleFacing == kDirUnk4) { _platypusSequenceId = 0x7D1; } else { _platypusSequenceId = 0x7C1; - _platypusFacing = kDirNone; + _plat->_idleFacing = kDirNone; } - _platypusId = 20 * _platY; + _platypusId = 20 * _plat->_pos.y; _platypusSequenceDatNum = 1; - _gameSys->insertSequence(makeRid(1, _platypusSequenceId), 20 * _platY, + _gameSys->insertSequence(makeRid(1, _platypusSequenceId), 20 * _plat->_pos.y, 0, 0, - kSeqScale, 0, 75 * _platX - _platGridX, 48 * _platY - _platGridY); + kSeqScale, 0, 75 * _plat->_pos.x - _platGridX, 48 * _plat->_pos.y - _platGridY); } //////////////////////////////////////////////////////////////////////////////// diff --git a/engines/gnap/gnap.h b/engines/gnap/gnap.h index d16ba24f92..ce631a392c 100644 --- a/engines/gnap/gnap.h +++ b/engines/gnap/gnap.h @@ -242,8 +242,6 @@ enum { 29 0x20000000 Gas taken 30 0x40000000 31 0x80000000 - - */ // 0x7AB Gnap walks to the right 1 @@ -285,6 +283,7 @@ public: Debugger *_debugger; Scene *_scene; PlayerGnap *_gnap; + PlayerPlat *_plat; int _lastUpdateClock; @@ -504,7 +503,6 @@ public: // Platypus walking int _platWalkNodesCount; GridStruct _platWalkNodes[kMaxGridStructs]; - int _platX, _platY; int _platWalkDestX, _platWalkDestY; int _platWalkDeltaX, _platWalkDeltaY, _platWalkDirX, _platWalkDirY, _platWalkDirXIncr, _platWalkDirYIncr; @@ -550,7 +548,6 @@ public: void gnapUseDisguiseOnPlatypus(); // Platypus - Facing _platypusFacing; int _platypusActionStatus; int _platypusSequenceId, _platypusSequenceDatNum, _platypusId; int getPlatypusSequenceId(); diff --git a/engines/gnap/grid.cpp b/engines/gnap/grid.cpp index ec90cf1e8a..31b7934f42 100644 --- a/engines/gnap/grid.cpp +++ b/engines/gnap/grid.cpp @@ -73,7 +73,7 @@ bool GnapEngine::isPointBlocked(int gridX, int gridY) { if (gridX < 0 || gridX >= _gridMaxX || gridY < 0 || gridY >= _gridMaxY) return true; - if ((_gnap->_pos == Common::Point(gridX, gridY)) || (gridX == _platX && gridY == _platY)) + if ((_gnap->_pos == Common::Point(gridX, gridY)) || (gridX == _plat->_pos.x && gridY == _plat->_pos.y)) return true; const int x = _gridMinX + 75 * gridX; @@ -557,7 +557,7 @@ bool GnapEngine::gnapWalkTo(int gridX, int gridY, int animationIndex, int sequen _gnapWalkDestX = CLIP(gridX, 0, _gridMaxX - 1); _gnapWalkDestY = CLIP(gridY, 0, _gridMaxY - 1); - if (animationIndex >= 0 && _gnapWalkDestX == _platX && _gnapWalkDestY == _platY) + if (animationIndex >= 0 && _gnapWalkDestX == _plat->_pos.x && _gnapWalkDestY == _plat->_pos.y) platypusMakeRoom(); // TODO: Simplify the cascade of Ifs @@ -1032,160 +1032,160 @@ bool GnapEngine::platFindPath3(int gridX, int gridY) { bool done = false; while (!done && gridIncr < _gridMaxX) { - if (!isPointBlocked(_platX + gridIncr, _platY) && gridSub423CC1(_platX + gridIncr, _platY, gridIncr)) { + if (!isPointBlocked(_plat->_pos.x + gridIncr, _plat->_pos.y) && gridSub423CC1(_plat->_pos.x + gridIncr, _plat->_pos.y, gridIncr)) { for (int i = 0; i < gridIncr; ++i) { - _platWalkNodes[i]._gridX1 = _platX + i; - _platWalkNodes[i]._gridY1 = _platY; + _platWalkNodes[i]._gridX1 = _plat->_pos.x + i; + _platWalkNodes[i]._gridY1 = _plat->_pos.y; _platWalkNodes[i]._deltaX = 1; _platWalkNodes[i]._deltaY = 0; } done = true; break; } - if (!isPointBlocked(_platX - gridIncr, _platY) && gridSub423CC1(_platX - gridIncr, _platY, gridIncr)) { + if (!isPointBlocked(_plat->_pos.x - gridIncr, _plat->_pos.y) && gridSub423CC1(_plat->_pos.x - gridIncr, _plat->_pos.y, gridIncr)) { for (int i = 0; i < gridIncr; ++i) { - _platWalkNodes[i]._gridX1 = _platX - i; - _platWalkNodes[i]._gridY1 = _platY; + _platWalkNodes[i]._gridX1 = _plat->_pos.x - i; + _platWalkNodes[i]._gridY1 = _plat->_pos.y; _platWalkNodes[i]._deltaX = -1; _platWalkNodes[i]._deltaY = 0; } done = true; break; } - if (!isPointBlocked(_platX, _platY + gridIncr) && gridSub423CC1(_platX, _platY + gridIncr, gridIncr)) { + if (!isPointBlocked(_plat->_pos.x, _plat->_pos.y + gridIncr) && gridSub423CC1(_plat->_pos.x, _plat->_pos.y + gridIncr, gridIncr)) { for (int i = 0; i < gridIncr; ++i) { - _platWalkNodes[i]._gridX1 = _platX; - _platWalkNodes[i]._gridY1 = _platY + i; + _platWalkNodes[i]._gridX1 = _plat->_pos.x; + _platWalkNodes[i]._gridY1 = _plat->_pos.y + i; _platWalkNodes[i]._deltaX = 0; _platWalkNodes[i]._deltaY = 1; } done = true; break; } - if (!isPointBlocked(_platX, _platY - gridIncr) && gridSub423CC1(_platX, _platY - gridIncr, gridIncr)) { + if (!isPointBlocked(_plat->_pos.x, _plat->_pos.y - gridIncr) && gridSub423CC1(_plat->_pos.x, _plat->_pos.y - gridIncr, gridIncr)) { for (int i = 0; i < gridIncr; ++i) { - _platWalkNodes[i]._gridX1 = _platX; - _platWalkNodes[i]._gridY1 = _platY - i; + _platWalkNodes[i]._gridX1 = _plat->_pos.x; + _platWalkNodes[i]._gridY1 = _plat->_pos.y - i; _platWalkNodes[i]._deltaX = 0; _platWalkNodes[i]._deltaY = -1; } done = true; break; } - if (!isPointBlocked(_platX + gridIncr, _platY + gridIncr) && gridSub423CC1(_platX + gridIncr, _platY + gridIncr, gridIncr)) { + if (!isPointBlocked(_plat->_pos.x + gridIncr, _plat->_pos.y + gridIncr) && gridSub423CC1(_plat->_pos.x + gridIncr, _plat->_pos.y + gridIncr, gridIncr)) { for (int i = 0; i < gridIncr; ++i) { - _platWalkNodes[i]._gridX1 = _platX + i; - _platWalkNodes[i]._gridY1 = _platY + i; + _platWalkNodes[i]._gridX1 = _plat->_pos.x + i; + _platWalkNodes[i]._gridY1 = _plat->_pos.y + i; _platWalkNodes[i]._deltaX = 1; _platWalkNodes[i]._deltaY = 1; } done = true; break; } - if (!isPointBlocked(_platX - gridIncr, _platY + gridIncr) && gridSub423CC1(_platX - gridIncr, _platY + gridIncr, gridIncr)) { + if (!isPointBlocked(_plat->_pos.x - gridIncr, _plat->_pos.y + gridIncr) && gridSub423CC1(_plat->_pos.x - gridIncr, _plat->_pos.y + gridIncr, gridIncr)) { for (int i = 0; i < gridIncr; ++i) { - _platWalkNodes[i]._gridX1 = _platX - i; - _platWalkNodes[i]._gridY1 = _platY + i; + _platWalkNodes[i]._gridX1 = _plat->_pos.x - i; + _platWalkNodes[i]._gridY1 = _plat->_pos.y + i; _platWalkNodes[i]._deltaX = -1; _platWalkNodes[i]._deltaY = 1; } done = true; break; } - if (!isPointBlocked(_platX + gridIncr, _platY - gridIncr) && gridSub423CC1(_platX + gridIncr, _platY - gridIncr, gridIncr)) { + if (!isPointBlocked(_plat->_pos.x + gridIncr, _plat->_pos.y - gridIncr) && gridSub423CC1(_plat->_pos.x + gridIncr, _plat->_pos.y - gridIncr, gridIncr)) { for (int i = 0; i < gridIncr; ++i) { - _platWalkNodes[i]._gridX1 = _platX + i; - _platWalkNodes[i]._gridY1 = _platY - i; + _platWalkNodes[i]._gridX1 = _plat->_pos.x + i; + _platWalkNodes[i]._gridY1 = _plat->_pos.y - i; _platWalkNodes[i]._deltaX = 1; _platWalkNodes[i]._deltaY = -1; } done = true; break; } - if (!isPointBlocked(_platX - gridIncr, _platY - gridIncr) && gridSub423CC1(_platX - gridIncr, _platY - gridIncr, gridIncr)) { + if (!isPointBlocked(_plat->_pos.x - gridIncr, _plat->_pos.y - gridIncr) && gridSub423CC1(_plat->_pos.x - gridIncr, _plat->_pos.y - gridIncr, gridIncr)) { for (int i = 0; i < gridIncr; ++i) { - _platWalkNodes[i]._gridX1 = _platX - i; - _platWalkNodes[i]._gridY1 = _platY - i; + _platWalkNodes[i]._gridX1 = _plat->_pos.x - i; + _platWalkNodes[i]._gridY1 = _plat->_pos.y - i; _platWalkNodes[i]._deltaX = -1; _platWalkNodes[i]._deltaY = -1; } done = true; break; } - if (!isPointBlocked(_platX + gridIncr, _platY) && gridSub42419A(_platX + gridIncr, _platY, gridIncr)) { + if (!isPointBlocked(_plat->_pos.x + gridIncr, _plat->_pos.y) && gridSub42419A(_plat->_pos.x + gridIncr, _plat->_pos.y, gridIncr)) { for (int i = 0; i < gridIncr; ++i) { - _platWalkNodes[i]._gridX1 = _platX + i; - _platWalkNodes[i]._gridY1 = _platY; + _platWalkNodes[i]._gridX1 = _plat->_pos.x + i; + _platWalkNodes[i]._gridY1 = _plat->_pos.y; _platWalkNodes[i]._deltaX = 1; _platWalkNodes[i]._deltaY = 0; } done = true; break; } - if (!isPointBlocked(_platX - gridIncr, _platY) && gridSub42419A(_platX - gridIncr, _platY, gridIncr)) { + if (!isPointBlocked(_plat->_pos.x - gridIncr, _plat->_pos.y) && gridSub42419A(_plat->_pos.x - gridIncr, _plat->_pos.y, gridIncr)) { for (int i = 0; i < gridIncr; ++i) { - _platWalkNodes[i]._gridX1 = _platX - i; - _platWalkNodes[i]._gridY1 = _platY; + _platWalkNodes[i]._gridX1 = _plat->_pos.x - i; + _platWalkNodes[i]._gridY1 = _plat->_pos.y; _platWalkNodes[i]._deltaX = -1; _platWalkNodes[i]._deltaY = 0; } done = true; break; } - if (!isPointBlocked(_platX, _platY + gridIncr) && gridSub42419A(_platX, _platY + gridIncr, gridIncr)) { + if (!isPointBlocked(_plat->_pos.x, _plat->_pos.y + gridIncr) && gridSub42419A(_plat->_pos.x, _plat->_pos.y + gridIncr, gridIncr)) { for (int i = 0; i < gridIncr; ++i) { - _platWalkNodes[i]._gridX1 = _platX; - _platWalkNodes[i]._gridY1 = _platY + i; + _platWalkNodes[i]._gridX1 = _plat->_pos.x; + _platWalkNodes[i]._gridY1 = _plat->_pos.y + i; _platWalkNodes[i]._deltaX = 0; _platWalkNodes[i]._deltaY = 1; } done = true; break; } - if (!isPointBlocked(_platX, _platY - gridIncr) && gridSub42419A(_platX, _platY - gridIncr, gridIncr)) { + if (!isPointBlocked(_plat->_pos.x, _plat->_pos.y - gridIncr) && gridSub42419A(_plat->_pos.x, _plat->_pos.y - gridIncr, gridIncr)) { for (int i = 0; i < gridIncr; ++i) { - _platWalkNodes[i]._gridX1 = _platX; - _platWalkNodes[i]._gridY1 = _platY - i; + _platWalkNodes[i]._gridX1 = _plat->_pos.x; + _platWalkNodes[i]._gridY1 = _plat->_pos.y - i; _platWalkNodes[i]._deltaX = 0; _platWalkNodes[i]._deltaY = -1; } done = true; break; } - if (!isPointBlocked(_platX + gridIncr, _platY + gridIncr) && gridSub42419A(_platX + gridIncr, _platY + gridIncr, gridIncr)) { + if (!isPointBlocked(_plat->_pos.x + gridIncr, _plat->_pos.y + gridIncr) && gridSub42419A(_plat->_pos.x + gridIncr, _plat->_pos.y + gridIncr, gridIncr)) { for (int i = 0; i < gridIncr; ++i) { - _platWalkNodes[i]._gridX1 = _platX + i; - _platWalkNodes[i]._gridY1 = _platY + i; + _platWalkNodes[i]._gridX1 = _plat->_pos.x + i; + _platWalkNodes[i]._gridY1 = _plat->_pos.y + i; _platWalkNodes[i]._deltaX = 1; _platWalkNodes[i]._deltaY = 1; } done = true; break; } - if (!isPointBlocked(_platX - gridIncr, _platY + gridIncr) && gridSub42419A(_platX - gridIncr, _platY + gridIncr, gridIncr)) { + if (!isPointBlocked(_plat->_pos.x - gridIncr, _plat->_pos.y + gridIncr) && gridSub42419A(_plat->_pos.x - gridIncr, _plat->_pos.y + gridIncr, gridIncr)) { for (int i = 0; i < gridIncr; ++i) { - _platWalkNodes[i]._gridX1 = _platX - i; - _platWalkNodes[i]._gridY1 = _platY + i; + _platWalkNodes[i]._gridX1 = _plat->_pos.x - i; + _platWalkNodes[i]._gridY1 = _plat->_pos.y + i; _platWalkNodes[i]._deltaX = -1; _platWalkNodes[i]._deltaY = 1; } done = true; break; } - if (!isPointBlocked(_platX + gridIncr, _platY - gridIncr) && gridSub42419A(_platX + gridIncr, _platY - gridIncr, gridIncr)) { + if (!isPointBlocked(_plat->_pos.x + gridIncr, _plat->_pos.y - gridIncr) && gridSub42419A(_plat->_pos.x + gridIncr, _plat->_pos.y - gridIncr, gridIncr)) { for (int i = 0; i < gridIncr; ++i) { - _platWalkNodes[i]._gridX1 = _platX + i; - _platWalkNodes[i]._gridY1 = _platY - i; + _platWalkNodes[i]._gridX1 = _plat->_pos.x + i; + _platWalkNodes[i]._gridY1 = _plat->_pos.y - i; _platWalkNodes[i]._deltaX = 1; _platWalkNodes[i]._deltaY = -1; } done = true; break; } - if (!isPointBlocked(_platX - gridIncr, _platY - gridIncr) && gridSub42419A(_platX - gridIncr, _platY - gridIncr, gridIncr)) { + if (!isPointBlocked(_plat->_pos.x - gridIncr, _plat->_pos.y - gridIncr) && gridSub42419A(_plat->_pos.x - gridIncr, _plat->_pos.y - gridIncr, gridIncr)) { for (int i = 0; i < gridIncr; ++i) { - _platWalkNodes[i]._gridX1 = _platX - i; - _platWalkNodes[i]._gridY1 = _platY - i; + _platWalkNodes[i]._gridX1 = _plat->_pos.x - i; + _platWalkNodes[i]._gridY1 = _plat->_pos.y - i; _platWalkNodes[i]._deltaX = -1; _platWalkNodes[i]._deltaY = -1; } @@ -1217,17 +1217,17 @@ bool GnapEngine::platypusWalkTo(int gridX, int gridY, int animationIndex, int se if (animationIndex >= 0 && _gnap->_pos == Common::Point(_platWalkDestX, _platWalkDestY)) gnapWalkStep(); - if (gridSub423CC1(_platX, _platY, 0)) + if (gridSub423CC1(_plat->_pos.x, _plat->_pos.y, 0)) done = true; - if (!done && gridSub42419A(_platX, _platY, 0)) + if (!done && gridSub42419A(_plat->_pos.x, _plat->_pos.y, 0)) done = true; - if (!done && platFindPath3(_platX, _platY)) + if (!done && platFindPath3(_plat->_pos.x, _plat->_pos.y)) done = true; if (!done) - gridSub423750(_platX, _platY); + gridSub423750(_plat->_pos.x, _plat->_pos.y); int platSequenceId = _platypusSequenceId; int platId = _platypusId; @@ -1286,13 +1286,13 @@ bool GnapEngine::platypusWalkTo(int gridX, int gridY, int animationIndex, int se _platypusSequenceDatNum = datNum; // CHECKME Not sure if this is correct... if (_platWalkNodes[_platWalkNodesCount - 1]._deltaX > 0) - _platypusFacing = kDirNone; + _plat->_idleFacing = kDirNone; else if (_platWalkNodes[_platWalkNodesCount - 1]._deltaX < 0) - _platypusFacing = kDirUnk4; + _plat->_idleFacing = kDirUnk4; else if (_platWalkNodes[_platWalkNodesCount - 1]._gridX1 % 2) - _platypusFacing = kDirUnk4; + _plat->_idleFacing = kDirUnk4; else - _platypusFacing = kDirNone; + _plat->_idleFacing = kDirNone; if (animationIndex >= 0) _gameSys->setAnimation(makeRid(_platypusSequenceDatNum, _platypusSequenceId), _platypusId, animationIndex); } else if (animationIndex >= 0) { @@ -1304,29 +1304,29 @@ bool GnapEngine::platypusWalkTo(int gridX, int gridY, int animationIndex, int se _platypusSequenceId = ridToEntryIndex(sequenceId); _platypusSequenceDatNum = ridToDatIndex(sequenceId); if (_platypusSequenceId == 0x7C2) { - _platypusFacing = kDirNone; + _plat->_idleFacing = kDirNone; } else if (_platypusSequenceId == 0x7D2) { - _platypusFacing = kDirUnk4; + _plat->_idleFacing = kDirUnk4; } } else { if (_platWalkNodesCount > 0) { if (_platWalkNodes[_platWalkNodesCount - 1]._deltaX > 0) { _platypusSequenceId = 0x7C2; - _platypusFacing = kDirNone; + _plat->_idleFacing = kDirNone; } else if (_platWalkNodes[_platWalkNodesCount - 1]._deltaX < 0) { _platypusSequenceId = 0x7D2; - _platypusFacing = kDirUnk4; + _plat->_idleFacing = kDirUnk4; } else if (_platWalkNodes[0]._deltaX > 0) { _platypusSequenceId = 0x7C2; - _platypusFacing = kDirNone; + _plat->_idleFacing = kDirNone; } else if (_platWalkNodes[0]._deltaX < 0) { _platypusSequenceId = 0x7D2; - _platypusFacing = kDirUnk4; + _plat->_idleFacing = kDirUnk4; } else { _platypusSequenceId = 0x7D2; - _platypusFacing = kDirUnk4; + _plat->_idleFacing = kDirUnk4; } - } else if (_platypusFacing != kDirNone) { + } else if (_plat->_idleFacing != kDirNone) { _platypusSequenceId = 0x7D2; } else { _platypusSequenceId = 0x7C2; @@ -1351,8 +1351,7 @@ bool GnapEngine::platypusWalkTo(int gridX, int gridY, int animationIndex, int se 9, 0, 75 * _platWalkDestX - _platGridX, 48 * _platWalkDestY - _platGridY); } - _platX = _platWalkDestX; - _platY = _platWalkDestY; + _plat->_pos = Common::Point(_platWalkDestX, _platWalkDestY); return done; } @@ -1361,22 +1360,22 @@ void GnapEngine::platypusWalkStep() { bool done = false; for (int i = 1; !done && i < _gridMaxX; ++i) { done = true; - if (!isPointBlocked(_platX + i, _platY)) - platypusWalkTo(_platX + i, _platY, -1, -1, 1); - else if (!isPointBlocked(_platX - i, _platY)) - platypusWalkTo(_platX - i, _platY, -1, -1, 1); - else if (!isPointBlocked(_platX, _platY + 1)) - platypusWalkTo(_platX, _platY + 1, -1, -1, 1); - else if (!isPointBlocked(_platX, _platY - 1)) - platypusWalkTo(_platX, _platY - 1, -1, -1, 1); - else if (!isPointBlocked(_platX + 1, _platY + 1)) - platypusWalkTo(_platX + 1, _platY + 1, -1, -1, 1); - else if (!isPointBlocked(_platX - 1, _platY + 1)) - platypusWalkTo(_platX - 1, _platY + 1, -1, -1, 1); - else if (!isPointBlocked(_platX + 1, _platY - 1)) - platypusWalkTo(_platX + 1, _platY - 1, -1, -1, 1); - else if (!isPointBlocked(_platX - 1, _platY - 1)) - platypusWalkTo(_platX - 1, _platY - 1, -1, -1, 1); + if (!isPointBlocked(_plat->_pos.x + i, _plat->_pos.y)) + platypusWalkTo(_plat->_pos.x + i, _plat->_pos.y, -1, -1, 1); + else if (!isPointBlocked(_plat->_pos.x - i, _plat->_pos.y)) + platypusWalkTo(_plat->_pos.x - i, _plat->_pos.y, -1, -1, 1); + else if (!isPointBlocked(_plat->_pos.x, _plat->_pos.y + 1)) + platypusWalkTo(_plat->_pos.x, _plat->_pos.y + 1, -1, -1, 1); + else if (!isPointBlocked(_plat->_pos.x, _plat->_pos.y - 1)) + platypusWalkTo(_plat->_pos.x, _plat->_pos.y - 1, -1, -1, 1); + else if (!isPointBlocked(_plat->_pos.x + 1, _plat->_pos.y + 1)) + platypusWalkTo(_plat->_pos.x + 1, _plat->_pos.y + 1, -1, -1, 1); + else if (!isPointBlocked(_plat->_pos.x - 1, _plat->_pos.y + 1)) + platypusWalkTo(_plat->_pos.x - 1, _plat->_pos.y + 1, -1, -1, 1); + else if (!isPointBlocked(_plat->_pos.x + 1, _plat->_pos.y - 1)) + platypusWalkTo(_plat->_pos.x + 1, _plat->_pos.y - 1, -1, -1, 1); + else if (!isPointBlocked(_plat->_pos.x - 1, _plat->_pos.y - 1)) + platypusWalkTo(_plat->_pos.x - 1, _plat->_pos.y - 1, -1, -1, 1); else done = false; } @@ -1387,7 +1386,7 @@ void GnapEngine::platypusMakeRoom() { do { rndGridY = getRandom(_gridMaxY); rndGridX = getRandom(_gridMaxX); - } while (ABS(rndGridX - _platX) > 4 || ABS(rndGridY - _platY) > 3 || + } while (ABS(rndGridX - _plat->_pos.x) > 4 || ABS(rndGridY - _plat->_pos.y) > 3 || isPointBlocked(rndGridX, rndGridY)); platypusWalkTo(rndGridX, rndGridY, -1, -1, 1); } diff --git a/engines/gnap/scenes/group0.cpp b/engines/gnap/scenes/group0.cpp index 019678d15f..087fb53a5e 100644 --- a/engines/gnap/scenes/group0.cpp +++ b/engines/gnap/scenes/group0.cpp @@ -131,15 +131,15 @@ void Scene01::run() { switch (_vm->_verbCursor) { case LOOK_CURSOR: if (_vm->isFlag(kGFKeysTaken)) - _vm->playGnapMoan1(_vm->_platX, _vm->_platY); + _vm->playGnapMoan1(_vm->_plat->_pos.x, _vm->_plat->_pos.y); else - _vm->playGnapScratchingHead(_vm->_platX, _vm->_platY); + _vm->playGnapScratchingHead(_vm->_plat->_pos.x, _vm->_plat->_pos.y); break; case GRAB_CURSOR: _vm->gnapKissPlatypus(0); break; case TALK_CURSOR: - _vm->playGnapBrainPulsating(_vm->_platX, _vm->_platY); + _vm->playGnapBrainPulsating(_vm->_plat->_pos.x, _vm->_plat->_pos.y); _vm->playPlatypusSequence(_vm->getPlatypusSequenceId()); break; case PLAT_CURSOR: @@ -481,15 +481,15 @@ void Scene02::run() { switch (_vm->_verbCursor) { case LOOK_CURSOR: if (_vm->isFlag(kGFKeysTaken)) - _vm->playGnapMoan1(_vm->_platX, _vm->_platY); + _vm->playGnapMoan1(_vm->_plat->_pos.x, _vm->_plat->_pos.y); else - _vm->playGnapScratchingHead(_vm->_platX, _vm->_platY); + _vm->playGnapScratchingHead(_vm->_plat->_pos.x, _vm->_plat->_pos.y); break; case GRAB_CURSOR: _vm->gnapKissPlatypus(0); break; case TALK_CURSOR: - _vm->playGnapBrainPulsating(_vm->_platX, _vm->_platY); + _vm->playGnapBrainPulsating(_vm->_plat->_pos.x, _vm->_plat->_pos.y); _vm->playPlatypusSequence(_vm->getPlatypusSequenceId()); break; case PLAT_CURSOR: @@ -946,15 +946,15 @@ void Scene03::run() { switch (_vm->_verbCursor) { case LOOK_CURSOR: if (_vm->isFlag(kGFKeysTaken)) - _vm->playGnapMoan1(_vm->_platX, _vm->_platY); + _vm->playGnapMoan1(_vm->_plat->_pos.x, _vm->_plat->_pos.y); else - _vm->playGnapScratchingHead(_vm->_platX, _vm->_platY); + _vm->playGnapScratchingHead(_vm->_plat->_pos.x, _vm->_plat->_pos.y); break; case GRAB_CURSOR: _vm->gnapKissPlatypus(0); break; case TALK_CURSOR: - _vm->playGnapBrainPulsating(_vm->_platX, _vm->_platY); + _vm->playGnapBrainPulsating(_vm->_plat->_pos.x, _vm->_plat->_pos.y); _vm->playPlatypusSequence(_vm->getPlatypusSequenceId()); break; case PLAT_CURSOR: @@ -1183,12 +1183,11 @@ void Scene03::updateAnimations() { break; case kAS03FreePlatypusDone: _vm->_gnapActionStatus = -1; - _vm->_platX = 6; - _vm->_platY = 6; - _vm->_platypusFacing = kDirUnk4; + _vm->_plat->_pos = Common::Point(6, 6); + _vm->_plat->_idleFacing = kDirUnk4; _vm->_platypusId = 120; gameSys.insertSequence(0x107CA, _vm->_platypusId, 0x1BC, 99, - kSeqSyncWait, 0, 75 * _vm->_platX - _vm->_platGridX, 48 * _vm->_platY - _vm->_platGridY); + kSeqSyncWait, 0, 75 * _vm->_plat->_pos.x - _vm->_platGridX, 48 * _vm->_plat->_pos.y - _vm->_platGridY); gameSys.insertSequence(0x1B7, 99, 0, 0, kSeqNone, 0, 0, 0); _vm->_platypusSequenceDatNum = 1; _vm->_platypusSequenceId = 0x7CA; @@ -1382,8 +1381,7 @@ void Scene04::run() { _vm->setGrabCursorSprite(kItemKeys); _vm->_gnap->_pos = Common::Point(4, 7); _vm->_gnapId = 140; - _vm->_platX = 6; - _vm->_platY = 7; + _vm->_plat->_pos = Common::Point(6, 7); _vm->_platypusId = 141; gameSys.insertSequence(0x107B5, 140, 0, 0, kSeqNone, 0, 300 - _vm->_gnapGridX, 336 - _vm->_gnapGridY); gameSys.insertSequence(0x20C, 141, 0, 0, kSeqNone, 0, 0, 0); @@ -1396,7 +1394,7 @@ void Scene04::run() { _vm->clearFlag(kGFPlatypusDisguised); _vm->_platypusSequenceId = 0x20C; _vm->_platypusSequenceDatNum = 0; - _vm->_platypusFacing = kDirBottomRight; + _vm->_plat->_idleFacing = kDirBottomRight; _vm->_gnapSequenceId = 0x7B5; _vm->_gnapSequenceDatNum = 1; gameSys.waitForUpdate(); @@ -1452,18 +1450,18 @@ void Scene04::run() { switch (_vm->_verbCursor) { case LOOK_CURSOR: if (_vm->isFlag(kGFKeysTaken)) - _vm->playGnapMoan1(_vm->_platX, _vm->_platY); + _vm->playGnapMoan1(_vm->_plat->_pos.x, _vm->_plat->_pos.y); else - _vm->playGnapScratchingHead(_vm->_platX, _vm->_platY); + _vm->playGnapScratchingHead(_vm->_plat->_pos.x, _vm->_plat->_pos.y); break; case GRAB_CURSOR: if (_vm->_cursorValue == 4) _vm->gnapKissPlatypus(0); else - _vm->playGnapMoan1(_vm->_platX, _vm->_platY); + _vm->playGnapMoan1(_vm->_plat->_pos.x, _vm->_plat->_pos.y); break; case TALK_CURSOR: - _vm->playGnapBrainPulsating(_vm->_platX, _vm->_platY); + _vm->playGnapBrainPulsating(_vm->_plat->_pos.x, _vm->_plat->_pos.y); _vm->playPlatypusSequence(_vm->getPlatypusSequenceId()); break; case PLAT_CURSOR: @@ -1927,15 +1925,15 @@ void Scene05::run() { switch (_vm->_verbCursor) { case LOOK_CURSOR: if (_vm->isFlag(kGFKeysTaken)) - _vm->playGnapMoan1(_vm->_platX, _vm->_platY); + _vm->playGnapMoan1(_vm->_plat->_pos.x, _vm->_plat->_pos.y); else - _vm->playGnapScratchingHead(_vm->_platX, _vm->_platY); + _vm->playGnapScratchingHead(_vm->_plat->_pos.x, _vm->_plat->_pos.y); break; case GRAB_CURSOR: _vm->gnapKissPlatypus(0); break; case TALK_CURSOR: - _vm->playGnapBrainPulsating(_vm->_platX, _vm->_platY); + _vm->playGnapBrainPulsating(_vm->_plat->_pos.x, _vm->_plat->_pos.y); _vm->playPlatypusSequence(_vm->getPlatypusSequenceId()); break; case PLAT_CURSOR: @@ -1966,11 +1964,11 @@ void Scene05::run() { _vm->gnapUseDeviceOnPlatypus(); if (_vm->platypusWalkTo(_vm->_hotspotsWalkPos[1].x, _vm->_hotspotsWalkPos[1].y, 1, 0x107C2, 1)) { _vm->_platypusActionStatus = kAS05PlatSearchHaystack; - _vm->_platypusFacing = kDirUnk4; + _vm->_plat->_idleFacing = kDirUnk4; } if (_vm->_gnap->_pos.x == 4 && (_vm->_gnap->_pos.y == 8 || _vm->_gnap->_pos.y == 7)) _vm->gnapWalkStep(); - _vm->playGnapIdle(_vm->_platX, _vm->_platY); + _vm->playGnapIdle(_vm->_plat->_pos.x, _vm->_plat->_pos.y); } break; } @@ -2205,12 +2203,11 @@ void Scene05::updateAnimations() { if (gameSys.getAnimationStatus(1) == 2) { if (_vm->_platypusSequenceId == 0x146) { - _vm->_platX = 4; - _vm->_platY = 8; + _vm->_plat->_pos = Common::Point(4, 8); gameSys.insertSequence(0x107C1, 160, 0x146, 256, kSeqSyncWait, 0, 300 - _vm->_platGridX, 384 - _vm->_platGridY); _vm->_platypusSequenceId = 0x7C1; _vm->_platypusSequenceDatNum = 1; - _vm->_platypusId = 20 * _vm->_platY; + _vm->_platypusId = 20 * _vm->_plat->_pos.y; _vm->invAdd(kItemNeedle); _vm->setFlag(kGFNeedleTaken); _vm->setGrabCursorSprite(kItemNeedle); @@ -2352,15 +2349,15 @@ void Scene06::run() { switch (_vm->_verbCursor) { case LOOK_CURSOR: if (_vm->isFlag(kGFKeysTaken)) - _vm->playGnapMoan1(_vm->_platX, _vm->_platY); + _vm->playGnapMoan1(_vm->_plat->_pos.x, _vm->_plat->_pos.y); else - _vm->playGnapScratchingHead(_vm->_platX, _vm->_platY); + _vm->playGnapScratchingHead(_vm->_plat->_pos.x, _vm->_plat->_pos.y); break; case GRAB_CURSOR: _vm->gnapKissPlatypus(0); break; case TALK_CURSOR: - _vm->playGnapBrainPulsating(_vm->_platX, _vm->_platY); + _vm->playGnapBrainPulsating(_vm->_plat->_pos.x, _vm->_plat->_pos.y); _vm->playPlatypusSequence(_vm->getPlatypusSequenceId()); break; case PLAT_CURSOR: @@ -2440,7 +2437,7 @@ void Scene06::run() { _vm->_hotspots[kHS06WalkArea5]._flags &= ~SF_WALKABLE; _vm->_gnap->_idleFacing = kDirUpLeft; _vm->platypusWalkTo(6, 8, 1, 0x107C2, 1); - _vm->_platypusFacing = kDirNone; + _vm->_plat->_idleFacing = kDirNone; _vm->_gnapActionStatus = kAS06UseTwigOnHorse; _vm->setGrabCursorSprite(-1); } else if (_vm->_grabCursorSpriteIndex >= 0) { @@ -2593,8 +2590,7 @@ void Scene06::updateAnimations() { _vm->_hotspots[kHS06Ladder]._flags = SF_DISABLED; _vm->setGrabCursorSprite(kItemGas); _vm->_platypusActionStatus = -1; - _vm->_platX = 6; - _vm->_platY = 8; + _vm->_plat->_pos = Common::Point(6, 8); gameSys.insertSequence(0x107C1, _vm->_platypusId, 0, 0, kSeqNone, 0, 450 - _vm->_platGridX, 384 - _vm->_platGridY); _vm->_platypusSequenceId = 0x7C1; _vm->_platypusSequenceDatNum = 1; @@ -2697,12 +2693,11 @@ void Scene07::run() { gameSys.insertSequence(0x8F, 140, 0, 0, kSeqNone, 0, 0, 0); gameSys.setAnimation(makeRid(_vm->_gnapSequenceDatNum, _vm->_gnapSequenceId), _vm->_gnapId, 0); _vm->_gnapActionStatus = kAS07Wait; - _vm->_platX = 3; - _vm->_platY = 8; + _vm->_plat->_pos = Common::Point(3, 8); _vm->_platypusId = 160; _vm->_platypusSequenceId = 0x91; _vm->_platypusSequenceDatNum = 0; - _vm->_platypusFacing = kDirNone; + _vm->_plat->_idleFacing = kDirNone; gameSys.insertSequence(0x91, 160, 0, 0, kSeqNone, 0, 0, 0); _vm->endSceneInit(); } @@ -2727,13 +2722,13 @@ void Scene07::run() { case kHS07Platypus: switch (_vm->_verbCursor) { case LOOK_CURSOR: - _vm->playGnapMoan1(_vm->_platX, _vm->_platY); + _vm->playGnapMoan1(_vm->_plat->_pos.x, _vm->_plat->_pos.y); break; case GRAB_CURSOR: _vm->gnapKissPlatypus(0); break; case TALK_CURSOR: - _vm->playGnapBrainPulsating(_vm->_platX, _vm->_platY); + _vm->playGnapBrainPulsating(_vm->_plat->_pos.x, _vm->_plat->_pos.y); _vm->playPlatypusSequence(_vm->getPlatypusSequenceId()); break; case PLAT_CURSOR: @@ -2813,10 +2808,10 @@ void Scene07::run() { _vm->_timers[1] = _vm->getRandom(20) + 30; int gnapRandomValue = _vm->getRandom(20); // TODO Cleanup - if (_vm->_platypusFacing != kDirNone) { + if (_vm->_plat->_idleFacing != kDirNone) { if (gnapRandomValue != 0 || _vm->_platypusSequenceId != 0x7CA) { if (gnapRandomValue != 1 || _vm->_platypusSequenceId != 0x7CA) { - if (_vm->_platY == 9) + if (_vm->_plat->_pos.y == 9) _vm->playPlatypusSequence(0x107CA); } else { _vm->playPlatypusSequence(0x10845); @@ -2826,7 +2821,7 @@ void Scene07::run() { } } else if (gnapRandomValue != 0 || _vm->_platypusSequenceId != 0x7C9) { if (gnapRandomValue != 1 || _vm->_platypusSequenceId != 0x7C9) { - if (_vm->_platY == 9) + if (_vm->_plat->_pos.y == 9) _vm->playPlatypusSequence(0x107C9); } else { _vm->playPlatypusSequence(0x10844); @@ -2995,16 +2990,16 @@ void Scene08::run() { switch (_vm->_verbCursor) { case LOOK_CURSOR: if (_vm->isFlag(kGFSceneFlag1)) - _vm->playGnapMoan1(_vm->_platX, _vm->_platY); + _vm->playGnapMoan1(_vm->_plat->_pos.x, _vm->_plat->_pos.y); else - _vm->playGnapScratchingHead(_vm->_platX, _vm->_platY); + _vm->playGnapScratchingHead(_vm->_plat->_pos.x, _vm->_plat->_pos.y); break; case GRAB_CURSOR: _vm->gnapActionIdle(0x14D); _vm->gnapKissPlatypus(8); break; case TALK_CURSOR: - _vm->playGnapBrainPulsating(_vm->_platX, _vm->_platY); + _vm->playGnapBrainPulsating(_vm->_plat->_pos.x, _vm->_plat->_pos.y); _vm->playPlatypusSequence(_vm->getPlatypusSequenceId()); break; case PLAT_CURSOR: @@ -3056,7 +3051,7 @@ void Scene08::run() { _vm->gnapUseDeviceOnPlatypus(); _vm->platypusWalkTo(6, 6, 1, 0x107C2, 1); _vm->_platypusActionStatus = kAS08PlatWithMan; - _vm->_platypusFacing = kDirNone; + _vm->_plat->_idleFacing = kDirNone; _vm->playGnapIdle(6, 6); break; } @@ -3092,7 +3087,7 @@ void Scene08::run() { _vm->gnapUseDeviceOnPlatypus(); _vm->platypusWalkTo(3, 7, 1, 0x107C2, 1); _vm->_platypusActionStatus = kAS08PlatWithDog; - _vm->_platypusFacing = kDirNone; + _vm->_plat->_idleFacing = kDirNone; _vm->playGnapIdle(3, 7); break; } @@ -3332,11 +3327,10 @@ void Scene08::updateAnimations() { gameSys.insertSequence(0x148, 160, _vm->_platypusSequenceId | (_vm->_platypusSequenceDatNum << 16), _vm->_platypusId, kSeqSyncWait, 0, 0, 0); _currDogSequenceId = _nextDogSequenceId; _nextDogSequenceId = 0x134; - _vm->_platX = 1; - _vm->_platY = 8; + _vm->_plat->_pos = Common::Point(1, 8); _vm->_platypusId = 160; _vm->_platypusSequenceId = 0x148; - _vm->_platypusFacing = kDirUnk4; + _vm->_plat->_idleFacing = kDirUnk4; _vm->_platypusSequenceDatNum = 0; if (_vm->_gnap->_pos == Common::Point(1, 8)) _vm->gnapWalkStep(); @@ -3428,13 +3422,13 @@ void Scene09::run() { case kHS09Platypus: switch (_vm->_verbCursor) { case LOOK_CURSOR: - _vm->playGnapMoan1(_vm->_platX, _vm->_platY); + _vm->playGnapMoan1(_vm->_plat->_pos.x, _vm->_plat->_pos.y); break; case GRAB_CURSOR: _vm->gnapKissPlatypus(0); break; case TALK_CURSOR: - _vm->playGnapBrainPulsating(_vm->_platX, _vm->_platY); + _vm->playGnapBrainPulsating(_vm->_plat->_pos.x, _vm->_plat->_pos.y); _vm->playPlatypusSequence(_vm->getPlatypusSequenceId()); break; case PLAT_CURSOR: @@ -3448,7 +3442,7 @@ void Scene09::run() { _vm->gnapWalkTo(4, 7, 0, 0x107BF, 1); _vm->_gnapActionStatus = kAS09LeaveScene; _vm->platypusWalkTo(4, 8, -1, 0x107D2, 1); - _vm->_platypusFacing = kDirUnk4; + _vm->_plat->_idleFacing = kDirUnk4; break; case kHS09ExitHouse: @@ -3457,7 +3451,7 @@ void Scene09::run() { _vm->gnapWalkTo(10, -1, 0, 0x107AB, 1); _vm->_gnapActionStatus = kAS09LeaveScene; _vm->platypusWalkTo(10, -1, -1, 0x107CD, 1); - _vm->_platypusFacing = kDirUnk4; + _vm->_plat->_idleFacing = kDirUnk4; break; case kHS09Trash: diff --git a/engines/gnap/scenes/group1.cpp b/engines/gnap/scenes/group1.cpp index 017858b24c..e2d0e9685a 100644 --- a/engines/gnap/scenes/group1.cpp +++ b/engines/gnap/scenes/group1.cpp @@ -112,15 +112,15 @@ void Scene10::run() { switch (_vm->_verbCursor) { case LOOK_CURSOR: if (_vm->isFlag(kGFMudTaken)) - _vm->playGnapMoan1(_vm->_platX, _vm->_platY); + _vm->playGnapMoan1(_vm->_plat->_pos.x, _vm->_plat->_pos.y); else - _vm->playGnapScratchingHead(_vm->_platX, _vm->_platY); + _vm->playGnapScratchingHead(_vm->_plat->_pos.x, _vm->_plat->_pos.y); break; case GRAB_CURSOR: _vm->gnapKissPlatypus(10); break; case TALK_CURSOR: - _vm->playGnapBrainPulsating(_vm->_platX, _vm->_platY); + _vm->playGnapBrainPulsating(_vm->_plat->_pos.x, _vm->_plat->_pos.y); _vm->playPlatypusSequence(_vm->getPlatypusSequenceId()); break; case PLAT_CURSOR: @@ -242,7 +242,7 @@ void Scene10::run() { _vm->gnapUseDeviceOnPlatypus(); _vm->platypusWalkTo(7, 6, 1, 0x107D2, 1); _vm->_platypusActionStatus = kAS10PlatWithBox; - _vm->_platypusFacing = kDirUnk4; + _vm->_plat->_idleFacing = kDirUnk4; _vm->_largeSprite = gameSys.createSurface(0xC3); _vm->playGnapIdle(7, 6); } @@ -368,19 +368,18 @@ void Scene10::updateAnimations() { switch (_nextCookSequenceId) { case 0x109: - _vm->_platX = 4; - _vm->_platY = 8; + _vm->_plat->_pos = Common::Point(4, 8); gameSys.insertSequence(0x109, 100, _currCookSequenceId, 100, kSeqSyncWait, 0, 0, 0); gameSys.insertSequence(0x107C9, 160, _vm->_platypusSequenceId | (_vm->_platypusSequenceDatNum << 16), _vm->_platypusId, kSeqSyncWait, _vm->getSequenceTotalDuration(0x109) + _vm->getSequenceTotalDuration(0x10A) + _vm->getSequenceTotalDuration(0x10843), - 75 * _vm->_platX - _vm->_platGridX, 48 * _vm->_platY - _vm->_platGridY); + 75 * _vm->_plat->_pos.x - _vm->_platGridX, 48 * _vm->_plat->_pos.y - _vm->_platGridY); gameSys.removeSequence(0x107, 100, true); _currCookSequenceId = 0x109; _nextCookSequenceId = 0x843; _vm->_platypusSequenceId = 0x7C9; _vm->_platypusId = 160; - _vm->_platypusFacing = kDirNone; + _vm->_plat->_idleFacing = kDirNone; _vm->_platypusSequenceDatNum = 1; break; case 0x843: @@ -596,13 +595,13 @@ void Scene11::run() { } else { switch (_vm->_verbCursor) { case LOOK_CURSOR: - _vm->playGnapMoan1(_vm->_platX, _vm->_platY); + _vm->playGnapMoan1(_vm->_plat->_pos.x, _vm->_plat->_pos.y); break; case GRAB_CURSOR: _vm->gnapKissPlatypus(0); break; case TALK_CURSOR: - _vm->playGnapBrainPulsating(_vm->_platX, _vm->_platY); + _vm->playGnapBrainPulsating(_vm->_plat->_pos.x, _vm->_plat->_pos.y); _vm->playPlatypusSequence(_vm->getPlatypusSequenceId()); break; case PLAT_CURSOR: @@ -1015,13 +1014,13 @@ void Scene12::run() { case kHS12Platypus: switch (_vm->_verbCursor) { case LOOK_CURSOR: - _vm->playGnapMoan1(_vm->_platX, _vm->_platY); + _vm->playGnapMoan1(_vm->_plat->_pos.x, _vm->_plat->_pos.y); break; case GRAB_CURSOR: _vm->gnapKissPlatypus(0); break; case TALK_CURSOR: - _vm->playGnapBrainPulsating(_vm->_platX, _vm->_platY); + _vm->playGnapBrainPulsating(_vm->_plat->_pos.x, _vm->_plat->_pos.y); _vm->playPlatypusSequence(_vm->getPlatypusSequenceId()); break; case PLAT_CURSOR: @@ -1073,7 +1072,7 @@ void Scene12::run() { _vm->gnapUseDeviceOnPlatypus(); _vm->platypusWalkTo(3, 7, 1, 0x107D2, 1); _vm->_platypusActionStatus = kAS12PlatWithToothGuy; - _vm->_platypusFacing = kDirUnk4; + _vm->_plat->_idleFacing = kDirUnk4; _vm->playGnapIdle(2, 7); break; } @@ -1107,7 +1106,7 @@ void Scene12::run() { _vm->_gnapActionStatus = kAS12TalkBarkeeper; break; case PLAT_CURSOR: - _vm->playGnapPullOutDevice(_vm->_platX, _vm->_platY); + _vm->playGnapPullOutDevice(_vm->_plat->_pos.x, _vm->_plat->_pos.y); gameSys.setAnimation(makeRid(_vm->_gnapSequenceDatNum, _vm->_gnapSequenceId), _vm->_gnapId, 0); _vm->_gnapActionStatus = kAS12PlatWithBarkeeper; break; @@ -1143,7 +1142,7 @@ void Scene12::run() { _vm->gnapUseDeviceOnPlatypus(); _vm->platypusWalkTo(7, 6, 1, 0x107C2, 1); _vm->_platypusActionStatus = kAS12PlatWithBeardGuy; - _vm->_platypusFacing = kDirNone; + _vm->_plat->_idleFacing = kDirNone; _vm->playGnapIdle(7, 6); break; } @@ -1524,13 +1523,13 @@ void Scene13::run() { case kHS13Platypus: switch (_vm->_verbCursor) { case LOOK_CURSOR: - _vm->playGnapMoan1(_vm->_platX, _vm->_platY); + _vm->playGnapMoan1(_vm->_plat->_pos.x, _vm->_plat->_pos.y); break; case GRAB_CURSOR: _vm->gnapKissPlatypus(0); break; case TALK_CURSOR: - _vm->playGnapBrainPulsating(_vm->_platX, _vm->_platY); + _vm->playGnapBrainPulsating(_vm->_plat->_pos.x, _vm->_plat->_pos.y); _vm->playPlatypusSequence(_vm->getPlatypusSequenceId()); break; case PLAT_CURSOR: @@ -1694,7 +1693,7 @@ void Scene13::run() { if (!_vm->_isLeavingScene) { _vm->updatePlatypusIdleSequence(); - if (_vm->_platY == 5 || _vm->_platY == 6) + if (_vm->_plat->_pos.y == 5 || _vm->_plat->_pos.y == 6) _vm->platypusWalkTo(-1, 7, -1, -1, 1); if (_vm->_gnapActionStatus < 0) _vm->updateGnapIdleSequence(); @@ -2423,8 +2422,7 @@ void Scene17::run() { _vm->gnapWalkTo(4, 8, -1, 0x107B9, 1); } else if (_vm->isFlag(kGFUnk27)) { _vm->initGnapPos(3, 9, kDirUpLeft); - _vm->_platX = _vm->_hotspotsWalkPos[2].x; - _vm->_platY = _vm->_hotspotsWalkPos[2].y; + _vm->_plat->_pos = _vm->_hotspotsWalkPos[2]; _vm->_platypusId = 20 * _vm->_hotspotsWalkPos[2].y; gameSys.insertSequence(0x25A, 20 * _vm->_hotspotsWalkPos[2].y, 0, 0, kSeqNone, 0, 0, 0); gameSys.insertSequence(0x257, 254, 0, 0, kSeqNone, 0, 0, 0); @@ -2459,8 +2457,7 @@ void Scene17::run() { _vm->clearFlag(kGFUnk16); _vm->_sceneWaiting = true; _vm->initGnapPos(3, 9, kDirUpLeft); - _vm->_platX = _vm->_hotspotsWalkPos[2].x; - _vm->_platY = _vm->_hotspotsWalkPos[2].y; + _vm->_plat->_pos = _vm->_hotspotsWalkPos[2]; _vm->_platypusId = 20 * _vm->_hotspotsWalkPos[2].y; _currPhoneSequenceId = 0x251; gameSys.insertSequence(0x25A, 20 * _vm->_hotspotsWalkPos[2].y, 0, 0, kSeqNone, 0, 0, 0); @@ -2498,18 +2495,17 @@ void Scene17::run() { _vm->_gnapSequenceDatNum = 0; _vm->_gnap->_idleFacing = kDirBottomRight; gameSys.insertSequence(makeRid(_vm->_gnapSequenceDatNum, _vm->_gnapSequenceId), _vm->_gnapId, 0, 0, kSeqNone, 0, 0, 0); - _vm->_platX = -1; - _vm->_platY = 8; + _vm->_plat->_pos = Common::Point(-1, 8); _vm->_platypusId = 160; gameSys.insertSequence(0x241, 160, 0, 0, kSeqNone, 0, 0, 0); gameSys.insertSequence(0x107C1, _vm->_platypusId, 0x241, _vm->_platypusId, - kSeqScale | kSeqSyncWait, 0, 75 * _vm->_platX - _vm->_platGridX, 48 * _vm->_platY - _vm->_platGridY); + kSeqScale | kSeqSyncWait, 0, 75 * _vm->_plat->_pos.x - _vm->_platGridX, 48 * _vm->_plat->_pos.y - _vm->_platGridY); gameSys.insertSequence(0x22C, 2, 0, 0, kSeqNone, 0, 0, 0); // TODO delayTicksA(2, 9); _vm->endSceneInit(); _vm->_platypusSequenceId = 0x7C1; _vm->_platypusSequenceDatNum = 1; - _vm->_platypusFacing = kDirBottomRight; + _vm->_plat->_idleFacing = kDirBottomRight; _vm->platypusWalkTo(2, 9, -1, 0x107C2, 1); } @@ -2544,15 +2540,15 @@ void Scene17::run() { _vm->invRemove(kItemJoint); } } else if (_vm->_grabCursorSpriteIndex >= 0) { - _vm->playGnapScratchingHead(_vm->_platX, _vm->_platY); + _vm->playGnapScratchingHead(_vm->_plat->_pos.x, _vm->_plat->_pos.y); } else { switch (_vm->_verbCursor) { case LOOK_CURSOR: case GRAB_CURSOR: - _vm->playGnapScratchingHead(_vm->_platX, _vm->_platY); + _vm->playGnapScratchingHead(_vm->_plat->_pos.x, _vm->_plat->_pos.y); break; case TALK_CURSOR: - _vm->playGnapBrainPulsating(_vm->_platX, _vm->_platY); + _vm->playGnapBrainPulsating(_vm->_plat->_pos.x, _vm->_plat->_pos.y); _vm->playPlatypusSequence(_vm->getPlatypusSequenceId()); break; case PLAT_CURSOR: @@ -2622,7 +2618,7 @@ void Scene17::run() { platHangUpPhone(); _vm->_isLeavingScene = true; _vm->gnapUseDeviceOnPlatypus(); - _vm->_platypusFacing = kDirUpLeft; + _vm->_plat->_idleFacing = kDirUpLeft; _vm->platypusWalkTo(_vm->_hotspotsWalkPos[2].x, _vm->_hotspotsWalkPos[2].y, 1, 0x107C2, 1); _vm->setFlag(kGFUnk16); _vm->_platypusActionStatus = kAS17PlatUsePhone; @@ -2666,7 +2662,7 @@ void Scene17::run() { platHangUpPhone(); _vm->_isLeavingScene = true; _vm->gnapUseDeviceOnPlatypus(); - _vm->_platypusFacing = kDirUpLeft; + _vm->_plat->_idleFacing = kDirUpLeft; _vm->platypusWalkTo(_vm->_hotspotsWalkPos[2].x, _vm->_hotspotsWalkPos[2].y, 1, 0x107C2, 1); _vm->setFlag(kGFUnk16); _vm->_platypusActionStatus = kAS17PlatUsePhone; @@ -3186,11 +3182,11 @@ void Scene18::gnapCarryGarbageCanTo(int gridX) { else direction = -1; } else { - if (_vm->_gnap->_pos.y == _vm->_platY) { + if (_vm->_gnap->_pos.y == _vm->_plat->_pos.y) { if (nextGridX >= _vm->_gnap->_pos.x) { - if (nextGridX >= _vm->_platX && _vm->_gnap->_pos.x <= _vm->_platX) + if (nextGridX >= _vm->_plat->_pos.x && _vm->_gnap->_pos.x <= _vm->_plat->_pos.x) _vm->platypusMakeRoom(); - } else if (nextGridX <= _vm->_platX && _vm->_gnap->_pos.x >= _vm->_platX) { + } else if (nextGridX <= _vm->_plat->_pos.x && _vm->_gnap->_pos.x >= _vm->_plat->_pos.x) { _vm->platypusMakeRoom(); } } @@ -3442,17 +3438,17 @@ void Scene18::run() { if (_vm->_grabCursorSpriteIndex == kItemJoint) { _vm->gnapUseJointOnPlatypus(); } else if (_vm->_grabCursorSpriteIndex >= 0) { - _vm->playGnapShowItem(_vm->_grabCursorSpriteIndex, _vm->_platX, _vm->_platY); + _vm->playGnapShowItem(_vm->_grabCursorSpriteIndex, _vm->_plat->_pos.x, _vm->_plat->_pos.y); } else { switch (_vm->_verbCursor) { case LOOK_CURSOR: - _vm->playGnapMoan1(_vm->_platX, _vm->_platY); + _vm->playGnapMoan1(_vm->_plat->_pos.x, _vm->_plat->_pos.y); break; case GRAB_CURSOR: _vm->gnapKissPlatypus(0); break; case TALK_CURSOR: - _vm->playGnapBrainPulsating(_vm->_platX, _vm->_platY); + _vm->playGnapBrainPulsating(_vm->_plat->_pos.x, _vm->_plat->_pos.y); _vm->playPlatypusSequence(_vm->getPlatypusSequenceId()); break; case PLAT_CURSOR: @@ -4148,17 +4144,17 @@ void Scene19::run() { if (_vm->_grabCursorSpriteIndex == kItemJoint) { _vm->gnapUseJointOnPlatypus(); } else if (_vm->_grabCursorSpriteIndex >= 0) { - _vm->playGnapImpossible(_vm->_platX, _vm->_platY); + _vm->playGnapImpossible(_vm->_plat->_pos.x, _vm->_plat->_pos.y); } else { switch (_vm->_verbCursor) { case LOOK_CURSOR: - _vm->playGnapMoan1(_vm->_platX, _vm->_platY); + _vm->playGnapMoan1(_vm->_plat->_pos.x, _vm->_plat->_pos.y); break; case GRAB_CURSOR: _vm->gnapKissPlatypus(0); break; case TALK_CURSOR: - _vm->playGnapBrainPulsating(_vm->_platX, _vm->_platY); + _vm->playGnapBrainPulsating(_vm->_plat->_pos.x, _vm->_plat->_pos.y); _vm->playPlatypusSequence(_vm->getPlatypusSequenceId()); break; case PLAT_CURSOR: diff --git a/engines/gnap/scenes/group2.cpp b/engines/gnap/scenes/group2.cpp index 543b4fe23e..23afc55907 100644 --- a/engines/gnap/scenes/group2.cpp +++ b/engines/gnap/scenes/group2.cpp @@ -279,13 +279,13 @@ void Scene20::run() { } else { switch (_vm->_verbCursor) { case LOOK_CURSOR: - _vm->playGnapScratchingHead(_vm->_platX, _vm->_platY); + _vm->playGnapScratchingHead(_vm->_plat->_pos.x, _vm->_plat->_pos.y); break; case GRAB_CURSOR: _vm->gnapKissPlatypus(20); break; case TALK_CURSOR: - _vm->playGnapBrainPulsating(_vm->_platX, _vm->_platY); + _vm->playGnapBrainPulsating(_vm->_plat->_pos.x, _vm->_plat->_pos.y); _vm->playPlatypusSequence(_vm->getPlatypusSequenceId()); break; case PLAT_CURSOR: @@ -305,7 +305,7 @@ void Scene20::run() { _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS20ExitParkingLot].x, _vm->_hotspotsWalkPos[kHS20ExitParkingLot].y, 0, 0x107AF, 1); _vm->_gnapActionStatus = kAS20LeaveScene; _vm->platypusWalkTo(_vm->_hotspotsWalkPos[kHS20ExitParkingLot].x, _vm->_hotspotsWalkPos[kHS20ExitParkingLot].y + 1, -1, 0x107CF, 1); - _vm->_platypusFacing = kDirUnk4; + _vm->_plat->_idleFacing = kDirUnk4; } break; @@ -344,7 +344,7 @@ void Scene20::run() { _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS20ExitInsideGrubCity].x, _vm->_hotspotsWalkPos[kHS20ExitInsideGrubCity].y - 1, 0, 0x107BB, 1); _vm->_gnapActionStatus = kAS20LeaveScene; _vm->platypusWalkTo(_vm->_hotspotsWalkPos[kHS20ExitInsideGrubCity].x + 1, _vm->_hotspotsWalkPos[kHS20ExitInsideGrubCity].y, -1, 0x107C2, 1); - _vm->_platypusFacing = kDirUnk4; + _vm->_plat->_idleFacing = kDirUnk4; } break; @@ -797,13 +797,13 @@ void Scene21::run() { } else { switch (_vm->_verbCursor) { case LOOK_CURSOR: - _vm->playGnapScratchingHead(_vm->_platX, _vm->_platY); + _vm->playGnapScratchingHead(_vm->_plat->_pos.x, _vm->_plat->_pos.y); break; case GRAB_CURSOR: _vm->gnapKissPlatypus(0); break; case TALK_CURSOR: - _vm->playGnapBrainPulsating(_vm->_platX, _vm->_platY); + _vm->playGnapBrainPulsating(_vm->_plat->_pos.x, _vm->_plat->_pos.y); _vm->playPlatypusSequence(_vm->getPlatypusSequenceId()); break; case PLAT_CURSOR: @@ -1113,13 +1113,13 @@ void Scene22::run() { } else { switch (_vm->_verbCursor) { case LOOK_CURSOR: - _vm->playGnapScratchingHead(_vm->_platX, _vm->_platY); + _vm->playGnapScratchingHead(_vm->_plat->_pos.x, _vm->_plat->_pos.y); break; case GRAB_CURSOR: _vm->gnapKissPlatypus(0); break; case TALK_CURSOR: - _vm->playGnapBrainPulsating(_vm->_platX, _vm->_platY); + _vm->playGnapBrainPulsating(_vm->_plat->_pos.x, _vm->_plat->_pos.y); _vm->playPlatypusSequence(_vm->getPlatypusSequenceId()); break; case PLAT_CURSOR: @@ -1337,13 +1337,13 @@ void Scene23::run() { } else { switch (_vm->_verbCursor) { case LOOK_CURSOR: - _vm->playGnapScratchingHead(_vm->_platX, _vm->_platY); + _vm->playGnapScratchingHead(_vm->_plat->_pos.x, _vm->_plat->_pos.y); break; case GRAB_CURSOR: _vm->gnapKissPlatypus(0); break; case TALK_CURSOR: - _vm->playGnapBrainPulsating(_vm->_platX, _vm->_platY); + _vm->playGnapBrainPulsating(_vm->_plat->_pos.x, _vm->_plat->_pos.y); _vm->playPlatypusSequence(_vm->getPlatypusSequenceId()); break; case PLAT_CURSOR: @@ -1606,13 +1606,13 @@ void Scene24::run() { } else { switch (_vm->_verbCursor) { case LOOK_CURSOR: - _vm->playGnapScratchingHead(_vm->_platX, _vm->_platY); + _vm->playGnapScratchingHead(_vm->_plat->_pos.x, _vm->_plat->_pos.y); break; case GRAB_CURSOR: _vm->gnapKissPlatypus(0); break; case TALK_CURSOR: - _vm->playGnapBrainPulsating(_vm->_platX, _vm->_platY); + _vm->playGnapBrainPulsating(_vm->_plat->_pos.x, _vm->_plat->_pos.y); _vm->playPlatypusSequence(_vm->getPlatypusSequenceId()); break; case PLAT_CURSOR: @@ -1852,13 +1852,13 @@ void Scene25::run() { } else { switch (_vm->_verbCursor) { case LOOK_CURSOR: - _vm->playGnapScratchingHead(_vm->_platX, _vm->_platY); + _vm->playGnapScratchingHead(_vm->_plat->_pos.x, _vm->_plat->_pos.y); break; case GRAB_CURSOR: _vm->gnapKissPlatypus(0); break; case TALK_CURSOR: - _vm->playGnapBrainPulsating(_vm->_platX, _vm->_platY); + _vm->playGnapBrainPulsating(_vm->_plat->_pos.x, _vm->_plat->_pos.y); _vm->playPlatypusSequence(_vm->getPlatypusSequenceId()); break; case PLAT_CURSOR: @@ -2169,13 +2169,13 @@ void Scene26::run() { } else { switch (_vm->_verbCursor) { case LOOK_CURSOR: - _vm->playGnapMoan1(_vm->_platX, _vm->_platY); + _vm->playGnapMoan1(_vm->_plat->_pos.x, _vm->_plat->_pos.y); break; case GRAB_CURSOR: _vm->gnapKissPlatypus(0); break; case TALK_CURSOR: - _vm->playGnapBrainPulsating(_vm->_platX, _vm->_platY); + _vm->playGnapBrainPulsating(_vm->_plat->_pos.x, _vm->_plat->_pos.y); _vm->playPlatypusSequence(_vm->getPlatypusSequenceId()); break; case PLAT_CURSOR: @@ -2403,13 +2403,13 @@ void Scene27::run() { } else { switch (_vm->_verbCursor) { case LOOK_CURSOR: - _vm->playGnapMoan1(_vm->_platX, _vm->_platY); + _vm->playGnapMoan1(_vm->_plat->_pos.x, _vm->_plat->_pos.y); break; case GRAB_CURSOR: _vm->gnapKissPlatypus(0); break; case TALK_CURSOR: - _vm->playGnapBrainPulsating(_vm->_platX, _vm->_platY); + _vm->playGnapBrainPulsating(_vm->_plat->_pos.x, _vm->_plat->_pos.y); _vm->playPlatypusSequence(_vm->getPlatypusSequenceId()); break; case PLAT_CURSOR: @@ -2774,13 +2774,13 @@ void Scene28::run() { } else { switch (_vm->_verbCursor) { case LOOK_CURSOR: - _vm->playGnapMoan1(_vm->_platX, _vm->_platY); + _vm->playGnapMoan1(_vm->_plat->_pos.x, _vm->_plat->_pos.y); break; case GRAB_CURSOR: _vm->gnapKissPlatypus(0); break; case TALK_CURSOR: - _vm->playGnapBrainPulsating(_vm->_platX, _vm->_platY); + _vm->playGnapBrainPulsating(_vm->_plat->_pos.x, _vm->_plat->_pos.y); _vm->playPlatypusSequence(_vm->getPlatypusSequenceId()); break; case PLAT_CURSOR: @@ -3165,13 +3165,13 @@ void Scene29::run() { } else { switch (_vm->_verbCursor) { case LOOK_CURSOR: - _vm->playGnapMoan1(_vm->_platX, _vm->_platY); + _vm->playGnapMoan1(_vm->_plat->_pos.x, _vm->_plat->_pos.y); break; case GRAB_CURSOR: _vm->gnapKissPlatypus(0); break; case TALK_CURSOR: - _vm->playGnapBrainPulsating(_vm->_platX, _vm->_platY); + _vm->playGnapBrainPulsating(_vm->_plat->_pos.x, _vm->_plat->_pos.y); _vm->playPlatypusSequence(_vm->getPlatypusSequenceId()); break; case PLAT_CURSOR: diff --git a/engines/gnap/scenes/group3.cpp b/engines/gnap/scenes/group3.cpp index adec63a152..0e14ea9e3e 100644 --- a/engines/gnap/scenes/group3.cpp +++ b/engines/gnap/scenes/group3.cpp @@ -94,13 +94,13 @@ void Scene30::run() { } else { switch (_vm->_verbCursor) { case LOOK_CURSOR: - _vm->playGnapMoan1(_vm->_platX, _vm->_platY); + _vm->playGnapMoan1(_vm->_plat->_pos.x, _vm->_plat->_pos.y); break; case GRAB_CURSOR: _vm->gnapKissPlatypus(0); break; case TALK_CURSOR: - _vm->playGnapBrainPulsating(_vm->_platX, _vm->_platY); + _vm->playGnapBrainPulsating(_vm->_plat->_pos.x, _vm->_plat->_pos.y); _vm->playPlatypusSequence(_vm->getPlatypusSequenceId()); break; case PLAT_CURSOR: @@ -349,13 +349,13 @@ void Scene31::run() { } else { switch (_vm->_verbCursor) { case LOOK_CURSOR: - _vm->playGnapMoan1(_vm->_platX, _vm->_platY); + _vm->playGnapMoan1(_vm->_plat->_pos.x, _vm->_plat->_pos.y); break; case GRAB_CURSOR: _vm->gnapKissPlatypus(0); break; case TALK_CURSOR: - _vm->playGnapBrainPulsating(_vm->_platX, _vm->_platY); + _vm->playGnapBrainPulsating(_vm->_plat->_pos.x, _vm->_plat->_pos.y); _vm->playPlatypusSequence(_vm->getPlatypusSequenceId()); break; case PLAT_CURSOR: @@ -694,21 +694,21 @@ void Scene32::run() { case kHS32Platypus: if (_vm->_gnapActionStatus < 0) { if (_vm->_grabCursorSpriteIndex >= 0) { - _vm->playGnapImpossible(_vm->_platX, _vm->_platY); + _vm->playGnapImpossible(_vm->_plat->_pos.x, _vm->_plat->_pos.y); } else { switch (_vm->_verbCursor) { case LOOK_CURSOR: - _vm->playGnapMoan1(_vm->_platX, _vm->_platY); + _vm->playGnapMoan1(_vm->_plat->_pos.x, _vm->_plat->_pos.y); break; case GRAB_CURSOR: _vm->gnapKissPlatypus(0); break; case TALK_CURSOR: - _vm->playGnapBrainPulsating(_vm->_platX, _vm->_platY); + _vm->playGnapBrainPulsating(_vm->_plat->_pos.x, _vm->_plat->_pos.y); _vm->playPlatypusSequence(_vm->getPlatypusSequenceId()); break; case PLAT_CURSOR: - _vm->playGnapImpossible(_vm->_platX, _vm->_platY); + _vm->playGnapImpossible(_vm->_plat->_pos.x, _vm->_plat->_pos.y); break; } } @@ -870,21 +870,21 @@ void Scene33::run() { case kHS33Platypus: if (_vm->_gnapActionStatus < 0) { if (_vm->_grabCursorSpriteIndex >= 0) { - _vm->playGnapImpossible(_vm->_platX, _vm->_platY); + _vm->playGnapImpossible(_vm->_plat->_pos.x, _vm->_plat->_pos.y); } else { switch (_vm->_verbCursor) { case LOOK_CURSOR: - _vm->playGnapMoan1(_vm->_platX, _vm->_platY); + _vm->playGnapMoan1(_vm->_plat->_pos.x, _vm->_plat->_pos.y); break; case GRAB_CURSOR: _vm->gnapKissPlatypus(0); break; case TALK_CURSOR: - _vm->playGnapBrainPulsating(_vm->_platX, _vm->_platY); + _vm->playGnapBrainPulsating(_vm->_plat->_pos.x, _vm->_plat->_pos.y); _vm->playPlatypusSequence(_vm->getPlatypusSequenceId()); break; case PLAT_CURSOR: - _vm->playGnapImpossible(_vm->_platX, _vm->_platY); + _vm->playGnapImpossible(_vm->_plat->_pos.x, _vm->_plat->_pos.y); break; } } @@ -1147,21 +1147,21 @@ void Scene38::run() { if (_vm->_gnapActionStatus == kAS38HoldingHuntingTrophy) { _vm->_gnapActionStatus = kAS38ReleaseHuntingTrophy; } else if (_vm->_grabCursorSpriteIndex >= 0) { - _vm->playGnapImpossible(_vm->_platX, _vm->_platY); + _vm->playGnapImpossible(_vm->_plat->_pos.x, _vm->_plat->_pos.y); } else { switch (_vm->_verbCursor) { case LOOK_CURSOR: - _vm->playGnapMoan1(_vm->_platX, _vm->_platY); + _vm->playGnapMoan1(_vm->_plat->_pos.x, _vm->_plat->_pos.y); break; case GRAB_CURSOR: _vm->gnapKissPlatypus(0); break; case TALK_CURSOR: - _vm->playGnapBrainPulsating(_vm->_platX, _vm->_platY); + _vm->playGnapBrainPulsating(_vm->_plat->_pos.x, _vm->_plat->_pos.y); _vm->playPlatypusSequence(_vm->getPlatypusSequenceId()); break; case PLAT_CURSOR: - _vm->playGnapImpossible(_vm->_platX, _vm->_platY); + _vm->playGnapImpossible(_vm->_plat->_pos.x, _vm->_plat->_pos.y); break; } } @@ -1351,7 +1351,7 @@ void Scene38::updateAnimations() { _vm->_gnapSequenceDatNum = 0; gameSys.setAnimation(0x9F, _vm->_gnapId, 0); _vm->_gnapActionStatus = kAS38HoldingHuntingTrophy; - if (_vm->_platypusFacing != kDirNone) + if (_vm->_plat->_idleFacing != kDirNone) _vm->playPlatypusSequence(0x107D5); else _vm->playPlatypusSequence(0x107D4); @@ -1453,21 +1453,21 @@ void Scene39::run() { case kHS39Platypus: if (_vm->_gnapActionStatus < 0) { if (_vm->_grabCursorSpriteIndex >= 0) { - _vm->playGnapImpossible(_vm->_platX, _vm->_platY); + _vm->playGnapImpossible(_vm->_plat->_pos.x, _vm->_plat->_pos.y); } else { switch (_vm->_verbCursor) { case LOOK_CURSOR: - _vm->playGnapMoan1(_vm->_platX, _vm->_platY); + _vm->playGnapMoan1(_vm->_plat->_pos.x, _vm->_plat->_pos.y); break; case GRAB_CURSOR: _vm->gnapKissPlatypus(0); break; case TALK_CURSOR: - _vm->playGnapBrainPulsating(_vm->_platX, _vm->_platY); + _vm->playGnapBrainPulsating(_vm->_plat->_pos.x, _vm->_plat->_pos.y); _vm->playPlatypusSequence(_vm->getPlatypusSequenceId()); break; case PLAT_CURSOR: - _vm->playGnapImpossible(_vm->_platX, _vm->_platY); + _vm->playGnapImpossible(_vm->_plat->_pos.x, _vm->_plat->_pos.y); break; } } diff --git a/engines/gnap/scenes/group4.cpp b/engines/gnap/scenes/group4.cpp index 008246aa9e..861283af34 100644 --- a/engines/gnap/scenes/group4.cpp +++ b/engines/gnap/scenes/group4.cpp @@ -76,21 +76,21 @@ void Scene40::run() { case kHS40Platypus: if (_vm->_gnapActionStatus < 0) { if (_vm->_grabCursorSpriteIndex >= 0) { - _vm->playGnapImpossible(_vm->_platX, _vm->_platY); + _vm->playGnapImpossible(_vm->_plat->_pos.x, _vm->_plat->_pos.y); } else { switch (_vm->_verbCursor) { case LOOK_CURSOR: - _vm->playGnapMoan1(_vm->_platX, _vm->_platY); + _vm->playGnapMoan1(_vm->_plat->_pos.x, _vm->_plat->_pos.y); break; case GRAB_CURSOR: _vm->gnapKissPlatypus(0); break; case TALK_CURSOR: - _vm->playGnapBrainPulsating(_vm->_platX, _vm->_platY); + _vm->playGnapBrainPulsating(_vm->_plat->_pos.x, _vm->_plat->_pos.y); _vm->playPlatypusSequence(_vm->getPlatypusSequenceId()); break; case PLAT_CURSOR: - _vm->playGnapImpossible(_vm->_platX, _vm->_platY); + _vm->playGnapImpossible(_vm->_plat->_pos.x, _vm->_plat->_pos.y); break; } } @@ -351,21 +351,21 @@ void Scene41::run() { case kHS41Platypus: if (_vm->_gnapActionStatus < 0) { if (_vm->_grabCursorSpriteIndex >= 0) { - _vm->playGnapImpossible(_vm->_platX, _vm->_platY); + _vm->playGnapImpossible(_vm->_plat->_pos.x, _vm->_plat->_pos.y); } else { switch (_vm->_verbCursor) { case LOOK_CURSOR: - _vm->playGnapMoan1(_vm->_platX, _vm->_platY); + _vm->playGnapMoan1(_vm->_plat->_pos.x, _vm->_plat->_pos.y); break; case GRAB_CURSOR: _vm->gnapKissPlatypus(0); break; case TALK_CURSOR: - _vm->playGnapBrainPulsating(_vm->_platX, _vm->_platY); + _vm->playGnapBrainPulsating(_vm->_plat->_pos.x, _vm->_plat->_pos.y); _vm->playPlatypusSequence(_vm->getPlatypusSequenceId()); break; case PLAT_CURSOR: - _vm->playGnapImpossible(_vm->_platX, _vm->_platY); + _vm->playGnapImpossible(_vm->_plat->_pos.x, _vm->_plat->_pos.y); break; } } @@ -863,21 +863,21 @@ void Scene42::run() { case kHS42Platypus: if (_vm->_gnapActionStatus < 0) { if (_vm->_grabCursorSpriteIndex >= 0) { - _vm->playGnapImpossible(_vm->_platX, _vm->_platY); + _vm->playGnapImpossible(_vm->_plat->_pos.x, _vm->_plat->_pos.y); } else { switch (_vm->_verbCursor) { case LOOK_CURSOR: - _vm->playGnapMoan1(_vm->_platX, _vm->_platY); + _vm->playGnapMoan1(_vm->_plat->_pos.x, _vm->_plat->_pos.y); break; case GRAB_CURSOR: _vm->gnapKissPlatypus(0); break; case TALK_CURSOR: - _vm->playGnapBrainPulsating(_vm->_platX, _vm->_platY); + _vm->playGnapBrainPulsating(_vm->_plat->_pos.x, _vm->_plat->_pos.y); _vm->playPlatypusSequence(_vm->getPlatypusSequenceId()); break; case PLAT_CURSOR: - _vm->playGnapImpossible(_vm->_platX, _vm->_platY); + _vm->playGnapImpossible(_vm->_plat->_pos.x, _vm->_plat->_pos.y); break; } } @@ -888,7 +888,7 @@ void Scene42::run() { _vm->_isLeavingScene = true; _vm->gnapWalkTo(_vm->_gnap->_pos.x, _vm->_hotspotsWalkPos[kHS42ExitUfoParty].y, 0, 0x107AE, 1); _vm->_gnapActionStatus = kAS42LeaveScene; - _vm->platypusWalkTo(_vm->_platX, _vm->_hotspotsWalkPos[kHS42ExitUfoParty].y, -1, 0x107C7, 1); + _vm->platypusWalkTo(_vm->_plat->_pos.x, _vm->_hotspotsWalkPos[kHS42ExitUfoParty].y, -1, 0x107C7, 1); _vm->_newSceneNum = 40; break; @@ -912,8 +912,8 @@ void Scene42::run() { if (_vm->_grabCursorSpriteIndex == kItemDiceQuarterHole) { _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS42BBQVendor].x, _vm->_hotspotsWalkPos[kHS42BBQVendor].y, 0, 0x107BB, 1); _vm->_gnapActionStatus = kAS42UseQuarterWithBBQVendor; - if (_vm->_platY < 9) - _vm->platypusWalkTo(_vm->_platX, 9, -1, -1, 1); + if (_vm->_plat->_pos.y < 9) + _vm->platypusWalkTo(_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 { @@ -1321,21 +1321,21 @@ void Scene43::run() { case kHS43Platypus: if (_vm->_gnapActionStatus < 0) { if (_vm->_grabCursorSpriteIndex >= 0) { - _vm->playGnapImpossible(_vm->_platX, _vm->_platY); + _vm->playGnapImpossible(_vm->_plat->_pos.x, _vm->_plat->_pos.y); } else { switch (_vm->_verbCursor) { case LOOK_CURSOR: - _vm->playGnapMoan1(_vm->_platX, _vm->_platY); + _vm->playGnapMoan1(_vm->_plat->_pos.x, _vm->_plat->_pos.y); break; case GRAB_CURSOR: _vm->gnapKissPlatypus(0); break; case TALK_CURSOR: - _vm->playGnapBrainPulsating(_vm->_platX, _vm->_platY); + _vm->playGnapBrainPulsating(_vm->_plat->_pos.x, _vm->_plat->_pos.y); _vm->playPlatypusSequence(_vm->getPlatypusSequenceId()); break; case PLAT_CURSOR: - _vm->playGnapImpossible(_vm->_platX, _vm->_platY); + _vm->playGnapImpossible(_vm->_plat->_pos.x, _vm->_plat->_pos.y); break; } } @@ -1701,10 +1701,9 @@ void Scene44::run() { } else if (!_vm->isFlag(kGFUnk13)) { _vm->_timers[0] = 50; _vm->_timers[1] = 20; - _vm->_platX = 5; - _vm->_platY = 8; + _vm->_plat->_pos = Common::Point(5, 8); _vm->_platypusSequenceId = 0xFD; - _vm->_platypusFacing = kDirNone; + _vm->_plat->_idleFacing = kDirNone; _vm->_platypusId = 160; _vm->_platypusSequenceDatNum = 0; gameSys.insertSequence(0xFD, 160, 0, 0, kSeqNone, 0, 0, 0); @@ -1770,21 +1769,21 @@ void Scene44::run() { case kHS44Platypus: if (_vm->_gnapActionStatus < 0) { if (_vm->_grabCursorSpriteIndex >= 0) { - _vm->playGnapImpossible(_vm->_platX, _vm->_platY); + _vm->playGnapImpossible(_vm->_plat->_pos.x, _vm->_plat->_pos.y); } else { switch (_vm->_verbCursor) { case LOOK_CURSOR: - _vm->playGnapMoan1(_vm->_platX, _vm->_platY); + _vm->playGnapMoan1(_vm->_plat->_pos.x, _vm->_plat->_pos.y); break; case GRAB_CURSOR: _vm->gnapKissPlatypus(0); break; case TALK_CURSOR: - _vm->playGnapBrainPulsating(_vm->_platX, _vm->_platY); + _vm->playGnapBrainPulsating(_vm->_plat->_pos.x, _vm->_plat->_pos.y); _vm->playPlatypusSequence(_vm->getPlatypusSequenceId()); break; case PLAT_CURSOR: - _vm->playGnapImpossible(_vm->_platX, _vm->_platY); + _vm->playGnapImpossible(_vm->_plat->_pos.x, _vm->_plat->_pos.y); break; } } @@ -1802,7 +1801,7 @@ void Scene44::run() { _vm->_isLeavingScene = true; _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS44ExitUfo].x, _vm->_gnap->_pos.y, 0, 0x107AF, 1); _vm->_gnapActionStatus = 0; - _vm->platypusWalkTo(_vm->_hotspotsWalkPos[kHS44ExitUfo].x, _vm->_platY, -1, 0x107CF, 1); + _vm->platypusWalkTo(_vm->_hotspotsWalkPos[kHS44ExitUfo].x, _vm->_plat->_pos.y, -1, 0x107CF, 1); _vm->_newSceneNum = 43; break; @@ -2259,11 +2258,11 @@ void Scene45::run() { case kHS45Platypus: if (_vm->_gnapActionStatus < 0) { if (_vm->_grabCursorSpriteIndex >= 0) { - _vm->playGnapImpossible(_vm->_platX, _vm->_platY); + _vm->playGnapImpossible(_vm->_plat->_pos.x, _vm->_plat->_pos.y); } else { switch (_vm->_verbCursor) { case LOOK_CURSOR: - _vm->playGnapMoan1(_vm->_platX, _vm->_platY); + _vm->playGnapMoan1(_vm->_plat->_pos.x, _vm->_plat->_pos.y); break; case GRAB_CURSOR: _vm->gnapKissPlatypus(0); @@ -2271,11 +2270,11 @@ void Scene45::run() { gameSys.setAnimation(_vm->_platypusSequenceId, _vm->_platypusId, 1); break; case TALK_CURSOR: - _vm->playGnapBrainPulsating(_vm->_platX, _vm->_platY); + _vm->playGnapBrainPulsating(_vm->_plat->_pos.x, _vm->_plat->_pos.y); _vm->playPlatypusSequence(_vm->getPlatypusSequenceId()); break; case PLAT_CURSOR: - _vm->playGnapImpossible(_vm->_platX, _vm->_platY); + _vm->playGnapImpossible(_vm->_plat->_pos.x, _vm->_plat->_pos.y); break; } } @@ -2296,7 +2295,7 @@ void Scene45::run() { _vm->_isLeavingScene = true; _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS45ExitShoe].x, _vm->_gnap->_pos.y, 0, 0x107AF, 1); _vm->_gnapActionStatus = 0; - _vm->platypusWalkTo(_vm->_hotspotsWalkPos[kHS45ExitShoe].x, _vm->_platY, -1, 0x107CF, 1); + _vm->platypusWalkTo(_vm->_hotspotsWalkPos[kHS45ExitShoe].x, _vm->_plat->_pos.y, -1, 0x107CF, 1); _vm->_newSceneNum = 46; } break; @@ -2306,7 +2305,7 @@ void Scene45::run() { _vm->_isLeavingScene = true; _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS45ExitRight].x, _vm->_gnap->_pos.y, 0, 0x107AB, 1); _vm->_gnapActionStatus = 0; - _vm->platypusWalkTo(_vm->_hotspotsWalkPos[kHS45ExitRight].x, _vm->_platY, -1, 0x107CD, 1); + _vm->platypusWalkTo(_vm->_hotspotsWalkPos[kHS45ExitRight].x, _vm->_plat->_pos.y, -1, 0x107CD, 1); _vm->_newSceneNum = 41; } break; @@ -2584,21 +2583,21 @@ void Scene46::run() { case kHS46Platypus: if (_vm->_gnapActionStatus < 0) { if (_vm->_grabCursorSpriteIndex >= 0) { - _vm->playGnapImpossible(_vm->_platX, _vm->_platY); + _vm->playGnapImpossible(_vm->_plat->_pos.x, _vm->_plat->_pos.y); } else { switch (_vm->_verbCursor) { case LOOK_CURSOR: - _vm->playGnapMoan1(_vm->_platX, _vm->_platY); + _vm->playGnapMoan1(_vm->_plat->_pos.x, _vm->_plat->_pos.y); break; case GRAB_CURSOR: _vm->gnapKissPlatypus(0); break; case TALK_CURSOR: - _vm->playGnapBrainPulsating(_vm->_platX, _vm->_platY); + _vm->playGnapBrainPulsating(_vm->_plat->_pos.x, _vm->_plat->_pos.y); _vm->playPlatypusSequence(_vm->getPlatypusSequenceId()); break; case PLAT_CURSOR: - _vm->playGnapImpossible(_vm->_platX, _vm->_platY); + _vm->playGnapImpossible(_vm->_plat->_pos.x, _vm->_plat->_pos.y); break; } } @@ -2658,7 +2657,7 @@ void Scene46::run() { _vm->_isLeavingScene = true; _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS46ExitKissinBooth].x, _vm->_gnap->_pos.y, 0, 0x107AF, 1); _vm->_gnapActionStatus = 0; - _vm->platypusWalkTo(_vm->_hotspotsWalkPos[kHS46ExitKissinBooth].x, _vm->_platY, -1, 0x107CF, 1); + _vm->platypusWalkTo(_vm->_hotspotsWalkPos[kHS46ExitKissinBooth].x, _vm->_plat->_pos.y, -1, 0x107CF, 1); _vm->_newSceneNum = 44; break; @@ -2666,7 +2665,7 @@ void Scene46::run() { _vm->_isLeavingScene = true; _vm->gnapWalkTo(_vm->_hotspotsWalkPos[kHS46ExitDisco].x, _vm->_gnap->_pos.y, 0, 0x107AB, 1); _vm->_gnapActionStatus = 0; - _vm->platypusWalkTo(_vm->_hotspotsWalkPos[kHS46ExitDisco].x, _vm->_platY, -1, 0x107CD, 1); + _vm->platypusWalkTo(_vm->_hotspotsWalkPos[kHS46ExitDisco].x, _vm->_plat->_pos.y, -1, 0x107CD, 1); _vm->_newSceneNum = 45; break; |