mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-15 06:08:35 +00:00
Fix bug #2026605: "SQ2: Have to wait after dying to do anything."
svn-id: r41250
This commit is contained in:
parent
ed797c0709
commit
2eb7e914e8
@ -674,6 +674,7 @@ AgiEngine::AgiEngine(OSystem *syst, const AGIGameDescription *gameDesc) : AgiBas
|
||||
_intobj = NULL;
|
||||
|
||||
_menu = NULL;
|
||||
_menuSelected = false;
|
||||
|
||||
_lastSentence[0] = 0;
|
||||
memset(&_stringdata, 0, sizeof(struct StringData));
|
||||
|
@ -827,6 +827,7 @@ public:
|
||||
bool _restartGame;
|
||||
|
||||
Menu* _menu;
|
||||
bool _menuSelected;
|
||||
|
||||
char _lastSentence[40];
|
||||
|
||||
|
@ -269,9 +269,8 @@ process_key:
|
||||
}
|
||||
|
||||
// commented out to close Sarien bug #438872
|
||||
// if (key)
|
||||
// game.keypress = key;
|
||||
|
||||
if (key)
|
||||
_game.keypress = key;
|
||||
}
|
||||
break;
|
||||
case INPUT_GETSTRING:
|
||||
|
@ -1178,7 +1178,7 @@ Common::Error AgiBase::saveGameState(int slot, const char *desc) {
|
||||
}
|
||||
|
||||
bool AgiBase::canLoadGameStateCurrently() {
|
||||
return (!(getGameType() == GType_PreAGI) && getflag(fMenusWork) && !_noSaveLoadAllowed && _game.inputEnabled);
|
||||
return (!(getGameType() == GType_PreAGI) && getflag(fMenusWork) && !_noSaveLoadAllowed);
|
||||
}
|
||||
|
||||
bool AgiBase::canSaveGameStateCurrently() {
|
||||
|
@ -383,6 +383,9 @@ bool Menu::keyhandler(int key) {
|
||||
// Fixes bug #1751390 - "LSL: after changing game speed, space key turn unfunctional"
|
||||
if (d->event == 0x20)
|
||||
_vm->_game.evKeyp[d->event].data = d->event + 1;
|
||||
|
||||
_vm->_menuSelected = true;
|
||||
|
||||
goto exit_menu;
|
||||
}
|
||||
}
|
||||
|
@ -475,10 +475,15 @@ int AgiEngine::print(const char *p, int lin, int col, int len) {
|
||||
_game.msgBoxTicks = getvar(vWindowReset) * 10;
|
||||
setvar(vKey, 0);
|
||||
|
||||
_menuSelected = false;
|
||||
|
||||
do {
|
||||
if (getflag(fRestoreJustRan))
|
||||
break;
|
||||
|
||||
if (_menuSelected)
|
||||
break;
|
||||
|
||||
mainCycle();
|
||||
if (_game.keypress == KEY_ENTER) {
|
||||
debugC(4, kDebugLevelText, "KEY_ENTER");
|
||||
|
Loading…
Reference in New Issue
Block a user