X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Feditor.c;h=9f917b4325b1c77332eb30fef73d7b02c4498b4e;hb=35a2f21580d9bd01f55e1265fc8174cfcbdd5ad9;hp=58a4e8e8983102d3511df6621eb43e0f41ff7ddb;hpb=79e91e9a5ec83a11ee4708c8cf2c42dd4dd63cce;p=rocksndiamonds.git diff --git a/src/editor.c b/src/editor.c index 58a4e8e8..9f917b43 100644 --- a/src/editor.c +++ b/src/editor.c @@ -10899,7 +10899,8 @@ 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_BD_CLOCK, &level.bd_clock_extra_time, TEXT_TIME_BONUS, + -100, 100 }, { 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,0,8 }, @@ -11043,8 +11044,7 @@ static void DrawPropertiesConfig(void) int xpos = ED_ELEMENT_SETTINGS_X(0); int ypos = ED_ELEMENT_SETTINGS_Y(0) + ED_GADGET_SMALL_DISTANCE; - PrintInfoText("No configuration options available.", - FONT_TEXT_1, xpos, ypos); + PrintInfoText("No configuration options available.", FONT_TEXT_1, xpos, ypos); return; } @@ -11052,58 +11052,56 @@ static void DrawPropertiesConfig(void) // check if there are elements where a value can be chosen for for (i = 0; elements_with_counter[i].element != -1; i++) { - if (elements_with_counter[i].element == properties_element) - { - // special case: score for extra diamonds only available in BD game engine - if (elements_with_counter[i].element == EL_BD_DIAMOND && - elements_with_counter[i].value == &level.score[SC_DIAMOND_EXTRA] && - level.game_engine_type != GAME_ENGINE_TYPE_BD) - continue; + if (elements_with_counter[i].element != properties_element) + continue; - // special case: some amoeba counters only available in BD game engine - if (elements_with_counter[i].element == EL_BD_AMOEBA && - elements_with_counter[i].value != &level.amoeba_speed && - level.game_engine_type != GAME_ENGINE_TYPE_BD) - continue; + // special case: score for extra diamonds only available in BD game engine + if (elements_with_counter[i].element == EL_BD_DIAMOND && + elements_with_counter[i].value == &level.score[SC_DIAMOND_EXTRA] && + level.game_engine_type != GAME_ENGINE_TYPE_BD) + continue; - // special case: some amoeba counters only available in R'n'D game engine - if (elements_with_counter[i].element == EL_BD_AMOEBA && - elements_with_counter[i].value == &level.amoeba_speed && - level.game_engine_type == GAME_ENGINE_TYPE_BD) - continue; + // special case: some amoeba counters only available in BD game engine + if (elements_with_counter[i].element == EL_BD_AMOEBA && + elements_with_counter[i].value != &level.amoeba_speed && + level.game_engine_type != GAME_ENGINE_TYPE_BD) + continue; - int counter_id = ED_COUNTER_ID_ELEMENT_VALUE1 + num_element_counters; + // special case: some amoeba counters only available in R'n'D game engine + if (elements_with_counter[i].element == EL_BD_AMOEBA && + elements_with_counter[i].value == &level.amoeba_speed && + level.game_engine_type == GAME_ENGINE_TYPE_BD) + continue; - counterbutton_info[counter_id].y = - ED_ELEMENT_SETTINGS_YPOS( - (HAS_EDITOR_CONTENT(properties_element) ? 1 : 0) + - (CAN_GROW(properties_element) ? 1 : 0) + - (COULD_MOVE_INTO_ACID(properties_element) ? 1 : 0) + - (MAYBE_DONT_COLLIDE_WITH(properties_element) ? 1 : 0) + - (properties_element == EL_EMC_MAGIC_BALL ? 2 : 0) + - num_element_counters); + int counter_id = ED_COUNTER_ID_ELEMENT_VALUE1 + num_element_counters; - // special case: set amoeba counters for BD game engine separately - if ((properties_element == EL_BD_AMOEBA && level.game_engine_type == GAME_ENGINE_TYPE_BD) || - (properties_element == EL_BD_AMOEBA_2)) - counterbutton_info[counter_id].y = - ED_ELEMENT_SETTINGS_YPOS(3 + num_element_counters); + counterbutton_info[counter_id].y = + ED_ELEMENT_SETTINGS_YPOS((HAS_EDITOR_CONTENT(properties_element) ? 1 : 0) + + (CAN_GROW(properties_element) ? 1 : 0) + + (COULD_MOVE_INTO_ACID(properties_element) ? 1 : 0) + + (MAYBE_DONT_COLLIDE_WITH(properties_element) ? 1 : 0) + + (properties_element == EL_EMC_MAGIC_BALL ? 2 : 0) + + num_element_counters); - counterbutton_info[counter_id].value = elements_with_counter[i].value; - counterbutton_info[counter_id].text_right = elements_with_counter[i].text; - counterbutton_info[counter_id].min_value = elements_with_counter[i].min_value; - counterbutton_info[counter_id].max_value = elements_with_counter[i].max_value; + // special case: set amoeba counters for BD game engine separately + if ((properties_element == EL_BD_AMOEBA && level.game_engine_type == GAME_ENGINE_TYPE_BD) || + (properties_element == EL_BD_AMOEBA_2)) + counterbutton_info[counter_id].y = ED_ELEMENT_SETTINGS_YPOS(3 + num_element_counters); - // default: counter values between 0 and 999 - if (counterbutton_info[counter_id].max_value == 0) - counterbutton_info[counter_id].max_value = 999; + counterbutton_info[counter_id].value = elements_with_counter[i].value; + counterbutton_info[counter_id].text_right = elements_with_counter[i].text; + counterbutton_info[counter_id].min_value = elements_with_counter[i].min_value; + counterbutton_info[counter_id].max_value = elements_with_counter[i].max_value; - MapCounterButtons(counter_id); + // default: counter values between 0 and 999 + if (counterbutton_info[counter_id].max_value == 0) + counterbutton_info[counter_id].max_value = 999; - num_element_counters++; - if (num_element_counters >= max_num_element_counters) - break; - } + MapCounterButtons(counter_id); + + num_element_counters++; + if (num_element_counters >= max_num_element_counters) + break; } if (HAS_EDITOR_CONTENT(properties_element))