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
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,
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
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
#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
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,
#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
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
};
#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
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;
&level.bd_color_3,
&level.bd_color_4,
&level.bd_color_5,
+ &level.bd_color_6,
+ &level.bd_color_7,
};
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) ----------------
&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) ----------------
{
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"
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
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)
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)
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,
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));
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();
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)
{
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)
{
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
{
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.");
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
{
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
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
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;
}
// (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
{
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.
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.
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]);
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);
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);
{
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);
// 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))
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)
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)
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.
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
{
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)
{
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++)
{
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