diff options
author | Arnaud Boutonné | 2010-12-31 16:25:28 +0000 |
---|---|---|
committer | Arnaud Boutonné | 2010-12-31 16:25:28 +0000 |
commit | 11d47425205d7d26f2368a4326f96657f590d6f1 (patch) | |
tree | 83b0307c627cb9ee80d779980f5fc689e3c17f5f /engines/hugo | |
parent | aa9786604c5beb5d04506284f78053fef442075c (diff) | |
download | scummvm-rg350-11d47425205d7d26f2368a4326f96657f590d6f1.tar.gz scummvm-rg350-11d47425205d7d26f2368a4326f96657f590d6f1.tar.bz2 scummvm-rg350-11d47425205d7d26f2368a4326f96657f590d6f1.zip |
HUGO: Saving a game is no longer authorized when gameOverFl is set
svn-id: r55079
Diffstat (limited to 'engines/hugo')
-rw-r--r-- | engines/hugo/parser_v1d.cpp | 8 | ||||
-rw-r--r-- | engines/hugo/parser_v1w.cpp | 12 |
2 files changed, 15 insertions, 5 deletions
diff --git a/engines/hugo/parser_v1d.cpp b/engines/hugo/parser_v1d.cpp index 976690bde3..6fa0eb735b 100644 --- a/engines/hugo/parser_v1d.cpp +++ b/engines/hugo/parser_v1d.cpp @@ -347,8 +347,12 @@ void Parser_v1d::keyHandler(Common::Event event) { gameStatus.recallFl = true; break; case Common::KEYCODE_F4: // Save game - if (gameStatus.viewState == V_PLAY) - _vm->_file->saveGame(-1, Common::String()); + if (gameStatus.viewState == V_PLAY) { + if (gameStatus.gameOverFl) + Utils::gameOverMsg(); + else + _vm->_file->saveGame(-1, Common::String()); + } break; case Common::KEYCODE_F5: // Restore game _vm->_file->restoreGame(-1); diff --git a/engines/hugo/parser_v1w.cpp b/engines/hugo/parser_v1w.cpp index e3478b2aa4..36d2c532a8 100644 --- a/engines/hugo/parser_v1w.cpp +++ b/engines/hugo/parser_v1w.cpp @@ -99,8 +99,12 @@ void Parser_v1w::keyHandler(Common::Event event) { gameStatus.recallFl = true; break; case Common::KEYCODE_F4: // Save game - if (gameStatus.viewState == V_PLAY) - _vm->_file->saveGame(-1, Common::String()); + if (gameStatus.viewState == V_PLAY) { + if (gameStatus.gameOverFl) + Utils::gameOverMsg(); + else + _vm->_file->saveGame(-1, Common::String()); + } break; case Common::KEYCODE_F5: // Restore game _vm->_file->restoreGame(-1); @@ -108,7 +112,9 @@ void Parser_v1w::keyHandler(Common::Event event) { gameStatus.viewState = V_PLAY; break; case Common::KEYCODE_F6: // Inventory - if ((gameStatus.inventoryState == I_OFF) && (gameStatus.viewState == V_PLAY)) { + if (gameStatus.gameOverFl) { + Utils::gameOverMsg(); + } else if ((gameStatus.inventoryState == I_OFF) && (gameStatus.viewState == V_PLAY)) { gameStatus.inventoryState = I_DOWN; gameStatus.viewState = V_INVENT; } else if (gameStatus.inventoryState == I_ACTIVE) { |