aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKari Salminen2008-08-12 14:44:44 +0000
committerKari Salminen2008-08-12 14:44:44 +0000
commit811e4b3128de561289a19806c854ea05a9ab96b5 (patch)
tree0dc80ad20fb7c6643cab9ab7a06084e46e8a973b
parentc935a09ef53a594f408d3279cd30c783bade9ed1 (diff)
downloadscummvm-rg350-811e4b3128de561289a19806c854ea05a9ab96b5.tar.gz
scummvm-rg350-811e4b3128de561289a19806c854ea05a9ab96b5.tar.bz2
scummvm-rg350-811e4b3128de561289a19806c854ea05a9ab96b5.zip
Implemented Operation Stealth specific parts of processInventory and added another mouse button waiting loop into the function's end (It's in both Future Wars and Operation Stealth). Fixes inventory showing in Operation Stealth.
svn-id: r33795
-rw-r--r--engines/cine/various.cpp23
1 files changed, 21 insertions, 2 deletions
diff --git a/engines/cine/various.cpp b/engines/cine/various.cpp
index 07f524852a..6da2931c8a 100644
--- a/engines/cine/various.cpp
+++ b/engines/cine/various.cpp
@@ -1416,19 +1416,38 @@ void drawDoubleMessageBox(int16 x, int16 y, int16 width, int16 currentY, int16 c
}
void processInventory(int16 x, int16 y) {
- int16 listSize = buildObjectListCommand(-2);
uint16 button;
+ int menuWidth;
+ int listSize;
+ int commandParam;
+
+ if (g_cine->getGameType() == Cine::GType_FW) {
+ menuWidth = 140;
+ commandParam = -2;
+ } else { // Operation Stealth
+ menuWidth = 160;
+ commandParam = -3;
+ }
+
+ listSize = buildObjectListCommand(commandParam);
if (!listSize)
return;
- renderer->drawMenu(objectListCommand, listSize, x, y, 140, -1);
+ renderer->drawMenu(objectListCommand, listSize, x, y, menuWidth, -1);
renderer->blit();
do {
manageEvents();
getMouseData(mouseUpdateStatus, &button, &dummyU16, &dummyU16);
} while (!button);
+
+ do {
+ manageEvents();
+ getMouseData(mouseUpdateStatus, &button, &dummyU16, &dummyU16);
+ } while (button);
+
+ // TODO: Both Future Wars and Operation Stealth call showMouse, drawMouse or something similar here.
}
int16 buildObjectListCommand(int16 param) {