aboutsummaryrefslogtreecommitdiff
path: root/engines/tsage
diff options
context:
space:
mode:
Diffstat (limited to 'engines/tsage')
-rw-r--r--engines/tsage/core.cpp7
-rw-r--r--engines/tsage/core.h1
-rw-r--r--engines/tsage/events.h1
-rw-r--r--engines/tsage/globals.cpp4
-rw-r--r--engines/tsage/globals.h2
-rw-r--r--engines/tsage/ringworld2/ringworld2_logic.cpp17
-rw-r--r--engines/tsage/ringworld2/ringworld2_logic.h15
-rw-r--r--engines/tsage/ringworld2/ringworld2_scenes0.cpp515
-rw-r--r--engines/tsage/ringworld2/ringworld2_scenes0.h37
-rw-r--r--engines/tsage/ringworld2/ringworld2_speakers.cpp56
-rw-r--r--engines/tsage/ringworld2/ringworld2_speakers.h15
11 files changed, 669 insertions, 1 deletions
diff --git a/engines/tsage/core.cpp b/engines/tsage/core.cpp
index 3e49b6b204..d88d012759 100644
--- a/engines/tsage/core.cpp
+++ b/engines/tsage/core.cpp
@@ -1301,6 +1301,13 @@ bool ScenePalette::loadPalette(int paletteNum) {
return true;
}
+/**
+ * Loads a palette from the passed raw data block
+ */
+void ScenePalette::loadPalette(const byte *pSrc, int start, int count) {
+ Common::copy(pSrc, pSrc + count * 3, &_palette[start * 3]);
+}
+
void ScenePalette::refresh() {
// Set indexes for standard colors to closest color in the palette
_colors.background = indexOf(255, 255, 255); // White background
diff --git a/engines/tsage/core.h b/engines/tsage/core.h
index 680d9cf76d..ef6d4735c0 100644
--- a/engines/tsage/core.h
+++ b/engines/tsage/core.h
@@ -372,6 +372,7 @@ public:
~ScenePalette();
bool loadPalette(int paletteNum);
+ void loadPalette(const byte *pSrc, int start, int count);
void refresh();
void setPalette(int index, int count);
void getEntry(int index, uint *r, uint *g, uint *b);
diff --git a/engines/tsage/events.h b/engines/tsage/events.h
index 6f54163682..2917256382 100644
--- a/engines/tsage/events.h
+++ b/engines/tsage/events.h
@@ -103,6 +103,7 @@ enum CursorType {
EXITCURSOR_E = 0x800A, EXITCURSOR_LEFT_HAND = 0x800B, CURSOR_INVALID = 0x800C,
EXITCURSOR_NE = 0x800D, EXITCURSOR_SE = 0x800E, EXITCURSOR_SW = 0x800F, EXITCURSOR_NW = 0x8010,
SHADECURSOR_UP = 0x8011, SHADECURSOR_DOWN = 0x8012, SHADECURSOR_HAND = 0x8013,
+ R2_CURSOR_20 = 0x8014, R2_CURSOR_21 = 0x8015, R2_CURSOR_22 = 0x8016, R2_CURSOR_23 = 0x8017,
// Cursors
CURSOR_WALK = 0x100, CURSOR_LOOK = 0x200, CURSOR_700 = 700, CURSOR_USE = 0x400, CURSOR_TALK = 0x800,
diff --git a/engines/tsage/globals.cpp b/engines/tsage/globals.cpp
index c17ba9e048..59f758f97c 100644
--- a/engines/tsage/globals.cpp
+++ b/engines/tsage/globals.cpp
@@ -449,6 +449,7 @@ void Ringworld2Globals::reset() {
_v56AA7 = 1;
_v56AA8 = 1;
_v56AAB = 0;
+ _scene180Mode = -1;
_v57C2C = 0;
_v58CE2 = 0;
_v565EC[0] = 0;
@@ -459,6 +460,7 @@ void Ringworld2Globals::reset() {
Common::fill(&_v565F1[0], &_v565F1[MAX_CHARACTERS], 1);
_speechSubtitles = SPEECH_VOICE | SPEECH_TEXT;
_insetUp = 0;
+ _frameEdgeColour = 2;
Common::fill(&_stripManager_lookupList[0], &_stripManager_lookupList[12], 0);
_stripManager_lookupList[0] = 1;
_stripManager_lookupList[1] = 1;
@@ -504,6 +506,7 @@ void Ringworld2Globals::synchronize(Serializer &s) {
s.syncAsSint16LE(_v56AA2);
s.syncAsSint16LE(_v56AA4);
s.syncAsSint16LE(_v56AAB);
+ s.syncAsSint16LE(_scene180Mode);
s.syncAsSint16LE(_v57C2C);
s.syncAsSint16LE(_v58CE2);
s.syncAsSint16LE(_speechSubtitles);
@@ -535,6 +538,7 @@ void Ringworld2Globals::synchronize(Serializer &s) {
s.syncAsByte(_stripManager_lookupList[i]);
s.syncAsSint16LE(_insetUp);
+ s.syncAsByte(_frameEdgeColour);
}
} // end of namespace Ringworld2
diff --git a/engines/tsage/globals.h b/engines/tsage/globals.h
index f185b8235c..a0b9f0b555 100644
--- a/engines/tsage/globals.h
+++ b/engines/tsage/globals.h
@@ -253,6 +253,7 @@ public:
PlayStream _playStream;
StripProxy _stripProxy;
int _insetUp;
+ int _frameEdgeColour; // _v421e
Rect _v5589E;
Rect _v558B6;
int _v558C2;
@@ -289,6 +290,7 @@ public:
byte _v56AA7;
byte _v56AA8;
int _v56AAB;
+ int _scene180Mode; // _v575f7
int _v57C2C;
int _v58CE2;
int _speechSubtitles;
diff --git a/engines/tsage/ringworld2/ringworld2_logic.cpp b/engines/tsage/ringworld2/ringworld2_logic.cpp
index 44953abfd2..1d39169d87 100644
--- a/engines/tsage/ringworld2/ringworld2_logic.cpp
+++ b/engines/tsage/ringworld2/ringworld2_logic.cpp
@@ -59,7 +59,8 @@ Scene *Ringworld2Game::createScene(int sceneNumber) {
// Empty Bedroom #2
return new Scene175();
case 180:
- error("Missing scene %d from group 0", sceneNumber);
+ // Title Screen
+ return new Scene180();
case 200:
// Deck #2 - By Lift
return new Scene200();
@@ -1462,6 +1463,20 @@ void ActionObject::remove() {
_endAction = NULL;
}
+bool ActionObject::load(int rlbNum, Action *endAction) {
+ warning("TODO ActionOjbect::load");
+ return true;
+}
+
+/*--------------------------------------------------------------------------*/
+
+void ActionObjectExt::synchronize(Serializer &s) {
+ ActionObject::synchronize(s);
+ s.syncAsSint16LE(_v1);
+}
+
+
+
} // End of namespace Ringworld2
} // End of namespace TsAGE
diff --git a/engines/tsage/ringworld2/ringworld2_logic.h b/engines/tsage/ringworld2/ringworld2_logic.h
index 24b8ba07fc..22bea5c216 100644
--- a/engines/tsage/ringworld2/ringworld2_logic.h
+++ b/engines/tsage/ringworld2/ringworld2_logic.h
@@ -102,6 +102,7 @@ public:
virtual void loadScene(int sceneNum);
virtual void refreshBackground(int xAmount, int yAmount);
virtual void saveCharacter(int characterIndex);
+ virtual void restore() {}
bool display(CursorType action, Event &event);
void fadeOut();
@@ -327,12 +328,26 @@ public:
EventHandler *_endAction;
Rect _rect1, _screenBounds;
int _field3A, _field3C;
+ int _field56;
int _field58, _field5A;
+ ScenePalette _palette;
+ byte _palData[256 * 3];
public:
ActionObject();
virtual void synchronize(Serializer &s);
virtual void remove();
+
+ bool load(int rlbNum, Action *endAction = NULL);
+ bool proc1() { return false; }
+ void proc2() {}
+};
+
+class ActionObjectExt: public ActionObject {
+public:
+ int _v1;
+
+ virtual void synchronize(Serializer &s);
};
} // End of namespace Ringworld2
diff --git a/engines/tsage/ringworld2/ringworld2_scenes0.cpp b/engines/tsage/ringworld2/ringworld2_scenes0.cpp
index 39bc41e408..cacd0745cd 100644
--- a/engines/tsage/ringworld2/ringworld2_scenes0.cpp
+++ b/engines/tsage/ringworld2/ringworld2_scenes0.cpp
@@ -1462,6 +1462,521 @@ void Scene160::process(Event &event) {
}
/*--------------------------------------------------------------------------
+ * Scene 180 - Title Screen
+ *
+ *--------------------------------------------------------------------------*/
+
+void Scene180::Action1::signal() {
+ Scene180 *scene = (Scene180 *)R2_GLOBALS._sceneManager._scene;
+
+ switch (_actionIndex++) {
+ case 0:
+ case 1:
+ case 2:
+ scene->_object5.setStrip((_actionIndex == 1) ? 1 : 2);
+ scene->_object5.setFrame(1);
+ scene->_object5.animate(ANIM_MODE_5, this);
+ break;
+ case 4:
+ scene->_object5.setStrip(3);
+ scene->_object5.setFrame(1);
+ scene->_object5.animate(ANIM_MODE_5, this);
+ _actionIndex = 0;
+ break;
+ }
+}
+
+/*--------------------------------------------------------------------------*/
+
+Scene180::Scene180(): SceneExt(), _webbsterSpeaker(27) {
+ _field412 = 0;
+ _frameInc = 0;
+ _frameNumber = R2_GLOBALS._events.getFrameNumber();
+ _field480 = 1;
+ _field482 = -1;
+ _fontNumber = R2_GLOBALS.gfxManager()._font._fontNumber;
+
+ GfxFont font;
+ font.setFontNumber(7);
+ _fontHeight = font.getHeight();
+
+ _sceneMode = (R2_GLOBALS._sceneManager._previousScene == 205) ? 10 : 0;
+ _gameTextSpeaker._displayMode = 9;
+ _stripManager.addSpeaker(&_gameTextSpeaker);
+ _stripManager.addSpeaker(&_webbsterSpeaker);
+ _stripManager.addSpeaker(&_tealSpeaker);
+ _stripManager.addSpeaker(&_dutyOfficerSpeaker);
+
+ signal();
+}
+
+void Scene180::postInit(SceneObjectList *OwnerList) {
+ SceneExt::postInit();
+ loadScene(9999);
+
+ R2_GLOBALS._player._uiEnabled = false;
+ R2_GLOBALS._player.disableControl();
+
+}
+
+void Scene180::remove() {
+ _stripManager._field2E8 = -1;
+// _stripManager._field2EA = -1;
+ SceneExt::remove();
+
+ R2_GLOBALS._events.setCursor(CURSOR_WALK);
+ // word_575F7 = 0;
+ R2_GLOBALS._playStream.stop();
+ R2_GLOBALS._sound2.fadeOut2(NULL);
+ R2_GLOBALS._sound1.fadeOut2(NULL);
+}
+
+void Scene180::synchronize(Serializer &s) {
+ SceneExt::synchronize(s);
+
+ s.syncAsSint16LE(_frameNumber);
+ s.syncAsSint16LE(_field412);
+ s.syncAsSint16LE(_field480);
+ s.syncAsSint16LE(_field482);
+ s.syncAsSint16LE(_frameInc);
+ s.syncAsSint16LE(_fontNumber);
+ s.syncAsSint16LE(_fontHeight);
+}
+
+void Scene180::signal() {
+ R2_GLOBALS._playStream.stop();
+
+ switch (_sceneMode) {
+ case 0:
+ setFrameInc(6);
+ break;
+
+ case 1:
+ _field412 = 1;
+ R2_GLOBALS._sceneManager._hasPalette = true;
+ _actionObject._field3C = 2;
+ _actionObject._v1 = 1;
+ _actionObject._field56 = 1;
+ R2_GLOBALS._scene180Mode = 1;
+
+ _actionObject.load(1, NULL);
+ R2_GLOBALS._scenePalette.loadPalette(_actionObject._palData, 0, 256);
+
+ R2_GLOBALS._sound1.play(1);
+ break;
+
+ case 2:
+ R2_GLOBALS._scene180Mode = 1;
+ R2_GLOBALS._paneRefreshFlag[0] = 3;
+
+ if (R2_GLOBALS._sound1.isPlaying()) {
+ setFrameInc(1);
+ } else {
+ setFrameInc(180);
+ }
+ break;
+
+ case 3:
+ R2_GLOBALS._scene180Mode = 1;
+
+ if (R2_GLOBALS._sound1.isPlaying())
+ _sceneMode = 3;
+
+ setFrameInc(1);
+ break;
+
+ case 4:
+ case 8:
+ case 30:
+ case 43:
+ case 47:
+ _field412 = 0;
+ _palette.loadPalette(0);
+ _palette.loadPalette(9998);
+ R2_GLOBALS._scenePalette.addFader(_palette._palette, 256, 8, this);
+ break;
+
+ case 5:
+ _actionObject._field3C = 2;
+ _actionObject._v1 = 1;
+ _actionObject._field56 = 1;
+ R2_GLOBALS._scene180Mode = 2;
+ _actionObject.load(2);
+
+ _field412 = 1;
+ R2_GLOBALS._scenePalette.addFader(_actionObject._palData, 256, 6, NULL);
+ R2_GLOBALS._sound1.play(2);
+ break;
+
+ case 6:
+ R2_GLOBALS._scene180Mode = 2;
+ R2_GLOBALS._paneRefreshFlag[0] = 3;
+
+ if (R2_GLOBALS._sound1.isPlaying()) {
+ setFrameInc(1);
+ } else {
+ setFrameInc(180);
+ }
+ break;
+
+ case 7:
+ R2_GLOBALS._scene180Mode = 2;
+ if (R2_GLOBALS._sound1.isPaused())
+ _sceneMode = 7;
+ setFrameInc(1);
+ break;
+
+ case 9:
+ R2_GLOBALS._sound1.play(3);
+ setFrameInc(2);
+ break;
+
+ case 10:
+ loadScene(4002);
+ R2_GLOBALS._scenePalette.loadPalette(0);
+ setFrameInc(6);
+ break;
+
+ case 11:
+ _field412 = 1;
+ _object4.postInit();
+ _object5.postInit();
+ setAction(&_sequenceManager, this, 4000, &_object4, &_object5, NULL);
+ break;
+
+ case 12:
+ case 14:
+ case 16:
+ case 18:
+ case 20:
+ case 22:
+ case 24:
+ case 26:
+ case 46:
+ setFrameInc((R2_GLOBALS._speechSubtitles & 1) ? 1 : 18);
+ break;
+
+ case 13:
+ setAction(&_sequenceManager, this, 4001, &_object4, &_object5, NULL);
+ break;
+
+ case 15:
+ setAction(&_sequenceManager, this, 4002, &_object4, &_object5, NULL);
+ break;
+
+ case 17:
+ setAction(&_sequenceManager, this, 4003, &_object4, &_object5, NULL);
+ break;
+
+ case 19:
+ setAction(&_sequenceManager, this, 4004, &_object4, &_object5, NULL);
+ break;
+
+ case 21:
+ setAction(&_sequenceManager, this, 4005, &_object4, &_object5, NULL);
+ break;
+
+ case 23:
+ setAction(&_sequenceManager, this, 4006, &_object4, &_object5, NULL);
+ break;
+
+ case 25:
+ setAction(&_sequenceManager, this, 4007, &_object4, &_object5, NULL);
+ break;
+
+ case 27:
+ _field412 = 0;
+ _object4.remove();
+ _object5.remove();
+ setFrameInc(2);
+ break;
+
+ case 28:
+ _field412 = 0;
+ _palette.loadPalette(0);
+ _palette.loadPalette(9998);
+ R2_GLOBALS._scenePalette.addFader(_palette._palette, 256, 100, this);
+ break;
+
+ case 29:
+ _field412 = 1;
+ _actionObject._field3C = 0;
+ _actionObject._v1 = 1;
+ _actionObject._field56 = 42;
+ R2_GLOBALS._scene180Mode = 3;
+ _actionObject.load(3);
+ break;
+
+ case 31:
+ R2_GLOBALS._sound2.play(7);
+
+ _object4.postInit();
+ _object4.setVisage(76);
+ _object4.setStrip(1);
+ _object4.setFrame(1);
+ _object4.setPosition(Common::Point(288, 143));
+ _object4.fixPriority(210);
+
+ loadScene(75);
+
+ R2_GLOBALS._scenePalette.loadPalette(0);
+ R2_GLOBALS._scenePalette.loadPalette(75);
+
+ if (R2_GLOBALS._sceneManager._hasPalette)
+ R2_GLOBALS._scenePalette.refresh();
+ setFrameInc(6);
+ break;
+
+ case 32:
+ _field412 = 1;
+
+ _object2.postInit();
+ _object2.setPosition(Common::Point(161, 97));
+ _object2.hide();
+
+ _object3.postInit();
+ _object3.setPosition(Common::Point(60, 96));
+ _object3.hide();
+ R2_GLOBALS._scenePalette.addFader(_palette._palette, 256, 11, this);
+ break;
+
+ case 33:
+ _object2.hide();
+
+ _object3.setup(76, 4, 1);
+ _object3.setFrame(_object3.getFrameCount());
+
+ _object5.postInit();
+ _object5.setup(75, 1, 1);
+ _object5.setPosition(Common::Point(221, 125));
+ _object5.fixPriority(210);
+ _object5.setAction(&_action1);
+ R2_GLOBALS._scenePalette.addFader(_palette._palette, 256, 12, this);
+ break;
+
+ case 34:
+ _object2.hide();
+ _object3.hide();
+
+ _object1.postInit();
+ _object1.setup(76, 2, 1);
+ _object1.setPosition(Common::Point(287, 135));
+ _object1.fixPriority(200);
+
+ _sound1.play(19);
+ R2_GLOBALS._scenePalette.addFader(_palette._palette, 256, 5, this);
+ break;
+
+ case 35:
+ R2_GLOBALS._scenePalette.addFader(_palette._palette, 256, 13, this);
+ break;
+
+ case 36:
+ _object2.remove();
+ _sound1.play(19);
+
+ R2_GLOBALS._scenePalette.addFader(_palette._palette, 256, 6, this);
+ break;
+
+ case 37:
+ _field412 = 0;
+ _object1.remove();
+ _palette.loadPalette(9998);
+ R2_GLOBALS._scenePalette.addFader(_palette._palette, 256, 8, this);
+ break;
+
+ case 38:
+ _object4.remove();
+ _object5.setAction(NULL);
+ _object5.remove();
+
+ R2_GLOBALS._sound2.fadeOut2(NULL);
+ R2_GLOBALS._sound1.fadeOut2(NULL);
+ break;
+
+ case 39:
+ R2_GLOBALS._sound1.changeSound(8);
+ setFrameInc(1);
+ break;
+
+ case 40:
+ _actionObject._field3C = 2;
+ _actionObject._field56 = 1;
+ R2_GLOBALS._scene180Mode = 4;
+ if (_actionObject.load(4)) {
+ _actionObject.dispatch();
+ R2_GLOBALS._scenePalette.addFader(_actionObject._palData, 256, 8, this);
+ } else {
+ _sceneMode = 43;
+ setFrameInc(1);
+ }
+ break;
+
+ case 41:
+ _field412 = 1;
+ _actionObject._v1 = 1;
+ break;
+
+ case 42:
+ R2_GLOBALS._scene180Mode = 4;
+ R2_GLOBALS._paneRefreshFlag[0] = 3;
+ setFrameInc(1);
+ break;
+
+ case 44:
+ loadScene(9997);
+ R2_GLOBALS._scenePalette.loadPalette(9997);
+ if (R2_GLOBALS._sceneManager._hasPalette)
+ R2_GLOBALS._scenePalette.refresh();
+
+ setFrameInc(6);
+ break;
+
+ case 45:
+ R2_GLOBALS._scenePalette.addFader(_actionObject._palData, 256, 28, this);
+ break;
+
+ case 48:
+ _field412 = 1;
+ _actionObject._field3C = 2;
+ _actionObject._v1 = 1;
+ _actionObject._field56 = 1;
+ R2_GLOBALS._scene180Mode = 15;
+ _actionObject.load(15, NULL);
+
+ R2_GLOBALS._sound1.play(9);
+ R2_GLOBALS._scenePalette.addFader(_actionObject._palData, 256, 6, NULL);
+ break;
+
+ case 49:
+ R2_GLOBALS._scene180Mode = 15;
+ R2_GLOBALS._paneRefreshFlag[0] = 3;
+ setFrameInc(1);
+ break;
+
+ case 50:
+ R2_GLOBALS._scene180Mode = 0;
+ _field412 = 0;
+ R2_GLOBALS._sceneManager.changeScene(100);
+ break;
+ }
+}
+
+void Scene180::setFrameInc(int v) {
+ _frameInc = v;
+ _frameNumber = R2_GLOBALS._events.getFrameNumber();
+}
+
+void Scene180::process(Event &event) {
+ if ((event.eventType == EVENT_KEYPRESS) && (event.kbd.keycode == Common::KEYCODE_ESCAPE)) {
+ event.handled = 1;
+ if (!_field412) {
+ if (R2_GLOBALS._scenePalette._listeners.size() == 0) {
+ HelpDialog::show();
+ }
+ }
+ }
+
+ if (!event.handled)
+ SceneExt::process(event);
+}
+
+void Scene180::dispatch() {
+ if (_frameInc) {
+ uint32 frameNumber = R2_GLOBALS._events.getFrameNumber();
+
+ if (frameNumber >= frameNumber) {
+ _frameInc = frameNumber - _frameNumber;
+ _frameNumber = frameNumber;
+
+ if (_frameInc <= 0) {
+ _frameInc = 0;
+ signal();
+ }
+ }
+ }
+
+ if (_actionObject._v1) {
+ if (_actionObject.proc1()) {
+ _actionObject._v1 = 0;
+ _actionObject.proc2();
+ _actionObject.remove();
+
+ signal();
+ } else {
+ _actionObject.dispatch();
+ }
+ }
+
+ Scene::dispatch();
+}
+
+void Scene180::restore() {
+ R2_GLOBALS._gfxColors.background = 0;
+ R2_GLOBALS._gfxColors.foreground = 0xff;
+ R2_GLOBALS._fontColors.background = 0;
+ R2_GLOBALS._fontColors.foreground = 0xff;
+
+ switch (R2_GLOBALS._scene180Mode) {
+ case 0:
+ R2_GLOBALS._events.setCursor(SHADECURSOR_HAND);
+
+ R2_GLOBALS._gfxColors.foreground = 4;
+ R2_GLOBALS._gfxColors.background = 3;
+ R2_GLOBALS._fontColors.background = 3;
+ R2_GLOBALS._frameEdgeColour = 3;
+ break;
+
+ case 1:
+ R2_GLOBALS._events.setCursor(R2_CURSOR_20);
+
+ R2_GLOBALS._gfxColors.foreground = 25;
+ R2_GLOBALS._gfxColors.background = 43;
+ R2_GLOBALS._fontColors.background = 48;
+ R2_GLOBALS._frameEdgeColour = 48;
+ break;
+
+ case 2:
+ R2_GLOBALS._events.setCursor(R2_CURSOR_21);
+
+ R2_GLOBALS._gfxColors.foreground = 106;
+ R2_GLOBALS._gfxColors.background = 136;
+ R2_GLOBALS._fontColors.background = 48;
+ R2_GLOBALS._fontColors.foreground = 253;
+ R2_GLOBALS._frameEdgeColour = 48;
+ break;
+
+ case 3:
+ R2_GLOBALS._events.setCursor(R2_CURSOR_22);
+
+ R2_GLOBALS._gfxColors.foreground = 84;
+ R2_GLOBALS._gfxColors.background = 118;
+ R2_GLOBALS._fontColors.background = 47;
+ R2_GLOBALS._frameEdgeColour = 48;
+ break;
+
+ case 14:
+ R2_GLOBALS._events.setCursor(R2_CURSOR_23);
+
+ R2_GLOBALS._fontColors.background = 38;
+ R2_GLOBALS._fontColors.foreground = 38;
+ R2_GLOBALS._gfxColors.foreground = 192;
+ R2_GLOBALS._gfxColors.background = 30;
+ R2_GLOBALS._frameEdgeColour = 48;
+ break;
+
+ default:
+ R2_GLOBALS._gfxColors.background = 0;
+ R2_GLOBALS._gfxColors.foreground = 59;
+ R2_GLOBALS._fontColors.background = 4;
+ R2_GLOBALS._fontColors.foreground = 15;
+
+ R2_GLOBALS._events.setCursor(CURSOR_ARROW);
+ break;
+ }
+}
+
+/*--------------------------------------------------------------------------
* Scene 200 - Ship Corridor
*
*--------------------------------------------------------------------------*/
diff --git a/engines/tsage/ringworld2/ringworld2_scenes0.h b/engines/tsage/ringworld2/ringworld2_scenes0.h
index 0ebcf09da7..f3c8b0bccf 100644
--- a/engines/tsage/ringworld2/ringworld2_scenes0.h
+++ b/engines/tsage/ringworld2/ringworld2_scenes0.h
@@ -189,6 +189,43 @@ public:
class Scene175: public Scene150 {
};
+class Scene180: public SceneExt {
+ class Action1: public Action {
+ public:
+ void signal();
+ };
+private:
+ void setFrameInc(int v);
+public:
+ SpeakerWebbster _webbsterSpeaker;
+ SpeakerDutyOfficer _dutyOfficerSpeaker;
+ SpeakerTeal _tealSpeaker;
+ SpeakerGameText _gameTextSpeaker;
+ SceneActor _object1, _object2, _object3, _object4, _object5;
+ ScenePalette _palette;
+ SceneText _textList[20];
+ ActionObjectExt _actionObject;
+ SequenceManager _sequenceManager;
+ Action1 _action1;
+ ASoundExt _sound1;
+
+ int _frameNumber;
+ int _field412, _field480;
+ int _field482, _frameInc;
+ int _fontNumber, _fontHeight;
+ int _scene180Mode;
+public:
+ Scene180();
+
+ virtual void postInit(SceneObjectList *OwnerList = NULL);
+ virtual void synchronize(Serializer &s);
+ virtual void remove();
+ virtual void signal();
+ virtual void process(Event &event);
+ virtual void dispatch();
+ virtual void restore();
+};
+
class Scene200: public SceneExt {
/* Objects */
class NorthDoor: public SceneActor {
diff --git a/engines/tsage/ringworld2/ringworld2_speakers.cpp b/engines/tsage/ringworld2/ringworld2_speakers.cpp
index 01db39de2f..f729881e8f 100644
--- a/engines/tsage/ringworld2/ringworld2_speakers.cpp
+++ b/engines/tsage/ringworld2/ringworld2_speakers.cpp
@@ -193,6 +193,17 @@ void VisualSpeaker::setDelay(int delay) {
}
//----------------------------------------------------------------------------
+
+SpeakerGameText::SpeakerGameText(): VisualSpeaker() {
+ _speakerName = "GAMETEXT";
+ _color1 = 8;
+ _color2 = 0;
+ _textWidth = 300;
+ _hideObjects = false;
+ _object2 = NULL;
+}
+
+//----------------------------------------------------------------------------
// Classes related to CAPTAIN
//----------------------------------------------------------------------------
@@ -2908,5 +2919,50 @@ void SpeakerWebbster3400::proc15() {
}
}
+//----------------------------------------------------------------------------
+
+SpeakerDutyOfficer::SpeakerDutyOfficer(): VisualSpeaker() {
+ _speakerName = "DUTYOFFICER";
+ _color1 = 5;
+ _color2 = 0;
+ _fieldF6 = 0;
+ _textWidth = 300;
+ _hideObjects = false;
+ _object2 = NULL;
+ _displayMode = 1;
+ _numFrames = 0;
+}
+
+void SpeakerDutyOfficer::proc15() {
+ Scene180 *scene = (Scene180 *)R2_GLOBALS._sceneManager._scene;
+
+ int v = _fieldF6;
+
+ if (!_object2) {
+ _object2 = &scene->_object2;
+ _object2->hide();
+ _object1.postInit();
+ _object1.setPosition(_object2->_position);
+
+ if (_object2->_mover)
+ _object2->addMover(NULL);
+ }
+
+ switch (v) {
+ case 0:
+ _object1.animate(ANIM_MODE_2, NULL);
+ break;
+ case 1:
+ _action = NULL;
+ _object1.setup(76, 2, 1);
+ _object1.animate(ANIM_MODE_5, this);
+ break;
+ default:
+ signal();
+ break;
+ }
+}
+
+
} // End of namespace Ringworld2
} // End of namespace TsAGE
diff --git a/engines/tsage/ringworld2/ringworld2_speakers.h b/engines/tsage/ringworld2/ringworld2_speakers.h
index a229ace16a..e336564c5f 100644
--- a/engines/tsage/ringworld2/ringworld2_speakers.h
+++ b/engines/tsage/ringworld2/ringworld2_speakers.h
@@ -63,6 +63,13 @@ public:
void setDelay(int delay);
};
+class SpeakerGameText : public VisualSpeaker {
+public:
+ SpeakerGameText();
+
+ virtual Common::String getClassName() { return "SpeakerGameText"; }
+};
+
// Classes related to Captain
class SpeakerCaptain3210 : public VisualSpeaker {
@@ -616,6 +623,14 @@ public:
virtual void proc15();
};
+class SpeakerDutyOfficer: public VisualSpeaker {
+public:
+ SpeakerDutyOfficer();
+
+ virtual Common::String getClassName() { return "SpeakerDutyOfficer"; }
+ virtual void proc15();
+};
+
} // End of namespace Ringworld2
} // End of namespace TsAGE