aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStrangerke2013-08-22 22:52:27 +0200
committerStrangerke2013-08-22 22:52:27 +0200
commit7b3a7c2165bbddff707196b40b8a1e23e288148b (patch)
treee557de949a97830b91f4621441be0c09d12e6368
parent8a340007ea66983dd2f754c63dbf1afdc5892969 (diff)
downloadscummvm-rg350-7b3a7c2165bbddff707196b40b8a1e23e288148b.tar.gz
scummvm-rg350-7b3a7c2165bbddff707196b40b8a1e23e288148b.tar.bz2
scummvm-rg350-7b3a7c2165bbddff707196b40b8a1e23e288148b.zip
TSAGE: R2R - Fix some checks on action, check calls of getObjectScene and replace magic values by constant
-rw-r--r--engines/tsage/ringworld2/ringworld2_scenes0.cpp21
-rw-r--r--engines/tsage/ringworld2/ringworld2_scenes1.cpp60
-rw-r--r--engines/tsage/ringworld2/ringworld2_scenes2.cpp48
-rw-r--r--engines/tsage/ringworld2/ringworld2_scenes3.cpp18
4 files changed, 74 insertions, 73 deletions
diff --git a/engines/tsage/ringworld2/ringworld2_scenes0.cpp b/engines/tsage/ringworld2/ringworld2_scenes0.cpp
index 34aaf98e51..49152a5f30 100644
--- a/engines/tsage/ringworld2/ringworld2_scenes0.cpp
+++ b/engines/tsage/ringworld2/ringworld2_scenes0.cpp
@@ -5587,8 +5587,8 @@ GfxSurface Scene600::Actor4::getFrame() {
}
bool Scene600::Doorway::startAction(CursorType action, Event &event) {
- // CHECKME: The original is checking is action == 0. To be verified.
- if (action == INV_NONE)
+ // Only action cursors
+ if (action < CURSOR_WALK)
return false;
if (action != CURSOR_USE)
@@ -5700,10 +5700,11 @@ bool Scene600::Laser::startAction(CursorType action, Event &event) {
bool Scene600::Aerosol::startAction(CursorType action, Event &event) {
Scene600 *scene = (Scene600 *)R2_GLOBALS._sceneManager._scene;
- // CHECKME: The original is checking is action == 0. To be verified.
- if (action == INV_NONE) {
+ // Only action cursors
+ if (action < CURSOR_WALK)
return false;
- } else if (action == CURSOR_USE) {
+
+ if (action == CURSOR_USE) {
R2_GLOBALS._player.disableControl();
scene->_sceneMode = 614;
scene->setAction(&scene->_sequenceManager1, scene, 614, &R2_GLOBALS._player, &scene->_aerosol, NULL);
@@ -5731,11 +5732,11 @@ void Scene600::synchronize(Serializer &s) {
bool Scene600::Actor8::startAction(CursorType action, Event &event) {
Scene600 *scene = (Scene600 *)R2_GLOBALS._sceneManager._scene;
- if ((action == CURSOR_USE) && (R2_INVENTORY.getObjectScene(9) == 600)) {
+ if ((action == CURSOR_USE) && (R2_INVENTORY.getObjectScene(R2_COM_SCANNER) == 600)) {
R2_GLOBALS._player.disableControl();
scene->_sceneMode = 615;
scene->setAction(&scene->_sequenceManager1, scene, 615, &R2_GLOBALS._player, &scene->_actor8, NULL);
- } else if ((action == R2_SONIC_STUNNER) && (R2_INVENTORY.getObjectScene(9) == 600) && (R2_GLOBALS._scannerFrequencies[1] == 2) && (!R2_GLOBALS.getFlag(8))){
+ } else if ((action == R2_SONIC_STUNNER) && (R2_INVENTORY.getObjectScene(R2_COM_SCANNER) == 600) && (R2_GLOBALS._scannerFrequencies[1] == 2) && (!R2_GLOBALS.getFlag(8))){
R2_GLOBALS._player.disableControl();
scene->_sceneMode = 608;
scene->setAction(&scene->_sequenceManager1, scene, 608, &R2_GLOBALS._player, &scene->_actor4, NULL);
@@ -5772,7 +5773,7 @@ void Scene600::postInit(SceneObjectList *OwnerList) {
_laser.postInit();
_laser.setPosition(Common::Point(246, 41));
- if (R2_INVENTORY.getObjectScene(9) == 600) {
+ if (R2_INVENTORY.getObjectScene(R2_COM_SCANNER) == 600) {
_actor8.postInit();
_actor8.setup(602, 5, 1);
_actor8.setPosition(Common::Point(246, 41));
@@ -5812,7 +5813,7 @@ void Scene600::postInit(SceneObjectList *OwnerList) {
_object1.setup2(603, 1, 1, 244, 50, 10, 0);
if (R2_GLOBALS.getFlag(5)) {
- if (R2_INVENTORY.getObjectScene(12) == 600) {
+ if (R2_INVENTORY.getObjectScene(R2_AEROSOL) == 600) {
_aerosol.postInit();
_aerosol.setup(602, 2, 2);
_aerosol.setPosition(Common::Point(189, 95));
@@ -5881,7 +5882,7 @@ void Scene600::postInit(SceneObjectList *OwnerList) {
}
void Scene600::remove() {
- if (R2_INVENTORY.getObjectScene(9) == 600)
+ if (R2_INVENTORY.getObjectScene(R2_COM_SCANNER) == 600)
R2_GLOBALS._sound4.fadeOut2(NULL);
SceneExt::remove();
}
diff --git a/engines/tsage/ringworld2/ringworld2_scenes1.cpp b/engines/tsage/ringworld2/ringworld2_scenes1.cpp
index 1258e464ff..c7ef5bc4e1 100644
--- a/engines/tsage/ringworld2/ringworld2_scenes1.cpp
+++ b/engines/tsage/ringworld2/ringworld2_scenes1.cpp
@@ -9671,7 +9671,7 @@ bool Scene1580::Hotspot2::startAction(CursorType action, Event &event) {
scene->_actor3.setPosition(Common::Point(124, 108));
scene->_actor3.fixPriority(10);
- if (R2_INVENTORY.getObjectScene(26) == 1580)
+ if (R2_INVENTORY.getObjectScene(R2_JOYSTICK) == 1580)
scene->_actor3.setDetails(1550, 14, -1, -1, 5, &scene->_actor2);
else
scene->_actor3.setDetails(1550, 14, -1, -1, 2, (SceneItem *)NULL);
@@ -9691,10 +9691,10 @@ bool Scene1580::Hotspot2::startAction(CursorType action, Event &event) {
}
bool Scene1580::Actor2::startAction(CursorType action, Event &event) {
- if ( (action == CURSOR_USE) && (R2_INVENTORY.getObjectScene(28) == 1580)
- && (R2_INVENTORY.getObjectScene(17) == 0) && (R2_INVENTORY.getObjectScene(22) == 0)
- && (R2_INVENTORY.getObjectScene(25) == 0) && (R2_INVENTORY.getObjectScene(18) == 0)
- && (R2_INVENTORY.getObjectScene(23) == 0) && (R2_INVENTORY.getObjectScene(27) == 0)) {
+ if ( (action == CURSOR_USE) && (R2_INVENTORY.getObjectScene(R2_DIAGNOSTICS_DISPLAY) == 1580)
+ && (R2_INVENTORY.getObjectScene(R2_FUEL_CELL) == 0) && (R2_INVENTORY.getObjectScene(R2_GUIDANCE_MODULE) == 0)
+ && (R2_INVENTORY.getObjectScene(R2_RADAR_MECHANISM) == 0) && (R2_INVENTORY.getObjectScene(R2_GYROSCOPE) == 0)
+ && (R2_INVENTORY.getObjectScene(R2_THRUSTER_VALVE) == 0) && (R2_INVENTORY.getObjectScene(R2_IGNITOR) == 0)) {
Scene1580 *scene = (Scene1580 *)R2_GLOBALS._sceneManager._scene;
scene->_sceneMode = 31;
R2_GLOBALS._player.disableControl();
@@ -9711,7 +9711,7 @@ bool Scene1580::Actor2::startAction(CursorType action, Event &event) {
}
bool Scene1580::Actor3::startAction(CursorType action, Event &event) {
- if ((action == CURSOR_USE) && (R2_INVENTORY.getObjectScene(51) == 1580)) {
+ if ((action == CURSOR_USE) && (R2_INVENTORY.getObjectScene(R2_BROKEN_DISPLAY) == 1580)) {
Scene1580 *scene = (Scene1580 *)R2_GLOBALS._sceneManager._scene;
R2_INVENTORY.setObjectScene(51, R2_GLOBALS._player._characterIndex);
@@ -9830,7 +9830,7 @@ void Scene1580::postInit(SceneObjectList *OwnerList) {
_sceneMode = 0;
R2_GLOBALS._player.disableControl();
- if (R2_INVENTORY.getObjectScene(26) == 1580) {
+ if (R2_INVENTORY.getObjectScene(R2_JOYSTICK) == 1580) {
_actor2.postInit();
_actor2.setup(1580, 1, 4);
_actor2.setPosition(Common::Point(159, 163));
@@ -9839,7 +9839,7 @@ void Scene1580::postInit(SceneObjectList *OwnerList) {
_item1.setDetails(Rect(141, 148, 179, 167), 1550, 79, -1, -1, 1, NULL);
}
- if (R2_INVENTORY.getObjectScene(51) == 1580) {
+ if (R2_INVENTORY.getObjectScene(R2_BROKEN_DISPLAY) == 1580) {
_actor3.postInit();
_actor3.setup(1580, 1, 1);
_actor3.setPosition(Common::Point(124, 108));
@@ -9850,7 +9850,7 @@ void Scene1580::postInit(SceneObjectList *OwnerList) {
_actor1.setup(1580, 1, 3);
_actor1.setPosition(Common::Point(124, 96));
_actor1.fixPriority(20);
- } else if (R2_INVENTORY.getObjectScene(28) == 1580) {
+ } else if (R2_INVENTORY.getObjectScene(R2_DIAGNOSTICS_DISPLAY) == 1580) {
_actor3.postInit();
_actor3.setup(1580, 1, 1);
_actor3.setPosition(Common::Point(124, 108));
@@ -9884,7 +9884,7 @@ void Scene1580::postInit(SceneObjectList *OwnerList) {
_actor5.fixPriority(100);
_actor5.setDetails(1550, 81, -1, -1, 1, (SceneItem *) NULL);
- if (R2_INVENTORY.getObjectScene(23) == 1580) {
+ if (R2_INVENTORY.getObjectScene(R2_THRUSTER_VALVE) == 1580) {
_actor6.postInit();
_actor6.setup(1580, 6, 2);
_actor6.setPosition(Common::Point(222, 108));
@@ -9892,7 +9892,7 @@ void Scene1580::postInit(SceneObjectList *OwnerList) {
_actor6.setDetails(1550, 32, -1, 34, 1, (SceneItem *) NULL);
}
- if (R2_INVENTORY.getObjectScene(27) == 1580) {
+ if (R2_INVENTORY.getObjectScene(R2_IGNITOR) == 1580) {
_actor7.postInit();
_actor7.setup(1580, 6, 1);
_actor7.setPosition(Common::Point(195, 108));
@@ -9917,49 +9917,49 @@ void Scene1580::signal() {
_actor1.setup(1580, 1, 2);
_actor1.setPosition(Common::Point(124, 94));
- if (R2_INVENTORY.getObjectScene(18) != 0) {
+ if (R2_INVENTORY.getObjectScene(R2_GYROSCOPE) != 0) {
_arrActor[0].postInit();
_arrActor[0].setup(1580, 2, 1);
_arrActor[0].setPosition(Common::Point(138, 56));
}
- if (R2_INVENTORY.getObjectScene(25) != 0) {
+ if (R2_INVENTORY.getObjectScene(R2_RADAR_MECHANISM) != 0) {
_arrActor[1].postInit();
_arrActor[1].setup(1580, 2, 2);
_arrActor[1].setPosition(Common::Point(140, 66));
}
- if (R2_INVENTORY.getObjectScene(27) != 0) {
+ if (R2_INVENTORY.getObjectScene(R2_IGNITOR) != 0) {
_arrActor[2].postInit();
_arrActor[2].setup(1580, 2, 3);
_arrActor[2].setPosition(Common::Point(142, 85));
}
- if (R2_INVENTORY.getObjectScene(23) != 0) {
+ if (R2_INVENTORY.getObjectScene(R2_THRUSTER_VALVE) != 0) {
_arrActor[3].postInit();
_arrActor[3].setup(1580, 2, 4);
_arrActor[3].setPosition(Common::Point(142, 92));
}
- if (R2_INVENTORY.getObjectScene(22) != 0) {
+ if (R2_INVENTORY.getObjectScene(R2_GUIDANCE_MODULE) != 0) {
_arrActor[4].postInit();
_arrActor[4].setup(1580, 2, 5);
_arrActor[4].setPosition(Common::Point(108, 54));
}
- if (R2_INVENTORY.getObjectScene(26) != 0) {
+ if (R2_INVENTORY.getObjectScene(R2_JOYSTICK) != 0) {
_arrActor[5].postInit();
_arrActor[5].setup(1580, 2, 6);
_arrActor[5].setPosition(Common::Point(110, 64));
}
- if (R2_INVENTORY.getObjectScene(45) != 0) {
+ if (R2_INVENTORY.getObjectScene(R2_BATTERY) != 0) {
_arrActor[6].postInit();
_arrActor[6].setup(1580, 2, 7);
_arrActor[6].setPosition(Common::Point(108, 80));
}
- if (R2_INVENTORY.getObjectScene(17) != 0) {
+ if (R2_INVENTORY.getObjectScene(R2_FUEL_CELL) != 0) {
_arrActor[7].postInit();
_arrActor[7].setup(1580, 2, 8);
_arrActor[7].setPosition(Common::Point(111, 92));
@@ -13620,7 +13620,7 @@ bool Scene1950::Actor2::startAction(CursorType action, Event &event) {
}
bool Scene1950::Actor3::startAction(CursorType action, Event &event) {
- if ((action != CURSOR_USE) || (R2_INVENTORY.getObjectScene(35) != 1950))
+ if ((action != CURSOR_USE) || (R2_INVENTORY.getObjectScene(R2_ANCIENT_SCROLLS) != 1950))
return SceneActor::startAction(action, event);
Scene1950 *scene = (Scene1950 *)R2_GLOBALS._sceneManager._scene;
@@ -13889,7 +13889,7 @@ void Scene1950::Exit6::changeScene() {
R2_GLOBALS._player.disableControl(CURSOR_ARROW);
R2_GLOBALS._v566A5 = 5;
if (R2_GLOBALS._v566A4 == 2) {
- if ((R2_GLOBALS.getFlag(36)) && (R2_INVENTORY.getObjectScene(34) == 2) && (R2_INVENTORY.getObjectScene(35) == 2)) {
+ if ((R2_GLOBALS.getFlag(36)) && (R2_INVENTORY.getObjectScene(R2_SAPPHIRE_BLUE) == 2) && (R2_INVENTORY.getObjectScene(R2_ANCIENT_SCROLLS) == 2)) {
scene->_sceneMode = 1961;
Common::Point pt(-20, 160);
NpcMover *mover = new NpcMover();
@@ -13897,7 +13897,7 @@ void Scene1950::Exit6::changeScene() {
} else {
if (!R2_GLOBALS.getFlag(36))
SceneItem::display(1950, 33, 0, 280, 1, 160, 9, 1, 2, 20, 7, 7, -999);
- if ((R2_INVENTORY.getObjectScene(34) == 1950) || (R2_INVENTORY.getObjectScene(35) == 1950))
+ if ((R2_INVENTORY.getObjectScene(R2_SAPPHIRE_BLUE) == 1950) || (R2_INVENTORY.getObjectScene(R2_ANCIENT_SCROLLS) == 1950))
SceneItem::display(1950, 34, 0, 280, 1, 160, 9, 1, 2, 20, 7, 7, -999);
scene->_sceneMode = 0;
Common::Point pt(30, 160);
@@ -14208,7 +14208,7 @@ void Scene1950::subBDC1E() {
switch (R2_GLOBALS._v566A4 - 1) {
case 0:
_exit7._enabled = true;
- if ((R2_INVENTORY.getObjectScene(31) == 0) && (R2_INVENTORY.getObjectScene(34) == 1950))
+ if ((R2_INVENTORY.getObjectScene(R2_SCRITH_KEY) == 0) && (R2_INVENTORY.getObjectScene(R2_SAPPHIRE_BLUE) == 1950))
_exit8._enabled = true;
R2_GLOBALS._walkRegions.enableRegion(2);
R2_GLOBALS._walkRegions.enableRegion(3);
@@ -14726,7 +14726,7 @@ void Scene1950::subBE59B() {
_field416 = 1;
}
}
- if ((R2_GLOBALS._v566A4 == 1) && (R2_INVENTORY.getObjectScene(31) != 0)) {
+ if ((R2_GLOBALS._v566A4 == 1) && (R2_INVENTORY.getObjectScene(R2_SCRITH_KEY) != 0)) {
_actor2.postInit();
_actor2.setVisage(1948);
_actor2.setStrip(3);
@@ -14762,7 +14762,7 @@ void Scene1950::subBE59B() {
_item2.setDetails(Rect(188, 124, 199, 133), 1950, 27, 28, -1, 2, NULL);
- if (R2_INVENTORY.getObjectScene(34) == 1950) {
+ if (R2_INVENTORY.getObjectScene(R2_SAPPHIRE_BLUE) == 1950) {
_actor5.postInit();
_actor5.setVisage(1970);
_actor5.setStrip(1);
@@ -14793,7 +14793,7 @@ void Scene1950::subBE59B() {
_actor3.setPosition(Common::Point(76, 94));
_actor3.fixPriority(25);
_actor3.setDetails(1950, 30, -1, -1, 2, (SceneItem *) NULL);
- if (R2_INVENTORY.getObjectScene(35) == 2)
+ if (R2_INVENTORY.getObjectScene(R2_ANCIENT_SCROLLS) == 2)
_actor3.setFrame(2);
else
_actor3.setFrame(1);
@@ -14812,7 +14812,7 @@ void Scene1950::subBE59B() {
switch (R2_GLOBALS._v566A5) {
case 0:
_sceneMode = 1950;
- if (R2_INVENTORY.getObjectScene(31) == 0) {
+ if (R2_INVENTORY.getObjectScene(R2_SCRITH_KEY) == 0) {
R2_GLOBALS._v56AAB = 0;
R2_GLOBALS._player.enableControl(CURSOR_ARROW);
} else {
@@ -15027,8 +15027,8 @@ void Scene1950::postInit(SceneObjectList *OwnerList) {
_exit8.setDest(Common::Point(268, 149));
R2_GLOBALS._player.postInit();
- if ( (R2_INVENTORY.getObjectScene(32) == 0) && (R2_INVENTORY.getObjectScene(33) == 0)
- && (R2_INVENTORY.getObjectScene(46) == 0) && (!R2_GLOBALS.getFlag(36)) )
+ if ( (R2_INVENTORY.getObjectScene(R2_TANNER_MASK) == 0) && (R2_INVENTORY.getObjectScene(R2_PURE_GRAIN_ALCOHOL) == 0)
+ && (R2_INVENTORY.getObjectScene(R2_SOAKED_FACEMASK) == 0) && (!R2_GLOBALS.getFlag(36)) )
R2_GLOBALS._player.setVisage(22);
else
R2_GLOBALS._player.setVisage(20);
@@ -15197,7 +15197,7 @@ void Scene1950::process(Event &event) {
&& (R2_GLOBALS._player._uiEnabled)
&& (R2_GLOBALS._events.getCursor() == R2_LIGHT_BULB)
&& (R2_GLOBALS._player._bounds.contains(event.mousePos))
- && (R2_INVENTORY.getObjectScene(31) == 0)) {
+ && (R2_INVENTORY.getObjectScene(R2_SCRITH_KEY) == 0)) {
event.handled = true;
R2_GLOBALS._player.disableControl();
_exit7._enabled = false;
diff --git a/engines/tsage/ringworld2/ringworld2_scenes2.cpp b/engines/tsage/ringworld2/ringworld2_scenes2.cpp
index bfed1ebeef..d754135a36 100644
--- a/engines/tsage/ringworld2/ringworld2_scenes2.cpp
+++ b/engines/tsage/ringworld2/ringworld2_scenes2.cpp
@@ -1117,7 +1117,7 @@ void Scene2350::postInit(SceneObjectList *OwnerList) {
_actor3.postInit();
_actor4.postInit();
- if (R2_INVENTORY.getObjectScene(20) == 2350) {
+ if (R2_INVENTORY.getObjectScene(R2_REBREATHER_TANK) == 2350) {
_actor3.hide();
_actor4.hide();
} else {
@@ -1535,7 +1535,7 @@ void Scene2430::postInit(SceneObjectList *OwnerList) {
_exit1.setDetails(Rect(68, 155, 147, 168), EXITCURSOR_S, 2000);
_exit1.setDest(Common::Point(108, 160));
- if (R2_INVENTORY.getObjectScene(37) == 2430) {
+ if (R2_INVENTORY.getObjectScene(R2_GUNPOWDER) == 2430) {
_actor2.postInit();
_actor2.setup(2435, 1, 5);
_actor2.setPosition(Common::Point(205, 119));
@@ -1543,7 +1543,7 @@ void Scene2430::postInit(SceneObjectList *OwnerList) {
_actor2.setDetails(2430, 51, -1, 53, 1, (SceneItem *)NULL);
}
- if (R2_INVENTORY.getObjectScene(50) == 2435) {
+ if (R2_INVENTORY.getObjectScene(R2_ALCOHOL_LAMP_3) == 2435) {
_actor3.postInit();
_actor3.setup(2435, 1, 1);
_actor3.setPosition(Common::Point(31, 65));
@@ -1821,7 +1821,7 @@ void Scene2440::postInit(SceneObjectList *OwnerList) {
// Fix exit cursor, the original was using NW
_exit1.setDetails(Rect(172, 155, 250, 167), EXITCURSOR_SE, 2000);
_exit1.setDest(Common::Point(210, 160));
- if (R2_INVENTORY.getObjectScene(49) == 2440) {
+ if (R2_INVENTORY.getObjectScene(R2_ALCOHOL_LAMP_2) == 2440) {
_actor2.postInit();
_actor2.setup(2435, 1, 1);
_actor2.setPosition(Common::Point(94, 80));
@@ -2213,7 +2213,7 @@ bool Scene2455::Actor1::startAction(CursorType action, Event &event) {
Scene2455 *scene = (Scene2455 *)R2_GLOBALS._sceneManager._scene;
if (action == R2_GLASS_DOME) {
- if ((R2_INVENTORY.getObjectScene(49) == 2455) || (R2_INVENTORY.getObjectScene(50) == 2455)) {
+ if ((R2_INVENTORY.getObjectScene(R2_ALCOHOL_LAMP_2) == 2455) || (R2_INVENTORY.getObjectScene(R2_ALCOHOL_LAMP_3) == 2455)) {
R2_GLOBALS._player.disableControl();
scene->_sceneMode = 2458;
scene->_actor2._lookLineNum = 9;
@@ -2233,7 +2233,7 @@ bool Scene2455::Actor2::startAction(CursorType action, Event &event) {
switch (action) {
case R2_ALCOHOL_LAMP_2:
- if (R2_INVENTORY.getObjectScene(50) != 2455) {
+ if (R2_INVENTORY.getObjectScene(R2_ALCOHOL_LAMP_3) != 2455) {
R2_GLOBALS._player.disableControl();
scene->_actor1.postInit();
scene->_actor1.setup(2456, 3, 3);
@@ -2245,7 +2245,7 @@ bool Scene2455::Actor2::startAction(CursorType action, Event &event) {
}
break;
case R2_ALCOHOL_LAMP_3:
- if (R2_INVENTORY.getObjectScene(49) != 2455) {
+ if (R2_INVENTORY.getObjectScene(R2_ALCOHOL_LAMP_2) != 2455) {
R2_GLOBALS._player.disableControl();
scene->_actor1.postInit();
scene->_actor1.setup(2456, 3, 3);
@@ -2298,8 +2298,8 @@ void Scene2455::postInit(SceneObjectList *OwnerList) {
R2_GLOBALS._sound1.play(200);
_exit1.setDetails(Rect(0, 0, 320, 15), EXITCURSOR_N, 2425);
- if (R2_INVENTORY.getObjectScene(29) == 2455) {
- if ((R2_INVENTORY.getObjectScene(50) == 2455) || (R2_INVENTORY.getObjectScene(49) == 2455)) {
+ if (R2_INVENTORY.getObjectScene(R2_GLASS_DOME) == 2455) {
+ if ((R2_INVENTORY.getObjectScene(R2_ALCOHOL_LAMP_3) == 2455) || (R2_INVENTORY.getObjectScene(R2_ALCOHOL_LAMP_2) == 2455)) {
_actor1.postInit();
_actor1.setup(2456, 3, 3);
_actor1.setPosition(Common::Point(162, 165));
@@ -2313,11 +2313,11 @@ void Scene2455::postInit(SceneObjectList *OwnerList) {
}
_actor2.postInit();
- if (R2_INVENTORY.getObjectScene(29) == 2455) {
+ if (R2_INVENTORY.getObjectScene(R2_GLASS_DOME) == 2455) {
_actor2.setup(2456, 3, 2);
_actor2.setDetails(2455, 9, 1, -1, 1, (SceneItem *)NULL);
} else {
- if ((R2_INVENTORY.getObjectScene(50) != 2455) && (R2_INVENTORY.getObjectScene(49) != 2455))
+ if ((R2_INVENTORY.getObjectScene(R2_ALCOHOL_LAMP_3) != 2455) && (R2_INVENTORY.getObjectScene(R2_ALCOHOL_LAMP_2) != 2455))
_actor2.setup(2455, 1, 1);
else
_actor2.setup(2456, 1, 1);
@@ -2325,7 +2325,7 @@ void Scene2455::postInit(SceneObjectList *OwnerList) {
}
_actor2.setPosition(Common::Point(162, 165));
_actor2.fixPriority(20);
- if (R2_INVENTORY.getObjectScene(29) != 2455)
+ if (R2_INVENTORY.getObjectScene(R2_GLASS_DOME) != 2455)
_actor2.animate(ANIM_MODE_2, NULL);
R2_GLOBALS._player.postInit();
@@ -2543,7 +2543,7 @@ void Scene2525::postInit(SceneObjectList *OwnerList) {
_exit1.setDetails(Rect(86, 155, 228, 168), EXITCURSOR_S, 2000);
- if (R2_INVENTORY.getObjectScene(29) == 2525) {
+ if (R2_INVENTORY.getObjectScene(R2_GLASS_DOME) == 2525) {
_actor3.postInit();
_actor3.setup(2435, 1, 2);
_actor3.setPosition(Common::Point(78, 155));
@@ -2699,7 +2699,7 @@ void Scene2530::postInit(SceneObjectList *OwnerList) {
_exit1.setDetails(Rect(68, 155, 147, 168), EXITCURSOR_S, 2000);
_exit1.setDest(Common::Point(108, 160));
- if (R2_INVENTORY.getObjectScene(33) == 2530) {
+ if (R2_INVENTORY.getObjectScene(R2_PURE_GRAIN_ALCOHOL) == 2530) {
_actor2.postInit();
_actor2.setup(2435, 1, 3);
_actor2.setPosition(Common::Point(299, 80));
@@ -2799,7 +2799,7 @@ bool Scene2535::Actor3::startAction(CursorType action, Event &event) {
if (R2_GLOBALS._player._characterIndex == 1) {
R2_GLOBALS._player.disableControl();
- if (R2_INVENTORY.getObjectScene(20) == 2535) {
+ if (R2_INVENTORY.getObjectScene(R2_REBREATHER_TANK) == 2535) {
scene->_sceneMode = 2536;
scene->setAction(&scene->_sequenceManager, scene, 2536, &R2_GLOBALS._player, &scene->_actor3, NULL);
} else {
@@ -2852,7 +2852,7 @@ void Scene2535::postInit(SceneObjectList *OwnerList) {
_exit1.setDetails(Rect(172, 155, 250, 167), EXITCURSOR_S, 2000);
_exit1.setDest(Common::Point(210, 160));
- if (R2_INVENTORY.getObjectScene(32) == 2535) {
+ if (R2_INVENTORY.getObjectScene(R2_TANNER_MASK) == 2535) {
_actor4.postInit();
_actor4.setup(2435, 1, 4);
_actor4.setPosition(Common::Point(47, 74));
@@ -2860,7 +2860,7 @@ void Scene2535::postInit(SceneObjectList *OwnerList) {
_actor4.setDetails(2535, 21, -1, -1, 1, (SceneItem *)NULL);
}
- if (R2_INVENTORY.getObjectScene(20) == 2535) {
+ if (R2_INVENTORY.getObjectScene(R2_REBREATHER_TANK) == 2535) {
_actor3.postInit();
_actor3.setup(2535, 3, 1);
_actor3.setPosition(Common::Point(203, 131));
@@ -2868,7 +2868,7 @@ void Scene2535::postInit(SceneObjectList *OwnerList) {
R2_GLOBALS._walkRegions.enableRegion(6);
}
- if ((R2_INVENTORY.getObjectScene(20) == 0) && (R2_GLOBALS.getFlag(73))) {
+ if ((R2_INVENTORY.getObjectScene(R2_REBREATHER_TANK) == 0) && (R2_GLOBALS.getFlag(73))) {
_actor3.postInit();
_actor3.setup(2536, 1, 2);
_actor3.setPosition(Common::Point(164, 133));
@@ -3212,7 +3212,7 @@ void Scene2700::postInit(SceneObjectList *OwnerList) {
R2_GLOBALS._player._moveDiff = Common::Point(2, 2);
R2_GLOBALS._player.disableControl();
- if (R2_INVENTORY.getObjectScene(36) == 0)
+ if (R2_INVENTORY.getObjectScene(R2_FLUTE) == 0)
R2_GLOBALS._sound1.changeSound(234);
if (R2_GLOBALS._sceneManager._previousScene == 2750) {
@@ -3855,7 +3855,7 @@ void Scene2750::postInit(SceneObjectList *OwnerList) {
_rect2.set(130, 142, 210, 167);
_rect3.set(-1, 137, 290, 147);
- if (R2_INVENTORY.getObjectScene(36) == 0) {
+ if (R2_INVENTORY.getObjectScene(R2_FLUTE) == 0) {
R2_GLOBALS._sound1.changeSound(235);
_actor2.postInit();
_actor2.setup(2751, 1, 1);
@@ -3930,7 +3930,7 @@ void Scene2750::postInit(SceneObjectList *OwnerList) {
_stripManager.addSpeaker(&_quinnSpeaker);
_stripManager.addSpeaker(&_nejSpeaker);
- if (R2_INVENTORY.getObjectScene(36) == 0) {
+ if (R2_INVENTORY.getObjectScene(R2_FLUTE) == 0) {
_actor1.postInit();
_actor1.setup(2752, 5, 1);
_actor1.animate(ANIM_MODE_NONE, NULL);
@@ -3944,7 +3944,7 @@ void Scene2750::postInit(SceneObjectList *OwnerList) {
R2_GLOBALS._player.disableControl();
if (R2_GLOBALS._sceneManager._previousScene == 2700) {
- if (R2_INVENTORY.getObjectScene(36) == 0) {
+ if (R2_INVENTORY.getObjectScene(R2_FLUTE) == 0) {
R2_GLOBALS._player.setVisage(2752);
R2_GLOBALS._player.setStrip(6);
R2_GLOBALS._player.animate(ANIM_MODE_NONE, NULL);
@@ -4449,7 +4449,7 @@ void Scene2800::postInit(SceneObjectList *OwnerList) {
_stripManager.addSpeaker(&_nejSpeaker);
_stripManager.addSpeaker(&_guardSpeaker);
- if (R2_INVENTORY.getObjectScene(36) == 0) {
+ if (R2_INVENTORY.getObjectScene(R2_FLUTE) == 0) {
R2_GLOBALS._sound1.fadeSound(237);
if (R2_GLOBALS.getFlag(47)) {
_item2.setDetails(Rect(76, 45, 155, 90), 2800, 3, -1, -1, 2, NULL);
@@ -4470,7 +4470,7 @@ void Scene2800::postInit(SceneObjectList *OwnerList) {
R2_GLOBALS._player._moveDiff = Common::Point(2, 2);
R2_GLOBALS._player.disableControl();
- if (R2_INVENTORY.getObjectScene(36) == 0) {
+ if (R2_INVENTORY.getObjectScene(R2_FLUTE) == 0) {
R2_GLOBALS._player.setAction(&_sequenceManager, this, 2800, &R2_GLOBALS._player, NULL);
} else if (R2_GLOBALS.getFlag(47)) {
R2_GLOBALS._player.setVisage(3110);
diff --git a/engines/tsage/ringworld2/ringworld2_scenes3.cpp b/engines/tsage/ringworld2/ringworld2_scenes3.cpp
index 6af2a0cad4..b877439b44 100644
--- a/engines/tsage/ringworld2/ringworld2_scenes3.cpp
+++ b/engines/tsage/ringworld2/ringworld2_scenes3.cpp
@@ -378,7 +378,7 @@ bool Scene3150::Item5::startAction(CursorType action, Event &event) {
switch (action) {
case CURSOR_USE:
- if (R2_INVENTORY.getObjectScene(47) != 3150)
+ if (R2_INVENTORY.getObjectScene(R2_LIGHT_BULB) != 3150)
return SceneHotspot::startAction(action, event);
R2_GLOBALS._player.disableControl();
@@ -386,7 +386,7 @@ bool Scene3150::Item5::startAction(CursorType action, Event &event) {
scene->setAction(&scene->_sequenceManager, scene, 3154, &R2_GLOBALS._player, &scene->_actor3, NULL);
return true;
case R2_SUPERCONDUCTOR_WIRE:
- if ((R2_INVENTORY.getObjectScene(47) != 3150) && (R2_GLOBALS.getFlag(75))) {
+ if ((R2_INVENTORY.getObjectScene(R2_LIGHT_BULB) != 3150) && (R2_GLOBALS.getFlag(75))) {
R2_GLOBALS._player.disableControl();
scene->_actor3.postInit();
scene->_actor3._effect = 3;
@@ -417,7 +417,7 @@ bool Scene3150::Item6::startAction(CursorType action, Event &event) {
scene->setAction(&scene->_sequenceManager, scene, 3158, &R2_GLOBALS._player, &scene->_actor4, NULL);
return true;
case R2_FOOD_TRAY:
- if ((R2_INVENTORY.getObjectScene(47) != 3150) && (R2_INVENTORY.getObjectScene(40) == 3150) && (R2_GLOBALS.getFlag(75))) {
+ if ((R2_INVENTORY.getObjectScene(R2_LIGHT_BULB) != 3150) && (R2_INVENTORY.getObjectScene(R2_SUPERCONDUCTOR_WIRE) == 3150) && (R2_GLOBALS.getFlag(75))) {
scene->_actor5.postInit();
scene->_actor5._effect = 6;
scene->_actor5._shade = 3;
@@ -583,7 +583,7 @@ void Scene3150::postInit(SceneObjectList *OwnerList) {
_actor7.fixPriority(50);
_actor7.setDetails(3150, 17, -1, 19, 1, (SceneItem *)NULL);
- if (R2_INVENTORY.getObjectScene(41) == 3150) {
+ if (R2_INVENTORY.getObjectScene(R2_PILLOW) == 3150) {
_actor4.postInit();
if (R2_GLOBALS.getFlag(75)) {
if (R2_GLOBALS.getFlag(76)) {
@@ -608,13 +608,13 @@ void Scene3150::postInit(SceneObjectList *OwnerList) {
}
}
- if (R2_INVENTORY.getObjectScene(47) == 3150) {
+ if (R2_INVENTORY.getObjectScene(R2_LIGHT_BULB) == 3150) {
_actor3.postInit();
_actor3.setup(3152, 7, 1);
_actor3.setPosition(Common::Point(73, 83));
}
- if (R2_INVENTORY.getObjectScene(40) == 3150) {
+ if (R2_INVENTORY.getObjectScene(R2_SUPERCONDUCTOR_WIRE) == 3150) {
_actor3.postInit();
_actor3.setup(3152, 7, 3);
_actor3.setPosition(Common::Point(70, 55));
@@ -623,7 +623,7 @@ void Scene3150::postInit(SceneObjectList *OwnerList) {
_actor3._shade = 5;
}
- if (R2_INVENTORY.getObjectScene(42) == 3150) {
+ if (R2_INVENTORY.getObjectScene(R2_FOOD_TRAY) == 3150) {
_actor5.postInit();
if (R2_GLOBALS.getFlag(77)) {
_actor5.setup(3152, 7, 8);
@@ -675,7 +675,7 @@ void Scene3150::postInit(SceneObjectList *OwnerList) {
break;
}
default:
- if ((R2_GLOBALS._v56AA0 == 1) && (R2_INVENTORY.getObjectScene(35) == 2000) && (R2_GLOBALS._player._oldCharacterScene[1] == 3100)) {
+ if ((R2_GLOBALS._v56AA0 == 1) && (R2_INVENTORY.getObjectScene(R2_ANCIENT_SCROLLS) == 2000) && (R2_GLOBALS._player._oldCharacterScene[1] == 3100)) {
++R2_GLOBALS._v56AA0;
_sceneMode = 3156;
_actor1.postInit();
@@ -1407,7 +1407,7 @@ void Scene3260::postInit(SceneObjectList *OwnerList) {
_actor13.setPosition(Common::Point(40, 106));
_actor13.setDetails(3260, 18, 1, -1, 1, (SceneItem *)NULL);
- if (R2_INVENTORY.getObjectScene(52) == 3260) {
+ if (R2_INVENTORY.getObjectScene(R2_TOOLBOX) == 3260) {
_actor14.postInit();
_actor14.setup(3260, 7, 1);
_actor14.setPosition(Common::Point(202, 66));