aboutsummaryrefslogtreecommitdiff
path: root/engines/tsage/blue_force/blueforce_logic.cpp
diff options
context:
space:
mode:
authorPaul Gilbert2011-09-08 22:44:53 +1000
committerPaul Gilbert2011-09-08 22:44:53 +1000
commitd1298c47645e89748a498a59bf321964bd1d18ad (patch)
tree84d7e4971f78069eab5700915d1e85817fbb8fbd /engines/tsage/blue_force/blueforce_logic.cpp
parente6828dada91bcc268917b502cc2cd72975ec2559 (diff)
downloadscummvm-rg350-d1298c47645e89748a498a59bf321964bd1d18ad.tar.gz
scummvm-rg350-d1298c47645e89748a498a59bf321964bd1d18ad.tar.bz2
scummvm-rg350-d1298c47645e89748a498a59bf321964bd1d18ad.zip
TSAGE: Fix fallback item description display for scenes
Diffstat (limited to 'engines/tsage/blue_force/blueforce_logic.cpp')
-rw-r--r--engines/tsage/blue_force/blueforce_logic.cpp22
1 files changed, 20 insertions, 2 deletions
diff --git a/engines/tsage/blue_force/blueforce_logic.cpp b/engines/tsage/blue_force/blueforce_logic.cpp
index 616a7738af..c91007e768 100644
--- a/engines/tsage/blue_force/blueforce_logic.cpp
+++ b/engines/tsage/blue_force/blueforce_logic.cpp
@@ -567,7 +567,7 @@ void SceneExt::checkGun() {
BF_GLOBALS._sound3.play(4);
}
-void SceneExt::display(CursorType action) {
+bool SceneExt::display(CursorType action) {
switch (action) {
case CURSOR_LOOK:
SceneItem::display2(9000, BF_GLOBALS._randomSource.getRandomNumber(2));
@@ -584,8 +584,12 @@ void SceneExt::display(CursorType action) {
default:
if (action < BF_LAST_INVENT)
SceneItem::display2(9002, (int)action);
+ else
+ return false;
break;
}
+
+ return true;
}
void SceneExt::gunDisplay() {
@@ -687,8 +691,22 @@ void SceneHandlerExt::process(Event &event) {
}
SceneHandler::process(event);
+}
- // TODO: All the new stuff from Blue Force
+void SceneHandlerExt::playerAction(Event &event) {
+ if (BF_GLOBALS._events.getCursor() == INV_DOG_WHISTLE) {
+ SceneItem::display2(1, 6);
+ event.handled = true;
+ }
+}
+
+void SceneHandlerExt::processEnd(Event &event) {
+ // Check for a fallback text display for the given cursor/item being used in the scene
+ if (!event.handled && BF_GLOBALS._sceneManager._scene) {
+ CursorType cursor = BF_GLOBALS._events.getCursor();
+ if (((SceneExt *)BF_GLOBALS._sceneManager._scene)->display(cursor))
+ event.handled = true;
+ }
}
/*--------------------------------------------------------------------------*/