aboutsummaryrefslogtreecommitdiff
path: root/engines/gnap
diff options
context:
space:
mode:
authorStrangerke2016-05-20 01:21:22 +0200
committerStrangerke2016-05-20 01:21:22 +0200
commitba61f90eb6324ceb9f6759a78de06136d1c3be5b (patch)
tree7b3b61153ffb4b8d1a445d5473b679383bf37c32 /engines/gnap
parent9a2bc3c5720e807978fa8a302b5b3c532fb62d30 (diff)
downloadscummvm-rg350-ba61f90eb6324ceb9f6759a78de06136d1c3be5b.tar.gz
scummvm-rg350-ba61f90eb6324ceb9f6759a78de06136d1c3be5b.tar.bz2
scummvm-rg350-ba61f90eb6324ceb9f6759a78de06136d1c3be5b.zip
GNAP: Rework the code of Scene07::run, remove an obsolete todo
Diffstat (limited to 'engines/gnap')
-rw-r--r--engines/gnap/gnap.cpp1
-rw-r--r--engines/gnap/scenes/group0.cpp29
2 files changed, 10 insertions, 20 deletions
diff --git a/engines/gnap/gnap.cpp b/engines/gnap/gnap.cpp
index 9af8128c06..541d062efb 100644
--- a/engines/gnap/gnap.cpp
+++ b/engines/gnap/gnap.cpp
@@ -246,7 +246,6 @@ void GnapEngine::gameUpdateTick() {
_sceneDone = true;
}
- // TODO Improve this (variable frame delay to keep ~15fps)
int currClock = _system->getMillis();
if (currClock >= _lastUpdateClock + 66) {
_gameSys->fatUpdate();
diff --git a/engines/gnap/scenes/group0.cpp b/engines/gnap/scenes/group0.cpp
index dfc6d7a739..729ef96f64 100644
--- a/engines/gnap/scenes/group0.cpp
+++ b/engines/gnap/scenes/group0.cpp
@@ -2830,28 +2830,19 @@ void Scene07::run() {
if (!_vm->_timers[1]) {
_vm->_timers[1] = _vm->getRandom(20) + 30;
int gnapRandomValue = _vm->getRandom(20);
- // TODO Cleanup
if (plat._idleFacing != kDirNone) {
- if (gnapRandomValue != 0 || plat._sequenceId != 0x7CA) {
- if (gnapRandomValue != 1 || plat._sequenceId != 0x7CA) {
- if (plat._pos.y == 9)
- plat.playSequence(0x107CA);
- } else {
- plat.playSequence(0x10845);
- }
- } else {
+ if (gnapRandomValue == 0 && plat._sequenceId == 0x7CA)
plat.playSequence(0x107CC);
- }
- } else if (gnapRandomValue != 0 || plat._sequenceId != 0x7C9) {
- if (gnapRandomValue != 1 || plat._sequenceId != 0x7C9) {
- if (plat._pos.y == 9)
- plat.playSequence(0x107C9);
- } else {
+ else if (gnapRandomValue == 1 && plat._sequenceId == 0x7CA)
+ plat.playSequence(0x10845);
+ else if (plat._pos.y == 9)
+ plat.playSequence(0x107CA);
+ } else if (gnapRandomValue == 0 && plat._sequenceId == 0x7C9)
+ plat.playSequence(0x107CB);
+ else if (gnapRandomValue == 1 && plat._sequenceId == 0x7C9)
plat.playSequence(0x10844);
- }
- } else {
- plat.playSequence(0x107CB);
- }
+ else if (plat._pos.y == 9)
+ plat.playSequence(0x107C9);
gameSys.setAnimation(plat._sequenceId | (plat._sequenceDatNum << 16), plat._id, 1);
}
} else {