diff options
author | Strangerke | 2014-03-28 23:23:46 +0100 |
---|---|---|
committer | Strangerke | 2014-03-28 23:23:46 +0100 |
commit | 5abec8506bc1e6ad5617544b76bd2cc4f42dcc5b (patch) | |
tree | dcabf20101ab577d6cba571e6f5262aa7fea3315 /engines | |
parent | 5df6ff9329c46bf4df8fc4dcaa378959eab1d8ee (diff) | |
download | scummvm-rg350-5abec8506bc1e6ad5617544b76bd2cc4f42dcc5b.tar.gz scummvm-rg350-5abec8506bc1e6ad5617544b76bd2cc4f42dcc5b.tar.bz2 scummvm-rg350-5abec8506bc1e6ad5617544b76bd2cc4f42dcc5b.zip |
MADS: Some work on scene 205
Diffstat (limited to 'engines')
-rw-r--r-- | engines/mads/nebular/globals_nebular.cpp | 1 | ||||
-rw-r--r-- | engines/mads/nebular/globals_nebular.h | 2 | ||||
-rw-r--r-- | engines/mads/nebular/nebular_scenes2.cpp | 52 | ||||
-rw-r--r-- | engines/mads/nebular/nebular_scenes2.h | 4 |
4 files changed, 49 insertions, 10 deletions
diff --git a/engines/mads/nebular/globals_nebular.cpp b/engines/mads/nebular/globals_nebular.cpp index c0df8007d9..e2886ee293 100644 --- a/engines/mads/nebular/globals_nebular.cpp +++ b/engines/mads/nebular/globals_nebular.cpp @@ -52,7 +52,6 @@ Globals::Globals() { _v84264 = 0; _v84266 = 0; _v84268 = 0; - _v84274 = 0; } void Globals::reset() { diff --git a/engines/mads/nebular/globals_nebular.h b/engines/mads/nebular/globals_nebular.h index 703dc1b62a..eebbd8ed25 100644 --- a/engines/mads/nebular/globals_nebular.h +++ b/engines/mads/nebular/globals_nebular.h @@ -295,7 +295,7 @@ public: int _v8; int _abortVal; uint32 _v8425C; - int _v84260, _v84262, _v84264, _v84266, _v84268, _v84274; + 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 4f404f6a6e..d6ce493017 100644 --- a/engines/mads/nebular/nebular_scenes2.cpp +++ b/engines/mads/nebular/nebular_scenes2.cpp @@ -1112,14 +1112,13 @@ void Scene205::enter() { _scene->_sequences.setDepth(_globals._spriteIndexes[20], 11); if (!_game._visitedScenes._sceneRevisited) { - _globals._v2 = _scene->_frameStartTime & 0xFFFF; - _globals._v3 = _scene->_frameStartTime >> 16; + _lastFishTime = _scene->_frameStartTime; _globals._spriteIndexes[21] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[6], false, 7, 1, 0, 0); idx = _scene->_dynamicHotspots.add(269, 13, _globals._spriteIndexes[21], Common::Rect(0, 0, 0, 0)); _scene->_dynamicHotspots.setPosition(idx, 49, 86, FACING_NORTH); } - if (_game._objects[12]._roomNumber == 0) { + if (_game._objects[12]._roomNumber == 205) { _globals._spriteIndexes[19] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[4], false, 7, 0, 0, 0); _scene->_sequences.setDepth(_globals._spriteIndexes[19], 11); } else { @@ -1140,8 +1139,7 @@ void Scene205::enter() { _vm->_palette->setEntry(252, 63, 63, 40); _vm->_palette->setEntry(253, 50, 50, 30); - _globals._v0 = _globals._frameTime & 0xFFFF; - _globals._frameTime >>= 16; + _chickenTime = _globals._frameTime; if (_globals[kSexOfRex] == SEX_FEMALE) warning("sub71704(0x3, 0xC3, 0x108, 0x63, 0x86, 0xD, 2, 0xFDFC, 0x3C, 0x6C, 0x6C, 0x6D, 0x6D, 0x6E, 0x6E, 0x6F, 0x6C, 0);"); @@ -1162,12 +1160,52 @@ void Scene205::enter() { _scene->_sequences.addSubEntry(_globals._spriteIndexes[23], SM_FRAME_INDEX, 11, 74); _scene->_sequences.addSubEntry(_globals._spriteIndexes[23], SM_0, 0, 0); } - _globals._v84274 = -1; sceneEntrySound(); } void Scene205::step() { - warning("TODO: Scene205::step"); + if (_globals[kSexOfRex] == SEX_FEMALE) { + warning("TODO: sub7178C()"); + + if (_globals._frameTime >= _chickenTime) { + warning("minVal = 1 + sub7176C();"); + int minVal = 1; + + warning("TODO: sub717B2(100, minVal);"); +// if (sub717B2(100, minVal)) { + _vm->_sound->command(28); +// } + _chickenTime = _globals._frameTime + 2; + } + } + + if (_globals._frameTime - _lastFishTime > 1300) { + _globals._spriteIndexes[21] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[6], false, 5, 1, 0, 0); + int idx = _scene->_dynamicHotspots.add(269, 13, _globals._spriteIndexes[21], Common::Rect(0, 0, 0, 0)); + _scene->_dynamicHotspots.setPosition(idx, 49, 86, FACING_NORTH); + _lastFishTime = _globals._frameTime; + } + + if (_game._trigger == 73) { + _scene->_kernelMessages.add(Common::Point(160, 68), 0xFBFA, 32, 0, 60, _game.getQuote(112)); + } + + if (_game._trigger == 74) { + _vm->_sound->command(26); + _scene->_kernelMessages.add(Common::Point(106, 90), 0x1110, 32, 0, 60, _game.getQuote(113)); + } + + if (_game._trigger == 71) { + _globals._spriteIndexes[23] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[8], false, 6, 0, 0, 0); + _scene->_sequences.setDepth(_globals._spriteIndexes[23], 2); + _scene->_sequences.setAnimRange(_globals._spriteIndexes[23], -2, -2); + _scene->_kernelMessages.reset(); + _scene->_kernelMessages.add(Common::Point(160, 68), 0xFBFA, 32, 72, 180, _game.getQuote(114)); + } + + if (_game._trigger == 72) { + _scene->_nextSceneId = 211; + } } void Scene205::actions() { diff --git a/engines/mads/nebular/nebular_scenes2.h b/engines/mads/nebular/nebular_scenes2.h index 40ccae62d7..143b24c22f 100644 --- a/engines/mads/nebular/nebular_scenes2.h +++ b/engines/mads/nebular/nebular_scenes2.h @@ -98,8 +98,10 @@ public: }; class Scene205: public Scene2xx { + uint32 _lastFishTime, _chickenTime; public: - Scene205(MADSEngine *vm) : Scene2xx(vm) {} + Scene205(MADSEngine *vm) : Scene2xx(vm), _lastFishTime(0), _chickenTime(0) {} + virtual void setup(); virtual void enter(); virtual void step(); |