aboutsummaryrefslogtreecommitdiff
path: root/engines/cine/various.cpp
diff options
context:
space:
mode:
authorVincent Hamm2012-08-13 23:58:32 -0700
committerVincent Hamm2012-08-13 23:58:32 -0700
commit92df76fbb3802bf28819c2684d188251c249cdbb (patch)
tree17110bb619efe904b2e9f7865330a59317f0b5f3 /engines/cine/various.cpp
parent478be5f07a8528d19542802a7714cf4fd652f340 (diff)
downloadscummvm-rg350-92df76fbb3802bf28819c2684d188251c249cdbb.tar.gz
scummvm-rg350-92df76fbb3802bf28819c2684d188251c249cdbb.tar.bz2
scummvm-rg350-92df76fbb3802bf28819c2684d188251c249cdbb.zip
CINE: Fix system menu sometimes not appearing in OS
Diffstat (limited to 'engines/cine/various.cpp')
-rw-r--r--engines/cine/various.cpp21
1 files changed, 12 insertions, 9 deletions
diff --git a/engines/cine/various.cpp b/engines/cine/various.cpp
index 9b73ae1101..eccd71cf05 100644
--- a/engines/cine/various.cpp
+++ b/engines/cine/various.cpp
@@ -36,7 +36,7 @@
namespace Cine {
-bool disableSystemMenu = false;
+int16 disableSystemMenu = 0;
bool inMenu;
int16 commandVar3[4];
@@ -341,7 +341,7 @@ void CineEngine::makeSystemMenu() {
int16 mouseX, mouseY, mouseButton;
int16 selectedSave;
- if (!disableSystemMenu) {
+ if (disableSystemMenu != 1) {
inMenu = true;
do {
@@ -544,14 +544,16 @@ int16 buildObjectListCommand(int16 param) {
int16 selectSubObject(int16 x, int16 y, int16 param) {
int16 listSize = buildObjectListCommand(param);
- int16 selectedObject;
+ int16 selectedObject = -1;
bool osExtras = g_cine->getGameType() == Cine::GType_OS;
if (!listSize) {
return -2;
}
- selectedObject = makeMenuChoice(objectListCommand, listSize, x, y, 140, osExtras);
+ if (disableSystemMenu == 0) {
+ selectedObject = makeMenuChoice(objectListCommand, listSize, x, y, 140, osExtras);
+ }
if (selectedObject == -1)
return -1;
@@ -691,9 +693,6 @@ int16 makeMenuChoice(const CommandeType commandList[], uint16 height, uint16 X,
int16 var_4;
SelectionMenu *menu;
- if (disableSystemMenu)
- return -1;
-
paramY = (height * 9) + 10;
if (X + width > 319) {
@@ -810,14 +809,18 @@ void makeActionMenu() {
getMouseData(mouseUpdateStatus, &mouseButton, &mouseX, &mouseY);
if (g_cine->getGameType() == Cine::GType_OS) {
- playerCommand = makeMenuChoice(defaultActionCommand, 6, mouseX, mouseY, 70, true);
+ if(disableSystemMenu == 0) {
+ playerCommand = makeMenuChoice(defaultActionCommand, 6, mouseX, mouseY, 70, true);
+ }
if (playerCommand >= 8000) {
playerCommand -= 8000;
canUseOnObject = canUseOnItemTable[playerCommand];
}
} else {
- playerCommand = makeMenuChoice(defaultActionCommand, 6, mouseX, mouseY, 70);
+ if(disableSystemMenu == 0) {
+ playerCommand = makeMenuChoice(defaultActionCommand, 6, mouseX, mouseY, 70);
+ }
}
inMenu = false;