diff options
author | Strangerke | 2013-11-11 20:57:22 +0100 |
---|---|---|
committer | Strangerke | 2013-11-11 20:57:22 +0100 |
commit | 1abab591d91fb8be9723e5d99dd15cc25af6aee9 (patch) | |
tree | 39bb588ffbaf79d4851896f3a0d504984a937c24 /engines/tsage | |
parent | 917bf58b757a21b8797b052a4e15963e3047e81a (diff) | |
download | scummvm-rg350-1abab591d91fb8be9723e5d99dd15cc25af6aee9.tar.gz scummvm-rg350-1abab591d91fb8be9723e5d99dd15cc25af6aee9.tar.bz2 scummvm-rg350-1abab591d91fb8be9723e5d99dd15cc25af6aee9.zip |
TSAGE: R2R - Reduce the scope of scene variables in logic group 1
Diffstat (limited to 'engines/tsage')
-rw-r--r-- | engines/tsage/ringworld2/ringworld2_scenes1.cpp | 37 |
1 files changed, 19 insertions, 18 deletions
diff --git a/engines/tsage/ringworld2/ringworld2_scenes1.cpp b/engines/tsage/ringworld2/ringworld2_scenes1.cpp index 36d48ca27a..40eb2ef3c0 100644 --- a/engines/tsage/ringworld2/ringworld2_scenes1.cpp +++ b/engines/tsage/ringworld2/ringworld2_scenes1.cpp @@ -677,11 +677,11 @@ void Scene1100::synchronize(Serializer &s) { } bool Scene1100::Seeker::startAction(CursorType action, Event &event) { - Scene1100 *scene = (Scene1100 *)R2_GLOBALS._sceneManager._scene; - if (action != CURSOR_TALK) return SceneActor::startAction(action, event); + Scene1100 *scene = (Scene1100 *)R2_GLOBALS._sceneManager._scene; + if (R2_GLOBALS.getFlag(52)) { R2_GLOBALS._player.disableControl(); if (R2_GLOBALS._player._characterIndex == R2_QUINN) @@ -757,9 +757,9 @@ bool Scene1100::Trooper::startAction(CursorType action, Event &event) { } bool Scene1100::Chief::startAction(CursorType action, Event &event) { - Scene1100 *scene = (Scene1100 *)R2_GLOBALS._sceneManager._scene; - if ((action == CURSOR_TALK) && (!R2_GLOBALS.getFlag(54)) && (R2_GLOBALS.getFlag(52))) { + Scene1100 *scene = (Scene1100 *)R2_GLOBALS._sceneManager._scene; + scene->_nextStripNum = 0; R2_GLOBALS._player.disableControl(); scene->_sceneMode = 53; @@ -7450,10 +7450,11 @@ void Scene1550::DishControlsWindow::DishControl::synchronize(Serializer &s) { } bool Scene1550::DishControlsWindow::DishControl::startAction(CursorType action, Event &event) { - Scene1550 *scene = (Scene1550 *)R2_GLOBALS._sceneManager._scene; - if (action != CURSOR_USE) return SceneActor::startAction(action, event); + + Scene1550 *scene = (Scene1550 *)R2_GLOBALS._sceneManager._scene; + switch (_controlId) { case 1: // Button control @@ -9665,9 +9666,9 @@ void Scene1580::synchronize(Serializer &s) { } bool Scene1580::JoystickPlug::startAction(CursorType action, Event &event) { - Scene1580 *scene = (Scene1580 *)R2_GLOBALS._sceneManager._scene; - if (action == R2_JOYSTICK) { + Scene1580 *scene = (Scene1580 *)R2_GLOBALS._sceneManager._scene; + R2_INVENTORY.setObjectScene(R2_JOYSTICK, 1580); R2_GLOBALS._sceneItems.remove(&scene->_joystickPlug); scene->_joystick.postInit(); @@ -9684,9 +9685,9 @@ bool Scene1580::JoystickPlug::startAction(CursorType action, Event &event) { } bool Scene1580::ScreenSlot::startAction(CursorType action, Event &event) { - Scene1580 *scene = (Scene1580 *)R2_GLOBALS._sceneManager._scene; - if (action == R2_DIAGNOSTICS_DISPLAY) { + Scene1580 *scene = (Scene1580 *)R2_GLOBALS._sceneManager._scene; + R2_INVENTORY.setObjectScene(R2_DIAGNOSTICS_DISPLAY, 1580); R2_GLOBALS._player.disableControl(); R2_GLOBALS._sceneItems.remove(&scene->_screenSlot); @@ -11757,13 +11758,13 @@ bool Scene1850::Door::startAction(CursorType action, Event &event) { if (action != CURSOR_USE) return SceneHotspot::startAction(action, event); - Scene1850 *scene = (Scene1850 *)R2_GLOBALS._sceneManager._scene; - if (R2_GLOBALS.getFlag(32)) { SceneItem::display(3240, 4, 0, 280, 1, 160, 9, 1, 2, 20, 7, 7, LIST_END); return true; } + Scene1850 *scene = (Scene1850 *)R2_GLOBALS._sceneManager._scene; + R2_GLOBALS._player.disableControl(); if (scene->_sceneMode == 1851) R2_GLOBALS._player._effect = EFFECT_SHADED; @@ -12644,8 +12645,6 @@ void Scene1875::process(Event &event) { *--------------------------------------------------------------------------*/ bool Scene1900::LiftDoor::startAction(CursorType action, Event &event) { - Scene1900 *scene = (Scene1900 *)R2_GLOBALS._sceneManager._scene; - if (action != CURSOR_USE) return SceneActor::startAction(action, event); @@ -12656,6 +12655,8 @@ bool Scene1900::LiftDoor::startAction(CursorType action, Event &event) { return true; } + Scene1900 *scene = (Scene1900 *)R2_GLOBALS._sceneManager._scene; + R2_GLOBALS._player.enableControl(CURSOR_USE); if (_position.x >= 160) { @@ -12912,14 +12913,14 @@ void Scene1925::synchronize(Serializer &s) { } bool Scene1925::Button::startAction(CursorType action, Event &event) { - Scene1925 *scene = (Scene1925 *)R2_GLOBALS._sceneManager._scene; - if (action != CURSOR_USE) return SceneHotspot::startAction(action, event); if ((R2_GLOBALS._player._position.x == 110) && (R2_GLOBALS._player._position.y == 100)) return SceneHotspot::startAction(action, event); + Scene1925 *scene = (Scene1925 *)R2_GLOBALS._sceneManager._scene; + if ((R2_GLOBALS._player._position.x == 154) && (R2_GLOBALS._player._position.y == 20)) scene->_sceneMode = 1928; else if ((R2_GLOBALS._player._position.x == 154) && (R2_GLOBALS._player._position.y == 200)) @@ -13278,11 +13279,11 @@ bool Scene1945::Ice::startAction(CursorType action, Event &event) { } bool Scene1945::Ladder::startAction(CursorType action, Event &event) { - Scene1945 *scene = (Scene1945 *)R2_GLOBALS._sceneManager._scene; - if (action != CURSOR_USE) return SceneHotspot::startAction(action, event); + Scene1945 *scene = (Scene1945 *)R2_GLOBALS._sceneManager._scene; + R2_GLOBALS._player.disableControl(CURSOR_USE); scene->_sceneMode = 0; |