diff options
author | Paul Gilbert | 2011-10-22 22:41:05 +1100 |
---|---|---|
committer | Paul Gilbert | 2011-10-22 22:41:32 +1100 |
commit | 1c4bc2f567a7d31e0f716d5dfb8f57efb7875be1 (patch) | |
tree | 19b33fbe7a7335a56c00c934928c362af997a27a | |
parent | a30e629005576edc2455cb0c1d84cd5f34918a90 (diff) | |
download | scummvm-rg350-1c4bc2f567a7d31e0f716d5dfb8f57efb7875be1.tar.gz scummvm-rg350-1c4bc2f567a7d31e0f716d5dfb8f57efb7875be1.tar.bz2 scummvm-rg350-1c4bc2f567a7d31e0f716d5dfb8f57efb7875be1.zip |
TSAGE: Hooking up Return to Ringworld to display the user interface
-rw-r--r-- | engines/tsage/blue_force/blueforce_logic.cpp | 10 | ||||
-rw-r--r-- | engines/tsage/blue_force/blueforce_scenes1.cpp | 34 | ||||
-rw-r--r-- | engines/tsage/blue_force/blueforce_scenes2.cpp | 6 | ||||
-rw-r--r-- | engines/tsage/blue_force/blueforce_scenes3.cpp | 32 | ||||
-rw-r--r-- | engines/tsage/blue_force/blueforce_scenes4.cpp | 10 | ||||
-rw-r--r-- | engines/tsage/blue_force/blueforce_scenes5.cpp | 4 | ||||
-rw-r--r-- | engines/tsage/blue_force/blueforce_scenes8.cpp | 16 | ||||
-rw-r--r-- | engines/tsage/blue_force/blueforce_scenes9.cpp | 62 | ||||
-rw-r--r-- | engines/tsage/core.cpp | 25 | ||||
-rw-r--r-- | engines/tsage/globals.cpp | 18 | ||||
-rw-r--r-- | engines/tsage/globals.h | 8 | ||||
-rw-r--r-- | engines/tsage/ringworld2/ringworld2_logic.cpp | 4 | ||||
-rw-r--r-- | engines/tsage/tsage.cpp | 8 | ||||
-rw-r--r-- | engines/tsage/tsage.h | 2 | ||||
-rw-r--r-- | engines/tsage/user_interface.cpp | 31 | ||||
-rw-r--r-- | engines/tsage/user_interface.h | 2 |
16 files changed, 145 insertions, 127 deletions
diff --git a/engines/tsage/blue_force/blueforce_logic.cpp b/engines/tsage/blue_force/blueforce_logic.cpp index 70b0a5802f..130cf557b2 100644 --- a/engines/tsage/blue_force/blueforce_logic.cpp +++ b/engines/tsage/blue_force/blueforce_logic.cpp @@ -706,9 +706,9 @@ void SceneExt::postInit(SceneObjectList *OwnerList) { Scene::postInit(OwnerList); if (BF_GLOBALS._dayNumber) { // Blank out the bottom portion of the screen - BF_GLOBALS._interfaceY = BF_INTERFACE_Y; + BF_GLOBALS._interfaceY = UI_INTERFACE_Y; - Rect r(0, BF_INTERFACE_Y, SCREEN_WIDTH, SCREEN_HEIGHT); + Rect r(0, UI_INTERFACE_Y, SCREEN_WIDTH, SCREEN_HEIGHT); BF_GLOBALS.gfxManager().getSurface().fillRect(r, 0); } } @@ -1461,7 +1461,7 @@ void SceneMessage::draw() { GfxSurface &surface = BF_GLOBALS._screenSurface; // Clear the game area - surface.fillRect(Rect(0, 0, SCREEN_WIDTH, BF_INTERFACE_Y), 0); + surface.fillRect(Rect(0, 0, SCREEN_WIDTH, UI_INTERFACE_Y), 0); // Disable scene fade in BF_GLOBALS._paneRefreshFlag[0] = 0; @@ -1472,8 +1472,8 @@ void SceneMessage::draw() { BF_GLOBALS._scenePalette.setPalette(font._colors.foreground, 1); // Write out the message - Rect textRect(0, BF_INTERFACE_Y / 2 - (font.getHeight() / 2), SCREEN_WIDTH, - BF_INTERFACE_Y / 2 + (font.getHeight() / 2)); + Rect textRect(0, UI_INTERFACE_Y / 2 - (font.getHeight() / 2), SCREEN_WIDTH, + UI_INTERFACE_Y / 2 + (font.getHeight() / 2)); BF_GLOBALS._gfxManagerInstance._font.writeLines(_message.c_str(), textRect, ALIGN_CENTER); // TODO: Ideally, saving and loading should be disabled here until the message display is complete diff --git a/engines/tsage/blue_force/blueforce_scenes1.cpp b/engines/tsage/blue_force/blueforce_scenes1.cpp index b1123cba6b..e5e51400c6 100644 --- a/engines/tsage/blue_force/blueforce_scenes1.cpp +++ b/engines/tsage/blue_force/blueforce_scenes1.cpp @@ -992,7 +992,7 @@ bool Scene115::Object1::startAction(CursorType action, Event &event) { case CURSOR_LOOK: SceneItem::display(115, 8, SET_WIDTH, 312, SET_X, GLOBALS._sceneManager._scene->_sceneBounds.left + 4, - SET_Y, GLOBALS._sceneManager._scene->_sceneBounds.top + BF_INTERFACE_Y + 2, + SET_Y, GLOBALS._sceneManager._scene->_sceneBounds.top + UI_INTERFACE_Y + 2, SET_FONT, 4, SET_BG_COLOR, 1, SET_FG_COLOR, 19, SET_EXT_BGCOLOR, 9, SET_EXT_FGCOLOR, 13, LIST_END); return true; @@ -1030,7 +1030,7 @@ bool Scene115::Object1::startAction(CursorType action, Event &event) { } else SceneItem::display(115, 44, SET_WIDTH, 312, SET_X, GLOBALS._sceneManager._scene->_sceneBounds.left + 4, - SET_Y, GLOBALS._sceneManager._scene->_sceneBounds.top + BF_INTERFACE_Y + 2, + SET_Y, GLOBALS._sceneManager._scene->_sceneBounds.top + UI_INTERFACE_Y + 2, SET_FONT, 4, SET_BG_COLOR, 1, SET_FG_COLOR, 19, SET_EXT_BGCOLOR, 9, SET_EXT_FGCOLOR, 13, LIST_END); return true; @@ -1050,7 +1050,7 @@ bool Scene115::Object1::startAction(CursorType action, Event &event) { } else SceneItem::display(115, 44, SET_WIDTH, 312, SET_X, GLOBALS._sceneManager._scene->_sceneBounds.left + 4, - SET_Y, GLOBALS._sceneManager._scene->_sceneBounds.top + BF_INTERFACE_Y + 2, + SET_Y, GLOBALS._sceneManager._scene->_sceneBounds.top + UI_INTERFACE_Y + 2, SET_FONT, 4, SET_BG_COLOR, 1, SET_FG_COLOR, 19, SET_EXT_BGCOLOR, 9, SET_EXT_FGCOLOR, 13, LIST_END); return true; @@ -1066,7 +1066,7 @@ bool Scene115::Object2::startAction(CursorType action, Event &event) { case CURSOR_LOOK: SceneItem::display(115, 7, SET_WIDTH, 312, SET_X, GLOBALS._sceneManager._scene->_sceneBounds.left + 4, - SET_Y, GLOBALS._sceneManager._scene->_sceneBounds.top + BF_INTERFACE_Y + 2, + SET_Y, GLOBALS._sceneManager._scene->_sceneBounds.top + UI_INTERFACE_Y + 2, SET_FONT, 4, SET_BG_COLOR, 1, SET_FG_COLOR, 19, SET_EXT_BGCOLOR, 9, SET_EXT_FGCOLOR, 13, LIST_END); return true; @@ -1169,14 +1169,14 @@ bool Scene115::Object3::startAction(CursorType action, Event &event) { case CURSOR_LOOK: SceneItem::display(115, 9, SET_WIDTH, 312, SET_X, GLOBALS._sceneManager._scene->_sceneBounds.left + 4, - SET_Y, GLOBALS._sceneManager._scene->_sceneBounds.top + BF_INTERFACE_Y + 2, + SET_Y, GLOBALS._sceneManager._scene->_sceneBounds.top + UI_INTERFACE_Y + 2, SET_FONT, 4, SET_BG_COLOR, 1, SET_FG_COLOR, 19, SET_EXT_BGCOLOR, 9, SET_EXT_FGCOLOR, 13, LIST_END); return true; case CURSOR_USE: SceneItem::display(115, 23, SET_WIDTH, 312, SET_X, GLOBALS._sceneManager._scene->_sceneBounds.left + 4, - SET_Y, GLOBALS._sceneManager._scene->_sceneBounds.top + BF_INTERFACE_Y + 2, + SET_Y, GLOBALS._sceneManager._scene->_sceneBounds.top + UI_INTERFACE_Y + 2, SET_FONT, 4, SET_BG_COLOR, 1, SET_FG_COLOR, 19, SET_EXT_BGCOLOR, 9, SET_EXT_FGCOLOR, 13, LIST_END); return true; @@ -1200,7 +1200,7 @@ bool Scene115::Object4::startAction(CursorType action, Event &event) { case CURSOR_LOOK: SceneItem::display(115, 42, SET_WIDTH, 312, SET_X, GLOBALS._sceneManager._scene->_sceneBounds.left + 4, - SET_Y, GLOBALS._sceneManager._scene->_sceneBounds.top + BF_INTERFACE_Y + 2, + SET_Y, GLOBALS._sceneManager._scene->_sceneBounds.top + UI_INTERFACE_Y + 2, SET_FONT, 4, SET_BG_COLOR, 1, SET_FG_COLOR, 19, SET_EXT_BGCOLOR, 9, SET_EXT_FGCOLOR, 13, LIST_END); return true; @@ -1238,7 +1238,7 @@ bool Scene115::Item1::startAction(CursorType action, Event &event) { } else SceneItem::display(_resNum, 37, SET_WIDTH, 312, SET_X, GLOBALS._sceneManager._scene->_sceneBounds.left + 4, - SET_Y, GLOBALS._sceneManager._scene->_sceneBounds.top + BF_INTERFACE_Y + 2, + SET_Y, GLOBALS._sceneManager._scene->_sceneBounds.top + UI_INTERFACE_Y + 2, SET_FONT, 4, SET_BG_COLOR, 1, SET_FG_COLOR, 19, SET_EXT_BGCOLOR, 9, SET_EXT_FGCOLOR, 13, LIST_END); return true; @@ -1286,7 +1286,7 @@ bool Scene115::Item14::startAction(CursorType action, Event &event) { case CURSOR_LOOK: SceneItem::display(115, 10, SET_WIDTH, 312, SET_X, GLOBALS._sceneManager._scene->_sceneBounds.left + 4, - SET_Y, GLOBALS._sceneManager._scene->_sceneBounds.top + BF_INTERFACE_Y + 2, + SET_Y, GLOBALS._sceneManager._scene->_sceneBounds.top + UI_INTERFACE_Y + 2, SET_FONT, 4, SET_BG_COLOR, 1, SET_FG_COLOR, 19, SET_EXT_BGCOLOR, 9, SET_EXT_FGCOLOR, 13, LIST_END); return true; @@ -1294,13 +1294,13 @@ bool Scene115::Item14::startAction(CursorType action, Event &event) { if (BF_GLOBALS._sceneObjects->contains(&scene->_object3)) SceneItem::display(115, 23, SET_WIDTH, 312, SET_X, GLOBALS._sceneManager._scene->_sceneBounds.left + 4, - SET_Y, GLOBALS._sceneManager._scene->_sceneBounds.top + BF_INTERFACE_Y + 2, + SET_Y, GLOBALS._sceneManager._scene->_sceneBounds.top + UI_INTERFACE_Y + 2, SET_FONT, 4, SET_BG_COLOR, 1, SET_FG_COLOR, 19, SET_EXT_BGCOLOR, 9, SET_EXT_FGCOLOR, 13, LIST_END); else SceneItem::display(115, 43, SET_WIDTH, 312, SET_X, GLOBALS._sceneManager._scene->_sceneBounds.left + 4, - SET_Y, GLOBALS._sceneManager._scene->_sceneBounds.top + BF_INTERFACE_Y + 2, + SET_Y, GLOBALS._sceneManager._scene->_sceneBounds.top + UI_INTERFACE_Y + 2, SET_FONT, 4, SET_BG_COLOR, 1, SET_FG_COLOR, 19, SET_EXT_BGCOLOR, 9, SET_EXT_FGCOLOR, 13, LIST_END); return true; @@ -1416,7 +1416,7 @@ void Scene115::Action4::signal() { BF_GLOBALS._player.setStrip(4); SceneItem::display(115, 27, SET_WIDTH, 312, SET_X, GLOBALS._sceneManager._scene->_sceneBounds.left + 4, - SET_Y, GLOBALS._sceneManager._scene->_sceneBounds.top + BF_INTERFACE_Y + 2, + SET_Y, GLOBALS._sceneManager._scene->_sceneBounds.top + UI_INTERFACE_Y + 2, SET_FONT, 4, SET_BG_COLOR, 1, SET_FG_COLOR, 19, SET_EXT_BGCOLOR, 9, SET_EXT_FGCOLOR, 13, LIST_END); scene->_object12.animate(ANIM_MODE_NONE); @@ -1743,7 +1743,7 @@ void Scene115::signal() { BF_GLOBALS._player.updateAngle(_object3._position); SceneItem::display(115, 38 + _field168A, SET_WIDTH, 312, SET_X, GLOBALS._sceneManager._scene->_sceneBounds.left + 4, - SET_Y, GLOBALS._sceneManager._scene->_sceneBounds.top + BF_INTERFACE_Y + 2, + SET_Y, GLOBALS._sceneManager._scene->_sceneBounds.top + UI_INTERFACE_Y + 2, SET_FONT, 4, SET_BG_COLOR, 1, SET_FG_COLOR, 19, SET_EXT_BGCOLOR, 9, SET_EXT_FGCOLOR, 13, LIST_END); _field168A++; @@ -2919,7 +2919,7 @@ void Scene180::postInit(SceneObjectList *OwnerList) { _house.setDetails(5, 180, 24, 25, 26, 1); _steps.setDetails(7, 180, 6, 7, 8, 1); _curb.setDetails(2, 180, 3, 4, 5, 1); - _sky.setDetails(Rect(0, 0, SCREEN_WIDTH, BF_INTERFACE_Y), 180, 0, 1, 2, 1, NULL); + _sky.setDetails(Rect(0, 0, SCREEN_WIDTH, UI_INTERFACE_Y), 180, 0, 1, 2, 1, NULL); } } @@ -3053,7 +3053,7 @@ void Scene180::signal() { void Scene180::process(Event &event) { SceneExt::process(event); - if (BF_GLOBALS._player._enabled && !_focusObject && (event.mousePos.y < (BF_INTERFACE_Y - 1))) { + if (BF_GLOBALS._player._enabled && !_focusObject && (event.mousePos.y < (UI_INTERFACE_Y - 1))) { if (_vechile.contains(event.mousePos)) { CursorType cursorId = BF_GLOBALS._events.getCursor(); BF_GLOBALS._events.setCursor(cursorId); @@ -3321,7 +3321,7 @@ void Scene190::postInit(SceneObjectList *OwnerList) { _item6.setDetails(4, 190, 2, 10, 13, 1); _item5.setDetails(3, 190, 3, 10, 14, 1); _item9.setDetails(Rect(0, 0, 89, 68), 190, 6, 10, 17, 1, NULL); - _item10.setDetails(Rect(0, 0, SCREEN_WIDTH, BF_INTERFACE_Y), 190, 23, -1, -1, 1, NULL); + _item10.setDetails(Rect(0, 0, SCREEN_WIDTH, UI_INTERFACE_Y), 190, 23, -1, -1, 1, NULL); } void Scene190::signal() { @@ -3357,7 +3357,7 @@ void Scene190::signal() { void Scene190::process(Event &event) { SceneExt::process(event); - if (BF_GLOBALS._player._enabled && !_focusObject && (event.mousePos.y < (BF_INTERFACE_Y - 1))) { + if (BF_GLOBALS._player._enabled && !_focusObject && (event.mousePos.y < (UI_INTERFACE_Y - 1))) { // Check if the cursor is on an exit if (_exit.contains(event.mousePos)) { GfxSurface surface = _cursorVisage.getFrame(3); diff --git a/engines/tsage/blue_force/blueforce_scenes2.cpp b/engines/tsage/blue_force/blueforce_scenes2.cpp index 8dbbe7ca24..3af02bd463 100644 --- a/engines/tsage/blue_force/blueforce_scenes2.cpp +++ b/engines/tsage/blue_force/blueforce_scenes2.cpp @@ -1182,7 +1182,7 @@ void Scene270::process(Event &event) { SceneExt::process(event); - if (BF_GLOBALS._player._enabled && !_focusObject && (event.mousePos.y < (BF_INTERFACE_Y - 1)) && + if (BF_GLOBALS._player._enabled && !_focusObject && (event.mousePos.y < (UI_INTERFACE_Y - 1)) && !_field384 && !_field386) { // Check if the cursor is on an exit if (_exit.contains(event.mousePos)) { @@ -1432,7 +1432,7 @@ void Scene271::postInit(SceneObjectList *OwnerList) { _item6.setDetails(Rect(278, 50, 318, 72), 270, 21, 22, 23, 1, NULL); _item2.setDetails(3, 270, 24, 25, 26, 1); _item4.setDetails(2, 270, 30, 31, 32, 1); - _item11.setDetails(Rect(0, 0, SCREEN_WIDTH, BF_INTERFACE_Y), 270, 0, 1, 2, 1, NULL); + _item11.setDetails(Rect(0, 0, SCREEN_WIDTH, UI_INTERFACE_Y), 270, 0, 1, 2, 1, NULL); BF_GLOBALS._player.postInit(); BF_GLOBALS._player._moveDiff.x = 8; @@ -1685,7 +1685,7 @@ void Scene271::process(Event &event) { SceneExt::process(event); - if (BF_GLOBALS._player._enabled && !_focusObject && (event.mousePos.y < BF_INTERFACE_Y)) { + if (BF_GLOBALS._player._enabled && !_focusObject && (event.mousePos.y < UI_INTERFACE_Y)) { if (_exit.contains(event.mousePos)) { GfxSurface cursor = _cursorVisage.getFrame(EXITFRAME_E); BF_GLOBALS._events.setCursor(cursor); diff --git a/engines/tsage/blue_force/blueforce_scenes3.cpp b/engines/tsage/blue_force/blueforce_scenes3.cpp index d04f1256cb..1fa27ccb27 100644 --- a/engines/tsage/blue_force/blueforce_scenes3.cpp +++ b/engines/tsage/blue_force/blueforce_scenes3.cpp @@ -348,13 +348,13 @@ void Scene300::postInit(SceneObjectList *OwnerList) { _item13.setDetails(3, 300, 25, 26, 27, 1); _item2.setDetails(Rect(266, 54, 272, 59), 300, -1, -1, -1, 1, NULL); _item1.setDetails(Rect(262, 47, 299, 76), 300, 1, 13, -1, 1, NULL); - _item4.setDetails(Rect(0, 85, SCREEN_WIDTH - 1, BF_INTERFACE_Y - 1), 300, 6, 13, 15, 1, NULL); + _item4.setDetails(Rect(0, 85, SCREEN_WIDTH - 1, UI_INTERFACE_Y - 1), 300, 6, 13, 15, 1, NULL); _item7.setDetails(Rect(219, 46, 251, 74), 300, 22, 23, 24, 1, NULL); _item8.setDetails(Rect(301, 53, 319, 78), 300, 22, 23, 24, 1, NULL); _item5.setDetails(Rect(179, 44, 200, 55), 300, 8, 13, 17, 1, NULL); _item6.setDetails(Rect(210, 46, 231, 55), 300, 8, 13, 17, 1, NULL); _item3.setDetails(Rect(160, 0, SCREEN_WIDTH - 1, 75), 300, 4, 13, 14, 1, NULL); - _item9.setDetails(Rect(0, 0, SCREEN_WIDTH, BF_INTERFACE_Y), 300, 29, 30, 31, 1, NULL); + _item9.setDetails(Rect(0, 0, SCREEN_WIDTH, UI_INTERFACE_Y), 300, 29, 30, 31, 1, NULL); } void Scene300::signal() { @@ -523,7 +523,7 @@ void Scene300::signal() { void Scene300::process(Event &event) { SceneExt::process(event); - if (BF_GLOBALS._player._enabled && !_focusObject && (event.mousePos.y < (BF_INTERFACE_Y - 1))) { + if (BF_GLOBALS._player._enabled && !_focusObject && (event.mousePos.y < (UI_INTERFACE_Y - 1))) { // Check if the cursor is on an exit if (_item14.contains(event.mousePos)) { GfxSurface surface = _cursorVisage.getFrame(EXITFRAME_NE); @@ -1296,7 +1296,7 @@ void Scene315::signal() { void Scene315::process(Event &event) { SceneExt::process(event); - if (BF_GLOBALS._player._enabled && !_focusObject && (event.mousePos.y < (BF_INTERFACE_Y - 1))) { + if (BF_GLOBALS._player._enabled && !_focusObject && (event.mousePos.y < (UI_INTERFACE_Y - 1))) { // Check if the cursor is on an exit if (_swExit.contains(event.mousePos)) { GfxSurface surface = _cursorVisage.getFrame(EXITFRAME_SW); @@ -2095,7 +2095,7 @@ void Scene340::postInit(SceneObjectList *OwnerList) { _item3.setDetails(7, 340, 3, 9, 12, 1); _item2.setDetails(Rect(0, 0, SCREEN_WIDTH - 1, 39), 340, 2, 8, 11, 1, NULL); - _item1.setDetails(Rect(0, 0, SCREEN_WIDTH - 1, BF_INTERFACE_Y), 340, 1, 7, 10, 1, NULL); + _item1.setDetails(Rect(0, 0, SCREEN_WIDTH - 1, UI_INTERFACE_Y), 340, 1, 7, 10, 1, NULL); BF_GLOBALS._player.disableControl(); _sceneMode = 0; @@ -2140,7 +2140,7 @@ void Scene340::process(Event &event) { if (!event.handled) { SceneExt::process(event); - if (BF_GLOBALS._player._enabled && !_focusObject && (event.mousePos.y < (BF_INTERFACE_Y - 1))) { + if (BF_GLOBALS._player._enabled && !_focusObject && (event.mousePos.y < (UI_INTERFACE_Y - 1))) { // Check if the cursor is on an exit if (_westExit.contains(event.mousePos)) { GfxSurface surface = _cursorVisage.getFrame(EXITFRAME_W); @@ -2396,7 +2396,7 @@ void Scene342::postInit(SceneObjectList *OwnerList) { _item3.setDetails(7, 340, 3, 9, 12, 1); _item2.setDetails(Rect(0, 0, SCREEN_WIDTH - 1, 39), 340, 2, 8, 11, 1, NULL); - _item1.setDetails(Rect(0, 0, SCREEN_WIDTH - 1, BF_INTERFACE_Y), 340, 1, 7, 10, 1, NULL); + _item1.setDetails(Rect(0, 0, SCREEN_WIDTH - 1, UI_INTERFACE_Y), 340, 1, 7, 10, 1, NULL); } void Scene342::remove() { @@ -2437,7 +2437,7 @@ void Scene342::process(Event &event) { if (!event.handled) { SceneExt::process(event); - if (BF_GLOBALS._player._enabled && !_focusObject && (event.mousePos.y < (BF_INTERFACE_Y - 1))) { + if (BF_GLOBALS._player._enabled && !_focusObject && (event.mousePos.y < (UI_INTERFACE_Y - 1))) { // Check if the cursor is on an exit if (_westExit.contains(event.mousePos)) { GfxSurface surface = _cursorVisage.getFrame(EXITFRAME_W); @@ -2638,7 +2638,7 @@ void Scene350::postInit(SceneObjectList *OwnerList) { BF_GLOBALS._player._moveDiff = Common::Point(3, 1); _yacht._flag = false; - _swExit.setDetails(Rect(0, 160, SCREEN_WIDTH, BF_INTERFACE_Y - 1), 350, -1, -1, -1, 1, NULL); + _swExit.setDetails(Rect(0, 160, SCREEN_WIDTH, UI_INTERFACE_Y - 1), 350, -1, -1, -1, 1, NULL); if ((BF_GLOBALS._dayNumber != 1) && (BF_GLOBALS._dayNumber != 4)) { _yacht.setDetails(28, 350, 15, 16, 17, 1); @@ -2679,7 +2679,7 @@ void Scene350::postInit(SceneObjectList *OwnerList) { _item3.setDetails(7, 350, 23, 24, 25, 1); _item2.setDetails(Rect(0, 0, SCREEN_WIDTH - 1, 31), 350, 3, 4, 5, 1, NULL); - _item1.setDetails(Rect(0, 0, SCREEN_WIDTH - 1, BF_INTERFACE_Y), 350, 0, 1, 2, 1, NULL); + _item1.setDetails(Rect(0, 0, SCREEN_WIDTH - 1, UI_INTERFACE_Y), 350, 0, 1, 2, 1, NULL); switch (BF_GLOBALS._sceneManager._previousScene) { case 370: @@ -2795,7 +2795,7 @@ void Scene350::process(Event &event) { if (!event.handled) { SceneExt::process(event); - if (BF_GLOBALS._player._enabled && !_focusObject && (event.mousePos.y < (BF_INTERFACE_Y - 1))) { + if (BF_GLOBALS._player._enabled && !_focusObject && (event.mousePos.y < (UI_INTERFACE_Y - 1))) { // Check if the cursor is on an exit if (_swExit.contains(event.mousePos)) { GfxSurface surface = _cursorVisage.getFrame(EXITFRAME_SW); @@ -4002,7 +4002,7 @@ void Scene355::signal() { void Scene355::process(Event &event) { if (BF_GLOBALS._dayNumber != 5) { // Handling for earlier days - if (BF_GLOBALS._player._enabled && !_focusObject && (event.mousePos.y < (BF_INTERFACE_Y - 1))) { + if (BF_GLOBALS._player._enabled && !_focusObject && (event.mousePos.y < (UI_INTERFACE_Y - 1))) { // Check if the cursor is on an exit if (_rentalExit.contains(event.mousePos)) { GfxSurface surface = _cursorVisage.getFrame(EXITFRAME_NW); @@ -4035,7 +4035,7 @@ void Scene355::process(Event &event) { } } else { // Day 5 handling - if (BF_GLOBALS._player._enabled && !_focusObject && (event.mousePos.y < (BF_INTERFACE_Y - 1))) { + if (BF_GLOBALS._player._enabled && !_focusObject && (event.mousePos.y < (UI_INTERFACE_Y - 1))) { // Check if the cursor is on the exit to the rental boat if (_rentalExit.contains(event.mousePos)) { GfxSurface surface = _cursorVisage.getFrame(!_modeFlag ? EXITFRAME_SW : EXITFRAME_NE); @@ -4437,7 +4437,7 @@ void Scene360::postInit(SceneObjectList *OwnerList) { BF_GLOBALS._sceneItems.push_back(&_barometer); _item3._sceneRegionId = 10; BF_GLOBALS._sceneItems.push_back(&_item3); - _item1.setBounds(Rect(0, 0, SCREEN_WIDTH, BF_INTERFACE_Y)); + _item1.setBounds(Rect(0, 0, SCREEN_WIDTH, UI_INTERFACE_Y)); BF_GLOBALS._sceneItems.push_back(&_item1); } @@ -5022,7 +5022,7 @@ void Scene370::signal() { void Scene370::process(Event &event) { SceneExt::process(event); - if (BF_GLOBALS._player._enabled && !_focusObject && (event.mousePos.y < (BF_INTERFACE_Y - 1))) { + if (BF_GLOBALS._player._enabled && !_focusObject && (event.mousePos.y < (UI_INTERFACE_Y - 1))) { // Check if the cursor is on an exit if (_exit.contains(event.mousePos)) { GfxSurface surface = _cursorVisage.getFrame(EXITFRAME_E); @@ -5484,7 +5484,7 @@ void Scene385::signal() { void Scene385::process(Event &event) { SceneExt::process(event); - if (BF_GLOBALS._player._enabled && !_focusObject && (event.mousePos.y < (BF_INTERFACE_Y - 1))) { + if (BF_GLOBALS._player._enabled && !_focusObject && (event.mousePos.y < (UI_INTERFACE_Y - 1))) { // Check if the cursor is on an exit if (_exit.contains(event.mousePos)) { GfxSurface surface = _cursorVisage.getFrame(EXITFRAME_SW); diff --git a/engines/tsage/blue_force/blueforce_scenes4.cpp b/engines/tsage/blue_force/blueforce_scenes4.cpp index 6ed4e8af02..814a2fff7f 100644 --- a/engines/tsage/blue_force/blueforce_scenes4.cpp +++ b/engines/tsage/blue_force/blueforce_scenes4.cpp @@ -90,7 +90,7 @@ void Scene410::Action2::signal() { default: SceneItem::display(410, 11, SET_WIDTH, 300, SET_X, GLOBALS._sceneManager._scene->_sceneBounds.left + 10, - SET_Y, GLOBALS._sceneManager._scene->_sceneBounds.top + BF_INTERFACE_Y + 2, + SET_Y, GLOBALS._sceneManager._scene->_sceneBounds.top + UI_INTERFACE_Y + 2, SET_FONT, 4, SET_BG_COLOR, 1, SET_FG_COLOR, 13, SET_EXT_BGCOLOR, 82, SET_EXT_FGCOLOR, 13, LIST_END); BF_GLOBALS._player.enableControl(); @@ -675,7 +675,7 @@ void Scene410::postInit(SceneObjectList *OwnerList) { signal(); - _background.setDetails(Rect(0, 0, SCREEN_WIDTH, BF_INTERFACE_Y), 410, 0, 1, 2, 1, NULL); + _background.setDetails(Rect(0, 0, SCREEN_WIDTH, UI_INTERFACE_Y), 410, 0, 1, 2, 1, NULL); } void Scene410::signal() { @@ -1070,7 +1070,7 @@ void Scene415::postInit(SceneObjectList *OwnerList) { _dashboard.setDetails(20, 415, 11, 12, 19, 1); _steeringWheel.setDetails(15, 415, 5, 6, 7, 1); _horn.setDetails(31, 415, 8, 9, 10, 1); - _item1.setDetails(Rect(0, 0, SCREEN_WIDTH, BF_INTERFACE_Y), 415, 0, 1, 2, 1, NULL); + _item1.setDetails(Rect(0, 0, SCREEN_WIDTH, UI_INTERFACE_Y), 415, 0, 1, 2, 1, NULL); BF_GLOBALS._player.enableControl(); BF_GLOBALS._player._canWalk = false; @@ -1299,7 +1299,7 @@ void Scene440::postInit(SceneObjectList *OwnerList) { BF_GLOBALS._player.enableControl(); } - _item1.setBounds(Rect(0, 0, SCREEN_WIDTH, BF_INTERFACE_Y - 1)); + _item1.setBounds(Rect(0, 0, SCREEN_WIDTH, UI_INTERFACE_Y - 1)); BF_GLOBALS._sceneItems.push_back(&_item1); } @@ -1656,7 +1656,7 @@ void Scene450::signal() { void Scene450::process(Event &event) { SceneExt::process(event); - if (BF_GLOBALS._player._enabled && !_focusObject && (event.mousePos.y < (BF_INTERFACE_Y - 1))) { + if (BF_GLOBALS._player._enabled && !_focusObject && (event.mousePos.y < (UI_INTERFACE_Y - 1))) { // Check if the cursor is on an exit if (_exit.contains(event.mousePos)) { GfxSurface surface = _cursorVisage.getFrame(EXITFRAME_SW); diff --git a/engines/tsage/blue_force/blueforce_scenes5.cpp b/engines/tsage/blue_force/blueforce_scenes5.cpp index 7d11e782a5..500cad60b1 100644 --- a/engines/tsage/blue_force/blueforce_scenes5.cpp +++ b/engines/tsage/blue_force/blueforce_scenes5.cpp @@ -1228,7 +1228,7 @@ void Scene560::SafeInset::process(Event &event) { GfxSurface cursor = _cursorVisage.getFrame(7); BF_GLOBALS._events.setCursor(cursor); - if ((event.mousePos.y < BF_INTERFACE_Y) && (event.eventType == EVENT_BUTTON_DOWN)) { + if ((event.mousePos.y < UI_INTERFACE_Y) && (event.eventType == EVENT_BUTTON_DOWN)) { // Leave the safe view event.handled = true; remove(); @@ -2529,7 +2529,7 @@ void Scene590::signal() { void Scene590::process(Event &event) { SceneExt::process(event); - if (BF_GLOBALS._player._enabled && !_focusObject && (event.mousePos.y < (BF_INTERFACE_Y - 1))) { + if (BF_GLOBALS._player._enabled && !_focusObject && (event.mousePos.y < (UI_INTERFACE_Y - 1))) { // Check if the cursor is on an exit if (_exit.contains(event.mousePos)) { GfxSurface surface = _cursorVisage.getFrame(EXITFRAME_SW); diff --git a/engines/tsage/blue_force/blueforce_scenes8.cpp b/engines/tsage/blue_force/blueforce_scenes8.cpp index fd5eb068e0..c81f3b8d65 100644 --- a/engines/tsage/blue_force/blueforce_scenes8.cpp +++ b/engines/tsage/blue_force/blueforce_scenes8.cpp @@ -1111,7 +1111,7 @@ void Scene810::postInit(SceneObjectList *OwnerList) { BF_GLOBALS._sceneItems.addItems(&_microficheReader, &_map, &_window, &_bookcase, &_garbageCan, &_fileCabinets, &_coffeeMaker, &_shelves, &_background, NULL); - _background.setBounds(Rect(0, 0, SCREEN_WIDTH, BF_INTERFACE_Y)); + _background.setBounds(Rect(0, 0, SCREEN_WIDTH, UI_INTERFACE_Y)); } void Scene810::signal() { @@ -1241,7 +1241,7 @@ void Scene810::signal() { } void Scene810::process(Event &event) { - if (BF_GLOBALS._player._enabled && !_focusObject && (event.mousePos.y < (BF_INTERFACE_Y - 1))) { + if (BF_GLOBALS._player._enabled && !_focusObject && (event.mousePos.y < (UI_INTERFACE_Y - 1))) { // Check if the cursor is on an exit if (_exit.contains(event.mousePos)) { GfxSurface surface = _cursorVisage.getFrame(EXITFRAME_E); @@ -1472,7 +1472,7 @@ void Scene820::postInit(SceneObjectList *OwnerList) { BF_GLOBALS._player.enableControl(); BF_GLOBALS._player._canWalk = false; - _item1.setDetails(Rect(0, 0, SCREEN_WIDTH, BF_INTERFACE_Y), 820, -1, -1, -1, 1, NULL); + _item1.setDetails(Rect(0, 0, SCREEN_WIDTH, UI_INTERFACE_Y), 820, -1, -1, -1, 1, NULL); } void Scene820::signal() { @@ -1882,7 +1882,7 @@ void Scene830::process(Event &event) { SceneExt::process(event); - if (BF_GLOBALS._player._enabled && (event.mousePos.y < (BF_INTERFACE_Y - 1))) { + if (BF_GLOBALS._player._enabled && (event.mousePos.y < (UI_INTERFACE_Y - 1))) { // Check if the cursor is on an exit if (_seExit.contains(event.mousePos)) { GfxSurface surface = _cursorVisage.getFrame(EXITFRAME_SE); @@ -2274,7 +2274,7 @@ void Scene840::postInit(SceneObjectList *OwnerList) { _item16.setDetails(4, 840, 44, 45, 46, 1); _item17.setDetails(5, 840, 26, 27, 28, 1); _item12.setDetails(7, 840, 35, 36, 37, 1); - _item13.setDetails(Rect(0, 0, SCREEN_WIDTH - 1, BF_INTERFACE_Y), 840, 41, 42, 43, 1, NULL); + _item13.setDetails(Rect(0, 0, SCREEN_WIDTH - 1, UI_INTERFACE_Y), 840, 41, 42, 43, 1, NULL); if (BF_INVENTORY.getObjectScene(INV_RENTAL_KEYS) == 1) { _boatKeys.postInit(); @@ -2494,7 +2494,7 @@ void Scene840::signal() { void Scene840::process(Event &event) { SceneExt::process(event); - if (BF_GLOBALS._player._enabled && !_focusObject && (event.mousePos.y < (BF_INTERFACE_Y - 1))) { + if (BF_GLOBALS._player._enabled && !_focusObject && (event.mousePos.y < (UI_INTERFACE_Y - 1))) { if (_exit.contains(event.mousePos)) { GfxSurface surface = _cursorVisage.getFrame(EXITFRAME_E); BF_GLOBALS._events.setCursor(surface); @@ -3174,7 +3174,7 @@ void Scene870::signal() { void Scene870::process(Event &event) { SceneExt::process(event); - if (!event.handled && BF_GLOBALS._player._enabled && !_focusObject && (event.mousePos.y < (BF_INTERFACE_Y - 1))) { + if (!event.handled && BF_GLOBALS._player._enabled && !_focusObject && (event.mousePos.y < (UI_INTERFACE_Y - 1))) { // Check if the cursor is on an exit if (_exit.contains(event.mousePos)) { GfxSurface surface = _cursorVisage.getFrame(EXITFRAME_E); @@ -3503,7 +3503,7 @@ void Scene880::signal() { } void Scene880::process(Event &event) { - if (BF_GLOBALS._player._enabled && !_focusObject && (event.mousePos.y < (BF_INTERFACE_Y - 1))) { + if (BF_GLOBALS._player._enabled && !_focusObject && (event.mousePos.y < (UI_INTERFACE_Y - 1))) { // Check if the cursor is on an exit if (_northExit.contains(event.mousePos)) { GfxSurface surface = _cursorVisage.getFrame(EXITFRAME_N); diff --git a/engines/tsage/blue_force/blueforce_scenes9.cpp b/engines/tsage/blue_force/blueforce_scenes9.cpp index 74fd1214a1..545edb91d6 100644 --- a/engines/tsage/blue_force/blueforce_scenes9.cpp +++ b/engines/tsage/blue_force/blueforce_scenes9.cpp @@ -689,7 +689,7 @@ void Scene900::signal() { void Scene900::process(Event &event) { SceneExt::process(event); - if (BF_GLOBALS._player._enabled && !_focusObject && (event.mousePos.y < (BF_INTERFACE_Y - 1))) { + if (BF_GLOBALS._player._enabled && !_focusObject && (event.mousePos.y < (UI_INTERFACE_Y - 1))) { if (_item4.contains(event.mousePos)) { GfxSurface surface = _cursorVisage.getFrame(EXITFRAME_W); BF_GLOBALS._events.setCursor(surface); @@ -862,7 +862,7 @@ bool Scene910::Nico::startAction(CursorType action, Event &event) { } else { SceneItem::display(910, 90, SET_WIDTH, 312, SET_X, GLOBALS._sceneManager._scene->_sceneBounds.left + 4, - SET_Y, GLOBALS._sceneManager._scene->_sceneBounds.top + BF_INTERFACE_Y + 2, + SET_Y, GLOBALS._sceneManager._scene->_sceneBounds.top + UI_INTERFACE_Y + 2, SET_FONT, 4, SET_BG_COLOR, 1, SET_FG_COLOR, 19, SET_EXT_BGCOLOR, 9, SET_EXT_FGCOLOR, 13, LIST_END); return true; @@ -907,7 +907,7 @@ bool Scene910::Nico::startAction(CursorType action, Event &event) { } else { SceneItem::display(910, 95, SET_WIDTH, 312, SET_X, GLOBALS._sceneManager._scene->_sceneBounds.left + 4, - SET_Y, GLOBALS._sceneManager._scene->_sceneBounds.top + BF_INTERFACE_Y + 2, + SET_Y, GLOBALS._sceneManager._scene->_sceneBounds.top + UI_INTERFACE_Y + 2, SET_FONT, 4, SET_BG_COLOR, 1, SET_FG_COLOR, 19, SET_EXT_BGCOLOR, 9, SET_EXT_FGCOLOR, 13, LIST_END); @@ -918,13 +918,13 @@ bool Scene910::Nico::startAction(CursorType action, Event &event) { if (BF_GLOBALS._v4CECC == 1) SceneItem::display(910, 84, SET_WIDTH, 312, SET_X, GLOBALS._sceneManager._scene->_sceneBounds.left + 4, - SET_Y, GLOBALS._sceneManager._scene->_sceneBounds.top + BF_INTERFACE_Y + 2, + SET_Y, GLOBALS._sceneManager._scene->_sceneBounds.top + UI_INTERFACE_Y + 2, SET_FONT, 4, SET_BG_COLOR, 1, SET_FG_COLOR, 19, SET_EXT_BGCOLOR, 9, SET_EXT_FGCOLOR, 13, LIST_END); else SceneItem::display(910, 82, SET_WIDTH, 312, SET_X, GLOBALS._sceneManager._scene->_sceneBounds.left + 4, - SET_Y, GLOBALS._sceneManager._scene->_sceneBounds.top + BF_INTERFACE_Y + 2, + SET_Y, GLOBALS._sceneManager._scene->_sceneBounds.top + UI_INTERFACE_Y + 2, SET_FONT, 4, SET_BG_COLOR, 1, SET_FG_COLOR, 19, SET_EXT_BGCOLOR, 9, SET_EXT_FGCOLOR, 13, LIST_END); return true; @@ -933,7 +933,7 @@ bool Scene910::Nico::startAction(CursorType action, Event &event) { case 61: SceneItem::display(910, 83, SET_WIDTH, 312, SET_X, GLOBALS._sceneManager._scene->_sceneBounds.left + 4, - SET_Y, GLOBALS._sceneManager._scene->_sceneBounds.top + BF_INTERFACE_Y + 2, + SET_Y, GLOBALS._sceneManager._scene->_sceneBounds.top + UI_INTERFACE_Y + 2, SET_FONT, 4, SET_BG_COLOR, 1, SET_FG_COLOR, 19, SET_EXT_BGCOLOR, 9, SET_EXT_FGCOLOR, 13, LIST_END); return true; @@ -987,7 +987,7 @@ bool Scene910::Stuart::startAction(CursorType action, Event &event) { if (BF_GLOBALS._v4CECC == 1) { SceneItem::display(910, 84, SET_WIDTH, 312, SET_X, GLOBALS._sceneManager._scene->_sceneBounds.left + 4, - SET_Y, GLOBALS._sceneManager._scene->_sceneBounds.top + BF_INTERFACE_Y + 2, + SET_Y, GLOBALS._sceneManager._scene->_sceneBounds.top + UI_INTERFACE_Y + 2, SET_FONT, 4, SET_BG_COLOR, 1, SET_FG_COLOR, 19, SET_EXT_BGCOLOR, 9, SET_EXT_FGCOLOR, 13, LIST_END); return true; @@ -1016,7 +1016,7 @@ bool Scene910::Stuart::startAction(CursorType action, Event &event) { if (BF_GLOBALS._v4CECC == 1) { SceneItem::display(910, 84, SET_WIDTH, 312, SET_X, GLOBALS._sceneManager._scene->_sceneBounds.left + 4, - SET_Y, GLOBALS._sceneManager._scene->_sceneBounds.top + BF_INTERFACE_Y + 2, + SET_Y, GLOBALS._sceneManager._scene->_sceneBounds.top + UI_INTERFACE_Y + 2, SET_FONT, 4, SET_BG_COLOR, 1, SET_FG_COLOR, 19, SET_EXT_BGCOLOR, 9, SET_EXT_FGCOLOR, 13, LIST_END); return true; @@ -1035,7 +1035,7 @@ bool Scene910::Stuart::startAction(CursorType action, Event &event) { case 61: SceneItem::display(910, 83, SET_WIDTH, 312, SET_X, GLOBALS._sceneManager._scene->_sceneBounds.left + 4, - SET_Y, GLOBALS._sceneManager._scene->_sceneBounds.top + BF_INTERFACE_Y + 2, + SET_Y, GLOBALS._sceneManager._scene->_sceneBounds.top + UI_INTERFACE_Y + 2, SET_FONT, 4, SET_BG_COLOR, 1, SET_FG_COLOR, 19, SET_EXT_BGCOLOR, 9, SET_EXT_FGCOLOR, 13, LIST_END); return true; @@ -1155,7 +1155,7 @@ bool Scene910::BreakerBox::startAction(CursorType action, Event &event) { } else { SceneItem::display(910, 62, SET_WIDTH, 312, SET_X, GLOBALS._sceneManager._scene->_sceneBounds.left + 4, - SET_Y, GLOBALS._sceneManager._scene->_sceneBounds.top + BF_INTERFACE_Y + 2, + SET_Y, GLOBALS._sceneManager._scene->_sceneBounds.top + UI_INTERFACE_Y + 2, SET_FONT, 4, SET_BG_COLOR, 1, SET_FG_COLOR, 19, SET_EXT_BGCOLOR, 9, SET_EXT_FGCOLOR, 13, LIST_END); return true; @@ -1258,7 +1258,7 @@ bool Scene910::Object13::startAction(CursorType action, Event &event) { case CURSOR_LOOK: SceneItem::display(910, 9, SET_WIDTH, 312, SET_X, GLOBALS._sceneManager._scene->_sceneBounds.left + 4, - SET_Y, GLOBALS._sceneManager._scene->_sceneBounds.top + BF_INTERFACE_Y + 2, + SET_Y, GLOBALS._sceneManager._scene->_sceneBounds.top + UI_INTERFACE_Y + 2, SET_FONT, 4, SET_BG_COLOR, 1, SET_FG_COLOR, 19, SET_EXT_BGCOLOR, 9, SET_EXT_FGCOLOR, 13, LIST_END); return true; @@ -1345,7 +1345,7 @@ bool Scene910::Object13::startAction(CursorType action, Event &event) { } else SceneItem::display(910, 97, SET_WIDTH, 312, SET_X, GLOBALS._sceneManager._scene->_sceneBounds.left + 4, - SET_Y, GLOBALS._sceneManager._scene->_sceneBounds.top + BF_INTERFACE_Y + 2, + SET_Y, GLOBALS._sceneManager._scene->_sceneBounds.top + UI_INTERFACE_Y + 2, SET_FONT, 4, SET_BG_COLOR, 1, SET_FG_COLOR, 19, SET_EXT_BGCOLOR, 9, SET_EXT_FGCOLOR, 13, LIST_END); return true; @@ -1524,7 +1524,7 @@ bool Scene910::BlackPlug::startAction(CursorType action, Event &event) { case CURSOR_LOOK: SceneItem::display(910, 14, SET_WIDTH, 312, SET_X, GLOBALS._sceneManager._scene->_sceneBounds.left + 4, - SET_Y, GLOBALS._sceneManager._scene->_sceneBounds.top + BF_INTERFACE_Y + 2, + SET_Y, GLOBALS._sceneManager._scene->_sceneBounds.top + UI_INTERFACE_Y + 2, SET_FONT, 4, SET_BG_COLOR, 1, SET_FG_COLOR, 19, SET_EXT_BGCOLOR, 9, SET_EXT_FGCOLOR, 13, LIST_END); return true; @@ -1533,7 +1533,7 @@ bool Scene910::BlackPlug::startAction(CursorType action, Event &event) { case 0: SceneItem::display(910, 15, SET_WIDTH, 312, SET_X, GLOBALS._sceneManager._scene->_sceneBounds.left + 4, - SET_Y, GLOBALS._sceneManager._scene->_sceneBounds.top + BF_INTERFACE_Y + 2, + SET_Y, GLOBALS._sceneManager._scene->_sceneBounds.top + UI_INTERFACE_Y + 2, SET_FONT, 4, SET_BG_COLOR, 1, SET_FG_COLOR, 19, SET_EXT_BGCOLOR, 9, SET_EXT_FGCOLOR, 13, LIST_END); break; @@ -1605,7 +1605,7 @@ bool Scene910::BlackPlug::startAction(CursorType action, Event &event) { if (BF_INVENTORY.getObjectScene(INV_YELLOW_CORD) == _field90 + 2) { SceneItem::display(910, 85, SET_WIDTH, 312, SET_X, GLOBALS._sceneManager._scene->_sceneBounds.left + 4, - SET_Y, GLOBALS._sceneManager._scene->_sceneBounds.top + BF_INTERFACE_Y + 2, + SET_Y, GLOBALS._sceneManager._scene->_sceneBounds.top + UI_INTERFACE_Y + 2, SET_FONT, 4, SET_BG_COLOR, 1, SET_FG_COLOR, 19, SET_EXT_BGCOLOR, 9, SET_EXT_FGCOLOR, 13, LIST_END); return true; @@ -1613,7 +1613,7 @@ bool Scene910::BlackPlug::startAction(CursorType action, Event &event) { if (BF_GLOBALS._v4CEE2 == 3) { SceneItem::display(910, 84, SET_WIDTH, 312, SET_X, GLOBALS._sceneManager._scene->_sceneBounds.left + 4, - SET_Y, GLOBALS._sceneManager._scene->_sceneBounds.top + BF_INTERFACE_Y + 2, + SET_Y, GLOBALS._sceneManager._scene->_sceneBounds.top + UI_INTERFACE_Y + 2, SET_FONT, 4, SET_BG_COLOR, 1, SET_FG_COLOR, 19, SET_EXT_BGCOLOR, 9, SET_EXT_FGCOLOR, 13, LIST_END); return true; @@ -1649,7 +1649,7 @@ bool Scene910::BlackPlug::startAction(CursorType action, Event &event) { if (BF_INVENTORY.getObjectScene(INV_BLACK_CORD) == _field90 + 2) { SceneItem::display(910, 85, SET_WIDTH, 312, SET_X, GLOBALS._sceneManager._scene->_sceneBounds.left + 4, - SET_Y, GLOBALS._sceneManager._scene->_sceneBounds.top + BF_INTERFACE_Y + 2, + SET_Y, GLOBALS._sceneManager._scene->_sceneBounds.top + UI_INTERFACE_Y + 2, SET_FONT, 4, SET_BG_COLOR, 1, SET_FG_COLOR, 19, SET_EXT_BGCOLOR, 9, SET_EXT_FGCOLOR, 13, LIST_END); return true; @@ -1827,7 +1827,7 @@ bool Scene910::Generator::startAction(CursorType action, Event &event) { if (scene->_lyle._position.x == 115) SceneItem::display(910, 62, SET_WIDTH, 312, SET_X, GLOBALS._sceneManager._scene->_sceneBounds.left + 4, - SET_Y, GLOBALS._sceneManager._scene->_sceneBounds.top + BF_INTERFACE_Y + 2, + SET_Y, GLOBALS._sceneManager._scene->_sceneBounds.top + UI_INTERFACE_Y + 2, SET_FONT, 4, SET_BG_COLOR, 1, SET_FG_COLOR, 19, SET_EXT_BGCOLOR, 9, SET_EXT_FGCOLOR, 13, LIST_END); else if (BF_GLOBALS._v4CEE2 == 1) { @@ -1898,7 +1898,7 @@ bool Scene910::Item15::startAction(CursorType action, Event &event) { SceneItem::display(910, 2, SET_WIDTH, 312, SET_X, GLOBALS._sceneManager._scene->_sceneBounds.left + 4, - SET_Y, GLOBALS._sceneManager._scene->_sceneBounds.top + BF_INTERFACE_Y + 2, + SET_Y, GLOBALS._sceneManager._scene->_sceneBounds.top + UI_INTERFACE_Y + 2, SET_FONT, 4, SET_BG_COLOR, 1, SET_FG_COLOR, 19, SET_EXT_BGCOLOR, 9, SET_EXT_FGCOLOR, 13, LIST_END); return true; @@ -2334,7 +2334,7 @@ void Scene910::signal() { } else { SceneItem::display(910, 91, SET_WIDTH, 312, SET_X, GLOBALS._sceneManager._scene->_sceneBounds.left + 4, - SET_Y, GLOBALS._sceneManager._scene->_sceneBounds.top + BF_INTERFACE_Y + 2, + SET_Y, GLOBALS._sceneManager._scene->_sceneBounds.top + UI_INTERFACE_Y + 2, SET_FONT, 4, SET_BG_COLOR, 1, SET_FG_COLOR, 19, SET_EXT_BGCOLOR, 9, SET_EXT_FGCOLOR, 13, LIST_END); BF_GLOBALS._player.enableControl(); @@ -2351,7 +2351,7 @@ void Scene910::signal() { } else { SceneItem::display(910, 92, SET_WIDTH, 312, SET_X, GLOBALS._sceneManager._scene->_sceneBounds.left + 4, - SET_Y, GLOBALS._sceneManager._scene->_sceneBounds.top + BF_INTERFACE_Y + 2, + SET_Y, GLOBALS._sceneManager._scene->_sceneBounds.top + UI_INTERFACE_Y + 2, SET_FONT, 4, SET_BG_COLOR, 1, SET_FG_COLOR, 19, SET_EXT_BGCOLOR, 9, SET_EXT_FGCOLOR, 13, LIST_END); BF_GLOBALS._player.enableControl(); @@ -2359,7 +2359,7 @@ void Scene910::signal() { } else { SceneItem::display(910, 94, SET_WIDTH, 312, SET_X, GLOBALS._sceneManager._scene->_sceneBounds.left + 4, - SET_Y, GLOBALS._sceneManager._scene->_sceneBounds.top + BF_INTERFACE_Y + 2, + SET_Y, GLOBALS._sceneManager._scene->_sceneBounds.top + UI_INTERFACE_Y + 2, SET_FONT, 4, SET_BG_COLOR, 1, SET_FG_COLOR, 19, SET_EXT_BGCOLOR, 9, SET_EXT_FGCOLOR, 13, LIST_END); BF_GLOBALS._player.enableControl(); @@ -2685,7 +2685,7 @@ void Scene910::signal() { } else { SceneItem::display(910, 89, SET_WIDTH, 312, SET_X, GLOBALS._sceneManager._scene->_sceneBounds.left + 4, - SET_Y, GLOBALS._sceneManager._scene->_sceneBounds.top + BF_INTERFACE_Y + 2, + SET_Y, GLOBALS._sceneManager._scene->_sceneBounds.top + UI_INTERFACE_Y + 2, SET_FONT, 4, SET_BG_COLOR, 1, SET_FG_COLOR, 19, SET_EXT_BGCOLOR, 9, SET_EXT_FGCOLOR, 13, LIST_END); _sceneMode = 9144; @@ -2705,7 +2705,7 @@ void Scene910::signal() { case 9149: SceneItem::display(910, 74, SET_WIDTH, 312, SET_X, GLOBALS._sceneManager._scene->_sceneBounds.left + 4, - SET_Y, GLOBALS._sceneManager._scene->_sceneBounds.top + BF_INTERFACE_Y + 2, + SET_Y, GLOBALS._sceneManager._scene->_sceneBounds.top + UI_INTERFACE_Y + 2, SET_FONT, 4, SET_BG_COLOR, 1, SET_FG_COLOR, 19, SET_EXT_BGCOLOR, 9, SET_EXT_FGCOLOR, 13, LIST_END); BF_INVENTORY.setObjectScene(INV_22_SNUB, 1); @@ -2764,13 +2764,13 @@ void Scene910::process(Event &event) { } else SceneItem::display(1, 4, SET_WIDTH, 312, SET_X, GLOBALS._sceneManager._scene->_sceneBounds.left + 4, - SET_Y, GLOBALS._sceneManager._scene->_sceneBounds.top + BF_INTERFACE_Y + 2, + SET_Y, GLOBALS._sceneManager._scene->_sceneBounds.top + UI_INTERFACE_Y + 2, SET_FONT, 4, SET_BG_COLOR, 1, SET_FG_COLOR, 19, SET_EXT_BGCOLOR, 9, SET_EXT_FGCOLOR, 13, LIST_END); } else SceneItem::display(910, 81, SET_WIDTH, 312, SET_X, GLOBALS._sceneManager._scene->_sceneBounds.left + 4, - SET_Y, GLOBALS._sceneManager._scene->_sceneBounds.top + BF_INTERFACE_Y + 2, + SET_Y, GLOBALS._sceneManager._scene->_sceneBounds.top + UI_INTERFACE_Y + 2, SET_FONT, 4, SET_BG_COLOR, 1, SET_FG_COLOR, 19, SET_EXT_BGCOLOR, 9, SET_EXT_FGCOLOR, 13, LIST_END); event.handled = true; @@ -2832,7 +2832,7 @@ void Scene910::dispatch() { } else { SceneItem::display(910, 98, SET_WIDTH, 312, SET_X, GLOBALS._sceneManager._scene->_sceneBounds.left + 4, - SET_Y, GLOBALS._sceneManager._scene->_sceneBounds.top + BF_INTERFACE_Y + 2, + SET_Y, GLOBALS._sceneManager._scene->_sceneBounds.top + UI_INTERFACE_Y + 2, SET_FONT, 4, SET_BG_COLOR, 1, SET_FG_COLOR, 19, SET_EXT_BGCOLOR, 9, SET_EXT_FGCOLOR, 13, LIST_END); _sceneMode = 9144; @@ -2856,7 +2856,7 @@ void Scene910::checkGun() { if ((BF_GLOBALS._dayNumber == 5) && (BF_GLOBALS._v4CEE2 == 0) && (BF_GLOBALS._v4CEE0 != 0)) SceneItem::display(910, 70, SET_WIDTH, 312, SET_X, GLOBALS._sceneManager._scene->_sceneBounds.left + 4, - SET_Y, GLOBALS._sceneManager._scene->_sceneBounds.top + BF_INTERFACE_Y + 2, + SET_Y, GLOBALS._sceneManager._scene->_sceneBounds.top + UI_INTERFACE_Y + 2, SET_FONT, 4, SET_BG_COLOR, 1, SET_FG_COLOR, 19, SET_EXT_BGCOLOR, 9, SET_EXT_FGCOLOR, 13, LIST_END); else @@ -3065,7 +3065,7 @@ void Scene920::signal() { } void Scene920::process(Event &event) { SceneExt::process(event); - if (BF_GLOBALS._player._enabled && !_focusObject && (event.mousePos.y < (BF_INTERFACE_Y - 1))) { + if (BF_GLOBALS._player._enabled && !_focusObject && (event.mousePos.y < (UI_INTERFACE_Y - 1))) { if (_exitN.contains(event.mousePos)) { GfxSurface surface = _cursorVisage.getFrame(EXITFRAME_N); BF_GLOBALS._events.setCursor(surface); @@ -3301,7 +3301,7 @@ void Scene930::Action2::signal() { case 3: SceneItem::display(930, scene->_box._useLineNum, SET_WIDTH, 312, SET_X, GLOBALS._sceneManager._scene->_sceneBounds.left + 4, - SET_Y, GLOBALS._sceneManager._scene->_sceneBounds.top + BF_INTERFACE_Y + 2, + SET_Y, GLOBALS._sceneManager._scene->_sceneBounds.top + UI_INTERFACE_Y + 2, SET_FONT, 4, SET_BG_COLOR, 1, SET_FG_COLOR, 19, SET_EXT_BGCOLOR, 9, SET_EXT_FGCOLOR, 13, LIST_END); scene->subF3C07(); @@ -3426,7 +3426,7 @@ void Scene930::signal() { _sceneMode = 3; SceneItem::display(930, 95, SET_WIDTH, 312, SET_X, GLOBALS._sceneManager._scene->_sceneBounds.left + 4, - SET_Y, GLOBALS._sceneManager._scene->_sceneBounds.top + BF_INTERFACE_Y + 2, + SET_Y, GLOBALS._sceneManager._scene->_sceneBounds.top + UI_INTERFACE_Y + 2, SET_FONT, 4, SET_BG_COLOR, 1, SET_FG_COLOR, 19, SET_EXT_BGCOLOR, 9, SET_EXT_FGCOLOR, 13, LIST_END); signal(); diff --git a/engines/tsage/core.cpp b/engines/tsage/core.cpp index b40c5af91b..dbc087c53f 100644 --- a/engines/tsage/core.cpp +++ b/engines/tsage/core.cpp @@ -1434,7 +1434,7 @@ void ScenePalette::changeBackground(const Rect &bounds, FadeMode fadeMode) { } Rect tempRect = bounds; - if (g_vm->getGameID() == GType_BlueForce) + if (g_vm->getGameID() != GType_Ringworld) tempRect.setHeight(BF_GLOBALS._interfaceY); g_globals->_screenSurface.copyFrom(g_globals->_sceneManager._scene->_backSurface, @@ -1533,7 +1533,7 @@ void SceneItem::display(int resNum, int lineNum, ...) { Common::String msg = (!resNum || (resNum == -1)) ? Common::String() : g_resourceManager->getMessage(resNum, lineNum); - if ((g_vm->getGameID() == GType_BlueForce) && T2_GLOBALS._uiElements._active) + if ((g_vm->getGameID() != GType_Ringworld) && T2_GLOBALS._uiElements._active) T2_GLOBALS._uiElements.hide(); if (g_globals->_sceneObjects->contains(&g_globals->_sceneText)) { @@ -1665,7 +1665,7 @@ void SceneItem::display(int resNum, int lineNum, ...) { g_globals->_sceneText.remove(); } - if ((g_vm->getGameID() == GType_BlueForce) && T2_GLOBALS._uiElements._active) { + if ((g_vm->getGameID() != GType_Ringworld) && T2_GLOBALS._uiElements._active) { // Show user interface T2_GLOBALS._uiElements.show(); @@ -1678,7 +1678,7 @@ void SceneItem::display2(int resNum, int lineNum) { if (g_vm->getGameID() == GType_BlueForce) display(resNum, lineNum, SET_WIDTH, 312, SET_X, 4 + GLOBALS._sceneManager._scene->_sceneBounds.left, - SET_Y, GLOBALS._sceneManager._scene->_sceneBounds.top + BF_INTERFACE_Y + 2, + SET_Y, GLOBALS._sceneManager._scene->_sceneBounds.top + UI_INTERFACE_Y + 2, SET_FONT, 4, SET_BG_COLOR, 1, SET_FG_COLOR, 19, SET_EXT_BGCOLOR, 9, SET_EXT_FGCOLOR, 13, LIST_END); else @@ -1691,7 +1691,7 @@ void SceneItem::display(const Common::String &msg) { display(-1, -1, msg.c_str(), SET_WIDTH, 312, SET_X, 4 + GLOBALS._sceneManager._scene->_sceneBounds.left, - SET_Y, GLOBALS._sceneManager._scene->_sceneBounds.top + BF_INTERFACE_Y + 2, + SET_Y, GLOBALS._sceneManager._scene->_sceneBounds.top + UI_INTERFACE_Y + 2, SET_FONT, 4, SET_BG_COLOR, 1, SET_FG_COLOR, 19, SET_EXT_BGCOLOR, 9, SET_EXT_FGCOLOR, 13, LIST_END); } @@ -2783,7 +2783,7 @@ void SceneText::synchronize(Serializer &s) { void SceneText::updateScreen() { // FIXME: Hack for Blue Force to handle not refreshing the screen if the user interface // has been re-activated after showing some scene text - if ((g_vm->getGameID() != GType_BlueForce) || (_bounds.top < BF_INTERFACE_Y) || + if ((g_vm->getGameID() != GType_BlueForce) || (_bounds.top < UI_INTERFACE_Y) || !T2_GLOBALS._uiElements._visible) SceneObject::updateScreen(); } @@ -2825,7 +2825,7 @@ void Visage::setVisage(int resNum, int rlbNum) { // In Ringworld, we immediately get the data _data = g_resourceManager->getResource(RES_VISAGE, resNum, rlbNum); } else { - // Blue Force has an extra indirection via the visage index file + // Games after Ringworld have an extra indirection via the visage index file byte *indexData = g_resourceManager->getResource(RES_VISAGE, resNum, 9999); if (rlbNum == 9999) { _data = indexData; @@ -2930,6 +2930,7 @@ void Player::enableControl() { switch (g_vm->getGameID()) { case GType_BlueForce: + case GType_Ringworld2: cursor = g_globals->_events.getCursor(); g_globals->_events.setCursor(cursor); @@ -2937,16 +2938,6 @@ void Player::enableControl() { T2_GLOBALS._uiElements.show(); break; - case GType_Ringworld2: - cursor = g_globals->_events.getCursor(); - g_globals->_events.setCursor(cursor); - - /* - if (R2_GLOBALS._uiElements._active) - R2_GLOBALS._uiElements.show(); - */ - break; - default: // Ringworld g_globals->_events.setCursor(CURSOR_WALK); diff --git a/engines/tsage/globals.cpp b/engines/tsage/globals.cpp index 21bf542713..abbabf6d6f 100644 --- a/engines/tsage/globals.cpp +++ b/engines/tsage/globals.cpp @@ -196,6 +196,17 @@ void Globals::dispatchSounds() { /*--------------------------------------------------------------------------*/ +void TsAGE2Globals::reset() { + Globals::reset(); + + // Reset the inventory + T2_GLOBALS._uiElements.updateInventory(); + T2_GLOBALS._uiElements._scoreValue = 0; + T2_GLOBALS._uiElements._active = false; +} + +/*--------------------------------------------------------------------------*/ + namespace BlueForce { BlueForceGlobals::BlueForceGlobals(): TsAGE2Globals() { @@ -249,7 +260,7 @@ void BlueForceGlobals::synchronize(Serializer &s) { } void BlueForceGlobals::reset() { - Globals::reset(); + TsAGE2Globals::reset(); _scenePalette.clearListeners(); _scrollFollower = &_player; @@ -257,15 +268,12 @@ void BlueForceGlobals::reset() { // Reset the inventory ((BlueForceInvObjectList *)_inventory)->reset(); - T2_GLOBALS._uiElements.updateInventory(); - T2_GLOBALS._uiElements._scoreValue = 0; - T2_GLOBALS._uiElements._active = false; _mapLocationId = 1; _driveFromScene = 300; _driveToScene = 0; - _interfaceY = BF_INTERFACE_Y; + _interfaceY = UI_INTERFACE_Y; _dayNumber = 0; _v4CEA4 = 0; _v4CEAA = 0; diff --git a/engines/tsage/globals.h b/engines/tsage/globals.h index d6724aafa2..35e4bca6c4 100644 --- a/engines/tsage/globals.h +++ b/engines/tsage/globals.h @@ -77,7 +77,6 @@ public: Globals(); ~Globals(); - void reset(); void setFlag(int flagNum) { assert((flagNum >= 0) && (flagNum < MAX_FLAGS)); _flags[flagNum] = true; @@ -94,6 +93,8 @@ public: GfxManager &gfxManager() { return **_gfxManagers.begin(); } virtual Common::String getClassName() { return "Globals"; } virtual void synchronize(Serializer &s); + virtual void reset(); + void dispatchSounds(); }; @@ -106,8 +107,10 @@ class TsAGE2Globals: public Globals { public: UIElements _uiElements; SelectItemProc _onSelectItem; + int _interfaceY; TsAGE2Globals() { _onSelectItem = NULL; } + virtual void reset(); }; extern Globals *g_globals; @@ -217,17 +220,16 @@ public: int _v50CC8; int _v51C42; int _v51C44; - int _interfaceY; Bookmark _bookmark; int _mapLocationId; int _clip1Bullets, _clip2Bullets; BlueForceGlobals(); - void reset(); bool getHasBullets(); virtual Common::String getClassName() { return "BFGlobals"; } virtual void synchronize(Serializer &s); + virtual void reset(); void set2Flags(int flagNum); bool removeFlag(int flagNum); }; diff --git a/engines/tsage/ringworld2/ringworld2_logic.cpp b/engines/tsage/ringworld2/ringworld2_logic.cpp index e2583a5f1f..63b0fc1a71 100644 --- a/engines/tsage/ringworld2/ringworld2_logic.cpp +++ b/engines/tsage/ringworld2/ringworld2_logic.cpp @@ -72,6 +72,9 @@ SceneExt::SceneExt(): Scene() { void SceneExt::postInit(SceneObjectList *OwnerList) { Scene::postInit(OwnerList); + + // Exclude the bottom area of the screen to allow room for the UI + T2_GLOBALS._interfaceY = UI_INTERFACE_Y; } void SceneExt::remove() { @@ -481,6 +484,7 @@ void Ringworld2Game::start() { else { // Switch to the first game scene g_globals->_events.setCursor(CURSOR_WALK); + T2_GLOBALS._uiElements._active = true; g_globals->_sceneManager.setNewScene(100); } diff --git a/engines/tsage/tsage.cpp b/engines/tsage/tsage.cpp index dbbdac3b1f..7e7198fc2b 100644 --- a/engines/tsage/tsage.cpp +++ b/engines/tsage/tsage.cpp @@ -84,13 +84,19 @@ void TSageEngine::initialize() { g_globals = new BlueForce::BlueForceGlobals(); // Setup the user interface - T2_GLOBALS._uiElements.setup(Common::Point(0, BF_INTERFACE_Y - 2)); + T2_GLOBALS._uiElements.setup(Common::Point(0, UI_INTERFACE_Y - 2)); // Reset all global variables BF_GLOBALS.reset(); } else if (g_vm->getGameID() == GType_Ringworld2) { g_resourceManager->addLib("R2RW.RLB"); g_globals = new Ringworld2::Ringworld2Globals(); + + // Setup the user interface + T2_GLOBALS._uiElements.setup(Common::Point(0, UI_INTERFACE_Y - 2)); + + // Reset all global variables + R2_GLOBALS.reset(); } g_globals->gfxManager().setDefaults(); diff --git a/engines/tsage/tsage.h b/engines/tsage/tsage.h index 511f87fb2f..eb36cf0790 100644 --- a/engines/tsage/tsage.h +++ b/engines/tsage/tsage.h @@ -63,7 +63,7 @@ struct tSageGameDescription; #define SCREEN_HEIGHT 200 #define SCREEN_CENTER_X 160 #define SCREEN_CENTER_Y 100 -#define BF_INTERFACE_Y 168 +#define UI_INTERFACE_Y 168 class TSageEngine : public Engine { private: diff --git a/engines/tsage/user_interface.cpp b/engines/tsage/user_interface.cpp index a1b998748f..0fb8137c86 100644 --- a/engines/tsage/user_interface.cpp +++ b/engines/tsage/user_interface.cpp @@ -231,7 +231,7 @@ void UICollection::show() { void UICollection::erase() { if (_clearScreen) { - Rect tempRect(0, BF_INTERFACE_Y, SCREEN_WIDTH, SCREEN_HEIGHT); + Rect tempRect(0, UI_INTERFACE_Y, SCREEN_WIDTH, SCREEN_HEIGHT); BF_GLOBALS._screenSurface.fillRect(tempRect, 0); BF_GLOBALS._sceneManager._scene->_backSurface.fillRect(tempRect, 0); _clearScreen = false; @@ -254,8 +254,8 @@ void UICollection::draw() { // Draw the resulting UI onto the screen BF_GLOBALS._screenSurface.copyFrom(BF_GLOBALS._sceneManager._scene->_backSurface, - Rect(0, BF_INTERFACE_Y, SCREEN_WIDTH, SCREEN_HEIGHT), - Rect(0, BF_INTERFACE_Y, SCREEN_WIDTH, SCREEN_HEIGHT)); + Rect(0, UI_INTERFACE_Y, SCREEN_WIDTH, SCREEN_HEIGHT), + Rect(0, UI_INTERFACE_Y, SCREEN_WIDTH, SCREEN_HEIGHT)); _clearScreen = 1; g_globals->_sceneManager._scene->_sceneBounds = savedBounds; @@ -346,8 +346,8 @@ void UIElements::setup(const Common::Point &pt) { UICollection::setup(pt); hide(); - _object1.setup(1, 3, 1, 0, 0, 255); - add(&_object1); + _background.setup(1, 3, 1, 0, 0, 255); + add(&_background); // Set up the inventory slots int xp = 0; @@ -369,32 +369,39 @@ void UIElements::setup(const Common::Point &pt) { } xp = idx * 63 + 2; - item->setup(9, 1, idx, xp, 4, 255); + if (g_vm->getGameID() == GType_BlueForce) { + item->setup(9, 1, idx, xp, 4, 255); + } else { + item->setup(7, 1, idx, xp, 4, 255); + } add(item); } // Setup bottom-right hand buttons xp += 62; - _question.setup(1, 4, 7, xp, 16, 255); + int yp = (g_vm->getGameID() == GType_BlueForce) ? 16 : 17; + _question.setup(1, 4, 7, xp, yp, 255); _question.setEnabled(false); add(&_question); xp += 21; - _scrollLeft.setup(1, 4, 1, xp, 16, 255); + _scrollLeft.setup(1, 4, 1, xp, yp, 255); add(&_scrollLeft); _scrollLeft._isLeft = true; xp += 22; - _scrollRight.setup(1, 4, 4, xp, 16, 255); + _scrollRight.setup(1, 4, 4, xp, yp, 255); add(&_scrollRight); _scrollRight._isLeft = false; // Set up the score - _score.postInit(); - add(&_score); + if (g_vm->getGameID() == GType_BlueForce) { + _score.postInit(); + add(&_score); + } // Set interface area - _bounds = Rect(0, BF_INTERFACE_Y - 1, SCREEN_WIDTH, SCREEN_HEIGHT); + _bounds = Rect(0, UI_INTERFACE_Y - 1, SCREEN_WIDTH, SCREEN_HEIGHT); updateInventory(); } diff --git a/engines/tsage/user_interface.h b/engines/tsage/user_interface.h index eb38bcb740..7a9a78478d 100644 --- a/engines/tsage/user_interface.h +++ b/engines/tsage/user_interface.h @@ -118,7 +118,7 @@ private: void add(UIElement *obj); void updateInvList(); public: - UIElement _object1; + UIElement _background; UIQuestion _question; UIScore _score; UIInventorySlot _slot1, _slot2, _slot3, _slot4; |