diff options
Diffstat (limited to 'engines')
-rw-r--r-- | engines/tsage/ringworld_logic.cpp | 2 | ||||
-rw-r--r-- | engines/tsage/ringworld_scenes3.cpp | 72 | ||||
-rw-r--r-- | engines/tsage/ringworld_scenes3.h | 22 |
3 files changed, 90 insertions, 6 deletions
diff --git a/engines/tsage/ringworld_logic.cpp b/engines/tsage/ringworld_logic.cpp index eff1ddac3c..d73e583407 100644 --- a/engines/tsage/ringworld_logic.cpp +++ b/engines/tsage/ringworld_logic.cpp @@ -78,7 +78,7 @@ Scene *SceneFactory::createScene(int sceneNumber) { case 2120: return new Scene2120(); // Spaceship - Level 2 case 2150: return new Scene2150(); - // Spaceship - Cyro-tube cutscene + // Spaceship - AutoDoc case 2200: return new Scene2200(); /* Scene group 4 */ diff --git a/engines/tsage/ringworld_scenes3.cpp b/engines/tsage/ringworld_scenes3.cpp index 48283d856d..90dfd3fc30 100644 --- a/engines/tsage/ringworld_scenes3.cpp +++ b/engines/tsage/ringworld_scenes3.cpp @@ -2629,7 +2629,7 @@ void Scene2150::dispatch() { } /*-------------------------------------------------------------------------- - * Scene 2200 - Spaceship - Cyro-tube cutscene + * Scene 2200 - Spaceship - AutoDoc * *--------------------------------------------------------------------------*/ @@ -2806,9 +2806,76 @@ void Scene2200::Action4::signal() { /*--------------------------------------------------------------------------*/ +void Scene2200::Hotspot3::doAction(int action) { + Scene2200 *scene = (Scene2200 *)_globals->_sceneManager._scene; + + switch (action) { + case CURSOR_LOOK: + SceneItem::display2(2200, 10); + break; + case CURSOR_USE: + SceneItem::display2(2200, 11); + break; + case CURSOR_TALK: + _globals->_player._uiEnabled = false; + scene->setAction(&scene->_action4); + break; + default: + SceneHotspot::doAction(action); + break; + } +} + +void Scene2200::Hotspot5::doAction(int action) { + Scene2200 *scene = (Scene2200 *)_globals->_sceneManager._scene; + + switch (action) { + case CURSOR_LOOK: + SceneItem::display2(2200, 8); + break; + case CURSOR_USE: + SceneItem::display2(2200, 9); + break; + case CURSOR_TALK: + scene->_sceneMode = 2201; + _globals->_player._uiEnabled = false; + scene->setAction(&scene->_sequenceManager, scene, 2201, NULL); + break; + default: + SceneHotspot::doAction(action); + break; + } +} + +void Scene2200::Hotspot9::doAction(int action) { + Scene2200 *scene = (Scene2200 *)_globals->_sceneManager._scene; + + switch (action) { + case CURSOR_LOOK: + SceneItem::display2(2200, _globals->getFlag(8) ? 1 : 0); + break; + case CURSOR_USE: + SceneItem::display2(2200, 3); + break; + case OBJECT_INFODISK: + if (_globals->_sceneManager._previousScene == 2310) { + scene->_soundHandler2.startSound(35); + _globals->_player.disableControl(); + scene->setAction(&scene->_action3); + } + break; + default: + SceneHotspot::doAction(action); + break; + } +} + +/*--------------------------------------------------------------------------*/ -Scene2200::Scene2200() { +Scene2200::Scene2200(): + _hotspot1(0, CURSOR_LOOK, 2200, 5, CURSOR_USE, 2200, 6, LIST_END), + _hotspot10(0, CURSOR_LOOK, 2200, 4, LIST_END) { } void Scene2200::postInit(SceneObjectList *OwnerList) { @@ -2898,6 +2965,7 @@ void Scene2200::postInit(SceneObjectList *OwnerList) { _soundHandler2.startSound(100); _globals->_soundHandler.proc5(true); + _globals->_sceneItems.push_back(&_hotspot5); setAction(&_action2); break; } diff --git a/engines/tsage/ringworld_scenes3.h b/engines/tsage/ringworld_scenes3.h index 49f9e3f5dc..9c758035a0 100644 --- a/engines/tsage/ringworld_scenes3.h +++ b/engines/tsage/ringworld_scenes3.h @@ -407,7 +407,18 @@ class Scene2200: public Scene { }; /* Hotspots */ - + class Hotspot3: public SceneObject { + public: + virtual void doAction(int action); + }; + class Hotspot5: public SceneObject { + public: + virtual void doAction(int action); + }; + class Hotspot9: public SceneObject { + public: + virtual void doAction(int action); + }; public: SequenceManager _sequenceManager; SpeakerMText _speakerMText; @@ -423,8 +434,13 @@ public: Action2 _action2; Action3 _action3; Action4 _action4; - SceneObject _hotspot1, _hotspot2, _hotspot3, _hotspot4, _hotspot5; - SceneObject _hotspot6, _hotspot7, _hotspot8, _hotspot9, _hotspot10; + DisplayHotspot _hotspot1; + Hotspot3 _hotspot3; + Hotspot5 _hotspot5; + Hotspot9 _hotspot9; + DisplayHotspot _hotspot10; + SceneObject _hotspot2, _hotspot4; + SceneObject _hotspot6, _hotspot7, _hotspot8; SoundHandler _soundHandler1, _soundHandler2; Scene2200(); |