added support for two extra colors for color templates
authorHolger Schemel <holger.schemel@virtion.de>
Fri, 13 Dec 2024 19:26:31 +0000 (20:26 +0100)
committerHolger Schemel <holger.schemel@virtion.de>
Fri, 13 Dec 2024 15:27:31 +0000 (16:27 +0100)
src/editor.c
src/files.c
src/game_bd/bd_bdcff.c
src/game_bd/bd_c64import.c
src/game_bd/bd_cave.c
src/game_bd/bd_cave.h
src/game_bd/bd_cavedb.c
src/game_bd/bd_caveset.c
src/game_bd/bd_graphics.c
src/main.h

index 6cbe01d34198100d20af7a81a9081187c35d7758..b97de9077b2fe94097acc914012b0a2847cf0873 100644 (file)
@@ -702,6 +702,8 @@ enum
   GADGET_ID_BD_COLOR_TEXT_3,
   GADGET_ID_BD_COLOR_TEXT_4,
   GADGET_ID_BD_COLOR_TEXT_5,
+  GADGET_ID_BD_COLOR_TEXT_6,
+  GADGET_ID_BD_COLOR_TEXT_7,
   GADGET_ID_ELEMENT_NAME,
 
   // text area identifiers
@@ -723,6 +725,8 @@ enum
   GADGET_ID_BD_COLOR_C64_3,
   GADGET_ID_BD_COLOR_C64_4,
   GADGET_ID_BD_COLOR_C64_5,
+  GADGET_ID_BD_COLOR_C64_6,
+  GADGET_ID_BD_COLOR_C64_7,
   GADGET_ID_WIND_DIRECTION,
   GADGET_ID_PLAYER_SPEED,
   GADGET_ID_BD_GRAVITY_DIRECTION,
@@ -786,6 +790,8 @@ enum
   GADGET_ID_BD_COLOR_PICK_3,
   GADGET_ID_BD_COLOR_PICK_4,
   GADGET_ID_BD_COLOR_PICK_5,
+  GADGET_ID_BD_COLOR_PICK_6,
+  GADGET_ID_BD_COLOR_PICK_7,
 
   // gadgets for scrolling of drawing area
 
@@ -1047,6 +1053,8 @@ enum
   ED_TEXTINPUT_ID_BD_COLOR_TEXT_3,
   ED_TEXTINPUT_ID_BD_COLOR_TEXT_4,
   ED_TEXTINPUT_ID_BD_COLOR_TEXT_5,
+  ED_TEXTINPUT_ID_BD_COLOR_TEXT_6,
+  ED_TEXTINPUT_ID_BD_COLOR_TEXT_7,
   ED_TEXTINPUT_ID_ELEMENT_NAME,
 
   ED_NUM_TEXTINPUT
@@ -1059,7 +1067,7 @@ enum
 #define ED_TEXTINPUT_ID_LEVELSET_LAST  ED_TEXTINPUT_ID_LEVELSET_AUTHOR
 
 #define ED_TEXTINPUT_ID_COLORS_FIRST   ED_TEXTINPUT_ID_BD_COLOR_TEXT_B
-#define ED_TEXTINPUT_ID_COLORS_LAST    ED_TEXTINPUT_ID_BD_COLOR_TEXT_5
+#define ED_TEXTINPUT_ID_COLORS_LAST    ED_TEXTINPUT_ID_BD_COLOR_TEXT_7
 
 // values for text area gadgets
 enum
@@ -1088,6 +1096,8 @@ enum
   ED_SELECTBOX_ID_BD_COLOR_C64_3,
   ED_SELECTBOX_ID_BD_COLOR_C64_4,
   ED_SELECTBOX_ID_BD_COLOR_C64_5,
+  ED_SELECTBOX_ID_BD_COLOR_C64_6,
+  ED_SELECTBOX_ID_BD_COLOR_C64_7,
   ED_SELECTBOX_ID_WIND_DIRECTION,
   ED_SELECTBOX_ID_PLAYER_SPEED,
   ED_SELECTBOX_ID_BD_GRAVITY_DIRECTION,
