aboutsummaryrefslogtreecommitdiff
path: root/engines/lure/game.cpp
diff options
context:
space:
mode:
authorPaul Gilbert2006-07-30 12:15:52 +0000
committerPaul Gilbert2006-07-30 12:15:52 +0000
commit1f8066c333e24d0abc3c552b8ef517109058dff6 (patch)
treee694444694cd2050f66f25415955e1e7bffc9771 /engines/lure/game.cpp
parent0849e46541895e9f7e4fe597f2dd3dcf931ef479 (diff)
downloadscummvm-rg350-1f8066c333e24d0abc3c552b8ef517109058dff6.tar.gz
scummvm-rg350-1f8066c333e24d0abc3c552b8ef517109058dff6.tar.bz2
scummvm-rg350-1f8066c333e24d0abc3c552b8ef517109058dff6.zip
Added proper item selection handling for the ASK action
svn-id: r23632
Diffstat (limited to 'engines/lure/game.cpp')
-rw-r--r--engines/lure/game.cpp17
1 files changed, 12 insertions, 5 deletions
diff --git a/engines/lure/game.cpp b/engines/lure/game.cpp
index 33d1c79866..0f83089b19 100644
--- a/engines/lure/game.cpp
+++ b/engines/lure/game.cpp
@@ -348,15 +348,22 @@ void Game::handleRightClickMenu() {
breakFlag = true;
break;
+ case ASK:
+ hotspot = res.getHotspot(room.hotspotId());
+ strings.getString(hotspot->nameId, statusLine);
+ strcat(statusLine, " for ");
+ statusLine += strlen(statusLine);
+
+ itemId = PopupMenu::ShowItems(GET);
+ breakFlag = ((itemId != 0xffff) && (itemId != 0xfffe));
+ if (breakFlag)
+ hotspot = res.getHotspot(itemId);
+ break;
+
case GIVE:
case USE:
case EXAMINE:
case DRINK:
- if (action == ASK) {
- strings.getString(hotspot->nameId, statusLine);
- strcat(statusLine, " for ");
- }
-
hasItems = (res.numInventoryItems() != 0);
if (!hasItems)
strcat(statusLine, "(nothing)");