diff options
author | Strangerke | 2014-03-24 19:16:52 +0100 |
---|---|---|
committer | Strangerke | 2014-03-24 19:16:52 +0100 |
commit | aef340c25a7c7cae2b0955549e412abf842e4f47 (patch) | |
tree | a6a81f77fd6d7030c03446c340e03cab37865944 /engines/mads/nebular | |
parent | 48e785c329937868b403869414344dbc78525a95 (diff) | |
download | scummvm-rg350-aef340c25a7c7cae2b0955549e412abf842e4f47.tar.gz scummvm-rg350-aef340c25a7c7cae2b0955549e412abf842e4f47.tar.bz2 scummvm-rg350-aef340c25a7c7cae2b0955549e412abf842e4f47.zip |
MADS: Implement Scene205::setup and Scene205::enter
Diffstat (limited to 'engines/mads/nebular')
-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_scenes.h | 6 | ||||
-rw-r--r-- | engines/mads/nebular/nebular_scenes2.cpp | 94 | ||||
-rw-r--r-- | engines/mads/nebular/nebular_scenes2.h | 11 |
5 files changed, 112 insertions, 2 deletions
diff --git a/engines/mads/nebular/globals_nebular.cpp b/engines/mads/nebular/globals_nebular.cpp index d2a82d50b0..adc58e66aa 100644 --- a/engines/mads/nebular/globals_nebular.cpp +++ b/engines/mads/nebular/globals_nebular.cpp @@ -50,6 +50,7 @@ Globals::Globals() { _v84264 = 0; _v84266 = 0; _v84268 = 0; + _v84274 = 0; } } // End of namespace Nebular diff --git a/engines/mads/nebular/globals_nebular.h b/engines/mads/nebular/globals_nebular.h index bbc235307f..95117a3389 100644 --- a/engines/mads/nebular/globals_nebular.h +++ b/engines/mads/nebular/globals_nebular.h @@ -48,7 +48,7 @@ public: int _v8; int _abortVal; uint32 _v8425C; - int _v84260, _v84262, _v84264, _v84266, _v84268; + int _v84260, _v84262, _v84264, _v84266, _v84268, _v84274; public: /** * Constructor diff --git a/engines/mads/nebular/nebular_scenes.h b/engines/mads/nebular/nebular_scenes.h index 6b2b101c62..895ee51cfa 100644 --- a/engines/mads/nebular/nebular_scenes.h +++ b/engines/mads/nebular/nebular_scenes.h @@ -44,6 +44,7 @@ enum Noun { NOUN_2C = 0x2C, NOUN_BURGER = 0x35, NOUN_CHAIR = 0x47, + NOUN_49 = 0x49, NOUN_4E = 0x4E, NOUN_DEAD_FISH = 0x65, NOUN_DOOR = 0x6E, @@ -70,6 +71,7 @@ enum Noun { NOUN_OUTER_HULL = 0x0F8, NOUN_OUTSIDE = 0x0F9, NOUN_PEER_THROUGH = 0x103, + NOUN_10D = 0x10D, NOUN_PLANT_STALK = 0x10F, NOUN_READ = 0x11F, NOUN_REFRIDGERATOR = 0x122, @@ -109,7 +111,7 @@ protected: MADSAction &_action; /** - * Forms an animation resoucre name + * Forms an animation resource name */ Common::String formAnimName(char sepChar, int suffixNum); @@ -122,6 +124,8 @@ public: * Constructor */ NebularScene(MADSEngine *vm); + + void sub7178C(); }; class SceneInfoNebular : public SceneInfo { diff --git a/engines/mads/nebular/nebular_scenes2.cpp b/engines/mads/nebular/nebular_scenes2.cpp index 65a285860a..c6ae09c51d 100644 --- a/engines/mads/nebular/nebular_scenes2.cpp +++ b/engines/mads/nebular/nebular_scenes2.cpp @@ -1087,5 +1087,99 @@ void Scene203::actions() { _action._inProgress = false; } +/*****************************************************************************/ + +void Scene205::setup() { + setPlayerSpritesPrefix(); + setAAName(); + _scene->addActiveVocab(NOUN_D); + _scene->addActiveVocab(NOUN_49); + _scene->addActiveVocab(NOUN_10D); +} + +void Scene205::enter() { + _globals._spriteIndexes[1] = _scene->_sprites.addSprites(formAnimName('x', 0), 0); + _globals._spriteIndexes[2] = _scene->_sprites.addSprites(formAnimName('x', 1), 0); + _globals._spriteIndexes[3] = _scene->_sprites.addSprites(formAnimName('x', 2), 0); + _globals._spriteIndexes[5] = _scene->_sprites.addSprites(formAnimName('f', -1), 0); + _globals._spriteIndexes[4] = _scene->_sprites.addSprites(formAnimName('c', -1), 0); + _globals._spriteIndexes[6] = _scene->_sprites.addSprites(formAnimName('p', -1), 0); + + if (_globals[0] == SEX_MALE) + _globals._spriteIndexes[8] = _scene->_sprites.addSprites(formAnimName('a', 1), 0); + + _globals._spriteIndexes[16] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[1], false, 10, 0, 0, 3); + int idx = _scene->_dynamicHotspots.add(73, 13, _globals._spriteIndexes[16], Common::Rect(0, 0, 0, 0)); + _scene->_dynamicHotspots.setPosition(idx, 162, 120, 9); + + _globals._spriteIndexes[17] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[2], false, 15, 0, 0, 0); + idx = _scene->_dynamicHotspots.add(73, 13, _globals._spriteIndexes[16], Common::Rect(0, 0, 0, 0)); + _scene->_dynamicHotspots.setPosition(idx, 162, 120, 9); + + _globals._spriteIndexes[18] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[3], false, 9, 0, 0, 0); + _globals._spriteIndexes[20] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[5], false, 6, 0, 0, 0); + _scene->_sequences.setDepth(_globals._spriteIndexes[20], 11); + + if (!_game._visitedScenes._sceneRevisited) { + _globals._v2 = _scene->_frameStartTime & 0xFFFF; + _globals._v3 = _scene->_frameStartTime >> 16; + _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, 8); + } + + if (_game._objects[12]._roomNumber == 0) { + _globals._spriteIndexes[19] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[4], false, 7, 0, 0, 0); + _scene->_sequences.setDepth(_globals._spriteIndexes[19], 11); + } else { + _scene->_hotspots.activate(450, false); + } + + _globals._frameTime &= 0xFFFF; + _game.loadQuoteSet(0x6B, 0x70, 0x71, 0x72, 0x5A, 0x74, 0x75, 0x76, 0x77, 0x78, 0x73, 0x79, 0x7A, 0x7B, 0x7C, + 0x7D, 0x7E, 0x7F, 0x80, 0xAC, 0xAD, 0xAE, 0x6C, 0x6D, 0x6E, 0x6F, 0x2, 0); + warning("TODO: sub71A50(_globals._v4, 0x5A, 0x78, 0x74, 0x75, 0x76, 0x77, 0);"); + + if (!_game._visitedScenes._sceneRevisited) + warning("TODO: sub71B18(_globals._v4, 0x5A, 0x74, 0x75, 0x77, 0);"); + + + _vm->_palette->setEntry(250, 63, 50, 20); + _vm->_palette->setEntry(251, 50, 40, 15); + _vm->_palette->setEntry(252, 63, 63, 40); + _vm->_palette->setEntry(253, 50, 50, 30); + + _globals._v0 = _globals._frameTime & 0xFFFF; + _globals._frameTime >>= 16; + + if (_globals[0] == SEX_FEMALE) + warning("sub71704(0x3, 0xC3, 0x108, 0x63, 0x86, 0xD, 2, 0xFDFC, 0x3C, 0x6C, 0x6C, 0x6D, 0x6D, 0x6E, 0x6E, 0x6F, 0x6C, 0);"); + + if (_scene->_priorSceneId != -2) + _game._player._playerPos = Common::Point(99, 152); + + if (_globals[0] != SEX_MALE) { + _scene->loadAnimation(formAnimName('a', -1), 0); + _scene->_activeAnimation->_resetFlag = false; + } else { + _globals._frameTime |= 0xFFFF0000; + _globals._spriteIndexes[23] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[8], false, 8, 1, 0, 0); + _game._player._visible = false; + _game._player._stepEnabled = false; + _scene->_sequences.setDepth(_globals._spriteIndexes[23], 2); + _scene->_sequences.addSubEntry(_globals._spriteIndexes[23], SM_FRAME_INDEX, 6, 73); + _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() { +} + +void Scene205::actions() { +} + } // End of namespace Nebular } // End of namespace MADS diff --git a/engines/mads/nebular/nebular_scenes2.h b/engines/mads/nebular/nebular_scenes2.h index b49cf96809..5346b34d08 100644 --- a/engines/mads/nebular/nebular_scenes2.h +++ b/engines/mads/nebular/nebular_scenes2.h @@ -89,6 +89,17 @@ public: virtual void actions(); virtual void postActions() {}; }; + +class Scene205: public Scene2xx { +public: + Scene205(MADSEngine *vm) : Scene2xx(vm) {} + virtual void setup(); + virtual void enter(); + virtual void step(); + virtual void preActions() {}; + virtual void actions(); + virtual void postActions() {}; +}; } // End of namespace Nebular } // End of namespace MADS |