aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Gilbert2013-09-15 23:25:17 -0400
committerPaul Gilbert2013-09-15 23:25:17 -0400
commit89055ab9a079ed710356862878d0bc66fdaaa840 (patch)
tree8df86b004dee7e9566751c58b71e34c83ca184cb
parentd837605477ce7d945d4f3bc1ecbf48eb89549e7c (diff)
downloadscummvm-rg350-89055ab9a079ed710356862878d0bc66fdaaa840.tar.gz
scummvm-rg350-89055ab9a079ed710356862878d0bc66fdaaa840.tar.bz2
scummvm-rg350-89055ab9a079ed710356862878d0bc66fdaaa840.zip
TSAGE: Bugfixes and renaming for R2R desert
-rw-r--r--engines/tsage/globals.cpp20
-rw-r--r--engines/tsage/globals.h10
-rw-r--r--engines/tsage/ringworld2/ringworld2_logic.cpp9
-rw-r--r--engines/tsage/ringworld2/ringworld2_scenes3.cpp266
-rw-r--r--engines/tsage/ringworld2/ringworld2_scenes3.h24
5 files changed, 166 insertions, 163 deletions
diff --git a/engines/tsage/globals.cpp b/engines/tsage/globals.cpp
index 6976a6b249..7068c2fa1a 100644
--- a/engines/tsage/globals.cpp
+++ b/engines/tsage/globals.cpp
@@ -455,12 +455,12 @@ void Ringworld2Globals::reset() {
_landerSuitNumber = 2;
_v566A4 = 1;
_v566A5 = 0;
- _v566A8 = 5;
- _v566A9 = 0;
- _v566AA = 0;
+ _desertStepsRemaining = 5;
+ _desertCorrectDirection = 0;
+ _desertPreviousDirection = 0;
for (int i = 0; i < 1000; i++)
- _v566AB[i] = 0;
- _v56A93 = -1;
+ _desertMovements[i] = 0;
+ _desertWrongDirCtr = -1;
_balloonAltitude = 5;
_scene1925CurrLevel = 0; //_v56A9C
_v56A9E = 0;
@@ -528,7 +528,7 @@ void Ringworld2Globals::synchronize(Serializer &s) {
s.syncAsSint16LE(_rimTransportLocation);
s.syncAsSint16LE(_landerSuitNumber);
s.syncAsSint16LE(_v566A6);
- s.syncAsSint16LE(_v56A93);
+ s.syncAsSint16LE(_desertWrongDirCtr);
s.syncAsSint16LE(_scene1925CurrLevel); // _v56A9C
s.syncAsSint16LE(_v56A9E);
s.syncAsSint16LE(_v56AA2);
@@ -555,9 +555,9 @@ void Ringworld2Globals::synchronize(Serializer &s) {
s.syncAsByte(_v565AE);
s.syncAsByte(_v566A4);
s.syncAsByte(_v566A5);
- s.syncAsByte(_v566A8);
- s.syncAsByte(_v566A9);
- s.syncAsByte(_v566AA);
+ s.syncAsByte(_desertStepsRemaining);
+ s.syncAsByte(_desertCorrectDirection);
+ s.syncAsByte(_desertPreviousDirection);
s.syncAsByte(_v56AA0);
s.syncAsByte(_v56AA1);
s.syncAsByte(_v56AA6);
@@ -567,7 +567,7 @@ void Ringworld2Globals::synchronize(Serializer &s) {
for (i = 0; i < 14; ++i)
s.syncAsByte(_spillLocation[i]);
for (i = 0; i < 1000; ++i)
- s.syncAsByte(_v566AB[i]);
+ s.syncAsByte(_desertMovements[i]);
s.syncAsByte(_balloonAltitude);
for (i = 0; i < 12; ++i)
s.syncAsByte(_stripManager_lookupList[i]);
diff --git a/engines/tsage/globals.h b/engines/tsage/globals.h
index 22820d0118..0684076b1e 100644
--- a/engines/tsage/globals.h
+++ b/engines/tsage/globals.h
@@ -275,11 +275,11 @@ public:
byte _v566A5;
int _v566A6;
byte _landerSuitNumber;
- byte _v566A8;
- byte _v566A9;
- byte _v566AA;
- byte _v566AB[1000];
- int _v56A93;
+ byte _desertStepsRemaining;
+ byte _desertCorrectDirection;
+ byte _desertPreviousDirection;
+ byte _desertMovements[1000];
+ int _desertWrongDirCtr;
byte _balloonAltitude;
int _scene1925CurrLevel; //_v56A9C
int _v56A9E;
diff --git a/engines/tsage/ringworld2/ringworld2_logic.cpp b/engines/tsage/ringworld2/ringworld2_logic.cpp
index e679b3835c..013abfa4a4 100644
--- a/engines/tsage/ringworld2/ringworld2_logic.cpp
+++ b/engines/tsage/ringworld2/ringworld2_logic.cpp
@@ -294,6 +294,7 @@ Scene *Ringworld2Game::createScene(int sceneNumber) {
// Cutscene - Teleport outside
return new Scene3700();
case 3800:
+ // Desert
return new Scene3800();
case 3900:
return new Scene3900();
@@ -2290,13 +2291,13 @@ void ScannerDialog::Button::reset() {
break;
case 3800:
case 3900:
- if ((R2_GLOBALS._v56A93 + 1) == 0 && R2_GLOBALS._v566A9 == 0) {
+ if ((R2_GLOBALS._desertWrongDirCtr + 1) == 0 && R2_GLOBALS._desertCorrectDirection == 0) {
do {
- R2_GLOBALS._v566A9 = R2_GLOBALS._randomSource.getRandomNumber(3);
- } while (R2_GLOBALS._v566A9 == R2_GLOBALS._v566AA);
+ R2_GLOBALS._desertCorrectDirection = R2_GLOBALS._randomSource.getRandomNumber(3) + 1;
+ } while (R2_GLOBALS._desertCorrectDirection == R2_GLOBALS._desertPreviousDirection);
}
- scanner._obj4.setup(4, 7, R2_GLOBALS._v566A9);
+ scanner._obj4.setup(4, 7, R2_GLOBALS._desertCorrectDirection);
if (!R2_GLOBALS.getFlag(46))
R2_GLOBALS.setFlag(46);
break;
diff --git a/engines/tsage/ringworld2/ringworld2_scenes3.cpp b/engines/tsage/ringworld2/ringworld2_scenes3.cpp
index 3c9a36c646..604c64927b 100644
--- a/engines/tsage/ringworld2/ringworld2_scenes3.cpp
+++ b/engines/tsage/ringworld2/ringworld2_scenes3.cpp
@@ -4950,45 +4950,47 @@ void Scene3700::signal() {
}
/*--------------------------------------------------------------------------
- * Scene 3800 -
+ * Scene 3800 - Desert
*
*--------------------------------------------------------------------------*/
+
Scene3800::Scene3800() {
- _field412 = 0;
+ _desertDirection = 0;
}
+
void Scene3800::synchronize(Serializer &s) {
SceneExt::synchronize(s);
- s.syncAsSint16LE(_field412);
+ s.syncAsSint16LE(_desertDirection);
}
-void Scene3800::Exit1::changeScene() {
+void Scene3800::NorthExit::changeScene() {
Scene3800 *scene = (Scene3800 *)R2_GLOBALS._sceneManager._scene;
_enabled = false;
- R2_GLOBALS._player.disableControl(CURSOR_ARROW);
- scene->_field412 = 1;
+ R2_GLOBALS._player.disableControl();
+ scene->_desertDirection = 1;
if (R2_GLOBALS.getFlag(46)) {
- if (scene->_field412 == R2_GLOBALS._v566A9) {
- R2_GLOBALS._v566AA = 3;
- if (R2_GLOBALS._v56A93 + 1 == 0) {
- R2_GLOBALS._v566A8--;
- R2_GLOBALS._v566A9 = 0;
+ if (scene->_desertDirection == R2_GLOBALS._desertCorrectDirection) {
+ R2_GLOBALS._desertPreviousDirection = 3;
+ if (R2_GLOBALS._desertWrongDirCtr + 1 == 0) {
+ R2_GLOBALS._desertStepsRemaining--;
+ R2_GLOBALS._desertCorrectDirection = 0;
} else {
- R2_GLOBALS._v566A9 = R2_GLOBALS._v566AB[R2_GLOBALS._v56A93];
- R2_GLOBALS._v56A93--;
+ R2_GLOBALS._desertCorrectDirection = R2_GLOBALS._desertMovements[R2_GLOBALS._desertWrongDirCtr];
+ R2_GLOBALS._desertWrongDirCtr--;
}
} else {
- ++R2_GLOBALS._v56A93;
- if (R2_GLOBALS._v56A93 > 999)
- R2_GLOBALS._v56A93 = 999;
- R2_GLOBALS._v566AB[R2_GLOBALS._v56A93] = R2_GLOBALS._v566A9;
- R2_GLOBALS._v566A9 = 3;
+ ++R2_GLOBALS._desertWrongDirCtr;
+ if (R2_GLOBALS._desertWrongDirCtr > 999)
+ R2_GLOBALS._desertWrongDirCtr = 999;
+ R2_GLOBALS._desertMovements[R2_GLOBALS._desertWrongDirCtr] = R2_GLOBALS._desertCorrectDirection;
+ R2_GLOBALS._desertCorrectDirection = 3;
}
}
- if (R2_GLOBALS._v566A8 == 0)
+ if (R2_GLOBALS._desertStepsRemaining == 0)
scene->_sceneMode = 16;
else
scene->_sceneMode = 11;
@@ -4998,33 +5000,33 @@ void Scene3800::Exit1::changeScene() {
R2_GLOBALS._player.addMover(mover, &pt, scene);
}
-void Scene3800::Exit2::changeScene() {
+void Scene3800::EastExit::changeScene() {
Scene3800 *scene = (Scene3800 *)R2_GLOBALS._sceneManager._scene;
_enabled = false;
R2_GLOBALS._player.disableControl(CURSOR_ARROW);
- scene->_field412 = 2;
+ scene->_desertDirection = 2;
if (R2_GLOBALS.getFlag(46)) {
- if (scene->_field412 == R2_GLOBALS._v566A9) {
- R2_GLOBALS._v566AA = 4;
- if (R2_GLOBALS._v56A93 + 1 == 0) {
- R2_GLOBALS._v566A8--;
- R2_GLOBALS._v566A9 = 0;
+ if (scene->_desertDirection == R2_GLOBALS._desertCorrectDirection) {
+ R2_GLOBALS._desertPreviousDirection = 4;
+ if (R2_GLOBALS._desertWrongDirCtr + 1 == 0) {
+ R2_GLOBALS._desertStepsRemaining--;
+ R2_GLOBALS._desertCorrectDirection = 0;
} else {
- R2_GLOBALS._v566A9 = R2_GLOBALS._v566AB[R2_GLOBALS._v56A93];
- R2_GLOBALS._v56A93--;
+ R2_GLOBALS._desertCorrectDirection = R2_GLOBALS._desertMovements[R2_GLOBALS._desertWrongDirCtr];
+ R2_GLOBALS._desertWrongDirCtr--;
}
} else {
- ++R2_GLOBALS._v56A93;
- if (R2_GLOBALS._v56A93 > 999)
- R2_GLOBALS._v56A93 = 999;
- R2_GLOBALS._v566AB[R2_GLOBALS._v56A93] = R2_GLOBALS._v566A9;
- R2_GLOBALS._v566A9 = 4;
+ ++R2_GLOBALS._desertWrongDirCtr;
+ if (R2_GLOBALS._desertWrongDirCtr > 999)
+ R2_GLOBALS._desertWrongDirCtr = 999;
+ R2_GLOBALS._desertMovements[R2_GLOBALS._desertWrongDirCtr] = R2_GLOBALS._desertCorrectDirection;
+ R2_GLOBALS._desertCorrectDirection = 4;
}
}
- if (R2_GLOBALS._v566A8 == 0)
+ if (R2_GLOBALS._desertStepsRemaining == 0)
scene->_sceneMode = 16;
else
scene->_sceneMode = 12;
@@ -5034,33 +5036,33 @@ void Scene3800::Exit2::changeScene() {
R2_GLOBALS._player.addMover(mover, &pt, scene);
}
-void Scene3800::Exit3::changeScene() {
+void Scene3800::SouthExit::changeScene() {
Scene3800 *scene = (Scene3800 *)R2_GLOBALS._sceneManager._scene;
_enabled = false;
R2_GLOBALS._player.disableControl(CURSOR_ARROW);
- scene->_field412 = 3;
+ scene->_desertDirection = 3;
if (R2_GLOBALS.getFlag(46)) {
- if (scene->_field412 == R2_GLOBALS._v566A9) {
- R2_GLOBALS._v566AA = 1;
- if (R2_GLOBALS._v56A93 + 1 == 0) {
- R2_GLOBALS._v566A8--;
- R2_GLOBALS._v566A9 = 0;
+ if (scene->_desertDirection == R2_GLOBALS._desertCorrectDirection) {
+ R2_GLOBALS._desertPreviousDirection = 1;
+ if (R2_GLOBALS._desertWrongDirCtr + 1 == 0) {
+ R2_GLOBALS._desertStepsRemaining--;
+ R2_GLOBALS._desertCorrectDirection = 0;
} else {
- R2_GLOBALS._v566A9 = R2_GLOBALS._v566AB[R2_GLOBALS._v56A93];
- R2_GLOBALS._v56A93--;
+ R2_GLOBALS._desertCorrectDirection = R2_GLOBALS._desertMovements[R2_GLOBALS._desertWrongDirCtr];
+ R2_GLOBALS._desertWrongDirCtr--;
}
} else {
- ++R2_GLOBALS._v56A93;
- if (R2_GLOBALS._v56A93 > 999)
- R2_GLOBALS._v56A93 = 999;
- R2_GLOBALS._v566AB[R2_GLOBALS._v56A93] = R2_GLOBALS._v566A9;
- R2_GLOBALS._v566A9 = 1;
+ ++R2_GLOBALS._desertWrongDirCtr;
+ if (R2_GLOBALS._desertWrongDirCtr > 999)
+ R2_GLOBALS._desertWrongDirCtr = 999;
+ R2_GLOBALS._desertMovements[R2_GLOBALS._desertWrongDirCtr] = R2_GLOBALS._desertCorrectDirection;
+ R2_GLOBALS._desertCorrectDirection = 1;
}
}
- if (R2_GLOBALS._v566A8 == 0)
+ if (R2_GLOBALS._desertStepsRemaining == 0)
scene->_sceneMode = 16;
else
scene->_sceneMode = 13;
@@ -5070,33 +5072,33 @@ void Scene3800::Exit3::changeScene() {
R2_GLOBALS._player.addMover(mover, &pt, scene);
}
-void Scene3800::Exit4::changeScene() {
+void Scene3800::WestExit::changeScene() {
Scene3800 *scene = (Scene3800 *)R2_GLOBALS._sceneManager._scene;
_enabled = false;
R2_GLOBALS._player.disableControl(CURSOR_ARROW);
- scene->_field412 = 4;
+ scene->_desertDirection = 4;
if (R2_GLOBALS.getFlag(46)) {
- if (scene->_field412 == R2_GLOBALS._v566A9) {
- R2_GLOBALS._v566AA = 2;
- if (R2_GLOBALS._v56A93 + 1 == 0) {
- R2_GLOBALS._v566A8--;
- R2_GLOBALS._v566A9 = 0;
+ if (scene->_desertDirection == R2_GLOBALS._desertCorrectDirection) {
+ R2_GLOBALS._desertPreviousDirection = 2;
+ if (R2_GLOBALS._desertWrongDirCtr + 1 == 0) {
+ R2_GLOBALS._desertStepsRemaining--;
+ R2_GLOBALS._desertCorrectDirection = 0;
} else {
- R2_GLOBALS._v566A9 = R2_GLOBALS._v566AB[R2_GLOBALS._v56A93];
- R2_GLOBALS._v56A93--;
+ R2_GLOBALS._desertCorrectDirection = R2_GLOBALS._desertMovements[R2_GLOBALS._desertWrongDirCtr];
+ R2_GLOBALS._desertWrongDirCtr--;
}
} else {
- ++R2_GLOBALS._v56A93;
- if (R2_GLOBALS._v56A93 > 999)
- R2_GLOBALS._v56A93 = 999;
- R2_GLOBALS._v566AB[R2_GLOBALS._v56A93] = R2_GLOBALS._v566A9;
- R2_GLOBALS._v566A9 = 2;
+ ++R2_GLOBALS._desertWrongDirCtr;
+ if (R2_GLOBALS._desertWrongDirCtr > 999)
+ R2_GLOBALS._desertWrongDirCtr = 999;
+ R2_GLOBALS._desertMovements[R2_GLOBALS._desertWrongDirCtr] = R2_GLOBALS._desertCorrectDirection;
+ R2_GLOBALS._desertCorrectDirection = 2;
}
}
- if (R2_GLOBALS._v566A8 == 0)
+ if (R2_GLOBALS._desertStepsRemaining == 0)
scene->_sceneMode = 16;
else
scene->_sceneMode = 14;
@@ -5106,28 +5108,28 @@ void Scene3800::Exit4::changeScene() {
R2_GLOBALS._player.addMover(mover, &pt, scene);
}
-void Scene3800::initScene3800() {
- _exit1._enabled = true;
- _exit2._enabled = true;
- _exit3._enabled = true;
- _exit4._enabled = true;
- _exit1._insideArea = false;
- _exit2._insideArea = false;
- _exit3._insideArea = false;
- _exit4._insideArea = false;
- _exit1._moving = false;
- _exit2._moving = false;
- _exit3._moving = false;
- _exit4._moving = false;
+void Scene3800::initExits() {
+ _northExit._enabled = true;
+ _eastExit._enabled = true;
+ _southExit._enabled = true;
+ _westExit._enabled = true;
+ _northExit._insideArea = false;
+ _eastExit._insideArea = false;
+ _southExit._insideArea = false;
+ _westExit._insideArea = false;
+ _northExit._moving = false;
+ _eastExit._moving = false;
+ _southExit._moving = false;
+ _westExit._moving = false;
loadScene(R2_GLOBALS._v566A6);
R2_GLOBALS._uiElements.draw();
}
-void Scene3800::sub110BBD() {
+void Scene3800::enterArea() {
R2_GLOBALS._player.disableControl();
- switch (_field412) {
+ switch (_desertDirection) {
case 0:
R2_GLOBALS._player.postInit();
R2_GLOBALS._player.setVisage(10);
@@ -5153,7 +5155,7 @@ void Scene3800::sub110BBD() {
break;
case 3900:
_sceneMode = 15;
- switch (R2_GLOBALS._v566AA - 1) {
+ switch (R2_GLOBALS._desertPreviousDirection - 1) {
case 0: {
R2_GLOBALS._player.setPosition(Common::Point(160, 220));
Common::Point pt(160, 160);
@@ -5228,9 +5230,9 @@ void Scene3800::sub110BBD() {
}
void Scene3800::postInit(SceneObjectList *OwnerList) {
- _field412 = 0;
+ _desertDirection = 0;
- initScene3800();
+ initExits();
SceneExt::postInit();
R2_GLOBALS._sound1.play(231);
@@ -5239,19 +5241,19 @@ void Scene3800::postInit(SceneObjectList *OwnerList) {
setZoomPercents(87, 40, 144, 100);
- _exit1.setDetails(Rect(14, 87, 305, 125), SHADECURSOR_UP, 3800);
- _exit1.setDest(Common::Point(160, 126));
- _exit2.setDetails(Rect(305, 87, 320, 128), EXITCURSOR_E, 3800);
- _exit2.setDest(Common::Point(312, 145));
- _exit3.setDetails(Rect(14, 160, 305, 168), SHADECURSOR_DOWN, 3800);
- _exit3.setDest(Common::Point(160, 165));
- _exit4.setDetails(Rect(0, 87, 14, 168), EXITCURSOR_W, 3800);
- _exit4.setDest(Common::Point(7, 145));
+ _northExit.setDetails(Rect(14, 87, 305, 125), SHADECURSOR_UP, 3800);
+ _northExit.setDest(Common::Point(160, 126));
+ _eastExit.setDetails(Rect(305, 87, 320, 168), EXITCURSOR_E, 3800);
+ _eastExit.setDest(Common::Point(312, 145));
+ _southExit.setDetails(Rect(14, 160, 305, 168), SHADECURSOR_DOWN, 3800);
+ _southExit.setDest(Common::Point(160, 165));
+ _westExit.setDetails(Rect(0, 87, 14, 168), EXITCURSOR_W, 3800);
+ _westExit.setDest(Common::Point(7, 145));
_rect1.set(0, 0, 320, 87);
- _item1.setDetails(Rect(0, 0, 320, 200), 3800, 0, 1, 2, 1, (SceneItem *) NULL);
+ _background.setDetails(Rect(0, 0, 320, 200), 3800, 0, 1, 2, 1, (SceneItem *) NULL);
- sub110BBD();
+ enterArea();
}
void Scene3800::signal() {
@@ -5260,33 +5262,33 @@ void Scene3800::signal() {
R2_GLOBALS._v566A6 += 15;
if (R2_GLOBALS._v566A6 > 3815)
R2_GLOBALS._v566A6 -= 20;
- initScene3800();
- sub110BBD();
+ initExits();
+ enterArea();
break;
case 12:
R2_GLOBALS._v566A6 += 5;
if (R2_GLOBALS._v566A6 > 3815)
R2_GLOBALS._v566A6 = 3800;
- initScene3800();
- sub110BBD();
+ initExits();
+ enterArea();
break;
case 13:
R2_GLOBALS._v566A6 -= 15;
if (R2_GLOBALS._v566A6 < 3800)
R2_GLOBALS._v566A6 += 20;
- initScene3800();
- sub110BBD();
+ initExits();
+ enterArea();
break;
case 14:
R2_GLOBALS._v566A6 -= 5;
if (R2_GLOBALS._v566A6 < 3800)
R2_GLOBALS._v566A6 = 3815;
- initScene3800();
- sub110BBD();
+ initExits();
+ enterArea();
break;
case 15:
R2_GLOBALS._v56AAB = 0;
- R2_GLOBALS._player.disableControl(CURSOR_ARROW);
+ R2_GLOBALS._player.enableControl();
break;
case 16:
g_globals->_sceneManager.changeScene(3900);
@@ -5296,22 +5298,22 @@ void Scene3800::signal() {
_object1.remove();
_object2.remove();
R2_GLOBALS._v56AAB = 0;
- R2_GLOBALS._player.disableControl(CURSOR_ARROW);
+ R2_GLOBALS._player.enableControl();
break;
case 3805:
- _exit1._enabled = false;
- _exit2._enabled = false;
- _exit3._enabled = false;
- _exit4._enabled = false;
+ _northExit._enabled = false;
+ _eastExit._enabled = false;
+ _southExit._enabled = false;
+ _westExit._enabled = false;
R2_GLOBALS._player._canWalk = false;
R2_GLOBALS._events.setCursor(CURSOR_USE);
break;
case 3806:
- _exit1._enabled = true;
- _exit2._enabled = true;
- _exit3._enabled = true;
- _exit4._enabled = true;
- R2_GLOBALS._player.disableControl(CURSOR_ARROW);
+ _northExit._enabled = true;
+ _eastExit._enabled = true;
+ _southExit._enabled = true;
+ _westExit._enabled = true;
+ R2_GLOBALS._player.enableControl();
break;
default:
break;
@@ -5350,9 +5352,9 @@ void Scene3900::Exit1::changeScene() {
_enabled = false;
R2_GLOBALS._player.disableControl(CURSOR_ARROW);
- R2_GLOBALS._v566A9 = 3;
- R2_GLOBALS._v566AA = 1;
- R2_GLOBALS._v566A8 = 1;
+ R2_GLOBALS._desertCorrectDirection = 3;
+ R2_GLOBALS._desertPreviousDirection = 1;
+ R2_GLOBALS._desertStepsRemaining = 1;
scene->_sceneMode = 14;
Common::Point pt(160, 115);
@@ -5365,9 +5367,9 @@ void Scene3900::Exit2::changeScene() {
_enabled = false;
R2_GLOBALS._player.disableControl(CURSOR_ARROW);
- R2_GLOBALS._v566A9 = 4;
- R2_GLOBALS._v566AA = 2;
- R2_GLOBALS._v566A8 = 1;
+ R2_GLOBALS._desertCorrectDirection = 4;
+ R2_GLOBALS._desertPreviousDirection = 2;
+ R2_GLOBALS._desertStepsRemaining = 1;
scene->_sceneMode = 14;
Common::Point pt(330, 145);
@@ -5380,9 +5382,9 @@ void Scene3900::Exit3::changeScene() {
_enabled = false;
R2_GLOBALS._player.disableControl(CURSOR_ARROW);
- R2_GLOBALS._v566A9 = 1;
- R2_GLOBALS._v566AA = 3;
- R2_GLOBALS._v566A8 = 1;
+ R2_GLOBALS._desertCorrectDirection = 1;
+ R2_GLOBALS._desertPreviousDirection = 3;
+ R2_GLOBALS._desertStepsRemaining = 1;
scene->_sceneMode = 14;
Common::Point pt(160, 220);
@@ -5395,9 +5397,9 @@ void Scene3900::Exit4::changeScene() {
_enabled = false;
R2_GLOBALS._player.disableControl(CURSOR_ARROW);
- R2_GLOBALS._v566A9 = 2;
- R2_GLOBALS._v566AA = 4;
- R2_GLOBALS._v566A8 = 1;
+ R2_GLOBALS._desertCorrectDirection = 2;
+ R2_GLOBALS._desertPreviousDirection = 4;
+ R2_GLOBALS._desertStepsRemaining = 1;
scene->_sceneMode = 14;
Common::Point pt(-10, 145);
@@ -5412,7 +5414,7 @@ void Scene3900::Exit5::changeScene() {
R2_GLOBALS._player.disableControl(CURSOR_ARROW);
scene->_sceneMode = 13;
- if (R2_GLOBALS._v566A9 == 4) {
+ if (R2_GLOBALS._desertCorrectDirection == 4) {
Common::Point pt(-10, 135);
NpcMover *mover = new NpcMover();
R2_GLOBALS._player.addMover(mover, &pt, scene);
@@ -5422,11 +5424,11 @@ void Scene3900::Exit5::changeScene() {
R2_GLOBALS._player.addMover(mover, &pt, scene);
}
- R2_GLOBALS._v566A9 = 0;
+ R2_GLOBALS._desertCorrectDirection = 0;
}
void Scene3900::postInit(SceneObjectList *OwnerList) {
- if ((R2_GLOBALS._v566AA == 2) && (R2_GLOBALS._sceneManager._previousScene != 2700))
+ if ((R2_GLOBALS._desertPreviousDirection == 2) && (R2_GLOBALS._sceneManager._previousScene != 2700))
loadScene(3825);
else
loadScene(3820);
@@ -5447,9 +5449,9 @@ void Scene3900::postInit(SceneObjectList *OwnerList) {
_actor1._effect = 5;
_actor1._field9C = _field312;
R2_GLOBALS._player._linkedActor = &_actor1;
- if ((R2_GLOBALS._v566AA == 2) && (R2_GLOBALS._sceneManager._previousScene != 2700)) {
+ if ((R2_GLOBALS._desertPreviousDirection == 2) && (R2_GLOBALS._sceneManager._previousScene != 2700)) {
// loadScene(3825);
- R2_GLOBALS._v566AA = 4;
+ R2_GLOBALS._desertPreviousDirection = 4;
_exit1.setDetails(Rect(29, 87, 305, 125), SHADECURSOR_UP, 3900);
_exit3.setDetails(Rect(29, 160, 305, 168), SHADECURSOR_DOWN, 3900);
@@ -5465,7 +5467,7 @@ void Scene3900::postInit(SceneObjectList *OwnerList) {
_exit5.setDest(Common::Point(24, 135));
} else {
// loadScene(3820);
- R2_GLOBALS._v566AA = 2;
+ R2_GLOBALS._desertPreviousDirection = 2;
_exit1.setDetails(Rect(14, 87, 290, 125), SHADECURSOR_UP, 3900);
_exit3.setDetails(Rect(14, 160, 290, 168), SHADECURSOR_DOWN, 3900);
@@ -5503,7 +5505,7 @@ void Scene3900::postInit(SceneObjectList *OwnerList) {
_item1.setDetails(Rect(0, 0, 320, 200), 3800, 0, 1, 2, 1, (SceneItem *)NULL);
if (R2_GLOBALS._sceneManager._previousScene == 3800) {
_sceneMode = 11;
- switch (R2_GLOBALS._v566AA - 1) {
+ switch (R2_GLOBALS._desertPreviousDirection - 1) {
case 0: {
R2_GLOBALS._player.setPosition(Common::Point(160, 115));
Common::Point pt(160, 120);
@@ -5553,7 +5555,7 @@ void Scene3900::signal() {
// No break on purpose
case 12:
R2_GLOBALS._v56AAB = 0;
- R2_GLOBALS._player.enableControl(CURSOR_ARROW);
+ R2_GLOBALS._player.enableControl(CURSOR_WALK);
break;
case 13:
R2_GLOBALS._sceneManager.changeScene(2700);
@@ -5567,7 +5569,7 @@ void Scene3900::signal() {
_exit3._enabled = false;
_exit4._enabled = false;
R2_GLOBALS._player._canWalk = false;
- R2_GLOBALS._events.setCursor(R2_STEPPING_DISKS);
+ R2_GLOBALS._events.setCursor(CURSOR_USE);
break;
case 3806:
_exit1._enabled = true;
diff --git a/engines/tsage/ringworld2/ringworld2_scenes3.h b/engines/tsage/ringworld2/ringworld2_scenes3.h
index 85e5674433..ac81889fd7 100644
--- a/engines/tsage/ringworld2/ringworld2_scenes3.h
+++ b/engines/tsage/ringworld2/ringworld2_scenes3.h
@@ -778,22 +778,22 @@ public:
};
class Scene3800 : public SceneExt {
- class Exit1 : public SceneExit {
+ class NorthExit : public SceneExit {
public:
virtual void changeScene();
};
- class Exit2 : public SceneExit {
+ class EastExit : public SceneExit {
public:
virtual void changeScene();
};
- class Exit3 : public SceneExit {
+ class SouthExit : public SceneExit {
public:
virtual void changeScene();
};
- class Exit4 : public SceneExit {
+ class WestExit : public SceneExit {
public:
virtual void changeScene();
};
@@ -802,19 +802,19 @@ public:
SceneObject _object1;
SceneObject _object2;
SceneActor _actor1;
- NamedHotspot _item1;
- Exit1 _exit1;
- Exit2 _exit2;
- Exit3 _exit3;
- Exit4 _exit4;
+ NamedHotspot _background;
+ NorthExit _northExit;
+ EastExit _eastExit;
+ SouthExit _southExit;
+ WestExit _westExit;
Rect _rect1;
SequenceManager _sequenceManager1;
- int _field412;
+ int _desertDirection;
Scene3800();
- void initScene3800();
- void sub110BBD();
+ void initExits();
+ void enterArea();
virtual void postInit(SceneObjectList *OwnerList = NULL);
virtual void signal();