aboutsummaryrefslogtreecommitdiff
path: root/engines/agi/op_cmd.cpp
diff options
context:
space:
mode:
authorMartin Kiewitz2016-02-04 23:24:59 +0100
committerMartin Kiewitz2016-02-04 23:24:59 +0100
commit72a3cae20b081c28f9b55b3d1440739d6aa2e4e1 (patch)
treef44893d69359aafcb0ee71b301f8059b3eff464f /engines/agi/op_cmd.cpp
parent4b7d49dcff2377a6fe95af634bd5a0de5bf78326 (diff)
downloadscummvm-rg350-72a3cae20b081c28f9b55b3d1440739d6aa2e4e1.tar.gz
scummvm-rg350-72a3cae20b081c28f9b55b3d1440739d6aa2e4e1.tar.bz2
scummvm-rg350-72a3cae20b081c28f9b55b3d1440739d6aa2e4e1.zip
AGI: Restrict hide.mouse to AGI3 only
Command seems to not have existed in at least 2.917 (PC). Space Quest 2 on Apple IIgs calls it during intro, but never calls show.mouse. SQ2 on other platforms does not make this call. Mouse cursor is not hidden under emulator, so atm I have to assume that it's either a dodgy script or there was something else hacked into the interpreter back then. This fixes Space Quest 2 Apple IIgs losing mouse cursor, when the intro is not canceled.
Diffstat (limited to 'engines/agi/op_cmd.cpp')
-rw-r--r--engines/agi/op_cmd.cpp21
1 files changed, 15 insertions, 6 deletions
diff --git a/engines/agi/op_cmd.cpp b/engines/agi/op_cmd.cpp
index edbbb4e1a7..3f8630521d 100644
--- a/engines/agi/op_cmd.cpp
+++ b/engines/agi/op_cmd.cpp
@@ -948,7 +948,14 @@ void cmdShowMouse(AgiGame *state, AgiEngine *vm, uint8 *parameter) {
}
}
+// Seems to have been added for AGI3, at least according to PC AGI
+// Space Quest 2 on Apple IIgs (using AGI ) calls it during the spaceship cutscene in the intro
+// but show.mouse is never called afterwards. Game running under emulator doesn't seem to hide the mouse cursor.
+// TODO: figure out, what exactly happens. Probably some hacked-in command and not related to mouse cursor for that game?
void cmdHideMouse(AgiGame *state, AgiEngine *vm, uint8 *parameter) {
+ if (getVersion() < 0x3000)
+ return;
+
// WORKAROUND: Turns off current movement that's being caused with the mouse.
// This fixes problems with too many popup boxes appearing in the Amiga
// Gold Rush's copy protection failure scene (i.e. the hanging scene, logic.192).
@@ -990,15 +997,17 @@ void cmdFenceMouse(AgiGame *state, AgiEngine *vm, uint8 *parameter) {
// 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;
- }
+ if (getVersion() < 0x2425)
+ return;
+
+ vm->_keyHoldMode = true;
}
void cmdReleaseKey(AgiGame *state, AgiEngine *vm, uint8 *parameter) {
- if (getVersion() >= 0x3098) {
- vm->_keyHoldMode = false;
- }
+ if (getVersion() < 0x3098)
+ return;
+
+ vm->_keyHoldMode = false;
}
void cmdAdjEgoMoveToXY(AgiGame *state, AgiEngine *vm, uint8 *parameter) {