Let F10 work in all expected cases.

svn-id: r24785
This commit is contained in:
Eugene Sandulenko 2006-11-24 20:25:55 +00:00
parent 35b712e1ea
commit c89dcb6e79
5 changed files with 14 additions and 14 deletions

View File

@ -119,7 +119,7 @@ void manageEvents(int count) {
}
break;
case 291: // F10
if (allowPlayerInput && !inMenu) {
if (!disableSystemMenu && !inMenu) {
g_cine->makeSystemMenu();
}
break;

View File

@ -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;
}

View File

@ -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();

View File

@ -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;

View File

@ -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 {