+ { EP_CAN_SMASH_PLAYER, "player" },
+ { EP_CAN_SMASH_ENEMIES, "enemies" },
+ { EP_CAN_SMASH_EVERYTHING, "everything" },
+ { -1, NULL }
+};
+static int value_smash_targets = 0;
+
+static struct ValueTextInfo options_deadliness[] =
+{
+ { EP_DONT_RUN_INTO, "running into" },
+ { EP_DONT_COLLIDE_WITH, "colliding with" },
+ { EP_DONT_TOUCH, "touching" },
+ { -1, NULL }
+};
+static int value_deadliness = 0;
+
+static struct ValueTextInfo options_consistency[] =
+{
+ { EP_CAN_EXPLODE, "can explode" },
+ { EP_INDESTRUCTIBLE, "indestructible" },
+ { -1, NULL }
+};
+static int value_consistency = 0;
+
+static struct ValueTextInfo options_time_units[] =
+{
+ { 50, "seconds" },
+ { 1, "frames" },
+ { -1, NULL }
+};
+
+static struct ValueTextInfo options_change_player_action[] =
+{
+ { CE_TOUCHED_BY_PLAYER, "touched" },
+ { CE_PRESSED_BY_PLAYER, "pressed" },
+ { CE_PUSHED_BY_PLAYER, "pushed" },
+ { -1, NULL }
+};
+static int value_change_player_action = 0;
+
+static struct ValueTextInfo options_change_impact_action[] =
+{
+ { CE_IMPACT, "on impact" },
+ { CE_SMASHED, "when smashed" },
+ { -1, NULL }
+};
+static int value_change_impact_action = 0;
+
+static struct ValueTextInfo options_change_other_action[] =
+{
+ { CE_OTHER_COLLECTING, "collecting" },
+ { CE_OTHER_PUSHING, "pushing" },
+ { CE_OTHER_CHANGING, "change of" },
+ { CE_OTHER_EXPLODING, "explosion of" },
+ { -1, NULL }
+};
+static int value_change_other_action = 0;
+
+static struct ValueTextInfo options_change_power[] =
+{
+ { CP_NON_DESTRUCTIVE, "non-destructive" },
+ { CP_HALF_DESTRUCTIVE, "half-destructive" },
+ { CP_FULL_DESTRUCTIVE, "full-destructive" },
+ { -1, NULL }
+};
+
+static struct
+{
+ int x, y;
+ int gadget_id;
+ int size; /* char size of selectbox or '-1' (dynamically determined) */
+ struct ValueTextInfo *options;
+ int *value;
+ char *text_left, *text_right, *infotext;
+} selectbox_info[ED_NUM_SELECTBOX] =
+{
+ /* ---------- element settings: configure (custom elements) ------------- */
+
+ {
+ ED_SETTINGS_XPOS(1), ED_SETTINGS_YPOS(1),
+ GADGET_ID_CUSTOM_ACCESS_TYPE,
+ -1,
+ options_access_type,
+ &value_access_type,
+ "player can", NULL, "type of access to this field"
+ },
+ {
+ ED_SETTINGS_XPOS(11), ED_SETTINGS_YPOS(1),
+ GADGET_ID_CUSTOM_ACCESS_LAYER,
+ -1,
+ options_access_layer,
+ &value_access_layer,
+ NULL, NULL, "layer of access for this field"
+ },
+ {
+ ED_SETTINGS_XPOS(1), ED_SETTINGS_YPOS(2),
+ GADGET_ID_CUSTOM_WALK_TO_ACTION,
+ -1,
+ options_walk_to_action,
+ &value_walk_to_action,
+ NULL, NULL, "diggable/collectible/pushable"
+ },
+ {
+ ED_SETTINGS_XPOS(1), ED_SETTINGS_YPOS(5),
+ GADGET_ID_CUSTOM_MOVE_PATTERN,
+ -1,
+ options_move_pattern,
+ &custom_element.move_pattern,
+ "can move", NULL, "element move direction"
+ },
+ {
+ ED_SETTINGS_XPOS(1), ED_SETTINGS_YPOS(6),
+ GADGET_ID_CUSTOM_MOVE_DIRECTION,
+ -1,
+ options_move_direction,
+ &custom_element.move_direction_initial,
+ "starts moving", NULL, "initial element move direction"
+ },
+ {
+ ED_SETTINGS_XPOS(1), ED_SETTINGS_YPOS(8),
+ GADGET_ID_CUSTOM_MOVE_STEPSIZE,
+ -1,
+ options_move_stepsize,
+ &custom_element.move_stepsize,
+ "move/fall speed", NULL, "speed of element movement"
+ },
+ {
+ ED_SETTINGS_XPOS(7), ED_SETTINGS_YPOS(9),
+ GADGET_ID_CUSTOM_SMASH_TARGETS,
+ -1,
+ options_smash_targets,
+ &value_smash_targets,
+ "can smash", NULL, "elements that can be smashed"
+ },
+ {
+ ED_SETTINGS_XPOS(1), ED_SETTINGS_YPOS(11),
+ GADGET_ID_CUSTOM_DEADLINESS,
+ -1,
+ options_deadliness,
+ &value_deadliness,
+ "deadly when", NULL, "deadliness of element"
+ },
+ {
+ ED_SETTINGS_XPOS(1), ED_SETTINGS_YPOS(12),
+ GADGET_ID_CUSTOM_CONSISTENCY,
+ -1,
+ options_consistency,
+ &value_consistency,
+ NULL, "explodes to:", "consistency/destructibility"
+ },
+
+ /* ---------- element settings: advanced (custom elements) --------------- */
+
+ {
+ ED_SETTINGS_XPOS(2), ED_SETTINGS_YPOS(4),
+ GADGET_ID_CHANGE_TIME_UNITS,
+ -1,
+ options_time_units,
+ &custom_element.change.delay_frames,
+ "delay time given in", NULL, "delay time units for change"
+ },
+ {
+ ED_SETTINGS_XPOS(2), ED_SETTINGS_YPOS(5),
+ GADGET_ID_CHANGE_PLAYER_ACTION,
+ -1,
+ options_change_player_action,
+ &value_change_player_action,
+ NULL, "by player", "type of player contact"
+ },
+ {
+ ED_SETTINGS_XPOS(2), ED_SETTINGS_YPOS(6),
+ GADGET_ID_CHANGE_IMPACT_ACTION,
+ -1,
+ options_change_impact_action,
+ &value_change_impact_action,
+ NULL, NULL, "change after impact or smash"
+ },
+ {
+ ED_SETTINGS_XPOS(2), ED_SETTINGS_YPOS(7),
+ GADGET_ID_CHANGE_OTHER_ACTION,
+ -1,
+ options_change_other_action,
+ &value_change_other_action,
+ NULL, "other element:", "type of other element action"
+ },
+ {
+ ED_SETTINGS_XPOS(2), ED_SETTINGS_YPOS(10),
+ GADGET_ID_CHANGE_POWER,
+ -1,
+ options_change_power,
+ &custom_element.change.power,
+ "power:", NULL, "power of extended change"
+ },