From 9fdba870c92c50ba828b9a70ade377c683549d9f Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Tue, 27 Dec 2011 20:39:04 +1100 Subject: TSAGE: Moved the R2R AUTODOC_ITEMS array to be part of the scene 825. Since this is the only scene that uses it, it makes as much sense to have it as part of the scene than part of the staticres file. --- engines/tsage/ringworld2/ringworld2_scenes0.cpp | 17 ++++++++++++++++- engines/tsage/ringworld2/ringworld2_scenes0.h | 1 + engines/tsage/staticres.cpp | 7 ------- engines/tsage/staticres.h | 1 - 4 files changed, 17 insertions(+), 9 deletions(-) diff --git a/engines/tsage/ringworld2/ringworld2_scenes0.cpp b/engines/tsage/ringworld2/ringworld2_scenes0.cpp index 225e4f3e0b..9eb3e2b713 100644 --- a/engines/tsage/ringworld2/ringworld2_scenes0.cpp +++ b/engines/tsage/ringworld2/ringworld2_scenes0.cpp @@ -3269,18 +3269,33 @@ void Scene825::Button::setButton(int buttonId) { } void Scene825::Button::setText(int textId) { + Scene825 *scene = (Scene825 *)R2_GLOBALS._sceneManager._scene; + _buttonId = textId; _lookLineNum = textId; _sceneText.remove(); if (_buttonId != 0) - _sceneText.setup(AUTODOC_ITEMS[textId - 1]); + _sceneText.setup(scene->_autodocItems[textId - 1]); } /*--------------------------------------------------------------------------*/ Scene825::Scene825(): SceneExt() { _menuId = _frame1 = _frame2 = 0; + + // Setup Autodoc items list + _autodocItems[0] = MAIN_MENU; + _autodocItems[1] = DIAGNOSIS; + _autodocItems[2] = ADVANCED_PROCEDURES; + _autodocItems[3] = VITAL_SIGNS; + _autodocItems[4] = OPEN_DOOR; + _autodocItems[5] = TREATMENTS; + _autodocItems[6] = NO_MALADY_DETECTED; + _autodocItems[7] = NO_TREATMENT_REQUIRED; + _autodocItems[8] = ACCESS_CODE_REQUIRED; + _autodocItems[9] = INVALID_ACCESS_CODE; + _autodocItems[10] = FOREIGN_OBJECT_EXTRACTED; } void Scene825::postInit(SceneObjectList *OwnerList) { diff --git a/engines/tsage/ringworld2/ringworld2_scenes0.h b/engines/tsage/ringworld2/ringworld2_scenes0.h index 7a36b8f15f..8ee8c09873 100644 --- a/engines/tsage/ringworld2/ringworld2_scenes0.h +++ b/engines/tsage/ringworld2/ringworld2_scenes0.h @@ -443,6 +443,7 @@ public: SequenceManager _sequenceManager1; SceneText _sceneText; int _menuId, _frame1, _frame2; + const char *_autodocItems[11]; public: Scene825(); virtual void synchronize(Serializer &s); diff --git a/engines/tsage/staticres.cpp b/engines/tsage/staticres.cpp index c7ec1c579a..1f963f13fb 100644 --- a/engines/tsage/staticres.cpp +++ b/engines/tsage/staticres.cpp @@ -205,13 +205,6 @@ const char *ACCESS_CODE_REQUIRED = "access code required"; const char *INVALID_ACCESS_CODE = "invalid access code"; const char *FOREIGN_OBJECT_EXTRACTED = "foreign object extracted"; -const char *const AUTODOC_ITEMS[11] = { - MAIN_MENU, DIAGNOSIS, ADVANCED_PROCEDURES, VITAL_SIGNS, OPEN_DOOR, TREATMENTS, - NO_MALADY_DETECTED, NO_TREATMENT_REQUIRED, ACCESS_CODE_REQUIRED, INVALID_ACCESS_CODE, - FOREIGN_OBJECT_EXTRACTED -}; - - const char *HELP_MSG = "\x1\rRETURN TO\r RINGWORLD\x14"; const char *CHAR_TITLE = "\x01Select Character:"; const char *CHAR_QUINN_MSG = " Quinn "; diff --git a/engines/tsage/staticres.h b/engines/tsage/staticres.h index eee6a29a99..90f5d3687f 100644 --- a/engines/tsage/staticres.h +++ b/engines/tsage/staticres.h @@ -161,7 +161,6 @@ extern const char *NO_TREATMENT_REQUIRED; extern const char *ACCESS_CODE_REQUIRED; extern const char *INVALID_ACCESS_CODE; extern const char *FOREIGN_OBJECT_EXTRACTED; -extern const char *const AUTODOC_ITEMS[11]; // Dialog messages extern const char *HELP_MSG; -- cgit v1.2.3