diff options
author | Strangerke | 2016-03-20 19:15:59 +0100 |
---|---|---|
committer | Eugene Sandulenko | 2016-05-10 09:54:21 +0200 |
commit | 6d1a6738f49e195276089666db166b17285bcce3 (patch) | |
tree | 119c8a613565b27cad77b6a67d19908dde069e9e | |
parent | 8cb4bd830c7acb921f1f8abc062d76f8a2da1ea1 (diff) | |
download | scummvm-rg350-6d1a6738f49e195276089666db166b17285bcce3.tar.gz scummvm-rg350-6d1a6738f49e195276089666db166b17285bcce3.tar.bz2 scummvm-rg350-6d1a6738f49e195276089666db166b17285bcce3.zip |
GNAP: Some renaming in scene 45, change a global variable to local
-rw-r--r-- | engines/gnap/gnap.h | 3 | ||||
-rw-r--r-- | engines/gnap/scenes/scene45.cpp | 22 |
2 files changed, 12 insertions, 13 deletions
diff --git a/engines/gnap/gnap.h b/engines/gnap/gnap.h index f124897876..873255bafa 100644 --- a/engines/gnap/gnap.h +++ b/engines/gnap/gnap.h @@ -883,8 +883,7 @@ public: void scene44_updateAnimations(); // Scene 45 - int _s45_dword_4749BC; - int _s45_dword_4749C0; + int _currDancerSequenceId; int scene45_init(); void scene45_updateHotspots(); void scene45_run(); diff --git a/engines/gnap/scenes/scene45.cpp b/engines/gnap/scenes/scene45.cpp index 3e1b5299b9..a3dd758545 100644 --- a/engines/gnap/scenes/scene45.cpp +++ b/engines/gnap/scenes/scene45.cpp @@ -93,9 +93,9 @@ void GnapEngine::scene45_run() { _gameSys->setAnimation(0x96, 1, 3); _gameSys->insertSequence(0x99, 1, 0, 0, kSeqNone, 0, 0, 0); _gameSys->setAnimation(0x99, 1, 4); - _s45_dword_4749BC = 0x8F; - _gameSys->setAnimation(0x8F, 1, 2); - _gameSys->insertSequence(_s45_dword_4749BC, 1, 0, 0, kSeqNone, 0, 0, 0); + _currDancerSequenceId = 0x8F; + _gameSys->setAnimation(_currDancerSequenceId, 1, 2); + _gameSys->insertSequence(_currDancerSequenceId, 1, 0, 0, kSeqNone, 0, 0, 0); if (isFlag(12)) { _toyUfoId = 0; @@ -148,10 +148,10 @@ void GnapEngine::scene45_run() { if (_gameSys->getAnimationStatus(2) == 2) { _gameSys->setAnimation(0, 0, 2); _gnapRandomValue = getRandom(7); - _s45_dword_4749C0 = _gnapRandomValue + 0x8F; - _gameSys->insertSequence(_gnapRandomValue + 0x8F, 1, _s45_dword_4749BC, 1, kSeqSyncWait, 0, 0, 0); - _gameSys->setAnimation(_s45_dword_4749C0, 1, 2); - _s45_dword_4749BC = _s45_dword_4749C0; + int newSeqId = _gnapRandomValue + 0x8F; + _gameSys->insertSequence(_gnapRandomValue + 0x8F, 1, _currDancerSequenceId, 1, kSeqSyncWait, 0, 0, 0); + _gameSys->setAnimation(newSeqId, 1, 2); + _currDancerSequenceId = newSeqId; } if (_gameSys->getAnimationStatus(3) == 2 && _gameSys->getAnimationStatus(4) == 2) { _gameSys->insertSequence(0x96, 1, 0x96, 1, kSeqSyncWait, 0, 0, 0); @@ -394,10 +394,10 @@ void GnapEngine::scene45_updateAnimations() { if (_gameSys->getAnimationStatus(2) == 2) { _gameSys->setAnimation(0, 0, 2); _gnapRandomValue = getRandom(7); - _s45_dword_4749C0 = _gnapRandomValue + 0x8F; - _gameSys->insertSequence(_gnapRandomValue + 0x8F, 1, _s45_dword_4749BC, 1, kSeqSyncWait, 0, 0, 0); - _gameSys->setAnimation(_s45_dword_4749C0, 1, 2); - _s45_dword_4749BC = _s45_dword_4749C0; + int newSeqId = _gnapRandomValue + 0x8F; + _gameSys->insertSequence(_gnapRandomValue + 0x8F, 1, _currDancerSequenceId, 1, kSeqSyncWait, 0, 0, 0); + _gameSys->setAnimation(newSeqId, 1, 2); + _currDancerSequenceId = newSeqId; } if (_gameSys->getAnimationStatus(3) == 2 && _gameSys->getAnimationStatus(4) == 2) { |