From: Holger Schemel Date: Wed, 13 Mar 2024 08:15:12 +0000 (+0100) Subject: added support for clock settings in BD engine to level editor X-Git-Tag: 4.4.0.0-test-1~192 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=d8abc11b7cbbc1e0e5411070c40325014b95e0e0;p=rocksndiamonds.git added support for clock settings in BD engine to level editor --- diff --git a/src/editor.c b/src/editor.c index 14c5d86c..1aad7ba5 100644 --- a/src/editor.c +++ b/src/editor.c @@ -10893,6 +10893,7 @@ static struct { EL_LIGHT_SWITCH_ACTIVE, &level.time_light, TEXT_DURATION }, { EL_SHIELD_NORMAL, &level.shield_normal_time, TEXT_DURATION }, { EL_SHIELD_DEADLY, &level.shield_deadly_time, TEXT_DURATION }, + { EL_BD_CLOCK, &level.bd_clock_extra_time, TEXT_TIME_BONUS }, { EL_EXTRA_TIME, &level.extra_time, TEXT_TIME_BONUS }, { EL_TIME_ORB_FULL, &level.time_orb_time, TEXT_TIME_BONUS }, { EL_GAME_OF_LIFE, &level.game_of_life[0], TEXT_GAME_OF_LIFE_1 }, diff --git a/src/files.c b/src/files.c index 35597a4d..78c47b9f 100644 --- a/src/files.c +++ b/src/files.c @@ -646,6 +646,12 @@ static struct LevelFileConfigInfo chunk_config_ELEM[] = &li.bd_magic_wall_stops_amoeba, TRUE }, + { + EL_BD_CLOCK, -1, + TYPE_INTEGER, CONF_VALUE_8_BIT(1), + &li.bd_clock_extra_time, 30 + }, + // (the following values are related to various game elements) { @@ -3896,6 +3902,7 @@ static void CopyNativeLevel_RND_to_BD(struct LevelInfo *level) cave->mega_stones_pushable_with_sweet = level->bd_push_mega_rock_with_sweet; // element properties + cave->level_bonus_time[0] = level->bd_clock_extra_time; cave->level_magic_wall_time[0] = level->time_magic_wall; cave->magic_timer_wait_for_hatching = level->bd_magic_wall_wait_hatching; cave->magic_wall_stops_amoeba = level->bd_magic_wall_stops_amoeba; @@ -3972,6 +3979,7 @@ static void CopyNativeLevel_BD_to_RND(struct LevelInfo *level) level->bd_push_mega_rock_with_sweet = cave->mega_stones_pushable_with_sweet; // element properties + level->bd_clock_extra_time = cave->level_bonus_time[0]; level->time_magic_wall = cave->level_magic_wall_time[bd_level_nr]; level->bd_magic_wall_wait_hatching = cave->magic_timer_wait_for_hatching; level->bd_magic_wall_stops_amoeba = cave->magic_wall_stops_amoeba; diff --git a/src/main.h b/src/main.h index 999c24a7..45b045f1 100644 --- a/src/main.h +++ b/src/main.h @@ -3515,6 +3515,7 @@ struct LevelInfo int bd_amoeba_2_content_enclosed; // BD amoeba 2 changes to this element if enclosed int bd_amoeba_2_content_exploding; // BD amoeba 2 changes to this element if exploding int bd_amoeba_2_content_looks_like; // BD amoeba 2 looks like this other game element + int bd_clock_extra_time; // BD engine extra time when collecting clock 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