MINI_TILEX / 2)
/* values for the settings windows */
-#define ED_SETTINGS_XSTART (3 * MINI_TILEX / 2)
-#define ED_SETTINGS_YSTART (MINI_TILEY * 10)
+#define ED_LEVEL_SETTINGS_XSTART (3 * MINI_TILEX / 2)
+#define ED_LEVEL_SETTINGS_YSTART (5 * MINI_TILEY)
+
+#define ED_ELEMENT_SETTINGS_XSTART (3 * MINI_TILEX / 2)
+#define ED_ELEMENT_SETTINGS_YSTART (10 * MINI_TILEY)
#define ED_XOFFSET_CHECKBOX (ED_CHECKBUTTON_XSIZE + \
2 * ED_GADGET_DISTANCE)
#define ED_SETTINGS_XOFFSET ED_XOFFSET_CHECKBOX
#define ED_SETTINGS_YOFFSET (3 * MINI_TILEY / 2)
-#define ED_SETTINGS_XPOS(n) (ED_SETTINGS_XSTART + \
+#define ED_LEVEL_SETTINGS_XPOS(n) (ED_LEVEL_SETTINGS_XSTART + \
+ (n) * ED_SETTINGS_XOFFSET)
+#define ED_LEVEL_SETTINGS_YPOS(n) (ED_LEVEL_SETTINGS_YSTART + \
+ (n) * ED_SETTINGS_YOFFSET)
+
+#define ED_ELEMENT_SETTINGS_XPOS(n) (ED_ELEMENT_SETTINGS_XSTART + \
(n) * ED_SETTINGS_XOFFSET)
-#define ED_SETTINGS_YPOS(n) (ED_SETTINGS_YSTART + \
+#define ED_ELEMENT_SETTINGS_YPOS(n) (ED_ELEMENT_SETTINGS_YSTART + \
(n) * ED_SETTINGS_YOFFSET)
#define ED_SETTINGS1_YPOS MINI_TILEY
(n) * ED_COUNTER_YDISTANCE - 2)
/* values for element content drawing areas */
-#define ED_AREA_1X1_SETTINGS_XPOS(n) (ED_SETTINGS_XPOS(n))
-#define ED_AREA_1X1_SETTINGS_YPOS(n) (ED_SETTINGS_YPOS(n) + \
+#define ED_AREA_1X1_SETTINGS_XPOS(n) (ED_ELEMENT_SETTINGS_XPOS(n))
+#define ED_AREA_1X1_SETTINGS_YPOS(n) (ED_ELEMENT_SETTINGS_YPOS(n) + \
ED_GADGET_DISTANCE)
-#define ED_AREA_3X3_SETTINGS_XPOS(n) (ED_SETTINGS_XPOS(n))
-#define ED_AREA_3X3_SETTINGS_YPOS(n) (ED_SETTINGS_YPOS(n) + \
+#define ED_AREA_3X3_SETTINGS_XPOS(n) (ED_ELEMENT_SETTINGS_XPOS(n))
+#define ED_AREA_3X3_SETTINGS_YPOS(n) (ED_ELEMENT_SETTINGS_YPOS(n) + \
ED_GADGET_DISTANCE - MINI_TILEY)
/* yamyam content */
#define GADGET_ID_ELEMENT_VALUE2_DOWN (GADGET_ID_COUNTER_FIRST + 24)
#define GADGET_ID_ELEMENT_VALUE2_TEXT (GADGET_ID_COUNTER_FIRST + 25)
#define GADGET_ID_ELEMENT_VALUE2_UP (GADGET_ID_COUNTER_FIRST + 26)
-#define GADGET_ID_YAMYAM_CONTENT_DOWN (GADGET_ID_COUNTER_FIRST + 27)
-#define GADGET_ID_YAMYAM_CONTENT_TEXT (GADGET_ID_COUNTER_FIRST + 28)
-#define GADGET_ID_YAMYAM_CONTENT_UP (GADGET_ID_COUNTER_FIRST + 29)
-#define GADGET_ID_ENVELOPE_XSIZE_DOWN (GADGET_ID_COUNTER_FIRST + 30)
-#define GADGET_ID_ENVELOPE_XSIZE_TEXT (GADGET_ID_COUNTER_FIRST + 31)
-#define GADGET_ID_ENVELOPE_XSIZE_UP (GADGET_ID_COUNTER_FIRST + 32)
-#define GADGET_ID_ENVELOPE_YSIZE_DOWN (GADGET_ID_COUNTER_FIRST + 33)
-#define GADGET_ID_ENVELOPE_YSIZE_TEXT (GADGET_ID_COUNTER_FIRST + 34)
-#define GADGET_ID_ENVELOPE_YSIZE_UP (GADGET_ID_COUNTER_FIRST + 35)
-#define GADGET_ID_CUSTOM_SCORE_DOWN (GADGET_ID_COUNTER_FIRST + 36)
-#define GADGET_ID_CUSTOM_SCORE_TEXT (GADGET_ID_COUNTER_FIRST + 37)
-#define GADGET_ID_CUSTOM_SCORE_UP (GADGET_ID_COUNTER_FIRST + 38)
-#define GADGET_ID_CUSTOM_GEMCOUNT_DOWN (GADGET_ID_COUNTER_FIRST + 39)
-#define GADGET_ID_CUSTOM_GEMCOUNT_TEXT (GADGET_ID_COUNTER_FIRST + 40)
-#define GADGET_ID_CUSTOM_GEMCOUNT_UP (GADGET_ID_COUNTER_FIRST + 41)
-#define GADGET_ID_PUSH_DELAY_FIX_DOWN (GADGET_ID_COUNTER_FIRST + 42)
-#define GADGET_ID_PUSH_DELAY_FIX_TEXT (GADGET_ID_COUNTER_FIRST + 43)
-#define GADGET_ID_PUSH_DELAY_FIX_UP (GADGET_ID_COUNTER_FIRST + 44)
-#define GADGET_ID_PUSH_DELAY_RND_DOWN (GADGET_ID_COUNTER_FIRST + 45)
-#define GADGET_ID_PUSH_DELAY_RND_TEXT (GADGET_ID_COUNTER_FIRST + 46)
-#define GADGET_ID_PUSH_DELAY_RND_UP (GADGET_ID_COUNTER_FIRST + 47)
-#define GADGET_ID_DROP_DELAY_FIX_DOWN (GADGET_ID_COUNTER_FIRST + 48)
-#define GADGET_ID_DROP_DELAY_FIX_TEXT (GADGET_ID_COUNTER_FIRST + 49)
-#define GADGET_ID_DROP_DELAY_FIX_UP (GADGET_ID_COUNTER_FIRST + 50)
-#define GADGET_ID_DROP_DELAY_RND_DOWN (GADGET_ID_COUNTER_FIRST + 51)
-#define GADGET_ID_DROP_DELAY_RND_TEXT (GADGET_ID_COUNTER_FIRST + 52)
-#define GADGET_ID_DROP_DELAY_RND_UP (GADGET_ID_COUNTER_FIRST + 53)
-#define GADGET_ID_MOVE_DELAY_FIX_DOWN (GADGET_ID_COUNTER_FIRST + 54)
-#define GADGET_ID_MOVE_DELAY_FIX_TEXT (GADGET_ID_COUNTER_FIRST + 55)
-#define GADGET_ID_MOVE_DELAY_FIX_UP (GADGET_ID_COUNTER_FIRST + 56)
-#define GADGET_ID_MOVE_DELAY_RND_DOWN (GADGET_ID_COUNTER_FIRST + 57)
-#define GADGET_ID_MOVE_DELAY_RND_TEXT (GADGET_ID_COUNTER_FIRST + 58)
-#define GADGET_ID_MOVE_DELAY_RND_UP (GADGET_ID_COUNTER_FIRST + 59)
-#define GADGET_ID_EXPLOSION_DELAY_DOWN (GADGET_ID_COUNTER_FIRST + 60)
-#define GADGET_ID_EXPLOSION_DELAY_TEXT (GADGET_ID_COUNTER_FIRST + 61)
-#define GADGET_ID_EXPLOSION_DELAY_UP (GADGET_ID_COUNTER_FIRST + 62)
-#define GADGET_ID_IGNITION_DELAY_DOWN (GADGET_ID_COUNTER_FIRST + 63)
-#define GADGET_ID_IGNITION_DELAY_TEXT (GADGET_ID_COUNTER_FIRST + 64)
-#define GADGET_ID_IGNITION_DELAY_UP (GADGET_ID_COUNTER_FIRST + 65)
-#define GADGET_ID_CHANGE_DELAY_FIX_DOWN (GADGET_ID_COUNTER_FIRST + 66)
-#define GADGET_ID_CHANGE_DELAY_FIX_TEXT (GADGET_ID_COUNTER_FIRST + 67)
-#define GADGET_ID_CHANGE_DELAY_FIX_UP (GADGET_ID_COUNTER_FIRST + 68)
-#define GADGET_ID_CHANGE_DELAY_RND_DOWN (GADGET_ID_COUNTER_FIRST + 69)
-#define GADGET_ID_CHANGE_DELAY_RND_TEXT (GADGET_ID_COUNTER_FIRST + 70)
-#define GADGET_ID_CHANGE_DELAY_RND_UP (GADGET_ID_COUNTER_FIRST + 71)
-#define GADGET_ID_CHANGE_CONT_RND_DOWN (GADGET_ID_COUNTER_FIRST + 72)
-#define GADGET_ID_CHANGE_CONT_RND_TEXT (GADGET_ID_COUNTER_FIRST + 73)
-#define GADGET_ID_CHANGE_CONT_RND_UP (GADGET_ID_COUNTER_FIRST + 74)
-#define GADGET_ID_GROUP_CONTENT_DOWN (GADGET_ID_COUNTER_FIRST + 75)
-#define GADGET_ID_GROUP_CONTENT_TEXT (GADGET_ID_COUNTER_FIRST + 76)
-#define GADGET_ID_GROUP_CONTENT_UP (GADGET_ID_COUNTER_FIRST + 77)
+#define GADGET_ID_ELEMENT_VALUE3_DOWN (GADGET_ID_COUNTER_FIRST + 27)
+#define GADGET_ID_ELEMENT_VALUE3_TEXT (GADGET_ID_COUNTER_FIRST + 28)
+#define GADGET_ID_ELEMENT_VALUE3_UP (GADGET_ID_COUNTER_FIRST + 29)
+#define GADGET_ID_ELEMENT_VALUE4_DOWN (GADGET_ID_COUNTER_FIRST + 30)
+#define GADGET_ID_ELEMENT_VALUE4_TEXT (GADGET_ID_COUNTER_FIRST + 31)
+#define GADGET_ID_ELEMENT_VALUE4_UP (GADGET_ID_COUNTER_FIRST + 32)
+#define GADGET_ID_YAMYAM_CONTENT_DOWN (GADGET_ID_COUNTER_FIRST + 33)
+#define GADGET_ID_YAMYAM_CONTENT_TEXT (GADGET_ID_COUNTER_FIRST + 34)
+#define GADGET_ID_YAMYAM_CONTENT_UP (GADGET_ID_COUNTER_FIRST + 35)
+#define GADGET_ID_ENVELOPE_XSIZE_DOWN (GADGET_ID_COUNTER_FIRST + 36)
+#define GADGET_ID_ENVELOPE_XSIZE_TEXT (GADGET_ID_COUNTER_FIRST + 37)
+#define GADGET_ID_ENVELOPE_XSIZE_UP (GADGET_ID_COUNTER_FIRST + 38)
+#define GADGET_ID_ENVELOPE_YSIZE_DOWN (GADGET_ID_COUNTER_FIRST + 39)
+#define GADGET_ID_ENVELOPE_YSIZE_TEXT (GADGET_ID_COUNTER_FIRST + 40)
+#define GADGET_ID_ENVELOPE_YSIZE_UP (GADGET_ID_COUNTER_FIRST + 41)
+#define GADGET_ID_CUSTOM_SCORE_DOWN (GADGET_ID_COUNTER_FIRST + 42)
+#define GADGET_ID_CUSTOM_SCORE_TEXT (GADGET_ID_COUNTER_FIRST + 43)
+#define GADGET_ID_CUSTOM_SCORE_UP (GADGET_ID_COUNTER_FIRST + 44)
+#define GADGET_ID_CUSTOM_GEMCOUNT_DOWN (GADGET_ID_COUNTER_FIRST + 45)
+#define GADGET_ID_CUSTOM_GEMCOUNT_TEXT (GADGET_ID_COUNTER_FIRST + 46)
+#define GADGET_ID_CUSTOM_GEMCOUNT_UP (GADGET_ID_COUNTER_FIRST + 47)
+#define GADGET_ID_PUSH_DELAY_FIX_DOWN (GADGET_ID_COUNTER_FIRST + 48)
+#define GADGET_ID_PUSH_DELAY_FIX_TEXT (GADGET_ID_COUNTER_FIRST + 49)
+#define GADGET_ID_PUSH_DELAY_FIX_UP (GADGET_ID_COUNTER_FIRST + 50)
+#define GADGET_ID_PUSH_DELAY_RND_DOWN (GADGET_ID_COUNTER_FIRST + 51)
+#define GADGET_ID_PUSH_DELAY_RND_TEXT (GADGET_ID_COUNTER_FIRST + 52)
+#define GADGET_ID_PUSH_DELAY_RND_UP (GADGET_ID_COUNTER_FIRST + 53)
+#define GADGET_ID_DROP_DELAY_FIX_DOWN (GADGET_ID_COUNTER_FIRST + 54)
+#define GADGET_ID_DROP_DELAY_FIX_TEXT (GADGET_ID_COUNTER_FIRST + 55)
+#define GADGET_ID_DROP_DELAY_FIX_UP (GADGET_ID_COUNTER_FIRST + 56)
+#define GADGET_ID_DROP_DELAY_RND_DOWN (GADGET_ID_COUNTER_FIRST + 57)
+#define GADGET_ID_DROP_DELAY_RND_TEXT (GADGET_ID_COUNTER_FIRST + 58)
+#define GADGET_ID_DROP_DELAY_RND_UP (GADGET_ID_COUNTER_FIRST + 59)
+#define GADGET_ID_MOVE_DELAY_FIX_DOWN (GADGET_ID_COUNTER_FIRST + 60)
+#define GADGET_ID_MOVE_DELAY_FIX_TEXT (GADGET_ID_COUNTER_FIRST + 61)
+#define GADGET_ID_MOVE_DELAY_FIX_UP (GADGET_ID_COUNTER_FIRST + 62)
+#define GADGET_ID_MOVE_DELAY_RND_DOWN (GADGET_ID_COUNTER_FIRST + 63)
+#define GADGET_ID_MOVE_DELAY_RND_TEXT (GADGET_ID_COUNTER_FIRST + 64)
+#define GADGET_ID_MOVE_DELAY_RND_UP (GADGET_ID_COUNTER_FIRST + 65)
+#define GADGET_ID_EXPLOSION_DELAY_DOWN (GADGET_ID_COUNTER_FIRST + 66)
+#define GADGET_ID_EXPLOSION_DELAY_TEXT (GADGET_ID_COUNTER_FIRST + 67)
+#define GADGET_ID_EXPLOSION_DELAY_UP (GADGET_ID_COUNTER_FIRST + 68)
+#define GADGET_ID_IGNITION_DELAY_DOWN (GADGET_ID_COUNTER_FIRST + 69)
+#define GADGET_ID_IGNITION_DELAY_TEXT (GADGET_ID_COUNTER_FIRST + 70)
+#define GADGET_ID_IGNITION_DELAY_UP (GADGET_ID_COUNTER_FIRST + 71)
+#define GADGET_ID_CHANGE_DELAY_FIX_DOWN (GADGET_ID_COUNTER_FIRST + 72)
+#define GADGET_ID_CHANGE_DELAY_FIX_TEXT (GADGET_ID_COUNTER_FIRST + 73)
+#define GADGET_ID_CHANGE_DELAY_FIX_UP (GADGET_ID_COUNTER_FIRST + 74)
+#define GADGET_ID_CHANGE_DELAY_RND_DOWN (GADGET_ID_COUNTER_FIRST + 75)
+#define GADGET_ID_CHANGE_DELAY_RND_TEXT (GADGET_ID_COUNTER_FIRST + 76)
+#define GADGET_ID_CHANGE_DELAY_RND_UP (GADGET_ID_COUNTER_FIRST + 77)
+#define GADGET_ID_CHANGE_CONT_RND_DOWN (GADGET_ID_COUNTER_FIRST + 78)
+#define GADGET_ID_CHANGE_CONT_RND_TEXT (GADGET_ID_COUNTER_FIRST + 79)
+#define GADGET_ID_CHANGE_CONT_RND_UP (GADGET_ID_COUNTER_FIRST + 80)
+#define GADGET_ID_GROUP_CONTENT_DOWN (GADGET_ID_COUNTER_FIRST + 81)
+#define GADGET_ID_GROUP_CONTENT_TEXT (GADGET_ID_COUNTER_FIRST + 82)
+#define GADGET_ID_GROUP_CONTENT_UP (GADGET_ID_COUNTER_FIRST + 83)
/* drawing area identifiers */
-#define GADGET_ID_DRAWING_AREA_FIRST (GADGET_ID_COUNTER_FIRST + 78)
+#define GADGET_ID_DRAWING_AREA_FIRST (GADGET_ID_COUNTER_FIRST + 84)
#define GADGET_ID_DRAWING_LEVEL (GADGET_ID_DRAWING_AREA_FIRST + 0)
#define GADGET_ID_YAMYAM_CONTENT_0 (GADGET_ID_DRAWING_AREA_FIRST + 1)
#define GADGET_ID_TIME_OR_STEPS (GADGET_ID_SELECTBOX_FIRST + 0)
#define GADGET_ID_GAME_ENGINE_TYPE (GADGET_ID_SELECTBOX_FIRST + 1)
-#define GADGET_ID_CUSTOM_WALK_TO_ACTION (GADGET_ID_SELECTBOX_FIRST + 2)
-#define GADGET_ID_CUSTOM_EXPLOSION_TYPE (GADGET_ID_SELECTBOX_FIRST + 3)
-#define GADGET_ID_CUSTOM_DEADLINESS (GADGET_ID_SELECTBOX_FIRST + 4)
-#define GADGET_ID_CUSTOM_MOVE_PATTERN (GADGET_ID_SELECTBOX_FIRST + 5)
-#define GADGET_ID_CUSTOM_MOVE_DIRECTION (GADGET_ID_SELECTBOX_FIRST + 6)
-#define GADGET_ID_CUSTOM_MOVE_STEPSIZE (GADGET_ID_SELECTBOX_FIRST + 7)
-#define GADGET_ID_CUSTOM_MOVE_LEAVE_TYPE (GADGET_ID_SELECTBOX_FIRST + 8)
-#define GADGET_ID_CUSTOM_SMASH_TARGETS (GADGET_ID_SELECTBOX_FIRST + 9)
-#define GADGET_ID_CUSTOM_SLIPPERY_TYPE (GADGET_ID_SELECTBOX_FIRST + 10)
-#define GADGET_ID_CUSTOM_ACCESS_TYPE (GADGET_ID_SELECTBOX_FIRST + 11)
-#define GADGET_ID_CUSTOM_ACCESS_LAYER (GADGET_ID_SELECTBOX_FIRST + 12)
-#define GADGET_ID_CUSTOM_ACCESS_PROTECTED (GADGET_ID_SELECTBOX_FIRST + 13)
-#define GADGET_ID_CUSTOM_ACCESS_DIRECTION (GADGET_ID_SELECTBOX_FIRST + 14)
-#define GADGET_ID_CHANGE_TIME_UNITS (GADGET_ID_SELECTBOX_FIRST + 15)
-#define GADGET_ID_CHANGE_DIRECT_ACTION (GADGET_ID_SELECTBOX_FIRST + 16)
-#define GADGET_ID_CHANGE_OTHER_ACTION (GADGET_ID_SELECTBOX_FIRST + 17)
-#define GADGET_ID_CHANGE_SIDE (GADGET_ID_SELECTBOX_FIRST + 18)
-#define GADGET_ID_CHANGE_PLAYER (GADGET_ID_SELECTBOX_FIRST + 19)
-#define GADGET_ID_CHANGE_PAGE (GADGET_ID_SELECTBOX_FIRST + 20)
-#define GADGET_ID_CHANGE_REPLACE_WHEN (GADGET_ID_SELECTBOX_FIRST + 21)
-#define GADGET_ID_SELECT_CHANGE_PAGE (GADGET_ID_SELECTBOX_FIRST + 22)
-#define GADGET_ID_GROUP_CHOICE_MODE (GADGET_ID_SELECTBOX_FIRST + 23)
+#define GADGET_ID_WIND_DIRECTION (GADGET_ID_SELECTBOX_FIRST + 2)
+#define GADGET_ID_CUSTOM_WALK_TO_ACTION (GADGET_ID_SELECTBOX_FIRST + 3)
+#define GADGET_ID_CUSTOM_EXPLOSION_TYPE (GADGET_ID_SELECTBOX_FIRST + 4)
+#define GADGET_ID_CUSTOM_DEADLINESS (GADGET_ID_SELECTBOX_FIRST + 5)
+#define GADGET_ID_CUSTOM_MOVE_PATTERN (GADGET_ID_SELECTBOX_FIRST + 6)
+#define GADGET_ID_CUSTOM_MOVE_DIRECTION (GADGET_ID_SELECTBOX_FIRST + 7)
+#define GADGET_ID_CUSTOM_MOVE_STEPSIZE (GADGET_ID_SELECTBOX_FIRST + 8)
+#define GADGET_ID_CUSTOM_MOVE_LEAVE_TYPE (GADGET_ID_SELECTBOX_FIRST + 9)
+#define GADGET_ID_CUSTOM_SMASH_TARGETS (GADGET_ID_SELECTBOX_FIRST + 10)
+#define GADGET_ID_CUSTOM_SLIPPERY_TYPE (GADGET_ID_SELECTBOX_FIRST + 11)
+#define GADGET_ID_CUSTOM_ACCESS_TYPE (GADGET_ID_SELECTBOX_FIRST + 12)
+#define GADGET_ID_CUSTOM_ACCESS_LAYER (GADGET_ID_SELECTBOX_FIRST + 13)
+#define GADGET_ID_CUSTOM_ACCESS_PROTECTED (GADGET_ID_SELECTBOX_FIRST + 14)
+#define GADGET_ID_CUSTOM_ACCESS_DIRECTION (GADGET_ID_SELECTBOX_FIRST + 15)
+#define GADGET_ID_CHANGE_TIME_UNITS (GADGET_ID_SELECTBOX_FIRST + 16)
+#define GADGET_ID_CHANGE_DIRECT_ACTION (GADGET_ID_SELECTBOX_FIRST + 17)
+#define GADGET_ID_CHANGE_OTHER_ACTION (GADGET_ID_SELECTBOX_FIRST + 18)
+#define GADGET_ID_CHANGE_SIDE (GADGET_ID_SELECTBOX_FIRST + 19)
+#define GADGET_ID_CHANGE_PLAYER (GADGET_ID_SELECTBOX_FIRST + 20)
+#define GADGET_ID_CHANGE_PAGE (GADGET_ID_SELECTBOX_FIRST + 21)
+#define GADGET_ID_CHANGE_REPLACE_WHEN (GADGET_ID_SELECTBOX_FIRST + 22)
+#define GADGET_ID_ACTION_TYPE (GADGET_ID_SELECTBOX_FIRST + 23)
+#define GADGET_ID_ACTION_MODE (GADGET_ID_SELECTBOX_FIRST + 24)
+#define GADGET_ID_ACTION_ARG (GADGET_ID_SELECTBOX_FIRST + 25)
+#define GADGET_ID_SELECT_CHANGE_PAGE (GADGET_ID_SELECTBOX_FIRST + 26)
+#define GADGET_ID_GROUP_CHOICE_MODE (GADGET_ID_SELECTBOX_FIRST + 27)
/* textbutton identifiers */
-#define GADGET_ID_TEXTBUTTON_FIRST (GADGET_ID_SELECTBOX_FIRST + 24)
+#define GADGET_ID_TEXTBUTTON_FIRST (GADGET_ID_SELECTBOX_FIRST + 28)
#define GADGET_ID_PROPERTIES_INFO (GADGET_ID_TEXTBUTTON_FIRST + 0)
#define GADGET_ID_PROPERTIES_CONFIG (GADGET_ID_TEXTBUTTON_FIRST + 1)
#define GADGET_ID_RANDOM_PERCENTAGE (GADGET_ID_CHECKBUTTON_FIRST + 0)
#define GADGET_ID_RANDOM_QUANTITY (GADGET_ID_CHECKBUTTON_FIRST + 1)
#define GADGET_ID_RANDOM_RESTRICTED (GADGET_ID_CHECKBUTTON_FIRST + 2)
-#define GADGET_ID_DOUBLE_SPEED (GADGET_ID_CHECKBUTTON_FIRST + 3)
-#define GADGET_ID_GRAVITY (GADGET_ID_CHECKBUTTON_FIRST + 4)
-#define GADGET_ID_STICK_ELEMENT (GADGET_ID_CHECKBUTTON_FIRST + 5)
-#define GADGET_ID_EM_SLIPPERY_GEMS (GADGET_ID_CHECKBUTTON_FIRST + 6)
-#define GADGET_ID_USE_SPRING_BUG (GADGET_ID_CHECKBUTTON_FIRST + 7)
-#define GADGET_ID_GROW_INTO_DIGGABLE (GADGET_ID_CHECKBUTTON_FIRST + 8)
+#define GADGET_ID_INITIAL_GRAVITY (GADGET_ID_CHECKBUTTON_FIRST + 3)
+#define GADGET_ID_STICK_ELEMENT (GADGET_ID_CHECKBUTTON_FIRST + 4)
+#define GADGET_ID_EM_SLIPPERY_GEMS (GADGET_ID_CHECKBUTTON_FIRST + 5)
+#define GADGET_ID_USE_SPRING_BUG (GADGET_ID_CHECKBUTTON_FIRST + 6)
+#define GADGET_ID_GROW_INTO_DIGGABLE (GADGET_ID_CHECKBUTTON_FIRST + 7)
+#define GADGET_ID_DOUBLE_SPEED (GADGET_ID_CHECKBUTTON_FIRST + 8)
#define GADGET_ID_BLOCK_LAST_FIELD (GADGET_ID_CHECKBUTTON_FIRST + 9)
#define GADGET_ID_SP_BLOCK_LAST_FIELD (GADGET_ID_CHECKBUTTON_FIRST + 10)
#define GADGET_ID_INSTANT_RELOCATION (GADGET_ID_CHECKBUTTON_FIRST + 11)
#define GADGET_ID_CHANGE_USE_EXPLOSION (GADGET_ID_CHECKBUTTON_FIRST + 33)
#define GADGET_ID_CHANGE_ONLY_COMPLETE (GADGET_ID_CHECKBUTTON_FIRST + 34)
#define GADGET_ID_CHANGE_USE_RANDOM (GADGET_ID_CHECKBUTTON_FIRST + 35)
-#define GADGET_ID_CHANGE_DELAY (GADGET_ID_CHECKBUTTON_FIRST + 36)
-#define GADGET_ID_CHANGE_BY_DIRECT_ACT (GADGET_ID_CHECKBUTTON_FIRST + 37)
-#define GADGET_ID_CHANGE_BY_OTHER_ACT (GADGET_ID_CHECKBUTTON_FIRST + 38)
+#define GADGET_ID_CHANGE_HAS_ACTION (GADGET_ID_CHECKBUTTON_FIRST + 36)
+#define GADGET_ID_CHANGE_DELAY (GADGET_ID_CHECKBUTTON_FIRST + 37)
+#define GADGET_ID_CHANGE_BY_DIRECT_ACT (GADGET_ID_CHECKBUTTON_FIRST + 38)
+#define GADGET_ID_CHANGE_BY_OTHER_ACT (GADGET_ID_CHECKBUTTON_FIRST + 39)
/* gadgets for buttons in element list */
-#define GADGET_ID_ELEMENTLIST_FIRST (GADGET_ID_CHECKBUTTON_FIRST + 39)
+#define GADGET_ID_ELEMENTLIST_FIRST (GADGET_ID_CHECKBUTTON_FIRST + 40)
#define GADGET_ID_ELEMENTLIST_LAST (GADGET_ID_ELEMENTLIST_FIRST + \
ED_NUM_ELEMENTLIST_BUTTONS - 1)
#define ED_COUNTER_ID_LEVEL_RANDOM 6
#define ED_COUNTER_ID_ELEMENT_VALUE1 7
#define ED_COUNTER_ID_ELEMENT_VALUE2 8
-#define ED_COUNTER_ID_YAMYAM_CONTENT 9
-#define ED_COUNTER_ID_ENVELOPE_XSIZE 10
-#define ED_COUNTER_ID_ENVELOPE_YSIZE 11
-#define ED_COUNTER_ID_CUSTOM_SCORE 12
-#define ED_COUNTER_ID_CUSTOM_GEMCOUNT 13
-#define ED_COUNTER_ID_PUSH_DELAY_FIX 14
-#define ED_COUNTER_ID_PUSH_DELAY_RND 15
-#define ED_COUNTER_ID_DROP_DELAY_FIX 16
-#define ED_COUNTER_ID_DROP_DELAY_RND 17
-#define ED_COUNTER_ID_MOVE_DELAY_FIX 18
-#define ED_COUNTER_ID_MOVE_DELAY_RND 19
-#define ED_COUNTER_ID_EXPLOSION_DELAY 20
-#define ED_COUNTER_ID_IGNITION_DELAY 21
-#define ED_COUNTER_ID_GROUP_CONTENT 22
-#define ED_COUNTER_ID_CHANGE_DELAY_FIX 23
-#define ED_COUNTER_ID_CHANGE_DELAY_RND 24
-#define ED_COUNTER_ID_CHANGE_CONT_RND 25
-
-#define ED_NUM_COUNTERBUTTONS 26
+#define ED_COUNTER_ID_ELEMENT_VALUE3 9
+#define ED_COUNTER_ID_ELEMENT_VALUE4 10
+#define ED_COUNTER_ID_YAMYAM_CONTENT 11
+#define ED_COUNTER_ID_ENVELOPE_XSIZE 12
+#define ED_COUNTER_ID_ENVELOPE_YSIZE 13
+#define ED_COUNTER_ID_CUSTOM_SCORE 14
+#define ED_COUNTER_ID_CUSTOM_GEMCOUNT 15
+#define ED_COUNTER_ID_PUSH_DELAY_FIX 16
+#define ED_COUNTER_ID_PUSH_DELAY_RND 17
+#define ED_COUNTER_ID_DROP_DELAY_FIX 18
+#define ED_COUNTER_ID_DROP_DELAY_RND 19
+#define ED_COUNTER_ID_MOVE_DELAY_FIX 20
+#define ED_COUNTER_ID_MOVE_DELAY_RND 21
+#define ED_COUNTER_ID_EXPLOSION_DELAY 22
+#define ED_COUNTER_ID_IGNITION_DELAY 23
+#define ED_COUNTER_ID_GROUP_CONTENT 24
+#define ED_COUNTER_ID_CHANGE_DELAY_FIX 25
+#define ED_COUNTER_ID_CHANGE_DELAY_RND 26
+#define ED_COUNTER_ID_CHANGE_CONT_RND 27
+
+#define ED_NUM_COUNTERBUTTONS 28
#define ED_COUNTER_ID_LEVEL_FIRST ED_COUNTER_ID_LEVEL_XSIZE
#define ED_COUNTER_ID_LEVEL_LAST ED_COUNTER_ID_LEVEL_RANDOM
/* values for selectbox gadgets */
#define ED_SELECTBOX_ID_TIME_OR_STEPS 0
#define ED_SELECTBOX_ID_GAME_ENGINE_TYPE 1
-#define ED_SELECTBOX_ID_CUSTOM_ACCESS_TYPE 2
-#define ED_SELECTBOX_ID_CUSTOM_ACCESS_LAYER 3
-#define ED_SELECTBOX_ID_CUSTOM_ACCESS_PROTECTED 4
-#define ED_SELECTBOX_ID_CUSTOM_ACCESS_DIRECTION 5
-#define ED_SELECTBOX_ID_CUSTOM_WALK_TO_ACTION 6
-#define ED_SELECTBOX_ID_CUSTOM_MOVE_PATTERN 7
-#define ED_SELECTBOX_ID_CUSTOM_MOVE_DIRECTION 8
-#define ED_SELECTBOX_ID_CUSTOM_MOVE_STEPSIZE 9
-#define ED_SELECTBOX_ID_CUSTOM_MOVE_LEAVE_TYPE 10
-#define ED_SELECTBOX_ID_CUSTOM_SMASH_TARGETS 11
-#define ED_SELECTBOX_ID_CUSTOM_SLIPPERY_TYPE 12
-#define ED_SELECTBOX_ID_CUSTOM_DEADLINESS 13
-#define ED_SELECTBOX_ID_CUSTOM_EXPLOSION_TYPE 14
-#define ED_SELECTBOX_ID_CHANGE_TIME_UNITS 15
-#define ED_SELECTBOX_ID_CHANGE_DIRECT_ACTION 16
-#define ED_SELECTBOX_ID_CHANGE_OTHER_ACTION 17
-#define ED_SELECTBOX_ID_CHANGE_SIDE 18
-#define ED_SELECTBOX_ID_CHANGE_PLAYER 19
-#define ED_SELECTBOX_ID_CHANGE_PAGE 20
-#define ED_SELECTBOX_ID_CHANGE_REPLACE_WHEN 21
-#define ED_SELECTBOX_ID_SELECT_CHANGE_PAGE 22
-#define ED_SELECTBOX_ID_GROUP_CHOICE_MODE 23
-
-#define ED_NUM_SELECTBOX 24
+#define ED_SELECTBOX_ID_WIND_DIRECTION 2
+#define ED_SELECTBOX_ID_CUSTOM_ACCESS_TYPE 3
+#define ED_SELECTBOX_ID_CUSTOM_ACCESS_LAYER 4
+#define ED_SELECTBOX_ID_CUSTOM_ACCESS_PROTECTED 5
+#define ED_SELECTBOX_ID_CUSTOM_ACCESS_DIRECTION 6
+#define ED_SELECTBOX_ID_CUSTOM_WALK_TO_ACTION 7
+#define ED_SELECTBOX_ID_CUSTOM_MOVE_PATTERN 8
+#define ED_SELECTBOX_ID_CUSTOM_MOVE_DIRECTION 9
+#define ED_SELECTBOX_ID_CUSTOM_MOVE_STEPSIZE 10
+#define ED_SELECTBOX_ID_CUSTOM_MOVE_LEAVE_TYPE 11
+#define ED_SELECTBOX_ID_CUSTOM_SMASH_TARGETS 12
+#define ED_SELECTBOX_ID_CUSTOM_SLIPPERY_TYPE 13
+#define ED_SELECTBOX_ID_CUSTOM_DEADLINESS 14
+#define ED_SELECTBOX_ID_CUSTOM_EXPLOSION_TYPE 15
+#define ED_SELECTBOX_ID_CHANGE_TIME_UNITS 16
+#define ED_SELECTBOX_ID_CHANGE_DIRECT_ACTION 17
+#define ED_SELECTBOX_ID_CHANGE_OTHER_ACTION 18
+#define ED_SELECTBOX_ID_CHANGE_SIDE 19
+#define ED_SELECTBOX_ID_CHANGE_PLAYER 20
+#define ED_SELECTBOX_ID_CHANGE_PAGE 21
+#define ED_SELECTBOX_ID_CHANGE_REPLACE_WHEN 22
+#define ED_SELECTBOX_ID_ACTION_TYPE 23
+#define ED_SELECTBOX_ID_ACTION_MODE 24
+#define ED_SELECTBOX_ID_ACTION_ARG 25
+#define ED_SELECTBOX_ID_SELECT_CHANGE_PAGE 26
+#define ED_SELECTBOX_ID_GROUP_CHOICE_MODE 27
+
+#define ED_NUM_SELECTBOX 28
#define ED_SELECTBOX_ID_LEVEL_FIRST ED_SELECTBOX_ID_TIME_OR_STEPS
-#define ED_SELECTBOX_ID_LEVEL_LAST ED_SELECTBOX_ID_GAME_ENGINE_TYPE
+#define ED_SELECTBOX_ID_LEVEL_LAST ED_SELECTBOX_ID_WIND_DIRECTION
#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
#define ED_GRAPHICBUTTON_ID_CHANGE_LAST ED_GRAPHICBUTTON_ID_PASTE_CHANGE_PAGE
/* values for checkbutton gadgets */
-#define ED_CHECKBUTTON_ID_DOUBLE_SPEED 0
-#define ED_CHECKBUTTON_ID_GRAVITY 1
-#define ED_CHECKBUTTON_ID_RANDOM_RESTRICTED 2
-#define ED_CHECKBUTTON_ID_STICK_ELEMENT 3
-#define ED_CHECKBUTTON_ID_EM_SLIPPERY_GEMS 4
-#define ED_CHECKBUTTON_ID_USE_SPRING_BUG 5
-#define ED_CHECKBUTTON_ID_GROW_INTO_DIGGABLE 6
+#define ED_CHECKBUTTON_ID_INITIAL_GRAVITY 0
+#define ED_CHECKBUTTON_ID_RANDOM_RESTRICTED 1
+#define ED_CHECKBUTTON_ID_STICK_ELEMENT 2
+#define ED_CHECKBUTTON_ID_EM_SLIPPERY_GEMS 3
+#define ED_CHECKBUTTON_ID_USE_SPRING_BUG 4
+#define ED_CHECKBUTTON_ID_GROW_INTO_DIGGABLE 5
+#define ED_CHECKBUTTON_ID_DOUBLE_SPEED 6
#define ED_CHECKBUTTON_ID_BLOCK_LAST_FIELD 7
#define ED_CHECKBUTTON_ID_SP_BLOCK_LAST_FIELD 8
#define ED_CHECKBUTTON_ID_INSTANT_RELOCATION 9
#define ED_CHECKBUTTON_ID_CHANGE_USE_CONTENT 34
#define ED_CHECKBUTTON_ID_CHANGE_ONLY_COMPLETE 35
#define ED_CHECKBUTTON_ID_CHANGE_USE_RANDOM 36
+#define ED_CHECKBUTTON_ID_CHANGE_HAS_ACTION 37
-#define ED_NUM_CHECKBUTTONS 37
+#define ED_NUM_CHECKBUTTONS 38
-#define ED_CHECKBUTTON_ID_LEVEL_FIRST ED_CHECKBUTTON_ID_DOUBLE_SPEED
+#define ED_CHECKBUTTON_ID_LEVEL_FIRST ED_CHECKBUTTON_ID_INITIAL_GRAVITY
#define ED_CHECKBUTTON_ID_LEVEL_LAST ED_CHECKBUTTON_ID_RANDOM_RESTRICTED
#define ED_CHECKBUTTON_ID_CUSTOM1_FIRST ED_CHECKBUTTON_ID_CUSTOM_USE_GRAPHIC
#define ED_CHECKBUTTON_ID_CUSTOM_LAST ED_CHECKBUTTON_ID_CUSTOM2_LAST
#define ED_CHECKBUTTON_ID_CHANGE_FIRST ED_CHECKBUTTON_ID_CUSTOM_CAN_CHANGE
-#define ED_CHECKBUTTON_ID_CHANGE_LAST ED_CHECKBUTTON_ID_CHANGE_USE_RANDOM
+#define ED_CHECKBUTTON_ID_CHANGE_LAST ED_CHECKBUTTON_ID_CHANGE_HAS_ACTION
/* values for radiobutton gadgets */
#define ED_RADIOBUTTON_ID_PERCENTAGE 0
/* values for elements with count for collecting */
#define MIN_COLLECT_COUNT 0
-#define MAX_COLLECT_COUNT 100
+#define MAX_COLLECT_COUNT 255
/* values for random placement */
#define RANDOM_USE_PERCENTAGE 0
char *text;
} control_info[ED_NUM_CTRL_BUTTONS] =
{
+ /* note: some additional characters are already reserved for "cheat mode"
+ shortcuts (":XYZ" style) -- for details, see "events.c" */
+
{ 's', "draw single items" },
{ 'd', "draw connected items" },
{ 'l', "draw lines" },
char *text_above, *text_left, *text_right;
} counterbutton_info[ED_NUM_COUNTERBUTTONS] =
{
- /* ---------- level and editor settings ---------------------------------- */
+ /* ---------- current level number --------------------------------------- */
{
DX + 5 - SX, DY + 3 - SY,
&level_nr,
NULL, NULL, NULL
},
+
+ /* ---------- level and editor settings ---------------------------------- */
+
{
- ED_SETTINGS_XPOS(0), ED_COUNTER_YPOS(2),
+ ED_LEVEL_SETTINGS_XPOS(0), ED_LEVEL_SETTINGS_YPOS(4),
MIN_LEV_FIELDX, MAX_LEV_FIELDX,
GADGET_ID_LEVEL_XSIZE_DOWN, GADGET_ID_LEVEL_XSIZE_UP,
GADGET_ID_LEVEL_XSIZE_TEXT, GADGET_ID_NONE,
"playfield size:", NULL, "width",
},
{
- -1, ED_COUNTER_YPOS(2),
+ -1, ED_LEVEL_SETTINGS_YPOS(4),
MIN_LEV_FIELDY, MAX_LEV_FIELDY,
GADGET_ID_LEVEL_YSIZE_DOWN, GADGET_ID_LEVEL_YSIZE_UP,
GADGET_ID_LEVEL_YSIZE_TEXT, GADGET_ID_LEVEL_XSIZE_UP,
NULL, " ", "height",
},
{
- ED_SETTINGS_XPOS(0), ED_COUNTER_YPOS(3),
+ ED_LEVEL_SETTINGS_XPOS(0), ED_LEVEL_SETTINGS_YPOS(6),
0, 999,
GADGET_ID_LEVEL_GEMSLIMIT_DOWN, GADGET_ID_LEVEL_GEMSLIMIT_UP,
GADGET_ID_LEVEL_GEMSLIMIT_TEXT, GADGET_ID_NONE,
&level.gems_needed,
- "number of gems to collect:", NULL, NULL
+ NULL, "number of gems to collect:", NULL
},
{
- ED_SETTINGS_XPOS(0), ED_COUNTER_YPOS(4),
+ ED_LEVEL_SETTINGS_XPOS(0), ED_LEVEL_SETTINGS_YPOS(8),
0, 9999,
GADGET_ID_LEVEL_TIMELIMIT_DOWN, GADGET_ID_LEVEL_TIMELIMIT_UP,
GADGET_ID_LEVEL_TIMELIMIT_TEXT, GADGET_ID_NONE,
"time or step limit to solve level:", NULL, NULL
},
{
- ED_SETTINGS_XPOS(0), ED_COUNTER_YPOS(5),
+ ED_LEVEL_SETTINGS_XPOS(0), ED_LEVEL_SETTINGS_YPOS(10),
0, 255,
GADGET_ID_LEVEL_TIMESCORE_DOWN, GADGET_ID_LEVEL_TIMESCORE_UP,
GADGET_ID_LEVEL_TIMESCORE_TEXT, GADGET_ID_NONE,
"score for each 10 sec/steps left:", NULL, NULL
},
{
- ED_SETTINGS_XPOS(0), ED_COUNTER2_YPOS(8),
+ ED_LEVEL_SETTINGS_XPOS(0), ED_COUNTER2_YPOS(8),
1, 100,
GADGET_ID_LEVEL_RANDOM_DOWN, GADGET_ID_LEVEL_RANDOM_UP,
GADGET_ID_LEVEL_RANDOM_TEXT, GADGET_ID_NONE,
/* ---------- element settings: configure (various elements) ------------- */
{
- ED_SETTINGS_XPOS(0), ED_SETTINGS_YPOS(0),
+ ED_ELEMENT_SETTINGS_XPOS(0), ED_ELEMENT_SETTINGS_YPOS(0),
MIN_SCORE, MAX_SCORE,
GADGET_ID_ELEMENT_VALUE1_DOWN, GADGET_ID_ELEMENT_VALUE1_UP,
GADGET_ID_ELEMENT_VALUE1_TEXT, GADGET_ID_NONE,
NULL, NULL, NULL
},
{
- ED_SETTINGS_XPOS(0), ED_SETTINGS_YPOS(1),
+ ED_ELEMENT_SETTINGS_XPOS(0), ED_ELEMENT_SETTINGS_YPOS(1),
MIN_SCORE, MAX_SCORE,
GADGET_ID_ELEMENT_VALUE2_DOWN, GADGET_ID_ELEMENT_VALUE2_UP,
GADGET_ID_ELEMENT_VALUE2_TEXT, GADGET_ID_NONE,
NULL, NULL, NULL
},
{
- ED_SETTINGS_XPOS(0), ED_SETTINGS_YPOS(3),
+ ED_ELEMENT_SETTINGS_XPOS(0), ED_ELEMENT_SETTINGS_YPOS(2),
+ MIN_SCORE, MAX_SCORE,
+ GADGET_ID_ELEMENT_VALUE3_DOWN, GADGET_ID_ELEMENT_VALUE3_UP,
+ GADGET_ID_ELEMENT_VALUE3_TEXT, GADGET_ID_NONE,
+ NULL, /* will be set when used */
+ NULL, NULL, NULL
+ },
+ {
+ ED_ELEMENT_SETTINGS_XPOS(0), ED_ELEMENT_SETTINGS_YPOS(3),
+ MIN_SCORE, MAX_SCORE,
+ GADGET_ID_ELEMENT_VALUE4_DOWN, GADGET_ID_ELEMENT_VALUE4_UP,
+ GADGET_ID_ELEMENT_VALUE4_TEXT, GADGET_ID_NONE,
+ NULL, /* will be set when used */
+ NULL, NULL, NULL
+ },
+ {
+ ED_ELEMENT_SETTINGS_XPOS(0), ED_ELEMENT_SETTINGS_YPOS(3),
MIN_ELEMENT_CONTENTS, MAX_ELEMENT_CONTENTS,
GADGET_ID_YAMYAM_CONTENT_DOWN, GADGET_ID_YAMYAM_CONTENT_UP,
GADGET_ID_YAMYAM_CONTENT_TEXT, GADGET_ID_NONE,
NULL, NULL, "number of content areas"
},
{
- ED_SETTINGS_XPOS(0), ED_SETTINGS_YPOS(0),
+ ED_ELEMENT_SETTINGS_XPOS(0), ED_ELEMENT_SETTINGS_YPOS(0),
MIN_ENVELOPE_XSIZE, MAX_ENVELOPE_XSIZE,
GADGET_ID_ENVELOPE_XSIZE_DOWN, GADGET_ID_ENVELOPE_XSIZE_UP,
GADGET_ID_ENVELOPE_XSIZE_TEXT, GADGET_ID_NONE,
NULL, NULL, "width",
},
{
- -1, ED_SETTINGS_YPOS(0),
+ -1, ED_ELEMENT_SETTINGS_YPOS(0),
MIN_ENVELOPE_YSIZE, MAX_ENVELOPE_YSIZE,
GADGET_ID_ENVELOPE_YSIZE_DOWN, GADGET_ID_ENVELOPE_YSIZE_UP,
GADGET_ID_ENVELOPE_YSIZE_TEXT, GADGET_ID_ENVELOPE_XSIZE_UP,
/* ---------- element settings: configure 1 (custom elements) ------------ */
{
- ED_SETTINGS_XPOS(1), ED_SETTINGS_YPOS(6),
+ ED_ELEMENT_SETTINGS_XPOS(1), ED_ELEMENT_SETTINGS_YPOS(6),
MIN_SCORE, MAX_SCORE,
GADGET_ID_CUSTOM_SCORE_DOWN, GADGET_ID_CUSTOM_SCORE_UP,
GADGET_ID_CUSTOM_SCORE_TEXT, GADGET_ID_NONE,
- &custom_element.collect_score,
+ &custom_element.collect_score_initial,
NULL, "score", " "
},
{
- -1, ED_SETTINGS_YPOS(6),
+ -1, ED_ELEMENT_SETTINGS_YPOS(6),
MIN_COLLECT_COUNT, MAX_COLLECT_COUNT,
GADGET_ID_CUSTOM_GEMCOUNT_DOWN, GADGET_ID_CUSTOM_GEMCOUNT_UP,
GADGET_ID_CUSTOM_GEMCOUNT_TEXT, GADGET_ID_CUSTOM_SCORE_UP,
- &custom_element.collect_count,
+ &custom_element.collect_count_initial,
NULL, "count", NULL
},
{
- ED_SETTINGS_XPOS(1), ED_SETTINGS_YPOS(7),
+ ED_ELEMENT_SETTINGS_XPOS(1), ED_ELEMENT_SETTINGS_YPOS(7),
0, 255,
GADGET_ID_PUSH_DELAY_FIX_DOWN, GADGET_ID_PUSH_DELAY_FIX_UP,
GADGET_ID_PUSH_DELAY_FIX_TEXT, GADGET_ID_NONE,
NULL, "push delay", NULL
},
{
- -1, ED_SETTINGS_YPOS(7),
+ -1, ED_ELEMENT_SETTINGS_YPOS(7),
0, 255,
GADGET_ID_PUSH_DELAY_RND_DOWN, GADGET_ID_PUSH_DELAY_RND_UP,
GADGET_ID_PUSH_DELAY_RND_TEXT, GADGET_ID_PUSH_DELAY_FIX_UP,
NULL, "+random", NULL
},
{
- ED_SETTINGS_XPOS(1), ED_SETTINGS_YPOS(8),
+ ED_ELEMENT_SETTINGS_XPOS(1), ED_ELEMENT_SETTINGS_YPOS(8),
0, 255,
GADGET_ID_DROP_DELAY_FIX_DOWN, GADGET_ID_DROP_DELAY_FIX_UP,
GADGET_ID_DROP_DELAY_FIX_TEXT, GADGET_ID_NONE,
NULL, "drop delay", NULL
},
{
- -1, ED_SETTINGS_YPOS(8),
+ -1, ED_ELEMENT_SETTINGS_YPOS(8),
0, 255,
GADGET_ID_DROP_DELAY_RND_DOWN, GADGET_ID_DROP_DELAY_RND_UP,
GADGET_ID_DROP_DELAY_RND_TEXT, GADGET_ID_DROP_DELAY_FIX_UP,
/* ---------- element settings: configure 2 (custom elements) ------------ */
{
- ED_SETTINGS_XPOS(1), ED_SETTINGS_YPOS(5),
+ ED_ELEMENT_SETTINGS_XPOS(1), ED_ELEMENT_SETTINGS_YPOS(5),
0, 999,
GADGET_ID_MOVE_DELAY_FIX_DOWN, GADGET_ID_MOVE_DELAY_FIX_UP,
GADGET_ID_MOVE_DELAY_FIX_TEXT, GADGET_ID_NONE,
NULL, "move delay", NULL
},
{
- -1, ED_SETTINGS_YPOS(5),
+ -1, ED_ELEMENT_SETTINGS_YPOS(5),
0, 999,
GADGET_ID_MOVE_DELAY_RND_DOWN, GADGET_ID_MOVE_DELAY_RND_UP,
GADGET_ID_MOVE_DELAY_RND_TEXT, GADGET_ID_MOVE_DELAY_FIX_UP,
NULL, "+random", NULL
},
{
- ED_SETTINGS_XPOS(1), ED_SETTINGS_YPOS(12),
+ ED_ELEMENT_SETTINGS_XPOS(1), ED_ELEMENT_SETTINGS_YPOS(12),
0, 255,
GADGET_ID_EXPLOSION_DELAY_DOWN, GADGET_ID_EXPLOSION_DELAY_UP,
GADGET_ID_EXPLOSION_DELAY_TEXT, GADGET_ID_NONE,
NULL, "explosion delay", NULL
},
{
- ED_SETTINGS_XPOS(1), ED_SETTINGS_YPOS(13),
+ ED_ELEMENT_SETTINGS_XPOS(1), ED_ELEMENT_SETTINGS_YPOS(13),
0, 255,
GADGET_ID_IGNITION_DELAY_DOWN, GADGET_ID_IGNITION_DELAY_UP,
GADGET_ID_IGNITION_DELAY_TEXT, GADGET_ID_NONE,
/* ---------- element settings: configure (group elements) --------------- */
{
- ED_SETTINGS_XPOS(0), ED_SETTINGS_YPOS(5),
+ ED_ELEMENT_SETTINGS_XPOS(0), ED_ELEMENT_SETTINGS_YPOS(5),
MIN_ELEMENTS_IN_GROUP, MAX_ELEMENTS_IN_GROUP,
GADGET_ID_GROUP_CONTENT_DOWN, GADGET_ID_GROUP_CONTENT_UP,
GADGET_ID_GROUP_CONTENT_TEXT, GADGET_ID_NONE,
/* ---------- element settings: advanced (custom elements) --------------- */
{
- ED_SETTINGS_XPOS(2), ED_SETTINGS_YPOS(2),
+ ED_ELEMENT_SETTINGS_XPOS(2), ED_ELEMENT_SETTINGS_YPOS(2),
0, 999,
GADGET_ID_CHANGE_DELAY_FIX_DOWN, GADGET_ID_CHANGE_DELAY_FIX_UP,
GADGET_ID_CHANGE_DELAY_FIX_TEXT, GADGET_ID_NONE,
NULL, "delay", NULL,
},
{
- -1, ED_SETTINGS_YPOS(2),
+ -1, ED_ELEMENT_SETTINGS_YPOS(2),
0, 999,
GADGET_ID_CHANGE_DELAY_RND_DOWN, GADGET_ID_CHANGE_DELAY_RND_UP,
GADGET_ID_CHANGE_DELAY_RND_TEXT, GADGET_ID_CHANGE_DELAY_FIX_UP,
NULL, "+random", NULL
},
{
- ED_SETTINGS_XPOS(3), ED_SETTINGS_YPOS(12),
+ ED_ELEMENT_SETTINGS_XPOS(3), ED_ELEMENT_SETTINGS_YPOS(12),
0, 100,
GADGET_ID_CHANGE_CONT_RND_DOWN, GADGET_ID_CHANGE_CONT_RND_UP,
GADGET_ID_CHANGE_CONT_RND_TEXT, GADGET_ID_NONE,
} textinput_info[ED_NUM_TEXTINPUT] =
{
{
- ED_SETTINGS_XPOS(0), ED_COUNTER_YPOS(0),
+ ED_LEVEL_SETTINGS_XPOS(0), ED_LEVEL_SETTINGS_YPOS(0),
GADGET_ID_LEVEL_NAME,
MAX_LEVEL_NAME_LEN,
level.name,
"Title:", "Title"
},
{
- ED_SETTINGS_XPOS(0), ED_COUNTER_YPOS(1),
+ ED_LEVEL_SETTINGS_XPOS(0), ED_LEVEL_SETTINGS_YPOS(2),
GADGET_ID_LEVEL_AUTHOR,
MAX_LEVEL_AUTHOR_LEN,
level.author,
} textarea_info[ED_NUM_TEXTAREAS] =
{
{
- ED_SETTINGS_XPOS(0), ED_SETTINGS_YPOS(2),
+ ED_ELEMENT_SETTINGS_XPOS(0), ED_ELEMENT_SETTINGS_YPOS(2),
GADGET_ID_ENVELOPE_INFO,
MAX_ENVELOPE_XSIZE, MAX_ENVELOPE_YSIZE,
NULL,
static struct ValueTextInfo options_game_engine_type[] =
{
- { GAME_ENGINE_TYPE_RND, "RND" },
- { GAME_ENGINE_TYPE_EM, "EM" },
+ { GAME_ENGINE_TYPE_RND, "Rocks'n'Diamonds" },
+ { GAME_ENGINE_TYPE_EM, "Emerald Mine" },
+
+ { -1, NULL }
+};
+
+static struct ValueTextInfo options_wind_direction[] =
+{
+ { MV_START_NONE, "none" },
+ { MV_START_LEFT, "left" },
+ { MV_START_RIGHT, "right" },
+ { MV_START_UP, "up" },
+ { MV_START_DOWN, "down" },
{ -1, NULL }
};
static struct ValueTextInfo options_access_direction[] =
{
+ { MV_NO_DIRECTION, "no direction" },
{ MV_LEFT, "left" },
{ MV_RIGHT, "right" },
{ MV_UP, "up" },
{ MV_HORIZONTAL, "horizontal" },
{ MV_VERTICAL, "vertical" },
{ MV_ALL_DIRECTIONS, "all directions" },
+ { MV_WIND_DIRECTION, "wind direction" },
{ MV_TOWARDS_PLAYER, "towards player" },
{ MV_AWAY_FROM_PLAYER, "away from player" },
{ MV_ALONG_LEFT_SIDE, "along left side" },
static struct ValueTextInfo options_move_stepsize[] =
{
+ { 0, "not moving" },
{ 1, "very slow" },
{ 2, "slow" },
{ 4, "normal" },
{ 8, "fast" },
{ 16, "very fast" },
-#if 1
{ 32, "even faster" },
-#endif
{ -1, NULL }
};
{ EXPLODES_3X3, "3x3" },
{ EXPLODES_CROSS, "3+3" },
{ EXPLODES_1X1, "1x1" },
-#if 0
- { EP_INDESTRUCTIBLE, "indestructible" },
-#endif
{ -1, NULL }
};
{ CE_LEFT_BY_PLAYER, "left by player" },
{ CE_DROPPED_BY_PLAYER, "dropped/thrown by player" },
{ CE_SWITCHED, "switched" },
-#if 1
{ CE_HITTING_SOMETHING, "hitting something" },
{ CE_HIT_BY_SOMETHING, "hit by something" },
-#else
- { CE_HITTING_SOMETHING, "collision" },
-#endif
-
#if 0
{ CE_BLOCKED, "blocked" },
#endif
-
{ CE_IMPACT, "impact (on something)" },
{ CE_SMASHED, "smashed (from above)" },
+ { CE_COUNT_AT_ZERO, "CE count at zero" },
{ -1, NULL }
};
static struct ValueTextInfo options_change_other_action[] =
{
- { CE_OTHER_GETS_TOUCHED, "player touches" },
- { CE_OTHER_GETS_PRESSED, "player presses" },
- { CE_OTHER_GETS_PUSHED, "player pushes" },
- { CE_OTHER_GETS_ENTERED, "player enters" },
- { CE_OTHER_GETS_LEFT, "player leaves" },
- { CE_OTHER_GETS_DIGGED, "player digs" },
- { CE_OTHER_GETS_COLLECTED, "player collects" },
- { CE_OTHER_GETS_DROPPED, "player drops/throws" },
- { CE_OTHER_IS_TOUCHING, "touching" },
-#if 1
- { CE_OTHER_IS_HITTING, "hitting" },
- { CE_OTHER_GETS_HIT, "hit by" },
-#endif
- { CE_OTHER_IS_SWITCHING, "switch of" },
- { CE_OTHER_IS_CHANGING, "change by page of" },
- { CE_OTHER_IS_EXPLODING, "explosion of" },
+ { CE_PLAYER_TOUCHES_X, "player touches" },
+ { CE_PLAYER_PRESSES_X, "player presses" },
+ { CE_PLAYER_PUSHES_X, "player pushes" },
+ { CE_PLAYER_ENTERS_X, "player enters" },
+ { CE_PLAYER_LEAVES_X, "player leaves" },
+ { CE_PLAYER_DIGS_X, "player digs" },
+ { CE_PLAYER_COLLECTS_X, "player collects" },
+ { CE_PLAYER_DROPS_X, "player drops/throws" },
+ { CE_TOUCHING_X, "touching" },
+ { CE_HITTING_X, "hitting" },
+ { CE_HIT_BY_X, "hit by" },
+ { CE_SWITCH_OF_X, "switch of" },
+ { CE_CHANGE_OF_X, "change by page of" },
+ { CE_EXPLOSION_OF_X, "explosion of" },
+ { CE_COUNT_AT_ZERO_OF_X, "CE count at zero of" },
{ -1, NULL }
};
{ -1, NULL }
};
+static struct ValueTextInfo options_action_type[] =
+{
+ { CA_NO_ACTION, "no action" },
+ { CA_EXIT_PLAYER, "exit player" },
+ { CA_KILL_PLAYER, "kill player" },
+ { CA_RESTART_LEVEL, "restart level" },
+ { CA_SHOW_ENVELOPE, "show envelope" },
+ { CA_ADD_KEY, "add key" },
+ { CA_DEL_KEY, "remove key" },
+ { CA_SET_PLAYER_SPEED, "set player speed" },
+ { CA_SET_GEMS, "set gems" },
+ { CA_SET_TIME, "set time" },
+ { CA_SET_SCORE, "set score" },
+ { CA_SET_CE_SCORE, "set CE score" },
+ { CA_SET_CE_COUNT, "set CE count" },
+#if 0
+ { CA_SET_DYNABOMB_NUMBER, "set bomb number" },
+ { CA_SET_DYNABOMB_SIZE, "set bomb size" },
+ { CA_SET_DYNABOMB_POWER, "set bomb power" },
+#endif
+ { CA_TOGGLE_PLAYER_GRAVITY, "toggle gravity" },
+ { CA_ENABLE_PLAYER_GRAVITY, "enable gravity" },
+ { CA_DISABLE_PLAYER_GRAVITY, "disable gravity" },
+
+ { -1, NULL }
+};
+
+static struct ValueTextInfo options_action_mode[] =
+{
+ { CA_MODE_UNDEFINED, " " },
+ { CA_MODE_SET, "=" },
+ { CA_MODE_ADD, "+" },
+ { CA_MODE_SUBTRACT, "-" },
+ { CA_MODE_MULTIPLY, "*" },
+ { CA_MODE_DIVIDE, "/" },
+ { CA_MODE_MODULO, "%" },
+
+ { -1, NULL }
+};
+
+static struct ValueTextInfo options_action_arg[] =
+{
+ { CA_ARG_PLAYER_HEADLINE, "[player]" },
+ { CA_ARG_PLAYER_1, "1" },
+ { CA_ARG_PLAYER_2, "2" },
+ { CA_ARG_PLAYER_3, "3" },
+ { CA_ARG_PLAYER_4, "4" },
+ { CA_ARG_PLAYER_ANY, "any" },
+ { CA_ARG_PLAYER_TRIGGER, "trigger" },
+ { CA_ARG_UNDEFINED, " " },
+ { CA_ARG_NUMBER_HEADLINE, "[number]" },
+ { CA_ARG_0, "0" },
+ { CA_ARG_1, "1" },
+ { CA_ARG_2, "2" },
+ { CA_ARG_3, "3" },
+ { CA_ARG_4, "4" },
+ { CA_ARG_5, "5" },
+ { CA_ARG_10, "10" },
+ { CA_ARG_100, "100" },
+ { CA_ARG_1000, "1000" },
+ { CA_ARG_UNDEFINED, " " },
+ { CA_ARG_NUMBER_MIN, "min" },
+ { CA_ARG_NUMBER_MAX, "max" },
+ { CA_ARG_NUMBER_NORMAL, "normal" },
+ { CA_ARG_NUMBER_RESET, "reset" },
+ { CA_ARG_NUMBER_CE_SCORE, "CE score" },
+ { CA_ARG_NUMBER_CE_COUNT, "CE count" },
+ { CA_ARG_NUMBER_CE_DELAY, "CE delay" },
+ { CA_ARG_UNDEFINED, " " },
+ { CA_ARG_ELEMENT_HEADLINE, "[element]" },
+ { CA_ARG_ELEMENT_TARGET, "target" },
+ { CA_ARG_ELEMENT_TRIGGER, "trigger" },
+
+ { -1, NULL }
+};
+
static char options_change_page_strings[MAX_CHANGE_PAGES][10];
static struct ValueTextInfo options_change_page[MAX_CHANGE_PAGES + 1] =
{
/* ---------- level and editor settings ---------------------------------- */
{
- -1, ED_COUNTER_YPOS(4),
+ -1, ED_LEVEL_SETTINGS_YPOS(8),
GADGET_ID_TIME_OR_STEPS, GADGET_ID_LEVEL_TIMELIMIT_UP,
-1,
options_time_or_steps,
NULL, "(0 => no limit)", "time or step limit"
},
{
- ED_SETTINGS_XPOS(0), ED_COUNTER_YPOS(6) + 8,
+ ED_LEVEL_SETTINGS_XPOS(0), ED_LEVEL_SETTINGS_YPOS(5),
GADGET_ID_GAME_ENGINE_TYPE, GADGET_ID_NONE,
-1,
options_game_engine_type,
&level.game_engine_type,
"game engine:", NULL, "game engine"
},
+ {
+ ED_LEVEL_SETTINGS_XPOS(0), ED_LEVEL_SETTINGS_YPOS(12),
+ 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 1 (custom elements) ----------- */
+ /* ---------- element settings: configure (several elements) ------------- */
+
+ /* ---------- element settings: configure 1 (custom elements) ------------ */
{
- ED_SETTINGS_XPOS(1), ED_SETTINGS_YPOS(3),
+ ED_ELEMENT_SETTINGS_XPOS(1), ED_ELEMENT_SETTINGS_YPOS(3),
GADGET_ID_CUSTOM_ACCESS_TYPE, GADGET_ID_NONE,
-1,
options_access_type,
NULL, NULL, "type of access to this field"
},
{
- -1, ED_SETTINGS_YPOS(3),
+ -1, ED_ELEMENT_SETTINGS_YPOS(3),
GADGET_ID_CUSTOM_ACCESS_LAYER, GADGET_ID_CUSTOM_ACCESS_TYPE,
-1,
options_access_layer,
NULL, NULL, "layer of access for this field"
},
{
- -1, ED_SETTINGS_YPOS(3),
+ -1, ED_ELEMENT_SETTINGS_YPOS(3),
GADGET_ID_CUSTOM_ACCESS_PROTECTED, GADGET_ID_CUSTOM_ACCESS_LAYER,
-1,
options_access_protected,
NULL, NULL, "protected access for this field"
},
{
- ED_SETTINGS_XPOS(1), ED_SETTINGS_YPOS(4),
+ ED_ELEMENT_SETTINGS_XPOS(1), ED_ELEMENT_SETTINGS_YPOS(4),
GADGET_ID_CUSTOM_ACCESS_DIRECTION, GADGET_ID_NONE,
-1,
options_access_direction,
"from", NULL, "access direction for this field"
},
{
- ED_SETTINGS_XPOS(1), ED_SETTINGS_YPOS(5),
+ ED_ELEMENT_SETTINGS_XPOS(1), ED_ELEMENT_SETTINGS_YPOS(5),
GADGET_ID_CUSTOM_WALK_TO_ACTION, GADGET_ID_NONE,
-1,
options_walk_to_action,
NULL, NULL, "diggable/collectible/pushable"
},
- /* ---------- element settings: configure 2 (custom elements) ----------- */
+ /* ---------- element settings: configure 2 (custom elements) ------------ */
{
- ED_SETTINGS_XPOS(1), ED_SETTINGS_YPOS(1),
+ ED_ELEMENT_SETTINGS_XPOS(1), ED_ELEMENT_SETTINGS_YPOS(1),
GADGET_ID_CUSTOM_MOVE_PATTERN, GADGET_ID_NONE,
-1,
options_move_pattern,
"can move", NULL, "element move pattern"
},
{
- ED_SETTINGS_XPOS(1), ED_SETTINGS_YPOS(2),
+ ED_ELEMENT_SETTINGS_XPOS(1), ED_ELEMENT_SETTINGS_YPOS(2),
GADGET_ID_CUSTOM_MOVE_DIRECTION, GADGET_ID_NONE,
-1,
options_move_direction,
"starts moving", NULL, "initial element move direction"
},
{
- ED_SETTINGS_XPOS(1), ED_SETTINGS_YPOS(4),
+ ED_ELEMENT_SETTINGS_XPOS(1), ED_ELEMENT_SETTINGS_YPOS(4),
GADGET_ID_CUSTOM_MOVE_STEPSIZE, GADGET_ID_NONE,
-1,
options_move_stepsize,
"move/fall speed", NULL, "speed of element movement"
},
{
- ED_SETTINGS_XPOS(1), ED_SETTINGS_YPOS(3),
+ ED_ELEMENT_SETTINGS_XPOS(1), ED_ELEMENT_SETTINGS_YPOS(3),
GADGET_ID_CUSTOM_MOVE_LEAVE_TYPE, GADGET_ID_NONE,
-1,
options_move_leave_type,
"can dig: can", ":", "leave behind or change element"
},
{
- -1, ED_SETTINGS_YPOS(7),
+ -1, ED_ELEMENT_SETTINGS_YPOS(7),
GADGET_ID_CUSTOM_SMASH_TARGETS, GADGET_ID_CUSTOM_CAN_SMASH,
-1,
options_smash_targets,
"can smash", NULL, "elements that can be smashed"
},
{
- ED_SETTINGS_XPOS(1), ED_SETTINGS_YPOS(8),
+ ED_ELEMENT_SETTINGS_XPOS(1), ED_ELEMENT_SETTINGS_YPOS(8),
GADGET_ID_CUSTOM_SLIPPERY_TYPE, GADGET_ID_NONE,
-1,
options_slippery_type,
"slippery", NULL, "where other elements fall down"
},
{
- ED_SETTINGS_XPOS(1), ED_SETTINGS_YPOS(9),
+ ED_ELEMENT_SETTINGS_XPOS(1), ED_ELEMENT_SETTINGS_YPOS(9),
GADGET_ID_CUSTOM_DEADLINESS, GADGET_ID_NONE,
-1,
options_deadliness,
"deadly when", NULL, "deadliness of element"
},
{
- ED_SETTINGS_XPOS(1), ED_SETTINGS_YPOS(10),
+ ED_ELEMENT_SETTINGS_XPOS(1), ED_ELEMENT_SETTINGS_YPOS(10),
GADGET_ID_CUSTOM_EXPLOSION_TYPE, GADGET_ID_NONE,
-1,
options_explosion_type,
/* ---------- element settings: advanced (custom elements) --------------- */
{
- ED_SETTINGS_XPOS(2), ED_SETTINGS_YPOS(3),
+ ED_ELEMENT_SETTINGS_XPOS(2), ED_ELEMENT_SETTINGS_YPOS(3),
GADGET_ID_CHANGE_TIME_UNITS, GADGET_ID_NONE,
-1,
options_time_units,
"delay time given in", NULL, "delay time units for change"
},
{
- ED_SETTINGS_XPOS(2), ED_SETTINGS_YPOS(4),
+ ED_ELEMENT_SETTINGS_XPOS(2), ED_ELEMENT_SETTINGS_YPOS(4),
GADGET_ID_CHANGE_DIRECT_ACTION, GADGET_ID_NONE,
-1,
options_change_direct_action,
NULL, NULL, "type of direct action"
},
{
- ED_SETTINGS_XPOS(2), ED_SETTINGS_YPOS(5),
+ ED_ELEMENT_SETTINGS_XPOS(2), ED_ELEMENT_SETTINGS_YPOS(5),
GADGET_ID_CHANGE_OTHER_ACTION, GADGET_ID_NONE,
-1,
options_change_other_action,
NULL, "element:", "type of other element action"
},
{
- ED_SETTINGS_XPOS(2), ED_SETTINGS_YPOS(6),
+ ED_ELEMENT_SETTINGS_XPOS(2), ED_ELEMENT_SETTINGS_YPOS(6),
GADGET_ID_CHANGE_SIDE, GADGET_ID_NONE,
-1,
options_change_trigger_side,
"at", "side", "element side that causes change"
},
{
- ED_SETTINGS_XPOS(2), ED_SETTINGS_YPOS(7),
+ ED_ELEMENT_SETTINGS_XPOS(2), ED_ELEMENT_SETTINGS_YPOS(7),
GADGET_ID_CHANGE_PLAYER, GADGET_ID_NONE,
-1,
options_change_trigger_player,
"player:", " ", "player that causes change"
},
{
- ED_SETTINGS_XPOS(2), ED_SETTINGS_YPOS(7),
+ ED_ELEMENT_SETTINGS_XPOS(2), ED_ELEMENT_SETTINGS_YPOS(7),
GADGET_ID_CHANGE_PAGE, GADGET_ID_CHANGE_PLAYER,
-1,
options_change_trigger_page,
"page:", NULL, "change page that causes change"
},
{
- ED_SETTINGS_XPOS(2), ED_SETTINGS_YPOS(10),
+ ED_ELEMENT_SETTINGS_XPOS(2), ED_ELEMENT_SETTINGS_YPOS(10),
GADGET_ID_CHANGE_REPLACE_WHEN, GADGET_ID_NONE,
-1,
options_change_replace_when,
"replace when", NULL, "which elements can be replaced"
},
{
- ED_SETTINGS_XPOS(1), ED_SETTINGS_YPOS(14),
+ ED_ELEMENT_SETTINGS_XPOS(1), ED_ELEMENT_SETTINGS_YPOS(13),
+ GADGET_ID_ACTION_TYPE, GADGET_ID_NONE,
+ -1,
+ options_action_type,
+ &custom_element_change.action_type,
+ NULL, NULL, "action on specified condition"
+ },
+ {
+ -1, ED_ELEMENT_SETTINGS_YPOS(13),
+ GADGET_ID_ACTION_MODE, GADGET_ID_ACTION_TYPE,
+ -1,
+ options_action_mode,
+ &custom_element_change.action_mode,
+ NULL, NULL, "action operator"
+ },
+ {
+ -1, ED_ELEMENT_SETTINGS_YPOS(13),
+ GADGET_ID_ACTION_ARG, GADGET_ID_ACTION_MODE,
+ -1,
+ options_action_arg,
+ &custom_element_change.action_arg,
+ NULL, NULL, "action parameter"
+ },
+ {
+ ED_ELEMENT_SETTINGS_XPOS(1), ED_ELEMENT_SETTINGS_YPOS(14),
GADGET_ID_SELECT_CHANGE_PAGE, GADGET_ID_NONE,
3,
options_change_page,
/* ---------- element settings: configure (group elements) --------------- */
{
- ED_SETTINGS_XPOS(0), ED_SETTINGS_YPOS(6),
+ ED_ELEMENT_SETTINGS_XPOS(0), ED_ELEMENT_SETTINGS_YPOS(6),
GADGET_ID_GROUP_CHOICE_MODE, GADGET_ID_NONE,
-1,
options_group_choice_mode,
char *text_left, *text_right, *infotext;
} textbutton_info[ED_NUM_TEXTBUTTONS] =
{
-#if 1
{
- ED_SETTINGS_XPOS(0), ED_COUNTER_YPOS(1),
+ ED_ELEMENT_SETTINGS_XPOS(0), ED_COUNTER_YPOS(1),
GADGET_ID_PROPERTIES_INFO, GADGET_ID_NONE,
8, "Info",
NULL, NULL, "Show information about element"
},
{
- ED_SETTINGS_XPOS(0) + 124, ED_COUNTER_YPOS(1),
+ ED_ELEMENT_SETTINGS_XPOS(0) + 124, ED_COUNTER_YPOS(1),
GADGET_ID_PROPERTIES_CONFIG, GADGET_ID_NONE,
8, "Config",
NULL, NULL, "Configure element properties"
},
{
- ED_SETTINGS_XPOS(0) + 124, ED_COUNTER_YPOS(1),
+ ED_ELEMENT_SETTINGS_XPOS(0) + 124, ED_COUNTER_YPOS(1),
GADGET_ID_PROPERTIES_CONFIG_1, GADGET_ID_NONE,
8, "Config 1",
NULL, NULL, "Configure custom element properties"
},
{
- ED_SETTINGS_XPOS(0) + 248, ED_COUNTER_YPOS(1),
+ ED_ELEMENT_SETTINGS_XPOS(0) + 248, ED_COUNTER_YPOS(1),
GADGET_ID_PROPERTIES_CONFIG_2, GADGET_ID_NONE,
8, "Config 2",
NULL, NULL, "Configure custom element properties"
},
{
- ED_SETTINGS_XPOS(0) + 372, ED_COUNTER_YPOS(1),
+ ED_ELEMENT_SETTINGS_XPOS(0) + 372, ED_COUNTER_YPOS(1),
GADGET_ID_PROPERTIES_CHANGE, GADGET_ID_NONE,
8, "Change",
NULL, NULL, "Custom element change configuration"
},
-#else
- {
- ED_SETTINGS_XPOS(0), ED_COUNTER_YPOS(1),
- GADGET_ID_PROPERTIES_INFO, GADGET_ID_NONE,
- 11, "Information",
- NULL, NULL, "Show information about element"
- },
- {
- ED_SETTINGS_XPOS(0) + 166, ED_COUNTER_YPOS(1),
- GADGET_ID_PROPERTIES_CONFIG, GADGET_ID_NONE,
- 11, "Configure",
- NULL, NULL, "Configure element properties"
- },
- {
- ED_SETTINGS_XPOS(0) + 332, ED_COUNTER_YPOS(1),
- GADGET_ID_PROPERTIES_CHANGE, GADGET_ID_NONE,
- 11, "Advanced",
- NULL, NULL, "Advanced element configuration"
- },
-#endif
{
- -1, ED_SETTINGS_YPOS(2),
+ -1, ED_ELEMENT_SETTINGS_YPOS(2),
GADGET_ID_SAVE_AS_TEMPLATE, GADGET_ID_CUSTOM_USE_TEMPLATE,
-1, "Save",
" ", "As Template", "Save current settings as new template"
},
{
- -1, ED_SETTINGS_YPOS(14),
+ -1, ED_ELEMENT_SETTINGS_YPOS(14),
GADGET_ID_ADD_CHANGE_PAGE, GADGET_ID_PASTE_CHANGE_PAGE,
-1, "New",
NULL, NULL, "Add new change page"
},
{
- -1, ED_SETTINGS_YPOS(14),
+ -1, ED_ELEMENT_SETTINGS_YPOS(14),
GADGET_ID_DEL_CHANGE_PAGE, GADGET_ID_ADD_CHANGE_PAGE,
-1, "Delete",
NULL, NULL, "Delete current change page"
{
{
ED_BUTTON_MINUS_XPOS, ED_BUTTON_COUNT_YPOS,
- ED_SETTINGS_XPOS(0), ED_SETTINGS_YPOS(14),
+ ED_ELEMENT_SETTINGS_XPOS(0), ED_ELEMENT_SETTINGS_YPOS(14),
ED_BUTTON_COUNT_XSIZE, ED_BUTTON_COUNT_YSIZE,
GADGET_ID_PREV_CHANGE_PAGE, GADGET_ID_NONE,
NULL, NULL, "select previous change page"
},
{
ED_BUTTON_PLUS_XPOS, ED_BUTTON_COUNT_YPOS,
- -1, ED_SETTINGS_YPOS(14),
+ -1, ED_ELEMENT_SETTINGS_YPOS(14),
ED_BUTTON_COUNT_XSIZE, ED_BUTTON_COUNT_YSIZE,
GADGET_ID_NEXT_CHANGE_PAGE, GADGET_ID_SELECT_CHANGE_PAGE,
NULL, "change page", "select next change page"
},
{
ED_COPY_CHANGE_PAGE_XPOS, ED_COPY_CHANGE_PAGE_YPOS,
- -1, ED_SETTINGS_YPOS(14),
+ -1, ED_ELEMENT_SETTINGS_YPOS(14),
ED_BUTTON_COUNT_XSIZE, ED_BUTTON_COUNT_YSIZE,
GADGET_ID_COPY_CHANGE_PAGE, GADGET_ID_NEXT_CHANGE_PAGE,
" ", NULL, "copy settings from this change page"
},
{
ED_PASTE_CHANGE_PAGE_XPOS, ED_PASTE_CHANGE_PAGE_YPOS,
- -1, ED_SETTINGS_YPOS(14),
+ -1, ED_ELEMENT_SETTINGS_YPOS(14),
ED_BUTTON_COUNT_XSIZE, ED_BUTTON_COUNT_YSIZE,
GADGET_ID_PASTE_CHANGE_PAGE, GADGET_ID_COPY_CHANGE_PAGE,
NULL, NULL, "paste settings to this change page"
/* ---------- level and editor settings ---------------------------------- */
{
- ED_SETTINGS_XPOS(0), ED_COUNTER_YPOS(6) - MINI_TILEY,
- GADGET_ID_DOUBLE_SPEED, GADGET_ID_NONE,
- &level.double_speed,
- NULL, "double speed movement", "set movement speed of player"
- },
- {
- -1, ED_COUNTER_YPOS(6) - MINI_TILEY,
- GADGET_ID_GRAVITY, GADGET_ID_DOUBLE_SPEED,
+ ED_LEVEL_SETTINGS_XPOS(0), ED_LEVEL_SETTINGS_YPOS(11),
+ GADGET_ID_INITIAL_GRAVITY, GADGET_ID_NONE,
&level.initial_gravity,
- " ", "gravity", "set level gravity"
+ NULL,
+ "initial gravity", "set initial level gravity"
},
{
- ED_SETTINGS_XPOS(0), ED_COUNTER2_YPOS(9) - MINI_TILEY,
+ ED_LEVEL_SETTINGS_XPOS(0), ED_COUNTER2_YPOS(9) - MINI_TILEY,
GADGET_ID_RANDOM_RESTRICTED, GADGET_ID_NONE,
&random_placement_background_restricted,
NULL,
/* ---------- element settings: configure (various elements) ------------- */
{
- ED_SETTINGS_XPOS(0), ED_SETTINGS_YPOS(0),
+ ED_ELEMENT_SETTINGS_XPOS(0), ED_ELEMENT_SETTINGS_YPOS(0),
GADGET_ID_STICK_ELEMENT, GADGET_ID_NONE,
&stick_element_properties_window,
NULL,
"stick this screen to edit content","stick this screen to edit content"
},
{
- ED_SETTINGS_XPOS(0), ED_SETTINGS_YPOS(1),
+ ED_ELEMENT_SETTINGS_XPOS(0), ED_ELEMENT_SETTINGS_YPOS(1),
GADGET_ID_EM_SLIPPERY_GEMS, GADGET_ID_NONE,
&level.em_slippery_gems,
NULL,
"slip down from certain flat walls","use EM style slipping behaviour"
},
{
- ED_SETTINGS_XPOS(0), ED_SETTINGS_YPOS(1),
+ ED_ELEMENT_SETTINGS_XPOS(0), ED_ELEMENT_SETTINGS_YPOS(1),
GADGET_ID_USE_SPRING_BUG, GADGET_ID_NONE,
&level.use_spring_bug,
NULL,
"use spring pushing bug", "use odd spring pushing behaviour"
},
{
- ED_SETTINGS_XPOS(0), ED_SETTINGS_YPOS(0),
+ ED_ELEMENT_SETTINGS_XPOS(0), ED_ELEMENT_SETTINGS_YPOS(0),
GADGET_ID_GROW_INTO_DIGGABLE, GADGET_ID_NONE,
&level.grow_into_diggable,
NULL,
"can grow into anything diggable", "grow into more than just sand"
},
{
- ED_SETTINGS_XPOS(0), ED_SETTINGS_YPOS(1),
+ ED_ELEMENT_SETTINGS_XPOS(0), ED_ELEMENT_SETTINGS_YPOS(4),
+ GADGET_ID_DOUBLE_SPEED, GADGET_ID_NONE,
+ &level.double_speed,
+ NULL,
+ "double speed movement", "set initial movement speed of player"
+ },
+ {
+ ED_ELEMENT_SETTINGS_XPOS(0), ED_ELEMENT_SETTINGS_YPOS(1),
GADGET_ID_BLOCK_LAST_FIELD, GADGET_ID_NONE,
&level.block_last_field,
NULL,
"block last field when moving", "player blocks last field when moving"
},
{
- ED_SETTINGS_XPOS(0), ED_SETTINGS_YPOS(1),
+ ED_ELEMENT_SETTINGS_XPOS(0), ED_ELEMENT_SETTINGS_YPOS(1),
GADGET_ID_SP_BLOCK_LAST_FIELD, GADGET_ID_NONE,
&level.sp_block_last_field,
NULL,
"block last field when moving", "player blocks last field when moving"
},
{
- ED_SETTINGS_XPOS(0), ED_SETTINGS_YPOS(2),
+ ED_ELEMENT_SETTINGS_XPOS(0), ED_ELEMENT_SETTINGS_YPOS(2),
GADGET_ID_INSTANT_RELOCATION, GADGET_ID_NONE,
&level.instant_relocation,
NULL,
"no scrolling when relocating", "player gets relocated without delay"
},
{
- ED_SETTINGS_XPOS(0), ED_SETTINGS_YPOS(3),
+ ED_ELEMENT_SETTINGS_XPOS(0), ED_ELEMENT_SETTINGS_YPOS(3),
GADGET_ID_CAN_PASS_TO_WALKABLE, GADGET_ID_NONE,
&level.can_pass_to_walkable,
NULL,
"can pass to walkable element", "player can pass to empty or walkable"
},
{
- ED_SETTINGS_XPOS(0), ED_SETTINGS_YPOS(0),
+ ED_ELEMENT_SETTINGS_XPOS(0), ED_ELEMENT_SETTINGS_YPOS(0),
GADGET_ID_CAN_FALL_INTO_ACID, GADGET_ID_NONE,
&custom_element_properties[EP_CAN_MOVE_INTO_ACID],
NULL,
"can fall into acid (with gravity)","player can fall into acid pool"
},
{
- ED_SETTINGS_XPOS(0), ED_SETTINGS_YPOS(0),
+ ED_ELEMENT_SETTINGS_XPOS(0), ED_ELEMENT_SETTINGS_YPOS(0),
GADGET_ID_CAN_MOVE_INTO_ACID, GADGET_ID_NONE,
&custom_element_properties[EP_CAN_MOVE_INTO_ACID],
NULL,
"can move into acid", "element can move into acid pool"
},
{
- ED_SETTINGS_XPOS(0), ED_SETTINGS_YPOS(1),
+ ED_ELEMENT_SETTINGS_XPOS(0), ED_ELEMENT_SETTINGS_YPOS(1),
GADGET_ID_DONT_COLLIDE_WITH, GADGET_ID_NONE,
&custom_element_properties[EP_DONT_COLLIDE_WITH],
NULL,
/* ---------- element settings: configure 1 (custom elements) ----------- */
{
- ED_SETTINGS_XPOS(0), ED_SETTINGS_YPOS(1),
+ ED_ELEMENT_SETTINGS_XPOS(0), ED_ELEMENT_SETTINGS_YPOS(1),
GADGET_ID_CUSTOM_USE_GRAPHIC, GADGET_ID_NONE,
&custom_element.use_gfx_element,
#endif
},
{
- ED_SETTINGS_XPOS(0), ED_SETTINGS_YPOS(2),
+ ED_ELEMENT_SETTINGS_XPOS(0), ED_ELEMENT_SETTINGS_YPOS(2),
GADGET_ID_CUSTOM_USE_TEMPLATE, GADGET_ID_NONE,
&level.use_custom_template,
NULL, "use template", "use template for custom properties"
},
{
- ED_SETTINGS_XPOS(0), ED_SETTINGS_YPOS(3),
+ ED_ELEMENT_SETTINGS_XPOS(0), ED_ELEMENT_SETTINGS_YPOS(3),
GADGET_ID_CUSTOM_ACCESSIBLE, GADGET_ID_NONE,
&custom_element_properties[EP_ACCESSIBLE],
NULL, NULL, "player can walk to or pass this field"
},
{
- ED_SETTINGS_XPOS(0), ED_SETTINGS_YPOS(10),
+ ED_ELEMENT_SETTINGS_XPOS(0), ED_ELEMENT_SETTINGS_YPOS(10),
GADGET_ID_CUSTOM_GRAV_REACHABLE, GADGET_ID_NONE,
&custom_element_properties[EP_GRAVITY_REACHABLE],
NULL, "reachable despite gravity", "player can walk/dig despite gravity"
},
{
- ED_SETTINGS_XPOS(0), ED_SETTINGS_YPOS(5),
+ ED_ELEMENT_SETTINGS_XPOS(0), ED_ELEMENT_SETTINGS_YPOS(5),
GADGET_ID_CUSTOM_WALK_TO_OBJECT, GADGET_ID_NONE,
&custom_element_properties[EP_WALK_TO_OBJECT],
NULL, NULL, "player can dig/collect/push element"
},
{
- ED_SETTINGS_XPOS(0), ED_SETTINGS_YPOS(9),
+ ED_ELEMENT_SETTINGS_XPOS(0), ED_ELEMENT_SETTINGS_YPOS(9),
GADGET_ID_CUSTOM_INDESTRUCTIBLE, GADGET_ID_NONE,
&custom_element_properties[EP_INDESTRUCTIBLE],
NULL, "indestructible", "element is indestructible"
/* ---------- element settings: configure 2 (custom elements) ----------- */
{
- ED_SETTINGS_XPOS(0), ED_SETTINGS_YPOS(1),
+ ED_ELEMENT_SETTINGS_XPOS(0), ED_ELEMENT_SETTINGS_YPOS(1),
GADGET_ID_CUSTOM_CAN_MOVE, GADGET_ID_NONE,
&custom_element_properties[EP_CAN_MOVE],
NULL, NULL, "element can move with some pattern"
},
{
- ED_SETTINGS_XPOS(0), ED_SETTINGS_YPOS(7),
+ ED_ELEMENT_SETTINGS_XPOS(0), ED_ELEMENT_SETTINGS_YPOS(7),
GADGET_ID_CUSTOM_CAN_FALL, GADGET_ID_NONE,
&custom_element_properties[EP_CAN_FALL],
NULL, "can fall", "element can fall down"
},
{
- -1, ED_SETTINGS_YPOS(7),
+ -1, ED_ELEMENT_SETTINGS_YPOS(7),
GADGET_ID_CUSTOM_CAN_SMASH, GADGET_ID_CUSTOM_CAN_FALL,
&custom_element_properties[EP_CAN_SMASH],
" ", NULL, "element can smash other elements"
},
{
- ED_SETTINGS_XPOS(0), ED_SETTINGS_YPOS(8),
+ ED_ELEMENT_SETTINGS_XPOS(0), ED_ELEMENT_SETTINGS_YPOS(8),
GADGET_ID_CUSTOM_SLIPPERY, GADGET_ID_NONE,
&custom_element_properties[EP_SLIPPERY],
NULL, NULL, "other elements can fall down from it"
},
{
- ED_SETTINGS_XPOS(0), ED_SETTINGS_YPOS(9),
+ ED_ELEMENT_SETTINGS_XPOS(0), ED_ELEMENT_SETTINGS_YPOS(9),
GADGET_ID_CUSTOM_DEADLY, GADGET_ID_NONE,
&custom_element_properties[EP_DEADLY],
NULL, NULL, "element can kill the player"
},
{
- ED_SETTINGS_XPOS(0), ED_SETTINGS_YPOS(10),
+ ED_ELEMENT_SETTINGS_XPOS(0), ED_ELEMENT_SETTINGS_YPOS(10),
GADGET_ID_CUSTOM_CAN_EXPLODE, GADGET_ID_NONE,
&custom_element_properties[EP_CAN_EXPLODE],
NULL, NULL, "element can explode"
},
{
- ED_SETTINGS_XPOS(1), ED_SETTINGS_YPOS(11),
+ ED_ELEMENT_SETTINGS_XPOS(1), ED_ELEMENT_SETTINGS_YPOS(11),
GADGET_ID_CUSTOM_EXPLODE_FIRE, GADGET_ID_NONE,
&custom_element_properties[EP_EXPLODES_BY_FIRE],
NULL, "by fire", "element can explode by fire/explosion"
},
{
- -1, ED_SETTINGS_YPOS(11),
+ -1, ED_ELEMENT_SETTINGS_YPOS(11),
GADGET_ID_CUSTOM_EXPLODE_SMASH, GADGET_ID_CUSTOM_EXPLODE_FIRE,
&custom_element_properties[EP_EXPLODES_SMASHED],
" ", "smashed", "element can explode when smashed"
},
{
- -1, ED_SETTINGS_YPOS(11),
+ -1, ED_ELEMENT_SETTINGS_YPOS(11),
GADGET_ID_CUSTOM_EXPLODE_IMPACT, GADGET_ID_CUSTOM_EXPLODE_SMASH,
&custom_element_properties[EP_EXPLODES_IMPACT],
" ", "impact", "element can explode on impact"
/* ---------- element settings: advanced (custom elements) --------------- */
{
- ED_SETTINGS_XPOS(0), ED_SETTINGS_YPOS(1),
+ ED_ELEMENT_SETTINGS_XPOS(0), ED_ELEMENT_SETTINGS_YPOS(1),
GADGET_ID_CUSTOM_CAN_CHANGE, GADGET_ID_NONE,
&custom_element_change.can_change,
- NULL, "element changes to:", "element can change to other element"
+ NULL, "element changes to:", "change element on specified condition"
},
{
- ED_SETTINGS_XPOS(1), ED_SETTINGS_YPOS(2),
+ ED_ELEMENT_SETTINGS_XPOS(1), ED_ELEMENT_SETTINGS_YPOS(2),
GADGET_ID_CHANGE_DELAY, GADGET_ID_NONE,
&custom_element_change_events[CE_DELAY],
NULL, NULL, "element changes after delay"
},
{
- ED_SETTINGS_XPOS(1), ED_SETTINGS_YPOS(4),
+ ED_ELEMENT_SETTINGS_XPOS(1), ED_ELEMENT_SETTINGS_YPOS(4),
GADGET_ID_CHANGE_BY_DIRECT_ACT, GADGET_ID_NONE,
&custom_element_change_events[CE_BY_DIRECT_ACTION],
NULL, NULL, "element changes by direct action"
},
{
- ED_SETTINGS_XPOS(1), ED_SETTINGS_YPOS(5),
+ ED_ELEMENT_SETTINGS_XPOS(1), ED_ELEMENT_SETTINGS_YPOS(5),
GADGET_ID_CHANGE_BY_OTHER_ACT, GADGET_ID_NONE,
&custom_element_change_events[CE_BY_OTHER_ACTION],
NULL, NULL, "element changes by other element"
},
{
- ED_SETTINGS_XPOS(1), ED_SETTINGS_YPOS(8),
+ ED_ELEMENT_SETTINGS_XPOS(1), ED_ELEMENT_SETTINGS_YPOS(8),
GADGET_ID_CHANGE_USE_EXPLOSION, GADGET_ID_NONE,
&custom_element_change.explode,
NULL, "explode instead of change", "element explodes instead of change"
},
{
- ED_SETTINGS_XPOS(1), ED_SETTINGS_YPOS(9),
+ ED_ELEMENT_SETTINGS_XPOS(1), ED_ELEMENT_SETTINGS_YPOS(9),
GADGET_ID_CHANGE_USE_CONTENT, GADGET_ID_NONE,
&custom_element_change.use_target_content,
NULL, "use extended change target:","element changes to more elements"
},
{
- ED_SETTINGS_XPOS(2), ED_SETTINGS_YPOS(11),
+ ED_ELEMENT_SETTINGS_XPOS(2), ED_ELEMENT_SETTINGS_YPOS(11),
GADGET_ID_CHANGE_ONLY_COMPLETE, GADGET_ID_NONE,
&custom_element_change.only_if_complete,
NULL, "replace all or nothing", "only replace when all can be changed"
},
{
- ED_SETTINGS_XPOS(2), ED_SETTINGS_YPOS(12),
+ ED_ELEMENT_SETTINGS_XPOS(2), ED_ELEMENT_SETTINGS_YPOS(12),
GADGET_ID_CHANGE_USE_RANDOM, GADGET_ID_NONE,
&custom_element_change.use_random_replace,
NULL, NULL, "use percentage for random replace"
},
+ {
+ ED_ELEMENT_SETTINGS_XPOS(0), ED_ELEMENT_SETTINGS_YPOS(13),
+ GADGET_ID_CHANGE_HAS_ACTION, GADGET_ID_NONE,
+ &custom_element_change.has_action,
+ NULL, NULL, "execute action on specified condition"
+ },
};
static struct
/* ---------- random background (for random painting) -------------------- */
{
- -1, ED_SETTINGS_YPOS(14),
+ -1, ED_ELEMENT_SETTINGS_YPOS(14),
1, 1,
GADGET_ID_RANDOM_BACKGROUND, GADGET_ID_RANDOM_RESTRICTED,
NULL, NULL, NULL
static int new_element2 = EL_EMPTY;
static int new_element3 = EL_SAND;
+#define IS_VALID_BUTTON(button) (button >= 1 && button <= 3)
#define BUTTON_ELEMENT(button) ((button) == 1 ? new_element1 : \
(button) == 2 ? new_element2 : \
(button) == 3 ? new_element3 : EL_EMPTY)
#define BUTTON_STEPSIZE(button) ((button) == 1 ? 1 : (button) == 2 ? 5 : 10)
/* forward declaration for internal use */
-static void ModifyEditorCounter(int, int);
+static void ModifyEditorCounterValue(int, int);
static void ModifyEditorCounterLimits(int, int, int);
static void ModifyEditorSelectbox(int, int);
static void ModifyEditorDrawingArea(int, int, int);
EL_AMOEBA_WET,
EL_AMOEBA_DRY,
-#if 1
EL_EM_KEY_1,
EL_EM_KEY_2,
EL_EM_KEY_3,
EL_EM_KEY_4,
-#else
- EL_EM_KEY_1_FILE,
- EL_EM_KEY_2_FILE,
- EL_EM_KEY_3_FILE,
- EL_EM_KEY_4_FILE,
-#endif
EL_EM_GATE_1,
EL_EM_GATE_2,
static int editor_el_emerald_mine_club[] =
{
- EL_EM_KEY_5,
- EL_EM_KEY_6,
- EL_EM_KEY_7,
- EL_EM_KEY_8,
+ EL_EMC_KEY_5,
+ EL_EMC_KEY_6,
+ EL_EMC_KEY_7,
+ EL_EMC_KEY_8,
- EL_EM_GATE_5,
- EL_EM_GATE_6,
- EL_EM_GATE_7,
- EL_EM_GATE_8,
+ EL_EMC_GATE_5,
+ EL_EMC_GATE_6,
+ EL_EMC_GATE_7,
+ EL_EMC_GATE_8,
- EL_EM_GATE_5_GRAY,
- EL_EM_GATE_6_GRAY,
- EL_EM_GATE_7_GRAY,
- EL_EM_GATE_8_GRAY,
+ EL_EMC_GATE_5_GRAY,
+ EL_EMC_GATE_6_GRAY,
+ EL_EMC_GATE_7_GRAY,
+ EL_EMC_GATE_8_GRAY,
EL_EMC_STEELWALL_1,
EL_EMC_STEELWALL_2,
EL_EMC_WALL_11,
EL_EMC_WALL_12,
+#if RELEASE_3_1_2
+ EL_EMPTY,
+#else
EL_EMC_ANDROID,
+#endif
EL_BALLOON,
EL_BALLOON_SWITCH_ANY,
+#if RELEASE_3_1_2
+ EL_EMPTY,
+#else
EL_BALLOON_SWITCH_NONE,
+#endif
EL_BALLOON_SWITCH_LEFT,
EL_BALLOON_SWITCH_RIGHT,
EL_EMC_GRASS,
EL_EMC_PLANT,
+#if RELEASE_3_1_2
+ EL_EMPTY,
+ EL_EMPTY,
+#else
EL_EMC_LENSES,
EL_EMC_MAGNIFIER,
+#endif
+#if RELEASE_3_1_2
+ EL_EMPTY,
+ EL_EMPTY,
+#else
EL_EMC_MAGIC_BALL,
EL_EMC_MAGIC_BALL_SWITCH,
+#endif
EL_SPRING,
+#if RELEASE_3_1_2
+ EL_EMPTY,
+#else
EL_EMC_SPRING_BUMPER,
+#endif
- EL_EMC_DRIPPER,
+#if RELEASE_3_1_2
EL_EMPTY,
+#else
+ EL_EMC_DRIPPER,
+#endif
+ EL_EMC_FAKE_GRASS,
EL_EMPTY,
EL_EMPTY,
};
}
};
-#if 0
-
-static struct
-{
- short element;
- short element_mapped;
-}
-forum_sketch_element_mapping[] =
-{
- { EL_WALL_SLIPPERY, EL_WALL },
- { EL_EXPANDABLE_WALL, EL_WALL },
- { EL_EXPANDABLE_WALL_HORIZONTAL, EL_WALL },
- { EL_EXPANDABLE_WALL_VERTICAL, EL_WALL },
- { EL_EXPANDABLE_WALL_ANY, EL_WALL },
- { EL_WALL_EMERALD, EL_WALL },
- { EL_WALL_DIAMOND, EL_WALL },
- { EL_WALL_BD_DIAMOND, EL_WALL },
- { EL_WALL_EMERALD_YELLOW, EL_WALL },
- { EL_WALL_EMERALD_RED, EL_WALL },
- { EL_WALL_EMERALD_PURPLE, EL_WALL },
- { EL_ACID_POOL_TOPLEFT, EL_WALL },
- { EL_ACID_POOL_TOPRIGHT, EL_WALL },
- { EL_ACID_POOL_BOTTOMLEFT, EL_WALL },
- { EL_ACID_POOL_BOTTOM, EL_WALL },
- { EL_ACID_POOL_BOTTOMRIGHT, EL_WALL },
- { EL_BD_WALL, EL_WALL },
-
- { EL_BD_ROCK, EL_ROCK },
-
- { EL_SP_ZONK, EL_ROCK },
- { EL_SP_BASE, EL_SAND },
- { EL_SP_MURPHY, EL_PLAYER_1 },
- { EL_SP_INFOTRON, EL_EMERALD },
- { EL_SP_HARDWARE_GRAY, EL_STEELWALL },
- { EL_SP_EXIT_CLOSED, EL_EXIT_OPEN },
- { EL_SP_DISK_ORANGE, EL_BOMB },
- { EL_SP_DISK_RED, EL_BOMB },
- { EL_SP_DISK_YELLOW, EL_BOMB },
- { EL_SP_PORT_RIGHT, EL_GATE_1_GRAY },
- { EL_SP_PORT_DOWN, EL_GATE_1_GRAY },
- { EL_SP_PORT_LEFT, EL_GATE_1_GRAY },
- { EL_SP_PORT_UP, EL_GATE_1_GRAY },
- { EL_SP_GRAVITY_PORT_RIGHT, EL_GATE_1_GRAY },
- { EL_SP_GRAVITY_PORT_DOWN, EL_GATE_1_GRAY },
- { EL_SP_GRAVITY_PORT_LEFT, EL_GATE_1_GRAY },
- { EL_SP_GRAVITY_PORT_UP, EL_GATE_1_GRAY },
- { EL_SP_PORT_VERTICAL, EL_GATE_1_GRAY },
- { EL_SP_PORT_HORIZONTAL, EL_GATE_1_GRAY },
- { EL_SP_PORT_ANY, EL_GATE_1_GRAY },
- { EL_SP_SNIKSNAK, EL_BUG },
- { EL_SP_ELECTRON, EL_SPACESHIP },
- { EL_SP_CHIP_SINGLE, EL_WALL },
- { EL_SP_CHIP_LEFT, EL_WALL },
- { EL_SP_CHIP_RIGHT, EL_WALL },
- { EL_SP_CHIP_TOP, EL_WALL },
- { EL_SP_CHIP_BOTTOM, EL_WALL },
- { EL_SP_HARDWARE_BASE_1, EL_STEELWALL },
- { EL_SP_HARDWARE_GREEN, EL_STEELWALL },
- { EL_SP_HARDWARE_BLUE, EL_STEELWALL },
- { EL_SP_HARDWARE_RED, EL_STEELWALL },
- { EL_SP_HARDWARE_YELLOW, EL_STEELWALL },
- { EL_SP_HARDWARE_BASE_2, EL_STEELWALL },
- { EL_SP_HARDWARE_BASE_3, EL_STEELWALL },
- { EL_SP_HARDWARE_BASE_3, EL_STEELWALL },
- { EL_SP_HARDWARE_BASE_4, EL_STEELWALL },
- { EL_SP_HARDWARE_BASE_5, EL_STEELWALL },
- { EL_SP_HARDWARE_BASE_6, EL_STEELWALL },
-
- { EL_STEELWALL_SLIPPERY, EL_STEELWALL },
-
- { EL_EXIT_CLOSED, EL_EXIT_OPEN },
-
- { EL_DIAMOND, EL_EMERALD },
- { EL_BD_DIAMOND, EL_EMERALD },
- { EL_EMERALD_YELLOW, EL_EMERALD },
- { EL_EMERALD_RED, EL_EMERALD },
- { EL_EMERALD_PURPLE, EL_EMERALD },
-
- { EL_AMOEBA_DEAD, EL_AMOEBA },
- { EL_AMOEBA_DROP, EL_AMOEBA },
- { EL_AMOEBA_WET, EL_AMOEBA },
- { EL_AMOEBA_DRY, EL_AMOEBA },
- { EL_AMOEBA_FULL, EL_AMOEBA },
- { EL_BD_AMOEBA, EL_AMOEBA },
- { EL_AMOEBA_TO_DIAMOND, EL_AMOEBA },
-
- { EL_DYNAMITE_ACTIVE, EL_DYNAMITE },
-
- { EL_GATE_2_GRAY, EL_GATE_1_GRAY },
- { EL_GATE_3_GRAY, EL_GATE_1_GRAY },
- { EL_GATE_4_GRAY, EL_GATE_1_GRAY },
-
- { EL_EM_KEY_1, EL_KEY_1 },
- { EL_EM_KEY_2, EL_KEY_2 },
- { EL_EM_KEY_3, EL_KEY_3 },
- { EL_EM_KEY_4, EL_KEY_4 },
-
- { EL_EM_GATE_1, EL_GATE_1 },
- { EL_EM_GATE_2, EL_GATE_2 },
- { EL_EM_GATE_3, EL_GATE_3 },
- { EL_EM_GATE_4, EL_GATE_4 },
-
- { EL_EM_GATE_1_GRAY, EL_GATE_1_GRAY },
- { EL_EM_GATE_2_GRAY, EL_GATE_1_GRAY },
- { EL_EM_GATE_3_GRAY, EL_GATE_1_GRAY },
- { EL_EM_GATE_4_GRAY, EL_GATE_1_GRAY },
-
- { EL_INVISIBLE_SAND, EL_EMPTY },
- { EL_INVISIBLE_WALL, EL_EMPTY },
- { EL_INVISIBLE_STEELWALL, EL_EMPTY },
-
- { EL_PACMAN, EL_YAMYAM },
- { EL_DARK_YAMYAM, EL_YAMYAM },
-
- { EL_BD_MAGIC_WALL, EL_MAGIC_WALL },
-
- { EL_DYNABOMB_INCREASE_NUMBER, EL_BOMB },
- { EL_DYNABOMB_INCREASE_SIZE, EL_BOMB },
- { EL_DYNABOMB_INCREASE_POWER, EL_BOMB },
- { EL_BLACK_ORB, EL_BOMB },
- { EL_DX_SUPABOMB, EL_BOMB },
-
- { EL_SOKOBAN_OBJECT, EL_KEY_1 },
- { EL_SOKOBAN_FIELD_EMPTY, EL_GATE_1_GRAY },
- { EL_SOKOBAN_FIELD_FULL, EL_GATE_1 },
- { EL_SOKOBAN_FIELD_PLAYER, EL_PLAYER_1 },
-
- { EL_BD_BUTTERFLY_RIGHT, EL_BD_BUTTERFLY },
- { EL_BD_BUTTERFLY_UP, EL_BD_BUTTERFLY },
- { EL_BD_BUTTERFLY_LEFT, EL_BD_BUTTERFLY },
- { EL_BD_BUTTERFLY_DOWN, EL_BD_BUTTERFLY },
-
- { EL_BD_FIREFLY_RIGHT, EL_BD_FIREFLY },
- { EL_BD_FIREFLY_UP, EL_BD_FIREFLY },
- { EL_BD_FIREFLY_LEFT, EL_BD_FIREFLY },
- { EL_BD_FIREFLY_DOWN, EL_BD_FIREFLY },
-
- { EL_PLAYER_2, EL_PLAYER_1 },
- { EL_PLAYER_3, EL_PLAYER_1 },
- { EL_PLAYER_4, EL_PLAYER_1 },
-
- { EL_BUG_RIGHT, EL_BUG },
- { EL_BUG_UP, EL_BUG },
- { EL_BUG_LEFT, EL_BUG },
- { EL_BUG_DOWN, EL_BUG },
-
- { EL_SPACESHIP_RIGHT, EL_SPACESHIP },
- { EL_SPACESHIP_UP, EL_SPACESHIP },
- { EL_SPACESHIP_LEFT, EL_SPACESHIP },
- { EL_SPACESHIP_DOWN, EL_SPACESHIP },
-
- { EL_PACMAN_RIGHT, EL_YAMYAM },
- { EL_PACMAN_UP, EL_YAMYAM },
- { EL_PACMAN_LEFT, EL_YAMYAM },
- { EL_PACMAN_DOWN, EL_YAMYAM },
-
- { -1, -1 }
-};
-
-static struct
-{
- short element;
- char *element_string;
-}
-forum_sketch_element_strings[] =
-{
- { EL_PLAYER_1, "p" },
- { EL_EMPTY, "_" },
- { EL_SAND, "s" },
- { EL_ROCK, "b" },
- { EL_EMERALD, "e" },
- { EL_BUG, "u" },
- { EL_SPACESHIP, "h" },
- { EL_BD_FIREFLY, "f" },
- { EL_BD_BUTTERFLY, "b" },
- { EL_AMOEBA, "a" },
- { EL_YAMYAM, "y" },
- { EL_WALL, "w" },
- { EL_STEELWALL, "t" },
- { EL_MAGIC_WALL, "m" },
- { EL_EXIT_OPEN, "x" },
- { EL_DYNAMITE, "d" },
- { EL_KEY_1, "1" },
- { EL_KEY_2, "2" },
- { EL_KEY_3, "3" },
- { EL_KEY_4, "4" },
- { EL_GATE_1, "5" },
- { EL_GATE_2, "6" },
- { EL_GATE_3, "7" },
- { EL_GATE_4, "8" },
- { EL_GATE_1_GRAY, "9" },
- { EL_BOMB, "@" },
- { EL_ROBOT, "r" },
- { EL_ROBOT_WHEEL, "0" },
- { EL_NUT, "n" },
- { EL_CUSTOM_1, "c" },
- { EL_CHAR_QUESTION, "?" },
-
- { -1, NULL }
-};
-
-#endif
-
/*
-----------------------------------------------------------------------------
static void ReinitializeElementList()
{
- static boolean initialized = FALSE;
int pos = 0;
int i, j;
checked_free(editor_elements);
- if (!initialized)
- {
- /* initialize optional user defined element list */
- LoadUserDefinedEditorElementList(&editor_el_user_defined_ptr,
- &num_editor_el_user_defined);
+ /* reload optional user defined element list for each invocation of editor */
+ LoadUserDefinedEditorElementList(&editor_el_user_defined_ptr,
+ &num_editor_el_user_defined);
- /* initialize list of empty elements (used for padding, if needed) */
- for (i = 0; i < ED_NUM_ELEMENTLIST_BUTTONS; i++)
- editor_el_empty[i] = EL_EMPTY;
+ /* initialize list of empty elements (used for padding, if needed) */
+ for (i = 0; i < ED_NUM_ELEMENTLIST_BUTTONS; i++)
+ editor_el_empty[i] = EL_EMPTY;
- /* do some sanity checks for each element from element list */
- for (i = 0; editor_elements_info[i].setup_value != NULL; i++)
+ /* do some sanity checks for each element from element list */
+ for (i = 0; editor_elements_info[i].setup_value != NULL; i++)
+ {
+ for (j = 0; j < *editor_elements_info[i].element_list_size; j++)
{
- for (j = 0; j < *editor_elements_info[i].element_list_size; j++)
- {
- int element = (*editor_elements_info[i].element_list)[j];
+ int element = (*editor_elements_info[i].element_list)[j];
- if (element >= NUM_FILE_ELEMENTS)
- Error(ERR_WARN, "editor element %d is runtime element", element);
+ if (element >= NUM_FILE_ELEMENTS)
+ Error(ERR_WARN, "editor element %d is runtime element", element);
- if (strcmp(getElementInfoText(element), INFOTEXT_UNKNOWN_ELEMENT) == 0)
- Error(ERR_WARN, "no element description for element %d", element);
- }
+ if (strcmp(getElementInfoText(element), INFOTEXT_UNKNOWN_ELEMENT) == 0)
+ Error(ERR_WARN, "no element description for element %d", element);
}
-
- initialized = TRUE;
}
num_editor_elements = 0;
for (x = 0; x < 3; x++)
DrawMiniGraphicExt(drawto,
gi->x + x * MINI_TILEX, gi->y + y * MINI_TILEY,
- el2edimg(custom_element.content[x][y]));
+ el2edimg(custom_element.content.e[x][y]));
else if (id == ED_DRAWING_ID_CUSTOM_MOVE_ENTER)
DrawMiniGraphicExt(drawto, gi->x, gi->y,
el2edimg(custom_element.move_enter_element));
for (x = 0; x < 3; x++)
DrawMiniGraphicExt(drawto,
gi->x + x * MINI_TILEX, gi->y + y * MINI_TILEY,
- el2edimg(custom_element_change.target_content[x][y]));
+ el2edimg(custom_element_change.target_content.e[x][y]));
else if (id == ED_DRAWING_ID_CUSTOM_CHANGE_TRIGGER)
DrawMiniGraphicExt(drawto, gi->x, gi->y,
el2edimg(custom_element_change.trigger_element));
for (x = 0; x < 3; x++)
DrawMiniGraphicExt(drawto,
gi->x + x * MINI_TILEX, gi->y + y * MINI_TILEY,
- el2edimg(level.yamyam_content[nr][x][y]));
+ el2edimg(level.yamyam_content[nr].e[x][y]));
}
else if (id >= ED_DRAWING_ID_MAGIC_BALL_CONTENT_0 &&
id <= ED_DRAWING_ID_MAGIC_BALL_CONTENT_7)
for (x = 0; x < 3; x++)
DrawMiniGraphicExt(drawto,
gi->x + x * MINI_TILEX, gi->y + y * MINI_TILEY,
- el2edimg(level.ball_content[nr][x][y]));
+ el2edimg(level.ball_content[nr].e[x][y]));
}
}
struct GadgetInfo *gi_down = level_editor_gadget[gadget_id_down];
struct GadgetInfo *gi_text = level_editor_gadget[gadget_id_text];
struct GadgetInfo *gi_up = level_editor_gadget[gadget_id_up];
-#if 0
- char infotext[MAX_OUTPUT_LINESIZE + 1];
- int max_infotext_len = getMaxInfoTextLength();
- int xoffset_left = 0;
- int yoffset_left = ED_BORDER_SIZE;
- int xoffset_right = getCounterGadgetWidth();
- int yoffset_right = ED_BORDER_SIZE;
-#else
int xoffset_left = getTextWidthForGadget(counterbutton_info[id].text_left);
int xoffset_right = ED_GADGET_TEXT_DISTANCE;
int yoffset_above = MINI_TILEX + ED_GADGET_DISTANCE;
int y_above = gi_down->y - yoffset_above;
int x = gi_down->x;
int y; /* set after gadget position was modified */
-#endif
- /* set position for "value1/value2" counter gadgets (score in most cases) */
- if (id == ED_COUNTER_ID_ELEMENT_VALUE1 ||
- id == ED_COUNTER_ID_ELEMENT_VALUE2)
+ /* counter limits must be changed first to prevent value truncation */
+ ModifyEditorCounterLimits(id, counterbutton_info[id].min_value,
+ counterbutton_info[id].max_value);
+
+ ModifyEditorCounterValue(id, *counterbutton_info[id].value);
+
+ /* set position for "value[1,2,3,4]" counter gadgets (score in most cases) */
+ if (id >= ED_COUNTER_ID_ELEMENT_VALUE1 &&
+ id <= ED_COUNTER_ID_ELEMENT_VALUE4)
{
ModifyGadget(gi_down, GDI_Y, SY + counterbutton_info[id].y, GDI_END);
ModifyGadget(gi_text, GDI_Y, SY + counterbutton_info[id].y, GDI_END);
if (counterbutton_info[id].text_right)
DrawText(x_right, y, counterbutton_info[id].text_right, FONT_TEXT_1);
- ModifyEditorCounter(id, *counterbutton_info[id].value);
-
MapGadget(gi_down);
MapGadget(gi_text);
MapGadget(gi_up);
static void copy_custom_element_settings(int element_from, int element_to)
{
-#if 0
- struct ElementInfo ei_to_old = element_info[element_to];
- struct ElementInfo *ei_from = &element_info[element_from];
- struct ElementInfo *ei_to = &element_info[element_to];
- int i;
-
- /* ---------- copy whole element structure ---------- */
- *ei_to = *ei_from;
-
- /* ---------- restore structure pointers which cannot be copied ---------- */
- ei_to->token_name = ei_to_old.token_name;
- ei_to->class_name = ei_to_old.class_name;
- ei_to->editor_description = ei_to_old.editor_description;
- ei_to->custom_description = ei_to_old.custom_description;
- ei_to->change_page = ei_to_old.change_page;
- ei_to->change = ei_to_old.change;
- ei_to->group = ei_to_old.group;
-
- /* ---------- copy element base properties ---------- */
- Properties[element_to][EP_BITFIELD_BASE] =
- Properties[element_from][EP_BITFIELD_BASE];
-
- /* ---------- reinitialize and copy change pages ---------- */
- setElementChangePages(ei_to, ei_to->num_change_pages);
-
- for (i=0; i < ei_to->num_change_pages; i++)
- ei_to->change_page[i] = ei_from->change_page[i];
-
- /* ---------- copy group element info ---------- */
- if (ei_from->group != NULL && ei_to->group != NULL) /* group or internal */
- *ei_to->group = *ei_from->group;
-
-#else
-
struct ElementInfo *ei_from = &element_info[element_from];
struct ElementInfo *ei_to = &element_info[element_to];
int i, x, y;
ei_to->access_direction = ei_from->access_direction;
- ei_to->collect_score = ei_from->collect_score;
- ei_to->collect_count = ei_from->collect_count;
+ ei_to->collect_score_initial = ei_from->collect_score_initial;
+ ei_to->collect_count_initial = ei_from->collect_count_initial;
ei_to->push_delay_fixed = ei_from->push_delay_fixed;
ei_to->push_delay_random = ei_from->push_delay_random;
for (y = 0; y < 3; y++)
for (x = 0; x < 3; x++)
- ei_to->content[x][y] = ei_from->content[x][y];
+ ei_to->content.e[x][y] = ei_from->content.e[x][y];
ei_to->explosion_type = ei_from->explosion_type;
ei_to->explosion_delay = ei_from->explosion_delay;
if (ei_from->group != NULL && ei_to->group != NULL) /* group or internal */
*ei_to->group = *ei_from->group;
-#endif
-
/* mark this custom element as modified */
ei_to->modified_settings = TRUE;
}
for (y = 0; y < 3; y++)
for (x = 0; x < 3; x++)
- if (ei->content[x][y] == element_from)
- ei->content[x][y] = element_to;
+ if (ei->content.e[x][y] == element_from)
+ ei->content.e[x][y] = element_to;
for (j = 0; j < ei->num_change_pages; j++)
{
for (y = 0; y < 3; y++)
for (x = 0; x < 3; x++)
- if (change->target_content[x][y] == element_from)
- change->target_content[x][y] = element_to;
+ if (change->target_content.e[x][y] == element_from)
+ change->target_content.e[x][y] = element_to;
}
if (ei->group != NULL) /* group or internal */
DONT_COLLIDE_WITH(element) ||
DONT_RUN_INTO(element));
-#if 0
- /* set explosion type selectbox help value */
- custom_element.explosion_type =
- (
-#if 0
- IS_INDESTRUCTIBLE(element) ? EP_INDESTRUCTIBLE :
-#endif
- CAN_EXPLODE_1X1(element) ? EP_CAN_EXPLODE_1X1 :
- CAN_EXPLODE_3X3(element) ? EP_CAN_EXPLODE_3X3 :
- CAN_EXPLODE_CROSS(element) ? EP_CAN_EXPLODE_CROSS :
- custom_element.explosion_type);
- custom_element_properties[EP_CAN_EXPLODE_AT_ALL] =
- (
-#if 0
- IS_INDESTRUCTIBLE(element) ||
-#endif
- CAN_EXPLODE_1X1(element) ||
- CAN_EXPLODE_3X3(element) ||
- CAN_EXPLODE_CROSS(element));
-#endif
-
-#if 0
- /* special case: sub-settings dependent from main setting */
-#if 0
- custom_element.can_explode_by_fire = CAN_EXPLODE_BY_FIRE(element);
- custom_element.can_explode_smashed = CAN_EXPLODE_SMASHED(element);
- custom_element.can_explode_impact = CAN_EXPLODE_IMPACT(element);
-#else
- if (CAN_EXPLODE_BY_FIRE(element))
- custom_element.can_explode_by_fire = TRUE;
- if (CAN_EXPLODE_SMASHED(element))
- custom_element.can_explode_smashed = TRUE;
- if (CAN_EXPLODE_IMPACT(element))
- custom_element.can_explode_impact = TRUE;
-#endif
-#endif
-
/* ---------- element settings: advanced (custom elements) --------------- */
/* set "change by direct action" selectbox help value */
HAS_CHANGE_EVENT(element, CE_BLOCKED) ? CE_BLOCKED :
HAS_CHANGE_EVENT(element, CE_IMPACT) ? CE_IMPACT :
HAS_CHANGE_EVENT(element, CE_SMASHED) ? CE_SMASHED :
+ HAS_CHANGE_EVENT(element, CE_COUNT_AT_ZERO) ? CE_COUNT_AT_ZERO :
custom_element_change.direct_action);
/* set "change by other element action" selectbox help value */
custom_element_change.other_action =
- (HAS_CHANGE_EVENT(element, CE_OTHER_GETS_TOUCHED) ? CE_OTHER_GETS_TOUCHED :
- HAS_CHANGE_EVENT(element, CE_OTHER_GETS_PRESSED) ? CE_OTHER_GETS_PRESSED :
- HAS_CHANGE_EVENT(element, CE_OTHER_GETS_PUSHED) ? CE_OTHER_GETS_PUSHED :
- HAS_CHANGE_EVENT(element, CE_OTHER_GETS_ENTERED) ? CE_OTHER_GETS_ENTERED :
- HAS_CHANGE_EVENT(element, CE_OTHER_GETS_LEFT) ? CE_OTHER_GETS_LEFT :
- HAS_CHANGE_EVENT(element, CE_OTHER_GETS_DIGGED) ? CE_OTHER_GETS_DIGGED :
- HAS_CHANGE_EVENT(element, CE_OTHER_GETS_COLLECTED) ? CE_OTHER_GETS_COLLECTED :
- HAS_CHANGE_EVENT(element, CE_OTHER_GETS_DROPPED) ? CE_OTHER_GETS_DROPPED :
- HAS_CHANGE_EVENT(element, CE_OTHER_IS_TOUCHING) ? CE_OTHER_IS_TOUCHING :
- HAS_CHANGE_EVENT(element, CE_OTHER_IS_HITTING) ? CE_OTHER_IS_HITTING :
- HAS_CHANGE_EVENT(element, CE_OTHER_GETS_HIT) ? CE_OTHER_GETS_HIT :
- HAS_CHANGE_EVENT(element, CE_OTHER_IS_SWITCHING) ? CE_OTHER_IS_SWITCHING :
- HAS_CHANGE_EVENT(element, CE_OTHER_IS_CHANGING) ? CE_OTHER_IS_CHANGING :
- HAS_CHANGE_EVENT(element, CE_OTHER_IS_EXPLODING) ? CE_OTHER_IS_EXPLODING :
+ (HAS_CHANGE_EVENT(element, CE_PLAYER_TOUCHES_X) ? CE_PLAYER_TOUCHES_X :
+ HAS_CHANGE_EVENT(element, CE_PLAYER_PRESSES_X) ? CE_PLAYER_PRESSES_X :
+ HAS_CHANGE_EVENT(element, CE_PLAYER_PUSHES_X) ? CE_PLAYER_PUSHES_X :
+ HAS_CHANGE_EVENT(element, CE_PLAYER_ENTERS_X) ? CE_PLAYER_ENTERS_X :
+ HAS_CHANGE_EVENT(element, CE_PLAYER_LEAVES_X) ? CE_PLAYER_LEAVES_X :
+ HAS_CHANGE_EVENT(element, CE_PLAYER_DIGS_X) ? CE_PLAYER_DIGS_X :
+ HAS_CHANGE_EVENT(element, CE_PLAYER_COLLECTS_X) ? CE_PLAYER_COLLECTS_X :
+ HAS_CHANGE_EVENT(element, CE_PLAYER_DROPS_X) ? CE_PLAYER_DROPS_X :
+ HAS_CHANGE_EVENT(element, CE_TOUCHING_X) ? CE_TOUCHING_X :
+ HAS_CHANGE_EVENT(element, CE_HITTING_X) ? CE_HITTING_X :
+ HAS_CHANGE_EVENT(element, CE_HIT_BY_X) ? CE_HIT_BY_X :
+ HAS_CHANGE_EVENT(element, CE_SWITCH_OF_X) ? CE_SWITCH_OF_X :
+ HAS_CHANGE_EVENT(element, CE_CHANGE_OF_X) ? CE_CHANGE_OF_X :
+ HAS_CHANGE_EVENT(element, CE_EXPLOSION_OF_X) ? CE_EXPLOSION_OF_X :
+ HAS_CHANGE_EVENT(element, CE_COUNT_AT_ZERO_OF_X) ? CE_COUNT_AT_ZERO_OF_X :
custom_element_change.other_action);
}
static void CopyClassicElementPropertiesToEditor(int element)
{
-#if 1
if (ELEM_IS_PLAYER(element) || COULD_MOVE_INTO_ACID(element))
custom_element_properties[EP_CAN_MOVE_INTO_ACID] =
getMoveIntoAcidProperty(&level, element);
if (MAYBE_DONT_COLLIDE_WITH(element))
custom_element_properties[EP_DONT_COLLIDE_WITH] =
getDontCollideWithProperty(&level, element);
-#else
-
- if (COULD_MOVE_INTO_ACID(element))
- {
- int bit_nr = get_special_property_bit(element, EP_CAN_MOVE_INTO_ACID);
-
- if (bit_nr > -1)
- custom_element_properties[EP_CAN_MOVE_INTO_ACID] =
- ((level.can_move_into_acid_bits & (1 << bit_nr)) != 0);
- }
-#endif
}
static void CopyElementPropertiesToEditor(int element)
{
int i;
int access_type_and_layer;
-#if 0
- boolean can_explode;
-#endif
/* mark that this custom element has been modified */
custom_element.modified_settings = TRUE;
custom_element_properties[custom_element.deadliness] =
custom_element_properties[EP_DEADLY];
-#if 0
- /* set explosion type property from checkbox and selectbox */
-#if 0
- custom_element_properties[EP_INDESTRUCTIBLE] = FALSE;
-#endif
- custom_element_properties[EP_CAN_EXPLODE_1X1] = FALSE;
- custom_element_properties[EP_CAN_EXPLODE_3X3] = FALSE;
- custom_element_properties[EP_CAN_EXPLODE_CROSS] = FALSE;
- custom_element_properties[EP_CAN_EXPLODE_BY_FIRE] = FALSE;
- custom_element_properties[EP_CAN_EXPLODE_SMASHED] = FALSE;
- custom_element_properties[EP_CAN_EXPLODE_IMPACT] = FALSE;
- custom_element_properties[custom_element.explosion_type] =
- custom_element_properties[EP_CAN_EXPLODE_AT_ALL];
-#endif
-
-#if 0
- /* special case: sub-settings dependent from main setting */
-#if 0
- can_explode = (custom_element_properties[EP_CAN_EXPLODE_1X1] ||
- custom_element_properties[EP_CAN_EXPLODE_3X3] ||
- custom_element_properties[EP_CAN_EXPLODE_CROSS]);
- custom_element_properties[EP_CAN_EXPLODE_BY_FIRE] =
- (can_explode && custom_element.can_explode_by_fire);
- custom_element_properties[EP_CAN_EXPLODE_SMASHED] =
- (can_explode && custom_element.can_explode_smashed);
- custom_element_properties[EP_CAN_EXPLODE_IMPACT] =
- (can_explode && custom_element.can_explode_impact);
-#else
- if (custom_element_properties[EP_CAN_EXPLODE_1X1] ||
- custom_element_properties[EP_CAN_EXPLODE_3X3] ||
- custom_element_properties[EP_CAN_EXPLODE_CROSS])
- {
- custom_element_properties[EP_CAN_EXPLODE_BY_FIRE] =
- custom_element.can_explode_by_fire;
- custom_element_properties[EP_CAN_EXPLODE_SMASHED] =
- custom_element.can_explode_smashed;
- custom_element_properties[EP_CAN_EXPLODE_IMPACT] =
- custom_element.can_explode_impact;
- }
-#endif
-#endif
-
/* ---------- element settings: advanced (custom elements) --------------- */
/* set player change event from checkbox and selectbox */
custom_element_change_events[CE_BLOCKED] = FALSE;
custom_element_change_events[CE_IMPACT] = FALSE;
custom_element_change_events[CE_SMASHED] = FALSE;
+ custom_element_change_events[CE_COUNT_AT_ZERO] = FALSE;
custom_element_change_events[custom_element_change.direct_action] =
custom_element_change_events[CE_BY_DIRECT_ACTION];
/* set other element action change event from checkbox and selectbox */
- custom_element_change_events[CE_OTHER_GETS_TOUCHED] = FALSE;
- custom_element_change_events[CE_OTHER_GETS_PRESSED] = FALSE;
- custom_element_change_events[CE_OTHER_GETS_PUSHED] = FALSE;
- custom_element_change_events[CE_OTHER_GETS_ENTERED] = FALSE;
- custom_element_change_events[CE_OTHER_GETS_LEFT] = FALSE;
- custom_element_change_events[CE_OTHER_GETS_DIGGED] = FALSE;
- custom_element_change_events[CE_OTHER_GETS_COLLECTED] = FALSE;
- custom_element_change_events[CE_OTHER_GETS_DROPPED] = FALSE;
- custom_element_change_events[CE_OTHER_IS_TOUCHING] = FALSE;
- custom_element_change_events[CE_OTHER_IS_HITTING] = FALSE;
- custom_element_change_events[CE_OTHER_GETS_HIT] = FALSE;
- custom_element_change_events[CE_OTHER_IS_SWITCHING] = FALSE;
- custom_element_change_events[CE_OTHER_IS_CHANGING] = FALSE;
- custom_element_change_events[CE_OTHER_IS_EXPLODING] = FALSE;
+ custom_element_change_events[CE_PLAYER_TOUCHES_X] = FALSE;
+ custom_element_change_events[CE_PLAYER_PRESSES_X] = FALSE;
+ custom_element_change_events[CE_PLAYER_PUSHES_X] = FALSE;
+ custom_element_change_events[CE_PLAYER_ENTERS_X] = FALSE;
+ custom_element_change_events[CE_PLAYER_LEAVES_X] = FALSE;
+ custom_element_change_events[CE_PLAYER_DIGS_X] = FALSE;
+ custom_element_change_events[CE_PLAYER_COLLECTS_X] = FALSE;
+ custom_element_change_events[CE_PLAYER_DROPS_X] = FALSE;
+ custom_element_change_events[CE_TOUCHING_X] = FALSE;
+ custom_element_change_events[CE_HITTING_X] = FALSE;
+ custom_element_change_events[CE_HIT_BY_X] = FALSE;
+ custom_element_change_events[CE_SWITCH_OF_X] = FALSE;
+ custom_element_change_events[CE_CHANGE_OF_X] = FALSE;
+ custom_element_change_events[CE_EXPLOSION_OF_X] = FALSE;
+ custom_element_change_events[CE_COUNT_AT_ZERO_OF_X] = FALSE;
custom_element_change_events[custom_element_change.other_action] =
custom_element_change_events[CE_BY_OTHER_ACTION];
static void CopyClassicElementPropertiesToGame(int element)
{
-#if 1
if (ELEM_IS_PLAYER(element) || COULD_MOVE_INTO_ACID(element))
setMoveIntoAcidProperty(&level, element,
custom_element_properties[EP_CAN_MOVE_INTO_ACID]);
if (MAYBE_DONT_COLLIDE_WITH(element))
setDontCollideWithProperty(&level, element,
custom_element_properties[EP_DONT_COLLIDE_WITH]);
-#else
-
- if (COULD_MOVE_INTO_ACID(element))
- {
- int bit_nr = get_special_property_bit(element, EP_CAN_MOVE_INTO_ACID);
-
- if (bit_nr > -1)
- {
- level.can_move_into_acid_bits &= ~(1 << bit_nr);
-
- if (custom_element_properties[EP_CAN_MOVE_INTO_ACID])
- level.can_move_into_acid_bits |= (1 << bit_nr);
- }
- }
-#endif
}
static void CopyElementPropertiesToGame(int element)
BlitBitmap(graphic_info[IMG_GLOBAL_DOOR].bitmap, drawto,
DOOR_GFX_PAGEX6, DOOR_GFX_PAGEY1, DXSIZE, DYSIZE, DX, DY);
-#if 0
- /* draw mouse button brush elements */
- RedrawDrawingElements();
-#endif
-
/* draw bigger door */
DrawSpecialEditorDoor();
redraw_mask |= REDRAW_ALL;
ReinitializeElementListButtons(); /* custom element may look different */
-#if 0
- ModifyEditorElementList(); /* may be needed for custom elements */
-#endif
UnmapTapeButtons();
MapControlButtons();
GDI_SCROLLBAR_ITEM_POSITION, item_position, GDI_END);
}
-static void ModifyEditorCounter(int counter_id, int new_value)
+static void ModifyEditorCounterValue(int counter_id, int new_value)
{
int *counter_value = counterbutton_info[counter_id].value;
int gadget_id = counterbutton_info[counter_id].gadget_id_text;
int y = SY + ED_AREA_MAGIC_BALL_CONTENT_YPOS(0) + ED_BORDER_AREA_YSIZE;
int i;
- for (i = 0; i < NUM_MAGIC_BALL_CONTENTS; i++)
+ for (i = 0; i < MAX_ELEMENT_CONTENTS; i++)
MapDrawingArea(ED_DRAWING_ID_MAGIC_BALL_CONTENT_0 + i);
DrawText(x, y + 0 * MINI_TILEY, "generated", FONT_TEXT_1);
static boolean PrintInfoText(char *text, int font_nr, int start_line)
{
int font_height = getFontHeight(font_nr);
- int pad_x = ED_SETTINGS_XPOS(0);
- int pad_y = ED_SETTINGS_YPOS(0) + ED_BORDER_SIZE;
+ int pad_x = ED_ELEMENT_SETTINGS_XPOS(0);
+ int pad_y = ED_ELEMENT_SETTINGS_YPOS(0) + ED_BORDER_SIZE;
int sx = SX + pad_x;
int sy = SY + pad_y;
int max_lines_per_screen = (SYSIZE - pad_y) / font_height - 1;
return TRUE;
}
-#if 1
-
static int PrintElementDescriptionFromFile(char *filename, int start_line)
{
int font_nr = FONT_TEXT_2;
int font_width = getFontWidth(font_nr);
int font_height = getFontHeight(font_nr);
- int pad_x = ED_SETTINGS_XPOS(0);
- int pad_y = ED_SETTINGS_YPOS(0) + ED_BORDER_SIZE;
+ int pad_x = ED_ELEMENT_SETTINGS_XPOS(0);
+ int pad_y = ED_ELEMENT_SETTINGS_YPOS(0) + ED_BORDER_SIZE;
int sx = SX + pad_x;
int sy = SY + pad_y + start_line * font_height;
int max_chars_per_line = (SXSIZE - 2 * pad_x) / font_width;
max_lines_per_screen);
}
-#else
-
-static int PrintElementDescriptionFromFile(char *filename, int start_line)
-{
- int font_nr = FONT_TEXT_2;
- int font_width = getFontWidth(font_nr);
- int font_height = getFontHeight(font_nr);
- int pad_x = ED_SETTINGS_XPOS(0);
- int pad_y = ED_SETTINGS_YPOS(0) + ED_BORDER_SIZE;
- int sx = SX + pad_x;
- int sy = SY + pad_y;
- int max_chars_per_line = (SXSIZE - 2 * pad_x) / font_width;
- int max_lines_per_screen = (SYSIZE - pad_y) / font_height - 1;
- int current_line = start_line;
- char line[MAX_LINE_LEN];
- char buffer[max_chars_per_line + 1];
- int buffer_len;
- FILE *file;
-
- if (current_line >= max_lines_per_screen)
- return 0;
-
- if (filename == NULL)
- return 0;
-
- if (!(file = fopen(filename, MODE_READ)))
- return 0;
-
- buffer[0] = '\0';
- buffer_len = 0;
-
- while (!feof(file) && current_line < max_lines_per_screen)
- {
- char *line_ptr;
- boolean last_line_was_empty = TRUE;
-
- /* read next line of input file */
- if (!fgets(line, MAX_LINE_LEN, file))
- break;
-
- /* skip comments (lines directly beginning with '#') */
- if (line[0] == '#')
- continue;
-
- /* cut trailing newline from input line */
- for (line_ptr = line; *line_ptr; line_ptr++)
- {
- if (*line_ptr == '\n' || *line_ptr == '\r')
- {
- *line_ptr = '\0';
- break;
- }
- }
-
- if (strlen(line) == 0) /* special case: force empty line */
- strcpy(line, "\n");
-
- line_ptr = line;
-
- while (*line_ptr && current_line < max_lines_per_screen)
- {
- boolean buffer_filled = RenderLineToBuffer(&line_ptr,
- buffer, &buffer_len,
- last_line_was_empty,
- max_chars_per_line);
- if (buffer_filled)
- {
- DrawText(sx, sy + current_line * font_height, buffer, font_nr);
- current_line++;
-
- last_line_was_empty = (buffer_len == 0);
-
- buffer[0] = '\0';
- buffer_len = 0;
- }
- }
- }
-
- fclose(file);
-
- if (buffer_len > 0 && current_line < max_lines_per_screen)
- {
- DrawText(sx, sy + current_line * font_height, buffer, font_nr);
- current_line++;
- }
-
- return (current_line - start_line);
-}
-
-#endif
-
static void DrawPropertiesTabulatorGadgets()
{
struct GadgetInfo *gd_gi = level_editor_gadget[GADGET_ID_PROPERTIES_INFO];
int font2_nr = FONT_TEXT_2;
int font1_width = getFontWidth(font1_nr);
int font2_height = getFontHeight(font2_nr);
- int pad_x = ED_SETTINGS_XPOS(0);
- int pad_y = ED_SETTINGS_YPOS(0) + ED_BORDER_SIZE;
+ int pad_x = ED_ELEMENT_SETTINGS_XPOS(0);
+ int pad_y = ED_ELEMENT_SETTINGS_YPOS(0) + ED_BORDER_SIZE;
int screen_line = 0;
int i, x, y;
#define TEXT_BALL_DELAY "Element generation delay"
#define TEXT_MOVE_SPEED "Speed of android moving"
#define TEXT_CLONE_SPEED "Speed of android cloning"
+#define TEXT_GAME_OF_LIFE_1 "Min neighbours to survive"
+#define TEXT_GAME_OF_LIFE_2 "Max neighbours to survive"
+#define TEXT_GAME_OF_LIFE_3 "Min neighbours to create"
+#define TEXT_GAME_OF_LIFE_4 "Max neighbours to create"
+#define TEXT_TIME_BONUS "Extra time to solve level"
static struct
{
{ EL_KEY_2, &level.score[SC_KEY], TEXT_COLLECTING },
{ EL_KEY_3, &level.score[SC_KEY], TEXT_COLLECTING },
{ EL_KEY_4, &level.score[SC_KEY], TEXT_COLLECTING },
-#if 1
{ EL_EM_KEY_1, &level.score[SC_KEY], TEXT_COLLECTING },
{ EL_EM_KEY_2, &level.score[SC_KEY], TEXT_COLLECTING },
{ EL_EM_KEY_3, &level.score[SC_KEY], TEXT_COLLECTING },
{ EL_EM_KEY_4, &level.score[SC_KEY], TEXT_COLLECTING },
-#else
- { EL_EM_KEY_1_FILE, &level.score[SC_KEY], TEXT_COLLECTING },
- { EL_EM_KEY_2_FILE, &level.score[SC_KEY], TEXT_COLLECTING },
- { EL_EM_KEY_3_FILE, &level.score[SC_KEY], TEXT_COLLECTING },
- { EL_EM_KEY_4_FILE, &level.score[SC_KEY], TEXT_COLLECTING },
-#endif
- { EL_EM_KEY_5, &level.score[SC_KEY], TEXT_COLLECTING },
- { EL_EM_KEY_6, &level.score[SC_KEY], TEXT_COLLECTING },
- { EL_EM_KEY_7, &level.score[SC_KEY], TEXT_COLLECTING },
- { EL_EM_KEY_8, &level.score[SC_KEY], TEXT_COLLECTING },
+ { EL_EMC_KEY_5, &level.score[SC_KEY], TEXT_COLLECTING },
+ { EL_EMC_KEY_6, &level.score[SC_KEY], TEXT_COLLECTING },
+ { EL_EMC_KEY_7, &level.score[SC_KEY], TEXT_COLLECTING },
+ { EL_EMC_KEY_8, &level.score[SC_KEY], TEXT_COLLECTING },
{ EL_AMOEBA_WET, &level.amoeba_speed, TEXT_AMOEBA_SPEED },
{ EL_AMOEBA_DRY, &level.amoeba_speed, TEXT_AMOEBA_SPEED },
{ EL_AMOEBA_FULL, &level.amoeba_speed, TEXT_AMOEBA_SPEED },
{ EL_BD_AMOEBA, &level.amoeba_speed, TEXT_AMOEBA_SPEED },
{ EL_MAGIC_WALL, &level.time_magic_wall, TEXT_DURATION },
+ { EL_BD_MAGIC_WALL, &level.time_magic_wall, TEXT_DURATION },
{ EL_ROBOT_WHEEL, &level.time_wheel, TEXT_DURATION },
+#if 1
+ { EL_TIMEGATE_SWITCH, &level.time_timegate, TEXT_DURATION },
+ { 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_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 },
+ { EL_GAME_OF_LIFE, &level.game_of_life[1], TEXT_GAME_OF_LIFE_2 },
+ { EL_GAME_OF_LIFE, &level.game_of_life[2], TEXT_GAME_OF_LIFE_3 },
+ { EL_GAME_OF_LIFE, &level.game_of_life[3], TEXT_GAME_OF_LIFE_4 },
+ { EL_BIOMAZE, &level.biomaze[0], TEXT_GAME_OF_LIFE_1 },
+ { EL_BIOMAZE, &level.biomaze[1], TEXT_GAME_OF_LIFE_2 },
+ { EL_BIOMAZE, &level.biomaze[2], TEXT_GAME_OF_LIFE_3 },
+ { EL_BIOMAZE, &level.biomaze[3], TEXT_GAME_OF_LIFE_4 },
+#endif
+
#if 1
{ EL_EMC_ANDROID, &level.android_move_time, TEXT_MOVE_SPEED },
{ EL_EMC_ANDROID, &level.android_clone_time, TEXT_CLONE_SPEED },
static void DrawPropertiesConfig()
{
- int max_num_element_counters = 2;
+ int max_num_element_counters = 4;
int num_element_counters = 0;
int i;
int counter_id = ED_COUNTER_ID_ELEMENT_VALUE1 + num_element_counters;
counterbutton_info[counter_id].y =
- ED_SETTINGS_YPOS((HAS_CONTENT(properties_element) ? 1 : 0) +
+ ED_ELEMENT_SETTINGS_YPOS((HAS_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)+
counterbutton_info[counter_id].value = elements_with_counter[i].value;
counterbutton_info[counter_id].text_right= elements_with_counter[i].text;
- /* !!! CHANGE THIS FOR CERTAIN ELEMENTS !!! */
- counterbutton_info[counter_id].min_value = MIN_SCORE;
- counterbutton_info[counter_id].max_value = MAX_SCORE;
+ if (properties_element == EL_GAME_OF_LIFE ||
+ properties_element == EL_BIOMAZE)
+ {
+ counterbutton_info[counter_id].min_value = 0; /* min neighbours */
+ counterbutton_info[counter_id].max_value = 8; /* max neighbours */
+ }
+ else
+ {
+ /* !!! CHANGE THIS FOR CERTAIN ELEMENTS !!! */
+ counterbutton_info[counter_id].min_value = MIN_SCORE;
+ counterbutton_info[counter_id].max_value = MAX_SCORE;
+ }
MapCounterButtons(counter_id);
ED_CHECKBUTTON_ID_BLOCK_LAST_FIELD);
MapCheckbuttonGadget(ED_CHECKBUTTON_ID_INSTANT_RELOCATION);
MapCheckbuttonGadget(ED_CHECKBUTTON_ID_CAN_PASS_TO_WALKABLE);
+ MapCheckbuttonGadget(ED_CHECKBUTTON_ID_DOUBLE_SPEED);
}
if (IS_GEM(properties_element))
{
/* set position for checkbutton for "can move into acid" */
checkbutton_info[ED_CHECKBUTTON_ID_CAN_MOVE_INTO_ACID].x =
- ED_SETTINGS_XPOS(IS_CUSTOM_ELEMENT(properties_element) ? 1 : 0);
+ ED_ELEMENT_SETTINGS_XPOS(IS_CUSTOM_ELEMENT(properties_element) ? 1 : 0);
checkbutton_info[ED_CHECKBUTTON_ID_CAN_MOVE_INTO_ACID].y =
- ED_SETTINGS_YPOS(IS_CUSTOM_ELEMENT(properties_element) ? 6 :
+ ED_ELEMENT_SETTINGS_YPOS(IS_CUSTOM_ELEMENT(properties_element) ? 6 :
HAS_CONTENT(properties_element) ? 1 : 0);
MapCheckbuttonGadget(ED_CHECKBUTTON_ID_CAN_MOVE_INTO_ACID);
if (properties_element == EL_SPRING)
MapCheckbuttonGadget(ED_CHECKBUTTON_ID_USE_SPRING_BUG);
+#if 0
+ if (properties_element == EL_BALLOON)
+ MapSelectboxGadget(ED_SELECTBOX_ID_WIND_DIRECTION);
+#endif
+
if (CAN_GROW(properties_element))
{
checkbutton_info[ED_CHECKBUTTON_ID_GROW_INTO_DIGGABLE].y =
- ED_SETTINGS_YPOS(HAS_CONTENT(properties_element) ? 1 : 0);
+ ED_ELEMENT_SETTINGS_YPOS(HAS_CONTENT(properties_element) ? 1 : 0);
MapCheckbuttonGadget(ED_CHECKBUTTON_ID_GROW_INTO_DIGGABLE);
}
int font_nr = FONT_TEXT_1;
int font_width = getFontWidth(font_nr);
int font_height = getFontHeight(font_nr);
- int max_text_width = SXSIZE - x - ED_SETTINGS_XPOS(0);
+ int max_text_width = SXSIZE - x - ED_ELEMENT_SETTINGS_XPOS(0);
int max_chars_per_line = max_text_width / font_width;
char buffer[max_chars_per_line + 1];
}
#define DRAW_CIRCLES_BUTTON_AVAILABLE 0
+
#if DRAW_CIRCLES_BUTTON_AVAILABLE
static void DrawCircle(int from_x, int from_y, int to_x, int to_y,
int element, boolean change_level)
#define CB_BRUSH_TO_LEVEL 2
#define CB_DELETE_OLD_CURSOR 3
#define CB_DUMP_BRUSH 4
+#define CB_DUMP_BRUSH_SMALL 5
static void CopyBrushExt(int from_x, int from_y, int to_x, int to_y,
int button, int mode)
int new_element = BUTTON_ELEMENT(button);
int x, y;
- if (mode == CB_DUMP_BRUSH)
+ if (mode == CB_DUMP_BRUSH ||
+ mode == CB_DUMP_BRUSH_SMALL)
{
if (!draw_with_brush)
{
int element = brush_buffer[x][y];
int element_mapped = element;
-#if 0
- char *element_string = "?";
- int k;
-
- for (k = 0; forum_sketch_element_mapping[k].element != -1; k++)
- {
- if (forum_sketch_element_mapping[k].element == element)
- {
- element_mapped = forum_sketch_element_mapping[k].element_mapped;
- break;
- }
- }
-
- if (IS_CUSTOM_ELEMENT(element))
- element_mapped = EL_CUSTOM_1;
-
- for (k = 0; forum_sketch_element_strings[k].element != -1; k++)
- {
- if (forum_sketch_element_strings[k].element == element_mapped)
- {
- element_string = forum_sketch_element_strings[k].element_string;
- break;
- }
- }
-
- printf("`%s", element_string);
-
-#else
-
if (IS_CUSTOM_ELEMENT(element))
element_mapped = EL_CUSTOM_START;
- else if (element > EL_ENVELOPE_4)
- element_mapped = EL_CHAR_QUESTION; /* change to EL_UNKNOWN ... */
+ else if (IS_GROUP_ELEMENT(element))
+ element_mapped = EL_GROUP_START;
+ else if (element >= NUM_FILE_ELEMENTS)
+ element_mapped = EL_UNKNOWN;
- printf("`%03d", element_mapped);
-#endif
+ printf("%c%03d", (mode == CB_DUMP_BRUSH ? '`' : 'ΒΈ'), element_mapped);
}
printf("\n");
CopyBrushExt(0, 0, 0, 0, 0, CB_DUMP_BRUSH);
}
+void DumpBrush_Small()
+{
+ CopyBrushExt(0, 0, 0, 0, 0, CB_DUMP_BRUSH_SMALL);
+}
+
static void FloodFill(int from_x, int from_y, int fill_element)
{
int i,x,y;
if (!started_inside_drawing_area)
return;
+#if 1
+ if (!IS_VALID_BUTTON(button))
+ return;
+#endif
+
if (!button && !button_release_event)
return;
}
else if (id == GADGET_ID_CUSTOM_CONTENT)
{
- custom_element.content[sx][sy] = new_element;
+ custom_element.content.e[sx][sy] = new_element;
CopyCustomElementPropertiesToGame(properties_element);
}
}
else if (id == GADGET_ID_CUSTOM_CHANGE_CONTENT)
{
- custom_element_change.target_content[sx][sy] = new_element;
+ custom_element_change.target_content.e[sx][sy] = new_element;
CopyCustomElementPropertiesToGame(properties_element);
}
random_placement_background_element = new_element;
else if (id >= GADGET_ID_YAMYAM_CONTENT_0 &&
id <= GADGET_ID_YAMYAM_CONTENT_7)
- level.yamyam_content[id - GADGET_ID_YAMYAM_CONTENT_0][sx][sy] =
+ level.yamyam_content[id - GADGET_ID_YAMYAM_CONTENT_0].e[sx][sy] =
new_element;
else if (id >= GADGET_ID_MAGIC_BALL_CONTENT_0 &&
id <= GADGET_ID_MAGIC_BALL_CONTENT_7)
- level.ball_content[id - GADGET_ID_MAGIC_BALL_CONTENT_0][sx][sy] =
+ level.ball_content[id - GADGET_ID_MAGIC_BALL_CONTENT_0].e[sx][sy] =
new_element;
}
break;
else if (id == GADGET_ID_CUSTOM_GRAPHIC)
PickDrawingElement(button, custom_element.gfx_element);
else if (id == GADGET_ID_CUSTOM_CONTENT)
- PickDrawingElement(button, custom_element.content[sx][sy]);
+ PickDrawingElement(button, custom_element.content.e[sx][sy]);
else if (id == GADGET_ID_CUSTOM_MOVE_ENTER)
PickDrawingElement(button, custom_element.move_enter_element);
else if (id == GADGET_ID_CUSTOM_MOVE_LEAVE)
else if (id == GADGET_ID_CUSTOM_CHANGE_TARGET)
PickDrawingElement(button, custom_element_change.target_element);
else if (id == GADGET_ID_CUSTOM_CHANGE_CONTENT)
- PickDrawingElement(button, custom_element_change.target_content[sx][sy]);
+ PickDrawingElement(button, custom_element_change.target_content.e[sx][sy]);
else if (id == GADGET_ID_CUSTOM_CHANGE_TRIGGER)
PickDrawingElement(button, custom_element_change.trigger_element);
else if (id == GADGET_ID_GROUP_CONTENT)
{
int i = id - GADGET_ID_YAMYAM_CONTENT_0;
- PickDrawingElement(button, level.yamyam_content[i][sx][sy]);
+ PickDrawingElement(button, level.yamyam_content[i].e[sx][sy]);
}
else if (id >= GADGET_ID_MAGIC_BALL_CONTENT_0 &&
id <= GADGET_ID_MAGIC_BALL_CONTENT_7)
{
int i = id - GADGET_ID_MAGIC_BALL_CONTENT_0;
- PickDrawingElement(button, level.ball_content[i][sx][sy]);
+ PickDrawingElement(button, level.ball_content[i].e[sx][sy]);
}
break;
if ((level_changed && pressed) || (!level_changed && released))
return;
- if (level_changed && !Request("Level has changed! Discard changes ?",
+ if (level_changed && !Request("Level has changed ! Discard changes ?",
REQ_ASK))
{
if (gadget_id == counterbutton_info[counter_id].gadget_id_text)
- ModifyEditorCounter(counter_id, *counter_value);
+ ModifyEditorCounterValue(counter_id, *counter_value);
return;
}
if (gadget_id == counterbutton_info[counter_id].gadget_id_text)
*counter_value = gi->textinput.number_value;
else
- ModifyEditorCounter(counter_id, *counter_value + step);
+ ModifyEditorCounterValue(counter_id, *counter_value + step);
if (counter_id == ED_COUNTER_ID_SELECT_LEVEL)
{
int new_element = BUTTON_ELEMENT(button);
int x, y;
+#if 0
+ /* MAKES PROBLEMS WITH ELEMENT LIST SCROLLBAR AND IS PROBABLY NOT NEEDED */
+ /* !!! CHECK WHAT HAPPENS WHEN MOUSE WHEEL IS USED OVER ELEMENT LIST !!! */
+
+ if (!IS_VALID_BUTTON(button))
+ return;
+#endif
+
if (edit_mode == ED_MODE_DRAWING && drawing_function == GADGET_ID_TEXT)
DrawLevelText(0, 0, 0, TEXT_END);
DrawCompleteVideoDisplay();
- if (setup.autorecord)
- TapeStartRecording();
-
level_editor_test_game = TRUE;
- game_status = GAME_MODE_PLAYING;
- InitGame();
+ StartGameActions(FALSE, setup.autorecord, NEW_RANDOMIZE);
}
break;
break;
}
-#if 1
if (actual_drawing_function == GADGET_ID_PICK_ELEMENT)
sprintf(infotext, "%s: %d, %d", text, lx, ly);
else
sprintf(infotext, "%s: %d, %d", text,
ABS(lx - start_lx) + 1, ABS(ly - start_ly) + 1);
-#else
- if (actual_drawing_function == GADGET_ID_PICK_ELEMENT)
- DrawTextF(INFOTEXT_XPOS - SX, INFOTEXT_YPOS - SY, FONT_TEXT_2,
- "%s: %d, %d", infotext, lx, ly);
- else
- DrawTextF(INFOTEXT_XPOS - SX, INFOTEXT_YPOS - SY, FONT_TEXT_2,
- "%s: %d, %d", infotext,
- ABS(lx - start_lx) + 1, ABS(ly - start_ly) + 1);
-#endif
}
-#if 1
else if (actual_drawing_function == GADGET_ID_PICK_ELEMENT)
strncpy(infotext, getElementInfoText(Feld[lx][ly]), max_infotext_len);
else
sprintf(infotext, "Level position: %d, %d", lx, ly);
-#else
- else if (actual_drawing_function == GADGET_ID_PICK_ELEMENT)
- DrawTextF(INFOTEXT_XPOS - SX, INFOTEXT_YPOS - SY, FONT_TEXT_2,
- "%s", getElementInfoText(Feld[lx][ly]));
- else
- DrawTextF(INFOTEXT_XPOS - SX, INFOTEXT_YPOS - SY, FONT_TEXT_2,
- "Level position: %d, %d", lx, ly);
-#endif
}
/* misuse this function to draw brush cursor, if needed */
else if (id == GADGET_ID_CUSTOM_GRAPHIC)
element = custom_element.gfx_element;
else if (id == GADGET_ID_CUSTOM_CONTENT)
- element = custom_element.content[sx][sy];
+ element = custom_element.content.e[sx][sy];
else if (id == GADGET_ID_CUSTOM_MOVE_ENTER)
element = custom_element.move_enter_element;
else if (id == GADGET_ID_CUSTOM_MOVE_LEAVE)
else if (id == GADGET_ID_CUSTOM_CHANGE_TARGET)
element = custom_element_change.target_element;
else if (id == GADGET_ID_CUSTOM_CHANGE_CONTENT)
- element = custom_element_change.target_content[sx][sy];
+ element = custom_element_change.target_content.e[sx][sy];
else if (id == GADGET_ID_CUSTOM_CHANGE_TRIGGER)
element = custom_element_change.trigger_element;
else if (id == GADGET_ID_GROUP_CONTENT)
element = random_placement_background_element;
else if (id >= GADGET_ID_YAMYAM_CONTENT_0 &&
id <= GADGET_ID_YAMYAM_CONTENT_7)
- element = level.yamyam_content[id - GADGET_ID_YAMYAM_CONTENT_0][sx][sy];
+ element = level.yamyam_content[id -GADGET_ID_YAMYAM_CONTENT_0].e[sx][sy];
else if (id >= GADGET_ID_MAGIC_BALL_CONTENT_0 &&
id <= GADGET_ID_MAGIC_BALL_CONTENT_7)
- element = level.ball_content[id -GADGET_ID_MAGIC_BALL_CONTENT_0][sx][sy];
+ element =level.ball_content[id-GADGET_ID_MAGIC_BALL_CONTENT_0].e[sx][sy];
strncpy(infotext, getElementInfoText(element), max_infotext_len);
}
{
if (!ask_if_level_has_changed ||
!LevelChanged() ||
- Request("Level has changed! Exit without saving ?",
+ Request("Level has changed ! Exit without saving ?",
REQ_ASK | REQ_STAY_OPEN))
{
#if 1