aboutsummaryrefslogtreecommitdiff
path: root/engines/zvision/core
diff options
context:
space:
mode:
authorFilippos Karapetis2015-01-21 00:33:54 +0200
committerFilippos Karapetis2015-01-21 00:33:54 +0200
commit0776709f3175da3ebca69f8a4866d4d98a1e9be9 (patch)
tree3890f69a056c398422552cd62b02f4a48e31ae88 /engines/zvision/core
parent1d6a80734969d2475c7d97945a74225b12dae297 (diff)
downloadscummvm-rg350-0776709f3175da3ebca69f8a4866d4d98a1e9be9.tar.gz
scummvm-rg350-0776709f3175da3ebca69f8a4866d4d98a1e9be9.tar.bz2
scummvm-rg350-0776709f3175da3ebca69f8a4866d4d98a1e9be9.zip
ZVISION: Do not process cheat codes while in the game menus
This prevents the cheat codes from being accidentally triggered when using the save screen, for example
Diffstat (limited to 'engines/zvision/core')
-rw-r--r--engines/zvision/core/events.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/engines/zvision/core/events.cpp b/engines/zvision/core/events.cpp
index 4c7d395892..9cf5d04a7a 100644
--- a/engines/zvision/core/events.cpp
+++ b/engines/zvision/core/events.cpp
@@ -93,6 +93,11 @@ void ZVision::shortKeys(Common::Event event) {
}
void ZVision::cheatCodes(uint8 key) {
+ Location loc = _scriptManager->getCurrentLocation();
+ // Do not process cheat codes while in the game menus
+ if (loc.world == 'g' && loc.room == 'j')
+ return;
+
pushKeyToCheatBuf(key);
if (getGameId() == GID_GRANDINQUISITOR) {
@@ -146,7 +151,6 @@ void ZVision::cheatCodes(uint8 key) {
}
if (checkCode("HELLOSAILOR")) {
- Location loc = _scriptManager->getCurrentLocation();
Audio::AudioStream *soundStream;
if (loc.world == 'v' && loc.room == 'b' && loc.node == '1' && loc.view == '0') {
soundStream = makeRawZorkStream("v000hpta.raw", this);