Fix bug #2026605: "SQ2: Have to wait after dying to do anything."

svn-id: r41250
This commit is contained in:
Eugene Sandulenko 2009-06-06 17:43:51 +00:00
parent ed797c0709
commit 2eb7e914e8
6 changed files with 13 additions and 4 deletions

View File

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

View File

@ -827,6 +827,7 @@ public:
bool _restartGame;
Menu* _menu;
bool _menuSelected;
char _lastSentence[40];

View File

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

View File

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

View File

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

View File

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