aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
Diffstat (limited to 'engines')
-rw-r--r--engines/tsage/blue_force/blueforce_logic.cpp44
-rw-r--r--engines/tsage/blue_force/blueforce_logic.h1
-rw-r--r--engines/tsage/blue_force/blueforce_scenes0.cpp1
-rw-r--r--engines/tsage/blue_force/blueforce_ui.cpp4
-rw-r--r--engines/tsage/core.cpp13
-rw-r--r--engines/tsage/core.h2
-rw-r--r--engines/tsage/globals.cpp2
-rw-r--r--engines/tsage/scenes.cpp7
-rw-r--r--engines/tsage/staticres.cpp9
-rw-r--r--engines/tsage/staticres.h3
10 files changed, 72 insertions, 14 deletions
diff --git a/engines/tsage/blue_force/blueforce_logic.cpp b/engines/tsage/blue_force/blueforce_logic.cpp
index 41d16ad998..048aaf14de 100644
--- a/engines/tsage/blue_force/blueforce_logic.cpp
+++ b/engines/tsage/blue_force/blueforce_logic.cpp
@@ -142,6 +142,50 @@ void BlueForceGame::rightClick() {
delete dlg;
}
+void BlueForceGame::processEvent(Event &event) {
+ if (event.eventType == EVENT_KEYPRESS) {
+ switch (event.kbd.keycode) {
+ case Common::KEYCODE_F1:
+ // F1 - Help
+ MessageDialog::show(HELP_MSG, OK_BTN_STRING);
+ break;
+
+ case Common::KEYCODE_F2:
+ // F2 - Sound Options
+ SoundDialog::execute();
+ break;
+
+ case Common::KEYCODE_F3:
+ // F3 - Quit
+ quitGame();
+ event.handled = false;
+ break;
+
+ case Common::KEYCODE_F4:
+ // F4 - Restart
+ restartGame();
+ _globals->_events.setCursorFromFlag();
+ break;
+
+ case Common::KEYCODE_F7:
+ // F7 - Restore
+ restoreGame();
+ _globals->_events.setCursorFromFlag();
+ break;
+
+ case Common::KEYCODE_F10:
+ // F10 - Pause
+ GfxDialog::setPalette();
+ MessageDialog::show(GAME_PAUSED_MSG, OK_BTN_STRING);
+ _globals->_events.setCursorFromFlag();
+ break;
+
+ default:
+ break;
+ }
+ }
+}
+
/*--------------------------------------------------------------------------*/
AObjectArray::AObjectArray(): EventHandler() {
diff --git a/engines/tsage/blue_force/blueforce_logic.h b/engines/tsage/blue_force/blueforce_logic.h
index ddc32d488f..762833be41 100644
--- a/engines/tsage/blue_force/blueforce_logic.h
+++ b/engines/tsage/blue_force/blueforce_logic.h
@@ -42,6 +42,7 @@ public:
virtual void start();
virtual Scene *createScene(int sceneNumber);
virtual void rightClick();
+ virtual void processEvent(Event &event);
};
#define OBJ_ARRAY_SIZE 10
diff --git a/engines/tsage/blue_force/blueforce_scenes0.cpp b/engines/tsage/blue_force/blueforce_scenes0.cpp
index f33312494a..d6583986c4 100644
--- a/engines/tsage/blue_force/blueforce_scenes0.cpp
+++ b/engines/tsage/blue_force/blueforce_scenes0.cpp
@@ -191,6 +191,7 @@ void Scene20::postInit(SceneObjectList *OwnerList) {
_object8.changeZoom(100);
setAction(&_action1);
+ BF_GLOBALS._dialogCenter.y = 165;
}
/*--------------------------------------------------------------------------
diff --git a/engines/tsage/blue_force/blueforce_ui.cpp b/engines/tsage/blue_force/blueforce_ui.cpp
index 42605b4c5f..8fc686090e 100644
--- a/engines/tsage/blue_force/blueforce_ui.cpp
+++ b/engines/tsage/blue_force/blueforce_ui.cpp
@@ -202,8 +202,6 @@ void UICollection::draw() {
for (uint idx = 0; idx < _objList.size(); ++idx)
_objList[idx]->draw();
- // Update the screen
- g_system->updateScreen();
_clearScreen = 1;
}
}
@@ -322,6 +320,8 @@ void UIElements::add(UIElement *obj) {
_objList.push_back(obj);
obj->setPosition(Common::Point(_bounds.left + obj->_position.x, _bounds.top + obj->_position.y));
+ obj->reposition();
+
GfxSurface s = obj->getFrame();
s.draw(obj->_position);
}
diff --git a/engines/tsage/core.cpp b/engines/tsage/core.cpp
index 4dc4c72fc8..71f001db80 100644
--- a/engines/tsage/core.cpp
+++ b/engines/tsage/core.cpp
@@ -1619,8 +1619,13 @@ void SceneItem::display(int resNum, int lineNum, ...) {
_globals->_sceneText.remove();
}
- if ((_vm->getGameID() == GType_BlueForce) && BF_GLOBALS._uiElements._active)
+ if ((_vm->getGameID() == GType_BlueForce) && BF_GLOBALS._uiElements._active) {
+ // Show user interface
BF_GLOBALS._uiElements.show();
+
+ // Re-show the cursor
+ BF_GLOBALS._events.setCursor(BF_GLOBALS._events.getCursor());
+ }
}
void SceneItem::display2(int resNum, int lineNum) {
@@ -2774,6 +2779,12 @@ void SceneText::synchronize(Serializer &s) {
_textSurface.synchronize(s);
}
+void SceneText::updateScreen() {
+ // In Blue Force, stop clearing text in the user interface area screwing up user interface
+ if ((_vm->getGameID() != GType_BlueForce) || (_bounds.top < BF_INTERFACE_Y))
+ SceneObject::updateScreen();
+}
+
/*--------------------------------------------------------------------------*/
Visage::Visage() {
diff --git a/engines/tsage/core.h b/engines/tsage/core.h
index ede1bfc1af..d8a21c74b3 100644
--- a/engines/tsage/core.h
+++ b/engines/tsage/core.h
@@ -612,6 +612,7 @@ public:
virtual void synchronize(Serializer &s);
virtual Common::String getClassName() { return "SceneText"; }
virtual GfxSurface getFrame() { return _textSurface; }
+ virtual void updateScreen();
};
class Player : public SceneObject {
@@ -728,6 +729,7 @@ public:
_objList.remove(sceneObj);
_listAltered = true;
}
+ void clear() { _objList.clear(); }
};
class ScenePriorities : public Common::List<Region> {
diff --git a/engines/tsage/globals.cpp b/engines/tsage/globals.cpp
index 086720dd50..c1b42855da 100644
--- a/engines/tsage/globals.cpp
+++ b/engines/tsage/globals.cpp
@@ -74,7 +74,7 @@ Globals::Globals() : _dialogCenter(160, 140), _gfxManagerInstance(_screenSurface
_gfxColors.foreground = 83;
_fontColors.background = 88;
_fontColors.foreground = 92;
- _dialogCenter.y = 165;
+ _dialogCenter.y = 140;
} else if ((_vm->getGameID() == GType_Ringworld) && (_vm->getFeatures() & GF_CD)) {
_gfxFontNumber = 50;
_gfxColors.background = 53;
diff --git a/engines/tsage/scenes.cpp b/engines/tsage/scenes.cpp
index 5aeacda6fe..e8b3189481 100644
--- a/engines/tsage/scenes.cpp
+++ b/engines/tsage/scenes.cpp
@@ -77,12 +77,7 @@ void SceneManager::sceneChange() {
}
// Clear the secondary scene object list
- io = _globals->_sceneManager._altSceneObjects.begin();
- while (io != _globals->_sceneManager._altSceneObjects.end()) {
- SceneObject *sceneObj = *io;
- ++io;
- sceneObj->removeObject();
- }
+ _altSceneObjects.clear();
// Clear the hotspot list
SynchronizedList<SceneItem *>::iterator ii = _globals->_sceneItems.begin();
diff --git a/engines/tsage/staticres.cpp b/engines/tsage/staticres.cpp
index 819cf56f31..03e1954de6 100644
--- a/engines/tsage/staticres.cpp
+++ b/engines/tsage/staticres.cpp
@@ -75,9 +75,6 @@ const char *RESTORING_NOT_ALLOWED_MSG = "Restoring is not allowed at this time."
const char *RESTART_CONFIRM_MSG = "Do you want to restart your game?";
const char *INV_EMPTY_MSG = "You have nothing in your possesion.";
-const char *HELP_MSG = "Ringworld\rRevenge of the Patriarch\x14\rScummVM Version\r\r\
-\x01 Keyboard shortcuts...\rF2 - Sound options\rF3 - Quit\r\
-F4 - Restart\rF5 - Save game\rF7 - Restore Game\rF10 - Pause game";
const char *QUIT_CONFIRM_MSG = "Do you want to quit playing this game?";
const char *RESTART_MSG = "Do you want to restart this game?";
const char *GAME_PAUSED_MSG = "Game is paused.";
@@ -97,6 +94,9 @@ const char *PICK_BTN_STRING = "Pick";
namespace Ringworld {
// Dialog resources
+const char *HELP_MSG = "Ringworld\rRevenge of the Patriarch\x14\rScummVM Version\r\r\
+\x01 Keyboard shortcuts...\rF2 - Sound options\rF3 - Quit\r\
+F4 - Restart\rF5 - Save game\rF7 - Restore Game\rF10 - Pause game";
const char *WATCH_INTRO_MSG = "Do you wish to watch the introduction?";
const char *START_PLAY_BTN_STRING = " Start Play ";
const char *INTRODUCTION_BTN_STRING = "Introduction";
@@ -129,6 +129,9 @@ const char *DEMO_RESUME_BTN_STRING = "Resume";
namespace BlueForce {
// Dialog resources
+const char *HELP_MSG = "Blue Force\x14\rScummVM Version\r\r\
+Keyboard shortcuts...\rF2 - Sound options\rF3 - Quit\r\
+F4 - Restart\rF5 - Save game\rF7 - Restore Game\rF10 - Pause game";
const char *WATCH_INTRO_MSG = "Do you wish to watch the introduction?";
const char *START_PLAY_BTN_STRING = " Play ";
const char *INTRODUCTION_BTN_STRING = " Watch ";
diff --git a/engines/tsage/staticres.h b/engines/tsage/staticres.h
index b08e92def2..1baf29f33c 100644
--- a/engines/tsage/staticres.h
+++ b/engines/tsage/staticres.h
@@ -42,7 +42,6 @@ extern const char *RESTORING_NOT_ALLOWED_MSG;
extern const char *RESTART_CONFIRM_MSG;
// Dialogs
-extern const char *HELP_MSG;
extern const char *QUIT_CONFIRM_MSG;
extern const char *RESTART_MSG;
extern const char *GAME_PAUSED_MSG;
@@ -62,6 +61,7 @@ extern const char *INV_EMPTY_MSG;
namespace Ringworld {
// Dialog resources
+extern const char *HELP_MSG;
extern const char *WATCH_INTRO_MSG;
extern const char *START_PLAY_BTN_STRING;
extern const char *INTRODUCTION_BTN_STRING;
@@ -95,6 +95,7 @@ extern const char *DEMO_RESUME_BTN_STRING;
namespace BlueForce {
// Dialog resources
+extern const char *HELP_MSG;
extern const char *WATCH_INTRO_MSG;
extern const char *START_PLAY_BTN_STRING;
extern const char *INTRODUCTION_BTN_STRING;