From ba61f90eb6324ceb9f6759a78de06136d1c3be5b Mon Sep 17 00:00:00 2001 From: Strangerke Date: Fri, 20 May 2016 01:21:22 +0200 Subject: GNAP: Rework the code of Scene07::run, remove an obsolete todo --- engines/gnap/scenes/group0.cpp | 29 ++++++++++------------------- 1 file changed, 10 insertions(+), 19 deletions(-) (limited to 'engines/gnap/scenes/group0.cpp') 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 { -- cgit v1.2.3