diff options
author | Strangerke | 2011-12-05 23:42:45 +0100 |
---|---|---|
committer | Strangerke | 2011-12-05 23:42:45 +0100 |
commit | 63f245779c8cd95c18d65e5fd845fafce941116c (patch) | |
tree | ae3ab3471a25b57c3a211fab972dec83ee261a1f /engines/tsage | |
parent | d7df735c40128677b70a5890f289c0066b572ea5 (diff) | |
download | scummvm-rg350-63f245779c8cd95c18d65e5fd845fafce941116c.tar.gz scummvm-rg350-63f245779c8cd95c18d65e5fd845fafce941116c.tar.bz2 scummvm-rg350-63f245779c8cd95c18d65e5fd845fafce941116c.zip |
TSAGE: R2R - Implement scene 2400
Diffstat (limited to 'engines/tsage')
-rw-r--r-- | engines/tsage/ringworld2/ringworld2_logic.cpp | 1 | ||||
-rw-r--r-- | engines/tsage/ringworld2/ringworld2_scenes2.cpp | 62 | ||||
-rw-r--r-- | engines/tsage/ringworld2/ringworld2_scenes2.h | 19 |
3 files changed, 81 insertions, 1 deletions
diff --git a/engines/tsage/ringworld2/ringworld2_logic.cpp b/engines/tsage/ringworld2/ringworld2_logic.cpp index 079ac62928..b33bb65b80 100644 --- a/engines/tsage/ringworld2/ringworld2_logic.cpp +++ b/engines/tsage/ringworld2/ringworld2_logic.cpp @@ -101,6 +101,7 @@ Scene *Ringworld2Game::createScene(int sceneNumber) { // Balloon Launch Platform return new Scene2350(); case 2400: + return new Scene2400(); case 2425: case 2430: case 2435: diff --git a/engines/tsage/ringworld2/ringworld2_scenes2.cpp b/engines/tsage/ringworld2/ringworld2_scenes2.cpp index ee3153c0c8..ad45735dc2 100644 --- a/engines/tsage/ringworld2/ringworld2_scenes2.cpp +++ b/engines/tsage/ringworld2/ringworld2_scenes2.cpp @@ -1221,5 +1221,67 @@ void Scene2350::process(Event &event) { Scene::process(event); } +/*-------------------------------------------------------------------------- + * Scene 2400 - + * + *--------------------------------------------------------------------------*/ +void Scene2400::Exit1::changeScene() { + Scene2400 *scene = (Scene2400 *)R2_GLOBALS._sceneManager._scene; + + R2_GLOBALS._player.disableControl(); + scene->_sceneMode = 10; + + Common::Point pt(-10, 150); + NpcMover *mover = new NpcMover(); + R2_GLOBALS._player.addMover(mover, &pt, scene); + +} + +void Scene2400::Exit2::changeScene() { + Scene2400 *scene = (Scene2400 *)R2_GLOBALS._sceneManager._scene; + + R2_GLOBALS._player.disableControl(); + scene->_sceneMode = 11; + + Common::Point pt(330, 150); + NpcMover *mover = new NpcMover(); + R2_GLOBALS._player.addMover(mover, &pt, scene); +} + +void Scene2400::postInit(SceneObjectList *OwnerList) { + loadScene(2400); + SceneExt::postInit(); + _exit1.setDetails(Rect(0, 125, 14, 165), EXITCURSOR_W, 2000); + _exit1.setDest(Common::Point(14, 150)); + _exit2.setDetails(Rect(305, 125, 320, 165), EXITCURSOR_E, 2000); + _exit2.setDest(Common::Point(315, 150)); + R2_GLOBALS._player.postInit(); + R2_GLOBALS._player.disableControl(); + + if (R2_GLOBALS._v56605[1] == 16) { + _sceneMode = 2400; + setAction(&_sequenceManager, this, 2400, &R2_GLOBALS._player, NULL); + } else { + _sceneMode = 2401; + setAction(&_sequenceManager, this, 2401, &R2_GLOBALS._player, NULL); + } +} + +void Scene2400::signal() { + switch (_sceneMode) { + case 10: + R2_GLOBALS._v56605[1] = 16; + g_globals->_sceneManager.changeScene(2000); + break; + case 11: + R2_GLOBALS._v56605[1] = 17; + g_globals->_sceneManager.changeScene(2000); + break; + default: + R2_GLOBALS._player.enableControl(); + break; + } +} + } // End of namespace Ringworld2 } // End of namespace TsAGE diff --git a/engines/tsage/ringworld2/ringworld2_scenes2.h b/engines/tsage/ringworld2/ringworld2_scenes2.h index 27803418c2..15cd40a5d1 100644 --- a/engines/tsage/ringworld2/ringworld2_scenes2.h +++ b/engines/tsage/ringworld2/ringworld2_scenes2.h @@ -121,7 +121,24 @@ public: virtual void remove(); virtual void signal(); virtual void process(Event &event); -// virtual void synchronize(Serializer &s); +}; + +class Scene2400 : public SceneExt { + class Exit1 : public SceneExit { + virtual void changeScene(); + }; + class Exit2 : public SceneExit { + virtual void changeScene(); + }; +public: + Exit1 _exit1; + Exit2 _exit2; + SequenceManager _sequenceManager; + + virtual void postInit(SceneObjectList *OwnerList = NULL); +// virtual void remove(); + virtual void signal(); +// virtual void process(Event &event); }; } // End of namespace Ringworld2 |