diff options
-rw-r--r-- | engines/tsage/globals.cpp | 34 | ||||
-rw-r--r-- | engines/tsage/globals.h | 2 | ||||
-rw-r--r-- | engines/tsage/ringworld2/ringworld2_dialogs.cpp | 4 | ||||
-rw-r--r-- | engines/tsage/ringworld2/ringworld2_scenes0.cpp | 22 | ||||
-rw-r--r-- | engines/tsage/ringworld2/ringworld2_scenes1.cpp | 76 | ||||
-rw-r--r-- | engines/tsage/ringworld2/ringworld2_scenes2.cpp | 370 | ||||
-rw-r--r-- | engines/tsage/ringworld2/ringworld2_scenes2.h | 20 | ||||
-rw-r--r-- | engines/tsage/ringworld2/ringworld2_scenes3.cpp | 36 |
8 files changed, 284 insertions, 280 deletions
diff --git a/engines/tsage/globals.cpp b/engines/tsage/globals.cpp index d47634fed1..3ca54d67a9 100644 --- a/engines/tsage/globals.cpp +++ b/engines/tsage/globals.cpp @@ -412,20 +412,20 @@ void Ringworld2Globals::reset() { _rimLocation = 0; _rimTransportLocation = 0; _v565AE = 0; - _v56605[0] = 0; - _v56605[1] = 3; - _v56605[2] = 5; - _v56605[3] = 1; - _v56605[4] = 2; - _v56605[5] = 5; - _v56605[6] = 9; - _v56605[7] = 14; - _v56605[8] = 15; - _v56605[9] = 18; - _v56605[10] = 20; - _v56605[11] = 25; - _v56605[12] = 27; - _v56605[13] = 31; + _spillLocation[0] = 0; + _spillLocation[1] = 3; + _spillLocation[R2_SEEKER] = 5; + _spillLocation[3] = 1; + _spillLocation[4] = 2; + _spillLocation[5] = 5; + _spillLocation[6] = 9; + _spillLocation[7] = 14; + _spillLocation[8] = 15; + _spillLocation[9] = 18; + _spillLocation[10] = 20; + _spillLocation[11] = 25; + _spillLocation[12] = 27; + _spillLocation[13] = 31; for (int i = 0; i < 18; i++) { _v56613[(i * 4) ] = 1; @@ -502,8 +502,8 @@ void Ringworld2Globals::reset() { // Reset fields stored in the player class _player._characterIndex = R2_QUINN; - _player._characterScene[1] = 100; - _player._characterScene[2] = 300; + _player._characterScene[R2_QUINN] = 100; + _player._characterScene[R2_SEEKER] = 300; _player._characterScene[3] = 300; } @@ -565,7 +565,7 @@ void Ringworld2Globals::synchronize(Serializer &s) { s.syncAsByte(_v56AA8); for (i = 0; i < 14; ++i) - s.syncAsByte(_v56605[i]); + s.syncAsByte(_spillLocation[i]); for (i = 0; i < 1000; ++i) s.syncAsByte(_v566AB[i]); s.syncAsByte(_v56A99); diff --git a/engines/tsage/globals.h b/engines/tsage/globals.h index 4512b34eb5..9d4de26b91 100644 --- a/engines/tsage/globals.h +++ b/engines/tsage/globals.h @@ -269,7 +269,7 @@ public: int _rimTransportLocation; int _v5657C; byte _v565AE; - byte _v56605[14]; + byte _spillLocation[14]; int _v56613[76]; byte _v566A4; byte _v566A5; diff --git a/engines/tsage/ringworld2/ringworld2_dialogs.cpp b/engines/tsage/ringworld2/ringworld2_dialogs.cpp index e2afa574de..663697d94d 100644 --- a/engines/tsage/ringworld2/ringworld2_dialogs.cpp +++ b/engines/tsage/ringworld2/ringworld2_dialogs.cpp @@ -272,7 +272,7 @@ void CharacterDialog::show() { default: break; } - } else if ((R2_GLOBALS._player._characterScene[1] == 300) && (R2_GLOBALS._scannerFrequencies[1] != 1)) { + } else if ((R2_GLOBALS._player._characterScene[R2_QUINN] == 300) && (R2_GLOBALS._scannerFrequencies[1] != 1)) { switch (R2_GLOBALS._scannerFrequencies[1] - 1) { case 2: R2_GLOBALS._sound4.play(45); @@ -289,7 +289,7 @@ void CharacterDialog::show() { default: break; } - } else if (R2_GLOBALS._player._characterScene[2] != 300) { + } else if (R2_GLOBALS._player._characterScene[R2_SEEKER] != 300) { R2_GLOBALS._sound4.stop(); } else if (R2_GLOBALS._scannerFrequencies[2] == 1) { R2_GLOBALS._sound4.stop(); diff --git a/engines/tsage/ringworld2/ringworld2_scenes0.cpp b/engines/tsage/ringworld2/ringworld2_scenes0.cpp index a0846d386a..40e17b6ed9 100644 --- a/engines/tsage/ringworld2/ringworld2_scenes0.cpp +++ b/engines/tsage/ringworld2/ringworld2_scenes0.cpp @@ -577,7 +577,7 @@ bool Scene125::DiskSlot::startAction(CursorType action, Event &event) { Scene125 *scene = (Scene125 *)R2_GLOBALS._sceneManager._scene; switch (action) { case CURSOR_USE: - if (R2_INVENTORY.getObjectScene(R2_OPTO_DISK) == R2_GLOBALS._player._oldCharacterScene[1]) { + if (R2_INVENTORY.getObjectScene(R2_OPTO_DISK) == R2_GLOBALS._player._oldCharacterScene[R2_QUINN]) { R2_GLOBALS._player.disableControl(); scene->_sceneMode = 126; scene->setAction(&scene->_sequenceManager, scene, 126, &scene->_infoDisk, NULL); @@ -619,13 +619,13 @@ void Scene125::postInit(SceneObjectList *OwnerList) { if (R2_GLOBALS._sceneManager._previousScene != 125) // Save the prior scene to return to when the console is turned off - R2_GLOBALS._player._oldCharacterScene[1] = R2_GLOBALS._sceneManager._previousScene; + R2_GLOBALS._player._oldCharacterScene[R2_QUINN] = R2_GLOBALS._sceneManager._previousScene; R2_GLOBALS._player.postInit(); R2_GLOBALS._player.hide(); R2_GLOBALS._player.disableControl(); - if (R2_INVENTORY.getObjectScene(R2_OPTO_DISK) == R2_GLOBALS._player._oldCharacterScene[1]) { + if (R2_INVENTORY.getObjectScene(R2_OPTO_DISK) == R2_GLOBALS._player._oldCharacterScene[R2_QUINN]) { _infoDisk.postInit(); _infoDisk.setup(160, 3, 5); _infoDisk.setPosition(Common::Point(47, 167)); @@ -781,7 +781,7 @@ void Scene125::signal() { } break; case 125: - R2_INVENTORY.setObjectScene(R2_OPTO_DISK, R2_GLOBALS._player._oldCharacterScene[1]); + R2_INVENTORY.setObjectScene(R2_OPTO_DISK, R2_GLOBALS._player._oldCharacterScene[R2_QUINN]); R2_GLOBALS._player.enableControl(); break; case 126: @@ -883,7 +883,7 @@ void Scene125::consoleAction(int id) { _icon2.setIcon(23); break; case 6: - R2_GLOBALS._sceneManager.changeScene(R2_GLOBALS._player._oldCharacterScene[1]); + R2_GLOBALS._sceneManager.changeScene(R2_GLOBALS._player._oldCharacterScene[R2_QUINN]); break; case 7: if (_consoleMode == 11) @@ -946,7 +946,7 @@ void Scene125::consoleAction(int id) { break; case 13: consoleAction(2); - if (R2_INVENTORY.getObjectScene(R2_OPTO_DISK) != R2_GLOBALS._player._oldCharacterScene[1]) { + if (R2_INVENTORY.getObjectScene(R2_OPTO_DISK) != R2_GLOBALS._player._oldCharacterScene[R2_QUINN]) { SceneItem::display2(126, 17); } else { R2_GLOBALS._player.disableControl(); @@ -3279,7 +3279,7 @@ void Scene300::postInit(SceneObjectList *OwnerList) { _miranda.setAction(&_action3); _miranda.setDetails(300, 39, 40, 41, 1, (SceneItem *)NULL); - if ((R2_GLOBALS._player._characterScene[2] == 300) || (R2_GLOBALS._player._characterScene[2] == 325)) { + if ((R2_GLOBALS._player._characterScene[R2_SEEKER] == 300) || (R2_GLOBALS._player._characterScene[R2_SEEKER] == 325)) { _seeker.postInit(); _seeker.setVisage(302); _seeker.setPosition(Common::Point(158, 108)); @@ -3301,7 +3301,7 @@ void Scene300::postInit(SceneObjectList *OwnerList) { _miranda.setAction(&_action3); _miranda.setDetails(300, 39, 40, 41, 1, (SceneItem *)NULL); - if ((R2_GLOBALS._player._characterScene[1] == 300) || (R2_GLOBALS._player._characterScene[1] == 325)) { + if ((R2_GLOBALS._player._characterScene[R2_QUINN] == 300) || (R2_GLOBALS._player._characterScene[R2_QUINN] == 325)) { _quinn.postInit(); _quinn.setup(302, 3, 1); _quinn.setPosition(Common::Point(271, 150)); @@ -3317,7 +3317,7 @@ void Scene300::postInit(SceneObjectList *OwnerList) { break; case 3: - if ((R2_GLOBALS._player._characterScene[2] == 300) || (R2_GLOBALS._player._characterScene[2] == 325)) { + if ((R2_GLOBALS._player._characterScene[R2_SEEKER] == 300) || (R2_GLOBALS._player._characterScene[R2_SEEKER] == 325)) { _seeker.postInit(); _seeker.setVisage(302); _seeker.setPosition(Common::Point(158, 108)); @@ -3326,7 +3326,7 @@ void Scene300::postInit(SceneObjectList *OwnerList) { _seeker.setDetails(300, 42, 43, 44, 1, (SceneItem *)NULL); } - if ((R2_GLOBALS._player._characterScene[1] == 300) || (R2_GLOBALS._player._characterScene[1] == 325)) { + if ((R2_GLOBALS._player._characterScene[R2_QUINN] == 300) || (R2_GLOBALS._player._characterScene[R2_QUINN] == 325)) { _quinn.postInit(); _quinn.setup(302, 3, 1); _quinn.setPosition(Common::Point(271, 150)); @@ -3657,7 +3657,7 @@ void Scene300::signal() { break; case 316: - R2_GLOBALS._player._characterScene[2] = 500; + R2_GLOBALS._player._characterScene[R2_SEEKER] = 500; _seeker.remove(); R2_GLOBALS._player.enableControl(CURSOR_CROSSHAIRS); break; diff --git a/engines/tsage/ringworld2/ringworld2_scenes1.cpp b/engines/tsage/ringworld2/ringworld2_scenes1.cpp index 288b29855e..2729062d28 100644 --- a/engines/tsage/ringworld2/ringworld2_scenes1.cpp +++ b/engines/tsage/ringworld2/ringworld2_scenes1.cpp @@ -779,7 +779,7 @@ void Scene1100::postInit(SceneObjectList *OwnerList) { R2_GLOBALS._v5589E.right = 200; } - if (R2_GLOBALS._player._characterScene[1] == 1100) + if (R2_GLOBALS._player._characterScene[R2_QUINN] == 1100) R2_GLOBALS._sceneManager._previousScene = 1100; if (R2_GLOBALS._sceneManager._previousScene == -1) { @@ -817,8 +817,8 @@ void Scene1100::postInit(SceneObjectList *OwnerList) { if (R2_GLOBALS._sceneManager._previousScene == 300) { if (R2_GLOBALS._player._characterIndex == R2_MIRANDA) R2_GLOBALS._player._characterIndex = R2_QUINN; - R2_GLOBALS._player._characterScene[1] = 1100; - R2_GLOBALS._player._characterScene[2] = 1100; + R2_GLOBALS._player._characterScene[R2_QUINN] = 1100; + R2_GLOBALS._player._characterScene[R2_SEEKER] = 1100; _actor2.setPosition(Common::Point(150, 30)); R2_GLOBALS._sound1.play(93); R2_GLOBALS._player.postInit(); @@ -1217,8 +1217,8 @@ void Scene1100::signal() { R2_GLOBALS._player._canWalk = false; break; case 99: - R2_GLOBALS._player._characterScene[1] = 300; - R2_GLOBALS._player._characterScene[2] = 300; + R2_GLOBALS._player._characterScene[R2_QUINN] = 300; + R2_GLOBALS._player._characterScene[R2_SEEKER] = 300; R2_GLOBALS._player._characterIndex = R2_QUINN; R2_GLOBALS._sceneManager.changeScene(300); break; @@ -7787,9 +7787,9 @@ void Scene1550::postInit(SceneObjectList *OwnerList) { if (R2_GLOBALS._sceneManager._previousScene == -1) R2_GLOBALS.setFlag(16); - if ((R2_GLOBALS._player._characterScene[1] != 1550) && (R2_GLOBALS._player._characterScene[1] != 1580)) { - R2_GLOBALS._player._characterScene[1] = 1550; - R2_GLOBALS._player._characterScene[2] = 1550; + if ((R2_GLOBALS._player._characterScene[R2_QUINN] != 1550) && (R2_GLOBALS._player._characterScene[R2_QUINN] != 1580)) { + R2_GLOBALS._player._characterScene[R2_QUINN] = 1550; + R2_GLOBALS._player._characterScene[R2_SEEKER] = 1550; } _stripManager.setColors(60, 255); @@ -9252,7 +9252,7 @@ void Scene1550::enterArea() { R2_GLOBALS._walkRegions.enableRegion(k5A750[_field419 - 1550]); _companion.setPosition(Common::Point(k5A72E[k5A76D[_field419 - 1550]], k5A73F[k5A76D[_field419 - 1550]] + 8)); if (R2_GLOBALS._player._characterIndex == R2_QUINN) { - if (R2_GLOBALS._player._characterScene[2] == 1580) { + if (R2_GLOBALS._player._characterScene[R2_SEEKER] == 1580) { _companion.setup(1516, 3, 17); _companion.setPosition(Common::Point(272, 94)); _companion.fixPriority(91); @@ -9263,7 +9263,7 @@ void Scene1550::enterArea() { _companion.setDetails(1550, -1, -1, -1, 2, (SceneItem *) NULL); } } else { - if (R2_GLOBALS._player._characterScene[1] == 1580) { + if (R2_GLOBALS._player._characterScene[R2_QUINN] == 1580) { _companion.setup(1516, 2, 14); _companion.setPosition(Common::Point(276, 97)); _companion.fixPriority(91); @@ -10597,10 +10597,10 @@ void Scene1700::postInit(SceneObjectList *OwnerList) { setAction(&_sequenceManager, this, 1, &R2_GLOBALS._player, NULL); break; } - R2_GLOBALS._player._characterScene[1] = 1700; - R2_GLOBALS._player._characterScene[2] = 1700; - R2_GLOBALS._player._oldCharacterScene[1] = 1700; - R2_GLOBALS._player._oldCharacterScene[2] = 1700; + R2_GLOBALS._player._characterScene[R2_QUINN] = 1700; + R2_GLOBALS._player._characterScene[R2_SEEKER] = 1700; + R2_GLOBALS._player._oldCharacterScene[R2_QUINN] = 1700; + R2_GLOBALS._player._oldCharacterScene[R2_SEEKER] = 1700; R2_GLOBALS._v558B6.set(20, 0, 320, 200); enterArea(); @@ -10925,10 +10925,10 @@ void Scene1750::postInit(SceneObjectList *OwnerList) { R2_GLOBALS._v5589E.set(0, 0, 320, 200); SceneExt::postInit(); - R2_GLOBALS._player._characterScene[1] = 1750; - R2_GLOBALS._player._characterScene[2] = 1750; - R2_GLOBALS._player._oldCharacterScene[1] = 1750; - R2_GLOBALS._player._oldCharacterScene[2] = 1750; + R2_GLOBALS._player._characterScene[R2_QUINN] = 1750; + R2_GLOBALS._player._characterScene[R2_SEEKER] = 1750; + R2_GLOBALS._player._oldCharacterScene[R2_QUINN] = 1750; + R2_GLOBALS._player._oldCharacterScene[R2_SEEKER] = 1750; _rotation = R2_GLOBALS._scenePalette.addRotation(224, 254, 1); _rotation->setDelay(0); @@ -11480,8 +11480,8 @@ void Scene1800::postInit(SceneObjectList *OwnerList) { _companion._linkedActor = &_actor3; - R2_GLOBALS._player._characterScene[1] = 1800; - R2_GLOBALS._player._characterScene[2] = 1800; + R2_GLOBALS._player._characterScene[R2_QUINN] = 1800; + R2_GLOBALS._player._characterScene[R2_SEEKER] = 1800; _item2.setDetails(Rect(128, 95, 190, 135), 1800, 10, -1, -1, 1, NULL); _item1.setDetails(Rect(95, 3, 223, 135), 1800, 0, -1, -1, 1, NULL); @@ -11527,8 +11527,8 @@ void Scene1800::postInit(SceneObjectList *OwnerList) { } } - R2_GLOBALS._player._oldCharacterScene[1] = 1800; - R2_GLOBALS._player._oldCharacterScene[2] = 1800; + R2_GLOBALS._player._oldCharacterScene[R2_QUINN] = 1800; + R2_GLOBALS._player._oldCharacterScene[R2_SEEKER] = 1800; } void Scene1800::signal() { @@ -11893,8 +11893,8 @@ void Scene1850::postInit(SceneObjectList *OwnerList) { _field41E = 0; _field41A = Common::Point(0, 0); - R2_GLOBALS._player._characterScene[1] = 1850; - R2_GLOBALS._player._characterScene[2] = 1850; + R2_GLOBALS._player._characterScene[R2_QUINN] = 1850; + R2_GLOBALS._player._characterScene[R2_SEEKER] = 1850; _button.setDetails(Rect(101, 56, 111, 63), 1850, 19, -1, -1, 1, NULL); @@ -12144,8 +12144,8 @@ void Scene1850::postInit(SceneObjectList *OwnerList) { _background.setDetails(Rect(0, 0, 320, 200), 1850, 16, -1, -1, 1, NULL); - R2_GLOBALS._player._oldCharacterScene[1] = 1850; - R2_GLOBALS._player._oldCharacterScene[2] = 1850; + R2_GLOBALS._player._oldCharacterScene[R2_QUINN] = 1850; + R2_GLOBALS._player._oldCharacterScene[R2_SEEKER] = 1850; } void Scene1850::remove() { @@ -12724,7 +12724,7 @@ void Scene1900::postInit(SceneObjectList *OwnerList) { if (R2_GLOBALS._sceneManager._previousScene == -1) { R2_GLOBALS._sceneManager._previousScene = 1925; R2_GLOBALS._player._characterIndex = R2_SEEKER; - R2_GLOBALS._player._oldCharacterScene[2] = 1925; + R2_GLOBALS._player._oldCharacterScene[R2_SEEKER] = 1925; } if (R2_GLOBALS._sceneManager._previousScene != 1875) @@ -12809,7 +12809,7 @@ void Scene1900::postInit(SceneObjectList *OwnerList) { setAction(&_sequenceManager1, this, 1907, &R2_GLOBALS._player, &_actor3, NULL); } - if (R2_GLOBALS._player._characterScene[1] == R2_GLOBALS._player._characterScene[2]) { + if (R2_GLOBALS._player._characterScene[R2_QUINN] == R2_GLOBALS._player._characterScene[R2_SEEKER]) { _actor1.postInit(); _actor1.setPosition(Common::Point(30, 110)); R2_GLOBALS._walkRegions.enableRegion(1); @@ -12817,7 +12817,7 @@ void Scene1900::postInit(SceneObjectList *OwnerList) { _actor1.setDetails(9001, 0, -1, -1, 1, (SceneItem *) NULL); } R2_GLOBALS._player._oldCharacterScene[R2_GLOBALS._player._characterIndex] = 1900; - } else if (R2_GLOBALS._player._characterScene[1] == R2_GLOBALS._player._characterScene[2]) { + } else if (R2_GLOBALS._player._characterScene[R2_QUINN] == R2_GLOBALS._player._characterScene[R2_SEEKER]) { _actor1.postInit(); _actor1.setPosition(Common::Point(30, 110)); R2_GLOBALS._walkRegions.enableRegion(1); @@ -12831,7 +12831,7 @@ void Scene1900::postInit(SceneObjectList *OwnerList) { if (R2_GLOBALS._player._oldCharacterScene[R2_GLOBALS._player._characterIndex] == 2000) { if (R2_GLOBALS._player._characterIndex == R2_QUINN) { - if (R2_GLOBALS._v56605[1] == 5) { + if (R2_GLOBALS._spillLocation[1] == 5) { _sceneMode = 1902; setAction(&_sequenceManager1, this, 1902, &R2_GLOBALS._player, NULL); } else { @@ -12839,7 +12839,7 @@ void Scene1900::postInit(SceneObjectList *OwnerList) { setAction(&_sequenceManager1, this, 1903, &R2_GLOBALS._player, NULL); } } else { - if (R2_GLOBALS._v56605[2] == 5) { + if (R2_GLOBALS._spillLocation[R2_SEEKER] == 5) { _sceneMode = 1908; setAction(&_sequenceManager1, this, 1908, &R2_GLOBALS._player, NULL); } else { @@ -12866,11 +12866,11 @@ void Scene1900::remove() { void Scene1900::signal() { switch (_sceneMode) { case 10: - R2_GLOBALS._v56605[R2_GLOBALS._player._characterIndex] = 5; + R2_GLOBALS._spillLocation[R2_GLOBALS._player._characterIndex] = 5; R2_GLOBALS._sceneManager.changeScene(2000); break; case 11: - R2_GLOBALS._v56605[R2_GLOBALS._player._characterIndex] = 6; + R2_GLOBALS._spillLocation[R2_GLOBALS._player._characterIndex] = 6; R2_GLOBALS._sceneManager.changeScene(2000); break; case 20: @@ -12900,8 +12900,8 @@ void Scene1900::signal() { case 1910: 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; + R2_GLOBALS._player._oldCharacterScene[R2_QUINN] = 1900; + R2_GLOBALS._player._oldCharacterScene[R2_SEEKER] = 1900; R2_GLOBALS._sceneManager.changeScene(2450); break; case 1906: @@ -13128,7 +13128,7 @@ void Scene1925::postInit(SceneObjectList *OwnerList) { R2_GLOBALS._sound1.play(220); R2_GLOBALS._player.postInit(); R2_GLOBALS._player.disableControl(); - R2_GLOBALS._player._characterScene[2] = 1925; + R2_GLOBALS._player._characterScene[R2_SEEKER] = 1925; R2_GLOBALS._player._characterIndex = R2_SEEKER; switch (R2_GLOBALS._scene1925CurrLevel) { case -2: @@ -13187,7 +13187,7 @@ void Scene1925::postInit(SceneObjectList *OwnerList) { void Scene1925::remove() { R2_GLOBALS._sound1.fadeOut2(NULL); - R2_GLOBALS._player._oldCharacterScene[2] = 1925; + R2_GLOBALS._player._oldCharacterScene[R2_SEEKER] = 1925; SceneExt::remove(); } @@ -13395,7 +13395,7 @@ void Scene1945::postInit(SceneObjectList *OwnerList) { R2_GLOBALS._player.postInit(); R2_GLOBALS._player.enableControl(CURSOR_USE); R2_GLOBALS._player._canWalk = false; - R2_GLOBALS._player._characterScene[2] = 1945; + R2_GLOBALS._player._characterScene[R2_SEEKER] = 1945; R2_GLOBALS._player._characterIndex = R2_SEEKER; _exitUp.setDetails(Rect(128, 0, 186, 10), EXITCURSOR_N, 1945); diff --git a/engines/tsage/ringworld2/ringworld2_scenes2.cpp b/engines/tsage/ringworld2/ringworld2_scenes2.cpp index 91d7799617..5aaabc3e4b 100644 --- a/engines/tsage/ringworld2/ringworld2_scenes2.cpp +++ b/engines/tsage/ringworld2/ringworld2_scenes2.cpp @@ -33,14 +33,16 @@ namespace Ringworld2 { * Scene 2000 - Spill Mountains * *--------------------------------------------------------------------------*/ + void Scene2000::initPlayer() { + R2_GLOBALS._events.setCursor(CURSOR_WALK); R2_GLOBALS._player.disableControl(); switch (_mazePlayerMode) { case 0: R2_GLOBALS._player.setStrip(5); - if (_exit1._enabled) { - if (_exit2._enabled) + if (_westExit._enabled) { + if (_eastExit._enabled) R2_GLOBALS._player.setPosition(Common::Point(140, 129)); else R2_GLOBALS._player.setPosition(Common::Point(20, 129)); @@ -129,11 +131,11 @@ void Scene2000::initPlayer() { break; } for (int i = 0; i < 11; i++) { - if (R2_GLOBALS._v56605[R2_GLOBALS._player._characterIndex] == R2_GLOBALS._v56605[3 + i]) + if (R2_GLOBALS._spillLocation[R2_GLOBALS._player._characterIndex] == R2_GLOBALS._spillLocation[3 + i]) _objList1[i].show(); } - if ((R2_GLOBALS._player._characterScene[1] == R2_GLOBALS._player._characterScene[2]) && (R2_GLOBALS._v56605[1] == R2_GLOBALS._v56605[2])) { + if ((R2_GLOBALS._player._characterScene[R2_QUINN] == R2_GLOBALS._player._characterScene[R2_SEEKER]) && (R2_GLOBALS._spillLocation[R2_QUINN] == R2_GLOBALS._spillLocation[R2_SEEKER])) { _object1.postInit(); if (R2_GLOBALS._player._characterIndex == 1) { _object1.setup(20, 5, 1); @@ -142,8 +144,8 @@ void Scene2000::initPlayer() { _object1.setup(2008, 5, 1); _object1.setDetails(9001, 0, 5, 3, 1, (SceneItem *)NULL); } - if (_exit1._enabled) { - if (_exit2._enabled) + if (_westExit._enabled) { + if (_eastExit._enabled) _object1.setPosition(Common::Point(180, 128)); else _object1.setPosition(Common::Point(75, 128)); @@ -153,53 +155,53 @@ void Scene2000::initPlayer() { } void Scene2000::initExits() { - _exit1._enabled = true; - _exit2._enabled = true; - _exit3._enabled = false; - _exit4._enabled = false; - _exit5._enabled = false; - - _exit1._insideArea = false; - _exit2._insideArea = false; - _exit3._insideArea = false; - _exit4._insideArea = false; - _exit5._insideArea = false; - - _exit1._moving = false; - _exit2._moving = false; - _exit3._moving = false; - _exit4._moving = false; - _exit5._moving = false; + _westExit._enabled = true; + _eastExit._enabled = true; + _southExit._enabled = false; + _northExit._enabled = false; + _doorExit._enabled = false; + + _westExit._insideArea = false; + _eastExit._insideArea = false; + _southExit._insideArea = false; + _northExit._insideArea = false; + _doorExit._insideArea = false; + + _westExit._moving = false; + _eastExit._moving = false; + _southExit._moving = false; + _northExit._moving = false; + _doorExit._moving = false; for (int i = 0; i < 11; i++) _objList1[i].hide(); _object1.remove(); - switch (R2_GLOBALS._v56605[R2_GLOBALS._player._characterIndex]) { + switch (R2_GLOBALS._spillLocation[R2_GLOBALS._player._characterIndex]) { case 3: case 10: case 16: case 21: - _exit5._enabled = true; - _exit5._bounds.set(61, 68, 90, 125); - _exit5.setDest(Common::Point(92, 129)); - _exit5._cursorNum = EXITCURSOR_W; + _doorExit._enabled = true; + _doorExit._bounds.set(61, 68, 90, 125); + _doorExit.setDest(Common::Point(92, 129)); + _doorExit._cursorNum = EXITCURSOR_W; break; case 4: case 12: case 25: case 34: - _exit5._enabled = true; - _exit5._bounds.set(230, 68, 259, 125); - _exit5.setDest(Common::Point(244, 129)); - _exit5._cursorNum = EXITCURSOR_E; + _doorExit._enabled = true; + _doorExit._bounds.set(230, 68, 259, 125); + _doorExit.setDest(Common::Point(244, 129)); + _doorExit._cursorNum = EXITCURSOR_E; break; default: break; } - switch (R2_GLOBALS._v56605[R2_GLOBALS._player._characterIndex] - 1) { + switch (R2_GLOBALS._spillLocation[R2_GLOBALS._player._characterIndex] - 1) { case 0: case 6: case 13: @@ -207,7 +209,7 @@ void Scene2000::initExits() { case 22: case 27: case 30: - _exit1._enabled = false; + _westExit._enabled = false; loadScene(2225); R2_GLOBALS._walkRegions.load(2225); if (!_exitingFlag) @@ -216,10 +218,10 @@ void Scene2000::initExits() { break; case 1: case 19: - _exit3._enabled = true; - _exit3._bounds.set(71, 130, 154, 168); - _exit3.setDest(Common::Point(94, 129)); - _exit3._cursorNum = EXITCURSOR_SE; + _southExit._enabled = true; + _southExit._bounds.set(71, 130, 154, 168); + _southExit.setDest(Common::Point(94, 129)); + _southExit._cursorNum = EXITCURSOR_SE; loadScene(2300); if (!_exitingFlag) _mazePlayerMode = 0; @@ -284,7 +286,7 @@ void Scene2000::initExits() { case 26: loadScene(2200); R2_GLOBALS._walkRegions.load(2000); - _exit2._enabled = false; + _eastExit._enabled = false; if (R2_GLOBALS._player._oldCharacterScene[R2_GLOBALS._player._characterIndex] == 1900) _mazePlayerMode = 2; else if (!_exitingFlag) @@ -294,10 +296,10 @@ void Scene2000::initExits() { break; case 7: case 29: - _exit4._enabled = true; - _exit4._bounds.set(138, 83, 211, 125); - _exit4.setDest(Common::Point(129, 188)); - _exit4._cursorNum = EXITCURSOR_NW; + _northExit._enabled = true; + _northExit._bounds.set(138, 83, 211, 125); + _northExit.setDest(Common::Point(188, 129)); + _northExit._cursorNum = EXITCURSOR_NW; loadScene(2250); R2_GLOBALS._walkRegions.load(2000); if (R2_GLOBALS._player._oldCharacterScene[R2_GLOBALS._player._characterIndex] == 2500) @@ -309,10 +311,10 @@ void Scene2000::initExits() { break; case 10: case 25: - _exit3._enabled = true; - _exit3._bounds.set(78, 130, 148, 168); - _exit3.setDest(Common::Point(100, 129)); - _exit3._cursorNum = EXITCURSOR_SE; + _southExit._enabled = true; + _southExit._bounds.set(78, 130, 148, 168); + _southExit.setDest(Common::Point(100, 129)); + _southExit._cursorNum = EXITCURSOR_SE; loadScene(2075); R2_GLOBALS._walkRegions.load(2000); if (!_exitingFlag) @@ -320,10 +322,10 @@ void Scene2000::initExits() { R2_GLOBALS._player._oldCharacterScene[R2_GLOBALS._player._characterIndex] = 2000; break; case 14: - _exit3._enabled = true; - _exit3._bounds.set(160, 130, 248, 168); - _exit3.setDest(Common::Point(225, 129)); - _exit3._cursorNum = EXITCURSOR_SW; + _southExit._enabled = true; + _southExit._bounds.set(160, 130, 248, 168); + _southExit.setDest(Common::Point(225, 129)); + _southExit._cursorNum = EXITCURSOR_SW; loadScene(2325); R2_GLOBALS._walkRegions.load(2000); if (!_exitingFlag) @@ -332,10 +334,10 @@ void Scene2000::initExits() { break; case 16: case 31: - _exit4._enabled = true; - _exit4._bounds.set(122, 83, 207, 125); - _exit4.setDest(Common::Point(210, 129)); - _exit4._cursorNum = EXITCURSOR_NW; + _northExit._enabled = true; + _northExit._bounds.set(122, 83, 207, 125); + _northExit.setDest(Common::Point(210, 129)); + _northExit._cursorNum = EXITCURSOR_NW; loadScene(2125); R2_GLOBALS._walkRegions.load(2000); if (R2_GLOBALS._player._oldCharacterScene[R2_GLOBALS._player._characterIndex] == 2400) @@ -346,10 +348,10 @@ void Scene2000::initExits() { R2_GLOBALS._sceneManager._previousScene = 2000; break; case 23: - _exit4._enabled = true; - _exit4._bounds.set(108, 83, 128, 184); - _exit4.setDest(Common::Point(135, 129)); - _exit4._cursorNum = CURSOR_INVALID; + _northExit._enabled = true; + _northExit._bounds.set(108, 83, 128, 184); + _northExit.setDest(Common::Point(135, 129)); + _northExit._cursorNum = CURSOR_INVALID; loadScene(2275); R2_GLOBALS._walkRegions.load(2000); if (!_exitingFlag) @@ -357,10 +359,10 @@ void Scene2000::initExits() { R2_GLOBALS._player._oldCharacterScene[R2_GLOBALS._player._characterIndex] = 2000; break; case 28: - _exit3._enabled = true; - _exit3._bounds.set(171, 130, 241, 168); - _exit3.setDest(Common::Point(218, 129)); - _exit3._cursorNum = EXITCURSOR_SW; + _southExit._enabled = true; + _southExit._bounds.set(171, 130, 241, 168); + _southExit.setDest(Common::Point(218, 129)); + _southExit._cursorNum = EXITCURSOR_SW; loadScene(2050); R2_GLOBALS._walkRegions.load(2000); if (R2_GLOBALS._player._oldCharacterScene[R2_GLOBALS._player._characterIndex] == 2350) @@ -396,34 +398,34 @@ void Scene2000::Action1::signal() { } case 1: scene->_objList1[_state].setPosition(Common::Point(340, 127)); - --R2_GLOBALS._v56605[4 + _state]; + --R2_GLOBALS._spillLocation[4 + _state]; _actionIndex = 0; switch (_state - 1) { case 0: - if (R2_GLOBALS._v56605[4] == 1) + if (R2_GLOBALS._spillLocation[4] == 1) _actionIndex = 10; break; case 2: - if (R2_GLOBALS._v56605[6] == 7) + if (R2_GLOBALS._spillLocation[6] == 7) _actionIndex = 10; break; case 4: - if (R2_GLOBALS._v56605[8] == 14) + if (R2_GLOBALS._spillLocation[8] == 14) _actionIndex = 10; break; case 6: - if (R2_GLOBALS._v56605[10] == 19) + if (R2_GLOBALS._spillLocation[10] == 19) _actionIndex = 10; break; case 7: - if (R2_GLOBALS._v56605[11] == 23) + if (R2_GLOBALS._spillLocation[11] == 23) _actionIndex = 10; break; default: break; } - if (R2_GLOBALS._v56605[3 + _state] == R2_GLOBALS._v56605[R2_GLOBALS._player._characterIndex]) + if (R2_GLOBALS._spillLocation[3 + _state] == R2_GLOBALS._spillLocation[R2_GLOBALS._player._characterIndex]) scene->_objList1[_state].show(); else scene->_objList1[_state].hide(); @@ -439,34 +441,34 @@ void Scene2000::Action1::signal() { } case 6: scene->_objList1[_state].setPosition(Common::Point(-20, 127)); - ++R2_GLOBALS._v56605[3 + _state]; + ++R2_GLOBALS._spillLocation[3 + _state]; _actionIndex = 5; switch (_state - 1) { case 0: - if (R2_GLOBALS._v56605[4] == 5) + if (R2_GLOBALS._spillLocation[4] == 5) _actionIndex = 15; break; case 2: - if (R2_GLOBALS._v56605[6] == 13) + if (R2_GLOBALS._spillLocation[6] == 13) _actionIndex = 15; break; case 4: - if (R2_GLOBALS._v56605[8] == 16) + if (R2_GLOBALS._spillLocation[8] == 16) _actionIndex = 15; break; case 6: - if (R2_GLOBALS._v56605[10] == 22) + if (R2_GLOBALS._spillLocation[10] == 22) _actionIndex = 15; break; case 7: - if (R2_GLOBALS._v56605[11] == 27) + if (R2_GLOBALS._spillLocation[11] == 27) _actionIndex = 15; break; default: break; } - if (R2_GLOBALS._v56605[3 + _state] == R2_GLOBALS._v56605[R2_GLOBALS._player._characterIndex]) + if (R2_GLOBALS._spillLocation[3 + _state] == R2_GLOBALS._spillLocation[R2_GLOBALS._player._characterIndex]) scene->_objList1[_state].show(); else scene->_objList1[_state].hide(); @@ -498,7 +500,7 @@ void Scene2000::Action1::signal() { signal(); break; case 15: - if ((R2_GLOBALS._v56605[3 + _state] == 13) || (R2_GLOBALS._v56605[3 + _state] == 22) || (R2_GLOBALS._v56605[3 + _state] == 27)) { + if ((R2_GLOBALS._spillLocation[3 + _state] == 13) || (R2_GLOBALS._spillLocation[3 + _state] == 22) || (R2_GLOBALS._spillLocation[3 + _state] == 27)) { Common::Point pt(30, 127); NpcMover *mover = new NpcMover(); scene->_objList1[_state].addMover(mover, &pt, this); @@ -534,26 +536,24 @@ void Scene2000::Action1::signal() { } } -void Scene2000::Exit1::changeScene() { +void Scene2000::WestExit::changeScene() { Scene2000 *scene = (Scene2000 *)R2_GLOBALS._sceneManager._scene; scene->_exitingFlag = true; - scene->_sceneMode = 0; + _enabled = false; R2_GLOBALS._player.disableControl(CURSOR_ARROW); scene->_sceneMode = 10; Common::Point pt(-10, 129); NpcMover *mover = new NpcMover(); R2_GLOBALS._player.addMover(mover, &pt, scene); - - scene->setAction(&scene->_sequenceManager, scene, 206, &R2_GLOBALS._player, NULL); } -void Scene2000::Exit2::changeScene() { +void Scene2000::EastExit::changeScene() { Scene2000 *scene = (Scene2000 *)R2_GLOBALS._sceneManager._scene; scene->_exitingFlag = true; - scene->_sceneMode = 0; + _enabled = false; R2_GLOBALS._player.disableControl(CURSOR_ARROW); scene->_sceneMode = 11; @@ -562,38 +562,38 @@ void Scene2000::Exit2::changeScene() { R2_GLOBALS._player.addMover(mover, &pt, scene); } -void Scene2000::Exit3::changeScene() { +void Scene2000::SouthExit::changeScene() { Scene2000 *scene = (Scene2000 *)R2_GLOBALS._sceneManager._scene; scene->_exitingFlag = true; - scene->_sceneMode = 0; + _enabled = false; R2_GLOBALS._player.disableControl(CURSOR_ARROW); scene->_sceneMode = 12; - switch (R2_GLOBALS._v56605[R2_GLOBALS._player._characterIndex]) { + switch (R2_GLOBALS._spillLocation[R2_GLOBALS._player._characterIndex]) { case 2: scene->_mazePlayerMode = 4; - R2_GLOBALS._v56605[R2_GLOBALS._player._characterIndex] = 8; + R2_GLOBALS._spillLocation[R2_GLOBALS._player._characterIndex] = 8; break; case 11: scene->_mazePlayerMode = 6; - R2_GLOBALS._v56605[R2_GLOBALS._player._characterIndex] = 17; + R2_GLOBALS._spillLocation[R2_GLOBALS._player._characterIndex] = 17; break; case 15: scene->_mazePlayerMode = 8; - R2_GLOBALS._v56605[R2_GLOBALS._player._characterIndex] = 24; + R2_GLOBALS._spillLocation[R2_GLOBALS._player._characterIndex] = 24; break; case 20: scene->_mazePlayerMode = 4; - R2_GLOBALS._v56605[R2_GLOBALS._player._characterIndex] = 30; + R2_GLOBALS._spillLocation[R2_GLOBALS._player._characterIndex] = 30; break; case 26: scene->_mazePlayerMode = 6; - R2_GLOBALS._v56605[R2_GLOBALS._player._characterIndex] = 32; + R2_GLOBALS._spillLocation[R2_GLOBALS._player._characterIndex] = 32; break; case 29: scene->_mazePlayerMode = 11; - R2_GLOBALS._v56605[R2_GLOBALS._player._characterIndex] = 29; + R2_GLOBALS._spillLocation[R2_GLOBALS._player._characterIndex] = 29; break; default: break; @@ -631,34 +631,34 @@ void Scene2000::Exit3::changeScene() { } } -void Scene2000::Exit4::changeScene() { +void Scene2000::NorthExit::changeScene() { Scene2000 *scene = (Scene2000 *)R2_GLOBALS._sceneManager._scene; scene->_exitingFlag = true; - scene->_sceneMode = 0; + _enabled = false; R2_GLOBALS._player.disableControl(CURSOR_ARROW); scene->_sceneMode = 13; - switch (R2_GLOBALS._v56605[R2_GLOBALS._player._characterIndex]) { + switch (R2_GLOBALS._spillLocation[R2_GLOBALS._player._characterIndex]) { case 8: scene->_mazePlayerMode = 5; - R2_GLOBALS._v56605[R2_GLOBALS._player._characterIndex] = 2; + R2_GLOBALS._spillLocation[R2_GLOBALS._player._characterIndex] = 2; break; case 17: scene->_mazePlayerMode = 7; - R2_GLOBALS._v56605[R2_GLOBALS._player._characterIndex] = 11; + R2_GLOBALS._spillLocation[R2_GLOBALS._player._characterIndex] = 11; break; case 24: scene->_mazePlayerMode = 9; - R2_GLOBALS._v56605[R2_GLOBALS._player._characterIndex] = 15; + R2_GLOBALS._spillLocation[R2_GLOBALS._player._characterIndex] = 15; break; case 30: scene->_mazePlayerMode = 5; - R2_GLOBALS._v56605[R2_GLOBALS._player._characterIndex] = 20; + R2_GLOBALS._spillLocation[R2_GLOBALS._player._characterIndex] = 20; break; case 32: scene->_mazePlayerMode = 7; - R2_GLOBALS._v56605[R2_GLOBALS._player._characterIndex] = 26; + R2_GLOBALS._spillLocation[R2_GLOBALS._player._characterIndex] = 26; break; default: break; @@ -688,14 +688,14 @@ void Scene2000::Exit4::changeScene() { } } -void Scene2000::Exit5::changeScene() { +void Scene2000::DoorExit::changeScene() { Scene2000 *scene = (Scene2000 *)R2_GLOBALS._sceneManager._scene; - scene->_sceneMode = 0; + _enabled = false; R2_GLOBALS._player.disableControl(CURSOR_ARROW); scene->_sceneMode = 14; - switch (R2_GLOBALS._v56605[R2_GLOBALS._player._characterIndex]) { + switch (R2_GLOBALS._spillLocation[R2_GLOBALS._player._characterIndex]) { case 3: scene->_mazePlayerMode = 1; if (R2_GLOBALS._player._characterIndex == 1) @@ -758,9 +758,9 @@ void Scene2000::Exit5::changeScene() { } Scene2000::Scene2000(): SceneExt() { - if (R2_GLOBALS._sceneManager._previousScene != -1) { - R2_GLOBALS._v56605[1] = 21; - R2_GLOBALS._v56605[2] = 21; + if (R2_GLOBALS._sceneManager._previousScene == -1) { + R2_GLOBALS._spillLocation[R2_QUINN] = 21; + R2_GLOBALS._spillLocation[R2_SEEKER] = 21; } if ((R2_GLOBALS._player._characterScene[R2_GLOBALS._player._characterIndex] != R2_GLOBALS._player._oldCharacterScene[R2_GLOBALS._player._characterIndex]) @@ -773,16 +773,16 @@ Scene2000::Scene2000(): SceneExt() { } void Scene2000::postInit(SceneObjectList *OwnerList) { - _exit1.setDetails(Rect(0, 100, 14, 140), EXITCURSOR_W, 2000); - _exit1.setDest(Common::Point(14, 129)); - _exit2.setDetails(Rect(305, 100, 320, 140), EXITCURSOR_E, 2000); - _exit2.setDest(Common::Point(315, 129)); - _exit3.setDetails(Rect(71, 130, 154, 168), EXITCURSOR_S, 2000); - _exit3.setDest(Common::Point(94, 129)); - _exit4.setDetails(Rect(138, 83, 211, 125), EXITCURSOR_N, 2000); - _exit4.setDest(Common::Point(188, 128)); - _exit5.setDetails(Rect(61, 68, 90, 125), EXITCURSOR_W, 2000); - _exit5.setDest(Common::Point(92, 129)); + _westExit.setDetails(Rect(0, 100, 14, 140), EXITCURSOR_W, 2000); + _westExit.setDest(Common::Point(14, 129)); + _eastExit.setDetails(Rect(305, 100, 320, 140), EXITCURSOR_E, 2000); + _eastExit.setDest(Common::Point(315, 129)); + _southExit.setDetails(Rect(71, 130, 154, 168), EXITCURSOR_S, 2000); + _southExit.setDest(Common::Point(94, 129)); + _northExit.setDetails(Rect(138, 83, 211, 125), EXITCURSOR_N, 2000); + _northExit.setDest(Common::Point(188, 129)); + _doorExit.setDetails(Rect(61, 68, 90, 125), EXITCURSOR_W, 2000); + _doorExit.setDest(Common::Point(92, 129)); R2_GLOBALS._sound1.play(200); initExits(); @@ -859,39 +859,39 @@ void Scene2000::postInit(SceneObjectList *OwnerList) { _objList1[i].hide(); switch (i - 1) { case 0: - if (R2_GLOBALS._v56605[3 + i] == 1) - ++R2_GLOBALS._v56605[3 + i]; - else if (R2_GLOBALS._v56605[3 + i] == 5) - --R2_GLOBALS._v56605[3 + i]; + if (R2_GLOBALS._spillLocation[3 + i] == 1) + ++R2_GLOBALS._spillLocation[3 + i]; + else if (R2_GLOBALS._spillLocation[3 + i] == 5) + --R2_GLOBALS._spillLocation[3 + i]; break; case 2: - if (R2_GLOBALS._v56605[3 + i] == 7) - ++R2_GLOBALS._v56605[3 + i]; - else if (R2_GLOBALS._v56605[3 + i] == 13) - --R2_GLOBALS._v56605[3 + i]; + if (R2_GLOBALS._spillLocation[3 + i] == 7) + ++R2_GLOBALS._spillLocation[3 + i]; + else if (R2_GLOBALS._spillLocation[3 + i] == 13) + --R2_GLOBALS._spillLocation[3 + i]; break; case 4: - if (R2_GLOBALS._v56605[3 + i] == 14) - ++R2_GLOBALS._v56605[3 + i]; - else if (R2_GLOBALS._v56605[3 + i] == 16) - --R2_GLOBALS._v56605[3 + i]; + if (R2_GLOBALS._spillLocation[3 + i] == 14) + ++R2_GLOBALS._spillLocation[3 + i]; + else if (R2_GLOBALS._spillLocation[3 + i] == 16) + --R2_GLOBALS._spillLocation[3 + i]; break; case 6: - if (R2_GLOBALS._v56605[3 + i] == 19) - ++R2_GLOBALS._v56605[3 + i]; - else if (R2_GLOBALS._v56605[3 + i] == 22) - --R2_GLOBALS._v56605[3 + i]; + if (R2_GLOBALS._spillLocation[3 + i] == 19) + ++R2_GLOBALS._spillLocation[3 + i]; + else if (R2_GLOBALS._spillLocation[3 + i] == 22) + --R2_GLOBALS._spillLocation[3 + i]; break; case 8: - if (R2_GLOBALS._v56605[3 + i] == 23) - ++R2_GLOBALS._v56605[3 + i]; - else if (R2_GLOBALS._v56605[3 + i] == 27) - --R2_GLOBALS._v56605[3 + i]; + if (R2_GLOBALS._spillLocation[3 + i] == 23) + ++R2_GLOBALS._spillLocation[3 + i]; + else if (R2_GLOBALS._spillLocation[3 + i] == 27) + --R2_GLOBALS._spillLocation[3 + i]; break; default: break; } - switch (R2_GLOBALS._v56605[3 + i] - 1) { + switch (R2_GLOBALS._spillLocation[3 + i] - 1) { case 0: case 6: case 13: @@ -926,6 +926,7 @@ void Scene2000::postInit(SceneObjectList *OwnerList) { } void Scene2000::remove() { + R2_GLOBALS._events.setCursor(CURSOR_WALK); R2_GLOBALS._sound1.fadeOut(NULL); SceneExt::remove(); } @@ -933,17 +934,19 @@ void Scene2000::remove() { void Scene2000::signal() { switch (_sceneMode) { case 10: - if (R2_GLOBALS._v56605[R2_GLOBALS._player._characterIndex] == 6) + // Leaving left-hand side of scene + if (R2_GLOBALS._spillLocation[R2_GLOBALS._player._characterIndex] == 6) g_globals->_sceneManager.changeScene(1900); else { _mazePlayerMode = 1; - --R2_GLOBALS._v56605[R2_GLOBALS._player._characterIndex]; + --R2_GLOBALS._spillLocation[R2_GLOBALS._player._characterIndex]; initExits(); initPlayer(); } break; case 11: - switch (R2_GLOBALS._v56605[R2_GLOBALS._player._characterIndex]) { + // Leaving right-hand side of scene + switch (R2_GLOBALS._spillLocation[R2_GLOBALS._player._characterIndex]) { case 5: g_globals->_sceneManager.changeScene(1900); break; @@ -955,7 +958,7 @@ void Scene2000::signal() { break; default: _mazePlayerMode = 2; - ++R2_GLOBALS._v56605[R2_GLOBALS._player._characterIndex]; + ++R2_GLOBALS._spillLocation[R2_GLOBALS._player._characterIndex]; initExits(); initPlayer(); break; @@ -963,6 +966,7 @@ void Scene2000::signal() { break; case 12: case 13: + // Top/bottom scene exits initExits(); initPlayer(); break; @@ -1085,7 +1089,7 @@ void Scene2350::postInit(SceneObjectList *OwnerList) { _stripManager.addSpeaker(&_quinnSpeaker); if (R2_GLOBALS._sceneManager._previousScene == -1) - R2_GLOBALS._player._characterScene[2] = 2350; + R2_GLOBALS._player._characterScene[R2_SEEKER] = 2350; _exitUp.setDetails(Rect(25, 83, 93, 125), EXITCURSOR_NW, 2350); _exitUp.setDest(Common::Point(80, 129)); @@ -1103,7 +1107,7 @@ void Scene2350::postInit(SceneObjectList *OwnerList) { R2_GLOBALS._player._moveDiff = Common::Point(5, 3); } - if (R2_GLOBALS._player._characterScene[1] == R2_GLOBALS._player._characterScene[2]) { + if (R2_GLOBALS._player._characterScene[R2_QUINN] == R2_GLOBALS._player._characterScene[R2_SEEKER]) { _actor2.postInit(); if (R2_GLOBALS._player._characterIndex == 1) { _actor2.setup(20, 5, 1); @@ -1134,7 +1138,7 @@ void Scene2350::postInit(SceneObjectList *OwnerList) { R2_GLOBALS._player.disableControl(); if (R2_GLOBALS._player._oldCharacterScene[R2_GLOBALS._player._characterIndex] == 2000) { - if (R2_GLOBALS._v56605[R2_GLOBALS._player._characterIndex] == 34) { + if (R2_GLOBALS._spillLocation[R2_GLOBALS._player._characterIndex] == 34) { if (R2_GLOBALS._player._characterIndex == 1) _sceneMode = 2351; else @@ -1164,11 +1168,11 @@ void Scene2350::remove() { void Scene2350::signal() { switch (_sceneMode) { case 11: - R2_GLOBALS._v56605[R2_GLOBALS._player._characterIndex] = 34; + R2_GLOBALS._spillLocation[R2_GLOBALS._player._characterIndex] = 34; g_globals->_sceneManager.changeScene(2000); break; case 12: - R2_GLOBALS._v56605[R2_GLOBALS._player._characterIndex] = 29; + R2_GLOBALS._spillLocation[R2_GLOBALS._player._characterIndex] = 29; g_globals->_sceneManager.changeScene(2000); break; case 20: @@ -1244,7 +1248,7 @@ void Scene2400::postInit(SceneObjectList *OwnerList) { R2_GLOBALS._player.postInit(); R2_GLOBALS._player.disableControl(); - if (R2_GLOBALS._v56605[1] == 16) { + if (R2_GLOBALS._spillLocation[R2_QUINN] == 16) { _sceneMode = 2400; setAction(&_sequenceManager, this, 2400, &R2_GLOBALS._player, NULL); } else { @@ -1256,11 +1260,11 @@ void Scene2400::postInit(SceneObjectList *OwnerList) { void Scene2400::signal() { switch (_sceneMode) { case 10: - R2_GLOBALS._v56605[1] = 16; + R2_GLOBALS._spillLocation[R2_QUINN] = 16; g_globals->_sceneManager.changeScene(2000); break; case 11: - R2_GLOBALS._v56605[1] = 17; + R2_GLOBALS._spillLocation[R2_QUINN] = 17; g_globals->_sceneManager.changeScene(2000); break; default: @@ -1365,7 +1369,7 @@ void Scene2425::Exit1::changeScene() { Scene2425 *scene = (Scene2425 *)R2_GLOBALS._sceneManager._scene; _enabled = false; - R2_GLOBALS._events.setCursor(R2_NEGATOR_GUN); + R2_GLOBALS._events.setCursor(CURSOR_WALK); R2_GLOBALS._player.disableControl(); scene->_sceneMode = 11; @@ -1396,7 +1400,7 @@ void Scene2425::postInit(SceneObjectList *OwnerList) { R2_GLOBALS._player._moveDiff = Common::Point(5, 3); } - if (R2_GLOBALS._player._characterScene[1] == R2_GLOBALS._player._characterScene[2]) { + if (R2_GLOBALS._player._characterScene[R2_QUINN] == R2_GLOBALS._player._characterScene[R2_SEEKER]) { _actor2.postInit(); if (R2_GLOBALS._player._characterIndex == 1) { _actor2.setup(20, 5, 1); @@ -1521,7 +1525,7 @@ void Scene2430::Exit1::changeScene() { Scene2430 *scene = (Scene2430 *)R2_GLOBALS._sceneManager._scene; scene->_sceneMode = 0; - R2_GLOBALS._events.setCursor(R2_NEGATOR_GUN); + R2_GLOBALS._events.setCursor(CURSOR_WALK); R2_GLOBALS._player.disableControl(); scene->_sceneMode = 11; Common::Point pt(108, 200); @@ -1561,7 +1565,7 @@ void Scene2430::postInit(SceneObjectList *OwnerList) { } R2_GLOBALS._player.setPosition(Common::Point(100, 200)); - if (R2_GLOBALS._player._characterScene[1] == R2_GLOBALS._player._characterScene[2]) { + if (R2_GLOBALS._player._characterScene[R2_QUINN] == R2_GLOBALS._player._characterScene[R2_SEEKER]) { _actor1.postInit(); if (R2_GLOBALS._player._characterIndex == 1) { _actor1.setup(20, 5, 1); @@ -1673,7 +1677,7 @@ void Scene2435::Exit1::changeScene() { Scene2435 *scene = (Scene2435 *)R2_GLOBALS._sceneManager._scene; _enabled = false; - R2_GLOBALS._events.setCursor(R2_NEGATOR_GUN); + R2_GLOBALS._events.setCursor(CURSOR_WALK); R2_GLOBALS._player.disableControl(); scene->_sceneMode = 11; Common::Point pt(175, 200); @@ -1705,7 +1709,7 @@ void Scene2435::postInit(SceneObjectList *OwnerList) { R2_GLOBALS._player.setVisage(20); R2_GLOBALS._player._moveDiff = Common::Point(5, 3); } - R2_GLOBALS._player.setPosition(Common::Point(715, 200)); + R2_GLOBALS._player.setPosition(Common::Point(175, 200)); if (R2_GLOBALS._player._characterScene[R2_QUINN] == R2_GLOBALS._player._characterScene[R2_SEEKER]) { _companion.postInit(); if (R2_GLOBALS._player._characterIndex == R2_QUINN) { @@ -1740,7 +1744,7 @@ void Scene2435::postInit(SceneObjectList *OwnerList) { R2_GLOBALS._player.enableControl(); } R2_GLOBALS._player._oldCharacterScene[R2_GLOBALS._player._characterIndex] = 2435; - R2_GLOBALS._v56605[1 + R2_GLOBALS._player._characterIndex] = 12; + R2_GLOBALS._spillLocation[1 + R2_GLOBALS._player._characterIndex] = 12; } void Scene2435::remove() { @@ -1757,12 +1761,12 @@ void Scene2435::signal() { R2_GLOBALS._player.enableControl(CURSOR_TALK); break; case 30: - R2_GLOBALS._player._characterScene[1] = 2435; - R2_GLOBALS._player._characterScene[2] = 2435; - R2_GLOBALS._player._oldCharacterScene[1] = 2435; - R2_GLOBALS._player._oldCharacterScene[2] = 2435; - R2_GLOBALS._v56605[1] = 12; - R2_GLOBALS._v56605[2] = 12; + R2_GLOBALS._player._characterScene[R2_QUINN] = 2435; + R2_GLOBALS._player._characterScene[R2_SEEKER] = 2435; + R2_GLOBALS._player._oldCharacterScene[R2_QUINN] = 2435; + R2_GLOBALS._player._oldCharacterScene[R2_SEEKER] = 2435; + R2_GLOBALS._spillLocation[R2_QUINN] = 12; + R2_GLOBALS._spillLocation[R2_SEEKER] = 12; R2_GLOBALS.setFlag(81); _sceneMode = 2436; R2_GLOBALS._player.setStrip(7); @@ -1843,7 +1847,7 @@ void Scene2440::postInit(SceneObjectList *OwnerList) { R2_GLOBALS._player._moveDiff = Common::Point(5, 3); } R2_GLOBALS._player.setPosition(Common::Point(210, 200)); - if (R2_GLOBALS._player._characterScene[1] == R2_GLOBALS._player._characterScene[2]) { + if (R2_GLOBALS._player._characterScene[R2_QUINN] == R2_GLOBALS._player._characterScene[R2_SEEKER]) { _actor1.postInit(); if (R2_GLOBALS._player._characterIndex == 1) { _actor1.setup(20, 5, 1); @@ -1978,8 +1982,8 @@ void Scene2450::postInit(SceneObjectList *OwnerList) { R2_GLOBALS._sound1.play(200); if (R2_GLOBALS._sceneManager._previousScene == -1) { R2_GLOBALS._sceneManager._previousScene = 1900; - R2_GLOBALS._player._oldCharacterScene[1] = 1900; - R2_GLOBALS._player._oldCharacterScene[2] = 1900; + R2_GLOBALS._player._oldCharacterScene[R2_QUINN] = 1900; + R2_GLOBALS._player._oldCharacterScene[R2_SEEKER] = 1900; } _stripManager.addSpeaker(&_quinnSpeaker); _stripManager.addSpeaker(&_seekerSpeaker); @@ -2003,10 +2007,10 @@ void Scene2450::postInit(SceneObjectList *OwnerList) { switch (R2_GLOBALS._player._oldCharacterScene[R2_GLOBALS._player._characterIndex]) { case 1900: R2_GLOBALS._v565AE = 0; - R2_GLOBALS._player._characterScene[1] = 2450; - R2_GLOBALS._player._characterScene[2] = 2450; - R2_GLOBALS._player._oldCharacterScene[1] = 2450; - R2_GLOBALS._player._oldCharacterScene[2] = 2450; + R2_GLOBALS._player._characterScene[R2_QUINN] = 2450; + R2_GLOBALS._player._characterScene[R2_SEEKER] = 2450; + R2_GLOBALS._player._oldCharacterScene[R2_QUINN] = 2450; + R2_GLOBALS._player._oldCharacterScene[R2_SEEKER] = 2450; R2_GLOBALS._player.setup(2450, 1, 1); R2_GLOBALS._player.setPosition(Common::Point(126, 101)); setAction(&_sequenceManager, this, 2450, &R2_GLOBALS._player, NULL); @@ -2014,7 +2018,7 @@ void Scene2450::postInit(SceneObjectList *OwnerList) { case 2000: _sceneMode = 2451; if (R2_GLOBALS._player._characterIndex == 1) { - if (R2_GLOBALS._player._characterScene[2] == 2450) { + if (R2_GLOBALS._player._characterScene[R2_SEEKER] == 2450) { _companion.postInit(); _companion.setup(20, 6, 1); _companion.setPosition(Common::Point(240, 120)); @@ -2022,9 +2026,9 @@ void Scene2450::postInit(SceneObjectList *OwnerList) { } setAction(&_sequenceManager, this, 2451, &R2_GLOBALS._player, NULL); } else { - R2_GLOBALS._player._oldCharacterScene[2] = 2450; - R2_GLOBALS._player._characterScene[2] = 2450; - if (R2_GLOBALS._player._characterScene[1] == 2450) { + R2_GLOBALS._player._oldCharacterScene[R2_SEEKER] = 2450; + R2_GLOBALS._player._characterScene[R2_SEEKER] = 2450; + if (R2_GLOBALS._player._characterScene[R2_QUINN] == 2450) { _companion.postInit(); if (R2_GLOBALS.getFlag(61)) _companion.setup(2008, 6, 1); @@ -2047,7 +2051,7 @@ void Scene2450::postInit(SceneObjectList *OwnerList) { R2_GLOBALS._player.setPosition(Common::Point(106, 111)); R2_GLOBALS._player.animate(ANIM_MODE_1, NULL); if (R2_GLOBALS.getFlag(72)) { - if (R2_GLOBALS._player._characterScene[2] == 2450) { + if (R2_GLOBALS._player._characterScene[R2_SEEKER] == 2450) { _companion.postInit(); _companion.setup(20, 6, 1); _companion.setPosition(Common::Point(240, 120)); @@ -2072,7 +2076,7 @@ void Scene2450::postInit(SceneObjectList *OwnerList) { R2_GLOBALS._player.animate(ANIM_MODE_1, NULL); R2_GLOBALS._player.setPosition(Common::Point(93, 158)); if (R2_GLOBALS.getFlag(72)) { - if (R2_GLOBALS._player._characterScene[1] == 2450) { + if (R2_GLOBALS._player._characterScene[R2_QUINN] == 2450) { _companion.postInit(); if (R2_GLOBALS.getFlag(61)) { _companion.setup(2008, 6, 1); @@ -2191,9 +2195,9 @@ void Scene2450::signal() { } break; case 2455: - R2_GLOBALS._player._oldCharacterScene[2] = 2450; - R2_GLOBALS._player._characterScene[2] = 2000; - R2_GLOBALS._v56605[2] = 3; + R2_GLOBALS._player._oldCharacterScene[R2_SEEKER] = 2450; + R2_GLOBALS._player._characterScene[R2_SEEKER] = 2000; + R2_GLOBALS._spillLocation[R2_SEEKER] = 3; _companion.remove(); R2_GLOBALS._player.enableControl(CURSOR_ARROW); break; @@ -2434,7 +2438,7 @@ void Scene2500::postInit(SceneObjectList *OwnerList) { R2_GLOBALS._player._moveDiff = Common::Point(3, 2); } - if (R2_GLOBALS._player._characterScene[1] == R2_GLOBALS._player._characterScene[2]) { + if (R2_GLOBALS._player._characterScene[R2_QUINN] == R2_GLOBALS._player._characterScene[R2_SEEKER]) { _actor1.postInit(); if (R2_GLOBALS._player._characterIndex == 1) { _actor1.setup(21, 3, 1); @@ -2572,7 +2576,7 @@ void Scene2525::postInit(SceneObjectList *OwnerList) { R2_GLOBALS._player._moveDiff = Common::Point(5, 3); } - if (R2_GLOBALS._player._characterScene[1] == R2_GLOBALS._player._characterScene[2]) { + if (R2_GLOBALS._player._characterScene[R2_QUINN] == R2_GLOBALS._player._characterScene[R2_SEEKER]) { _actor1.postInit(); if (R2_GLOBALS._player._characterIndex == 1) { _actor1.setup(20, 5, 1); @@ -2733,7 +2737,7 @@ void Scene2530::postInit(SceneObjectList *OwnerList) { } R2_GLOBALS._player.setPosition(Common::Point(100, 200)); - if (R2_GLOBALS._player._characterScene[1] == R2_GLOBALS._player._characterScene[2]) { + if (R2_GLOBALS._player._characterScene[R2_QUINN] == R2_GLOBALS._player._characterScene[R2_SEEKER]) { _actor1.postInit(); if (R2_GLOBALS._player._characterIndex == 1) { _actor1.setup(20, 5, 1); @@ -2898,7 +2902,7 @@ void Scene2535::postInit(SceneObjectList *OwnerList) { } R2_GLOBALS._player.setPosition(Common::Point(210, 200)); - if (R2_GLOBALS._player._characterScene[1] == R2_GLOBALS._player._characterScene[2]) { + if (R2_GLOBALS._player._characterScene[R2_QUINN] == R2_GLOBALS._player._characterScene[R2_SEEKER]) { _actor1.postInit(); if (R2_GLOBALS._player._characterIndex == 1) { _actor1.setup(20, 5, 1); diff --git a/engines/tsage/ringworld2/ringworld2_scenes2.h b/engines/tsage/ringworld2/ringworld2_scenes2.h index 1c8d2656a5..9802168a80 100644 --- a/engines/tsage/ringworld2/ringworld2_scenes2.h +++ b/engines/tsage/ringworld2/ringworld2_scenes2.h @@ -45,23 +45,23 @@ class Scene2000 : public SceneExt { virtual void signal(); }; - class Exit1 : public SceneExit { + class WestExit : 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 NorthExit : public SceneExit { public: virtual void changeScene(); }; - class Exit5 : public SceneExit { + class DoorExit : public SceneExit { public: virtual void changeScene(); }; @@ -72,11 +72,11 @@ public: NamedHotspot _item1; SceneActor _object1; SceneActor _objList1[11]; - Exit1 _exit1; - Exit2 _exit2; - Exit3 _exit3; - Exit4 _exit4; - Exit5 _exit5; + WestExit _westExit; + EastExit _eastExit; + SouthExit _southExit; + NorthExit _northExit; + DoorExit _doorExit; Action1 _action1, _action2, _action3, _action4, _action5; SequenceManager _sequenceManager; diff --git a/engines/tsage/ringworld2/ringworld2_scenes3.cpp b/engines/tsage/ringworld2/ringworld2_scenes3.cpp index 7703d49188..3c9a36c646 100644 --- a/engines/tsage/ringworld2/ringworld2_scenes3.cpp +++ b/engines/tsage/ringworld2/ringworld2_scenes3.cpp @@ -58,7 +58,7 @@ bool Scene3100::Guard::startAction(CursorType action, Event &event) { void Scene3100::postInit(SceneObjectList *OwnerList) { if (R2_GLOBALS._sceneManager._previousScene == 1000) { - if (R2_GLOBALS._player._oldCharacterScene[1] == 3100) { + if (R2_GLOBALS._player._oldCharacterScene[R2_QUINN] == 3100) { loadScene(3101); R2_GLOBALS._uiElements._active = false; } else { @@ -89,7 +89,7 @@ void Scene3100::postInit(SceneObjectList *OwnerList) { _field412 = 0; if (R2_GLOBALS._sceneManager._previousScene == 1000) { - if (R2_GLOBALS._player._oldCharacterScene[1] == 3100) { + if (R2_GLOBALS._player._oldCharacterScene[R2_QUINN] == 3100) { _sceneMode = 3102; _actor3.postInit(); _actor4.postInit(); @@ -153,7 +153,7 @@ void Scene3100::postInit(SceneObjectList *OwnerList) { R2_GLOBALS._sound1.play(243); } - R2_GLOBALS._player._oldCharacterScene[1] = 3100; + R2_GLOBALS._player._oldCharacterScene[R2_QUINN] = 3100; } void Scene3100::remove() { @@ -178,7 +178,7 @@ void Scene3100::signal() { R2_GLOBALS._sceneManager.changeScene(1000); break; case 3102: - R2_GLOBALS._player._oldCharacterScene[1] = 1000; + R2_GLOBALS._player._oldCharacterScene[R2_QUINN] = 1000; R2_GLOBALS._sceneManager.changeScene(1000); break; default: @@ -536,7 +536,7 @@ void Scene3150::postInit(SceneObjectList *OwnerList) { loadScene(3150); if (R2_GLOBALS._sceneManager._previousScene == -1) { R2_INVENTORY.setObjectScene(R2_ANCIENT_SCROLLS, 2000); - R2_GLOBALS._player._oldCharacterScene[1] = 3100; + R2_GLOBALS._player._oldCharacterScene[R2_QUINN] = 3100; R2_GLOBALS._player._oldCharacterScene[3] = 0; R2_GLOBALS._player._characterIndex = R2_MIRANDA; } @@ -675,7 +675,7 @@ void Scene3150::postInit(SceneObjectList *OwnerList) { break; } default: - if ((R2_GLOBALS._v56AA0 == 1) && (R2_INVENTORY.getObjectScene(R2_ANCIENT_SCROLLS) == 2000) && (R2_GLOBALS._player._oldCharacterScene[1] == 3100)) { + if ((R2_GLOBALS._v56AA0 == 1) && (R2_INVENTORY.getObjectScene(R2_ANCIENT_SCROLLS) == 2000) && (R2_GLOBALS._player._oldCharacterScene[R2_QUINN] == 3100)) { ++R2_GLOBALS._v56AA0; _sceneMode = 3156; _actor1.postInit(); @@ -1957,8 +1957,8 @@ void Scene3375::postInit(SceneObjectList *OwnerList) { _stripManager.addSpeaker(&_mirandaSpeaker); _stripManager.addSpeaker(&_webbsterSpeaker); - R2_GLOBALS._player._characterScene[1] = 3375; - R2_GLOBALS._player._characterScene[2] = 3375; + R2_GLOBALS._player._characterScene[R2_QUINN] = 3375; + R2_GLOBALS._player._characterScene[R2_SEEKER] = 3375; R2_GLOBALS._player._characterScene[3] = 3375; setZoomPercents(126, 55, 200, 167); @@ -2292,8 +2292,8 @@ void Scene3385::postInit(SceneObjectList *OwnerList) { _stripManager.addSpeaker(&_mirandaSpeaker); _stripManager.addSpeaker(&_webbsterSpeaker); - R2_GLOBALS._player._characterScene[1] = 3385; - R2_GLOBALS._player._characterScene[2] = 3385; + R2_GLOBALS._player._characterScene[R2_QUINN] = 3385; + R2_GLOBALS._player._characterScene[R2_SEEKER] = 3385; R2_GLOBALS._player._characterScene[3] = 3385; if (R2_GLOBALS._sceneManager._previousScene == 3375) @@ -2512,8 +2512,8 @@ void Scene3395::postInit(SceneObjectList *OwnerList) { _stripManager.addSpeaker(&_mirandaSpeaker); _stripManager.addSpeaker(&_webbsterSpeaker); - R2_GLOBALS._player._characterScene[1] = 3395; - R2_GLOBALS._player._characterScene[2] = 3395; + R2_GLOBALS._player._characterScene[R2_QUINN] = 3395; + R2_GLOBALS._player._characterScene[R2_SEEKER] = 3395; R2_GLOBALS._player._characterScene[3] = 3395; if (R2_GLOBALS._sceneManager._previousScene == 3385) @@ -2669,8 +2669,8 @@ void Scene3400::postInit(SceneObjectList *OwnerList) { _stripManager.addSpeaker(&_tealSpeaker); setZoomPercents(51, 46, 180, 200); - R2_GLOBALS._player._characterScene[1] = 3400; - R2_GLOBALS._player._characterScene[2] = 3400; + R2_GLOBALS._player._characterScene[R2_QUINN] = 3400; + R2_GLOBALS._player._characterScene[R2_SEEKER] = 3400; R2_GLOBALS._player._characterScene[3] = 3400; _actor7.postInit(); @@ -3577,8 +3577,8 @@ void Scene3500::postInit(SceneObjectList *OwnerList) { R2_GLOBALS._v5589E.set(0, 0, 320, 200); R2_GLOBALS._sound1.play(305); R2_GLOBALS._player._characterIndex = R2_QUINN; - R2_GLOBALS._player._characterScene[1] = 3500; - R2_GLOBALS._player._characterScene[2] = 3500; + R2_GLOBALS._player._characterScene[R2_QUINN] = 3500; + R2_GLOBALS._player._characterScene[R2_SEEKER] = 3500; R2_GLOBALS._player._characterScene[3] = 3500; _field1284 = 0; _field1282 = 0; @@ -4377,8 +4377,8 @@ void Scene3600::postInit(SceneObjectList *OwnerList) { _stripManager.addSpeaker(&_protectorSpeaker); setZoomPercents(142, 80, 167, 105); - R2_GLOBALS._player._characterScene[1] = 3600; - R2_GLOBALS._player._characterScene[2] = 3600; + R2_GLOBALS._player._characterScene[R2_QUINN] = 3600; + R2_GLOBALS._player._characterScene[R2_SEEKER] = 3600; R2_GLOBALS._player._characterScene[3] = 3600; _item2.setDetails(33, 3600, 6, -1, -1); |