@@ -1131,7 +1141,7 @@ enum
 #define ED_SELECTBOX_ID_ENGINE_LAST    ED_SELECTBOX_ID_BD_SCHEDULING_TYPE
 
 #define ED_SELECTBOX_ID_COLORS_FIRST   ED_SELECTBOX_ID_BD_COLOR_C64_B
-#define ED_SELECTBOX_ID_COLORS_LAST    ED_SELECTBOX_ID_BD_COLOR_C64_5
+#define ED_SELECTBOX_ID_COLORS_LAST    ED_SELECTBOX_ID_BD_COLOR_C64_7
 
 #define ED_SELECTBOX_ID_CUSTOM1_FIRST  ED_SELECTBOX_ID_CUSTOM_ACCESS_TYPE
 #define ED_SELECTBOX_ID_CUSTOM1_LAST   ED_SELECTBOX_ID_CUSTOM_WALK_TO_ACTION
@@ -1193,6 +1203,8 @@ enum
   ED_GRAPHICBUTTON_ID_BD_COLOR_PICK_3,
   ED_GRAPHICBUTTON_ID_BD_COLOR_PICK_4,
   ED_GRAPHICBUTTON_ID_BD_COLOR_PICK_5,
+  ED_GRAPHICBUTTON_ID_BD_COLOR_PICK_6,
+  ED_GRAPHICBUTTON_ID_BD_COLOR_PICK_7,
 
   ED_NUM_GRAPHICBUTTONS
 };
@@ -1201,7 +1213,7 @@ enum
 #define ED_GRAPHICBUTTON_ID_CHANGE_LAST   ED_GRAPHICBUTTON_ID_PASTE_CHANGE_PAGE
 
 #define ED_GRAPHICBUTTON_ID_PICK_FIRST    ED_GRAPHICBUTTON_ID_BD_COLOR_PICK_B
-#define ED_GRAPHICBUTTON_ID_PICK_LAST     ED_GRAPHICBUTTON_ID_BD_COLOR_PICK_5
+#define ED_GRAPHICBUTTON_ID_PICK_LAST     ED_GRAPHICBUTTON_ID_BD_COLOR_PICK_7
 
 // values for checkbutton gadgets
 enum
@@ -1720,7 +1732,7 @@ static boolean levelset_use_levelset_artwork = FALSE;
 static boolean levelset_copy_level_template = FALSE;
 static int levelset_save_mode = LEVELSET_SAVE_MODE_UPDATE;
 
-#define MAX_BD_COLORS                  7
+#define MAX_BD_COLORS                  9
 #define MAX_BD_COLOR_TEXT_LEN          12
 
 static int bd_color_type_default = GD_COLOR_TYPE_RGB;
@@ -1737,6 +1749,8 @@ static int *bd_color[MAX_BD_COLORS] =
   &level.bd_color_3,
   &level.bd_color_4,
   &level.bd_color_5,
+  &level.bd_color_6,
+  &level.bd_color_7,
 };
 
 static struct
@@ -2272,6 +2286,22 @@ static struct
     bd_color_text[6],
     NULL, "Slime color:       ", NULL,         "Enter slime color (C64 graphics)"
   },
+  {
+    ED_TEXTINPUT_ID_BD_COLOR_TEXT_6,
+    ED_ENGINE_SETTINGS_XPOS(0),                        ED_ENGINE_SETTINGS_YPOS(8),
+    GADGET_ID_BD_COLOR_TEXT_6,
+    MAX_BD_COLOR_TEXT_LEN,
+    bd_color_text[7],
+    NULL, "Extra color 1:     ", NULL,         "Enter extra color 1 (C64 graphics)"
+  },
+  {
+    ED_TEXTINPUT_ID_BD_COLOR_TEXT_7,
+    ED_ENGINE_SETTINGS_XPOS(0),                        ED_ENGINE_SETTINGS_YPOS(9),
+    GADGET_ID_BD_COLOR_TEXT_7,
+    MAX_BD_COLOR_TEXT_LEN,
+    bd_color_text[8],
+    NULL, "Extra color 2:     ", NULL,         "Enter extra color 2 (C64 graphics)"
+  },
 
   // ---------- element settings: configure (several elements) ----------------
 
