aboutsummaryrefslogtreecommitdiff
path: root/engines/tsage
diff options
context:
space:
mode:
authorStrangerke2013-08-22 23:10:35 +0200
committerStrangerke2013-08-22 23:10:35 +0200
commit2774b79e94f9b642498f6d082786d6b8bb7a73cb (patch)
tree06411cc1316777c7222299a0610c568e1f441ccb /engines/tsage
parent00109d28d599ab795e36a262214ff99dd836eaee (diff)
downloadscummvm-rg350-2774b79e94f9b642498f6d082786d6b8bb7a73cb.tar.gz
scummvm-rg350-2774b79e94f9b642498f6d082786d6b8bb7a73cb.tar.bz2
scummvm-rg350-2774b79e94f9b642498f6d082786d6b8bb7a73cb.zip
TSAGE: R2R - Replace more magic values by constants
Diffstat (limited to 'engines/tsage')
-rw-r--r--engines/tsage/ringworld2/ringworld2_scenes0.cpp8
-rw-r--r--engines/tsage/ringworld2/ringworld2_scenes1.cpp34
-rw-r--r--engines/tsage/ringworld2/ringworld2_scenes2.cpp32
-rw-r--r--engines/tsage/ringworld2/ringworld2_scenes3.cpp24
4 files changed, 49 insertions, 49 deletions
diff --git a/engines/tsage/ringworld2/ringworld2_scenes0.cpp b/engines/tsage/ringworld2/ringworld2_scenes0.cpp
index 49152a5f30..3e55275d77 100644
--- a/engines/tsage/ringworld2/ringworld2_scenes0.cpp
+++ b/engines/tsage/ringworld2/ringworld2_scenes0.cpp
@@ -5910,11 +5910,11 @@ void Scene600::signal() {
_actor4.signal();
break;
case 606:
- R2_INVENTORY.setObjectScene(15, 600);
+ R2_INVENTORY.setObjectScene(R2_CLAMP, 600);
R2_GLOBALS._player.enableControl();
break;
case 607:
- R2_INVENTORY.setObjectScene(9, 600);
+ R2_INVENTORY.setObjectScene(R2_COM_SCANNER, 600);
R2_GLOBALS._player.enableControl();
break;
case 608:
@@ -5936,12 +5936,12 @@ void Scene600::signal() {
case 614:
R2_GLOBALS._player.enableControl();
_aerosol.remove();
- R2_INVENTORY.setObjectScene(12, 1);
+ R2_INVENTORY.setObjectScene(R2_AEROSOL, 1);
R2_GLOBALS._walkRegions.disableRegion(7);
break;
case 615:
_actor8.remove();
- R2_INVENTORY.setObjectScene(9, 1);
+ R2_INVENTORY.setObjectScene(R2_COM_SCANNER, 1);
R2_GLOBALS._player.enableControl();
break;
default:
diff --git a/engines/tsage/ringworld2/ringworld2_scenes1.cpp b/engines/tsage/ringworld2/ringworld2_scenes1.cpp
index 4186fc3dd1..8d65c11a9f 100644
--- a/engines/tsage/ringworld2/ringworld2_scenes1.cpp
+++ b/engines/tsage/ringworld2/ringworld2_scenes1.cpp
@@ -7944,22 +7944,22 @@ void Scene1550::signal() {
warning("TODO: unknown use of arrUnkObj15501[0]._fieldA6");
switch (_arrUnkObj15501[0]._frame - 1) {
case 0:
- R2_INVENTORY.setObjectScene(26, R2_GLOBALS._player._characterIndex);
+ R2_INVENTORY.setObjectScene(R2_JOYSTICK, R2_GLOBALS._player._characterIndex);
break;
case 1:
- R2_INVENTORY.setObjectScene(17, R2_GLOBALS._player._characterIndex);
+ R2_INVENTORY.setObjectScene(R2_FUEL_CELL, R2_GLOBALS._player._characterIndex);
break;
case 2:
- R2_INVENTORY.setObjectScene(22, R2_GLOBALS._player._characterIndex);
+ R2_INVENTORY.setObjectScene(R2_GUIDANCE_MODULE, R2_GLOBALS._player._characterIndex);
break;
case 3:
- R2_INVENTORY.setObjectScene(25, R2_GLOBALS._player._characterIndex);
+ R2_INVENTORY.setObjectScene(R2_RADAR_MECHANISM, R2_GLOBALS._player._characterIndex);
break;
case 4:
- R2_INVENTORY.setObjectScene(45, R2_GLOBALS._player._characterIndex);
+ R2_INVENTORY.setObjectScene(R2_BATTERY, R2_GLOBALS._player._characterIndex);
break;
case 5:
- R2_INVENTORY.setObjectScene(28, R2_GLOBALS._player._characterIndex);
+ R2_INVENTORY.setObjectScene(R2_DIAGNOSTICS_DISPLAY, R2_GLOBALS._player._characterIndex);
break;
default:
break;
@@ -9643,7 +9643,7 @@ bool Scene1580::Hotspot1::startAction(CursorType action, Event &event) {
Scene1580 *scene = (Scene1580 *)R2_GLOBALS._sceneManager._scene;
if (action == R2_JOYSTICK) {
- R2_INVENTORY.setObjectScene(26, 1580);
+ R2_INVENTORY.setObjectScene(R2_JOYSTICK, 1580);
R2_GLOBALS._sceneItems.remove(&scene->_item1);
scene->_actor2.postInit();
scene->_actor2.setup(1580, 1, 4);
@@ -9662,7 +9662,7 @@ bool Scene1580::Hotspot2::startAction(CursorType action, Event &event) {
Scene1580 *scene = (Scene1580 *)R2_GLOBALS._sceneManager._scene;
if (action == R2_DIAGNOSTICS_DISPLAY) {
- R2_INVENTORY.setObjectScene(28, 1580);
+ R2_INVENTORY.setObjectScene(R2_DIAGNOSTICS_DISPLAY, 1580);
R2_GLOBALS._player.disableControl();
R2_GLOBALS._sceneItems.remove(&scene->_item2);
@@ -9714,7 +9714,7 @@ bool Scene1580::Actor3::startAction(CursorType action, Event &event) {
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);
+ R2_INVENTORY.setObjectScene(R2_BROKEN_DISPLAY, R2_GLOBALS._player._characterIndex);
scene->_item2.setDetails(Rect(69, 29, 177, 108), 1550, 82, -1, -1, 2, NULL);
scene->_actor1.remove();
remove();
@@ -9758,7 +9758,7 @@ bool Scene1580::Actor6::startAction(CursorType action, Event &event) {
switch (action) {
case CURSOR_USE:
if (R2_GLOBALS._player._characterIndex == 1) {
- R2_INVENTORY.setObjectScene(23, 1);
+ R2_INVENTORY.setObjectScene(R2_THRUSTER_VALVE, 1);
remove();
return true;
}
@@ -9790,7 +9790,7 @@ bool Scene1580::Actor7::startAction(CursorType action, Event &event) {
switch (action) {
case CURSOR_USE:
if (R2_GLOBALS._player._characterIndex == 1) {
- R2_INVENTORY.setObjectScene(27, 1);
+ R2_INVENTORY.setObjectScene(R2_IGNITOR, 1);
remove();
return true;
}
@@ -10204,7 +10204,7 @@ void Scene1625::signal() {
_actor6.postInit();
warning("_actor6._actorName = \"arm\";");
- R2_INVENTORY.setObjectScene(40, 3);
+ R2_INVENTORY.setObjectScene(R2_SUPERCONDUCTOR_WIRE, 3);
_sceneMode = 14;
setAction(&_sequenceManager, this, 1625, &_actor1, &_actor6, NULL);
@@ -12762,7 +12762,7 @@ void Scene1900::signal() {
R2_GLOBALS._sceneManager.changeScene(1925);
break;
case 1910:
- R2_INVENTORY.setObjectScene(22, 2535);
+ R2_INVENTORY.setObjectScene(R2_GUIDANCE_MODULE, 2535);
R2_GLOBALS._player.disableControl(CURSOR_ARROW);
R2_GLOBALS._player._oldCharacterScene[1] = 1900;
R2_GLOBALS._player._oldCharacterScene[2] = 1900;
@@ -13613,7 +13613,7 @@ bool Scene1950::Actor2::startAction(CursorType action, Event &event) {
Scene1950 *scene = (Scene1950 *)R2_GLOBALS._sceneManager._scene;
R2_GLOBALS._player.disableControl();
- R2_INVENTORY.setObjectScene(31, 0);
+ R2_INVENTORY.setObjectScene(R2_SCRITH_KEY, 0);
scene->_sceneMode = 1958;
scene->setAction(&scene->_sequenceManager, scene, 1958, &R2_GLOBALS._player, &scene->_actor2, NULL);
return true;
@@ -15131,7 +15131,7 @@ void Scene1950::signal() {
_exit8._enabled = true;
break;
case 1959:
- R2_INVENTORY.setObjectScene(46, 0);
+ R2_INVENTORY.setObjectScene(R2_SOAKED_FACEMASK, 0);
R2_GLOBALS._v56AAB = 0;
R2_GLOBALS._player.enableControl(CURSOR_ARROW);
_exit8._enabled = true;
@@ -15162,7 +15162,7 @@ void Scene1950::signal() {
_actor5.setDetails(1950, 9, -1, -1, 2, (SceneItem *) NULL);
case 1967: {
_sceneMode = 0;
- R2_INVENTORY.setObjectScene(34, 2);
+ R2_INVENTORY.setObjectScene(R2_SAPPHIRE_BLUE, 2);
_actor5.remove();
if (R2_GLOBALS.getFlag(36))
R2_GLOBALS._player.setVisage(20);
@@ -15177,7 +15177,7 @@ void Scene1950::signal() {
break;
case 1968:
R2_GLOBALS._player.disableControl();
- R2_INVENTORY.setObjectScene(35, 2);
+ R2_INVENTORY.setObjectScene(R2_ANCIENT_SCROLLS, 2);
_actor3.setFrame(2);
if (R2_GLOBALS.getFlag(36))
R2_GLOBALS._player.setVisage(20);
diff --git a/engines/tsage/ringworld2/ringworld2_scenes2.cpp b/engines/tsage/ringworld2/ringworld2_scenes2.cpp
index d754135a36..432f284890 100644
--- a/engines/tsage/ringworld2/ringworld2_scenes2.cpp
+++ b/engines/tsage/ringworld2/ringworld2_scenes2.cpp
@@ -1177,12 +1177,12 @@ void Scene2350::signal() {
break;
case 21:
R2_GLOBALS._player.disableControl();
- R2_INVENTORY.setObjectScene(36, 1);
+ R2_INVENTORY.setObjectScene(R2_FLUTE, 1);
_sceneMode = 2354;
setAction(&_sequenceManager, this, 2354, &R2_GLOBALS._player, NULL);
break;
case 2354:
- R2_INVENTORY.setObjectScene(20, 2350);
+ R2_INVENTORY.setObjectScene(R2_REBREATHER_TANK, 2350);
g_globals->_sceneManager.changeScene(2900);
break;
case 2355:
@@ -1886,7 +1886,7 @@ void Scene2440::signal() {
break;
case 2440:
_actor2.remove();
- R2_INVENTORY.setObjectScene(49, 2);
+ R2_INVENTORY.setObjectScene(R2_ALCOHOL_LAMP_2, 2);
// No break on purpose
default:
R2_GLOBALS._player.enableControl();
@@ -2291,8 +2291,8 @@ void Scene2455::postInit(SceneObjectList *OwnerList) {
SceneExt::postInit();
if (R2_GLOBALS._sceneManager._previousScene == -1) {
- R2_INVENTORY.setObjectScene(29, 2);
- R2_INVENTORY.setObjectScene(50, 2);
+ R2_INVENTORY.setObjectScene(R2_GLASS_DOME, 2);
+ R2_INVENTORY.setObjectScene(R2_ALCOHOL_LAMP_3, 2);
}
R2_GLOBALS._sound1.play(200);
@@ -2357,23 +2357,23 @@ void Scene2455::signal() {
g_globals->_sceneManager.changeScene(2425);
break;
case 11:
- R2_INVENTORY.setObjectScene(49, 2455);
+ R2_INVENTORY.setObjectScene(R2_ALCOHOL_LAMP_2, 2455);
R2_GLOBALS._player.enableControl(CURSOR_USE);
R2_GLOBALS._player._canWalk = false;
break;
case 12:
- R2_INVENTORY.setObjectScene(50, 2455);
+ R2_INVENTORY.setObjectScene(R2_ALCOHOL_LAMP_3, 2455);
R2_GLOBALS._player.enableControl(CURSOR_USE);
R2_GLOBALS._player._canWalk = false;
break;
case 2458:
- R2_INVENTORY.setObjectScene(29, 2455);
+ R2_INVENTORY.setObjectScene(R2_GLASS_DOME, 2455);
R2_GLOBALS._player.enableControl(CURSOR_USE);
R2_GLOBALS._player._canWalk = false;
break;
case 2459:
_actor3.remove();
- R2_INVENTORY.setObjectScene(31, 2);
+ R2_INVENTORY.setObjectScene(R2_SCRITH_KEY, 2);
R2_GLOBALS._player.enableControl(CURSOR_USE);
R2_GLOBALS._player._canWalk = false;
break;
@@ -2616,7 +2616,7 @@ void Scene2525::signal() {
break;
case 2525:
_actor3.remove();
- R2_INVENTORY.setObjectScene(29, 2);
+ R2_INVENTORY.setObjectScene(R2_GLASS_DOME, 2);
R2_GLOBALS._player.enableControl();
break;
case 2526:
@@ -2767,7 +2767,7 @@ void Scene2530::signal() {
g_globals->_sceneManager.changeScene(2000);
break;
case 2530:
- R2_INVENTORY.setObjectScene(33, 2);
+ R2_INVENTORY.setObjectScene(R2_PURE_GRAIN_ALCOHOL, 2);
_actor2.remove();
break;
case 2531:
@@ -2847,7 +2847,7 @@ void Scene2535::postInit(SceneObjectList *OwnerList) {
SceneExt::postInit();
if (R2_GLOBALS._sceneManager._previousScene == -1) {
R2_GLOBALS.setFlag(73);
- R2_INVENTORY.setObjectScene(20, 2535);
+ R2_INVENTORY.setObjectScene(R2_REBREATHER_TANK, 2535);
}
_exit1.setDetails(Rect(172, 155, 250, 167), EXITCURSOR_S, 2000);
_exit1.setDest(Common::Point(210, 160));
@@ -2934,12 +2934,12 @@ void Scene2535::signal() {
g_globals->_sceneManager.changeScene(2000);
break;
case 2535:
- R2_INVENTORY.setObjectScene(32, 2);
+ R2_INVENTORY.setObjectScene(R2_TANNER_MASK, 2);
_actor4.remove();
R2_GLOBALS._player.enableControl();
break;
case 2536:
- R2_INVENTORY.setObjectScene(20, 0);
+ R2_INVENTORY.setObjectScene(R2_REBREATHER_TANK, 0);
R2_GLOBALS._walkRegions.disableRegion(6);
if (!R2_GLOBALS.getFlag(73)) {
_actor3.remove();
@@ -2959,7 +2959,7 @@ void Scene2535::signal() {
break;
case 2537:
_actor3.remove();
- R2_INVENTORY.setObjectScene(20, 1);
+ R2_INVENTORY.setObjectScene(R2_REBREATHER_TANK, 1);
R2_GLOBALS._player.enableControl();
break;
case 20:
@@ -3453,7 +3453,7 @@ void Scene2700::signal() {
}
break;
case 11:
- R2_INVENTORY.setObjectScene(36, 0);
+ R2_INVENTORY.setObjectScene(R2_FLUTE, 0);
R2_GLOBALS._player.disableControl();
_field412 = 0;
_sceneMode = 2700;
diff --git a/engines/tsage/ringworld2/ringworld2_scenes3.cpp b/engines/tsage/ringworld2/ringworld2_scenes3.cpp
index b877439b44..b2958a3d5e 100644
--- a/engines/tsage/ringworld2/ringworld2_scenes3.cpp
+++ b/engines/tsage/ringworld2/ringworld2_scenes3.cpp
@@ -535,7 +535,7 @@ void Scene3150::Exit2::changeScene() {
void Scene3150::postInit(SceneObjectList *OwnerList) {
loadScene(3150);
if (R2_GLOBALS._sceneManager._previousScene == -1) {
- R2_INVENTORY.setObjectScene(35, 2000);
+ R2_INVENTORY.setObjectScene(R2_ANCIENT_SCROLLS, 2000);
R2_GLOBALS._player._oldCharacterScene[1] = 3100;
R2_GLOBALS._player._oldCharacterScene[3] = 0;
R2_GLOBALS._player._characterIndex = R2_MIRANDA;
@@ -713,7 +713,7 @@ void Scene3150::signal() {
break;
case 3151:
_actor1.remove();
- R2_INVENTORY.setObjectScene(41, 3);
+ R2_INVENTORY.setObjectScene(R2_PILLOW, 3);
R2_GLOBALS._player.enableControl();
break;
case 3153:
@@ -726,37 +726,37 @@ void Scene3150::signal() {
break;
case 3154:
_actor3.remove();
- R2_INVENTORY.setObjectScene(47, 3);
+ R2_INVENTORY.setObjectScene(R2_LIGHT_BULB, 3);
R2_GLOBALS._player.enableControl();
break;
case 3155:
- R2_INVENTORY.setObjectScene(40, 3150);
+ R2_INVENTORY.setObjectScene(R2_SUPERCONDUCTOR_WIRE, 3150);
R2_GLOBALS._player.enableControl();
break;
case 3156:
_actor5.setDetails(3150, 30, -1, -1, 2, (SceneItem *)NULL);
- R2_INVENTORY.setObjectScene(42, 3150);
+ R2_INVENTORY.setObjectScene(R2_FOOD_TRAY, 3150);
R2_GLOBALS._player.enableControl();
break;
case 3157:
_actor5.remove();
- R2_INVENTORY.setObjectScene(42, 3);
+ R2_INVENTORY.setObjectScene(R2_FOOD_TRAY, 3);
R2_GLOBALS._player.enableControl();
break;
case 3158:
R2_GLOBALS.setFlag(75);
- R2_INVENTORY.setObjectScene(41, 3150);
+ R2_INVENTORY.setObjectScene(R2_PILLOW, 3150);
_actor4.fixPriority(110);
_actor4.setDetails(3150, 13, -1, -1, 2, (SceneItem *)NULL);
R2_GLOBALS._player.enableControl();
break;
case 3159:
R2_GLOBALS.setFlag(77);
- R2_INVENTORY.setObjectScene(42, 3150);
+ R2_INVENTORY.setObjectScene(R2_FOOD_TRAY, 3150);
R2_GLOBALS._player.enableControl();
break;
case 3160:
- R2_INVENTORY.setObjectScene(52, 3150);
+ R2_INVENTORY.setObjectScene(R2_TOOLBOX, 3150);
R2_GLOBALS.setFlag(80);
R2_GLOBALS._sceneManager.changeScene(1200);
break;
@@ -1524,8 +1524,8 @@ void Scene3260::signal() {
R2_GLOBALS._events.setCursor(CURSOR_CROSSHAIRS);
SceneItem::display(3260, 15, 0, 280, 1, 160, 9, 1, 2, 20, 7, 154, -999);
R2_GLOBALS._player.disableControl();
- R2_INVENTORY.setObjectScene(52, 3);
- R2_INVENTORY.setObjectScene(43, 3);
+ R2_INVENTORY.setObjectScene(R2_TOOLBOX, 3);
+ R2_INVENTORY.setObjectScene(R2_LASER_HACKSAW, 3);
setAction(&_sequenceManager, this, 3273, &R2_GLOBALS._player, &_actor14, NULL);
break;
case 3273:
@@ -2771,7 +2771,7 @@ void Scene3400::signal() {
_actor2.setStrip(6);
_actor3.setStrip(3);
_actor4.setStrip(1);
- R2_INVENTORY.setObjectScene(34, 0);
+ R2_INVENTORY.setObjectScene(R2_SAPPHIRE_BLUE, 0);
_stripManager.start(3307, this);
if (R2_GLOBALS._player._characterIndex == 2) {
_sceneMode = 3400;