mirror of
https://github.com/libretro/scummvm.git
synced 2025-04-02 14:51:40 +00:00
CINE: Fix system menu sometimes not appearing in OS
This commit is contained in:
parent
478be5f07a
commit
92df76fbb3
@ -189,6 +189,8 @@ void CineEngine::initialize() {
|
||||
g_cine->_messageTable.clear();
|
||||
resetObjectTable();
|
||||
|
||||
disableSystemMenu = 1;
|
||||
|
||||
var8 = 0;
|
||||
|
||||
var2 = var3 = var4 = var5 = 0;
|
||||
|
@ -249,14 +249,17 @@ void FWRenderer::drawCommand() {
|
||||
unsigned int i;
|
||||
int x = 10, y = _cmdY;
|
||||
|
||||
drawPlainBox(x, y, 301, 11, 0);
|
||||
drawBorder(x - 1, y - 1, 302, 12, 2);
|
||||
if(disableSystemMenu == 0)
|
||||
{
|
||||
drawPlainBox(x, y, 301, 11, 0);
|
||||
drawBorder(x - 1, y - 1, 302, 12, 2);
|
||||
|
||||
x += 2;
|
||||
y += 2;
|
||||
x += 2;
|
||||
y += 2;
|
||||
|
||||
for (i = 0; i < _cmd.size(); i++) {
|
||||
x = drawChar(_cmd[i], x, y);
|
||||
for (i = 0; i < _cmd.size(); i++) {
|
||||
x = drawChar(_cmd[i], x, y);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -121,7 +121,7 @@ static void processEvent(Common::Event &event) {
|
||||
}
|
||||
break;
|
||||
case Common::KEYCODE_F10:
|
||||
if (!disableSystemMenu && !inMenu) {
|
||||
if (!inMenu) {
|
||||
g_cine->makeSystemMenu();
|
||||
}
|
||||
break;
|
||||
@ -384,8 +384,8 @@ void CineEngine::mainLoop(int bootScriptIdx) {
|
||||
playerAction = false;
|
||||
|
||||
_messageLen <<= 3;
|
||||
if (_messageLen < 0x800)
|
||||
_messageLen = 0x800;
|
||||
if (_messageLen < 800)
|
||||
_messageLen = 800;
|
||||
|
||||
do {
|
||||
manageEvents();
|
||||
|
@ -1861,7 +1861,7 @@ int FWScript::o1_disableSystemMenu() {
|
||||
byte param = getNextByte();
|
||||
|
||||
debugC(5, kCineDebugScript, "Line: %d: disableSystemMenu(%d)", _line, param);
|
||||
disableSystemMenu = (param != 0);
|
||||
disableSystemMenu = param;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
|
@ -41,7 +41,7 @@ void makeActionMenu();
|
||||
void waitPlayerInput();
|
||||
void setTextWindow(uint16 param1, uint16 param2, uint16 param3, uint16 param4);
|
||||
|
||||
extern bool disableSystemMenu;
|
||||
extern int16 disableSystemMenu;
|
||||
extern bool inMenu;
|
||||
|
||||
extern CommandeType currentSaveName[10];
|
||||
|
Loading…
x
Reference in New Issue
Block a user