@@ -3236,6 +3266,24 @@ static struct
     &bd_color_c64[6],
     NULL, "Slime color:       ", NULL,         "Select slime color (C64 graphics)"
   },
+  {
+    ED_SELECTBOX_ID_BD_COLOR_C64_6,
+    ED_ENGINE_SETTINGS_XPOS(0),                        ED_ENGINE_SETTINGS_YPOS(8),
+    GADGET_ID_BD_COLOR_C64_6,                  GADGET_ID_NONE,
+    -1,
+    options_bd_color_c64_name,
+    &bd_color_c64[7],
+    NULL, "Extra color 1:     ", NULL,         "Select extra color 1 (C64 graphics)"
+  },
+  {
+    ED_SELECTBOX_ID_BD_COLOR_C64_7,
+    ED_ENGINE_SETTINGS_XPOS(0),                        ED_ENGINE_SETTINGS_YPOS(9),
+    GADGET_ID_BD_COLOR_C64_7,                  GADGET_ID_NONE,
+    -1,
+    options_bd_color_c64_name,
+    &bd_color_c64[8],
+    NULL, "Extra color 2:     ", NULL,         "Select extra color 2 (C64 graphics)"
+  },
 
   // ---------- element settings: configure (several elements) ----------------
 
@@ -3661,7 +3709,7 @@ static struct
 
   {
     ED_TEXTBUTTON_ID_BD_SET_RANDOM_COLORS,
-    ED_ENGINE_SETTINGS_XPOS(0),                        ED_ENGINE_SETTINGS_YPOS(8),
+    ED_ENGINE_SETTINGS_XPOS(0),                        ED_ENGINE_SETTINGS_YPOS(10),
     GADGET_ID_BD_SET_RANDOM_COLORS,            GADGET_ID_NONE,
     -1,                                                "Set random colors",
     NULL, NULL, NULL,                          "Create and set random level colors"
@@ -3755,6 +3803,20 @@ static struct
     GADGET_ID_BD_COLOR_PICK_5,                 GADGET_ID_BD_COLOR_TEXT_5,
     NULL, NULL,                                        "Pick slime color (C64 graphics)"
   },
+  {
+    ED_GRAPHICBUTTON_ID_BD_COLOR_PICK_6,
+    IMG_GFX_EDITOR_BUTTON_PICK_ELEMENT,
+    -1,                                                ED_ENGINE_SETTINGS_YPOS(8),
+    GADGET_ID_BD_COLOR_PICK_6,                 GADGET_ID_BD_COLOR_TEXT_6,
+    NULL, NULL,                                        "Pick extra color 1 (C64 graphics)"
+  },
+  {
+    ED_GRAPHICBUTTON_ID_BD_COLOR_PICK_7,
+    IMG_GFX_EDITOR_BUTTON_PICK_ELEMENT,
+    -1,                                                ED_ENGINE_SETTINGS_YPOS(9),
+    GADGET_ID_BD_COLOR_PICK_7,                 GADGET_ID_BD_COLOR_TEXT_7,
+    NULL, NULL,                                        "Pick extra color 2 (C64 graphics)"
+  },
 };
 
 static struct
@@ -11873,6 +11935,8 @@ void SetCurrentLevelColors_BD(void)
   cave->color3 = level.bd_color_3;
   cave->color4 = level.bd_color_4;
   cave->color5 = level.bd_color_5;
+  cave->color6 = level.bd_color_6;
+  cave->color7 = level.bd_color_7;
 }
 
 void SetRandomLevelColors_BD(int bd_color_type)
@@ -11891,6 +11955,8 @@ void SetRandomLevelColors_BD(int bd_color_type)
   level.bd_color_3 = cave->color3;
   level.bd_color_4 = cave->color4;
   level.bd_color_5 = cave->color5;
