diff options
Diffstat (limited to 'engines/tsage/ringworld2')
-rw-r--r-- | engines/tsage/ringworld2/ringworld2_logic.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/engines/tsage/ringworld2/ringworld2_logic.cpp b/engines/tsage/ringworld2/ringworld2_logic.cpp index d0921a1eb3..6a390df611 100644 --- a/engines/tsage/ringworld2/ringworld2_logic.cpp +++ b/engines/tsage/ringworld2/ringworld2_logic.cpp @@ -175,6 +175,11 @@ void SceneExt::postInit(SceneObjectList *OwnerList) { // Exclude the bottom area of the screen to allow room for the UI T2_GLOBALS._interfaceY = UI_INTERFACE_Y; + + // Initialise fields + _action = NULL; + _field12 = 0; + _sceneMode = 0; } void SceneExt::remove() { @@ -209,6 +214,20 @@ void SceneExt::loadScene(int sceneNum) { _v51C34.top = 0; _v51C34.bottom = 300; + + int prevScene = R2_GLOBALS._sceneManager._previousScene; + int sceneNumber = R2_GLOBALS._sceneManager._sceneNumber; + + if (((prevScene == -1) && (sceneNumber != 180) && (sceneNumber != 205) && (sceneNumber != 50)) || + (sceneNumber == 50) || ((prevScene == 205) && (sceneNumber == 100)) || + ((prevScene == 180) && (sceneNumber == 100))) { + // TODO: sub_17875 + R2_GLOBALS._v58CE2 = 1; + R2_GLOBALS._uiElements.show(); + } else { + // Update the user interface + R2_GLOBALS._uiElements.updateInventory(); + } } bool SceneExt::display(CursorType action) { |