aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/hugo/parser_v1d.cpp8
-rw-r--r--engines/hugo/parser_v1w.cpp12
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) {