[Scummvm-cvs-logs] scummvm master -> 72a3cae20b081c28f9b55b3d1440739d6aa2e4e1

m-kiewitz m_kiewitz at users.sourceforge.net
Thu Feb 4 23:25:23 CET 2016


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
72a3cae20b AGI: Restrict hide.mouse to AGI3 only


Commit: 72a3cae20b081c28f9b55b3d1440739d6aa2e4e1
    https://github.com/scummvm/scummvm/commit/72a3cae20b081c28f9b55b3d1440739d6aa2e4e1
Author: Martin Kiewitz (m_kiewitz at users.sourceforge.net)
Date: 2016-02-04T23:24:59+01:00

Commit Message:
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.

Changed paths:
    engines/agi/op_cmd.cpp



diff --git a/engines/agi/op_cmd.cpp b/engines/agi/op_cmd.cpp
index edbbb4e..3f86305 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) {






More information about the Scummvm-git-logs mailing list