aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/lure/game.cpp18
-rw-r--r--engines/lure/game.h1
2 files changed, 18 insertions, 1 deletions
diff --git a/engines/lure/game.cpp b/engines/lure/game.cpp
index 98089f5668..938cd173a8 100644
--- a/engines/lure/game.cpp
+++ b/engines/lure/game.cpp
@@ -193,7 +193,8 @@ void Game::execute() {
bool handled = true;
switch (events.event().kbd.keycode) {
case Common::KEYCODE_F5:
- SaveRestoreDialog::show(true);
+ if (isMenuAvailable())
+ SaveRestoreDialog::show(true);
break;
case Common::KEYCODE_F7:
@@ -1015,6 +1016,21 @@ bool Game::getYN() {
return result;
}
+bool Game::isMenuAvailable() {
+ Resources &res = Resources::getReference();
+ Room &room = Room::getReference();
+ uint16 oldRoomNumber = res.fieldList().getField(OLD_ROOM_NUMBER);
+
+ if (oldRoomNumber != 0)
+ // Viewing a room remotely - so the menu isn't available
+ return false;
+
+ else if ((room.cursorState() == CS_TALKING) || (res.getTalkState() != TALK_NONE))
+ return false;
+
+ return true;
+}
+
void Game::saveToStream(WriteStream *stream) {
stream->writeByte(_fastTextFlag);
stream->writeByte(_soundFlag);
diff --git a/engines/lure/game.h b/engines/lure/game.h
index d5f57aa8ff..ea066335b8 100644
--- a/engines/lure/game.h
+++ b/engines/lure/game.h
@@ -66,6 +66,7 @@ private:
void displayBarrelAnimation();
void handleBootParam(int value);
bool getYN();
+ bool isMenuAvailable();
public:
Game();
virtual ~Game();