diff options
author | Eugene Sandulenko | 2009-06-06 17:43:51 +0000 |
---|---|---|
committer | Eugene Sandulenko | 2009-06-06 17:43:51 +0000 |
commit | 2eb7e914e809df2e354281199b3a6824c96bc995 (patch) | |
tree | ff8afe6d003ae48fd8b549b31d9d4c5e1622325a /engines | |
parent | ed797c07090a8c41f3f2451f35aa0cc8d5aa4544 (diff) | |
download | scummvm-rg350-2eb7e914e809df2e354281199b3a6824c96bc995.tar.gz scummvm-rg350-2eb7e914e809df2e354281199b3a6824c96bc995.tar.bz2 scummvm-rg350-2eb7e914e809df2e354281199b3a6824c96bc995.zip |
Fix bug #2026605: "SQ2: Have to wait after dying to do anything."
svn-id: r41250
Diffstat (limited to 'engines')
-rw-r--r-- | engines/agi/agi.cpp | 1 | ||||
-rw-r--r-- | engines/agi/agi.h | 1 | ||||
-rw-r--r-- | engines/agi/cycle.cpp | 5 | ||||
-rw-r--r-- | engines/agi/detection.cpp | 2 | ||||
-rw-r--r-- | engines/agi/menu.cpp | 3 | ||||
-rw-r--r-- | engines/agi/text.cpp | 5 |
6 files changed, 13 insertions, 4 deletions
diff --git a/engines/agi/agi.cpp b/engines/agi/agi.cpp index fb753c817f..dc4764ba23 100644 --- a/engines/agi/agi.cpp +++ b/engines/agi/agi.cpp @@ -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)); diff --git a/engines/agi/agi.h b/engines/agi/agi.h index 7793365c95..3153514196 100644 --- a/engines/agi/agi.h +++ b/engines/agi/agi.h @@ -827,6 +827,7 @@ public: bool _restartGame; Menu* _menu; + bool _menuSelected; char _lastSentence[40]; diff --git a/engines/agi/cycle.cpp b/engines/agi/cycle.cpp index 7539760f61..b105082951 100644 --- a/engines/agi/cycle.cpp +++ b/engines/agi/cycle.cpp @@ -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: diff --git a/engines/agi/detection.cpp b/engines/agi/detection.cpp index e1bb686055..78d56bbbc7 100644 --- a/engines/agi/detection.cpp +++ b/engines/agi/detection.cpp @@ -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() { diff --git a/engines/agi/menu.cpp b/engines/agi/menu.cpp index a408999124..8e7a59746b 100644 --- a/engines/agi/menu.cpp +++ b/engines/agi/menu.cpp @@ -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; } } diff --git a/engines/agi/text.cpp b/engines/agi/text.cpp index 9db15b6615..d8ac1f3374 100644 --- a/engines/agi/text.cpp +++ b/engines/agi/text.cpp @@ -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"); |