+ { -1, NULL }
+};
+
+static struct ValueTextInfo options_action_arg_none[] =
+{
+ { CA_ARG_UNDEFINED, " " },
+
+ { -1, NULL }
+};
+
+static struct ValueTextInfo options_action_arg_player[] =
+{
+ { CA_ARG_PLAYER_HEADLINE, "[player]" },
+ { CA_ARG_PLAYER_1, "1" },
+ { CA_ARG_PLAYER_2, "2" },
+ { CA_ARG_PLAYER_3, "3" },
+ { CA_ARG_PLAYER_4, "4" },
+ { CA_ARG_PLAYER_ANY, "any" },
+ { CA_ARG_PLAYER_TRIGGER, "trigger" },
+
+ { -1, NULL }
+};
+
+static struct ValueTextInfo options_action_arg_number[] =
+{
+ { CA_ARG_NUMBER_HEADLINE, "[number]" },
+ { CA_ARG_0, "0" },
+ { CA_ARG_1, "1" },
+ { CA_ARG_2, "2" },
+ { CA_ARG_3, "3" },
+ { CA_ARG_4, "4" },
+ { CA_ARG_5, "5" },
+ { CA_ARG_10, "10" },
+ { CA_ARG_100, "100" },
+ { CA_ARG_1000, "1000" },
+ { CA_ARG_UNDEFINED, " " },
+ { CA_ARG_NUMBER_MIN, "min" },
+ { CA_ARG_NUMBER_MAX, "max" },
+ { CA_ARG_UNDEFINED, " " },
+ { CA_ARG_NUMBER_RESET, "reset" },
+ { CA_ARG_UNDEFINED, " " },
+ { CA_ARG_NUMBER_CE_VALUE, "CE value" },
+ { CA_ARG_NUMBER_CE_SCORE, "CE score" },
+ { CA_ARG_NUMBER_CE_DELAY, "CE delay" },
+ { CA_ARG_UNDEFINED, " " },
+ { CA_ARG_NUMBER_LEVEL_TIME, "time" },
+ { CA_ARG_NUMBER_LEVEL_GEMS, "gems" },
+ { CA_ARG_NUMBER_LEVEL_SCORE, "score" },
+ { CA_ARG_UNDEFINED, " " },
+ { CA_ARG_ELEMENT_CV_HEADLINE, "[CE value]" },
+ { CA_ARG_ELEMENT_CV_TARGET, "target" },
+ { CA_ARG_ELEMENT_CV_TRIGGER, "trigger" },
+ { CA_ARG_UNDEFINED, " " },
+ { CA_ARG_ELEMENT_CS_HEADLINE, "[CE score]" },
+ { CA_ARG_ELEMENT_CS_TARGET, "target" },
+ { CA_ARG_ELEMENT_CS_TRIGGER, "trigger" },
+
+ { -1, NULL }
+};
+
+static struct ValueTextInfo options_action_arg_value[] =
+{
+ { CA_ARG_NUMBER_HEADLINE, "[number]" },
+ { CA_ARG_0, "0" },
+ { CA_ARG_1, "1" },
+ { CA_ARG_2, "2" },
+ { CA_ARG_3, "3" },
+ { CA_ARG_4, "4" },
+ { CA_ARG_5, "5" },
+ { CA_ARG_10, "10" },
+ { CA_ARG_100, "100" },
+ { CA_ARG_1000, "1000" },
+ { CA_ARG_UNDEFINED, " " },
+ { CA_ARG_NUMBER_MIN, "min" },
+ { CA_ARG_NUMBER_MAX, "max" },
+ { CA_ARG_UNDEFINED, " " },
+ { CA_ARG_NUMBER_RESET, "reset" },
+ { CA_ARG_UNDEFINED, " " },
+ { CA_ARG_NUMBER_CE_VALUE, "CE value" },
+ { CA_ARG_NUMBER_CE_SCORE, "CE score" },
+ { CA_ARG_NUMBER_CE_DELAY, "CE delay" },
+ { CA_ARG_UNDEFINED, " " },
+ { CA_ARG_NUMBER_LEVEL_TIME, "time" },
+ { CA_ARG_NUMBER_LEVEL_GEMS, "gems" },
+ { CA_ARG_NUMBER_LEVEL_SCORE, "score" },
+ { CA_ARG_UNDEFINED, " " },
+ { CA_ARG_ELEMENT_CV_HEADLINE, "[CE value]" },
+ { CA_ARG_ELEMENT_CV_TARGET, "target" },
+ { CA_ARG_ELEMENT_CV_TRIGGER, "trigger" },
+ { CA_ARG_UNDEFINED, " " },
+ { CA_ARG_ELEMENT_CS_HEADLINE, "[CE score]" },
+ { CA_ARG_ELEMENT_CS_TARGET, "target" },
+ { CA_ARG_ELEMENT_CS_TRIGGER, "trigger" },
+ { CA_ARG_UNDEFINED, " " },
+ { CA_ARG_ELEMENT_NR_HEADLINE, "[element]" },
+ { CA_ARG_ELEMENT_NR_TARGET, "target" },
+ { CA_ARG_ELEMENT_NR_TRIGGER, "trigger" },
+
+ { -1, NULL }
+};
+
+static struct ValueTextInfo options_action_arg_envelope[] =
+{
+ { CA_ARG_NUMBER_HEADLINE, "[number]" },
+ { CA_ARG_1, "1" },
+ { CA_ARG_2, "2" },
+ { CA_ARG_3, "3" },
+ { CA_ARG_4, "4" },
+ { CA_ARG_UNDEFINED, " " },
+ { CA_ARG_ELEMENT_HEADLINE, "[element]" },
+ { CA_ARG_ELEMENT_TARGET, "target" },
+ { CA_ARG_ELEMENT_TRIGGER, "trigger" },
+
+ { -1, NULL }
+};
+
+static struct ValueTextInfo options_action_arg_key[] =
+{
+ { CA_ARG_NUMBER_HEADLINE, "[number]" },
+ { CA_ARG_1, "1" },
+ { CA_ARG_2, "2" },
+ { CA_ARG_3, "3" },
+ { CA_ARG_4, "4" },
+ { CA_ARG_5, "5" },
+ { CA_ARG_6, "6" },
+ { CA_ARG_7, "7" },
+ { CA_ARG_8, "8" },
+ { CA_ARG_UNDEFINED, " " },
+ { CA_ARG_ELEMENT_HEADLINE, "[element]" },
+ { CA_ARG_ELEMENT_TARGET, "target" },
+ { CA_ARG_ELEMENT_TRIGGER, "trigger" },
+
+ { -1, NULL }
+};
+
+static struct ValueTextInfo options_action_arg_speed[] =
+{
+ { CA_ARG_SPEED_HEADLINE, "[speed]" },
+ { CA_ARG_SPEED_NOT_MOVING, "frozen" },
+ { CA_ARG_SPEED_VERY_SLOW, "very slow" },
+ { CA_ARG_SPEED_SLOW, "slow" },
+ { CA_ARG_SPEED_NORMAL, "normal" },
+ { CA_ARG_SPEED_FAST, "fast" },
+ { CA_ARG_SPEED_VERY_FAST, "very fast" },
+ { CA_ARG_SPEED_EVEN_FASTER, "ultrafast" },
+ { CA_ARG_UNDEFINED, " " },
+ { CA_ARG_SPEED_SLOWER, "slower" },
+ { CA_ARG_SPEED_FASTER, "faster" },
+ { CA_ARG_UNDEFINED, " " },
+ { CA_ARG_SPEED_RESET, "reset" },
+
+ { -1, NULL }
+};
+
+static struct ValueTextInfo options_action_arg_shield[] =
+{
+ { CA_ARG_SHIELD_HEADLINE, "[shield]" },
+ { CA_ARG_SHIELD_OFF, "off" },
+ { CA_ARG_SHIELD_NORMAL, "normal" },
+ { CA_ARG_SHIELD_DEADLY, "deadly" },
+
+ { -1, NULL }
+};
+
+static struct ValueTextInfo options_action_arg_artwork[] =
+{
+ { CA_ARG_ELEMENT_HEADLINE, "[element]" },
+ { CA_ARG_ELEMENT_TARGET, "target" },
+ { CA_ARG_ELEMENT_TRIGGER, "trigger" },
+ { CA_ARG_UNDEFINED, " " },
+ { CA_ARG_ELEMENT_RESET, "reset" },
+
+ { -1, NULL }
+};
+
+static struct ValueTextInfo options_action_arg_gravity[] =
+{
+ { CA_ARG_GRAVITY_HEADLINE, "[gravity]" },
+ { CA_ARG_GRAVITY_ON, "on" },
+ { CA_ARG_GRAVITY_OFF, "off" },
+ { CA_ARG_GRAVITY_TOGGLE, "toggle" },
+
+ { -1, NULL }
+};
+
+static struct ValueTextInfo options_action_arg_direction[] =
+{
+ { CA_ARG_DIRECTION_HEADLINE, "[dir.]" },
+ { CA_ARG_DIRECTION_NONE, "none" },
+ { CA_ARG_DIRECTION_LEFT, "left" },
+ { CA_ARG_DIRECTION_RIGHT, "right" },
+ { CA_ARG_DIRECTION_UP, "up" },
+ { CA_ARG_DIRECTION_DOWN, "down" },
+ { CA_ARG_DIRECTION_TRIGGER, "trigger" },
+ { CA_ARG_DIRECTION_TRIGGER_BACK, "-trigger" },
+
+ { -1, NULL }
+};
+
+static struct ValueTextInfo options_action_arg_scan_mode[] =
+{
+ { CA_ARG_SCAN_MODE_HEADLINE, "[mode]" },
+ { CA_ARG_SCAN_MODE_NORMAL, "normal" },
+ { CA_ARG_SCAN_MODE_REVERSE, "reverse" },
+
+ { -1, NULL }
+};
+
+static char options_change_page_strings[MAX_CHANGE_PAGES][10];
+static struct ValueTextInfo options_change_page[MAX_CHANGE_PAGES + 1] =
+{
+ { -1, NULL }
+};
+
+static struct ValueTextInfo options_group_choice_mode[] =
+{
+ { ANIM_RANDOM, "random" },
+ { ANIM_LOOP, "loop" },
+ { ANIM_LINEAR, "linear" },
+ { ANIM_PINGPONG, "pingpong" },
+ { ANIM_PINGPONG2, "pingpong 2" },
+
+ { -1, NULL }
+};
+
+static struct ValueTextInfo *action_arg_modes[] =
+{
+ options_action_mode_none,
+ options_action_mode_assign,
+ options_action_mode_add_remove,
+ options_action_mode_calculate,
+};
+
+static struct
+{
+ int value;
+ int mode;
+ struct ValueTextInfo *options;
+}
+action_arg_options[] =
+{
+ { CA_NO_ACTION, 0, options_action_arg_none, },
+ { CA_EXIT_PLAYER, 0, options_action_arg_player, },
+ { CA_KILL_PLAYER, 0, options_action_arg_player, },
+ { CA_MOVE_PLAYER, 0, options_action_arg_direction, },
+ { CA_RESTART_LEVEL, 0, options_action_arg_none, },
+ { CA_SHOW_ENVELOPE, 0, options_action_arg_envelope, },
+ { CA_SET_LEVEL_TIME, 3, options_action_arg_number, },
+ { CA_SET_LEVEL_GEMS, 3, options_action_arg_number, },
+ { CA_SET_LEVEL_SCORE, 3, options_action_arg_number, },
+ { CA_SET_LEVEL_WIND, 1, options_action_arg_direction, },
+ { CA_SET_PLAYER_KEYS, 2, options_action_arg_key, },
+ { CA_SET_PLAYER_SPEED, 1, options_action_arg_speed, },
+ { CA_SET_PLAYER_SHIELD, 1, options_action_arg_shield, },
+ { CA_SET_PLAYER_GRAVITY, 1, options_action_arg_gravity, },
+ { CA_SET_PLAYER_ARTWORK, 1, options_action_arg_artwork, },
+ { CA_SET_CE_VALUE, 3, options_action_arg_value, },
+ { CA_SET_CE_SCORE, 3, options_action_arg_value, },
+ { CA_SET_ENGINE_SCAN_MODE, 1, options_action_arg_scan_mode, },
+
+ { -1, FALSE, NULL }
+};
+
+static struct
+{
+ int x, y;
+ int gadget_id;
+ int gadget_id_align;
+ 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] =
+{
+ /* ---------- level and editor settings ---------------------------------- */
+
+ {
+ -1, ED_LEVEL_SETTINGS_YPOS(7),
+ GADGET_ID_TIME_OR_STEPS, GADGET_ID_LEVEL_TIMELIMIT_UP,
+ -1,
+ options_time_or_steps,
+ &level.use_step_counter,
+ NULL, "(0 => no limit)", "time or step limit"
+ },
+ {
+ ED_LEVEL_SETTINGS_XPOS(0), ED_LEVEL_SETTINGS_YPOS(11),
+ GADGET_ID_GAME_ENGINE_TYPE, GADGET_ID_NONE,
+ -1,
+ options_game_engine_type,
+ &level.game_engine_type,
+ "game engine:", NULL, "game engine"
+ },
+ {
+ ED_LEVEL_SETTINGS_XPOS(0), ED_LEVEL_SETTINGS_YPOS(10),
+ GADGET_ID_WIND_DIRECTION, GADGET_ID_NONE,
+ -1,
+ options_wind_direction,
+ &level.wind_direction_initial,
+ "initial wind direction:", NULL, "initial wind direction"
+ },
+
+ /* ---------- element settings: configure (several elements) ------------- */
+
+ {
+ ED_ELEMENT_SETTINGS_XPOS(0), ED_ELEMENT_SETTINGS_YPOS(5),
+ GADGET_ID_PLAYER_SPEED, GADGET_ID_NONE,
+ -1,
+ options_player_speed,
+ &level.initial_player_stepsize[0],
+ "initial player speed:", NULL, "initial player speed"
+ },
+
+ /* ---------- element settings: configure 1 (custom elements) ------------ */
+
+ {
+ ED_ELEMENT_SETTINGS_XPOS(1), ED_ELEMENT_SETTINGS_YPOS(3),
+ GADGET_ID_CUSTOM_ACCESS_TYPE, GADGET_ID_NONE,
+ -1,
+ options_access_type,
+ &custom_element.access_type,
+ NULL, NULL, "type of access to this field"
+ },
+ {
+ -1, ED_ELEMENT_SETTINGS_YPOS(3),
+ GADGET_ID_CUSTOM_ACCESS_LAYER, GADGET_ID_CUSTOM_ACCESS_TYPE,
+ -1,
+ options_access_layer,
+ &custom_element.access_layer,
+ NULL, NULL, "layer of access for this field"
+ },
+ {
+ -1, ED_ELEMENT_SETTINGS_YPOS(3),
+ GADGET_ID_CUSTOM_ACCESS_PROTECTED, GADGET_ID_CUSTOM_ACCESS_LAYER,
+ -1,
+ options_access_protected,
+ &custom_element.access_protected,
+ NULL, NULL, "protected access for this field"
+ },
+ {
+ ED_ELEMENT_SETTINGS_XPOS(1), ED_ELEMENT_SETTINGS_YPOS(4),
+ GADGET_ID_CUSTOM_ACCESS_DIRECTION, GADGET_ID_NONE,
+ -1,
+ options_access_direction,
+ &custom_element.access_direction,
+ "from", NULL, "access direction for this field"
+ },
+ {
+ ED_ELEMENT_SETTINGS_XPOS(1), ED_ELEMENT_SETTINGS_YPOS(5),
+ GADGET_ID_CUSTOM_WALK_TO_ACTION, GADGET_ID_NONE,
+ -1,
+ options_walk_to_action,
+ &custom_element.walk_to_action,
+ NULL, NULL, "diggable/collectible/pushable"
+ },
+
+ /* ---------- element settings: configure 2 (custom elements) ------------ */
+
+ {
+ ED_ELEMENT_SETTINGS_XPOS(1), ED_ELEMENT_SETTINGS_YPOS(1),
+ GADGET_ID_CUSTOM_MOVE_PATTERN, GADGET_ID_NONE,
+ -1,
+ options_move_pattern,
+ &custom_element.move_pattern,
+ "can move", NULL, "element move pattern"
+ },
+ {
+ ED_ELEMENT_SETTINGS_XPOS(1), ED_ELEMENT_SETTINGS_YPOS(2),
+ GADGET_ID_CUSTOM_MOVE_DIRECTION, GADGET_ID_NONE,
+ -1,
+ options_move_direction,
+ &custom_element.move_direction_initial,
+ "starts moving", NULL, "initial element move direction"
+ },
+ {
+ ED_ELEMENT_SETTINGS_XPOS(1), ED_ELEMENT_SETTINGS_YPOS(4),
+ GADGET_ID_CUSTOM_MOVE_STEPSIZE, GADGET_ID_NONE,
+ -1,
+ options_move_stepsize,
+ &custom_element.move_stepsize,
+ "move/fall speed", NULL, "speed of element movement"
+ },
+ {
+ ED_ELEMENT_SETTINGS_XPOS(1), ED_ELEMENT_SETTINGS_YPOS(3),
+ GADGET_ID_CUSTOM_MOVE_LEAVE_TYPE, GADGET_ID_NONE,
+ -1,
+ options_move_leave_type,
+ &custom_element.move_leave_type,
+ "can dig: can", ":", "leave behind or change element"
+ },
+ {
+ -1, ED_ELEMENT_SETTINGS_YPOS(7),
+ GADGET_ID_CUSTOM_SMASH_TARGETS, GADGET_ID_CUSTOM_CAN_SMASH,
+ -1,
+ options_smash_targets,
+ &custom_element.smash_targets,
+ "can smash", NULL, "elements that can be smashed"
+ },
+ {
+ ED_ELEMENT_SETTINGS_XPOS(1), ED_ELEMENT_SETTINGS_YPOS(8),
+ GADGET_ID_CUSTOM_SLIPPERY_TYPE, GADGET_ID_NONE,
+ -1,
+ options_slippery_type,
+ &custom_element.slippery_type,
+ "slippery", NULL, "where other elements fall down"
+ },
+ {
+ ED_ELEMENT_SETTINGS_XPOS(1), ED_ELEMENT_SETTINGS_YPOS(9),
+ GADGET_ID_CUSTOM_DEADLINESS, GADGET_ID_NONE,
+ -1,
+ options_deadliness,
+ &custom_element.deadliness,
+ "deadly when", NULL, "deadliness of element"
+ },
+ {
+ ED_ELEMENT_SETTINGS_XPOS(1), ED_ELEMENT_SETTINGS_YPOS(10),
+ GADGET_ID_CUSTOM_EXPLOSION_TYPE, GADGET_ID_NONE,
+ -1,
+ options_explosion_type,
+ &custom_element.explosion_type,
+ "can explode", NULL, "explosion type"
+ },
+
+ /* ---------- element settings: advanced (custom elements) --------------- */
+
+ {
+ ED_ELEMENT_SETTINGS_XPOS(2), ED_ELEMENT_SETTINGS_YPOS(3),
+ GADGET_ID_CHANGE_TIME_UNITS, GADGET_ID_NONE,
+ -1,
+ options_time_units,
+ &custom_element_change.delay_frames,
+ "delay time given in", NULL, "delay time units for change"
+ },