From: Holger Schemel Date: Sun, 15 Jun 2008 19:08:27 +0000 (+0200) Subject: rnd-20080615-1-src X-Git-Tag: 3.2.6.0^2~11 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=25324e48a023debcf7848c1c04fd4236cf7e6fb9;p=rocksndiamonds.git rnd-20080615-1-src --- diff --git a/src/conftime.h b/src/conftime.h index 544efe05..fa35e4ee 100644 --- a/src/conftime.h +++ b/src/conftime.h @@ -1 +1 @@ -#define COMPILE_DATE_STRING "2008-04-26 02:20" +#define COMPILE_DATE_STRING "2008-06-15 21:07" diff --git a/src/editor.c b/src/editor.c index daf6ec33..7ed2bb29 100644 --- a/src/editor.c +++ b/src/editor.c @@ -554,56 +554,57 @@ #define GADGET_ID_RANDOM_RESTRICTED (GADGET_ID_CHECKBUTTON_FIRST + 2) #define GADGET_ID_STICK_ELEMENT (GADGET_ID_CHECKBUTTON_FIRST + 3) #define GADGET_ID_EM_SLIPPERY_GEMS (GADGET_ID_CHECKBUTTON_FIRST + 4) -#define GADGET_ID_USE_SPRING_BUG (GADGET_ID_CHECKBUTTON_FIRST + 5) -#define GADGET_ID_USE_TIME_ORB_BUG (GADGET_ID_CHECKBUTTON_FIRST + 6) -#define GADGET_ID_RANDOM_BALL_CONTENT (GADGET_ID_CHECKBUTTON_FIRST + 7) -#define GADGET_ID_INITIAL_BALL_STATE (GADGET_ID_CHECKBUTTON_FIRST + 8) -#define GADGET_ID_GROW_INTO_DIGGABLE (GADGET_ID_CHECKBUTTON_FIRST + 9) -#define GADGET_ID_CONTINUOUS_SNAPPING (GADGET_ID_CHECKBUTTON_FIRST + 10) -#define GADGET_ID_BLOCK_SNAP_FIELD (GADGET_ID_CHECKBUTTON_FIRST + 11) -#define GADGET_ID_BLOCK_LAST_FIELD (GADGET_ID_CHECKBUTTON_FIRST + 12) -#define GADGET_ID_SP_BLOCK_LAST_FIELD (GADGET_ID_CHECKBUTTON_FIRST + 13) -#define GADGET_ID_INSTANT_RELOCATION (GADGET_ID_CHECKBUTTON_FIRST + 14) -#define GADGET_ID_SHIFTED_RELOCATION (GADGET_ID_CHECKBUTTON_FIRST + 15) -#define GADGET_ID_USE_START_ELEMENT (GADGET_ID_CHECKBUTTON_FIRST + 16) -#define GADGET_ID_USE_ARTWORK_ELEMENT (GADGET_ID_CHECKBUTTON_FIRST + 17) -#define GADGET_ID_USE_EXPLOSION_ELEMENT (GADGET_ID_CHECKBUTTON_FIRST + 18) -#define GADGET_ID_INITIAL_GRAVITY (GADGET_ID_CHECKBUTTON_FIRST + 19) -#define GADGET_ID_USE_INITIAL_INVENTORY (GADGET_ID_CHECKBUTTON_FIRST + 20) -#define GADGET_ID_CAN_PASS_TO_WALKABLE (GADGET_ID_CHECKBUTTON_FIRST + 21) -#define GADGET_ID_CAN_FALL_INTO_ACID (GADGET_ID_CHECKBUTTON_FIRST + 22) -#define GADGET_ID_CAN_MOVE_INTO_ACID (GADGET_ID_CHECKBUTTON_FIRST + 23) -#define GADGET_ID_DONT_COLLIDE_WITH (GADGET_ID_CHECKBUTTON_FIRST + 24) -#define GADGET_ID_ENVELOPE_AUTOWRAP (GADGET_ID_CHECKBUTTON_FIRST + 25) -#define GADGET_ID_ENVELOPE_CENTERED (GADGET_ID_CHECKBUTTON_FIRST + 26) -#define GADGET_ID_CUSTOM_INDESTRUCTIBLE (GADGET_ID_CHECKBUTTON_FIRST + 27) -#define GADGET_ID_CUSTOM_CAN_EXPLODE (GADGET_ID_CHECKBUTTON_FIRST + 28) -#define GADGET_ID_CUSTOM_EXPLODE_FIRE (GADGET_ID_CHECKBUTTON_FIRST + 29) -#define GADGET_ID_CUSTOM_EXPLODE_SMASH (GADGET_ID_CHECKBUTTON_FIRST + 30) -#define GADGET_ID_CUSTOM_EXPLODE_IMPACT (GADGET_ID_CHECKBUTTON_FIRST + 31) -#define GADGET_ID_CUSTOM_WALK_TO_OBJECT (GADGET_ID_CHECKBUTTON_FIRST + 32) -#define GADGET_ID_CUSTOM_DEADLY (GADGET_ID_CHECKBUTTON_FIRST + 33) -#define GADGET_ID_CUSTOM_CAN_MOVE (GADGET_ID_CHECKBUTTON_FIRST + 34) -#define GADGET_ID_CUSTOM_CAN_FALL (GADGET_ID_CHECKBUTTON_FIRST + 35) -#define GADGET_ID_CUSTOM_CAN_SMASH (GADGET_ID_CHECKBUTTON_FIRST + 36) -#define GADGET_ID_CUSTOM_SLIPPERY (GADGET_ID_CHECKBUTTON_FIRST + 37) -#define GADGET_ID_CUSTOM_ACCESSIBLE (GADGET_ID_CHECKBUTTON_FIRST + 38) -#define GADGET_ID_CUSTOM_GRAV_REACHABLE (GADGET_ID_CHECKBUTTON_FIRST + 39) -#define GADGET_ID_CUSTOM_USE_LAST_VALUE (GADGET_ID_CHECKBUTTON_FIRST + 40) -#define GADGET_ID_CUSTOM_USE_GRAPHIC (GADGET_ID_CHECKBUTTON_FIRST + 41) -#define GADGET_ID_CUSTOM_USE_TEMPLATE (GADGET_ID_CHECKBUTTON_FIRST + 42) -#define GADGET_ID_CUSTOM_CAN_CHANGE (GADGET_ID_CHECKBUTTON_FIRST + 43) -#define GADGET_ID_CHANGE_USE_CONTENT (GADGET_ID_CHECKBUTTON_FIRST + 44) -#define GADGET_ID_CHANGE_USE_EXPLOSION (GADGET_ID_CHECKBUTTON_FIRST + 45) -#define GADGET_ID_CHANGE_ONLY_COMPLETE (GADGET_ID_CHECKBUTTON_FIRST + 46) -#define GADGET_ID_CHANGE_USE_RANDOM (GADGET_ID_CHECKBUTTON_FIRST + 47) -#define GADGET_ID_CHANGE_HAS_ACTION (GADGET_ID_CHECKBUTTON_FIRST + 48) -#define GADGET_ID_CHANGE_DELAY (GADGET_ID_CHECKBUTTON_FIRST + 49) -#define GADGET_ID_CHANGE_BY_DIRECT_ACT (GADGET_ID_CHECKBUTTON_FIRST + 50) -#define GADGET_ID_CHANGE_BY_OTHER_ACT (GADGET_ID_CHECKBUTTON_FIRST + 51) +#define GADGET_ID_EM_EXPLODES_BY_FIRE (GADGET_ID_CHECKBUTTON_FIRST + 5) +#define GADGET_ID_USE_SPRING_BUG (GADGET_ID_CHECKBUTTON_FIRST + 6) +#define GADGET_ID_USE_TIME_ORB_BUG (GADGET_ID_CHECKBUTTON_FIRST + 7) +#define GADGET_ID_RANDOM_BALL_CONTENT (GADGET_ID_CHECKBUTTON_FIRST + 8) +#define GADGET_ID_INITIAL_BALL_STATE (GADGET_ID_CHECKBUTTON_FIRST + 9) +#define GADGET_ID_GROW_INTO_DIGGABLE (GADGET_ID_CHECKBUTTON_FIRST + 10) +#define GADGET_ID_CONTINUOUS_SNAPPING (GADGET_ID_CHECKBUTTON_FIRST + 11) +#define GADGET_ID_BLOCK_SNAP_FIELD (GADGET_ID_CHECKBUTTON_FIRST + 12) +#define GADGET_ID_BLOCK_LAST_FIELD (GADGET_ID_CHECKBUTTON_FIRST + 13) +#define GADGET_ID_SP_BLOCK_LAST_FIELD (GADGET_ID_CHECKBUTTON_FIRST + 14) +#define GADGET_ID_INSTANT_RELOCATION (GADGET_ID_CHECKBUTTON_FIRST + 15) +#define GADGET_ID_SHIFTED_RELOCATION (GADGET_ID_CHECKBUTTON_FIRST + 16) +#define GADGET_ID_USE_START_ELEMENT (GADGET_ID_CHECKBUTTON_FIRST + 17) +#define GADGET_ID_USE_ARTWORK_ELEMENT (GADGET_ID_CHECKBUTTON_FIRST + 18) +#define GADGET_ID_USE_EXPLOSION_ELEMENT (GADGET_ID_CHECKBUTTON_FIRST + 19) +#define GADGET_ID_INITIAL_GRAVITY (GADGET_ID_CHECKBUTTON_FIRST + 20) +#define GADGET_ID_USE_INITIAL_INVENTORY (GADGET_ID_CHECKBUTTON_FIRST + 21) +#define GADGET_ID_CAN_PASS_TO_WALKABLE (GADGET_ID_CHECKBUTTON_FIRST + 22) +#define GADGET_ID_CAN_FALL_INTO_ACID (GADGET_ID_CHECKBUTTON_FIRST + 23) +#define GADGET_ID_CAN_MOVE_INTO_ACID (GADGET_ID_CHECKBUTTON_FIRST + 24) +#define GADGET_ID_DONT_COLLIDE_WITH (GADGET_ID_CHECKBUTTON_FIRST + 25) +#define GADGET_ID_ENVELOPE_AUTOWRAP (GADGET_ID_CHECKBUTTON_FIRST + 26) +#define GADGET_ID_ENVELOPE_CENTERED (GADGET_ID_CHECKBUTTON_FIRST + 27) +#define GADGET_ID_CUSTOM_INDESTRUCTIBLE (GADGET_ID_CHECKBUTTON_FIRST + 28) +#define GADGET_ID_CUSTOM_CAN_EXPLODE (GADGET_ID_CHECKBUTTON_FIRST + 29) +#define GADGET_ID_CUSTOM_EXPLODE_FIRE (GADGET_ID_CHECKBUTTON_FIRST + 30) +#define GADGET_ID_CUSTOM_EXPLODE_SMASH (GADGET_ID_CHECKBUTTON_FIRST + 31) +#define GADGET_ID_CUSTOM_EXPLODE_IMPACT (GADGET_ID_CHECKBUTTON_FIRST + 32) +#define GADGET_ID_CUSTOM_WALK_TO_OBJECT (GADGET_ID_CHECKBUTTON_FIRST + 33) +#define GADGET_ID_CUSTOM_DEADLY (GADGET_ID_CHECKBUTTON_FIRST + 34) +#define GADGET_ID_CUSTOM_CAN_MOVE (GADGET_ID_CHECKBUTTON_FIRST + 35) +#define GADGET_ID_CUSTOM_CAN_FALL (GADGET_ID_CHECKBUTTON_FIRST + 36) +#define GADGET_ID_CUSTOM_CAN_SMASH (GADGET_ID_CHECKBUTTON_FIRST + 37) +#define GADGET_ID_CUSTOM_SLIPPERY (GADGET_ID_CHECKBUTTON_FIRST + 38) +#define GADGET_ID_CUSTOM_ACCESSIBLE (GADGET_ID_CHECKBUTTON_FIRST + 39) +#define GADGET_ID_CUSTOM_GRAV_REACHABLE (GADGET_ID_CHECKBUTTON_FIRST + 40) +#define GADGET_ID_CUSTOM_USE_LAST_VALUE (GADGET_ID_CHECKBUTTON_FIRST + 41) +#define GADGET_ID_CUSTOM_USE_GRAPHIC (GADGET_ID_CHECKBUTTON_FIRST + 42) +#define GADGET_ID_CUSTOM_USE_TEMPLATE (GADGET_ID_CHECKBUTTON_FIRST + 43) +#define GADGET_ID_CUSTOM_CAN_CHANGE (GADGET_ID_CHECKBUTTON_FIRST + 44) +#define GADGET_ID_CHANGE_USE_CONTENT (GADGET_ID_CHECKBUTTON_FIRST + 45) +#define GADGET_ID_CHANGE_USE_EXPLOSION (GADGET_ID_CHECKBUTTON_FIRST + 46) +#define GADGET_ID_CHANGE_ONLY_COMPLETE (GADGET_ID_CHECKBUTTON_FIRST + 47) +#define GADGET_ID_CHANGE_USE_RANDOM (GADGET_ID_CHECKBUTTON_FIRST + 48) +#define GADGET_ID_CHANGE_HAS_ACTION (GADGET_ID_CHECKBUTTON_FIRST + 49) +#define GADGET_ID_CHANGE_DELAY (GADGET_ID_CHECKBUTTON_FIRST + 50) +#define GADGET_ID_CHANGE_BY_DIRECT_ACT (GADGET_ID_CHECKBUTTON_FIRST + 51) +#define GADGET_ID_CHANGE_BY_OTHER_ACT (GADGET_ID_CHECKBUTTON_FIRST + 52) /* gadgets for buttons in element list */ -#define GADGET_ID_ELEMENTLIST_FIRST (GADGET_ID_CHECKBUTTON_FIRST + 52) +#define GADGET_ID_ELEMENTLIST_FIRST (GADGET_ID_CHECKBUTTON_FIRST + 53) #define GADGET_ID_ELEMENTLIST_LAST (GADGET_ID_ELEMENTLIST_FIRST + \ ED_NUM_ELEMENTLIST_BUTTONS - 1) @@ -784,55 +785,56 @@ #define ED_CHECKBUTTON_ID_RANDOM_RESTRICTED 0 #define ED_CHECKBUTTON_ID_STICK_ELEMENT 1 #define ED_CHECKBUTTON_ID_EM_SLIPPERY_GEMS 2 -#define ED_CHECKBUTTON_ID_USE_SPRING_BUG 3 -#define ED_CHECKBUTTON_ID_USE_TIME_ORB_BUG 4 -#define ED_CHECKBUTTON_ID_RANDOM_BALL_CONTENT 5 -#define ED_CHECKBUTTON_ID_INITIAL_BALL_STATE 6 -#define ED_CHECKBUTTON_ID_GROW_INTO_DIGGABLE 7 -#define ED_CHECKBUTTON_ID_CONTINUOUS_SNAPPING 8 -#define ED_CHECKBUTTON_ID_BLOCK_SNAP_FIELD 9 -#define ED_CHECKBUTTON_ID_BLOCK_LAST_FIELD 10 -#define ED_CHECKBUTTON_ID_SP_BLOCK_LAST_FIELD 11 -#define ED_CHECKBUTTON_ID_INSTANT_RELOCATION 12 -#define ED_CHECKBUTTON_ID_SHIFTED_RELOCATION 13 -#define ED_CHECKBUTTON_ID_USE_START_ELEMENT 14 -#define ED_CHECKBUTTON_ID_USE_ARTWORK_ELEMENT 15 -#define ED_CHECKBUTTON_ID_USE_EXPLOSION_ELEMENT 16 -#define ED_CHECKBUTTON_ID_INITIAL_GRAVITY 17 -#define ED_CHECKBUTTON_ID_USE_INITIAL_INVENTORY 18 -#define ED_CHECKBUTTON_ID_CAN_PASS_TO_WALKABLE 19 -#define ED_CHECKBUTTON_ID_CAN_FALL_INTO_ACID 20 -#define ED_CHECKBUTTON_ID_CAN_MOVE_INTO_ACID 21 -#define ED_CHECKBUTTON_ID_DONT_COLLIDE_WITH 22 -#define ED_CHECKBUTTON_ID_ENVELOPE_AUTOWRAP 23 -#define ED_CHECKBUTTON_ID_ENVELOPE_CENTERED 24 -#define ED_CHECKBUTTON_ID_CUSTOM_USE_GRAPHIC 25 -#define ED_CHECKBUTTON_ID_CUSTOM_USE_TEMPLATE 26 -#define ED_CHECKBUTTON_ID_CUSTOM_ACCESSIBLE 27 -#define ED_CHECKBUTTON_ID_CUSTOM_GRAV_REACHABLE 28 -#define ED_CHECKBUTTON_ID_CUSTOM_USE_LAST_VALUE 29 -#define ED_CHECKBUTTON_ID_CUSTOM_WALK_TO_OBJECT 30 -#define ED_CHECKBUTTON_ID_CUSTOM_INDESTRUCTIBLE 31 -#define ED_CHECKBUTTON_ID_CUSTOM_CAN_MOVE 32 -#define ED_CHECKBUTTON_ID_CUSTOM_CAN_FALL 33 -#define ED_CHECKBUTTON_ID_CUSTOM_CAN_SMASH 34 -#define ED_CHECKBUTTON_ID_CUSTOM_SLIPPERY 35 -#define ED_CHECKBUTTON_ID_CUSTOM_DEADLY 36 -#define ED_CHECKBUTTON_ID_CUSTOM_CAN_EXPLODE 37 -#define ED_CHECKBUTTON_ID_CUSTOM_EXPLODE_FIRE 38 -#define ED_CHECKBUTTON_ID_CUSTOM_EXPLODE_SMASH 39 -#define ED_CHECKBUTTON_ID_CUSTOM_EXPLODE_IMPACT 40 -#define ED_CHECKBUTTON_ID_CUSTOM_CAN_CHANGE 41 -#define ED_CHECKBUTTON_ID_CHANGE_DELAY 42 -#define ED_CHECKBUTTON_ID_CHANGE_BY_DIRECT_ACT 43 -#define ED_CHECKBUTTON_ID_CHANGE_BY_OTHER_ACT 44 -#define ED_CHECKBUTTON_ID_CHANGE_USE_EXPLOSION 45 -#define ED_CHECKBUTTON_ID_CHANGE_USE_CONTENT 46 -#define ED_CHECKBUTTON_ID_CHANGE_ONLY_COMPLETE 47 -#define ED_CHECKBUTTON_ID_CHANGE_USE_RANDOM 48 -#define ED_CHECKBUTTON_ID_CHANGE_HAS_ACTION 49 - -#define ED_NUM_CHECKBUTTONS 50 +#define ED_CHECKBUTTON_ID_EM_EXPLODES_BY_FIRE 3 +#define ED_CHECKBUTTON_ID_USE_SPRING_BUG 4 +#define ED_CHECKBUTTON_ID_USE_TIME_ORB_BUG 5 +#define ED_CHECKBUTTON_ID_RANDOM_BALL_CONTENT 6 +#define ED_CHECKBUTTON_ID_INITIAL_BALL_STATE 7 +#define ED_CHECKBUTTON_ID_GROW_INTO_DIGGABLE 8 +#define ED_CHECKBUTTON_ID_CONTINUOUS_SNAPPING 9 +#define ED_CHECKBUTTON_ID_BLOCK_SNAP_FIELD 10 +#define ED_CHECKBUTTON_ID_BLOCK_LAST_FIELD 11 +#define ED_CHECKBUTTON_ID_SP_BLOCK_LAST_FIELD 12 +#define ED_CHECKBUTTON_ID_INSTANT_RELOCATION 13 +#define ED_CHECKBUTTON_ID_SHIFTED_RELOCATION 14 +#define ED_CHECKBUTTON_ID_USE_START_ELEMENT 15 +#define ED_CHECKBUTTON_ID_USE_ARTWORK_ELEMENT 16 +#define ED_CHECKBUTTON_ID_USE_EXPLOSION_ELEMENT 17 +#define ED_CHECKBUTTON_ID_INITIAL_GRAVITY 18 +#define ED_CHECKBUTTON_ID_USE_INITIAL_INVENTORY 19 +#define ED_CHECKBUTTON_ID_CAN_PASS_TO_WALKABLE 20 +#define ED_CHECKBUTTON_ID_CAN_FALL_INTO_ACID 21 +#define ED_CHECKBUTTON_ID_CAN_MOVE_INTO_ACID 22 +#define ED_CHECKBUTTON_ID_DONT_COLLIDE_WITH 23 +#define ED_CHECKBUTTON_ID_ENVELOPE_AUTOWRAP 24 +#define ED_CHECKBUTTON_ID_ENVELOPE_CENTERED 25 +#define ED_CHECKBUTTON_ID_CUSTOM_USE_GRAPHIC 26 +#define ED_CHECKBUTTON_ID_CUSTOM_USE_TEMPLATE 27 +#define ED_CHECKBUTTON_ID_CUSTOM_ACCESSIBLE 28 +#define ED_CHECKBUTTON_ID_CUSTOM_GRAV_REACHABLE 29 +#define ED_CHECKBUTTON_ID_CUSTOM_USE_LAST_VALUE 30 +#define ED_CHECKBUTTON_ID_CUSTOM_WALK_TO_OBJECT 31 +#define ED_CHECKBUTTON_ID_CUSTOM_INDESTRUCTIBLE 32 +#define ED_CHECKBUTTON_ID_CUSTOM_CAN_MOVE 33 +#define ED_CHECKBUTTON_ID_CUSTOM_CAN_FALL 34 +#define ED_CHECKBUTTON_ID_CUSTOM_CAN_SMASH 35 +#define ED_CHECKBUTTON_ID_CUSTOM_SLIPPERY 36 +#define ED_CHECKBUTTON_ID_CUSTOM_DEADLY 37 +#define ED_CHECKBUTTON_ID_CUSTOM_CAN_EXPLODE 38 +#define ED_CHECKBUTTON_ID_CUSTOM_EXPLODE_FIRE 39 +#define ED_CHECKBUTTON_ID_CUSTOM_EXPLODE_SMASH 40 +#define ED_CHECKBUTTON_ID_CUSTOM_EXPLODE_IMPACT 41 +#define ED_CHECKBUTTON_ID_CUSTOM_CAN_CHANGE 42 +#define ED_CHECKBUTTON_ID_CHANGE_DELAY 43 +#define ED_CHECKBUTTON_ID_CHANGE_BY_DIRECT_ACT 44 +#define ED_CHECKBUTTON_ID_CHANGE_BY_OTHER_ACT 45 +#define ED_CHECKBUTTON_ID_CHANGE_USE_EXPLOSION 46 +#define ED_CHECKBUTTON_ID_CHANGE_USE_CONTENT 47 +#define ED_CHECKBUTTON_ID_CHANGE_ONLY_COMPLETE 48 +#define ED_CHECKBUTTON_ID_CHANGE_USE_RANDOM 49 +#define ED_CHECKBUTTON_ID_CHANGE_HAS_ACTION 50 + +#define ED_NUM_CHECKBUTTONS 51 #define ED_CHECKBUTTON_ID_LEVEL_FIRST ED_CHECKBUTTON_ID_RANDOM_RESTRICTED #define ED_CHECKBUTTON_ID_LEVEL_LAST ED_CHECKBUTTON_ID_RANDOM_RESTRICTED @@ -2576,6 +2578,13 @@ static struct NULL, "slip down from certain flat walls","use EM/DC style slipping behaviour" }, + { + ED_ELEMENT_SETTINGS_XPOS(0), ED_ELEMENT_SETTINGS_YPOS(1), + GADGET_ID_EM_EXPLODES_BY_FIRE, GADGET_ID_NONE, + &level.em_explodes_by_fire, + NULL, + "explodes with chain reaction", "use R'n'D style explosion behaviour" + }, { ED_ELEMENT_SETTINGS_XPOS(0), ED_ELEMENT_SETTINGS_YPOS(2), GADGET_ID_USE_SPRING_BUG, GADGET_ID_NONE, @@ -8229,6 +8238,9 @@ static void DrawPropertiesConfig() if (IS_GEM(properties_element)) MapCheckbuttonGadget(ED_CHECKBUTTON_ID_EM_SLIPPERY_GEMS); + if (properties_element == EL_EM_DYNAMITE) + MapCheckbuttonGadget(ED_CHECKBUTTON_ID_EM_EXPLODES_BY_FIRE); + if (COULD_MOVE_INTO_ACID(properties_element) && !ELEM_IS_PLAYER(properties_element) && (!IS_CUSTOM_ELEMENT(properties_element) || diff --git a/src/files.c b/src/files.c index dd9a274d..6c2261d5 100644 --- a/src/files.c +++ b/src/files.c @@ -218,6 +218,12 @@ static struct LevelFileConfigInfo chunk_config_INFO[] = &li.dont_collide_with_bits, ~0 /* default: always deadly */ }, + { + -1, -1, + TYPE_BOOLEAN, CONF_VALUE_8_BIT(8), + &li.em_explodes_by_fire, FALSE + }, + { -1, -1, TYPE_INTEGER, CONF_VALUE_16_BIT(5), @@ -6362,6 +6368,10 @@ static void LoadLevel_InitVersion(struct LevelInfo *level, char *filename) /* not centering level after relocating player was default only in 3.2.3 */ if (level->game_version == VERSION_IDENT(3,2,3,0)) /* (no pre-releases) */ level->shifted_relocation = TRUE; + + /* EM style elements always chain-exploded in R'n'D engine before 3.2.6 */ + if (level->game_version < VERSION_IDENT(3,2,6,0)) + level->em_explodes_by_fire = TRUE; } static void LoadLevel_InitElements(struct LevelInfo *level, char *filename) diff --git a/src/init.c b/src/init.c index 2d565ca7..6b7cc72e 100644 --- a/src/init.c +++ b/src/init.c @@ -344,6 +344,15 @@ static int getFontBitmapID(int font_nr) special = GFX_SPECIAL_ARG_DOOR; #endif +#if 0 + if (special != -1) + { + printf("%s%s\n", + font_info[font_nr].token_name, + special_suffix_info[special].suffix); + } +#endif + if (special != -1) return font_info[font_nr].special_bitmap_id[special]; else @@ -4849,6 +4858,14 @@ void InitElementPropertiesEngine(int engine_version) -1 }; + static int ep_em_explodes_by_fire[] = + { + EL_EM_DYNAMITE, + EL_EM_DYNAMITE_ACTIVE, + EL_MOLE, + -1 + }; + /* special EM style gems behaviour */ for (i = 0; ep_em_slippery_wall[i] != -1; i++) SET_PROPERTY(ep_em_slippery_wall[i], EP_EM_SLIPPERY_WALL, @@ -4858,6 +4875,11 @@ void InitElementPropertiesEngine(int engine_version) SET_PROPERTY(EL_EXPANDABLE_WALL_GROWING, EP_EM_SLIPPERY_WALL, (level.em_slippery_gems && engine_version > VERSION_IDENT(2,0,1,0))); + + /* special EM style explosion behaviour regarding chain reactions */ + for (i = 0; ep_em_explodes_by_fire[i] != -1; i++) + SET_PROPERTY(ep_em_explodes_by_fire[i], EP_EXPLODES_BY_FIRE, + level.em_explodes_by_fire); } /* this is needed because some graphics depend on element properties */ diff --git a/src/main.h b/src/main.h index 2b3e4263..84d71d62 100644 --- a/src/main.h +++ b/src/main.h @@ -1990,7 +1990,7 @@ /* program information and versioning definitions */ #define PROGRAM_VERSION_MAJOR 3 #define PROGRAM_VERSION_MINOR 2 -#define PROGRAM_VERSION_PATCH 5 +#define PROGRAM_VERSION_PATCH 6 #define PROGRAM_VERSION_BUILD 0 #define PROGRAM_TITLE_STRING "Rocks'n'Diamonds" @@ -2358,6 +2358,7 @@ struct LevelInfo int initial_inventory_content[MAX_PLAYERS][MAX_INITIAL_INVENTORY_SIZE]; boolean em_slippery_gems; /* EM style "gems slip from wall" behaviour */ + boolean em_explodes_by_fire; /* EM style chain explosion behaviour */ boolean use_spring_bug; /* for compatibility with old levels */ boolean use_time_orb_bug; /* for compatibility with old levels */ boolean instant_relocation; /* no visual delay when relocating player */