diff options
author | Paul Gilbert | 2011-10-24 21:46:03 +1100 |
---|---|---|
committer | Paul Gilbert | 2011-10-24 21:46:03 +1100 |
commit | b3d14a1f673638dc26391bffd236d2e2248e19ef (patch) | |
tree | 3483d7b30934e83e069bfca54758126377a30ed0 | |
parent | 8b66b16c0e352c945474afe46980ed54e1aaf389 (diff) | |
download | scummvm-rg350-b3d14a1f673638dc26391bffd236d2e2248e19ef.tar.gz scummvm-rg350-b3d14a1f673638dc26391bffd236d2e2248e19ef.tar.bz2 scummvm-rg350-b3d14a1f673638dc26391bffd236d2e2248e19ef.zip |
TSAGE: Rename of inventory constants and scene objects for first R2 scene
-rw-r--r-- | engines/tsage/events.h | 2 | ||||
-rw-r--r-- | engines/tsage/ringworld2/ringworld2_logic.cpp | 13 | ||||
-rw-r--r-- | engines/tsage/ringworld2/ringworld2_logic.h | 2 | ||||
-rw-r--r-- | engines/tsage/ringworld2/ringworld2_scenes0.cpp | 63 | ||||
-rw-r--r-- | engines/tsage/ringworld2/ringworld2_scenes0.h | 8 |
5 files changed, 47 insertions, 41 deletions
diff --git a/engines/tsage/events.h b/engines/tsage/events.h index 874020f140..67d56ceb87 100644 --- a/engines/tsage/events.h +++ b/engines/tsage/events.h @@ -83,7 +83,7 @@ enum CursorType { INV_CARAVAN_KEY = 67, BF_LAST_INVENT = 68, // Ringworld 2 objects - R2_1 = 1, R2_2 = 2, R2_3 = 3, R2_STEPPING_DISKS = 4, R2_5 = 5, R2_6 = 6, R2_7 = 7, + R2_1 = 1, R2_2 = 2, R2_NEGATOR_GUN = 3, R2_STEPPING_DISKS = 4, R2_5 = 5, R2_6 = 6, R2_7 = 7, R2_8 = 8, R2_9 = 9, R2_10 = 10, R2_11 = 11, R2_12 = 12, R2_13 = 13, R2_14 = 14, R2_15 = 15, R2_16 = 16, R2_17 = 17, R2_18 = 18, R2_19 = 19, R2_20 = 20, R2_21 = 21, R2_22 = 22, R2_23 = 23, R2_24 = 24, R2_25 = 25, R2_26 = 26, R2_27 = 27, R2_28 = 28, diff --git a/engines/tsage/ringworld2/ringworld2_logic.cpp b/engines/tsage/ringworld2/ringworld2_logic.cpp index 0bdcf36d0c..ce29ae7235 100644 --- a/engines/tsage/ringworld2/ringworld2_logic.cpp +++ b/engines/tsage/ringworld2/ringworld2_logic.cpp @@ -281,7 +281,7 @@ Ringworld2InvObjectList::Ringworld2InvObjectList(): _none(1, 1), _inv1(1, 2), _inv2(1, 3), - _inv3(1, 4), + _negatorGun(1, 4), _steppingDisks(1, 5), _inv5(1, 6), _inv6(1, 7), @@ -336,7 +336,7 @@ Ringworld2InvObjectList::Ringworld2InvObjectList(): _itemList.push_back(&_none); _itemList.push_back(&_inv1); _itemList.push_back(&_inv2); - _itemList.push_back(&_inv3); + _itemList.push_back(&_negatorGun); _itemList.push_back(&_steppingDisks); _itemList.push_back(&_inv5); _itemList.push_back(&_inv6); @@ -400,7 +400,7 @@ void Ringworld2InvObjectList::reset() { // Set up default inventory setObjectScene(R2_1, 800); setObjectScene(R2_2, 400); - setObjectScene(R2_3, 100); + setObjectScene(R2_NEGATOR_GUN, 100); setObjectScene(R2_STEPPING_DISKS, 100); setObjectScene(R2_5, 400); setObjectScene(R2_6, 400); @@ -483,11 +483,12 @@ void Ringworld2Game::start() { } if (slot >= 0) - g_globals->_sceneHandler->_loadGameSlot = slot; + R2_GLOBALS._sceneHandler->_loadGameSlot = slot; else { // Switch to the first game scene - g_globals->_events.setCursor(CURSOR_WALK); - g_globals->_sceneManager.setNewScene(100); + R2_GLOBALS._events.setCursor(CURSOR_WALK); + R2_GLOBALS._uiElements._active = true; + R2_GLOBALS._sceneManager.setNewScene(100); } g_globals->_events.showCursor(); diff --git a/engines/tsage/ringworld2/ringworld2_logic.h b/engines/tsage/ringworld2/ringworld2_logic.h index bfb3281d5d..13f230c78f 100644 --- a/engines/tsage/ringworld2/ringworld2_logic.h +++ b/engines/tsage/ringworld2/ringworld2_logic.h @@ -117,7 +117,7 @@ public: InvObject _none; InvObject _inv1; InvObject _inv2; - InvObject _inv3; + InvObject _negatorGun; InvObject _steppingDisks; InvObject _inv5; InvObject _inv6; diff --git a/engines/tsage/ringworld2/ringworld2_scenes0.cpp b/engines/tsage/ringworld2/ringworld2_scenes0.cpp index 526bf6e3c9..004c6c2b2b 100644 --- a/engines/tsage/ringworld2/ringworld2_scenes0.cpp +++ b/engines/tsage/ringworld2/ringworld2_scenes0.cpp @@ -63,7 +63,7 @@ bool Scene100::Object7::startAction(CursorType action, Event &event) { } } -bool Scene100::Object8::startAction(CursorType action, Event &event) { +bool Scene100::Table::startAction(CursorType action, Event &event) { Scene100 *scene = (Scene100 *)R2_GLOBALS._sceneManager._scene; switch (action) { @@ -72,21 +72,21 @@ bool Scene100::Object8::startAction(CursorType action, Event &event) { if (_strip == 2) { scene->_sceneMode = 108; scene->_object3.postInit(); - scene->_object9.postInit(); + scene->_stasisNegator.postInit(); - if (R2_INVENTORY.getObjectScene(R2_3) == 1) { - scene->_object9.setup(100, 7, 2); + if (R2_INVENTORY.getObjectScene(R2_NEGATOR_GUN) == 1) { + scene->_stasisNegator.setup(100, 7, 2); } else { - scene->_object9.setup(100, 7, 1); - scene->_object9.setDetails(100, 21, 22, 23, 2, NULL); + scene->_stasisNegator.setup(100, 7, 1); + scene->_stasisNegator.setDetails(100, 21, 22, 23, 2, NULL); } scene->setAction(&scene->_sequenceManager2, scene, 108, this, &scene->_object3, - &scene->_object9, &R2_GLOBALS._player, NULL); + &scene->_stasisNegator, &R2_GLOBALS._player, NULL); } else { scene->_sceneMode = 109; scene->setAction(&scene->_sequenceManager2, scene, 109, this, &scene->_object3, - &scene->_object9, &R2_GLOBALS._player, NULL); + &scene->_stasisNegator, &R2_GLOBALS._player, NULL); } return true; case CURSOR_TALK: @@ -96,22 +96,22 @@ bool Scene100::Object8::startAction(CursorType action, Event &event) { SceneItem::display2(100, 18); scene->_sceneMode = 102; scene->_object3.postInit(); - scene->_object9.postInit(); + scene->_stasisNegator.postInit(); - if (R2_INVENTORY.getObjectScene(R2_3) == 1) { - scene->_object9.setup(100, 7, 2); + if (R2_INVENTORY.getObjectScene(R2_NEGATOR_GUN) == 1) { + scene->_stasisNegator.setup(100, 7, 2); } else { - scene->_object9.setup(100, 7, 1); - scene->_object9.setDetails(100, 21, 22, 23, 2, NULL); + scene->_stasisNegator.setup(100, 7, 1); + scene->_stasisNegator.setDetails(100, 21, 22, 23, 2, NULL); } scene->setAction(&scene->_sequenceManager2, scene, 102, this, &scene->_object3, - &scene->_object9, NULL); + &scene->_stasisNegator, NULL); } else { SceneItem::display2(100, 19); scene->_sceneMode = 103; scene->setAction(&scene->_sequenceManager2, scene, 103, this, &scene->_object3, - &scene->_object9, NULL); + &scene->_stasisNegator, NULL); } return true; default: @@ -119,14 +119,14 @@ bool Scene100::Object8::startAction(CursorType action, Event &event) { } } -bool Scene100::Object9::startAction(CursorType action, Event &event) { +bool Scene100::StasisNegator::startAction(CursorType action, Event &event) { Scene100 *scene = (Scene100 *)R2_GLOBALS._sceneManager._scene; switch (action) { case CURSOR_USE: R2_GLOBALS._player.disableControl(); scene->_sceneMode = 107; - scene->setAction(&scene->_sequenceManager1, scene, 107, &R2_GLOBALS._player, &scene->_object9, NULL); + scene->setAction(&scene->_sequenceManager1, scene, 107, &R2_GLOBALS._player, &scene->_stasisNegator, NULL); return true; default: return SceneActor::startAction(action, event); @@ -187,10 +187,10 @@ void Scene100::postInit(SceneObjectList *OwnerList) { _object10.setup(100, 2, 1); _object10.setDetails(100, -1, -1, -1, 1, NULL); - _object8.postInit(); - _object8.setup(100, 2, 3); - _object8.setPosition(Common::Point(175, 157)); - _object8.setDetails(100, 17, 18, 20, 1, NULL); + _table.postInit(); + _table.setup(100, 2, 3); + _table.setPosition(Common::Point(175, 157)); + _table.setDetails(100, 17, 18, 20, 1, NULL); _object1.postInit(); _object1.setup(100, 3, 1); @@ -267,11 +267,11 @@ void Scene100::signal() { break; case 103: case 109: - _object8.setStrip(2); - _object8.setFrame(3); + _table.setStrip(2); + _table.setFrame(3); _object3.remove(); - _object9.remove(); + _stasisNegator.remove(); R2_GLOBALS._player.enableControl(); break; case 104: @@ -288,10 +288,10 @@ void Scene100::signal() { R2_GLOBALS._sceneManager.changeScene(125); break; case 107: - R2_GLOBALS._sceneItems.remove(&_object9); + R2_GLOBALS._sceneItems.remove(&_stasisNegator); - _object9.setFrame(2); - R2_INVENTORY.setObjectScene(3, 1); + _stasisNegator.setFrame(2); + R2_INVENTORY.setObjectScene(R2_NEGATOR_GUN, 1); R2_GLOBALS._player.enableControl(); break; case 110: @@ -304,6 +304,11 @@ void Scene100::signal() { } R2_GLOBALS._player.enableControl(); break; + case 111: + R2_INVENTORY.setObjectScene(R2_STEPPING_DISKS, 1); + _steppingDisks.remove(); + R2_GLOBALS._player.enableControl(); + break; default: R2_GLOBALS._player.enableControl(); break; @@ -321,8 +326,8 @@ void Scene100::dispatch() { */ SceneExt::dispatch(); - if ((_sceneMode == 101) && (_object7._frame == 2) && (_object8._strip == 5)) { - _object8.setAction(&_sequenceManager2, NULL, 103, &_object8, &_object3, &_object9, NULL); + if ((_sceneMode == 101) && (_object7._frame == 2) && (_table._strip == 5)) { + _table.setAction(&_sequenceManager2, NULL, 103, &_table, &_object3, &_stasisNegator, NULL); } } diff --git a/engines/tsage/ringworld2/ringworld2_scenes0.h b/engines/tsage/ringworld2/ringworld2_scenes0.h index c51b044137..4a38e78ba3 100644 --- a/engines/tsage/ringworld2/ringworld2_scenes0.h +++ b/engines/tsage/ringworld2/ringworld2_scenes0.h @@ -44,11 +44,11 @@ class Scene100: public SceneExt { public: bool startAction(CursorType action, Event &event); }; - class Object8: public SceneActor { + class Table: public SceneActor { public: bool startAction(CursorType action, Event &event); }; - class Object9: public SceneActor { + class StasisNegator: public SceneActor { public: bool startAction(CursorType action, Event &event); }; @@ -65,8 +65,8 @@ public: SceneActor _object1, _object2, _object3, _object4, _object5; SceneActor _object6; Object7 _object7; - Object8 _object8; - Object9 _object9; + Table _table; + StasisNegator _stasisNegator; Object10 _object10; SteppingDisks _steppingDisks; SequenceManager _sequenceManager1, _sequenceManager2; |