aboutsummaryrefslogtreecommitdiff
path: root/engines/tsage
diff options
context:
space:
mode:
authorPaul Gilbert2012-02-14 22:43:46 +1100
committerPaul Gilbert2012-02-14 22:43:46 +1100
commitb6a0d8052ba46b06631c260c7aa0745bd833058e (patch)
treee6d7121aeb2b6aeb25b29c059fd940b5db5b6b9a /engines/tsage
parentf6720ee139c728779fae7807621bf11031aacfe1 (diff)
downloadscummvm-rg350-b6a0d8052ba46b06631c260c7aa0745bd833058e.tar.gz
scummvm-rg350-b6a0d8052ba46b06631c260c7aa0745bd833058e.tar.bz2
scummvm-rg350-b6a0d8052ba46b06631c260c7aa0745bd833058e.zip
TSAGE: Replace previously unknown value _v58ec2 with _uiElements._active
Diffstat (limited to 'engines/tsage')
-rw-r--r--engines/tsage/globals.cpp2
-rw-r--r--engines/tsage/globals.h1
-rw-r--r--engines/tsage/ringworld2/ringworld2_logic.cpp6
-rw-r--r--engines/tsage/ringworld2/ringworld2_scenes0.cpp4
-rw-r--r--engines/tsage/ringworld2/ringworld2_scenes1.cpp30
-rw-r--r--engines/tsage/ringworld2/ringworld2_scenes2.cpp4
-rw-r--r--engines/tsage/ringworld2/ringworld2_scenes3.cpp22
7 files changed, 33 insertions, 36 deletions
diff --git a/engines/tsage/globals.cpp b/engines/tsage/globals.cpp
index afd029d035..b4c3127ea8 100644
--- a/engines/tsage/globals.cpp
+++ b/engines/tsage/globals.cpp
@@ -457,7 +457,6 @@ void Ringworld2Globals::reset() {
_v5780E = 0;
_v57810 = 0;
_v57C2C = 0;
- _v58CE2 = 0;
_v565EC[0] = 0;
_v565EC[1] = 27;
_v565EC[2] = 27;
@@ -518,7 +517,6 @@ void Ringworld2Globals::synchronize(Serializer &s) {
s.syncAsSint16LE(_v5780E);
s.syncAsSint16LE(_v57810);
s.syncAsSint16LE(_v57C2C);
- s.syncAsSint16LE(_v58CE2);
s.syncAsSint16LE(_speechSubtitles);
for (i = 0; i < 5; i++)
diff --git a/engines/tsage/globals.h b/engines/tsage/globals.h
index 88b0a8146a..d80e4d9859 100644
--- a/engines/tsage/globals.h
+++ b/engines/tsage/globals.h
@@ -299,7 +299,6 @@ public:
int _v5780E;
int _v57810;
int _v57C2C;
- int _v58CE2;
int _speechSubtitles;
byte _v565EC[5];
byte _v565F1[4];
diff --git a/engines/tsage/ringworld2/ringworld2_logic.cpp b/engines/tsage/ringworld2/ringworld2_logic.cpp
index d146e4cbee..4f7578b1fa 100644
--- a/engines/tsage/ringworld2/ringworld2_logic.cpp
+++ b/engines/tsage/ringworld2/ringworld2_logic.cpp
@@ -331,7 +331,7 @@ void SceneExt::postInit(SceneObjectList *OwnerList) {
|| ((prevScene == 205) && (sceneNumber == 100))
|| ((prevScene == 180) && (sceneNumber == 100))) {
static_cast<SceneHandlerExt *>(R2_GLOBALS._sceneHandler)->setupPaletteMaps();
- R2_GLOBALS._v58CE2 = 1;
+ R2_GLOBALS._uiElements._active = true;
R2_GLOBALS._uiElements.show();
} else {
R2_GLOBALS._uiElements.updateInventory();
@@ -378,7 +378,7 @@ void SceneExt::loadScene(int sceneNum) {
(sceneNumber == 50) || ((prevScene == 205) && (sceneNumber == 100)) ||
((prevScene == 180) && (sceneNumber == 100))) {
// TODO: sub_17875
- R2_GLOBALS._v58CE2 = 1;
+ R2_GLOBALS._uiElements._active = true;
R2_GLOBALS._uiElements.show();
} else {
// Update the user interface
@@ -564,7 +564,7 @@ void SceneHandlerExt::postInit(SceneObjectList *OwnerList) {
}
void SceneHandlerExt::process(Event &event) {
- if (T2_GLOBALS._uiElements._active) {
+ if (T2_GLOBALS._uiElements._active && R2_GLOBALS._player._uiEnabled) {
T2_GLOBALS._uiElements.process(event);
if (event.handled)
return;
diff --git a/engines/tsage/ringworld2/ringworld2_scenes0.cpp b/engines/tsage/ringworld2/ringworld2_scenes0.cpp
index e3dbe1af22..2b2b5e71ef 100644
--- a/engines/tsage/ringworld2/ringworld2_scenes0.cpp
+++ b/engines/tsage/ringworld2/ringworld2_scenes0.cpp
@@ -51,7 +51,7 @@ void Scene50::postInit(SceneObjectList *OwnerList) {
SceneExt::postInit(OwnerList);
loadScene(110);
- R2_GLOBALS._v58CE2 = 0;
+ R2_GLOBALS._uiElements._active = false;
R2_GLOBALS._scenePalette.loadPalette(0);
R2_GLOBALS._sound2.play(10);
@@ -5320,7 +5320,7 @@ void Scene500::signal() {
*--------------------------------------------------------------------------*/
void Scene525::postInit(SceneObjectList *OwnerList) {
loadScene(525);
- R2_GLOBALS._v58CE2 = 0;
+ R2_GLOBALS._uiElements._active = false;
SceneExt::postInit();
R2_GLOBALS._sound1.play(105);
diff --git a/engines/tsage/ringworld2/ringworld2_scenes1.cpp b/engines/tsage/ringworld2/ringworld2_scenes1.cpp
index ea089279b6..c498171bd7 100644
--- a/engines/tsage/ringworld2/ringworld2_scenes1.cpp
+++ b/engines/tsage/ringworld2/ringworld2_scenes1.cpp
@@ -37,7 +37,7 @@ void Scene1010::postInit(SceneObjectList *OwnerList) {
SceneExt::postInit();
loadScene(1010);
- R2_GLOBALS._v58CE2 = 0;
+ R2_GLOBALS._uiElements._active = false;
setZoomPercents(100, 1, 160, 100);
R2_GLOBALS._player.postInit();
R2_GLOBALS._player.setObjectWrapper(NULL);
@@ -100,7 +100,7 @@ void Scene1020::postInit(SceneObjectList *OwnerList) {
g_globals->gfxManager()._bounds.moveTo(Common::Point(160, 0));
R2_GLOBALS._v558B6.set(160, 0, 160, 161);
- R2_GLOBALS._v58CE2 = 0;
+ R2_GLOBALS._uiElements._active = false;
R2_GLOBALS._player.postInit();
if (R2_GLOBALS._sceneManager._previousScene == 1010) {
@@ -330,7 +330,7 @@ void Scene1100::postInit(SceneObjectList *OwnerList) {
loadScene(1100);
if ((R2_GLOBALS._sceneManager._previousScene == 1000) && (!R2_GLOBALS.getFlag(44))) {
- R2_GLOBALS._v58CE2 = 0;
+ R2_GLOBALS._uiElements._active = false;
R2_GLOBALS._v5589E.left = 0;
R2_GLOBALS._v5589E.right = 200;
}
@@ -339,7 +339,7 @@ void Scene1100::postInit(SceneObjectList *OwnerList) {
R2_GLOBALS._sceneManager._previousScene = 1100;
if (R2_GLOBALS._sceneManager._previousScene == -1) {
- R2_GLOBALS._v58CE2 = 0;
+ R2_GLOBALS._uiElements._active = false;
R2_GLOBALS._v5589E.left = 0;
R2_GLOBALS._v5589E.right = 200;
}
@@ -542,7 +542,7 @@ void Scene1100::remove() {
if (_sceneMode > 20)
R2_GLOBALS._sound1.fadeOut2(NULL);
g_globals->gfxManager()._bounds.moveTo(Common::Point(0, 0));
- R2_GLOBALS._v58CE2 = 1;
+ R2_GLOBALS._uiElements._active = true;
SceneExt::remove();
}
@@ -3719,7 +3719,7 @@ void Scene1337::postInit(SceneObjectList *OwnerList) {
SceneExt::postInit();
//
- R2_GLOBALS._v58CE2 = 0;
+ R2_GLOBALS._uiElements._active = false;
R2_GLOBALS._player.enableControl();
R2_GLOBALS._player._canWalk = false;
@@ -3834,7 +3834,7 @@ void Scene1337::remove() {
subD1940(false);
}
- R2_GLOBALS._v58CE2 = 1;
+ R2_GLOBALS._uiElements._active = true;
SceneExt::remove();
}
@@ -5451,7 +5451,7 @@ void Scene1337::subD1A48(int arg1) {
*--------------------------------------------------------------------------*/
void Scene1500::postInit(SceneObjectList *OwnerList) {
loadScene(1500);
- R2_GLOBALS._v58CE2 = 0;
+ R2_GLOBALS._uiElements._active = false;
R2_GLOBALS._v5589E.top = 0;
R2_GLOBALS._v5589E.bottom = 200;
setZoomPercents(170, 13, 240, 100);
@@ -5514,7 +5514,7 @@ void Scene1500::postInit(SceneObjectList *OwnerList) {
void Scene1500::remove() {
R2_GLOBALS._v5589E.top = 3;
R2_GLOBALS._v5589E.bottom = 168;
- R2_GLOBALS._v58CE2 = 1;
+ R2_GLOBALS._uiElements._active = true;
SceneExt::remove();
}
@@ -5609,7 +5609,7 @@ void Scene1500::dispatch() {
*--------------------------------------------------------------------------*/
void Scene1525::postInit(SceneObjectList *OwnerList) {
loadScene(1525);
- R2_GLOBALS._v58CE2 = 0;
+ R2_GLOBALS._uiElements._active = false;
SceneExt::postInit();
R2_GLOBALS._player.postInit();
@@ -5657,7 +5657,7 @@ void Scene1530::postInit(SceneObjectList *OwnerList) {
else
loadScene(1530);
- R2_GLOBALS._v58CE2 = 0;
+ R2_GLOBALS._uiElements._active = false;
SceneExt::postInit();
_stripManager.addSpeaker(&_quinnSpeaker);
@@ -7982,7 +7982,7 @@ void Scene1575::Hotspot1::subA910D(int indx) {
void Scene1575::postInit(SceneObjectList *OwnerList) {
loadScene(1575);
- R2_GLOBALS._v58CE2 = 0;
+ R2_GLOBALS._uiElements._active = false;
R2_GLOBALS._v5589E = Rect(0, 0, 320, 200);
SceneExt::postInit();
_field414 = 390;
@@ -8097,7 +8097,7 @@ void Scene1575::remove() {
SceneExt::remove();
R2_GLOBALS._v5589E.top = 3;
R2_GLOBALS._v5589E.bottom = 168;
- R2_GLOBALS._v58CE2 = 1;
+ R2_GLOBALS._uiElements._active = true;
}
void Scene1575::signal() {
@@ -9448,7 +9448,7 @@ bool Scene1750::Actor5::startAction(CursorType action, Event &event) {
void Scene1750::postInit(SceneObjectList *OwnerList) {
loadScene(1750);
R2_GLOBALS._sound1.play(115);
- R2_GLOBALS._v58CE2 = 0;
+ R2_GLOBALS._uiElements._active = false;
R2_GLOBALS._v5589E.set(0, 0, 320, 200);
SceneExt::postInit();
@@ -9573,7 +9573,7 @@ void Scene1750::remove() {
R2_GLOBALS._sound1.fadeOut2(NULL);
R2_GLOBALS._v5589E.top = 3;
R2_GLOBALS._v5589E.bottom = 168;
- R2_GLOBALS._v58CE2 = 1;
+ R2_GLOBALS._uiElements._active = true;
}
void Scene1750::signal() {
diff --git a/engines/tsage/ringworld2/ringworld2_scenes2.cpp b/engines/tsage/ringworld2/ringworld2_scenes2.cpp
index a1409067dc..3cc541493d 100644
--- a/engines/tsage/ringworld2/ringworld2_scenes2.cpp
+++ b/engines/tsage/ringworld2/ringworld2_scenes2.cpp
@@ -2399,7 +2399,7 @@ void Scene2500::postInit(SceneObjectList *OwnerList) {
SceneExt::postInit();
if (R2_GLOBALS._player._oldCharacterScene[R2_GLOBALS._player._characterIndex] == 3100)
- R2_GLOBALS._v58CE2 = 0;
+ R2_GLOBALS._uiElements._active = false;
_stripManager.addSpeaker(&_quinnSpeaker);
_stripManager.addSpeaker(&_seekerSpeaker);
@@ -2978,7 +2978,7 @@ void Scene2600::synchronize(Serializer &s) {
void Scene2600::postInit(SceneObjectList *OwnerList) {
loadScene(2600);
- R2_GLOBALS._v58CE2 = 0;
+ R2_GLOBALS._uiElements._active = false;
SceneExt::postInit();
R2_GLOBALS._sound1.fadeSound(214);
R2_GLOBALS._sound2.play(215);
diff --git a/engines/tsage/ringworld2/ringworld2_scenes3.cpp b/engines/tsage/ringworld2/ringworld2_scenes3.cpp
index e627d9cbf5..99bcf3df44 100644
--- a/engines/tsage/ringworld2/ringworld2_scenes3.cpp
+++ b/engines/tsage/ringworld2/ringworld2_scenes3.cpp
@@ -60,7 +60,7 @@ void Scene3100::postInit(SceneObjectList *OwnerList) {
if (R2_GLOBALS._sceneManager._previousScene == 1000) {
if (R2_GLOBALS._player._oldCharacterScene[1] == 3100) {
loadScene(3101);
- R2_GLOBALS._v58CE2 = 0;
+ R2_GLOBALS._uiElements._active = false;
} else {
loadScene(3100);
g_globals->gfxManager()._bounds.moveTo(Common::Point(160, 0));
@@ -71,7 +71,7 @@ void Scene3100::postInit(SceneObjectList *OwnerList) {
// Original was doing it twice in a row. Skipped.
if (R2_GLOBALS._sceneManager._previousScene == 3255)
- R2_GLOBALS._v58CE2 = 0;
+ R2_GLOBALS._uiElements._active = false;
SceneExt::postInit();
_stripManager.addSpeaker(&_guardSpeaker);
@@ -927,7 +927,7 @@ void Scene3175::signal() {
*--------------------------------------------------------------------------*/
void Scene3200::postInit(SceneObjectList *OwnerList) {
loadScene(3200);
- R2_GLOBALS._v58CE2 = 0;
+ R2_GLOBALS._uiElements._active = false;
SceneExt::postInit();
_stripManager.addSpeaker(&_rockoSpeaker);
@@ -955,7 +955,7 @@ void Scene3200::signal() {
*--------------------------------------------------------------------------*/
void Scene3210::postInit(SceneObjectList *OwnerList) {
loadScene(3210);
- R2_GLOBALS._v58CE2 = 0;
+ R2_GLOBALS._uiElements._active = false;
SceneExt::postInit();
_stripManager.addSpeaker(&_privateSpeaker);
@@ -981,7 +981,7 @@ void Scene3210::signal() {
*--------------------------------------------------------------------------*/
void Scene3220::postInit(SceneObjectList *OwnerList) {
loadScene(3220);
- R2_GLOBALS._v58CE2 = 0;
+ R2_GLOBALS._uiElements._active = false;
SceneExt::postInit();
_stripManager.addSpeaker(&_rockoSpeaker);
@@ -1007,7 +1007,7 @@ void Scene3220::signal() {
*--------------------------------------------------------------------------*/
void Scene3230::postInit(SceneObjectList *OwnerList) {
loadScene(3230);
- R2_GLOBALS._v58CE2 = 0;
+ R2_GLOBALS._uiElements._active = false;
SceneExt::postInit();
_stripManager.addSpeaker(&_rockoSpeaker);
@@ -1034,7 +1034,7 @@ void Scene3230::signal() {
*--------------------------------------------------------------------------*/
void Scene3240::postInit(SceneObjectList *OwnerList) {
loadScene(3240);
- R2_GLOBALS._v58CE2 = 0;
+ R2_GLOBALS._uiElements._active = false;
SceneExt::postInit();
_stripManager.addSpeaker(&_tealSpeaker);
@@ -1061,7 +1061,7 @@ void Scene3240::signal() {
*--------------------------------------------------------------------------*/
void Scene3245::postInit(SceneObjectList *OwnerList) {
loadScene(3245);
- R2_GLOBALS._v58CE2 = 0;
+ R2_GLOBALS._uiElements._active = false;
SceneExt::postInit();
_stripManager.addSpeaker(&_ralfSpeaker);
@@ -1641,7 +1641,7 @@ void Scene3275::signal() {
*--------------------------------------------------------------------------*/
void Scene3350::postInit(SceneObjectList *OwnerList) {
loadScene(3350);
- R2_GLOBALS._v58CE2 = 0;
+ R2_GLOBALS._uiElements._active = false;
SceneExt::postInit();
R2_GLOBALS._sound2.play(310);
@@ -3562,7 +3562,7 @@ void Scene3500::postInit(SceneObjectList *OwnerList) {
Rect tmpRect;
loadScene(1050);
- R2_GLOBALS._v58CE2 = 0;
+ R2_GLOBALS._uiElements._active = false;
R2_GLOBALS._v5589E.set(0, 0, 320, 200);
R2_GLOBALS._sound1.play(305);
R2_GLOBALS._player._characterIndex = R2_QUINN;
@@ -4876,7 +4876,7 @@ void Scene3600::dispatch() {
*--------------------------------------------------------------------------*/
void Scene3700::postInit(SceneObjectList *OwnerList) {
loadScene(3700);
- R2_GLOBALS._v58CE2 = 0;
+ R2_GLOBALS._uiElements._active = false;
SceneExt::postInit();
_stripManager.setColors(60, 255);