cleanup of BD style color definitions
authorHolger Schemel <holger.schemel@virtion.de>
Fri, 13 Dec 2024 19:39:29 +0000 (20:39 +0100)
committerHolger Schemel <holger.schemel@virtion.de>
Fri, 13 Dec 2024 15:39:51 +0000 (16:39 +0100)
src/game_bd/bd_colors.c
src/game_bd/bd_colors.h

index 76612012876ca2167588aa9e891812947a407b21..9cc3afb02c52ec0624b8d8d5c79ceb867e78f3bf 100644 (file)
@@ -769,24 +769,3 @@ boolean gd_color_is_unknown(GdColor color)
 {
   return (color >> 24) == GD_COLOR_TYPE_UNKNOWN;
 }
-
-GdColor gd_gdash_color(int c)
-{
-  // these values are taken from the title screen, drawn by cws.
-  // so menus and everything else will look nice!
-  // the 16 colors that can be used are the same as on c64.
-  // "Black", "White", "Red", "Cyan", "Purple", "Green", "Blue", "Yellow",
-  // "Orange", "Brown", "LightRed", "Gray1", "Gray2", "LightGreen", "LightBlue", "Gray3",
-  // not in the png: cyan, purple. gray3 is darker in the png.
-  // 17th color is the player's leg in the png. i not connected it to any c64
-  // color, but it is used for theme images for example.
-  const GdColor gdash_colors[] =
-  {
-    0x000000, 0xffffff, 0xe33939, 0x55aaaa, 0xaa55aa, 0x71aa55, 0x0039ff, 0xffff55,
-    0xe37139, 0xaa7139, 0xe09080, 0x555555, 0x717171, 0xc6e38e, 0xaaaaff, 0x8e8e8e,
-
-    0x5555aa,
-  };
-
-  return gdash_colors[c];
-}
index 15f1e367b7a7bd4977d0e2c431c39914c810370d..6edca45d22827068641b8526ec4dfa4a446e756c 100644 (file)
@@ -58,29 +58,26 @@ typedef enum _color_type
 #define GD_COLOR_INDEX_LIGHTBLUE               14
 #define GD_COLOR_INDEX_GRAY3                   15
 
-#define GD_GDASH_BLACK                         gd_gdash_color(GD_COLOR_INDEX_BLACK)
-#define GD_GDASH_WHITE                         gd_gdash_color(GD_COLOR_INDEX_WHITE)
-#define GD_GDASH_RED                           gd_gdash_color(GD_COLOR_INDEX_RED)
-#define GD_GDASH_CYAN                          gd_gdash_color(GD_COLOR_INDEX_CYAN)
-#define GD_GDASH_PURPLE                                gd_gdash_color(GD_COLOR_INDEX_PURPLE)
-#define GD_GDASH_GREEN                         gd_gdash_color(GD_COLOR_INDEX_GREEN)
-#define GD_GDASH_BLUE                          gd_gdash_color(GD_COLOR_INDEX_BLUE)
-#define GD_GDASH_YELLOW                                gd_gdash_color(GD_COLOR_INDEX_YELLOW)
-#define GD_GDASH_ORANGE                                gd_gdash_color(GD_COLOR_INDEX_ORANGE)
-#define GD_GDASH_BROWN                         gd_gdash_color(GD_COLOR_INDEX_BROWN)
-#define GD_GDASH_LIGHTRED                      gd_gdash_color(GD_COLOR_INDEX_LIGHTRED)
-#define GD_GDASH_GRAY1                         gd_gdash_color(GD_COLOR_INDEX_GRAY1)
-#define GD_GDASH_GRAY2                         gd_gdash_color(GD_COLOR_INDEX_GRAY2)
-#define GD_GDASH_LIGHTGREEN                    gd_gdash_color(GD_COLOR_INDEX_LIGHTGREEN)
-#define GD_GDASH_LIGHTBLUE                     gd_gdash_color(GD_COLOR_INDEX_LIGHTBLUE)
-#define GD_GDASH_GRAY3                         gd_gdash_color(GD_COLOR_INDEX_GRAY3)
-
-#define GD_GDASH_MIDDLEBLUE                    gd_gdash_color(16)
-
-#define GD_COLOR_INVALID                       0xFFFFFFFF
-
 #define GD_C64_COLOR(index)                    ((GD_COLOR_TYPE_C64 << 24) + (index))
 
+// traditional c64 color values.
+#define GD_C64_COLOR_BLACK                     GD_C64_COLOR(GD_COLOR_INDEX_BLACK)
+#define GD_C64_COLOR_WHITE                     GD_C64_COLOR(GD_COLOR_INDEX_WHITE)
+#define GD_C64_COLOR_RED                       GD_C64_COLOR(GD_COLOR_INDEX_RED)
+#define GD_C64_COLOR_CYAN                      GD_C64_COLOR(GD_COLOR_INDEX_CYAN)
+#define GD_C64_COLOR_PURPLE                    GD_C64_COLOR(GD_COLOR_INDEX_PURPLE)
+#define GD_C64_COLOR_GREEN                     GD_C64_COLOR(GD_COLOR_INDEX_GREEN)
+#define GD_C64_COLOR_BLUE                      GD_C64_COLOR(GD_COLOR_INDEX_BLUE)
+#define GD_C64_COLOR_YELLOW                    GD_C64_COLOR(GD_COLOR_INDEX_YELLOW)
+#define GD_C64_COLOR_ORANGE                    GD_C64_COLOR(GD_COLOR_INDEX_ORANGE)
+#define GD_C64_COLOR_BROWN                     GD_C64_COLOR(GD_COLOR_INDEX_BROWN)
+#define GD_C64_COLOR_LIGHTRED                  GD_C64_COLOR(GD_COLOR_INDEX_LIGHTRED)
+#define GD_C64_COLOR_GRAY1                     GD_C64_COLOR(GD_COLOR_INDEX_GRAY1)
+#define GD_C64_COLOR_GRAY2                     GD_C64_COLOR(GD_COLOR_INDEX_GRAY2)
+#define GD_C64_COLOR_LIGHTGREEN                        GD_C64_COLOR(GD_COLOR_INDEX_LIGHTGREEN)
+#define GD_C64_COLOR_LIGHTBLUE                 GD_C64_COLOR(GD_COLOR_INDEX_LIGHTBLUE)
+#define GD_C64_COLOR_GRAY3                     GD_C64_COLOR(GD_COLOR_INDEX_GRAY3)
+
 // palette numbers must match pointer array positions in source file
 #define GD_PALETTE_C64_VICE_NEW                        0
 #define GD_PALETTE_C64_VICE_OLD                        1
@@ -137,6 +134,4 @@ boolean gd_color_is_atari(GdColor color);
 boolean gd_color_is_dtv(GdColor color);
 boolean gd_color_is_unknown(GdColor color);
 
-GdColor gd_gdash_color(int c);
-
 #endif // BD_COLORS_H