From: Holger Schemel Date: Fri, 24 Mar 2017 19:54:48 +0000 (+0100) Subject: moved level property 'initial wind direction' to balloon elements in editor X-Git-Tag: 4.1.0.0~148 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=ce20797c3998436e5c54939ef2f56a4fe4a5b14d;p=rocksndiamonds.git moved level property 'initial wind direction' to balloon elements in editor --- diff --git a/src/editor.c b/src/editor.c index 504feba9..8a093cbc 100644 --- a/src/editor.c +++ b/src/editor.c @@ -832,7 +832,7 @@ #define ED_NUM_SELECTBOX 29 #define ED_SELECTBOX_ID_LEVEL_FIRST ED_SELECTBOX_ID_TIME_OR_STEPS -#define ED_SELECTBOX_ID_LEVEL_LAST ED_SELECTBOX_ID_WIND_DIRECTION +#define ED_SELECTBOX_ID_LEVEL_LAST ED_SELECTBOX_ID_GAME_ENGINE_TYPE #define ED_SELECTBOX_ID_CUSTOM1_FIRST ED_SELECTBOX_ID_CUSTOM_ACCESS_TYPE #define ED_SELECTBOX_ID_CUSTOM1_LAST ED_SELECTBOX_ID_CUSTOM_WALK_TO_ACTION @@ -1332,7 +1332,7 @@ static struct "score for each second/step left:", NULL, NULL }, { - ED_LEVEL_SETTINGS_XPOS(0), ED_LEVEL_SETTINGS_YPOS(13), + ED_LEVEL_SETTINGS_XPOS(0), ED_LEVEL_SETTINGS_YPOS(12), 0, 9999, GADGET_ID_LEVEL_RANDOM_SEED_DOWN, GADGET_ID_LEVEL_RANDOM_SEED_UP, GADGET_ID_LEVEL_RANDOM_SEED_TEXT, GADGET_ID_NONE, @@ -2347,24 +2347,24 @@ static struct NULL, "(0 => no limit)", "time or step limit" }, { - ED_LEVEL_SETTINGS_XPOS(0), ED_LEVEL_SETTINGS_YPOS(12), + 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" }, + + /* ---------- element settings: configure (several elements) ------------- */ + { - ED_LEVEL_SETTINGS_XPOS(0), ED_LEVEL_SETTINGS_YPOS(11), + ED_ELEMENT_SETTINGS_XPOS(0), ED_ELEMENT_SETTINGS_YPOS(0), 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(7), GADGET_ID_PLAYER_SPEED, GADGET_ID_NONE, @@ -9245,6 +9245,7 @@ static boolean checkPropertiesConfig(int element) if (IS_GEM(element) || IS_CUSTOM_ELEMENT(element) || IS_GROUP_ELEMENT(element) || + IS_BALLOON_ELEMENT(element) || IS_ENVELOPE(element) || IS_MM_MCDUFFIN(element) || IS_DF_LASER(element) || @@ -9458,7 +9459,8 @@ static void DrawPropertiesConfig() ED_ELEMENT_SETTINGS_XPOS(IS_CUSTOM_ELEMENT(properties_element) ? 1 : 0); checkbutton_info[ED_CHECKBUTTON_ID_CAN_MOVE_INTO_ACID].y = ED_ELEMENT_SETTINGS_YPOS(IS_CUSTOM_ELEMENT(properties_element) ? 6 : - HAS_EDITOR_CONTENT(properties_element) ? 1 : 0); + IS_BALLOON_ELEMENT(properties_element) || + HAS_EDITOR_CONTENT(properties_element) ? 1 : 0); MapCheckbuttonGadget(ED_CHECKBUTTON_ID_CAN_MOVE_INTO_ACID); } @@ -9485,6 +9487,9 @@ static void DrawPropertiesConfig() properties_element == EL_SOKOBAN_FIELD_FULL) MapCheckbuttonGadget(ED_CHECKBUTTON_ID_AUTO_EXIT_SOKOBAN); + if (IS_BALLOON_ELEMENT(properties_element)) + MapSelectboxGadget(ED_SELECTBOX_ID_WIND_DIRECTION); + if (IS_ENVELOPE(properties_element)) { int counter1_id = ED_COUNTER_ID_ENVELOPE_XSIZE; diff --git a/src/main.h b/src/main.h index f44d1e30..826d3d21 100644 --- a/src/main.h +++ b/src/main.h @@ -704,6 +704,14 @@ #define IS_ENVELOPE(e) ((e) >= EL_ENVELOPE_1 && \ (e) <= EL_ENVELOPE_4) +#define IS_BALLOON_ELEMENT(e) ((e) == EL_BALLOON || \ + (e) == EL_BALLOON_SWITCH_LEFT || \ + (e) == EL_BALLOON_SWITCH_RIGHT || \ + (e) == EL_BALLOON_SWITCH_UP || \ + (e) == EL_BALLOON_SWITCH_DOWN || \ + (e) == EL_BALLOON_SWITCH_ANY || \ + (e) == EL_BALLOON_SWITCH_NONE) + #define IS_RND_KEY(e) ((e) >= EL_KEY_1 && \ (e) <= EL_KEY_4) #define IS_EM_KEY(e) ((e) >= EL_EM_KEY_1 && \