From 72a3cae20b081c28f9b55b3d1440739d6aa2e4e1 Mon Sep 17 00:00:00 2001 From: Martin Kiewitz Date: Thu, 4 Feb 2016 23:24:59 +0100 Subject: 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. --- engines/agi/op_cmd.cpp | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) (limited to 'engines/agi/op_cmd.cpp') 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) { -- cgit v1.2.3