aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorPaul Gilbert2011-10-31 11:35:04 +1100
committerPaul Gilbert2011-10-31 11:35:04 +1100
commitb6239f3b3da789fc996ff3f2310777be9de1e298 (patch)
tree783471845087a0f43681c17126be9d7a969911a7 /engines
parentef1f96b674fe4840c553e915f02eae45666cdf3b (diff)
downloadscummvm-rg350-b6239f3b3da789fc996ff3f2310777be9de1e298.tar.gz
scummvm-rg350-b6239f3b3da789fc996ff3f2310777be9de1e298.tar.bz2
scummvm-rg350-b6239f3b3da789fc996ff3f2310777be9de1e298.zip
TSAGE: Display UI cursor correctly in R2RW
Diffstat (limited to 'engines')
-rw-r--r--engines/tsage/blue_force/blueforce_logic.cpp2
-rw-r--r--engines/tsage/events.cpp1
-rw-r--r--engines/tsage/globals.cpp2
-rw-r--r--engines/tsage/ringworld2/ringworld2_logic.cpp16
-rw-r--r--engines/tsage/ringworld2/ringworld2_logic.h7
-rw-r--r--engines/tsage/user_interface.cpp11
6 files changed, 33 insertions, 6 deletions
diff --git a/engines/tsage/blue_force/blueforce_logic.cpp b/engines/tsage/blue_force/blueforce_logic.cpp
index 91fd5d3197..77609715c7 100644
--- a/engines/tsage/blue_force/blueforce_logic.cpp
+++ b/engines/tsage/blue_force/blueforce_logic.cpp
@@ -955,7 +955,7 @@ void SceneHandlerExt::process(Event &event) {
return;
}
- // If the user clicks the button whislt the introduction is active, prompt for playing the game
+ // If the user clicks the button whilst the introduction is active, prompt for playing the game
if ((BF_GLOBALS._dayNumber == 0) && (event.eventType == EVENT_BUTTON_DOWN)) {
// Prompt user for whether to start play or watch introduction
BF_GLOBALS._player.enableControl();
diff --git a/engines/tsage/events.cpp b/engines/tsage/events.cpp
index d42b996e41..8958482404 100644
--- a/engines/tsage/events.cpp
+++ b/engines/tsage/events.cpp
@@ -320,7 +320,6 @@ void EventsClass::setCursor(Graphics::Surface &cursor, int transColor, const Com
}
void EventsClass::setCursor(GfxSurface &cursor) {
- // TODO: Find proper parameters for this form in Blue Force
Graphics::Surface s = cursor.lockSurface();
const byte *cursorData = (const byte *)s.getBasePtr(0, 0);
diff --git a/engines/tsage/globals.cpp b/engines/tsage/globals.cpp
index bb89a26e37..23898b5449 100644
--- a/engines/tsage/globals.cpp
+++ b/engines/tsage/globals.cpp
@@ -147,7 +147,7 @@ Globals::Globals() : _dialogCenter(160, 140), _gfxManagerInstance(_screenSurface
case GType_Ringworld2:
_inventory = new Ringworld2::Ringworld2InvObjectList();
_game = new Ringworld2::Ringworld2Game();
- _sceneHandler = new SceneHandler();
+ _sceneHandler = new Ringworld2::SceneHandlerExt();
break;
case GType_Geekwad:
diff --git a/engines/tsage/ringworld2/ringworld2_logic.cpp b/engines/tsage/ringworld2/ringworld2_logic.cpp
index f9ac2efcbf..642d265e42 100644
--- a/engines/tsage/ringworld2/ringworld2_logic.cpp
+++ b/engines/tsage/ringworld2/ringworld2_logic.cpp
@@ -224,6 +224,22 @@ void SceneExt::refreshBackground(int xAmount, int yAmount) {
/*--------------------------------------------------------------------------*/
+void SceneHandlerExt::postInit(SceneObjectList *OwnerList) {
+ SceneHandler::postInit(OwnerList);
+}
+
+void SceneHandlerExt::process(Event &event) {
+ if (T2_GLOBALS._uiElements._active) {
+ T2_GLOBALS._uiElements.process(event);
+ if (event.handled)
+ return;
+ }
+
+ SceneHandler::process(event);
+}
+
+/*--------------------------------------------------------------------------*/
+
DisplayHotspot::DisplayHotspot(int regionId, ...) {
_sceneRegionId = regionId;
diff --git a/engines/tsage/ringworld2/ringworld2_logic.h b/engines/tsage/ringworld2/ringworld2_logic.h
index b12978344c..b0f388a2ae 100644
--- a/engines/tsage/ringworld2/ringworld2_logic.h
+++ b/engines/tsage/ringworld2/ringworld2_logic.h
@@ -73,6 +73,13 @@ public:
void clearScreen();
};
+class SceneHandlerExt: public SceneHandler {
+public:
+ virtual void postInit(SceneObjectList *OwnerList = NULL);
+ virtual void process(Event &event);
+};
+
+
class DisplayHotspot : public SceneObject {
private:
Common::Array<int> _actions;
diff --git a/engines/tsage/user_interface.cpp b/engines/tsage/user_interface.cpp
index f6eae80d9c..9657d25875 100644
--- a/engines/tsage/user_interface.cpp
+++ b/engines/tsage/user_interface.cpp
@@ -266,7 +266,10 @@ void UICollection::draw() {
/*--------------------------------------------------------------------------*/
UIElements::UIElements(): UICollection() {
- _cursorVisage.setVisage(1, 5);
+ if (g_vm->getGameID() == GType_Ringworld2)
+ _cursorVisage.setVisage(5, 1);
+ else
+ _cursorVisage.setVisage(1, 5);
g_saver->addLoadNotifier(&UIElements::loadNotifierProc);
_characterIndex = 0;
}
@@ -302,7 +305,8 @@ void UIElements::synchronize(Serializer &s) {
}
void UIElements::process(Event &event) {
- if (_clearScreen && GLOBALS._player._enabled && (GLOBALS._sceneManager._sceneNumber != 50)) {
+ if (_clearScreen && GLOBALS._player._enabled &&
+ ((g_vm->getGameID() != GType_BlueForce) || (GLOBALS._sceneManager._sceneNumber != 50))) {
if (_bounds.contains(event.mousePos)) {
// Cursor inside UI area
if (!_cursorChanged) {
@@ -310,7 +314,8 @@ void UIElements::process(Event &event) {
// Inventory icon being displayed, so leave alone
} else {
// Change to the inventory use cursor
- GfxSurface surface = _cursorVisage.getFrame(6);
+ int cursorId = (g_vm->getGameID() == GType_Ringworld2) ? 11 : 6;
+ GfxSurface surface = _cursorVisage.getFrame(cursorId);
GLOBALS._events.setCursor(surface);
}
_cursorChanged = true;