aboutsummaryrefslogtreecommitdiff
path: root/engines/agi/op_cmd.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/agi/op_cmd.cpp')
-rw-r--r--engines/agi/op_cmd.cpp16
1 files changed, 9 insertions, 7 deletions
diff --git a/engines/agi/op_cmd.cpp b/engines/agi/op_cmd.cpp
index 7d4b7591d9..edbbb4e1a7 100644
--- a/engines/agi/op_cmd.cpp
+++ b/engines/agi/op_cmd.cpp
@@ -934,12 +934,6 @@ void cmdPopScript(AgiGame *state, AgiEngine *vm, uint8 *parameter) {
}
}
-void cmdHoldKey(AgiGame *state, AgiEngine *vm, uint8 *parameter) {
- if (getVersion() >= 0x3098) {
- state->_vm->_egoHoldKey = true;
- }
-}
-
void cmdDiscardSound(AgiGame *state, AgiEngine *vm, uint8 *parameter) {
if (getVersion() >= 0x2936) {
debug(0, "discard.sound");
@@ -993,9 +987,17 @@ void cmdFenceMouse(AgiGame *state, AgiEngine *vm, uint8 *parameter) {
state->mouseFence.setHeight(varNr4 - varNr1);
}
+// HoldKey was added in 2.425
+// There was no way to disable this mode until 3.098 though
+void cmdHoldKey(AgiGame *state, AgiEngine *vm, uint8 *parameter) {
+ if (getVersion() >= 0x2425) {
+ vm->_keyHoldMode = true;
+ }
+}
+
void cmdReleaseKey(AgiGame *state, AgiEngine *vm, uint8 *parameter) {
if (getVersion() >= 0x3098) {
- state->_vm->_egoHoldKey = false;
+ vm->_keyHoldMode = false;
}
}