[Scummvm-git-logs] scummvm master -> 81ce20b4df4f90b4bc35506dd6e2b9381384b339

AndywinXp noreply at scummvm.org
Tue Jun 6 21:53:01 UTC 2023


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:
81ce20b4df SCUMM: INDY3 (Mac): Fix #14498


Commit: 81ce20b4df4f90b4bc35506dd6e2b9381384b339
    https://github.com/scummvm/scummvm/commit/81ce20b4df4f90b4bc35506dd6e2b9381384b339
Author: AndywinXp (andywinxp at gmail.com)
Date: 2023-06-06T23:52:55+02:00

Commit Message:
SCUMM: INDY3 (Mac): Fix #14498

Cursor is handled differently in this Mac port, i.e. without
setting values in the _cursor object. The CursorManager
doesn't exactly like that, so in this commit I've provided a
post-load fix and a fix for the cursor initialization itself.

Changed paths:
    engines/scumm/cursor.cpp
    engines/scumm/saveload.cpp


diff --git a/engines/scumm/cursor.cpp b/engines/scumm/cursor.cpp
index 73efd14a9fe..443ea4ce3b8 100644
--- a/engines/scumm/cursor.cpp
+++ b/engines/scumm/cursor.cpp
@@ -1009,6 +1009,11 @@ void ScummEngine_v5::setBuiltinCursor(int idx) {
 		};
 
 		_cursor.animate = 0;
+		_cursor.width = 15;
+		_cursor.height = 15;
+		_cursor.hotspotX = 7;
+		_cursor.hotspotY = 7;
+
 		CursorMan.replaceCursor(buf, 15, 15, 7, 7, 0xFF);
 		return;
 	}
diff --git a/engines/scumm/saveload.cpp b/engines/scumm/saveload.cpp
index f261533fb91..ca42ec95a28 100644
--- a/engines/scumm/saveload.cpp
+++ b/engines/scumm/saveload.cpp
@@ -1442,7 +1442,11 @@ void ScummEngine::saveLoadWithSerializer(Common::Serializer &s) {
 	// Post-load fix for broken SAMNMAX savegames which contain invalid
 	// cursor values; the value we're setting here should not count since
 	// it's being replaced by the post-load script, as long as it's not zero.
-	if (_game.version == 6 && (_cursor.width == 0 || _cursor.height == 0)) {
+	// The same also happens for the Mac version of INDY3: the cursor was being
+	// handled directly with a CursorMan.replaceCursor() without specifying any
+	// values for the _cursor object (#14498). Let's fix that with the proper values.
+	if ((_game.version == 6 || (_game.id == GID_INDY3 && _macScreen)) &&
+		(_cursor.width == 0 || _cursor.height == 0)) {
 		_cursor.width = 15;
 		_cursor.height = 15;
 		_cursor.hotspotX = 7;




More information about the Scummvm-git-logs mailing list