[Scummvm-cvs-logs] scummvm master -> 9fdba870c92c50ba828b9a70ade377c683549d9f

dreammaster dreammaster at scummvm.org
Tue Dec 27 10:39:41 CET 2011


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
9fdba870c9 TSAGE: Moved the R2R AUTODOC_ITEMS array to be part of the scene 825.


Commit: 9fdba870c92c50ba828b9a70ade377c683549d9f
    https://github.com/scummvm/scummvm/commit/9fdba870c92c50ba828b9a70ade377c683549d9f
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2011-12-27T01:39:04-08:00

Commit Message:
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.

Changed paths:
    engines/tsage/ringworld2/ringworld2_scenes0.cpp
    engines/tsage/ringworld2/ringworld2_scenes0.h
    engines/tsage/staticres.cpp
    engines/tsage/staticres.h



diff --git a/engines/tsage/ringworld2/ringworld2_scenes0.cpp b/engines/tsage/ringworld2/ringworld2_scenes0.cpp
index 225e4f3..9eb3e2b 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 7a36b8f..8ee8c09 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 c7ec1c5..1f963f1 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 eee6a29..90f5d36 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;






More information about the Scummvm-git-logs mailing list