[Scummvm-git-logs] scummvm master -> 5c9b0a8aa224c0ab0a8c7fda06c3ae9ce3379867

AndywinXp noreply at scummvm.org
Thu Dec 29 13:56:03 UTC 2022


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:
5c9b0a8aa2 SCUMM: GUI: Implement Atari ST cursors


Commit: 5c9b0a8aa224c0ab0a8c7fda06c3ae9ce3379867
    https://github.com/scummvm/scummvm/commit/5c9b0a8aa224c0ab0a8c7fda06c3ae9ce3379867
Author: AndywinXp (andywinxp at gmail.com)
Date: 2022-12-29T14:55:58+01:00

Commit Message:
SCUMM: GUI: Implement Atari ST cursors

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


diff --git a/engines/scumm/cursor.cpp b/engines/scumm/cursor.cpp
index 476f48d64ce..d361a36ac19 100644
--- a/engines/scumm/cursor.cpp
+++ b/engines/scumm/cursor.cpp
@@ -136,6 +136,44 @@ static const byte amiga_snail_cursor[] = {
 	0xFF,0xFF,0xFF,0xFF,0xFF,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,
 };
 
+static const byte atari_main_cursor[] = {
+	0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x0F,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+	0xFF,0xFF,0xFF,0xFF,0xFF,0x0F,0xFF,0x0F,0xFF,0x0F,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+	0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x0F,0x0F,0x0F,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+	0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x0F,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+	0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xF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FF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+	0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+	0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+};
+
 #ifdef ENABLE_SCUMM_7_8
 static const byte default_v7_cursor[] = {
 	0x01,0x01,0x01,0x01, 0x00,0x0F,0x00, 0x01,0x01,0x01,0x01,
@@ -751,6 +789,20 @@ void ScummEngine_v2::setBuiltinCursor(int idx) {
 				*dst++ = palette[((c0 >> (7 - j)) & 1) | (((c1 >> (7 - j)) & 1) << 1) | ((idx == 3) ? 4 : 0)];
 		}
 
+	} else if (_game.platform == Common::kPlatformAtariST) {
+		_cursor.width = 16;
+		_cursor.height = 16;
+		_cursor.hotspotX = 8;
+		_cursor.hotspotY = 8;
+
+		memcpy(_grabbedCursor, atari_main_cursor, sizeof(atari_main_cursor));
+
+		for (i = 0; i < sizeof(_grabbedCursor); i++) {
+			if (_grabbedCursor[i] == 0x0F) {
+				_grabbedCursor[i] = color;
+			}
+		}
+
 	} else if (_game.platform == Common::kPlatformAmiga) {
 		_cursor.width = 15;
 		_cursor.height = 15;
@@ -864,6 +916,14 @@ void ScummEngine_v2::setSnailCursor() {
 		_cursor.hotspotX = 7;
 		_cursor.hotspotY = 7;
 
+	} else if (_game.platform == Common::kPlatformAtariST) {
+		memcpy(_grabbedCursor, atari_snail_cursor, sizeof(atari_snail_cursor));
+
+		_cursor.width = 16;
+		_cursor.height = 16;
+		_cursor.hotspotX = 8;
+		_cursor.hotspotY = 8;
+
 	} else {
 		memcpy(_grabbedCursor, c64_dos_snail_cursor, sizeof(c64_dos_snail_cursor));
 
diff --git a/engines/scumm/scumm.cpp b/engines/scumm/scumm.cpp
index cdafe787402..ddc0932eefc 100644
--- a/engines/scumm/scumm.cpp
+++ b/engines/scumm/scumm.cpp
@@ -3165,8 +3165,7 @@ bool ScummEngine::isUsingOriginalGUI() {
 	if (_game.id == GID_MONKEY2 && (_game.features & GF_DEMO))
 		return false;
 
-	if (_game.platform == Common::kPlatformPCEngine ||
-		(_game.platform == Common::kPlatformAtariST && _game.version == 2))
+	if (_game.platform == Common::kPlatformPCEngine)
 		return false;
 
 	if (_game.heversion != 0)




More information about the Scummvm-git-logs mailing list