aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStrangerke2016-05-05 11:58:10 +0200
committerEugene Sandulenko2016-05-10 12:14:50 +0200
commit45f27ea81c4aa3a4fbfa356a51f6b141447158d0 (patch)
tree1cb203afe1bcf09c3bb074ca081546b6cab5e912
parent00c544f9f815be3121b900ff16572676ee6c4bf5 (diff)
downloadscummvm-rg350-45f27ea81c4aa3a4fbfa356a51f6b141447158d0.tar.gz
scummvm-rg350-45f27ea81c4aa3a4fbfa356a51f6b141447158d0.tar.bz2
scummvm-rg350-45f27ea81c4aa3a4fbfa356a51f6b141447158d0.zip
GNAP: Even more refactoring related to characters (WIP)
-rw-r--r--engines/gnap/character.cpp150
-rw-r--r--engines/gnap/character.h6
-rw-r--r--engines/gnap/gnap.cpp150
-rw-r--r--engines/gnap/gnap.h4
-rw-r--r--engines/gnap/scenes/group0.cpp34
-rw-r--r--engines/gnap/scenes/group1.cpp28
-rw-r--r--engines/gnap/scenes/group2.cpp40
-rw-r--r--engines/gnap/scenes/group3.cpp24
-rw-r--r--engines/gnap/scenes/group4.cpp22
9 files changed, 230 insertions, 228 deletions
diff --git a/engines/gnap/character.cpp b/engines/gnap/character.cpp
index c8970a41f4..c72f6337fa 100644
--- a/engines/gnap/character.cpp
+++ b/engines/gnap/character.cpp
@@ -489,6 +489,90 @@ void PlayerGnap::playSequence(int sequenceId) {
_sequenceDatNum = ridToDatIndex(sequenceId);
}
+void PlayerGnap::updateIdleSequence() {
+ if (_actionStatus < 0) {
+ if (_vm->_timers[2] > 0) {
+ if (_vm->_timers[3] == 0) {
+ _vm->_timers[2] = 60;
+ _vm->_timers[3] = 300;
+ if (_idleFacing == kDirBottomRight) {
+ switch (_vm->getRandom(5)) {
+ case 0:
+ playSequence(0x107A6);
+ break;
+ case 1:
+ playSequence(0x107AA);
+ break;
+ case 2:
+ playSequence(0x10841);
+ break;
+ default:
+ playSequence(0x108A2);
+ break;
+ }
+ } else if (_idleFacing == kDirBottomLeft) {
+ if (_vm->getRandom(5) > 2)
+ playSequence(0x10832);
+ else
+ playSequence(0x10842);
+ }
+ }
+ } else {
+ _vm->_timers[2] = _vm->getRandom(30) + 20;
+ if (_idleFacing == kDirBottomRight) {
+ _vm->_gameSys->insertSequence(0x107BD, _id,
+ makeRid(_sequenceDatNum, _sequenceId), _id,
+ kSeqSyncWait, 0, 75 * _pos.x - _vm->_gnapGridX, 48 * _pos.y - _vm->_gnapGridY);
+ _sequenceId = 0x7BD;
+ _sequenceDatNum = 1;
+ } else if (_idleFacing == kDirBottomLeft) {
+ _vm->_gameSys->insertSequence(0x107BE, _id,
+ makeRid(_sequenceDatNum, _sequenceId), _id,
+ kSeqSyncWait, 0, 75 * _pos.x - _vm->_gnapGridX, 48 * _pos.y - _vm->_gnapGridY);
+ _sequenceId = 0x7BE;
+ _sequenceDatNum = 1;
+ }
+ }
+ } else {
+ _vm->_timers[2] = _vm->getRandom(30) + 20;
+ _vm->_timers[3] = 300;
+ }
+}
+
+void PlayerGnap::updateIdleSequence2() {
+ if (_actionStatus < 0) {
+ if (_vm->_timers[2] > 0) {
+ if (_vm->_timers[3] == 0) {
+ _vm->_timers[2] = 60;
+ _vm->_timers[3] = 300;
+ if (_idleFacing == kDirBottomRight) {
+ playSequence(0x107AA);
+ } else if (_idleFacing == kDirBottomLeft) {
+ playSequence(0x10832);
+ }
+ }
+ } else {
+ _vm->_timers[2] = _vm->getRandom(30) + 20;
+ if (_idleFacing == kDirBottomRight) {
+ _vm->_gameSys->insertSequence(0x107BD, _id,
+ makeRid(_sequenceDatNum, _sequenceId), _id,
+ kSeqSyncWait, 0, 75 * _pos.x - _vm->_gnapGridX, 48 * _pos.y - _vm->_gnapGridY);
+ _sequenceId = 0x7BD;
+ _sequenceDatNum = 1;
+ } else if (_idleFacing == kDirBottomLeft) {
+ _vm->_gameSys->insertSequence(0x107BE, _id,
+ makeRid(_sequenceDatNum, _sequenceId), _id,
+ kSeqSyncWait, 0, 75 * _pos.x - _vm->_gnapGridX, 48 * _pos.y - _vm->_gnapGridY);
+ _sequenceId = 0x7BE;
+ _sequenceDatNum = 1;
+ }
+ }
+ } else {
+ _vm->_timers[2] = _vm->getRandom(30) + 20;
+ _vm->_timers[3] = 300;
+ }
+}
+
/************************************************************************************************/
PlayerPlat::PlayerPlat(GnapEngine * vm) : Character(vm) {}
@@ -515,4 +599,70 @@ void PlayerPlat::playSequence(int sequenceId) {
_sequenceDatNum = ridToDatIndex(sequenceId);
}
+void PlayerPlat::updateIdleSequence() {
+ if (_actionStatus < 0 && _vm->_gnap->_actionStatus < 0) {
+ if (_vm->_timers[0] > 0) {
+ if (_vm->_timers[1] == 0) {
+ _vm->_timers[1] = _vm->getRandom(20) + 30;
+ int rnd = _vm->getRandom(10);
+ if (_idleFacing != kDirNone) {
+ if (rnd != 0 || _sequenceId != 0x7CA) {
+ if (rnd != 1 || _sequenceId != 0x7CA)
+ playSequence(0x107CA);
+ else
+ playSequence(0x10845);
+ } else {
+ playSequence(0x107CC);
+ }
+ } else if (rnd != 0 || _sequenceId != 0x7C9) {
+ if (rnd != 1 || _sequenceId != 0x7C9) {
+ if (rnd != 2 || _sequenceId != 0x7C9)
+ playSequence(0x107C9);
+ else
+ playSequence(0x108A4);
+ } else {
+ playSequence(0x10844);
+ }
+ } else {
+ playSequence(0x107CB);
+ }
+ }
+ } else {
+ _vm->_timers[0] = _vm->getRandom(75) + 75;
+ _vm->platypusMakeRoom();
+ }
+ } else {
+ _vm->_timers[0] = 100;
+ _vm->_timers[1] = 35;
+ }
+}
+
+void PlayerPlat::updateIdleSequence2() {
+ if (_actionStatus < 0 && _vm->_gnap->_actionStatus < 0) {
+ if (_vm->_timers[0]) {
+ if (!_vm->_timers[1]) {
+ _vm->_timers[1] = _vm->getRandom(20) + 30;
+ if (_idleFacing != kDirNone) {
+ if (_vm->getRandom(10) >= 2 || _sequenceId != 0x7CA)
+ playSequence(0x107CA);
+ else
+ playSequence(0x107CC);
+ } else {
+ if (_vm->getRandom(10) >= 2 || _sequenceId != 0x7C9) {
+ playSequence(0x107C9);
+ } else {
+ playSequence(0x107CB);
+ }
+ }
+ }
+ } else {
+ _vm->_timers[0] = _vm->getRandom(75) + 75;
+ _vm->platypusMakeRoom();
+ }
+ } else {
+ _vm->_timers[0] = 100;
+ _vm->_timers[1] = 35;
+ }
+}
+
} // End of namespace Gnap
diff --git a/engines/gnap/character.h b/engines/gnap/character.h
index faf1d775a2..5e7d6ee3e5 100644
--- a/engines/gnap/character.h
+++ b/engines/gnap/character.h
@@ -43,6 +43,8 @@ public:
virtual int getSequenceId(int kind, int gridX, int gridY) = 0;
virtual void playSequence(int sequenceId) = 0;
+ virtual void updateIdleSequence() = 0;
+ virtual void updateIdleSequence2() = 0;
Common::Point _pos;
Facing _idleFacing;
@@ -60,6 +62,8 @@ public:
PlayerGnap(GnapEngine *vm);
virtual int getSequenceId(int kind, int gridX, int gridY);
virtual void playSequence(int sequenceId);
+ virtual void updateIdleSequence();
+ virtual void updateIdleSequence2();
void initBrainPulseRndValue();
void kissPlatypus(int callback);
@@ -74,6 +78,8 @@ public:
PlayerPlat(GnapEngine *vm);
virtual int getSequenceId(int kind = 0, int gridX = 0, int gridY = 0);
virtual void playSequence(int sequenceId);
+ virtual void updateIdleSequence();
+ virtual void updateIdleSequence2();
};
} // End of namespace Gnap
diff --git a/engines/gnap/gnap.cpp b/engines/gnap/gnap.cpp
index 818ac89c4d..f72b7c6af3 100644
--- a/engines/gnap/gnap.cpp
+++ b/engines/gnap/gnap.cpp
@@ -1193,90 +1193,6 @@ void GnapEngine::playGnapShowCurrItem(int gridX, int gridY, int gridLookX, int g
playGnapShowItem(_grabCursorSpriteIndex, gridLookX, gridLookY);
}
-void GnapEngine::updateGnapIdleSequence() {
- if (_gnap->_actionStatus < 0) {
- if (_timers[2] > 0) {
- if (_timers[3] == 0) {
- _timers[2] = 60;
- _timers[3] = 300;
- if (_gnap->_idleFacing == kDirBottomRight) {
- switch (getRandom(5)) {
- case 0:
- _gnap->playSequence(0x107A6);
- break;
- case 1:
- _gnap->playSequence(0x107AA);
- break;
- case 2:
- _gnap->playSequence(0x10841);
- break;
- default:
- _gnap->playSequence(0x108A2);
- break;
- }
- } else if (_gnap->_idleFacing == kDirBottomLeft) {
- if (getRandom(5) > 2)
- _gnap->playSequence(0x10832);
- else
- _gnap->playSequence(0x10842);
- }
- }
- } else {
- _timers[2] = getRandom(30) + 20;
- if (_gnap->_idleFacing == kDirBottomRight) {
- _gameSys->insertSequence(0x107BD, _gnap->_id,
- makeRid(_gnap->_sequenceDatNum, _gnap->_sequenceId), _gnap->_id,
- kSeqSyncWait, 0, 75 * _gnap->_pos.x - _gnapGridX, 48 * _gnap->_pos.y - _gnapGridY);
- _gnap->_sequenceId = 0x7BD;
- _gnap->_sequenceDatNum = 1;
- } else if (_gnap->_idleFacing == kDirBottomLeft) {
- _gameSys->insertSequence(0x107BE, _gnap->_id,
- makeRid(_gnap->_sequenceDatNum, _gnap->_sequenceId), _gnap->_id,
- kSeqSyncWait, 0, 75 * _gnap->_pos.x - _gnapGridX, 48 * _gnap->_pos.y - _gnapGridY);
- _gnap->_sequenceId = 0x7BE;
- _gnap->_sequenceDatNum = 1;
- }
- }
- } else {
- _timers[2] = getRandom(30) + 20;
- _timers[3] = 300;
- }
-}
-
-void GnapEngine::updateGnapIdleSequence2() {
- if (_gnap->_actionStatus < 0) {
- if (_timers[2] > 0) {
- if (_timers[3] == 0) {
- _timers[2] = 60;
- _timers[3] = 300;
- if (_gnap->_idleFacing == kDirBottomRight) {
- _gnap->playSequence(0x107AA);
- } else if (_gnap->_idleFacing == kDirBottomLeft) {
- _gnap->playSequence(0x10832);
- }
- }
- } else {
- _timers[2] = getRandom(30) + 20;
- if (_gnap->_idleFacing == kDirBottomRight) {
- _gameSys->insertSequence(0x107BD, _gnap->_id,
- makeRid(_gnap->_sequenceDatNum, _gnap->_sequenceId), _gnap->_id,
- kSeqSyncWait, 0, 75 * _gnap->_pos.x - _gnapGridX, 48 * _gnap->_pos.y - _gnapGridY);
- _gnap->_sequenceId = 0x7BD;
- _gnap->_sequenceDatNum = 1;
- } else if (_gnap->_idleFacing == kDirBottomLeft) {
- _gameSys->insertSequence(0x107BE, _gnap->_id,
- makeRid(_gnap->_sequenceDatNum, _gnap->_sequenceId), _gnap->_id,
- kSeqSyncWait, 0, 75 * _gnap->_pos.x - _gnapGridX, 48 * _gnap->_pos.y - _gnapGridY);
- _gnap->_sequenceId = 0x7BE;
- _gnap->_sequenceDatNum = 1;
- }
- }
- } else {
- _timers[2] = getRandom(30) + 20;
- _timers[3] = 300;
- }
-}
-
bool GnapEngine::testWalk(int animationIndex, int someStatus, int gridX1, int gridY1, int gridX2, int gridY2) {
if (_mouseClickState._left && someStatus == _gnap->_actionStatus) {
_isLeavingScene = false;
@@ -1364,72 +1280,6 @@ void GnapEngine::gnapUseDisguiseOnPlatypus() {
setFlag(kGFPlatypusDisguised);
}
-void GnapEngine::updatePlatypusIdleSequence() {
- if (_plat->_actionStatus < 0 && _gnap->_actionStatus < 0) {
- if (_timers[0] > 0) {
- if (_timers[1] == 0) {
- _timers[1] = getRandom(20) + 30;
- int rnd = getRandom(10);
- if (_plat->_idleFacing != kDirNone) {
- if (rnd != 0 || _plat->_sequenceId != 0x7CA) {
- if (rnd != 1 || _plat->_sequenceId != 0x7CA)
- _plat->playSequence(0x107CA);
- else
- _plat->playSequence(0x10845);
- } else {
- _plat->playSequence(0x107CC);
- }
- } else if (rnd != 0 || _plat->_sequenceId != 0x7C9) {
- if (rnd != 1 || _plat->_sequenceId != 0x7C9) {
- if (rnd != 2 || _plat->_sequenceId != 0x7C9)
- _plat->playSequence(0x107C9);
- else
- _plat->playSequence(0x108A4);
- } else {
- _plat->playSequence(0x10844);
- }
- } else {
- _plat->playSequence(0x107CB);
- }
- }
- } else {
- _timers[0] = getRandom(75) + 75;
- platypusMakeRoom();
- }
- } else {
- _timers[0] = 100;
- _timers[1] = 35;
- }
-}
-
-void GnapEngine::updatePlatypusIdleSequence2() {
- if (_plat->_actionStatus < 0 && _gnap->_actionStatus < 0) {
- if (_timers[0]) {
- if (!_timers[1]) {
- _timers[1] = getRandom(20) + 30;
- if (_plat->_idleFacing != kDirNone) {
- if (getRandom(10) >= 2 || _plat->_sequenceId != 0x7CA)
- _plat->playSequence(0x107CA);
- else
- _plat->playSequence(0x107CC);
- } else {
- if (getRandom(10) >= 2 || _plat->_sequenceId != 0x7C9) {
- _plat->playSequence(0x107C9);
- } else {
- _plat->playSequence(0x107CB);
- }
- }
- }
- } else {
- _timers[0] = getRandom(75) + 75;
- platypusMakeRoom();
- }
- } else {
- _timers[0] = 100;
- _timers[1] = 35;
- }
-}
-
void GnapEngine::initPlatypusPos(int gridX, int gridY, Facing facing) {
_timers[0] = 50;
_timers[1] = 20;
diff --git a/engines/gnap/gnap.h b/engines/gnap/gnap.h
index fdf47a2c40..d37b2de6e6 100644
--- a/engines/gnap/gnap.h
+++ b/engines/gnap/gnap.h
@@ -530,16 +530,12 @@ public:
void playGnapIdle(int gridX, int gridY);
void playGnapShowItem(int itemIndex, int gridLookX, int gridLookY);
void playGnapShowCurrItem(int gridX, int gridY, int gridLookX, int gridLookY);
- void updateGnapIdleSequence();
- void updateGnapIdleSequence2();
void initGnapPos(int gridX, int gridY, Facing facing);
void doCallback(int callback);
bool gnapPlatypusAction(int gridX, int gridY, int platSequenceId, int callback);
void gnapUseDisguiseOnPlatypus();
// Platypus
- void updatePlatypusIdleSequence();
- void updatePlatypusIdleSequence2();
void initPlatypusPos(int gridX, int gridY, Facing facing);
// Scenes
diff --git a/engines/gnap/scenes/group0.cpp b/engines/gnap/scenes/group0.cpp
index 9690d6932f..0ae1d2e934 100644
--- a/engines/gnap/scenes/group0.cpp
+++ b/engines/gnap/scenes/group0.cpp
@@ -261,9 +261,9 @@ void Scene01::run() {
if (!_vm->_isLeavingScene) {
if (_vm->_plat->_actionStatus < 0 && _vm->isFlag(kGFPlatypus))
- _vm->updatePlatypusIdleSequence();
+ _vm->_plat->updateIdleSequence();
if (_vm->_gnap->_actionStatus < 0)
- _vm->updateGnapIdleSequence();
+ _vm->_gnap->updateIdleSequence();
if (_vm->_timers[4] == 0) {
// Update bird animation
_vm->_timers[4] = _vm->getRandom(100) + 300;
@@ -673,9 +673,9 @@ void Scene02::run() {
if (!_vm->_isLeavingScene) {
if (_vm->_plat->_actionStatus < 0 && _vm->isFlag(kGFPlatypus))
- _vm->updatePlatypusIdleSequence();
+ _vm->_plat->updateIdleSequence();
if (_vm->_gnap->_actionStatus < 0)
- _vm->updateGnapIdleSequence();
+ _vm->_gnap->updateIdleSequence();
if (!_vm->_timers[4]) {
// Update bird animation
_vm->_timers[4] = _vm->getRandom(100) + 300;
@@ -1121,9 +1121,9 @@ void Scene03::run() {
if (!_vm->_isLeavingScene) {
if (_vm->_plat->_actionStatus < 0 && _vm->isFlag(kGFPlatypus))
- _vm->updatePlatypusIdleSequence();
+ _vm->_plat->updateIdleSequence();
if (_vm->_gnap->_actionStatus < 0)
- _vm->updateGnapIdleSequence();
+ _vm->_gnap->updateIdleSequence();
if (!_vm->_timers[1] && !_platypusScared) {
_vm->_timers[1] = _vm->getRandom(40) + 20;
if (_vm->_gnap->_actionStatus < 0 && _vm->_plat->_actionStatus < 0 && !_vm->isFlag(kGFPlatypus) && !_platypusHypnotized)
@@ -1664,9 +1664,9 @@ void Scene04::run() {
if (!_vm->_isLeavingScene) {
if (_vm->_plat->_actionStatus < 0 && _vm->isFlag(kGFPlatypus))
- _vm->updatePlatypusIdleSequence2();
+ _vm->_plat->updateIdleSequence2();
if (_vm->_gnap->_actionStatus < 0)
- _vm->updateGnapIdleSequence2();
+ _vm->_gnap->updateIdleSequence2();
if (!_vm->_timers[5]) {
_vm->_timers[5] = _vm->getRandom(150) + 300;
if (_vm->_gnap->_actionStatus < 0)
@@ -2107,8 +2107,8 @@ void Scene05::run() {
if (!_vm->_isLeavingScene) {
if (_vm->isFlag(kGFPlatypus))
- _vm->updatePlatypusIdleSequence();
- _vm->updateGnapIdleSequence();
+ _vm->_plat->updateIdleSequence();
+ _vm->_gnap->updateIdleSequence();
if (!_vm->_timers[5]) {
_vm->_timers[5] = _vm->getRandom(20) + 30;
if (_vm->_gnap->_actionStatus != kAS05TalkChicken && _nextChickenSequenceId == -1) {
@@ -2501,9 +2501,9 @@ void Scene06::run() {
if (!_vm->_isLeavingScene) {
if (_vm->_plat->_actionStatus < 0)
- _vm->updatePlatypusIdleSequence();
+ _vm->_plat->updateIdleSequence();
if (_vm->_gnap->_actionStatus < 0)
- _vm->updateGnapIdleSequence();
+ _vm->_gnap->updateIdleSequence();
if (!_vm->_timers[4]) {
_vm->_timers[4] = _vm->getRandom(40) + 25;
if (_vm->_gnap->_actionStatus < 0 && _vm->_plat->_actionStatus < 0 && _nextHorseSequenceId == -1) {
@@ -2801,7 +2801,7 @@ void Scene07::run() {
updateAnimations();
if (!_vm->_isLeavingScene) {
- _vm->updateGnapIdleSequence();
+ _vm->_gnap->updateIdleSequence();
if (_vm->_plat->_actionStatus < 0 && _vm->_gnap->_actionStatus < 0) {
if (_vm->_timers[0]) {
if (!_vm->_timers[1]) {
@@ -3190,8 +3190,8 @@ void Scene08::run() {
updateAnimations();
if (!_vm->_isLeavingScene) {
- _vm->updatePlatypusIdleSequence();
- _vm->updateGnapIdleSequence();
+ _vm->_plat->updateIdleSequence();
+ _vm->_gnap->updateIdleSequence();
if (!_vm->_timers[4]) {
_vm->_timers[4] = _vm->getRandom(50) + 125;
if (_vm->_gnap->_actionStatus < 0 && _vm->_plat->_actionStatus < 0 && _nextManSequenceId == -1 &&
@@ -3491,8 +3491,8 @@ void Scene09::run() {
updateAnimations();
if (!_vm->_isLeavingScene && _vm->_gnap->_actionStatus != 1 && _vm->_gnap->_actionStatus != 2) {
- _vm->updatePlatypusIdleSequence();
- _vm->updateGnapIdleSequence();
+ _vm->_plat->updateIdleSequence();
+ _vm->_gnap->updateIdleSequence();
if (!_vm->_timers[4]) {
_vm->_timers[4] = _vm->getRandom(150) + 100;
if (_vm->_timers[4] & 1)
diff --git a/engines/gnap/scenes/group1.cpp b/engines/gnap/scenes/group1.cpp
index cbc1f704ec..28eecf9846 100644
--- a/engines/gnap/scenes/group1.cpp
+++ b/engines/gnap/scenes/group1.cpp
@@ -305,8 +305,8 @@ void Scene10::run() {
updateAnimations();
if (!_vm->_isLeavingScene) {
- _vm->updatePlatypusIdleSequence();
- _vm->updateGnapIdleSequence();
+ _vm->_plat->updateIdleSequence();
+ _vm->_gnap->updateIdleSequence();
if (!_vm->_timers[4]) {
_vm->_timers[4] = _vm->getRandom(80) + 150;
_vm->playSound(0x12B, false);
@@ -745,8 +745,8 @@ void Scene11::run() {
gameSys.setAnimation(0x207, 257, 4);
gameSys.insertSequence(0x207, 257, 0, 0, kSeqNone, 0, 0, 0);
}
- _vm->updatePlatypusIdleSequence2();
- _vm->updateGnapIdleSequence2();
+ _vm->_plat->updateIdleSequence2();
+ _vm->_gnap->updateIdleSequence2();
if (!_vm->_timers[5]) {
_vm->_timers[5] = _vm->getRandom(100) + 75;
if (_vm->_gnap->_actionStatus < 0 && _vm->_plat->_actionStatus < 0 && _nextGoggleGuySequenceId == -1) {
@@ -1176,8 +1176,8 @@ void Scene12::run() {
updateAnimations();
if (!_vm->_isLeavingScene) {
- _vm->updatePlatypusIdleSequence();
- _vm->updateGnapIdleSequence();
+ _vm->_plat->updateIdleSequence();
+ _vm->_gnap->updateIdleSequence();
if (!_vm->_timers[4]) {
_vm->_timers[4] = 15;
if (_nextToothGuySequenceId == -1) {
@@ -1692,11 +1692,11 @@ void Scene13::run() {
updateAnimations();
if (!_vm->_isLeavingScene) {
- _vm->updatePlatypusIdleSequence();
+ _vm->_plat->updateIdleSequence();
if (_vm->_plat->_pos.y == 5 || _vm->_plat->_pos.y == 6)
_vm->platypusWalkTo(-1, 7, -1, -1, 1);
if (_vm->_gnap->_actionStatus < 0)
- _vm->updateGnapIdleSequence();
+ _vm->_gnap->updateIdleSequence();
if (!_vm->_timers[4]) {
_vm->_timers[4] = _vm->getRandom(20) + 20;
switch (_vm->getRandom(5)) {
@@ -2721,8 +2721,8 @@ void Scene17::run() {
if (!_vm->_isLeavingScene) {
if (_vm->_plat->_actionStatus < 0)
- _vm->updatePlatypusIdleSequence2();
- _vm->updateGnapIdleSequence2();
+ _vm->_plat->updateIdleSequence2();
+ _vm->_gnap->updateIdleSequence2();
if (!_vm->_timers[4]) {
_vm->_timers[4] = _vm->getRandom(100) + 200;
if (_vm->_gnap->_actionStatus < 0 && _vm->_plat->_actionStatus < 0)
@@ -3750,7 +3750,7 @@ void Scene18::run() {
} else {
_vm->_hotspots[kHS18WalkArea1]._y2 += 48;
_vm->_hotspots[kHS18WalkArea2]._x1 += 75;
- _vm->updatePlatypusIdleSequence();
+ _vm->_plat->updateIdleSequence();
_vm->_hotspots[kHS18WalkArea2]._x1 -= 75;
_vm->_hotspots[kHS18WalkArea1]._y2 -= 48;
}
@@ -3766,7 +3766,7 @@ void Scene18::run() {
_vm->playSoundA();
}
if (!_vm->isFlag(kGFPlatypusDisguised))
- _vm->updateGnapIdleSequence();
+ _vm->_gnap->updateIdleSequence();
}
_vm->checkGameKeys();
@@ -4296,9 +4296,9 @@ void Scene19::run() {
updateAnimations();
if (!_vm->_isLeavingScene) {
- _vm->updateGnapIdleSequence();
+ _vm->_gnap->updateIdleSequence();
if (!_vm->isFlag(kGFPlatypusTalkingToAssistant)) {
- _vm->updatePlatypusIdleSequence();
+ _vm->_plat->updateIdleSequence();
if (!_vm->_timers[6] && _nextShopAssistantSequenceId == -1) {
_vm->_timers[6] = _vm->getRandom(40) + 50;
if (_vm->getRandom(4) != 0) {
diff --git a/engines/gnap/scenes/group2.cpp b/engines/gnap/scenes/group2.cpp
index 145d0ee924..820a14e206 100644
--- a/engines/gnap/scenes/group2.cpp
+++ b/engines/gnap/scenes/group2.cpp
@@ -471,11 +471,11 @@ void Scene20::run() {
if (!_vm->_isLeavingScene) {
if (_vm->_plat->_actionStatus < 0) {
_vm->_hotspots[kHS20WalkArea1]._y2 += 48;
- _vm->updatePlatypusIdleSequence();
+ _vm->_plat->updateIdleSequence();
_vm->_hotspots[kHS20WalkArea1]._y2 -= 48;
}
if (_vm->_gnap->_actionStatus < 0)
- _vm->updateGnapIdleSequence();
+ _vm->_gnap->updateIdleSequence();
if (_vm->_gnap->_actionStatus < 0 && !_vm->_timers[5] && _nextGroceryStoreGuySequenceId == -1) {
_vm->_timers[5] = _vm->getRandom(50) + 130;
if (_vm->getRandom(4) != 0)
@@ -900,8 +900,8 @@ void Scene21::run() {
_vm->playSound(0x10940, true);
if (!_vm->_isLeavingScene) {
- _vm->updatePlatypusIdleSequence();
- _vm->updateGnapIdleSequence();
+ _vm->_plat->updateIdleSequence();
+ _vm->_gnap->updateIdleSequence();
if (!_vm->isFlag(kGFTwigTaken) && !_vm->_timers[4] && _nextOldLadySequenceId == -1 && _vm->_gnap->_actionStatus == -1) {
_vm->_timers[4] = _vm->getRandom(30) + 50;
switch (_vm->getRandom(5)) {
@@ -1192,8 +1192,8 @@ void Scene22::run() {
updateAnimations();
if (!_vm->_isLeavingScene) {
- _vm->updatePlatypusIdleSequence();
- _vm->updateGnapIdleSequence();
+ _vm->_plat->updateIdleSequence();
+ _vm->_gnap->updateIdleSequence();
if (!_vm->_timers[6] && _nextCashierSequenceId == -1) {
_vm->_timers[6] = _vm->getRandom(30) + 20;
if (_vm->getRandom(8) != 0) {
@@ -1417,8 +1417,8 @@ void Scene23::run() {
updateAnimations();
if (!_vm->_isLeavingScene) {
- _vm->updatePlatypusIdleSequence();
- _vm->updateGnapIdleSequence();
+ _vm->_plat->updateIdleSequence();
+ _vm->_gnap->updateIdleSequence();
if (!_vm->_timers[4] && _vm->_gnap->_actionStatus == -1) {
_vm->_timers[4] = _vm->getRandom(100) + 200;
switch (_vm->getRandom(4)) {
@@ -1665,8 +1665,8 @@ void Scene24::run() {
_vm->playSound(0x10940, true);
if (!_vm->_isLeavingScene) {
- _vm->updatePlatypusIdleSequence();
- _vm->updateGnapIdleSequence();
+ _vm->_plat->updateIdleSequence();
+ _vm->_gnap->updateIdleSequence();
if (!_vm->_timers[4]) {
_vm->_timers[4] = _vm->getRandom(20) + 50;
gameSys.insertSequence(0x37, 20, _girlSequenceId, 20, kSeqSyncWait, 0, 0, 0);
@@ -1976,8 +1976,8 @@ void Scene25::run() {
updateAnimations();
if (!_vm->_isLeavingScene) {
- _vm->updatePlatypusIdleSequence();
- _vm->updateGnapIdleSequence();
+ _vm->_plat->updateIdleSequence();
+ _vm->_gnap->updateIdleSequence();
if (!_vm->_timers[4] && _nextTicketVendorSequenceId == -1 && _vm->_gnap->_actionStatus == -1) {
_vm->_timers[4] = _vm->getRandom(20) + 20;
switch (_vm->getRandom(13)) {
@@ -2251,8 +2251,8 @@ void Scene26::run() {
_vm->playSound(0x1093B, true);
if (!_vm->_isLeavingScene) {
- _vm->updatePlatypusIdleSequence();
- _vm->updateGnapIdleSequence();
+ _vm->_plat->updateIdleSequence();
+ _vm->_gnap->updateIdleSequence();
if (!_vm->_timers[5] && _nextKidSequenceId == -1) {
_vm->_timers[5] = _vm->getRandom(20) + 50;
if (_vm->getRandom(5) != 0)
@@ -2537,9 +2537,9 @@ void Scene27::run() {
_vm->playSound(0x1093B, true);
if (!_vm->_isLeavingScene) {
- _vm->updatePlatypusIdleSequence();
+ _vm->_plat->updateIdleSequence();
if (_vm->_gnap->_actionStatus < 0)
- _vm->updateGnapIdleSequence();
+ _vm->_gnap->updateIdleSequence();
if (_vm->_debugLevel == 4)
_vm->updateIdleTimer();
if (!_vm->_timers[5]) {
@@ -2920,8 +2920,8 @@ void Scene28::run() {
_vm->playSound(0x1093C, true);
if (!_vm->_isLeavingScene) {
- _vm->updatePlatypusIdleSequence();
- _vm->updateGnapIdleSequence();
+ _vm->_plat->updateIdleSequence();
+ _vm->_gnap->updateIdleSequence();
if (!_vm->_timers[4]) {
_vm->_timers[4] = _vm->getRandom(20) + 80;
if (_vm->_gnap->_actionStatus < 0 && !_vm->isFlag(kGFUnk21))
@@ -3276,8 +3276,8 @@ void Scene29::run() {
if (!_vm->_isLeavingScene) {
if (_vm->_gnap->_actionStatus < 0) {
- _vm->updateGnapIdleSequence();
- _vm->updatePlatypusIdleSequence();
+ _vm->_gnap->updateIdleSequence();
+ _vm->_plat->updateIdleSequence();
}
if (!_vm->_timers[4]) {
if (_vm->invHas(kItemHorn)) {
diff --git a/engines/gnap/scenes/group3.cpp b/engines/gnap/scenes/group3.cpp
index ec17be422e..b00224ba9c 100644
--- a/engines/gnap/scenes/group3.cpp
+++ b/engines/gnap/scenes/group3.cpp
@@ -171,9 +171,9 @@ void Scene30::run() {
_vm->playSound(0x1093B, true);
if (!_vm->_isLeavingScene) {
- _vm->updatePlatypusIdleSequence();
+ _vm->_plat->updateIdleSequence();
if (_vm->_gnap->_actionStatus < 0)
- _vm->updateGnapIdleSequence();
+ _vm->_gnap->updateIdleSequence();
if (!_vm->_timers[4]) {
_vm->_timers[4] = _vm->getRandom(100) + 300;
if (_vm->_gnap->_actionStatus < 0) {
@@ -486,9 +486,9 @@ void Scene31::run() {
if (!_vm->_isLeavingScene) {
if (_vm->_plat->_actionStatus < 0)
- _vm->updatePlatypusIdleSequence();
+ _vm->_plat->updateIdleSequence();
if (_vm->_gnap->_actionStatus < 0)
- _vm->updateGnapIdleSequence();
+ _vm->_gnap->updateIdleSequence();
if (!_vm->_timers[4]) {
_vm->_timers[4] = _vm->getRandom(20) + 60;
if (_vm->_gnap->_actionStatus < 0 && _nextClerkSequenceId == -1) {
@@ -752,9 +752,9 @@ void Scene32::run() {
if (!_vm->_isLeavingScene) {
if (_vm->_plat->_actionStatus < 0)
- _vm->updatePlatypusIdleSequence();
+ _vm->_plat->updateIdleSequence();
if (_vm->_gnap->_actionStatus < 0)
- _vm->updateGnapIdleSequence();
+ _vm->_gnap->updateIdleSequence();
if (!_vm->_timers[4]) {
_vm->_timers[4] = _vm->getRandom(100) + 300;
if (_vm->getRandom(2) != 0)
@@ -983,9 +983,9 @@ void Scene33::run() {
if (!_vm->_isLeavingScene) {
if (_vm->_plat->_actionStatus < 0)
- _vm->updatePlatypusIdleSequence();
+ _vm->_plat->updateIdleSequence();
if (_vm->_gnap->_actionStatus < 0)
- _vm->updateGnapIdleSequence();
+ _vm->_gnap->updateIdleSequence();
if (!_vm->_timers[4]) {
_vm->_timers[4] = _vm->getRandom(100) + 300;
if (_vm->getRandom(2) != 0)
@@ -1260,8 +1260,8 @@ void Scene38::run() {
updateAnimations();
if (!_vm->_isLeavingScene) {
- _vm->updatePlatypusIdleSequence();
- _vm->updateGnapIdleSequence();
+ _vm->_plat->updateIdleSequence();
+ _vm->_gnap->updateIdleSequence();
}
_vm->checkGameKeys();
@@ -1531,9 +1531,9 @@ void Scene39::run() {
if (!_vm->_isLeavingScene) {
if (_vm->_plat->_actionStatus < 0)
- _vm->updatePlatypusIdleSequence();
+ _vm->_plat->updateIdleSequence();
if (_vm->_gnap->_actionStatus < 0)
- _vm->updateGnapIdleSequence();
+ _vm->_gnap->updateIdleSequence();
if (!_vm->_timers[5]) {
_vm->_timers[5] = _vm->getRandom(20) + 50;
switch (_vm->getRandom(4)) {
diff --git a/engines/gnap/scenes/group4.cpp b/engines/gnap/scenes/group4.cpp
index 9d731c0b9f..6ec914db59 100644
--- a/engines/gnap/scenes/group4.cpp
+++ b/engines/gnap/scenes/group4.cpp
@@ -511,9 +511,9 @@ void Scene41::run() {
if (!_vm->_isLeavingScene) {
if (_vm->_plat->_actionStatus < 0)
- _vm->updatePlatypusIdleSequence();
+ _vm->_plat->updateIdleSequence();
if (_vm->_gnap->_actionStatus < 0 && !_vm->isFlag(kGFGnapControlsToyUFO))
- _vm->updateGnapIdleSequence();
+ _vm->_gnap->updateIdleSequence();
if (!_vm->_timers[4]) {
_vm->_timers[4] = _vm->getRandom(100) + 100;
if (_vm->_gnap->_actionStatus < 0 && _vm->_plat->_actionStatus < 0 && _vm->_toyUfoActionStatus == -1 && _nextToyVendorSequenceId == -1) {
@@ -979,9 +979,9 @@ void Scene42::run() {
if (!_vm->_isLeavingScene) {
if (_vm->_plat->_actionStatus < 0 && !_vm->isFlag(kGFGnapControlsToyUFO))
- _vm->updatePlatypusIdleSequence();
+ _vm->_plat->updateIdleSequence();
if (_vm->_gnap->_actionStatus < 0 && !_vm->isFlag(kGFGnapControlsToyUFO))
- _vm->updateGnapIdleSequence();
+ _vm->_gnap->updateIdleSequence();
if (!_vm->_timers[4]) {
_vm->_timers[4] = _vm->getRandom(20) + 30;
if (_vm->_gnap->_actionStatus < 0 && _vm->_plat->_actionStatus < 0 && _nextBBQVendorSequenceId == -1) {
@@ -1433,9 +1433,9 @@ void Scene43::run() {
if (!_vm->_isLeavingScene) {
if (_vm->_plat->_actionStatus < 0 && !_vm->isFlag(kGFGnapControlsToyUFO))
- _vm->updatePlatypusIdleSequence();
+ _vm->_plat->updateIdleSequence();
if (_vm->_gnap->_actionStatus < 0 && !_vm->isFlag(kGFGnapControlsToyUFO))
- _vm->updateGnapIdleSequence();
+ _vm->_gnap->updateIdleSequence();
if (!_vm->_timers[4] && (!_vm->isFlag(kGFGnapControlsToyUFO) || !_vm->isFlag(kGFGroceryStoreHatTaken))) {
_vm->_timers[4] = _vm->getRandom(100) + 100;
if (_vm->_gnap->_actionStatus < 0 && _vm->_plat->_actionStatus < 0 && _nextTwoHeadedGuySequenceId == -1) {
@@ -1915,9 +1915,9 @@ void Scene44::run() {
if (!_vm->_isLeavingScene) {
if (_vm->_plat->_actionStatus < 0 && !_vm->isFlag(kGFGnapControlsToyUFO) && _currKissingLadySequenceId != 0xF5)
- _vm->updatePlatypusIdleSequence();
+ _vm->_plat->updateIdleSequence();
if (_vm->_gnap->_actionStatus < 0 && !_vm->isFlag(kGFGnapControlsToyUFO))
- _vm->updateGnapIdleSequence();
+ _vm->_gnap->updateIdleSequence();
if (!_vm->_timers[4]) {
_vm->_timers[4] = _vm->getRandom(20) + 20;
if (_vm->_gnap->_actionStatus < 0 && _vm->_plat->_actionStatus < 0 && _nextKissingLadySequenceId == -1) {
@@ -2362,7 +2362,7 @@ void Scene45::run() {
_vm->toyUfoCheckTimer();
if (!_vm->_isLeavingScene && _vm->_gnap->_actionStatus < 0 && !_vm->isFlag(kGFGnapControlsToyUFO))
- _vm->updateGnapIdleSequence();
+ _vm->_gnap->updateIdleSequence();
_vm->checkGameKeys();
@@ -2691,9 +2691,9 @@ void Scene46::run() {
if (!_vm->_isLeavingScene) {
if (_vm->_plat->_actionStatus < 0 && !_vm->isFlag(kGFGnapControlsToyUFO))
- _vm->updatePlatypusIdleSequence();
+ _vm->_plat->updateIdleSequence();
if (_vm->_gnap->_actionStatus < 0 && !_vm->isFlag(kGFGnapControlsToyUFO))
- _vm->updateGnapIdleSequence();
+ _vm->_gnap->updateIdleSequence();
if (!_vm->_timers[4]) {
_vm->_timers[4] = _vm->getRandom(50) + 80;
if (_vm->_gnap->_actionStatus < 0 && _vm->_plat->_actionStatus < 0 && _nextItchyGuySequenceId == -1) {