X-Git-Url: https://git.artsoft.org/?p=rocksndiamonds.git;a=blobdiff_plain;f=src%2Feditor.c;h=06420ebcf2a18632a9856b30f1e129e22f8304c2;hp=9fa2a9090fc33382127a12f3796ad3feae55efda;hb=41831f337ebfff25c7138785efe20af5c2b0a2a8;hpb=a21695563e089926d8e859e1ee0f3b077c8a7ed0 diff --git a/src/editor.c b/src/editor.c index 9fa2a909..06420ebc 100644 --- a/src/editor.c +++ b/src/editor.c @@ -654,60 +654,61 @@ #define GADGET_ID_INITIAL_BALL_STATE (GADGET_ID_CHECKBUTTON_FIRST + 12) #define GADGET_ID_GROW_INTO_DIGGABLE (GADGET_ID_CHECKBUTTON_FIRST + 13) #define GADGET_ID_AUTO_EXIT_SOKOBAN (GADGET_ID_CHECKBUTTON_FIRST + 14) -#define GADGET_ID_CONTINUOUS_SNAPPING (GADGET_ID_CHECKBUTTON_FIRST + 15) -#define GADGET_ID_BLOCK_SNAP_FIELD (GADGET_ID_CHECKBUTTON_FIRST + 16) -#define GADGET_ID_BLOCK_LAST_FIELD (GADGET_ID_CHECKBUTTON_FIRST + 17) -#define GADGET_ID_SP_BLOCK_LAST_FIELD (GADGET_ID_CHECKBUTTON_FIRST + 18) -#define GADGET_ID_INSTANT_RELOCATION (GADGET_ID_CHECKBUTTON_FIRST + 19) -#define GADGET_ID_SHIFTED_RELOCATION (GADGET_ID_CHECKBUTTON_FIRST + 20) -#define GADGET_ID_LAZY_RELOCATION (GADGET_ID_CHECKBUTTON_FIRST + 21) -#define GADGET_ID_USE_START_ELEMENT (GADGET_ID_CHECKBUTTON_FIRST + 22) -#define GADGET_ID_USE_ARTWORK_ELEMENT (GADGET_ID_CHECKBUTTON_FIRST + 23) -#define GADGET_ID_USE_EXPLOSION_ELEMENT (GADGET_ID_CHECKBUTTON_FIRST + 24) -#define GADGET_ID_INITIAL_GRAVITY (GADGET_ID_CHECKBUTTON_FIRST + 25) -#define GADGET_ID_USE_INITIAL_INVENTORY (GADGET_ID_CHECKBUTTON_FIRST + 26) -#define GADGET_ID_CAN_PASS_TO_WALKABLE (GADGET_ID_CHECKBUTTON_FIRST + 27) -#define GADGET_ID_CAN_FALL_INTO_ACID (GADGET_ID_CHECKBUTTON_FIRST + 28) -#define GADGET_ID_CAN_MOVE_INTO_ACID (GADGET_ID_CHECKBUTTON_FIRST + 29) -#define GADGET_ID_DONT_COLLIDE_WITH (GADGET_ID_CHECKBUTTON_FIRST + 30) -#define GADGET_ID_ENVELOPE_AUTOWRAP (GADGET_ID_CHECKBUTTON_FIRST + 31) -#define GADGET_ID_ENVELOPE_CENTERED (GADGET_ID_CHECKBUTTON_FIRST + 32) -#define GADGET_ID_MM_LASER_RED (GADGET_ID_CHECKBUTTON_FIRST + 33) -#define GADGET_ID_MM_LASER_GREEN (GADGET_ID_CHECKBUTTON_FIRST + 34) -#define GADGET_ID_MM_LASER_BLUE (GADGET_ID_CHECKBUTTON_FIRST + 35) -#define GADGET_ID_DF_LASER_RED (GADGET_ID_CHECKBUTTON_FIRST + 36) -#define GADGET_ID_DF_LASER_GREEN (GADGET_ID_CHECKBUTTON_FIRST + 37) -#define GADGET_ID_DF_LASER_BLUE (GADGET_ID_CHECKBUTTON_FIRST + 38) -#define GADGET_ID_CUSTOM_INDESTRUCTIBLE (GADGET_ID_CHECKBUTTON_FIRST + 39) -#define GADGET_ID_CUSTOM_CAN_EXPLODE (GADGET_ID_CHECKBUTTON_FIRST + 40) -#define GADGET_ID_CUSTOM_EXPLODE_FIRE (GADGET_ID_CHECKBUTTON_FIRST + 41) -#define GADGET_ID_CUSTOM_EXPLODE_SMASH (GADGET_ID_CHECKBUTTON_FIRST + 42) -#define GADGET_ID_CUSTOM_EXPLODE_IMPACT (GADGET_ID_CHECKBUTTON_FIRST + 43) -#define GADGET_ID_CUSTOM_WALK_TO_OBJECT (GADGET_ID_CHECKBUTTON_FIRST + 44) -#define GADGET_ID_CUSTOM_DEADLY (GADGET_ID_CHECKBUTTON_FIRST + 45) -#define GADGET_ID_CUSTOM_CAN_MOVE (GADGET_ID_CHECKBUTTON_FIRST + 46) -#define GADGET_ID_CUSTOM_CAN_FALL (GADGET_ID_CHECKBUTTON_FIRST + 47) -#define GADGET_ID_CUSTOM_CAN_SMASH (GADGET_ID_CHECKBUTTON_FIRST + 48) -#define GADGET_ID_CUSTOM_SLIPPERY (GADGET_ID_CHECKBUTTON_FIRST + 49) -#define GADGET_ID_CUSTOM_ACCESSIBLE (GADGET_ID_CHECKBUTTON_FIRST + 50) -#define GADGET_ID_CUSTOM_GRAV_REACHABLE (GADGET_ID_CHECKBUTTON_FIRST + 51) -#define GADGET_ID_CUSTOM_USE_LAST_VALUE (GADGET_ID_CHECKBUTTON_FIRST + 52) -#define GADGET_ID_CUSTOM_USE_GRAPHIC (GADGET_ID_CHECKBUTTON_FIRST + 53) -#define GADGET_ID_CUSTOM_USE_TEMPLATE_1 (GADGET_ID_CHECKBUTTON_FIRST + 54) -#define GADGET_ID_CUSTOM_USE_TEMPLATE_2 (GADGET_ID_CHECKBUTTON_FIRST + 55) -#define GADGET_ID_CUSTOM_USE_TEMPLATE_3 (GADGET_ID_CHECKBUTTON_FIRST + 56) -#define GADGET_ID_CUSTOM_CAN_CHANGE (GADGET_ID_CHECKBUTTON_FIRST + 57) -#define GADGET_ID_CHANGE_USE_CONTENT (GADGET_ID_CHECKBUTTON_FIRST + 58) -#define GADGET_ID_CHANGE_USE_EXPLOSION (GADGET_ID_CHECKBUTTON_FIRST + 59) -#define GADGET_ID_CHANGE_ONLY_COMPLETE (GADGET_ID_CHECKBUTTON_FIRST + 60) -#define GADGET_ID_CHANGE_USE_RANDOM (GADGET_ID_CHECKBUTTON_FIRST + 61) -#define GADGET_ID_CHANGE_HAS_ACTION (GADGET_ID_CHECKBUTTON_FIRST + 62) -#define GADGET_ID_CHANGE_DELAY (GADGET_ID_CHECKBUTTON_FIRST + 63) -#define GADGET_ID_CHANGE_BY_DIRECT_ACT (GADGET_ID_CHECKBUTTON_FIRST + 64) -#define GADGET_ID_CHANGE_BY_OTHER_ACT (GADGET_ID_CHECKBUTTON_FIRST + 65) +#define GADGET_ID_SOLVED_BY_ONE_PLAYER (GADGET_ID_CHECKBUTTON_FIRST + 15) +#define GADGET_ID_CONTINUOUS_SNAPPING (GADGET_ID_CHECKBUTTON_FIRST + 16) +#define GADGET_ID_BLOCK_SNAP_FIELD (GADGET_ID_CHECKBUTTON_FIRST + 17) +#define GADGET_ID_BLOCK_LAST_FIELD (GADGET_ID_CHECKBUTTON_FIRST + 18) +#define GADGET_ID_SP_BLOCK_LAST_FIELD (GADGET_ID_CHECKBUTTON_FIRST + 19) +#define GADGET_ID_INSTANT_RELOCATION (GADGET_ID_CHECKBUTTON_FIRST + 20) +#define GADGET_ID_SHIFTED_RELOCATION (GADGET_ID_CHECKBUTTON_FIRST + 21) +#define GADGET_ID_LAZY_RELOCATION (GADGET_ID_CHECKBUTTON_FIRST + 22) +#define GADGET_ID_USE_START_ELEMENT (GADGET_ID_CHECKBUTTON_FIRST + 23) +#define GADGET_ID_USE_ARTWORK_ELEMENT (GADGET_ID_CHECKBUTTON_FIRST + 24) +#define GADGET_ID_USE_EXPLOSION_ELEMENT (GADGET_ID_CHECKBUTTON_FIRST + 25) +#define GADGET_ID_INITIAL_GRAVITY (GADGET_ID_CHECKBUTTON_FIRST + 26) +#define GADGET_ID_USE_INITIAL_INVENTORY (GADGET_ID_CHECKBUTTON_FIRST + 27) +#define GADGET_ID_CAN_PASS_TO_WALKABLE (GADGET_ID_CHECKBUTTON_FIRST + 28) +#define GADGET_ID_CAN_FALL_INTO_ACID (GADGET_ID_CHECKBUTTON_FIRST + 29) +#define GADGET_ID_CAN_MOVE_INTO_ACID (GADGET_ID_CHECKBUTTON_FIRST + 30) +#define GADGET_ID_DONT_COLLIDE_WITH (GADGET_ID_CHECKBUTTON_FIRST + 31) +#define GADGET_ID_ENVELOPE_AUTOWRAP (GADGET_ID_CHECKBUTTON_FIRST + 32) +#define GADGET_ID_ENVELOPE_CENTERED (GADGET_ID_CHECKBUTTON_FIRST + 33) +#define GADGET_ID_MM_LASER_RED (GADGET_ID_CHECKBUTTON_FIRST + 34) +#define GADGET_ID_MM_LASER_GREEN (GADGET_ID_CHECKBUTTON_FIRST + 35) +#define GADGET_ID_MM_LASER_BLUE (GADGET_ID_CHECKBUTTON_FIRST + 36) +#define GADGET_ID_DF_LASER_RED (GADGET_ID_CHECKBUTTON_FIRST + 37) +#define GADGET_ID_DF_LASER_GREEN (GADGET_ID_CHECKBUTTON_FIRST + 38) +#define GADGET_ID_DF_LASER_BLUE (GADGET_ID_CHECKBUTTON_FIRST + 39) +#define GADGET_ID_CUSTOM_INDESTRUCTIBLE (GADGET_ID_CHECKBUTTON_FIRST + 40) +#define GADGET_ID_CUSTOM_CAN_EXPLODE (GADGET_ID_CHECKBUTTON_FIRST + 41) +#define GADGET_ID_CUSTOM_EXPLODE_FIRE (GADGET_ID_CHECKBUTTON_FIRST + 42) +#define GADGET_ID_CUSTOM_EXPLODE_SMASH (GADGET_ID_CHECKBUTTON_FIRST + 43) +#define GADGET_ID_CUSTOM_EXPLODE_IMPACT (GADGET_ID_CHECKBUTTON_FIRST + 44) +#define GADGET_ID_CUSTOM_WALK_TO_OBJECT (GADGET_ID_CHECKBUTTON_FIRST + 45) +#define GADGET_ID_CUSTOM_DEADLY (GADGET_ID_CHECKBUTTON_FIRST + 46) +#define GADGET_ID_CUSTOM_CAN_MOVE (GADGET_ID_CHECKBUTTON_FIRST + 47) +#define GADGET_ID_CUSTOM_CAN_FALL (GADGET_ID_CHECKBUTTON_FIRST + 48) +#define GADGET_ID_CUSTOM_CAN_SMASH (GADGET_ID_CHECKBUTTON_FIRST + 49) +#define GADGET_ID_CUSTOM_SLIPPERY (GADGET_ID_CHECKBUTTON_FIRST + 50) +#define GADGET_ID_CUSTOM_ACCESSIBLE (GADGET_ID_CHECKBUTTON_FIRST + 51) +#define GADGET_ID_CUSTOM_GRAV_REACHABLE (GADGET_ID_CHECKBUTTON_FIRST + 52) +#define GADGET_ID_CUSTOM_USE_LAST_VALUE (GADGET_ID_CHECKBUTTON_FIRST + 53) +#define GADGET_ID_CUSTOM_USE_GRAPHIC (GADGET_ID_CHECKBUTTON_FIRST + 54) +#define GADGET_ID_CUSTOM_USE_TEMPLATE_1 (GADGET_ID_CHECKBUTTON_FIRST + 55) +#define GADGET_ID_CUSTOM_USE_TEMPLATE_2 (GADGET_ID_CHECKBUTTON_FIRST + 56) +#define GADGET_ID_CUSTOM_USE_TEMPLATE_3 (GADGET_ID_CHECKBUTTON_FIRST + 57) +#define GADGET_ID_CUSTOM_CAN_CHANGE (GADGET_ID_CHECKBUTTON_FIRST + 58) +#define GADGET_ID_CHANGE_USE_CONTENT (GADGET_ID_CHECKBUTTON_FIRST + 59) +#define GADGET_ID_CHANGE_USE_EXPLOSION (GADGET_ID_CHECKBUTTON_FIRST + 60) +#define GADGET_ID_CHANGE_ONLY_COMPLETE (GADGET_ID_CHECKBUTTON_FIRST + 61) +#define GADGET_ID_CHANGE_USE_RANDOM (GADGET_ID_CHECKBUTTON_FIRST + 62) +#define GADGET_ID_CHANGE_HAS_ACTION (GADGET_ID_CHECKBUTTON_FIRST + 63) +#define GADGET_ID_CHANGE_DELAY (GADGET_ID_CHECKBUTTON_FIRST + 64) +#define GADGET_ID_CHANGE_BY_DIRECT_ACT (GADGET_ID_CHECKBUTTON_FIRST + 65) +#define GADGET_ID_CHANGE_BY_OTHER_ACT (GADGET_ID_CHECKBUTTON_FIRST + 66) /* gadgets for buttons in element list */ -#define GADGET_ID_ELEMENTLIST_FIRST (GADGET_ID_CHECKBUTTON_FIRST + 66) +#define GADGET_ID_ELEMENTLIST_FIRST (GADGET_ID_CHECKBUTTON_FIRST + 67) #define GADGET_ID_ELEMENTLIST_LAST (GADGET_ID_ELEMENTLIST_FIRST + \ ED_NUM_ELEMENTLIST_BUTTONS - 1) @@ -923,57 +924,58 @@ #define ED_CHECKBUTTON_ID_INITIAL_BALL_STATE 12 #define ED_CHECKBUTTON_ID_GROW_INTO_DIGGABLE 13 #define ED_CHECKBUTTON_ID_AUTO_EXIT_SOKOBAN 14 -#define ED_CHECKBUTTON_ID_CONTINUOUS_SNAPPING 15 -#define ED_CHECKBUTTON_ID_BLOCK_SNAP_FIELD 16 -#define ED_CHECKBUTTON_ID_BLOCK_LAST_FIELD 17 -#define ED_CHECKBUTTON_ID_SP_BLOCK_LAST_FIELD 18 -#define ED_CHECKBUTTON_ID_INSTANT_RELOCATION 19 -#define ED_CHECKBUTTON_ID_SHIFTED_RELOCATION 20 -#define ED_CHECKBUTTON_ID_LAZY_RELOCATION 21 -#define ED_CHECKBUTTON_ID_USE_START_ELEMENT 22 -#define ED_CHECKBUTTON_ID_USE_ARTWORK_ELEMENT 23 -#define ED_CHECKBUTTON_ID_USE_EXPLOSION_ELEMENT 24 -#define ED_CHECKBUTTON_ID_INITIAL_GRAVITY 25 -#define ED_CHECKBUTTON_ID_USE_INITIAL_INVENTORY 26 -#define ED_CHECKBUTTON_ID_CAN_PASS_TO_WALKABLE 27 -#define ED_CHECKBUTTON_ID_CAN_FALL_INTO_ACID 28 -#define ED_CHECKBUTTON_ID_CAN_MOVE_INTO_ACID 29 -#define ED_CHECKBUTTON_ID_DONT_COLLIDE_WITH 30 -#define ED_CHECKBUTTON_ID_ENVELOPE_AUTOWRAP 31 -#define ED_CHECKBUTTON_ID_ENVELOPE_CENTERED 32 -#define ED_CHECKBUTTON_ID_MM_LASER_RED 33 -#define ED_CHECKBUTTON_ID_MM_LASER_GREEN 34 -#define ED_CHECKBUTTON_ID_MM_LASER_BLUE 35 -#define ED_CHECKBUTTON_ID_DF_LASER_RED 36 -#define ED_CHECKBUTTON_ID_DF_LASER_GREEN 37 -#define ED_CHECKBUTTON_ID_DF_LASER_BLUE 38 -#define ED_CHECKBUTTON_ID_CUSTOM_USE_GRAPHIC 39 -#define ED_CHECKBUTTON_ID_CUSTOM_USE_TEMPLATE_1 40 -#define ED_CHECKBUTTON_ID_CUSTOM_ACCESSIBLE 41 -#define ED_CHECKBUTTON_ID_CUSTOM_GRAV_REACHABLE 42 -#define ED_CHECKBUTTON_ID_CUSTOM_USE_LAST_VALUE 43 -#define ED_CHECKBUTTON_ID_CUSTOM_WALK_TO_OBJECT 44 -#define ED_CHECKBUTTON_ID_CUSTOM_INDESTRUCTIBLE 45 -#define ED_CHECKBUTTON_ID_CUSTOM_CAN_MOVE 46 -#define ED_CHECKBUTTON_ID_CUSTOM_CAN_FALL 47 -#define ED_CHECKBUTTON_ID_CUSTOM_CAN_SMASH 48 -#define ED_CHECKBUTTON_ID_CUSTOM_SLIPPERY 49 -#define ED_CHECKBUTTON_ID_CUSTOM_DEADLY 50 -#define ED_CHECKBUTTON_ID_CUSTOM_CAN_EXPLODE 51 -#define ED_CHECKBUTTON_ID_CUSTOM_EXPLODE_FIRE 52 -#define ED_CHECKBUTTON_ID_CUSTOM_EXPLODE_SMASH 53 -#define ED_CHECKBUTTON_ID_CUSTOM_EXPLODE_IMPACT 54 -#define ED_CHECKBUTTON_ID_CUSTOM_CAN_CHANGE 55 -#define ED_CHECKBUTTON_ID_CHANGE_DELAY 56 -#define ED_CHECKBUTTON_ID_CHANGE_BY_DIRECT_ACT 57 -#define ED_CHECKBUTTON_ID_CHANGE_BY_OTHER_ACT 58 -#define ED_CHECKBUTTON_ID_CHANGE_USE_EXPLOSION 59 -#define ED_CHECKBUTTON_ID_CHANGE_USE_CONTENT 60 -#define ED_CHECKBUTTON_ID_CHANGE_ONLY_COMPLETE 61 -#define ED_CHECKBUTTON_ID_CHANGE_USE_RANDOM 62 -#define ED_CHECKBUTTON_ID_CHANGE_HAS_ACTION 63 - -#define ED_NUM_CHECKBUTTONS 64 +#define ED_CHECKBUTTON_ID_SOLVED_BY_ONE_PLAYER 15 +#define ED_CHECKBUTTON_ID_CONTINUOUS_SNAPPING 16 +#define ED_CHECKBUTTON_ID_BLOCK_SNAP_FIELD 17 +#define ED_CHECKBUTTON_ID_BLOCK_LAST_FIELD 18 +#define ED_CHECKBUTTON_ID_SP_BLOCK_LAST_FIELD 19 +#define ED_CHECKBUTTON_ID_INSTANT_RELOCATION 20 +#define ED_CHECKBUTTON_ID_SHIFTED_RELOCATION 21 +#define ED_CHECKBUTTON_ID_LAZY_RELOCATION 22 +#define ED_CHECKBUTTON_ID_USE_START_ELEMENT 23 +#define ED_CHECKBUTTON_ID_USE_ARTWORK_ELEMENT 24 +#define ED_CHECKBUTTON_ID_USE_EXPLOSION_ELEMENT 25 +#define ED_CHECKBUTTON_ID_INITIAL_GRAVITY 26 +#define ED_CHECKBUTTON_ID_USE_INITIAL_INVENTORY 27 +#define ED_CHECKBUTTON_ID_CAN_PASS_TO_WALKABLE 28 +#define ED_CHECKBUTTON_ID_CAN_FALL_INTO_ACID 29 +#define ED_CHECKBUTTON_ID_CAN_MOVE_INTO_ACID 30 +#define ED_CHECKBUTTON_ID_DONT_COLLIDE_WITH 31 +#define ED_CHECKBUTTON_ID_ENVELOPE_AUTOWRAP 32 +#define ED_CHECKBUTTON_ID_ENVELOPE_CENTERED 33 +#define ED_CHECKBUTTON_ID_MM_LASER_RED 34 +#define ED_CHECKBUTTON_ID_MM_LASER_GREEN 35 +#define ED_CHECKBUTTON_ID_MM_LASER_BLUE 36 +#define ED_CHECKBUTTON_ID_DF_LASER_RED 37 +#define ED_CHECKBUTTON_ID_DF_LASER_GREEN 38 +#define ED_CHECKBUTTON_ID_DF_LASER_BLUE 39 +#define ED_CHECKBUTTON_ID_CUSTOM_USE_GRAPHIC 40 +#define ED_CHECKBUTTON_ID_CUSTOM_USE_TEMPLATE_1 41 +#define ED_CHECKBUTTON_ID_CUSTOM_ACCESSIBLE 42 +#define ED_CHECKBUTTON_ID_CUSTOM_GRAV_REACHABLE 43 +#define ED_CHECKBUTTON_ID_CUSTOM_USE_LAST_VALUE 44 +#define ED_CHECKBUTTON_ID_CUSTOM_WALK_TO_OBJECT 45 +#define ED_CHECKBUTTON_ID_CUSTOM_INDESTRUCTIBLE 46 +#define ED_CHECKBUTTON_ID_CUSTOM_CAN_MOVE 47 +#define ED_CHECKBUTTON_ID_CUSTOM_CAN_FALL 48 +#define ED_CHECKBUTTON_ID_CUSTOM_CAN_SMASH 49 +#define ED_CHECKBUTTON_ID_CUSTOM_SLIPPERY 50 +#define ED_CHECKBUTTON_ID_CUSTOM_DEADLY 51 +#define ED_CHECKBUTTON_ID_CUSTOM_CAN_EXPLODE 52 +#define ED_CHECKBUTTON_ID_CUSTOM_EXPLODE_FIRE 53 +#define ED_CHECKBUTTON_ID_CUSTOM_EXPLODE_SMASH 54 +#define ED_CHECKBUTTON_ID_CUSTOM_EXPLODE_IMPACT 55 +#define ED_CHECKBUTTON_ID_CUSTOM_CAN_CHANGE 56 +#define ED_CHECKBUTTON_ID_CHANGE_DELAY 57 +#define ED_CHECKBUTTON_ID_CHANGE_BY_DIRECT_ACT 58 +#define ED_CHECKBUTTON_ID_CHANGE_BY_OTHER_ACT 59 +#define ED_CHECKBUTTON_ID_CHANGE_USE_EXPLOSION 60 +#define ED_CHECKBUTTON_ID_CHANGE_USE_CONTENT 61 +#define ED_CHECKBUTTON_ID_CHANGE_ONLY_COMPLETE 62 +#define ED_CHECKBUTTON_ID_CHANGE_USE_RANDOM 63 +#define ED_CHECKBUTTON_ID_CHANGE_HAS_ACTION 64 + +#define ED_NUM_CHECKBUTTONS 65 #define ED_CHECKBUTTON_ID_LEVEL_FIRST ED_CHECKBUTTON_ID_AUTO_COUNT_GEMS #define ED_CHECKBUTTON_ID_LEVEL_LAST ED_CHECKBUTTON_ID_AUTO_COUNT_GEMS @@ -3039,6 +3041,13 @@ static struct NULL, NULL, "exit level if all fields solved", "automatically finish Sokoban levels" }, + { + ED_ELEMENT_SETTINGS_XPOS(0), ED_ELEMENT_SETTINGS_YPOS(14), + GADGET_ID_SOLVED_BY_ONE_PLAYER, GADGET_ID_NONE, + &level.solved_by_one_player, + NULL, NULL, + "only one player must enter exit", "level solved by first player in exit" + }, { ED_ELEMENT_SETTINGS_XPOS(0), ED_ELEMENT_SETTINGS_YPOS(9), GADGET_ID_CONTINUOUS_SNAPPING, GADGET_ID_NONE, @@ -3806,7 +3815,7 @@ static int editor_el_players[] = EL_PLAYER_4 }; static int *editor_el_players_ptr = editor_el_players; -static int num_editor_el_players = SIZEOF_ARRAY_INT(editor_el_players); +static int num_editor_el_players = ARRAY_SIZE(editor_el_players); static int editor_hl_boulderdash[] = { @@ -3845,8 +3854,8 @@ static int editor_el_boulderdash[] = }; static int *editor_hl_boulderdash_ptr = editor_hl_boulderdash; static int *editor_el_boulderdash_ptr = editor_el_boulderdash; -static int num_editor_hl_boulderdash = SIZEOF_ARRAY_INT(editor_hl_boulderdash); -static int num_editor_el_boulderdash = SIZEOF_ARRAY_INT(editor_el_boulderdash); +static int num_editor_hl_boulderdash = ARRAY_SIZE(editor_hl_boulderdash); +static int num_editor_el_boulderdash = ARRAY_SIZE(editor_el_boulderdash); static int editor_hl_emerald_mine[] = { @@ -3920,8 +3929,8 @@ static int editor_el_emerald_mine[] = }; static int *editor_hl_emerald_mine_ptr = editor_hl_emerald_mine; static int *editor_el_emerald_mine_ptr = editor_el_emerald_mine; -static int num_editor_hl_emerald_mine=SIZEOF_ARRAY_INT(editor_hl_emerald_mine); -static int num_editor_el_emerald_mine=SIZEOF_ARRAY_INT(editor_el_emerald_mine); +static int num_editor_hl_emerald_mine = ARRAY_SIZE(editor_hl_emerald_mine); +static int num_editor_el_emerald_mine = ARRAY_SIZE(editor_el_emerald_mine); static int editor_hl_emerald_mine_club[] = { @@ -4010,8 +4019,8 @@ static int editor_el_emerald_mine_club[] = }; static int *editor_hl_emerald_mine_club_ptr = editor_hl_emerald_mine_club; static int *editor_el_emerald_mine_club_ptr = editor_el_emerald_mine_club; -static int num_editor_hl_emerald_mine_club=SIZEOF_ARRAY_INT(editor_hl_emerald_mine_club); -static int num_editor_el_emerald_mine_club=SIZEOF_ARRAY_INT(editor_el_emerald_mine_club); +static int num_editor_hl_emerald_mine_club = ARRAY_SIZE(editor_hl_emerald_mine_club); +static int num_editor_el_emerald_mine_club = ARRAY_SIZE(editor_el_emerald_mine_club); static int editor_hl_rnd[] = { @@ -4110,8 +4119,8 @@ static int editor_el_rnd[] = }; static int *editor_hl_rnd_ptr = editor_hl_rnd; static int *editor_el_rnd_ptr = editor_el_rnd; -static int num_editor_hl_rnd = SIZEOF_ARRAY_INT(editor_hl_rnd); -static int num_editor_el_rnd = SIZEOF_ARRAY_INT(editor_el_rnd); +static int num_editor_hl_rnd = ARRAY_SIZE(editor_hl_rnd); +static int num_editor_el_rnd = ARRAY_SIZE(editor_el_rnd); static int editor_hl_sokoban[] = { @@ -4130,8 +4139,8 @@ static int editor_el_sokoban[] = }; static int *editor_hl_sokoban_ptr = editor_hl_sokoban; static int *editor_el_sokoban_ptr = editor_el_sokoban; -static int num_editor_hl_sokoban = SIZEOF_ARRAY_INT(editor_hl_sokoban); -static int num_editor_el_sokoban = SIZEOF_ARRAY_INT(editor_el_sokoban); +static int num_editor_hl_sokoban = ARRAY_SIZE(editor_hl_sokoban); +static int num_editor_el_sokoban = ARRAY_SIZE(editor_el_sokoban); static int editor_hl_supaplex[] = { @@ -4205,8 +4214,8 @@ static int editor_el_supaplex[] = }; static int *editor_hl_supaplex_ptr = editor_hl_supaplex; static int *editor_el_supaplex_ptr = editor_el_supaplex; -static int num_editor_hl_supaplex = SIZEOF_ARRAY_INT(editor_hl_supaplex); -static int num_editor_el_supaplex = SIZEOF_ARRAY_INT(editor_el_supaplex); +static int num_editor_hl_supaplex = ARRAY_SIZE(editor_hl_supaplex); +static int num_editor_el_supaplex = ARRAY_SIZE(editor_el_supaplex); static int editor_hl_diamond_caves[] = { @@ -4367,8 +4376,8 @@ static int editor_el_diamond_caves[] = }; static int *editor_hl_diamond_caves_ptr = editor_hl_diamond_caves; static int *editor_el_diamond_caves_ptr = editor_el_diamond_caves; -static int num_editor_hl_diamond_caves = SIZEOF_ARRAY_INT(editor_hl_diamond_caves); -static int num_editor_el_diamond_caves = SIZEOF_ARRAY_INT(editor_el_diamond_caves); +static int num_editor_hl_diamond_caves = ARRAY_SIZE(editor_hl_diamond_caves); +static int num_editor_el_diamond_caves = ARRAY_SIZE(editor_el_diamond_caves); static int editor_hl_dx_boulderdash[] = { @@ -4402,8 +4411,8 @@ static int editor_el_dx_boulderdash[] = }; static int *editor_hl_dx_boulderdash_ptr = editor_hl_dx_boulderdash; static int *editor_el_dx_boulderdash_ptr = editor_el_dx_boulderdash; -static int num_editor_hl_dx_boulderdash = SIZEOF_ARRAY_INT(editor_hl_dx_boulderdash); -static int num_editor_el_dx_boulderdash = SIZEOF_ARRAY_INT(editor_el_dx_boulderdash); +static int num_editor_hl_dx_boulderdash = ARRAY_SIZE(editor_hl_dx_boulderdash); +static int num_editor_el_dx_boulderdash = ARRAY_SIZE(editor_el_dx_boulderdash); static int editor_hl_mirror_magic[] = { @@ -4467,8 +4476,8 @@ static int editor_el_mirror_magic[] = }; static int *editor_hl_mirror_magic_ptr = editor_hl_mirror_magic; static int *editor_el_mirror_magic_ptr = editor_el_mirror_magic; -static int num_editor_hl_mirror_magic = SIZEOF_ARRAY_INT(editor_hl_mirror_magic); -static int num_editor_el_mirror_magic = SIZEOF_ARRAY_INT(editor_el_mirror_magic); +static int num_editor_hl_mirror_magic = ARRAY_SIZE(editor_hl_mirror_magic); +static int num_editor_el_mirror_magic = ARRAY_SIZE(editor_el_mirror_magic); static int editor_hl_deflektor[] = { @@ -4512,8 +4521,8 @@ static int editor_el_deflektor[] = }; static int *editor_hl_deflektor_ptr = editor_hl_deflektor; static int *editor_el_deflektor_ptr = editor_el_deflektor; -static int num_editor_hl_deflektor = SIZEOF_ARRAY_INT(editor_hl_deflektor); -static int num_editor_el_deflektor = SIZEOF_ARRAY_INT(editor_el_deflektor); +static int num_editor_hl_deflektor = ARRAY_SIZE(editor_hl_deflektor); +static int num_editor_el_deflektor = ARRAY_SIZE(editor_el_deflektor); static int editor_hl_chars[] = { @@ -4622,8 +4631,8 @@ static int editor_el_chars[] = }; static int *editor_hl_chars_ptr = editor_hl_chars; static int *editor_el_chars_ptr = editor_el_chars; -static int num_editor_hl_chars = SIZEOF_ARRAY_INT(editor_hl_chars); -static int num_editor_el_chars = SIZEOF_ARRAY_INT(editor_el_chars); +static int num_editor_hl_chars = ARRAY_SIZE(editor_hl_chars); +static int num_editor_el_chars = ARRAY_SIZE(editor_el_chars); static int editor_hl_steel_chars[] = { @@ -4732,8 +4741,8 @@ static int editor_el_steel_chars[] = }; static int *editor_hl_steel_chars_ptr = editor_hl_steel_chars; static int *editor_el_steel_chars_ptr = editor_el_steel_chars; -static int num_editor_hl_steel_chars = SIZEOF_ARRAY_INT(editor_hl_steel_chars); -static int num_editor_el_steel_chars = SIZEOF_ARRAY_INT(editor_el_steel_chars); +static int num_editor_hl_steel_chars = ARRAY_SIZE(editor_hl_steel_chars); +static int num_editor_el_steel_chars = ARRAY_SIZE(editor_el_steel_chars); static int editor_hl_custom[] = { @@ -5067,8 +5076,8 @@ static int editor_el_custom[] = }; static int *editor_hl_custom_ptr = editor_hl_custom; static int *editor_el_custom_ptr = editor_el_custom; -static int num_editor_hl_custom = SIZEOF_ARRAY_INT(editor_hl_custom); -static int num_editor_el_custom = SIZEOF_ARRAY_INT(editor_el_custom); +static int num_editor_hl_custom = ARRAY_SIZE(editor_hl_custom); +static int num_editor_el_custom = ARRAY_SIZE(editor_el_custom); static int editor_hl_group[] = { @@ -5122,8 +5131,8 @@ static int editor_el_group[] = }; static int *editor_hl_group_ptr = editor_hl_group; static int *editor_el_group_ptr = editor_el_group; -static int num_editor_hl_group = SIZEOF_ARRAY_INT(editor_hl_group); -static int num_editor_el_group = SIZEOF_ARRAY_INT(editor_el_group); +static int num_editor_hl_group = ARRAY_SIZE(editor_hl_group); +static int num_editor_el_group = ARRAY_SIZE(editor_el_group); static int editor_hl_reference[] = { @@ -5167,8 +5176,8 @@ static int editor_el_reference[] = }; static int *editor_hl_reference_ptr = editor_hl_reference; static int *editor_el_reference_ptr = editor_el_reference; -static int num_editor_hl_reference = SIZEOF_ARRAY_INT(editor_hl_reference); -static int num_editor_el_reference = SIZEOF_ARRAY_INT(editor_el_reference); +static int num_editor_hl_reference = ARRAY_SIZE(editor_hl_reference); +static int num_editor_el_reference = ARRAY_SIZE(editor_el_reference); static int editor_hl_user_defined[] = { @@ -5180,7 +5189,7 @@ static int editor_hl_user_defined[] = static int *editor_hl_user_defined_ptr = editor_hl_user_defined; static int *editor_el_user_defined_ptr = NULL; -static int num_editor_hl_user_defined=SIZEOF_ARRAY_INT(editor_hl_user_defined); +static int num_editor_hl_user_defined = ARRAY_SIZE(editor_hl_user_defined); static int num_editor_el_user_defined = 0; static int editor_hl_dynamic[] = @@ -5193,7 +5202,7 @@ static int editor_hl_dynamic[] = static int *editor_hl_dynamic_ptr = editor_hl_dynamic; static int *editor_el_dynamic_ptr = NULL; -static int num_editor_hl_dynamic = SIZEOF_ARRAY_INT(editor_hl_dynamic); +static int num_editor_hl_dynamic = ARRAY_SIZE(editor_hl_dynamic); static int num_editor_el_dynamic = 0; static int editor_hl_empty[] = { EL_EMPTY }; @@ -9819,6 +9828,7 @@ static void DrawPropertiesConfig() MapCheckbuttonGadget(ED_CHECKBUTTON_ID_USE_EXPLOSION_ELEMENT); MapCheckbuttonGadget(ED_CHECKBUTTON_ID_INITIAL_GRAVITY); MapCheckbuttonGadget(ED_CHECKBUTTON_ID_CAN_PASS_TO_WALKABLE); + MapCheckbuttonGadget(ED_CHECKBUTTON_ID_SOLVED_BY_ONE_PLAYER); MapDrawingArea(ED_DRAWING_ID_START_ELEMENT); MapDrawingArea(ED_DRAWING_ID_ARTWORK_ELEMENT); @@ -13147,7 +13157,8 @@ static void HandleCheckbuttons(struct GadgetInfo *gi) if ((type_id >= ED_CHECKBUTTON_ID_LEVELSET_FIRST && type_id <= ED_CHECKBUTTON_ID_LEVELSET_LAST) || (type_id >= ED_CHECKBUTTON_ID_EDITOR_FIRST && - type_id <= ED_CHECKBUTTON_ID_EDITOR_LAST) || + type_id <= ED_CHECKBUTTON_ID_EDITOR_LAST && + type_id != ED_CHECKBUTTON_ID_CUSTOM_USE_TEMPLATE_2) || type_id == ED_CHECKBUTTON_ID_STICK_ELEMENT) return;