diff options
author | Strangerke | 2011-11-08 23:41:09 +0100 |
---|---|---|
committer | Strangerke | 2011-11-08 23:41:45 +0100 |
commit | 58b082bcb1ad23df30ae92adf6f672a753d35611 (patch) | |
tree | bd14fee742b80eaa25822e5dfb512047698c4e0b | |
parent | 001f7d6403f415ea6c2e4fdde2c94a127f18d267 (diff) | |
download | scummvm-rg350-58b082bcb1ad23df30ae92adf6f672a753d35611.tar.gz scummvm-rg350-58b082bcb1ad23df30ae92adf6f672a753d35611.tar.bz2 scummvm-rg350-58b082bcb1ad23df30ae92adf6f672a753d35611.zip |
TSAGE: R2R - Intro(?) (50): partial implementation.
Some missing core functions still have to be implemented.
-rw-r--r-- | engines/tsage/globals.cpp | 2 | ||||
-rw-r--r-- | engines/tsage/globals.h | 1 | ||||
-rw-r--r-- | engines/tsage/ringworld2/ringworld2_logic.cpp | 2 | ||||
-rw-r--r-- | engines/tsage/ringworld2/ringworld2_scenes0.cpp | 42 | ||||
-rw-r--r-- | engines/tsage/ringworld2/ringworld2_scenes0.h | 14 |
5 files changed, 60 insertions, 1 deletions
diff --git a/engines/tsage/globals.cpp b/engines/tsage/globals.cpp index b82d4bce57..dfdc3e00c7 100644 --- a/engines/tsage/globals.cpp +++ b/engines/tsage/globals.cpp @@ -376,6 +376,7 @@ void Ringworld2Globals::reset() { _v5657C = 0; _v565F5 = 0; _v57C2C = 0; + _v58CE2 = 0; Common::set_to(&_v565F1[0], &_v565F1[MAX_CHARACTERS], 0); _player._characterIndex = 1; @@ -390,6 +391,7 @@ void Ringworld2Globals::synchronize(Serializer &s) { s.syncAsSint16LE(_v5657C); s.syncAsSint16LE(_v565F5); s.syncAsSint16LE(_v57C2C); + s.syncAsSint16LE(_v58CE2); for (int i = 0; i < MAX_CHARACTERS; ++i) s.syncAsSint16LE(_v565F1[i]); } diff --git a/engines/tsage/globals.h b/engines/tsage/globals.h index 6d61ce6b69..3280d70361 100644 --- a/engines/tsage/globals.h +++ b/engines/tsage/globals.h @@ -247,6 +247,7 @@ public: int _v565F5; int _v5657C; int _v57C2C; + int _v58CE2; int _v565F1[4]; virtual void reset(); diff --git a/engines/tsage/ringworld2/ringworld2_logic.cpp b/engines/tsage/ringworld2/ringworld2_logic.cpp index ee52073e01..94aa8c583e 100644 --- a/engines/tsage/ringworld2/ringworld2_logic.cpp +++ b/engines/tsage/ringworld2/ringworld2_logic.cpp @@ -36,7 +36,7 @@ Scene *Ringworld2Game::createScene(int sceneNumber) { switch (sceneNumber) { /* Scene group #0 */ // - case 50: error("Scene number %d - Not yet implemented", sceneNumber); + case 50: return new Scene50(); // Quinn's room case 100: return new Scene100(); // Computer console diff --git a/engines/tsage/ringworld2/ringworld2_scenes0.cpp b/engines/tsage/ringworld2/ringworld2_scenes0.cpp index 2062f6ffd7..cbe1fc7846 100644 --- a/engines/tsage/ringworld2/ringworld2_scenes0.cpp +++ b/engines/tsage/ringworld2/ringworld2_scenes0.cpp @@ -29,6 +29,48 @@ namespace TsAGE { namespace Ringworld2 { +void Scene50::Action1::signal() { + switch (_actionIndex++) { + case 0: + setDelay(2); + break; + case 1: + setDelay(180); + break; + case 2: + R2_GLOBALS._sceneManager.changeScene(100); + break; + default: + break; + } +} + +void Scene50::postInit(SceneObjectList *OwnerList) { + SceneExt::postInit(OwnerList); + loadScene(110); + + R2_GLOBALS._v58CE2 = 0; + R2_GLOBALS._scenePalette.loadPalette(0); + + R2_GLOBALS._sound2.play(10); + R2_GLOBALS._player.disableControl(); + + setAction(&_action1); +} + +void Scene50::process(Event &event) { + if ((event.eventType != EVENT_BUTTON_DOWN) && (event.eventType != EVENT_KEYPRESS) && (event.eventType == 27)) { + event.handled = true; + warning("TODO: incomplete Scene50::process()"); + // CursorType _oldCursorId = _cursorId; + g_globals->_events.setCursor(R2_2); + // _cursorManager.sub_1D474(2, 0); + // sub_5566A(1); + // _cursorManager._fieldE = _oldCursorId; + R2_GLOBALS._sceneManager.changeScene(100); + } +} + /*-------------------------------------------------------------------------- * Scene 100 - Quinn's Room * diff --git a/engines/tsage/ringworld2/ringworld2_scenes0.h b/engines/tsage/ringworld2/ringworld2_scenes0.h index 9b83d03cc7..38710a7cbc 100644 --- a/engines/tsage/ringworld2/ringworld2_scenes0.h +++ b/engines/tsage/ringworld2/ringworld2_scenes0.h @@ -38,6 +38,20 @@ namespace Ringworld2 { using namespace TsAGE; +class Scene50: public SceneExt { + + class Action1: public Action { + public: + void signal(); + }; + +public: + Action1 _action1; + + virtual void postInit(SceneObjectList *OwnerList = NULL); + virtual void process(Event &event); +}; + class Scene100: public SceneExt { /* Objects */ class Door: public SceneActorExt { |