From c89dcb6e79ef9cf76eff164095b5efe4bd52ceb6 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Fri, 24 Nov 2006 20:25:55 +0000 Subject: Let F10 work in all expected cases. svn-id: r24785 --- engines/cine/main_loop.cpp | 2 +- engines/cine/script.cpp | 12 ++++++------ engines/cine/script.h | 2 +- engines/cine/various.cpp | 10 +++++----- engines/cine/various.h | 2 +- 5 files changed, 14 insertions(+), 14 deletions(-) (limited to 'engines') diff --git a/engines/cine/main_loop.cpp b/engines/cine/main_loop.cpp index f07db1c6c3..7eafa0b88e 100644 --- a/engines/cine/main_loop.cpp +++ b/engines/cine/main_loop.cpp @@ -119,7 +119,7 @@ void manageEvents(int count) { } break; case 291: // F10 - if (allowPlayerInput && !inMenu) { + if (!disableSystemMenu && !inMenu) { g_cine->makeSystemMenu(); } break; diff --git a/engines/cine/script.cpp b/engines/cine/script.cpp index 3fc4edfa3b..c0c1e82b10 100644 --- a/engines/cine/script.cpp +++ b/engines/cine/script.cpp @@ -199,7 +199,7 @@ void setupOpcodes() { o1_playSample, /* 78 */ o1_playSample, - o1_allowSystemMenu, + o1_disableSystemMenu, o1_loadMask5, o1_unloadMask5 }; @@ -359,7 +359,7 @@ void setupOpcodes() { o1_playSample, /* 78 */ o2_op78, - o1_allowSystemMenu, + o1_disableSystemMenu, o1_loadMask5, o1_unloadMask5, /* 7C */ @@ -1778,11 +1778,11 @@ void o1_playSample() { } } -void o1_allowSystemMenu() { +void o1_disableSystemMenu() { byte param = getNextByte(); - debugC(5, kCineDebugScript, "Line: %d: allowSystemMenu(%d)", _currentLine, param); - allowSystemMenu = param; + debugC(5, kCineDebugScript, "Line: %d: disableSystemMenu(%d)", _currentLine, param); + disableSystemMenu = (param != 0); } void o1_loadMask5() { @@ -3191,7 +3191,7 @@ void decompileScript(byte *scriptPtr, int16 *stackPtr, uint16 scriptSize, uint16 param = *(localScriptPtr + position); position++; - sprintf(lineBuffer, "allowSystemMenu(%d)\n", param); + sprintf(lineBuffer, "disableSystemMenu(%d)\n", param); break; } diff --git a/engines/cine/script.h b/engines/cine/script.h index c840cbb231..213e6814e9 100644 --- a/engines/cine/script.h +++ b/engines/cine/script.h @@ -139,7 +139,7 @@ void o1_op72(); void o1_op73(); void o1_playSample(); void o1_playSample(); -void o1_allowSystemMenu(); +void o1_disableSystemMenu(); void o1_loadMask5(); void o1_unloadMask5(); diff --git a/engines/cine/various.cpp b/engines/cine/various.cpp index f479f06d25..700330ff05 100644 --- a/engines/cine/various.cpp +++ b/engines/cine/various.cpp @@ -35,7 +35,7 @@ namespace Cine { -int16 allowSystemMenu = 0; +bool disableSystemMenu = false; bool inMenu; int16 commandVar3[4]; @@ -911,7 +911,7 @@ void CineEngine::makeSystemMenu(void) { int16 mouseY; int16 systemCommand; - if (!allowSystemMenu) { + if (!disableSystemMenu) { inMenu = true; manageEvents(); @@ -1332,7 +1332,7 @@ void makeCommandLine(void) { } } - if (allowSystemMenu == 0) { + if (!disableSystemMenu) { isDrawCommandEnabled = 1; } } @@ -1362,7 +1362,7 @@ int16 makeMenuChoice(const commandeType commandList[], uint16 height, uint16 X, int16 oldSelection; int16 var_4; - if (allowSystemMenu) + if (disableSystemMenu) return -1; paramY = (height * 9) + 10; @@ -1594,7 +1594,7 @@ int16 makeMenuChoice2(const commandeType commandList[], uint16 height, uint16 X, int16 oldSelection; int16 var_4; - if (allowSystemMenu) + if (disableSystemMenu) return -1; paramY = (height * 9) + 10; diff --git a/engines/cine/various.h b/engines/cine/various.h index 782d462ece..cdad84925c 100644 --- a/engines/cine/various.h +++ b/engines/cine/various.h @@ -39,7 +39,7 @@ int16 makeMenuChoice2(const commandeType commandList[], uint16 height, uint16 X, void makeCommandLine(void); void makeActionMenu(void); -extern int16 allowSystemMenu; +extern bool disableSystemMenu; extern bool inMenu; struct unk1Struct { -- cgit v1.2.3