From 62e01c906e6f5d6befe995431191338d760dc59c Mon Sep 17 00:00:00 2001 From: Holger Schemel Date: Wed, 10 Apr 2024 09:48:43 +0200 Subject: [PATCH] added color palette definitions for BD game engine --- src/game_bd/bd_colors.c | 4 +++- src/game_bd/bd_colors.h | 26 ++++++++++++++++++++++++++ 2 files changed, 29 insertions(+), 1 deletion(-) diff --git a/src/game_bd/bd_colors.c b/src/game_bd/bd_colors.c index 9641fa07..4ee31403 100644 --- a/src/game_bd/bd_colors.c +++ b/src/game_bd/bd_colors.c @@ -86,7 +86,7 @@ static unsigned int c64_colors_rtadash[]={ 0xe66c00, 0x935f00, 0xff7c64, 0x6c6c6c, 0xa1a1a1, 0xafff4d, 0x9778ff, 0xd8d8d8, }; -/* make sure that pointeres and names match! */ +// pointer array positions must match palette numbers in header file static unsigned int *c64_palette_pointers[] = { c64_colors_vice_new, @@ -440,6 +440,7 @@ static byte XFormer[] = 190,133,230,198,145,234,202,153,234,214,157,238,218,161 }; +// pointer array positions must match palette numbers in header file static const byte *atari_palettes_pointers[] = { BuiltIn, @@ -535,6 +536,7 @@ static byte Murray[] = 39,185,212,57,208,232,80,225,249,89,238,255,107,255,255,126 }; +// pointer array positions must match palette numbers in header file static const byte *c64dtv_palettes_pointers[] = { Spiff, diff --git a/src/game_bd/bd_colors.h b/src/game_bd/bd_colors.h index a517d018..088e2385 100644 --- a/src/game_bd/bd_colors.h +++ b/src/game_bd/bd_colors.h @@ -79,6 +79,32 @@ typedef enum _color_type #define GD_C64_COLOR(index) ((GD_COLOR_TYPE_C64 << 24) + (index)) +// palette numbers must match pointer array positions in source file +#define GD_PALETTE_C64_VICE_NEW 0 +#define GD_PALETTE_C64_VICE_OLD 1 +#define GD_PALETTE_C64_VIDE_DEFAULT 2 +#define GD_PALETTE_C64_C64HQ 3 +#define GD_PALETTE_C64_C64S 4 +#define GD_PALETTE_C64_CCS64 5 +#define GD_PALETTE_C64_FRODO 6 +#define GD_PALETTE_C64_GODOT 7 +#define GD_PALETTE_C64_PC64 8 +#define GD_PALETTE_C64_RTADASH 9 + +// palette numbers must match pointer array positions in source file +#define GD_PALETTE_C64DTV_SPIFF 0 +#define GD_PALETTE_C64DTV_MURRAY 1 + +// palette numbers must match pointer array positions in source file +#define GD_PALETTE_ATARI_BUILTIN 0 +#define GD_PALETTE_ATARI_BUILTIN_CONTRAST 1 +#define GD_PALETTE_ATARI_DEFAULT 2 +#define GD_PALETTE_ATARI_JAKUB 3 +#define GD_PALETTE_ATARI_JAKUB_CONTRAST 4 +#define GD_PALETTE_ATARI_REAL 5 +#define GD_PALETTE_ATARI_REAL_CONTRAST 6 +#define GD_PALETTE_ATARI_XFORMER 7 + // color GdColor gd_c64_color(int index); -- 2.34.1