From 373b67e5be7688f5dd904c81a4a9702bf131c032 Mon Sep 17 00:00:00 2001 From: Strangerke Date: Mon, 19 May 2014 22:41:27 +0200 Subject: MADS: Some refactoring in scene 402 --- engines/mads/nebular/nebular_scenes4.cpp | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-) (limited to 'engines') diff --git a/engines/mads/nebular/nebular_scenes4.cpp b/engines/mads/nebular/nebular_scenes4.cpp index e8e9596e9d..79352fbb00 100644 --- a/engines/mads/nebular/nebular_scenes4.cpp +++ b/engines/mads/nebular/nebular_scenes4.cpp @@ -1232,13 +1232,8 @@ void Scene402::step() { break; case 53: - if (_bigBeatFl) { - _scene->_sequences.remove(_globals._sequenceIndexes[5]); - _globals._sequenceIndexes[5] = _scene->_sequences.startCycle(_globals._spriteIndexes[5], false, 1); - } else { - _scene->_sequences.remove(_globals._sequenceIndexes[5]); - _globals._sequenceIndexes[5] = _scene->_sequences.startCycle(_globals._spriteIndexes[5], false, 1); - } + _scene->_sequences.remove(_globals._sequenceIndexes[5]); + _globals._sequenceIndexes[5] = _scene->_sequences.startCycle(_globals._spriteIndexes[5], false, 1); _scene->_sequences.setDepth(_globals._sequenceIndexes[5], 1); _waitingGinnyMove = false; break; @@ -1378,14 +1373,12 @@ void Scene402::step() { } } - if (!_blowingSmoke) { - if (_vm->getRandomNumber(1, 300) == 1) { - _globals._sequenceIndexes[1] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[1], false, 8, 1, 0, 0); - _scene->_sequences.setAnimRange(_globals._sequenceIndexes[1], 1, 14); - _scene->_sequences.setDepth(_globals._sequenceIndexes[1], 14); - _scene->_sequences.addSubEntry(_globals._sequenceIndexes[1], SEQUENCE_TRIGGER_EXPIRE, 0, 30); - _blowingSmoke = true; - } + if (!_blowingSmoke && (_vm->getRandomNumber(1, 300) == 1)) { + _globals._sequenceIndexes[1] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[1], false, 8, 1, 0, 0); + _scene->_sequences.setAnimRange(_globals._sequenceIndexes[1], 1, 14); + _scene->_sequences.setDepth(_globals._sequenceIndexes[1], 14); + _scene->_sequences.addSubEntry(_globals._sequenceIndexes[1], SEQUENCE_TRIGGER_EXPIRE, 0, 30); + _blowingSmoke = true; } switch (_game._trigger) { -- cgit v1.2.3