diff options
author | Strangerke | 2014-03-22 22:30:45 +0100 |
---|---|---|
committer | Strangerke | 2014-03-22 22:30:45 +0100 |
commit | 2ac614d898159096933df061c5c0bd221cf8d16b (patch) | |
tree | 1956147bca3b914d23956cd774ed97e3caf1467d /engines | |
parent | c42e831817d3eef04f493c08cd288dfe41f764e6 (diff) | |
download | scummvm-rg350-2ac614d898159096933df061c5c0bd221cf8d16b.tar.gz scummvm-rg350-2ac614d898159096933df061c5c0bd221cf8d16b.tar.bz2 scummvm-rg350-2ac614d898159096933df061c5c0bd221cf8d16b.zip |
MADS: Add some variables in / move a variable to _globals
Diffstat (limited to 'engines')
-rw-r--r-- | engines/mads/nebular/globals_nebular.cpp | 6 | ||||
-rw-r--r-- | engines/mads/nebular/globals_nebular.h | 2 | ||||
-rw-r--r-- | engines/mads/nebular/nebular_scenes2.cpp | 71 | ||||
-rw-r--r-- | engines/mads/scene.cpp | 1 | ||||
-rw-r--r-- | engines/mads/scene.h | 1 |
5 files changed, 38 insertions, 43 deletions
diff --git a/engines/mads/nebular/globals_nebular.cpp b/engines/mads/nebular/globals_nebular.cpp index 31b7940d19..d2a82d50b0 100644 --- a/engines/mads/nebular/globals_nebular.cpp +++ b/engines/mads/nebular/globals_nebular.cpp @@ -44,6 +44,12 @@ Globals::Globals() { _v7 = 0; _v8 = 0; _abortVal = 0; + _v8425C = 0; + _v84260 = 0; + _v84262 = 0; + _v84264 = 0; + _v84266 = 0; + _v84268 = 0; } } // End of namespace Nebular diff --git a/engines/mads/nebular/globals_nebular.h b/engines/mads/nebular/globals_nebular.h index f7e28fc59a..bbc235307f 100644 --- a/engines/mads/nebular/globals_nebular.h +++ b/engines/mads/nebular/globals_nebular.h @@ -47,6 +47,8 @@ public: uint32 _v7; int _v8; int _abortVal; + uint32 _v8425C; + int _v84260, _v84262, _v84264, _v84266, _v84268; public: /** * Constructor diff --git a/engines/mads/nebular/nebular_scenes2.cpp b/engines/mads/nebular/nebular_scenes2.cpp index cc896c6015..503e0317af 100644 --- a/engines/mads/nebular/nebular_scenes2.cpp +++ b/engines/mads/nebular/nebular_scenes2.cpp @@ -418,7 +418,7 @@ void Scene202::enter() { _globals._v4 = 0; } - _game._scene._v8425C = _globals._v7 = _scene->_frameStartTime; + _globals._v8425C = _globals._v7 = _scene->_frameStartTime; if (_scene->_roomChanged) _game._objects.addToInventory(OBJ_NONE); @@ -483,7 +483,7 @@ void Scene202::step() { if (_game._abortTimers == 71) { _vm->_sound->command(3); _vm->_sound->command(9); - _game._scene._v8425C = 900 + _scene->_frameStartTime; + _globals._v8425C = 900 + _scene->_frameStartTime; Common::Point msgPos; int msgFlag; if (_globals._v4 == 0) { @@ -554,7 +554,7 @@ void Scene202::step() { break; } - if (!_scene->_activeAnimation && (_globals[33] != 2) && (_globals._v7 <= _scene->_frameStartTime) && (_game._scene._v8425C <= _scene->_frameStartTime)) { + if (!_scene->_activeAnimation && (_globals[33] != 2) && (_globals._v7 <= _scene->_frameStartTime) && (_globals._v8425C <= _scene->_frameStartTime)) { int randVal = _vm->getRandomNumber(1, 500); int threshold = 1; if (_globals._v4) @@ -564,13 +564,13 @@ void Scene202::step() { if (threshold >= randVal) { _vm->_sound->command(17); _scene->loadAnimation(formAnimName('M', -1), 71); - warning("TODO: word84266 = -1;"); - warning("TODO: word84268 = 0;"); + _globals._v84266 = -1; + _globals._v84268 = 0; _globals[37] = true; _globals._v6 = _scene->_frameStartTime; _globals._v8 = 0; - warning("TODO: _timerIndex = 0;"); - warning("TODO: word84264 = 0;"); + _globals._v84262 = 0; + _globals._v84264 = 0; _globals._v7 = _scene->_frameStartTime + 2; } } @@ -588,8 +588,7 @@ void Scene202::step() { } } - if (_scene->_activeAnimation->getCurrentFrame() == 160) { - warning("TODO: && (word84260 != _scene->_activeAnimation->getCurrentFrame()) {"); + if ((_scene->_activeAnimation->getCurrentFrame() == 160) && (_globals._v84260 != _scene->_activeAnimation->getCurrentFrame())) { Common::Point msgPos; int msgFlag; if (_globals._v4 == 0) { @@ -605,15 +604,14 @@ void Scene202::step() { } if (_globals._v7 + 7200 <= _scene->_frameStartTime) { - warning("TODO: word84268 = -1;"); + _globals._v84268 = -1; } - warning("TODO: if (_scene->_activeAnimation->getCurrentFrame() == word84260) {"); -// if (_scene->_activeAnimation->getCurrentFrame() == word84260) { -// return; -// } + if (_scene->_activeAnimation->getCurrentFrame() == _globals._v84260) { + return; + } - warning("TODO: word84260 = _scene->_activeAnimation->getCurrentFrame();"); + _globals._v84260 = _scene->_activeAnimation->getCurrentFrame(); int randVal = _vm->getRandomNumber(1, 1000); int frameStep = -1; @@ -636,18 +634,18 @@ void Scene202::step() { frameStep = subStep4(randVal); break; case 59: - warning("TODO: _timerIndex = 3;"); - warning("TODO: ++word84264;"); + _globals._v84262 = 3; + ++_globals._v84264; if (randVal <= 800) frameStep = 55; break; case 89: - warning("TODO: _timerIndex = 1;"); + _globals._v84262 = 1; if (randVal <= 700) frameStep = 83; break; case 137: - warning("TODO: _timerIndex = 2;"); + _globals._v84262 = 2; if (randVal <= 700) frameStep = 126; break; @@ -659,37 +657,32 @@ void Scene202::step() { int nextFrame = 1 + _scene->_activeAnimation->getCurrentFrame() - frameStep; if (nextFrame) { _scene->_activeAnimation->setCurrentFrame(nextFrame); - warning("word84260 = nextFrame"); + _globals._v84260 = nextFrame; } } int Scene202::subStep1(int randVal) { - warning("TODO: word84264 = 0;"); + _globals._v84264 = 0; - warning("TODO: if ((randVal <= 100) || (word84266 != 0))"); - if (randVal <= 100) + if ((randVal <= 100) || (_globals._v84266 != 0)) return 42; - warning("TODO: if ((randVal <= 200) || (word84268 != 0))"); - if (randVal <= 200) + if ((randVal <= 200) || (_globals._v84268 != 0)) return 96; - warning("TODO: if ((randVal <= 300) && (_timerIndex != 1))"); - if (randVal <= 300) + if ((randVal <= 300) && (_globals._v84262 != 1)) return 77; return 76; } int Scene202::subStep2(int randVal) { - warning("TODO: word84266 = 0;"); + _globals._v84266 = 0; - warning("TODO: if ((randVal <= 150) && (word84264 < 5)"); - if (randVal <= 150) + if ((randVal <= 150) && (_globals._v84264 < 5)) return 51; - warning("TODO: if ((randVal <= 300) || word84268)"); - if (randVal <= 300) + if ((randVal <= 300) || _globals._v84268) return 74; if (randVal <= 400) @@ -699,24 +692,20 @@ int Scene202::subStep2(int randVal) { } int Scene202::subStep3(int randVal) { - warning("TODO: if ((randVal <= 100) || (word84266 != 0))"); - if (randVal <= 100) + if ((randVal <= 100) || (_globals._v84266 != 0)) return 27; - warning("TODO: if ((randVal <= 200) || (word84268 != 0))"); - if (randVal <= 200) + if ((randVal <= 200) || (_globals._v84268 != 0)) return 159; - warning("TODO: if ((randVal <= 300) && (_timerIndex != 2))"); - if (randVal <= 300) + if ((randVal <= 300) && (_globals._v84262 != 2)) return 119; return 110; } int Scene202::subStep4(int randVal) { - warning("TODO: if ((randVal <= 100) || (word84268 != 0))"); - if (randVal <= 100) + if ((randVal <= 100) || (_globals._v84268 != 0)) return 176; if (randVal <= 200) @@ -884,7 +873,7 @@ void Scene202::actions() { } } else { if (_game._abortTimers == 0) { - warning("TODO: word_84268 = 1;"); + _globals._v84268 = 1; _game._player._stepEnabled = false; _scene->_sequences.remove(_globals._spriteIndexes[24]); _globals._spriteIndexes[24] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[9], true, 6, 1, 0, 0); diff --git a/engines/mads/scene.cpp b/engines/mads/scene.cpp index 9ad494d07d..e01720f788 100644 --- a/engines/mads/scene.cpp +++ b/engines/mads/scene.cpp @@ -48,7 +48,6 @@ Scene::Scene(MADSEngine *vm): _vm(vm), _action(_vm), _depthSurface(vm), _activeAnimation = nullptr; _textSpacing = -1; _frameStartTime = 0; - _v8425C = 0; _layer = LAYER_GUI; _lookFlag = false; _highlightedHotspot = 0; diff --git a/engines/mads/scene.h b/engines/mads/scene.h index 787c5e0951..a51d820d1c 100644 --- a/engines/mads/scene.h +++ b/engines/mads/scene.h @@ -117,7 +117,6 @@ public: int _destFacing; Common::Point _posAdjust; uint32 _frameStartTime; - uint32 _v8425C; Layer _layer; bool _lookFlag; int _highlightedHotspot; |