diff options
author | Strangerke | 2013-08-18 19:46:02 +0200 |
---|---|---|
committer | Strangerke | 2013-08-18 19:46:44 +0200 |
commit | c1c2e0dd2eb5ac494767974e63f302dd6e3488d1 (patch) | |
tree | feb031006e39ddd142fc80c11e583c4914c634cb /engines | |
parent | 03bf56ea82c0b89f4e61e5e0787a36473f999efa (diff) | |
download | scummvm-rg350-c1c2e0dd2eb5ac494767974e63f302dd6e3488d1.tar.gz scummvm-rg350-c1c2e0dd2eb5ac494767974e63f302dd6e3488d1.tar.bz2 scummvm-rg350-c1c2e0dd2eb5ac494767974e63f302dd6e3488d1.zip |
TSAGE: R2R: Fix food submenu on ship computer (Scene 125)
Diffstat (limited to 'engines')
-rw-r--r-- | engines/tsage/globals.cpp | 4 | ||||
-rw-r--r-- | engines/tsage/globals.h | 2 | ||||
-rw-r--r-- | engines/tsage/ringworld2/ringworld2_scenes0.cpp | 57 | ||||
-rw-r--r-- | engines/tsage/ringworld2/ringworld2_scenes0.h | 4 |
4 files changed, 38 insertions, 29 deletions
diff --git a/engines/tsage/globals.cpp b/engines/tsage/globals.cpp index 5c4fa967e5..e3019b1aae 100644 --- a/engines/tsage/globals.cpp +++ b/engines/tsage/globals.cpp @@ -404,7 +404,7 @@ void Ringworld2Globals::reset() { _v565E7 = 0; _v565E9 = -5; _v565EB = 26; - _v565F5 = 0; + _foodCount = 0; _v565F6 = 0; _v565F8 = 0; _v565FA = 0; @@ -519,7 +519,7 @@ void Ringworld2Globals::synchronize(Serializer &s) { s.syncAsSint16LE(_v565E7); s.syncAsSint16LE(_v565E9); s.syncAsSint16LE(_v565EB); - s.syncAsSint16LE(_v565F5); + s.syncAsSint16LE(_foodCount); s.syncAsSint16LE(_v565F6); s.syncAsSint16LE(_v565F8); s.syncAsSint16LE(_v565FA); diff --git a/engines/tsage/globals.h b/engines/tsage/globals.h index ed27ff0556..eaf2a6d90c 100644 --- a/engines/tsage/globals.h +++ b/engines/tsage/globals.h @@ -269,7 +269,7 @@ public: int _v565E7; int _v565E9; int _v565EB; - int _v565F5; + int _foodCount; int _v565F6; int _v565F8; int _v565FA; diff --git a/engines/tsage/ringworld2/ringworld2_scenes0.cpp b/engines/tsage/ringworld2/ringworld2_scenes0.cpp index 63bb24f384..4eeed8b025 100644 --- a/engines/tsage/ringworld2/ringworld2_scenes0.cpp +++ b/engines/tsage/ringworld2/ringworld2_scenes0.cpp @@ -392,11 +392,11 @@ void Scene100::dispatch() { * *--------------------------------------------------------------------------*/ -bool Scene125::Object5::startAction(CursorType action, Event &event) { +bool Scene125::Food::startAction(CursorType action, Event &event) { if (action == CURSOR_USE) return true; - else - return SceneActor::startAction(action, event); + + return SceneActor::startAction(action, event); } /*--------------------------------------------------------------------------*/ @@ -631,9 +631,9 @@ void Scene125::postInit(SceneObjectList *OwnerList) { _infoDisk.setPosition(Common::Point(47, 167)); } - _object6.postInit(); - _object6.setup(162, 1, 1); - _object6.setPosition(Common::Point(214, 168)); + _foodDispenser.postInit(); + _foodDispenser.setup(162, 1, 1); + _foodDispenser.setPosition(Common::Point(214, 168)); _diskSlot.setDetails(Rect(27, 145, 81, 159), 126, 9, -1, -1, 1, NULL); _item3.setDetails(Rect(144, 119, 286, 167), 126, 6, 7, 8, 1, NULL); @@ -656,8 +656,8 @@ void Scene125::signal() { _icon4.postInit(); _icon4._sceneRegionId = 5; - _sceneMode = 2; setAction(&_sequenceManager, this, 127, &_icon1, &_icon2, &_icon3, &_icon4, &R2_GLOBALS._player, NULL); + _sceneMode = 2; break; case 2: _icon1.setup(160, 1, 1); @@ -698,7 +698,7 @@ void Scene125::signal() { _icon6._sceneRegionId = 8; consoleAction(5); - R2_GLOBALS._player.enableControl(); + R2_GLOBALS._player.enableControl(CURSOR_USE); R2_GLOBALS._player._canWalk = false; break; case 10: @@ -971,14 +971,17 @@ void Scene125::consoleAction(int id) { case 15: consoleAction(3); - if (R2_GLOBALS._v565F5 < 3) { + if (R2_GLOBALS._foodCount < 3) { R2_GLOBALS._player.disableControl(); - _object5.postInit(); - _object5.setup(162, 2, 2); - _object5.setPosition(Common::Point(216, UI_INTERFACE_Y)); + _food.postInit(); + _food.setup(162, 2, 2); + _food.setPosition(Common::Point(216, UI_INTERFACE_Y)); - R2_GLOBALS._v565F5 += 2; - } else if (R2_GLOBALS._v565F5 == 3) { + R2_GLOBALS._foodCount += 2; + + _sceneMode = 128; + this->setAction(&_sequenceManager, this, 128, &_foodDispenser, &_food, NULL); + } else if (R2_GLOBALS._foodCount == 3) { SceneItem::display2(126, 13); } else { SceneItem::display2(126, 14); @@ -987,13 +990,16 @@ void Scene125::consoleAction(int id) { case 16: consoleAction(3); - if (R2_GLOBALS._v565F5 < 4) { + if (R2_GLOBALS._foodCount < 4) { R2_GLOBALS._player.disableControl(); - _object5.postInit(); - _object5.setup(162, 2, 3); - _object5.setPosition(Common::Point(218, UI_INTERFACE_Y)); + _food.postInit(); + _food.setup(162, 2, 3); + _food.setPosition(Common::Point(218, UI_INTERFACE_Y)); - ++R2_GLOBALS._v565F5; + ++R2_GLOBALS._foodCount; + + _sceneMode = 128; + this->setAction(&_sequenceManager, this, 128, &_foodDispenser, &_food, NULL); } else { SceneItem::display2(126, 15); } @@ -1001,13 +1007,16 @@ void Scene125::consoleAction(int id) { case 17: consoleAction(3); - if (R2_GLOBALS._v565F5 < 4) { + if (R2_GLOBALS._foodCount < 4) { R2_GLOBALS._player.disableControl(); - _object5.postInit(); - _object5.setup(162, 2, 1); - _object5.setPosition(Common::Point(215, UI_INTERFACE_Y)); + _food.postInit(); + _food.setup(162, 2, 1); + _food.setPosition(Common::Point(215, UI_INTERFACE_Y)); + + ++R2_GLOBALS._foodCount; - ++R2_GLOBALS._v565F5; + _sceneMode = 128; + this->setAction(&_sequenceManager, this, 128, &_foodDispenser, &_food, NULL); } else { SceneItem::display2(126, 16); } diff --git a/engines/tsage/ringworld2/ringworld2_scenes0.h b/engines/tsage/ringworld2/ringworld2_scenes0.h index bc30743aca..50f244f689 100644 --- a/engines/tsage/ringworld2/ringworld2_scenes0.h +++ b/engines/tsage/ringworld2/ringworld2_scenes0.h @@ -102,7 +102,7 @@ public: class Scene125: public SceneExt { /* Objects */ - class Object5: public SceneActor { + class Food: public SceneActor { public: virtual bool startAction(CursorType action, Event &event); }; @@ -136,7 +136,7 @@ public: ASoundExt _sound1; NamedHotspot _background, _item2, _item3; DiskSlot _diskSlot; - SceneActor _object1, _object2, _object3, _object4, _object5, _object6, _infoDisk; + SceneActor _object1, _object2, _object3, _object4, _food, _foodDispenser, _infoDisk; Icon _icon1, _icon2, _icon3, _icon4, _icon5, _icon6; SequenceManager _sequenceManager; SceneText _sceneText; |