diff options
author | Strangerke | 2016-05-05 10:28:58 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2016-05-10 12:14:50 +0200 |
commit | 00c544f9f815be3121b900ff16572676ee6c4bf5 (patch) | |
tree | c90d2fb5c721d8a7872eacb539812558bfe4698c | |
parent | 579ecdabd19f0a5f6837224eafebf6a8ac74c0ad (diff) | |
download | scummvm-rg350-00c544f9f815be3121b900ff16572676ee6c4bf5.tar.gz scummvm-rg350-00c544f9f815be3121b900ff16572676ee6c4bf5.tar.bz2 scummvm-rg350-00c544f9f815be3121b900ff16572676ee6c4bf5.zip |
GNAP: More refactoring related to characters (WIP)
-rw-r--r-- | engines/gnap/character.cpp | 234 | ||||
-rw-r--r-- | engines/gnap/character.h | 5 | ||||
-rw-r--r-- | engines/gnap/gnap.cpp | 81 | ||||
-rw-r--r-- | engines/gnap/gnap.h | 2 | ||||
-rw-r--r-- | engines/gnap/scenes/group0.cpp | 30 | ||||
-rw-r--r-- | engines/gnap/scenes/group1.cpp | 22 | ||||
-rw-r--r-- | engines/gnap/scenes/group2.cpp | 20 | ||||
-rw-r--r-- | engines/gnap/scenes/group3.cpp | 16 | ||||
-rw-r--r-- | engines/gnap/scenes/group4.cpp | 22 |
9 files changed, 217 insertions, 215 deletions
diff --git a/engines/gnap/character.cpp b/engines/gnap/character.cpp index 8b6ea803c0..c8970a41f4 100644 --- a/engines/gnap/character.cpp +++ b/engines/gnap/character.cpp @@ -38,8 +38,8 @@ Character::Character(GnapEngine *vm) : _vm(vm) { Character::~Character() {} PlayerGnap::PlayerGnap(GnapEngine * vm) : Character(vm) { - _gnapBrainPulseNum = 0; - _gnapBrainPulseRndValue = 0; + _brainPulseNum = 0; + _brainPulseRndValue = 0; } int PlayerGnap::getSequenceId(int kind, int gridX, int gridY) { @@ -67,18 +67,18 @@ int PlayerGnap::getSequenceId(int kind, int gridX, int gridY) { } } else { switch (_idleFacing) { - case kDirBottomRight: - sequenceId = 0x839; - break; - case kDirBottomLeft: - sequenceId = 0x83B; - break; - case kDirUpRight: - sequenceId = 0x83D; - break; - default: - sequenceId = 0x83F; - break; + case kDirBottomRight: + sequenceId = 0x839; + break; + case kDirBottomLeft: + sequenceId = 0x83B; + break; + case kDirUpRight: + sequenceId = 0x83D; + break; + default: + sequenceId = 0x83F; + break; } } break; @@ -104,18 +104,18 @@ int PlayerGnap::getSequenceId(int kind, int gridX, int gridY) { } } else { switch (_idleFacing) { - case kDirBottomRight: - sequenceId = 0x826; - break; - case kDirBottomLeft: - sequenceId = 0x827; - break; - case kDirUpRight: - sequenceId = 0x828; - break; - default: - sequenceId = 0x829; - break; + case kDirBottomRight: + sequenceId = 0x826; + break; + case kDirBottomLeft: + sequenceId = 0x827; + break; + case kDirUpRight: + sequenceId = 0x828; + break; + default: + sequenceId = 0x829; + break; } } break; @@ -141,22 +141,22 @@ int PlayerGnap::getSequenceId(int kind, int gridX, int gridY) { } } else { switch (_idleFacing) { - case kDirBottomRight: - sequenceId = 0x833; - _idleFacing = kDirBottomRight; - break; - case kDirBottomLeft: - sequenceId = 0x834; - _idleFacing = kDirBottomLeft; - break; - case kDirUpRight: - sequenceId = 0x885; - _idleFacing = kDirUpRight; - break; - default: - sequenceId = 0x834; - _idleFacing = kDirBottomLeft; - break; + case kDirBottomRight: + sequenceId = 0x833; + _idleFacing = kDirBottomRight; + break; + case kDirBottomLeft: + sequenceId = 0x834; + _idleFacing = kDirBottomLeft; + break; + case kDirUpRight: + sequenceId = 0x885; + _idleFacing = kDirUpRight; + break; + default: + sequenceId = 0x834; + _idleFacing = kDirBottomLeft; + break; } } break; @@ -182,56 +182,56 @@ int PlayerGnap::getSequenceId(int kind, int gridX, int gridY) { } } else { switch (_idleFacing) { - case kDirBottomRight: - sequenceId = 0x7B9; - break; - case kDirBottomLeft: - sequenceId = 0x7BA; - break; - case kDirUpRight: - sequenceId = 0x7BB; - break; - default: - sequenceId = 0x7BC; - break; + case kDirBottomRight: + sequenceId = 0x7B9; + break; + case kDirBottomLeft: + sequenceId = 0x7BA; + break; + case kDirUpRight: + sequenceId = 0x7BB; + break; + default: + sequenceId = 0x7BC; + break; } } break; case gskBrainPulsating: - _gnapBrainPulseNum = (_gnapBrainPulseNum + 1) & 1; + _brainPulseNum = (_brainPulseNum + 1) & 1; if (gridX > 0 && gridY > 0) { if (_pos.y > gridY) { if (_pos.x > gridX) { - sequenceId = _gnapBrainPulseRndValue + _gnapBrainPulseNum + 0x812; + sequenceId = _brainPulseRndValue + _brainPulseNum + 0x812; _idleFacing = kDirUpLeft; } else { - sequenceId = _gnapBrainPulseRndValue + _gnapBrainPulseNum + 0x7FE; + sequenceId = _brainPulseRndValue + _brainPulseNum + 0x7FE; _idleFacing = kDirUpRight; } } else { if (_pos.x > gridX) { - sequenceId = _gnapBrainPulseRndValue + _gnapBrainPulseNum + 0x7D6; + sequenceId = _brainPulseRndValue + _brainPulseNum + 0x7D6; _idleFacing = kDirBottomLeft; } else { - sequenceId = _gnapBrainPulseRndValue + _gnapBrainPulseNum + 0x7EA; + sequenceId = _brainPulseRndValue + _brainPulseNum + 0x7EA; _idleFacing = kDirBottomRight; } } } else { switch (_idleFacing) { - case kDirBottomRight: - sequenceId = _gnapBrainPulseRndValue + _gnapBrainPulseNum + 0x7EA; - break; - case kDirBottomLeft: - sequenceId = _gnapBrainPulseRndValue + _gnapBrainPulseNum + 0x7D6; - break; - case kDirUpRight: - sequenceId = _gnapBrainPulseRndValue + _gnapBrainPulseNum + 0x7FE; - break; - default: - sequenceId = _gnapBrainPulseRndValue + _gnapBrainPulseNum + 0x812; - break; + case kDirBottomRight: + sequenceId = _brainPulseRndValue + _brainPulseNum + 0x7EA; + break; + case kDirBottomLeft: + sequenceId = _brainPulseRndValue + _brainPulseNum + 0x7D6; + break; + case kDirUpRight: + sequenceId = _brainPulseRndValue + _brainPulseNum + 0x7FE; + break; + default: + sequenceId = _brainPulseRndValue + _brainPulseNum + 0x812; + break; } } break; @@ -291,42 +291,42 @@ int PlayerGnap::getSequenceId(int kind, int gridX, int gridY) { } } else { switch (_idleFacing) { - case kDirBottomRight: - sequenceId = 0x7A7; - break; - case kDirBottomLeft: - sequenceId = 0x82E; - break; - case kDirUpLeft: - sequenceId = 0x830; - break; - case kDirUpRight: - sequenceId = 0x82F; - break; - case kDirNone: - case kDirUnk4: - break; + case kDirBottomRight: + sequenceId = 0x7A7; + break; + case kDirBottomLeft: + sequenceId = 0x82E; + break; + case kDirUpLeft: + sequenceId = 0x830; + break; + case kDirUpRight: + sequenceId = 0x82F; + break; + case kDirNone: + case kDirUnk4: + break; } } break; case gskUseDevice: switch (_idleFacing) { - case kDirBottomRight: - sequenceId = 0x83A; - break; - case kDirBottomLeft: - sequenceId = 0x83C; - break; - case kDirUpLeft: - sequenceId = 0x840; - break; - case kDirUpRight: - sequenceId = 0x83E; - break; - case kDirNone: - case kDirUnk4: - break; + case kDirBottomRight: + sequenceId = 0x83A; + break; + case kDirBottomLeft: + sequenceId = 0x83C; + break; + case kDirUpLeft: + sequenceId = 0x840; + break; + case kDirUpRight: + sequenceId = 0x83E; + break; + case kDirNone: + case kDirUnk4: + break; } break; @@ -407,7 +407,7 @@ void PlayerGnap::useJointOnPlatypus() { _vm->_plat->_sequenceDatNum = 1; _vm->_plat->_sequenceId = 0x876; _vm->_plat->_idleFacing = kDirNone; - _vm->playGnapSequence(0x107B5); + _vm->_gnap->playSequence(0x107B5); _vm->gnapWalkStep(); while (_vm->_gameSys->getAnimationStatus(0) != 2) { _vm->updateMouseCursor(); @@ -416,7 +416,7 @@ void PlayerGnap::useJointOnPlatypus() { _vm->_gameSys->setAnimation(0, 0, 0); _actionStatus = -1; } else { - _vm->playGnapSequence(getSequenceId(gskScratchingHead, _vm->_plat->_pos.x, _vm->_plat->_pos.y) | 0x10000); + _vm->_gnap->playSequence(getSequenceId(gskScratchingHead, _vm->_plat->_pos.x, _vm->_plat->_pos.y) | 0x10000); } } @@ -436,7 +436,7 @@ void PlayerGnap::kissPlatypus(int callback) { _vm->_plat->_sequenceDatNum = 1; _vm->_plat->_sequenceId = 0x7CB; _vm->_plat->_idleFacing = kDirNone; - _vm->playGnapSequence(0x107B5); + _vm->_gnap->playSequence(0x107B5); while (_vm->_gameSys->getAnimationStatus(0) != 2) { _vm->updateMouseCursor(); _vm->doCallback(callback); @@ -445,12 +445,12 @@ void PlayerGnap::kissPlatypus(int callback) { _vm->_gameSys->setAnimation(0, 0, 0); _actionStatus = -1; } else { - _vm->playGnapSequence(getSequenceId(gskScratchingHead, _vm->_plat->_pos.x, _vm->_plat->_pos.y) | 0x10000); + _vm->_gnap->playSequence(getSequenceId(gskScratchingHead, _vm->_plat->_pos.x, _vm->_plat->_pos.y) | 0x10000); } } void PlayerGnap::useDeviceOnPlatypus() { - _vm->playGnapSequence(makeRid(1, getSequenceId(gskPullOutDevice, _vm->_plat->_pos.x, _vm->_plat->_pos.y))); + _vm->_gnap->playSequence(makeRid(1, getSequenceId(gskPullOutDevice, _vm->_plat->_pos.x, _vm->_plat->_pos.y))); if (_vm->_plat->_idleFacing != kDirNone) { _vm->_gameSys->insertSequence(makeRid(1, 0x7D5), _vm->_plat->_id, @@ -475,7 +475,18 @@ void PlayerGnap::useDeviceOnPlatypus() { } void PlayerGnap::initBrainPulseRndValue() { - _gnapBrainPulseRndValue = 2 * _vm->getRandom(10); + _brainPulseRndValue = 2 * _vm->getRandom(10); +} + +void PlayerGnap::playSequence(int sequenceId) { + _vm->_timers[2] = _vm->getRandom(30) + 20; + _vm->_timers[3] = 300; + _vm->gnapIdle(); + _vm->_gameSys->insertSequence(sequenceId, _id, + makeRid(_sequenceDatNum, _sequenceId), _id, + kSeqScale | kSeqSyncWait, 0, 75 * _pos.x - _vm->_gnapGridX, 48 * _pos.y - _vm->_gnapGridY); + _sequenceId = ridToEntryIndex(sequenceId); + _sequenceDatNum = ridToDatIndex(sequenceId); } /************************************************************************************************/ @@ -495,4 +506,13 @@ int PlayerPlat::getSequenceId(int kind, int gridX, int gridY) { return sequenceId | 0x10000; } + +void PlayerPlat::playSequence(int sequenceId) { + _vm->_gameSys->insertSequence(sequenceId, _id, + makeRid(_sequenceDatNum, _sequenceId), _id, + kSeqScale | kSeqSyncWait, 0, 75 * _pos.x - _vm->_platGridX, 48 * _pos.y - _vm->_platGridY); + _sequenceId = ridToEntryIndex(sequenceId); + _sequenceDatNum = ridToDatIndex(sequenceId); +} + } // End of namespace Gnap diff --git a/engines/gnap/character.h b/engines/gnap/character.h index 1a05548bae..faf1d775a2 100644 --- a/engines/gnap/character.h +++ b/engines/gnap/character.h @@ -42,6 +42,7 @@ public: ~Character(); virtual int getSequenceId(int kind, int gridX, int gridY) = 0; + virtual void playSequence(int sequenceId) = 0; Common::Point _pos; Facing _idleFacing; @@ -58,19 +59,21 @@ class PlayerGnap : public Character { public: PlayerGnap(GnapEngine *vm); virtual int getSequenceId(int kind, int gridX, int gridY); + virtual void playSequence(int sequenceId); void initBrainPulseRndValue(); void kissPlatypus(int callback); void useDeviceOnPlatypus(); void useJointOnPlatypus(); - int _gnapBrainPulseNum, _gnapBrainPulseRndValue; + int _brainPulseNum, _brainPulseRndValue; }; class PlayerPlat : public Character { public: PlayerPlat(GnapEngine *vm); virtual int getSequenceId(int kind = 0, int gridX = 0, int gridY = 0); + virtual void playSequence(int sequenceId); }; } // End of namespace Gnap diff --git a/engines/gnap/gnap.cpp b/engines/gnap/gnap.cpp index c020d752b6..818ac89c4d 100644 --- a/engines/gnap/gnap.cpp +++ b/engines/gnap/gnap.cpp @@ -1146,55 +1146,44 @@ void GnapEngine::gnapActionIdle(int sequenceId) { } } -void GnapEngine::playGnapSequence(int sequenceId) { - _timers[2] = getRandom(30) + 20; - _timers[3] = 300; - gnapIdle(); - _gameSys->insertSequence(sequenceId, _gnap->_id, - makeRid(_gnap->_sequenceDatNum, _gnap->_sequenceId), _gnap->_id, - kSeqScale | kSeqSyncWait, 0, 75 * _gnap->_pos.x - _gnapGridX, 48 * _gnap->_pos.y - _gnapGridY); - _gnap->_sequenceId = ridToEntryIndex(sequenceId); - _gnap->_sequenceDatNum = ridToDatIndex(sequenceId); -} - void GnapEngine::playGnapImpossible(int gridX, int gridY) { - playGnapSequence(_gnap->getSequenceId(gskImpossible, gridX, gridY) | 0x10000); + _gnap->playSequence(_gnap->getSequenceId(gskImpossible, gridX, gridY) | 0x10000); } void GnapEngine::playGnapScratchingHead(int gridX, int gridY) { - playGnapSequence(_gnap->getSequenceId(gskScratchingHead, gridX, gridY) | 0x10000); + _gnap->playSequence(_gnap->getSequenceId(gskScratchingHead, gridX, gridY) | 0x10000); } void GnapEngine::playGnapMoan1(int gridX, int gridY) { - playGnapSequence(_gnap->getSequenceId(gskMoan1, gridX, gridY) | 0x10000); + _gnap->playSequence(_gnap->getSequenceId(gskMoan1, gridX, gridY) | 0x10000); } void GnapEngine::playGnapMoan2(int gridX, int gridY) { - playGnapSequence(_gnap->getSequenceId(gskMoan2, gridX, gridY) | 0x10000); + _gnap->playSequence(_gnap->getSequenceId(gskMoan2, gridX, gridY) | 0x10000); } void GnapEngine::playGnapBrainPulsating(int gridX, int gridY) { - playGnapSequence(_gnap->getSequenceId(gskBrainPulsating, gridX, gridY) | 0x10000); + _gnap->playSequence(_gnap->getSequenceId(gskBrainPulsating, gridX, gridY) | 0x10000); } void GnapEngine::playGnapPullOutDevice(int gridX, int gridY) { - playGnapSequence(_gnap->getSequenceId(gskPullOutDevice, gridX, gridY) | 0x10000); + _gnap->playSequence(_gnap->getSequenceId(gskPullOutDevice, gridX, gridY) | 0x10000); } void GnapEngine::playGnapPullOutDeviceNonWorking(int gridX, int gridY) { - playGnapSequence(_gnap->getSequenceId(gskPullOutDeviceNonWorking, gridX, gridY) | 0x10000); + _gnap->playSequence(_gnap->getSequenceId(gskPullOutDeviceNonWorking, gridX, gridY) | 0x10000); } void GnapEngine::playGnapUseDevice(int gridX, int gridY) { - playGnapSequence(_gnap->getSequenceId(gskUseDevice, gridX, gridY) | 0x10000); + _gnap->playSequence(_gnap->getSequenceId(gskUseDevice, gridX, gridY) | 0x10000); } void GnapEngine::playGnapIdle(int gridX, int gridY) { - playGnapSequence(_gnap->getSequenceId(gskIdle, gridX, gridY) | 0x10000); + _gnap->playSequence(_gnap->getSequenceId(gskIdle, gridX, gridY) | 0x10000); } void GnapEngine::playGnapShowItem(int itemIndex, int gridLookX, int gridLookY) { - playGnapSequence(getGnapShowSequenceId(itemIndex, gridLookX, gridLookY) | 0x10000); + _gnap->playSequence(getGnapShowSequenceId(itemIndex, gridLookX, gridLookY) | 0x10000); } void GnapEngine::playGnapShowCurrItem(int gridX, int gridY, int gridLookX, int gridLookY) { @@ -1213,23 +1202,23 @@ void GnapEngine::updateGnapIdleSequence() { if (_gnap->_idleFacing == kDirBottomRight) { switch (getRandom(5)) { case 0: - playGnapSequence(0x107A6); + _gnap->playSequence(0x107A6); break; case 1: - playGnapSequence(0x107AA); + _gnap->playSequence(0x107AA); break; case 2: - playGnapSequence(0x10841); + _gnap->playSequence(0x10841); break; default: - playGnapSequence(0x108A2); + _gnap->playSequence(0x108A2); break; } } else if (_gnap->_idleFacing == kDirBottomLeft) { if (getRandom(5) > 2) - playGnapSequence(0x10832); + _gnap->playSequence(0x10832); else - playGnapSequence(0x10842); + _gnap->playSequence(0x10842); } } } else { @@ -1261,9 +1250,9 @@ void GnapEngine::updateGnapIdleSequence2() { _timers[2] = 60; _timers[3] = 300; if (_gnap->_idleFacing == kDirBottomRight) { - playGnapSequence(0x107AA); + _gnap->playSequence(0x107AA); } else if (_gnap->_idleFacing == kDirBottomLeft) { - playGnapSequence(0x10832); + _gnap->playSequence(0x10832); } } } else { @@ -1350,7 +1339,7 @@ bool GnapEngine::gnapPlatypusAction(int gridX, int gridY, int platSequenceId, in _gameSys->setAnimation(0, 0, 0); if (_gnap->_pos == Common::Point(_plat->_pos.x + gridX, _plat->_pos.y + gridY)) { _gameSys->setAnimation(platSequenceId, _plat->_id, 1); - playPlatypusSequence(platSequenceId); + _plat->playSequence(platSequenceId); while (_gameSys->getAnimationStatus(1) != 2) { updateMouseCursor(); doCallback(callback); @@ -1366,7 +1355,7 @@ bool GnapEngine::gnapPlatypusAction(int gridX, int gridY, int platSequenceId, in void GnapEngine::gnapUseDisguiseOnPlatypus() { _gameSys->setAnimation(0x10846, _gnap->_id, 0); - playGnapSequence(0x10846); + _gnap->playSequence(0x10846); while (_gameSys->getAnimationStatus(0) != 2) gameUpdateTick(); _newSceneNum = 47; @@ -1375,14 +1364,6 @@ void GnapEngine::gnapUseDisguiseOnPlatypus() { setFlag(kGFPlatypusDisguised); } -void GnapEngine::playPlatypusSequence(int sequenceId) { - _gameSys->insertSequence(sequenceId, _plat->_id, - makeRid(_plat->_sequenceDatNum, _plat->_sequenceId), _plat->_id, - kSeqScale | kSeqSyncWait, 0, 75 * _plat->_pos.x - _platGridX, 48 * _plat->_pos.y - _platGridY); - _plat->_sequenceId = ridToEntryIndex(sequenceId); - _plat->_sequenceDatNum = ridToDatIndex(sequenceId); -} - void GnapEngine::updatePlatypusIdleSequence() { if (_plat->_actionStatus < 0 && _gnap->_actionStatus < 0) { if (_timers[0] > 0) { @@ -1392,23 +1373,23 @@ void GnapEngine::updatePlatypusIdleSequence() { if (_plat->_idleFacing != kDirNone) { if (rnd != 0 || _plat->_sequenceId != 0x7CA) { if (rnd != 1 || _plat->_sequenceId != 0x7CA) - playPlatypusSequence(0x107CA); + _plat->playSequence(0x107CA); else - playPlatypusSequence(0x10845); + _plat->playSequence(0x10845); } else { - playPlatypusSequence(0x107CC); + _plat->playSequence(0x107CC); } } else if (rnd != 0 || _plat->_sequenceId != 0x7C9) { if (rnd != 1 || _plat->_sequenceId != 0x7C9) { if (rnd != 2 || _plat->_sequenceId != 0x7C9) - playPlatypusSequence(0x107C9); + _plat->playSequence(0x107C9); else - playPlatypusSequence(0x108A4); + _plat->playSequence(0x108A4); } else { - playPlatypusSequence(0x10844); + _plat->playSequence(0x10844); } } else { - playPlatypusSequence(0x107CB); + _plat->playSequence(0x107CB); } } } else { @@ -1428,14 +1409,14 @@ void GnapEngine::updatePlatypusIdleSequence2() { _timers[1] = getRandom(20) + 30; if (_plat->_idleFacing != kDirNone) { if (getRandom(10) >= 2 || _plat->_sequenceId != 0x7CA) - playPlatypusSequence(0x107CA); + _plat->playSequence(0x107CA); else - playPlatypusSequence(0x107CC); + _plat->playSequence(0x107CC); } else { if (getRandom(10) >= 2 || _plat->_sequenceId != 0x7C9) { - playPlatypusSequence(0x107C9); + _plat->playSequence(0x107C9); } else { - playPlatypusSequence(0x107CB); + _plat->playSequence(0x107CB); } } } diff --git a/engines/gnap/gnap.h b/engines/gnap/gnap.h index 4474a2d564..fdf47a2c40 100644 --- a/engines/gnap/gnap.h +++ b/engines/gnap/gnap.h @@ -519,7 +519,6 @@ public: int getGnapShowSequenceId(int index, int gridX, int gridY); void gnapIdle(); void gnapActionIdle(int sequenceId); - void playGnapSequence(int sequenceId); void playGnapImpossible(int gridX, int gridY); void playGnapScratchingHead(int gridX, int gridY); void playGnapMoan1(int gridX, int gridY); @@ -539,7 +538,6 @@ public: void gnapUseDisguiseOnPlatypus(); // Platypus - void playPlatypusSequence(int sequenceId); void updatePlatypusIdleSequence(); void updatePlatypusIdleSequence2(); void initPlatypusPos(int gridX, int gridY, Facing facing); diff --git a/engines/gnap/scenes/group0.cpp b/engines/gnap/scenes/group0.cpp index 419139fc9e..9690d6932f 100644 --- a/engines/gnap/scenes/group0.cpp +++ b/engines/gnap/scenes/group0.cpp @@ -140,7 +140,7 @@ void Scene01::run() { break; case TALK_CURSOR: _vm->playGnapBrainPulsating(_vm->_plat->_pos.x, _vm->_plat->_pos.y); - _vm->playPlatypusSequence(_vm->_plat->getSequenceId()); + _vm->_plat->playSequence(_vm->_plat->getSequenceId()); break; case PLAT_CURSOR: _vm->playGnapImpossible(0, 0); @@ -490,7 +490,7 @@ void Scene02::run() { break; case TALK_CURSOR: _vm->playGnapBrainPulsating(_vm->_plat->_pos.x, _vm->_plat->_pos.y); - _vm->playPlatypusSequence(_vm->_plat->getSequenceId()); + _vm->_plat->playSequence(_vm->_plat->getSequenceId()); break; case PLAT_CURSOR: _vm->playGnapImpossible(0, 0); @@ -955,7 +955,7 @@ void Scene03::run() { break; case TALK_CURSOR: _vm->playGnapBrainPulsating(_vm->_plat->_pos.x, _vm->_plat->_pos.y); - _vm->playPlatypusSequence(_vm->_plat->getSequenceId()); + _vm->_plat->playSequence(_vm->_plat->getSequenceId()); break; case PLAT_CURSOR: _vm->playGnapImpossible(0, 0); @@ -1462,7 +1462,7 @@ void Scene04::run() { break; case TALK_CURSOR: _vm->playGnapBrainPulsating(_vm->_plat->_pos.x, _vm->_plat->_pos.y); - _vm->playPlatypusSequence(_vm->_plat->getSequenceId()); + _vm->_plat->playSequence(_vm->_plat->getSequenceId()); break; case PLAT_CURSOR: _vm->playGnapImpossible(0, 0); @@ -1934,7 +1934,7 @@ void Scene05::run() { break; case TALK_CURSOR: _vm->playGnapBrainPulsating(_vm->_plat->_pos.x, _vm->_plat->_pos.y); - _vm->playPlatypusSequence(_vm->_plat->getSequenceId()); + _vm->_plat->playSequence(_vm->_plat->getSequenceId()); break; case PLAT_CURSOR: _vm->playGnapImpossible(0, 0); @@ -2358,7 +2358,7 @@ void Scene06::run() { break; case TALK_CURSOR: _vm->playGnapBrainPulsating(_vm->_plat->_pos.x, _vm->_plat->_pos.y); - _vm->playPlatypusSequence(_vm->_plat->getSequenceId()); + _vm->_plat->playSequence(_vm->_plat->getSequenceId()); break; case PLAT_CURSOR: _vm->playGnapImpossible(0, 0); @@ -2729,7 +2729,7 @@ void Scene07::run() { break; case TALK_CURSOR: _vm->playGnapBrainPulsating(_vm->_plat->_pos.x, _vm->_plat->_pos.y); - _vm->playPlatypusSequence(_vm->_plat->getSequenceId()); + _vm->_plat->playSequence(_vm->_plat->getSequenceId()); break; case PLAT_CURSOR: break; @@ -2812,22 +2812,22 @@ void Scene07::run() { if (gnapRandomValue != 0 || _vm->_plat->_sequenceId != 0x7CA) { if (gnapRandomValue != 1 || _vm->_plat->_sequenceId != 0x7CA) { if (_vm->_plat->_pos.y == 9) - _vm->playPlatypusSequence(0x107CA); + _vm->_plat->playSequence(0x107CA); } else { - _vm->playPlatypusSequence(0x10845); + _vm->_plat->playSequence(0x10845); } } else { - _vm->playPlatypusSequence(0x107CC); + _vm->_plat->playSequence(0x107CC); } } else if (gnapRandomValue != 0 || _vm->_plat->_sequenceId != 0x7C9) { if (gnapRandomValue != 1 || _vm->_plat->_sequenceId != 0x7C9) { if (_vm->_plat->_pos.y == 9) - _vm->playPlatypusSequence(0x107C9); + _vm->_plat->playSequence(0x107C9); } else { - _vm->playPlatypusSequence(0x10844); + _vm->_plat->playSequence(0x10844); } } else { - _vm->playPlatypusSequence(0x107CB); + _vm->_plat->playSequence(0x107CB); } gameSys.setAnimation(_vm->_plat->_sequenceId | (_vm->_plat->_sequenceDatNum << 16), _vm->_plat->_id, 1); } @@ -3000,7 +3000,7 @@ void Scene08::run() { break; case TALK_CURSOR: _vm->playGnapBrainPulsating(_vm->_plat->_pos.x, _vm->_plat->_pos.y); - _vm->playPlatypusSequence(_vm->_plat->getSequenceId()); + _vm->_plat->playSequence(_vm->_plat->getSequenceId()); break; case PLAT_CURSOR: break; @@ -3429,7 +3429,7 @@ void Scene09::run() { break; case TALK_CURSOR: _vm->playGnapBrainPulsating(_vm->_plat->_pos.x, _vm->_plat->_pos.y); - _vm->playPlatypusSequence(_vm->_plat->getSequenceId()); + _vm->_plat->playSequence(_vm->_plat->getSequenceId()); break; case PLAT_CURSOR: break; diff --git a/engines/gnap/scenes/group1.cpp b/engines/gnap/scenes/group1.cpp index 5cad36d393..cbc1f704ec 100644 --- a/engines/gnap/scenes/group1.cpp +++ b/engines/gnap/scenes/group1.cpp @@ -121,7 +121,7 @@ void Scene10::run() { break; case TALK_CURSOR: _vm->playGnapBrainPulsating(_vm->_plat->_pos.x, _vm->_plat->_pos.y); - _vm->playPlatypusSequence(_vm->_plat->getSequenceId()); + _vm->_plat->playSequence(_vm->_plat->getSequenceId()); break; case PLAT_CURSOR: break; @@ -257,7 +257,7 @@ void Scene10::run() { } else { switch (_vm->_verbCursor) { case LOOK_CURSOR: - _vm->playGnapSequence(_vm->_gnap->getSequenceId(gskDeflect, 10, 5) | 0x10000); + _vm->_gnap->playSequence(_vm->_gnap->getSequenceId(gskDeflect, 10, 5) | 0x10000); break; case GRAB_CURSOR: _vm->gnapActionIdle(0x10C); @@ -602,7 +602,7 @@ void Scene11::run() { break; case TALK_CURSOR: _vm->playGnapBrainPulsating(_vm->_plat->_pos.x, _vm->_plat->_pos.y); - _vm->playPlatypusSequence(_vm->_plat->getSequenceId()); + _vm->_plat->playSequence(_vm->_plat->getSequenceId()); break; case PLAT_CURSOR: break; @@ -671,7 +671,7 @@ void Scene11::run() { } else { switch (_vm->_verbCursor) { case LOOK_CURSOR: - _vm->playGnapSequence(_vm->_gnap->getSequenceId(gskDeflect, 3, 6) | 0x10000); + _vm->_gnap->playSequence(_vm->_gnap->getSequenceId(gskDeflect, 3, 6) | 0x10000); break; case GRAB_CURSOR: _vm->gnapWalkTo(5, 6, 0, 0x107BC, 1); @@ -1021,7 +1021,7 @@ void Scene12::run() { break; case TALK_CURSOR: _vm->playGnapBrainPulsating(_vm->_plat->_pos.x, _vm->_plat->_pos.y); - _vm->playPlatypusSequence(_vm->_plat->getSequenceId()); + _vm->_plat->playSequence(_vm->_plat->getSequenceId()); break; case PLAT_CURSOR: break; @@ -1530,7 +1530,7 @@ void Scene13::run() { break; case TALK_CURSOR: _vm->playGnapBrainPulsating(_vm->_plat->_pos.x, _vm->_plat->_pos.y); - _vm->playPlatypusSequence(_vm->_plat->getSequenceId()); + _vm->_plat->playSequence(_vm->_plat->getSequenceId()); break; case PLAT_CURSOR: break; @@ -1628,7 +1628,7 @@ void Scene13::run() { } else { switch (_vm->_verbCursor) { case LOOK_CURSOR: - _vm->playGnapSequence(_vm->_gnap->getSequenceId(gskDeflect, 9, 6)); + _vm->_gnap->playSequence(_vm->_gnap->getSequenceId(gskDeflect, 9, 6)); _vm->gnapWalkTo(_vm->_gnap->_pos, 0, -1, 1); _vm->_gnap->_actionStatus = kAS13Wait; break; @@ -1650,7 +1650,7 @@ void Scene13::run() { } else { switch (_vm->_verbCursor) { case LOOK_CURSOR: - _vm->playGnapSequence(_vm->_gnap->getSequenceId(gskDeflect, 5, 9)); + _vm->_gnap->playSequence(_vm->_gnap->getSequenceId(gskDeflect, 5, 9)); _vm->gnapWalkTo(_vm->_gnap->_pos, 0, -1, 1); _vm->_gnap->_actionStatus = kAS13Wait; break; @@ -2549,7 +2549,7 @@ void Scene17::run() { break; case TALK_CURSOR: _vm->playGnapBrainPulsating(_vm->_plat->_pos.x, _vm->_plat->_pos.y); - _vm->playPlatypusSequence(_vm->_plat->getSequenceId()); + _vm->_plat->playSequence(_vm->_plat->getSequenceId()); break; case PLAT_CURSOR: _vm->playGnapImpossible(0, 0); @@ -3449,7 +3449,7 @@ void Scene18::run() { break; case TALK_CURSOR: _vm->playGnapBrainPulsating(_vm->_plat->_pos.x, _vm->_plat->_pos.y); - _vm->playPlatypusSequence(_vm->_plat->getSequenceId()); + _vm->_plat->playSequence(_vm->_plat->getSequenceId()); break; case PLAT_CURSOR: _vm->playGnapImpossible(0, 0); @@ -4155,7 +4155,7 @@ void Scene19::run() { break; case TALK_CURSOR: _vm->playGnapBrainPulsating(_vm->_plat->_pos.x, _vm->_plat->_pos.y); - _vm->playPlatypusSequence(_vm->_plat->getSequenceId()); + _vm->_plat->playSequence(_vm->_plat->getSequenceId()); break; case PLAT_CURSOR: _vm->playGnapImpossible(0, 0); diff --git a/engines/gnap/scenes/group2.cpp b/engines/gnap/scenes/group2.cpp index 0a8d6041b6..145d0ee924 100644 --- a/engines/gnap/scenes/group2.cpp +++ b/engines/gnap/scenes/group2.cpp @@ -286,7 +286,7 @@ void Scene20::run() { break; case TALK_CURSOR: _vm->playGnapBrainPulsating(_vm->_plat->_pos.x, _vm->_plat->_pos.y); - _vm->playPlatypusSequence(_vm->_plat->getSequenceId()); + _vm->_plat->playSequence(_vm->_plat->getSequenceId()); break; case PLAT_CURSOR: _vm->playGnapImpossible(0, 0); @@ -804,7 +804,7 @@ void Scene21::run() { break; case TALK_CURSOR: _vm->playGnapBrainPulsating(_vm->_plat->_pos.x, _vm->_plat->_pos.y); - _vm->playPlatypusSequence(_vm->_plat->getSequenceId()); + _vm->_plat->playSequence(_vm->_plat->getSequenceId()); break; case PLAT_CURSOR: _vm->playGnapImpossible(0, 0); @@ -1120,7 +1120,7 @@ void Scene22::run() { break; case TALK_CURSOR: _vm->playGnapBrainPulsating(_vm->_plat->_pos.x, _vm->_plat->_pos.y); - _vm->playPlatypusSequence(_vm->_plat->getSequenceId()); + _vm->_plat->playSequence(_vm->_plat->getSequenceId()); break; case PLAT_CURSOR: _vm->playGnapImpossible(0, 0); @@ -1344,7 +1344,7 @@ void Scene23::run() { break; case TALK_CURSOR: _vm->playGnapBrainPulsating(_vm->_plat->_pos.x, _vm->_plat->_pos.y); - _vm->playPlatypusSequence(_vm->_plat->getSequenceId()); + _vm->_plat->playSequence(_vm->_plat->getSequenceId()); break; case PLAT_CURSOR: _vm->playGnapImpossible(0, 0); @@ -1613,7 +1613,7 @@ void Scene24::run() { break; case TALK_CURSOR: _vm->playGnapBrainPulsating(_vm->_plat->_pos.x, _vm->_plat->_pos.y); - _vm->playPlatypusSequence(_vm->_plat->getSequenceId()); + _vm->_plat->playSequence(_vm->_plat->getSequenceId()); break; case PLAT_CURSOR: _vm->playGnapImpossible(0, 0); @@ -1859,7 +1859,7 @@ void Scene25::run() { break; case TALK_CURSOR: _vm->playGnapBrainPulsating(_vm->_plat->_pos.x, _vm->_plat->_pos.y); - _vm->playPlatypusSequence(_vm->_plat->getSequenceId()); + _vm->_plat->playSequence(_vm->_plat->getSequenceId()); break; case PLAT_CURSOR: _vm->playGnapImpossible(0, 0); @@ -2176,7 +2176,7 @@ void Scene26::run() { break; case TALK_CURSOR: _vm->playGnapBrainPulsating(_vm->_plat->_pos.x, _vm->_plat->_pos.y); - _vm->playPlatypusSequence(_vm->_plat->getSequenceId()); + _vm->_plat->playSequence(_vm->_plat->getSequenceId()); break; case PLAT_CURSOR: _vm->playGnapImpossible(0, 0); @@ -2410,7 +2410,7 @@ void Scene27::run() { break; case TALK_CURSOR: _vm->playGnapBrainPulsating(_vm->_plat->_pos.x, _vm->_plat->_pos.y); - _vm->playPlatypusSequence(_vm->_plat->getSequenceId()); + _vm->_plat->playSequence(_vm->_plat->getSequenceId()); break; case PLAT_CURSOR: _vm->playGnapImpossible(0, 0); @@ -2781,7 +2781,7 @@ void Scene28::run() { break; case TALK_CURSOR: _vm->playGnapBrainPulsating(_vm->_plat->_pos.x, _vm->_plat->_pos.y); - _vm->playPlatypusSequence(_vm->_plat->getSequenceId()); + _vm->_plat->playSequence(_vm->_plat->getSequenceId()); break; case PLAT_CURSOR: _vm->playGnapImpossible(0, 0); @@ -3172,7 +3172,7 @@ void Scene29::run() { break; case TALK_CURSOR: _vm->playGnapBrainPulsating(_vm->_plat->_pos.x, _vm->_plat->_pos.y); - _vm->playPlatypusSequence(_vm->_plat->getSequenceId()); + _vm->_plat->playSequence(_vm->_plat->getSequenceId()); break; case PLAT_CURSOR: _vm->playGnapImpossible(0, 0); diff --git a/engines/gnap/scenes/group3.cpp b/engines/gnap/scenes/group3.cpp index 1a22a331f3..ec17be422e 100644 --- a/engines/gnap/scenes/group3.cpp +++ b/engines/gnap/scenes/group3.cpp @@ -101,7 +101,7 @@ void Scene30::run() { break; case TALK_CURSOR: _vm->playGnapBrainPulsating(_vm->_plat->_pos.x, _vm->_plat->_pos.y); - _vm->playPlatypusSequence(_vm->_plat->getSequenceId()); + _vm->_plat->playSequence(_vm->_plat->getSequenceId()); break; case PLAT_CURSOR: _vm->playGnapImpossible(0, 0); @@ -356,7 +356,7 @@ void Scene31::run() { break; case TALK_CURSOR: _vm->playGnapBrainPulsating(_vm->_plat->_pos.x, _vm->_plat->_pos.y); - _vm->playPlatypusSequence(_vm->_plat->getSequenceId()); + _vm->_plat->playSequence(_vm->_plat->getSequenceId()); break; case PLAT_CURSOR: _vm->playGnapImpossible(0, 0); @@ -705,7 +705,7 @@ void Scene32::run() { break; case TALK_CURSOR: _vm->playGnapBrainPulsating(_vm->_plat->_pos.x, _vm->_plat->_pos.y); - _vm->playPlatypusSequence(_vm->_plat->getSequenceId()); + _vm->_plat->playSequence(_vm->_plat->getSequenceId()); break; case PLAT_CURSOR: _vm->playGnapImpossible(_vm->_plat->_pos.x, _vm->_plat->_pos.y); @@ -881,7 +881,7 @@ void Scene33::run() { break; case TALK_CURSOR: _vm->playGnapBrainPulsating(_vm->_plat->_pos.x, _vm->_plat->_pos.y); - _vm->playPlatypusSequence(_vm->_plat->getSequenceId()); + _vm->_plat->playSequence(_vm->_plat->getSequenceId()); break; case PLAT_CURSOR: _vm->playGnapImpossible(_vm->_plat->_pos.x, _vm->_plat->_pos.y); @@ -1158,7 +1158,7 @@ void Scene38::run() { break; case TALK_CURSOR: _vm->playGnapBrainPulsating(_vm->_plat->_pos.x, _vm->_plat->_pos.y); - _vm->playPlatypusSequence(_vm->_plat->getSequenceId()); + _vm->_plat->playSequence(_vm->_plat->getSequenceId()); break; case PLAT_CURSOR: _vm->playGnapImpossible(_vm->_plat->_pos.x, _vm->_plat->_pos.y); @@ -1352,9 +1352,9 @@ void Scene38::updateAnimations() { gameSys.setAnimation(0x9F, _vm->_gnap->_id, 0); _vm->_gnap->_actionStatus = kAS38HoldingHuntingTrophy; if (_vm->_plat->_idleFacing != kDirNone) - _vm->playPlatypusSequence(0x107D5); + _vm->_plat->playSequence(0x107D5); else - _vm->playPlatypusSequence(0x107D4); + _vm->_plat->playSequence(0x107D4); _vm->platypusWalkTo(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; @@ -1464,7 +1464,7 @@ void Scene39::run() { break; case TALK_CURSOR: _vm->playGnapBrainPulsating(_vm->_plat->_pos.x, _vm->_plat->_pos.y); - _vm->playPlatypusSequence(_vm->_plat->getSequenceId()); + _vm->_plat->playSequence(_vm->_plat->getSequenceId()); break; case PLAT_CURSOR: _vm->playGnapImpossible(_vm->_plat->_pos.x, _vm->_plat->_pos.y); diff --git a/engines/gnap/scenes/group4.cpp b/engines/gnap/scenes/group4.cpp index e4e29d92f6..9d731c0b9f 100644 --- a/engines/gnap/scenes/group4.cpp +++ b/engines/gnap/scenes/group4.cpp @@ -87,7 +87,7 @@ void Scene40::run() { break; case TALK_CURSOR: _vm->playGnapBrainPulsating(_vm->_plat->_pos.x, _vm->_plat->_pos.y); - _vm->playPlatypusSequence(_vm->_plat->getSequenceId()); + _vm->_plat->playSequence(_vm->_plat->getSequenceId()); break; case PLAT_CURSOR: _vm->playGnapImpossible(_vm->_plat->_pos.x, _vm->_plat->_pos.y); @@ -362,7 +362,7 @@ void Scene41::run() { break; case TALK_CURSOR: _vm->playGnapBrainPulsating(_vm->_plat->_pos.x, _vm->_plat->_pos.y); - _vm->playPlatypusSequence(_vm->_plat->getSequenceId()); + _vm->_plat->playSequence(_vm->_plat->getSequenceId()); break; case PLAT_CURSOR: _vm->playGnapImpossible(_vm->_plat->_pos.x, _vm->_plat->_pos.y); @@ -874,7 +874,7 @@ void Scene42::run() { break; case TALK_CURSOR: _vm->playGnapBrainPulsating(_vm->_plat->_pos.x, _vm->_plat->_pos.y); - _vm->playPlatypusSequence(_vm->_plat->getSequenceId()); + _vm->_plat->playSequence(_vm->_plat->getSequenceId()); break; case PLAT_CURSOR: _vm->playGnapImpossible(_vm->_plat->_pos.x, _vm->_plat->_pos.y); @@ -1332,7 +1332,7 @@ void Scene43::run() { break; case TALK_CURSOR: _vm->playGnapBrainPulsating(_vm->_plat->_pos.x, _vm->_plat->_pos.y); - _vm->playPlatypusSequence(_vm->_plat->getSequenceId()); + _vm->_plat->playSequence(_vm->_plat->getSequenceId()); break; case PLAT_CURSOR: _vm->playGnapImpossible(_vm->_plat->_pos.x, _vm->_plat->_pos.y); @@ -1780,7 +1780,7 @@ void Scene44::run() { break; case TALK_CURSOR: _vm->playGnapBrainPulsating(_vm->_plat->_pos.x, _vm->_plat->_pos.y); - _vm->playPlatypusSequence(_vm->_plat->getSequenceId()); + _vm->_plat->playSequence(_vm->_plat->getSequenceId()); break; case PLAT_CURSOR: _vm->playGnapImpossible(_vm->_plat->_pos.x, _vm->_plat->_pos.y); @@ -2208,7 +2208,7 @@ void Scene45::run() { _vm->_gnap->_sequenceDatNum = 1; } - _vm->playPlatypusSequence(0x9A); + _vm->_plat->playSequence(0x9A); gameSys.setAnimation(_vm->_plat->_sequenceId, _vm->_plat->_id, 1); while (!_vm->_sceneDone) { @@ -2266,12 +2266,12 @@ void Scene45::run() { break; case GRAB_CURSOR: _vm->_gnap->kissPlatypus(0); - _vm->playPlatypusSequence(0x9A); + _vm->_plat->playSequence(0x9A); gameSys.setAnimation(_vm->_plat->_sequenceId, _vm->_plat->_id, 1); break; case TALK_CURSOR: _vm->playGnapBrainPulsating(_vm->_plat->_pos.x, _vm->_plat->_pos.y); - _vm->playPlatypusSequence(_vm->_plat->getSequenceId()); + _vm->_plat->playSequence(_vm->_plat->getSequenceId()); break; case PLAT_CURSOR: _vm->playGnapImpossible(_vm->_plat->_pos.x, _vm->_plat->_pos.y); @@ -2405,9 +2405,9 @@ void Scene45::updateAnimations() { if (gameSys.getAnimationStatus(1) == 2) { gameSys.setAnimation(0, 0, 1); if (_vm->getRandom(2) != 0) - _vm->playPlatypusSequence(0x9B); + _vm->_plat->playSequence(0x9B); else - _vm->playPlatypusSequence(0x9C); + _vm->_plat->playSequence(0x9C); gameSys.setAnimation(_vm->_plat->_sequenceId, _vm->_plat->_id, 1); } @@ -2594,7 +2594,7 @@ void Scene46::run() { break; case TALK_CURSOR: _vm->playGnapBrainPulsating(_vm->_plat->_pos.x, _vm->_plat->_pos.y); - _vm->playPlatypusSequence(_vm->_plat->getSequenceId()); + _vm->_plat->playSequence(_vm->_plat->getSequenceId()); break; case PLAT_CURSOR: _vm->playGnapImpossible(_vm->_plat->_pos.x, _vm->_plat->_pos.y); |