SCUMM: GUI: Implement Atari ST cursors

This commit is contained in:
AndywinXp 2022-12-29 14:55:58 +01:00
parent 81fa031598
commit 5c9b0a8aa2
2 changed files with 61 additions and 2 deletions

View File

@ -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,0xFF,0xFF,0xFF,
0xFF,0x0F,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x0F,0xFF,0xFF,
0xFF,0xFF,0x0F,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x0F,0xFF,0xFF,0xFF,
0x0F,0x0F,0x0F,0x0F,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x0F,0x0F,0x0F,0x0F,0xFF,
0xFF,0xFF,0x0F,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x0F,0xFF,0xFF,0xFF,
0xFF,0x0F,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,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xFF,0x0F,0xFF,0xFF,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0xFF,0xFF,0xFF,
0xFF,0xFF,0x0F,0x0F,0xFF,0xFF,0xFF,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0xFF,0xFF,
0xFF,0xFF,0xFF,0x0F,0x0F,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x0F,0x0F,
0xFF,0xFF,0xFF,0xFF,0xFF,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0xFF,0xFF,0xFF,
0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,
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,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));

View File

@ -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)