+  level.bd_color_6 = cave->color6;
+  level.bd_color_7 = cave->color7;
 }
 
 static void DrawColorBox_BD(int nr)
index f922d6e5dcdb88c3d7f0449ddf62e305e35d761e..82fd7c74d46d9fcafb732caa80911979fed899c6 100644 (file)
@@ -352,6 +352,16 @@ static struct LevelFileConfigInfo chunk_config_INFO[] =
     TYPE_INTEGER,                      CONF_VALUE_32_BIT(9),
     &li.bd_color_5,                    GD_C64_COLOR(6)
   },
+  {
+    -1,                                        -1,
+    TYPE_INTEGER,                      CONF_VALUE_32_BIT(10),
+    &li.bd_color_6,                    GD_C64_COLOR(12)
+  },
+  {
+    -1,                                        -1,
+    TYPE_INTEGER,                      CONF_VALUE_32_BIT(11),
+    &li.bd_color_7,                    GD_C64_COLOR(1)
+  },
 
   {
     -1,                                        -1,
@@ -4492,6 +4502,8 @@ static void CopyNativeLevel_RND_to_BD(struct LevelInfo *level)
   cave->color3                         = level->bd_color_3;
   cave->color4                         = level->bd_color_4;
   cave->color5                         = level->bd_color_5;
+  cave->color6                         = level->bd_color_6;
+  cave->color7                         = level->bd_color_7;
 
   // level name
   strncpy(cave->name, level->name, sizeof(GdString));
@@ -4680,6 +4692,8 @@ static void CopyNativeLevel_BD_to_RND(struct LevelInfo *level)
   level->bd_color_3                    = cave->color3;
   level->bd_color_4                    = cave->color4;
   level->bd_color_5                    = cave->color5;
+  level->bd_color_6                    = cave->color6;
+  level->bd_color_7                    = cave->color7;
 
   // set default color type and colors for BD style level colors
   SetDefaultLevelColorType_BD();
index e170cdceb8028e737df0b0bc15fdc3c5579827b4..09b14f26b7855d3a02287c135733a7a85c3484f4 100644 (file)
@@ -483,6 +483,8 @@ static boolean cave_process_tags_func(const char *attrib, const char *param, GdC
       cave->color3 = gd_color_get_from_string(params[2]);
       cave->color4 = cave->color3;      // amoeba
       cave->color5 = cave->color1;      // slime
+      cave->color6 = gd_c64_color(12);  // extra color 1 - gray
+      cave->color7 = gd_c64_color(1);   // extra color 2 - white
     }
     else if (paramcount == 5)
     {
@@ -494,6 +496,8 @@ static boolean cave_process_tags_func(const char *attrib, const char *param, GdC
       cave->color3 = gd_color_get_from_string(params[4]);
       cave->color4 = cave->color3;      // amoeba
       cave->color5 = cave->color1;      // slime
+      cave->color6 = gd_c64_color(12);  // extra color 1 - gray
+      cave->color7 = gd_c64_color(1);   // extra color 2 - white
     }
     else if (paramcount == 7)
     {
@@ -505,6 +509,8 @@ static boolean cave_process_tags_func(const char *attrib, const char *param, GdC
       cave->color3 = gd_color_get_from_string(params[4]);
       cave->color4 = gd_color_get_from_string(params[5]);    // amoeba
       cave->color5 = gd_color_get_from_string(params[6]);    // slime
+      cave->color6 = gd_c64_color(12);                       // extra color 1 - gray
+      cave->color7 = gd_c64_color(1);                        // extra color 2 - white
     }
     else
     {
@@ -521,7 +527,9 @@ static boolean cave_process_tags_func(const char *attrib, const char *param, GdC
        gd_color_is_unknown(cave->color2) ||
        gd_color_is_unknown(cave->color3) ||
        gd_color_is_unknown(cave->color4) ||
-       gd_color_is_unknown(cave->color5))
+       gd_color_is_unknown(cave->color5) ||
+       gd_color_is_unknown(cave->color6) ||
+       gd_color_is_unknown(cave->color7))
     {
       Warn("created a new C64 color scheme.");
 
index 7940be74c8c1a891d3f4ff0d3a96734a0c835527..988f3108d8cc0a5812aaa173c19cec32bc7c97ac 100644 (file)
@@ -830,6 +830,8 @@ static int cave_copy_from_bd1(GdCave *cave, const byte *data, int remaining_byte
     cave->color5 = gd_atari_color(data[0x16]);      // in atari, slime was green
     cave->colorb = gd_atari_color(data[0x17]);      // border = background
     cave->color0 = gd_atari_color(data[0x17]);      // background
+    cave->color6 = gd_atari_color(8);               // extra color 1 - gray
+    cave->color7 = gd_atari_color(15);              // extra color 2 - white
   }
   else
   {
@@ -841,6 +843,8 @@ static int cave_copy_from_bd1(GdCave *cave, const byte *data, int remaining_byte
     cave->color3 = gd_c64_color(data[0x15] & 0x7);  // lower 3 bits only (vic-ii worked this way)
     cave->color4 = cave->color3;                    // in bd1, amoeba was color3
     cave->color5 = cave->color3;                    // no slime, but let it be color 3
+    cave->color6 = gd_c64_color(12);                // extra color 1 - gray
+    cave->color7 = gd_c64_color(1);                 // extra color 2 - white
   }
 
   // random fill
@@ -1377,6 +1381,8 @@ static int cave_copy_from_bd2(GdCave *cave, const byte *data, int remaining_byte
     cave->color3 = gd_c64_color(data[index + 2] & 0x7); // lower 3 bits only!
     cave->color4 = cave->color1;                        // in bd2, amoeba was color1
     cave->color5 = cave->color1;                        // slime too
+    cave->color6 = gd_c64_color(12);                    // extra color 1 - gray
+    cave->color7 = gd_c64_color(1);                     // extra color 2 - white
     index += 3;
   }
   else
@@ -1389,6 +1395,8 @@ static int cave_copy_from_bd2(GdCave *cave, const byte *data, int remaining_byte
     cave->color5 = gd_atari_color(data[index + 3]);
     cave->colorb = gd_atari_color(data[index + 4]);     // background and border
     cave->color0 = gd_atari_color(data[index + 4]);
+    cave->color6 = gd_atari_color(8);                   // extra color 1 - gray
+    cave->color7 = gd_atari_color(15);                  // extra color 2 - white
     index += 5;
   }
 
@@ -1533,6 +1541,10 @@ static int cave_copy_from_plck(GdCave *cave, const byte *data,
     // (maybe they could have been changed in a hex editor)
     cave->color4 = gd_atari_color(data[0x1e1]);
     cave->color5 = gd_atari_color(data[0x1e1]);
+
+    // extra colors
+    cave->color6 = gd_atari_color(8);               // extra color 1 - gray
+    cave->color7 = gd_atari_color(15);              // extra color 2 - white
   }
   else
   {
@@ -1544,6 +1556,8 @@ static int cave_copy_from_plck(GdCave *cave, const byte *data,
     cave->color3 = gd_c64_color(data[0x1e3] & 0x7); // lower 3 bits only!
     cave->color4 = cave->color3;                    // in plck, amoeba was color3
     cave->color5 = cave->color3;                    // same for slime
+    cave->color6 = gd_c64_color(12);                // extra color 1 - gray
+    cave->color7 = gd_c64_color(1);                 // extra color 2 - white
   }
 
   // ... the cave is stored like a map.
@@ -1654,6 +1668,8 @@ static int cave_copy_from_dlb(GdCave *cave, const byte *data, int remaining_byte
   cave->color3 = gd_c64_color(data[12] & 0x7);    // lower 3 bits only!
   cave->color4 = cave->color3;                    // in plck, amoeba was color3
   cave->color5 = cave->color3;                    // same for slime
+  cave->color6 = gd_c64_color(12);                // extra color 1 - gray
+  cave->color7 = gd_c64_color(1);                 // extra color 2 - white
 
   // cave map is compressed.
   // employ a state machine to decompress data.
@@ -1910,6 +1926,8 @@ static int cave_copy_from_1stb(GdCave *cave, const byte *data, int remaining_byt
   cave->color3 = gd_c64_color(data[0x388] & 0x7);     // lower 3 bits only!
   cave->color4 = cave->color1;
   cave->color5 = cave->color1;
+  cave->color6 = gd_c64_color(12);                    // extra color 1 - gray
+  cave->color7 = gd_c64_color(1);                     // extra color 2 - white
 
   cave->amoeba_growth_prob      = amoeba_probability(data[0x382]);
   cave->amoeba_fast_growth_prob = amoeba_probability(data[0x383]);
@@ -2029,6 +2047,8 @@ static int cave_copy_from_crdr_7(GdCave *cave, const byte *data, int remaining_b
   cave->color3 = gd_c64_color(data[0x18] & 0x7);    // lower 3 bits only!
   cave->color4 = cave->color3;
   cave->color5 = cave->color1;
+  cave->color6 = gd_c64_color(12);                  // extra color 1 - gray
+  cave->color7 = gd_c64_color(1);                   // extra color 2 - white
 
   cave->intermission = (data[0x19] != 0);
 
@@ -2500,6 +2520,8 @@ static int cave_copy_from_crli(GdCave *cave, const byte *data, int remaining_byt
   cave->color3 = gd_c64_color(uncompressed[0x388] & 0x7);    // lower 3 bits only!
   cave->color4 = cave->color3;
   cave->color5 = cave->color1;
+  cave->color6 = gd_c64_color(12);                           // extra color 1 - gray
+  cave->color7 = gd_c64_color(1);                            // extra color 2 - white
 
   cave->intermission = (uncompressed[0x389] != 0);
 
index 83351c0e4e96a7cb53088de7d991a7300bf33f41..d23dbeca74a5aab8a7d23eff40f369b56757e7e6 100644 (file)
@@ -791,6 +791,7 @@ void gd_cave_set_random_c64_colors(GdCave *cave)
 {
   const int bright_colors[] = { 1, 3, 7 };
   const int dark_colors[] = { 2, 6, 8, 9, 11 };
+  const int gray_colors[] = { 11, 12, 15 };
 
   // always black
   cave->colorb = gd_c64_color(0);
@@ -817,6 +818,10 @@ void gd_cave_set_random_c64_colors(GdCave *cave)
   // copy amoeba and slime color
   cave->color4 = cave->color3;
   cave->color5 = cave->color1;
+
+  // extra colors
+  cave->color6 = gd_c64_color(gray_colors[gd_random_int_range(0, ARRAY_SIZE(gray_colors))]);
+  cave->color7 = gd_c64_color(1);
 }
 
 static void cave_set_random_indexed_colors(GdCave *cave, GdColor (*color_indexer_func) (int, int))
@@ -855,6 +860,10 @@ static void cave_set_random_indexed_colors(GdCave *cave, GdColor (*color_indexer
   cave->color4 = color_indexer_func(gd_random_int_range(11, 13), gd_random_int_range(6, 12));
   // some blueish thing
   cave->color5 = color_indexer_func(gd_random_int_range(7, 10),  gd_random_int_range(0, 6));
+
+  // extra colors
+  cave->color6 = color_indexer_func(0, bri1);
+  cave->color7 = color_indexer_func(0, 15);
 }
 
 static void gd_cave_set_random_atari_colors(GdCave *cave)
@@ -937,6 +946,10 @@ static void gd_cave_set_random_rgb_colors(GdCave *cave)
   cave->color4 = gd_color_get_from_hsv(gd_random_int_range(100, 140), s2, v2);
   // blue(240+-20) with saturation and brightness of dirt
   cave->color5 = gd_color_get_from_hsv(gd_random_int_range(220, 260), s1, v1);
+
+  // extra colors
+  cave->color6 = gd_color_get_from_hsv(0, 0, v1);      // gray with brightness of dirt
+  cave->color7 = gd_color_get_from_hsv(0, 0, 1);       // white
 }
 
 void gd_cave_set_random_colors(GdCave *cave, GdColorType type)
index a1de37923145b46b9bce3041c095e20d9fef7465..f76c215b9363b45a502d3cd571a7f7a0ed6530ae 100644 (file)
@@ -403,7 +403,7 @@ typedef struct _gd_cave
   GdColor colorb;                       // border color
   GdColor color0, color1, color2, color3, color4, color5;    // c64-style colors;
                                                              // color 4 and 5 are amoeba and slime.
-
+  GdColor color6, color7;                                    // extra colors
   int diamond_value;                    // Score for a diamond.
   int extra_diamond_value;              // Score for a diamond, when gate is open.
 
index df768a50a71d19cff49c5529bfc40df19c9ad9fe..559a49dd0b32831f0d4db2dc79d3b79d56fd75a5 100644 (file)
@@ -2246,6 +2246,16 @@ const GdStructDescriptor gd_cave_properties[] =
     N_("Slime color"), STRUCT_OFFSET(GdCave, color5), 1,
     N_("Slime color for C64 graphics")
   },
+  {
+    "Colors", GD_TYPE_COLOR, GD_ALWAYS_SAVE,
+    N_("Extra color 1"), STRUCT_OFFSET(GdCave, color6), 1,
+    N_("Extra color 1 for C64 graphics")
+  },
+  {
+    "Colors", GD_TYPE_COLOR, GD_ALWAYS_SAVE,
+    N_("Extra color 2"), STRUCT_OFFSET(GdCave, color7), 1,
+    N_("Extra color 2 for C64 graphics")
+  },
 
   // difficulty
   {
index 59a466274e927ed76f928855425722db9b31f389..33d2515c0a3026b4f93d5eacf726d24a1d5ffab8 100644 (file)
@@ -509,6 +509,8 @@ static void brc_import(byte *data)
       cave->color3 = 0xffffff;    // white for brick
       cave->color4 = 0xe5ad23;    // fixed for amoeba
       cave->color5 = 0x8af713;    // fixed for slime
+      cave->color6 = 0x888888;    // extra color 1 - gray
+      cave->color7 = 0xffffff;    // extra color 2 - white
 
       if (import_effect)
       {
index 6aaa0ada5c5dcc2a274295b88d51ea2b46fa9a30..ceaa12df5e8210e0b0dc6ba2cbc9ae6f6e8f5062 100644 (file)
@@ -348,8 +348,8 @@ static SDL_Surface *get_colored_surface_from_template(GdCave *cave, SDL_Surface
   color[3] = get_template_color(cave->color3);         // replace yellow
   color[4] = get_template_color(cave->color5);         // replace blue
   color[5] = get_template_color(cave->color2);         // replace purple
-  color[6] = get_template_color(GD_GDASH_GRAY2);       // replace cyan
-  color[7] = get_template_color(GD_GDASH_WHITE);       // replace white
+  color[6] = get_template_color(cave->color6);         // replace cyan
+  color[7] = get_template_color(cave->color7);         // replace white
 
   for (y = 0; y < height; y++)
   {
index 678e1930e3b54a07546c29c1961a41148ccc67d0..d0a9d92d56b5e4a16b58669aa6fe3d36e6a4f685 100644 (file)
@@ -3953,6 +3953,8 @@ struct LevelInfo
   int bd_color_3;                      // BD engine C64-style cave color (wall)
   int bd_color_4;                      // BD engine C64-style cave color (amoeba)
   int bd_color_5;                      // BD engine C64-style cave color (slime)
+  int bd_color_6;                      // BD engine C64-style cave color (extra color 1)
+  int bd_color_7;                      // BD engine C64-style cave color (extra color 2)
 
   boolean em_slippery_gems;            // EM style "gems slip from wall" behaviour
   boolean em_explodes_by_fire;         // EM style chain explosion behaviour