[Scummvm-git-logs] scummvm master -> dffe1aa4fd824c4b324e19ec7574356e22764f8c

AndywinXp noreply at scummvm.org
Mon Nov 13 22:55:34 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:
dffe1aa4fd SCUMM: MI1 (SegaCD): Implement proper cross cursor


Commit: dffe1aa4fd824c4b324e19ec7574356e22764f8c
    https://github.com/scummvm/scummvm/commit/dffe1aa4fd824c4b324e19ec7574356e22764f8c
Author: AndywinXp (andywinxp at gmail.com)
Date: 2023-11-13T23:55:28+01:00

Commit Message:
SCUMM: MI1 (SegaCD): Implement proper cross cursor

I still have doubts on how the shadow color should be set,
but at least the cursor shape is now accurate.

Changed paths:
    engines/scumm/cursor.cpp


diff --git a/engines/scumm/cursor.cpp b/engines/scumm/cursor.cpp
index fe2a30f397b..971eab8134c 100644
--- a/engines/scumm/cursor.cpp
+++ b/engines/scumm/cursor.cpp
@@ -174,6 +174,25 @@ static const byte atari_snail_cursor[] = {
 	0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
 };
 
+static const byte segacd_cross_cursor[256] = {
+	0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x0F,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+	0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x0F,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+	0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x0F,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+	0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x0F,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+	0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x0F,0x00,0xFF,0xFF,0xFF,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 void ScummEngine_v5::setBuiltinCursor(int idx) {
 		return;
 	}
 
+	if (_game.platform == Common::kPlatformSegaCD) {
+		//_cursor.animate = 0;
+		_cursor.width = 16;
+		_cursor.height = 16;
+		_cursor.hotspotX = 7;
+		_cursor.hotspotY = 7;
+		byte arr[256];
+		for (int i = 0; i < 256; i++) {
+			if (segacd_cross_cursor[i] != 0x00)
+				arr[i] = segacd_cross_cursor[i];
+			else
+				arr[i] = 0x01; // TODO: Brown during cutscenes or dialogs (or something else?)
+		}
+
+
+		CursorMan.replaceCursor(arr, 16, 16, 7, 7, 0xFF);
+		return;
+	}
+
 	int i, j;
 	uint16 color;
 	const uint16 *src = _cursorImages[_currentCursor];




More information about the Scummvm-git-logs mailing list