#define ED_CTRL1_BUTTONS_GFX_YPOS 236
#define ED_CTRL2_BUTTONS_GFX_YPOS 236
#define ED_CTRL3_BUTTONS_GFX_YPOS 324
+#define ED_CTRL4_BUTTONS_GFX_XPOS 44
+#define ED_CTRL4_BUTTONS_GFX_YPOS 214
#define ED_CTRL1_BUTTONS_ALT_GFX_YPOS 142
#define ED_CTRL3_BUTTONS_ALT_GFX_YPOS 302
#define ED_CTRL3_BUTTON_YSIZE 22
#define ED_CTRL3_BUTTONS_XPOS 6
#define ED_CTRL3_BUTTONS_YPOS 6
+#define ED_CTRL4_BUTTON_XSIZE 22
+#define ED_CTRL4_BUTTON_YSIZE 22
+#define ED_CTRL4_BUTTONS_XPOS 6
+#define ED_CTRL4_BUTTONS_YPOS 6
#define ED_CTRL1_BUTTONS_HORIZ 4
#define ED_CTRL1_BUTTONS_VERT 4
#define ED_CTRL2_BUTTONS_VERT 2
#define ED_CTRL3_BUTTONS_HORIZ 3
#define ED_CTRL3_BUTTONS_VERT 1
+#define ED_CTRL4_BUTTONS_HORIZ 2
+#define ED_CTRL4_BUTTONS_VERT 1
#define ED_NUM_CTRL1_BUTTONS (ED_CTRL1_BUTTONS_HORIZ * ED_CTRL1_BUTTONS_VERT)
#define ED_NUM_CTRL2_BUTTONS (ED_CTRL2_BUTTONS_HORIZ * ED_CTRL2_BUTTONS_VERT)
#define ED_NUM_CTRL3_BUTTONS (ED_CTRL3_BUTTONS_HORIZ * ED_CTRL3_BUTTONS_VERT)
-#define ED_NUM_CTRL1_2_BUTTONS (ED_NUM_CTRL1_BUTTONS + ED_NUM_CTRL2_BUTTONS)
-#define ED_NUM_CTRL_BUTTONS (ED_NUM_CTRL1_BUTTONS + \
- ED_NUM_CTRL2_BUTTONS + \
- ED_NUM_CTRL3_BUTTONS)
+#define ED_NUM_CTRL4_BUTTONS (ED_CTRL4_BUTTONS_HORIZ * ED_CTRL4_BUTTONS_VERT)
+#define ED_NUM_CTRL1_2_BUTTONS (ED_NUM_CTRL1_BUTTONS + ED_NUM_CTRL2_BUTTONS)
+#define ED_NUM_CTRL1_3_BUTTONS (ED_NUM_CTRL1_2_BUTTONS + ED_NUM_CTRL3_BUTTONS)
+#define ED_NUM_CTRL_BUTTONS (ED_NUM_CTRL1_BUTTONS + \
+ ED_NUM_CTRL2_BUTTONS + \
+ ED_NUM_CTRL3_BUTTONS + \
+ ED_NUM_CTRL4_BUTTONS)
/* values for the element list */
#define ED_ELEMENTLIST_XPOS 5
#define ED_ELEMENTLIST_YSIZE 20
#define ED_ELEMENTLIST_BUTTONS_HORIZ 4
#define ED_ELEMENTLIST_BUTTONS_VERT 11
-#define ED_NUM_ELEMENTLIST_BUTTONS (ED_ELEMENTLIST_BUTTONS_HORIZ * \
+#define ED_NUM_ELEMENTLIST_BUTTONS (ED_ELEMENTLIST_BUTTONS_HORIZ * \
ED_ELEMENTLIST_BUTTONS_VERT)
/* standard distances */
#define ED_GADGET_DISTANCE 2
#define ED_GADGET_TEXT_DISTANCE (2 * ED_GADGET_DISTANCE)
-#define ED_DRAWINGAREA_TEXT_DISTANCE (ED_GADGET_TEXT_DISTANCE + \
+#define ED_DRAWINGAREA_TEXT_DISTANCE (ED_GADGET_TEXT_DISTANCE + \
MINI_TILEX / 2)
-/* values for the setting windows */
-#define ED_SETTINGS_XSTART (3 * MINI_TILEX / 2)
-#define ED_SETTINGS_YSTART (MINI_TILEY * 10)
+/* values for the settings windows */
+#define ED_LEVEL_SETTINGS_XSTART (3 * MINI_TILEX / 2)
+#define ED_LEVEL_SETTINGS_YSTART (5 * MINI_TILEY)
-#define ED_XOFFSET_CHECKBOX (ED_CHECKBUTTON_XSIZE + \
+#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
/* values for counter gadgets */
#define ED_COUNTER_YSTART (ED_SETTINGS1_YPOS + 2 * TILEY)
#define ED_COUNTER_YDISTANCE (3 * MINI_TILEY)
-#define ED_COUNTER_YPOS(n) (ED_COUNTER_YSTART + \
+#define ED_COUNTER_YPOS(n) (ED_COUNTER_YSTART + \
(n) * ED_COUNTER_YDISTANCE)
-#define ED_COUNTER2_YPOS(n) (ED_COUNTER_YSTART + \
+#define ED_COUNTER2_YPOS(n) (ED_COUNTER_YSTART + \
(n) * ED_COUNTER_YDISTANCE - 2)
/* values for element content drawing areas */
-/* amoeba content */
-#define ED_AREA_AMOEBA_CONTENT_XPOS ED_SETTINGS_XPOS(0)
-#define ED_AREA_AMOEBA_CONTENT_YPOS (ED_SETTINGS_YPOS(2) + \
+#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_ELEMENT_SETTINGS_XPOS(n))
+#define ED_AREA_3X3_SETTINGS_YPOS(n) (ED_ELEMENT_SETTINGS_YPOS(n) + \
+ ED_GADGET_DISTANCE - MINI_TILEY)
+
/* yamyam content */
-#define ED_AREA_YAMYAM_CONTENT_XPOS(n) (2 * MINI_TILEX + \
+#define ED_AREA_YAMYAM_CONTENT_XPOS(n) (2 * MINI_TILEX + \
5 * ((n) % 4) * MINI_TILEX)
-#define ED_AREA_YAMYAM_CONTENT_YPOS(n) (17 * MINI_TILEY + \
+#define ED_AREA_YAMYAM_CONTENT_YPOS(n) (17 * MINI_TILEY + \
6 * ((n) / 4) * MINI_TILEY)
-/* custom change target */
-#define ED_AREA_ELEM_CONTENT2_YPOS (ED_SETTINGS_YPOS(1) + \
- ED_GADGET_DISTANCE)
-/* optional custom graphic */
-#define ED_AREA_ELEM_CONTENT3_YPOS (ED_SETTINGS_YPOS(1) + \
- ED_GADGET_DISTANCE)
-/* custom element content */
-#define ED_AREA_ELEM_CONTENT4_XPOS (29 * MINI_TILEX)
-#define ED_AREA_ELEM_CONTENT4_YPOS (ED_SETTINGS_YPOS(2) + \
- ED_GADGET_DISTANCE - MINI_TILEY)
-/* movement enter/leave element */
-#define ED_AREA_ELEM_CONTENT4a_XPOS (29 * MINI_TILEX)
-#define ED_AREA_ELEM_CONTENT4a_YPOS (ED_SETTINGS_YPOS(10) + \
- ED_GADGET_DISTANCE)
-#define ED_AREA_ELEM_CONTENT4b_XPOS (29 * MINI_TILEX)
-#define ED_AREA_ELEM_CONTENT4b_YPOS (ED_SETTINGS_YPOS(10) + \
- ED_GADGET_DISTANCE)
-/* custom change trigger element */
-#define ED_AREA_ELEM_CONTENT5_YPOS (ED_SETTINGS_YPOS(5) + \
- ED_GADGET_DISTANCE)
-/* extended custom change target */
-#define ED_AREA_ELEM_CONTENT6_XPOS (29 * MINI_TILEX)
-#define ED_AREA_ELEM_CONTENT6_YPOS (ED_SETTINGS_YPOS(9) + \
- ED_GADGET_DISTANCE - MINI_TILEY)
-/* group element content */
-#define ED_AREA_GROUP_CONTENT_XPOS ED_SETTINGS_XPOS(0)
-#if 1
-#define ED_AREA_GROUP_CONTENT_YPOS (ED_SETTINGS_YPOS(4) + \
- ED_GADGET_DISTANCE)
-#else
-#define ED_AREA_GROUP_CONTENT_YPOS (22 * MINI_TILEY)
-#endif
-
-/* values for random placement background drawing area */
-#define ED_AREA_RANDOM_BACKGROUND_YPOS (31 * MINI_TILEY)
+/* magic ball content */
+#define ED_AREA_MAGIC_BALL_CONTENT_XPOS(n) (2 * MINI_TILEX + \
+ 5 * ((n) % 4) * MINI_TILEX)
+#define ED_AREA_MAGIC_BALL_CONTENT_YPOS(n) (17 * MINI_TILEY + \
+ 6 * ((n) / 4) * MINI_TILEY)
/* values for scrolling gadgets for drawing area */
#define ED_SCROLLBUTTON_XPOS 24
#define ED_SCROLL_LEFT_YPOS (SYSIZE - 2 * ED_SCROLLBUTTON_YSIZE)
#define ED_SCROLL_RIGHT_XPOS (SXSIZE - 2 * ED_SCROLLBUTTON_XSIZE)
#define ED_SCROLL_RIGHT_YPOS ED_SCROLL_LEFT_YPOS
-#define ED_SCROLL_HORIZONTAL_XPOS (ED_SCROLL_LEFT_XPOS + ED_SCROLLBUTTON_XSIZE)
+#define ED_SCROLL_HORIZONTAL_XPOS (ED_SCROLL_LEFT_XPOS + \
+ ED_SCROLLBUTTON_XSIZE)
#define ED_SCROLL_HORIZONTAL_YPOS ED_SCROLL_LEFT_YPOS
#define ED_SCROLL_HORIZONTAL_XSIZE (SXSIZE - 3 * ED_SCROLLBUTTON_XSIZE)
#define ED_SCROLL_HORIZONTAL_YSIZE ED_SCROLLBUTTON_YSIZE
#define ED_SCROLL_VERTICAL_XPOS ED_SCROLL_UP_XPOS
-#define ED_SCROLL_VERTICAL_YPOS (ED_SCROLL_UP_YPOS + ED_SCROLLBUTTON_YSIZE)
+#define ED_SCROLL_VERTICAL_YPOS (ED_SCROLL_UP_YPOS + \
+ ED_SCROLLBUTTON_YSIZE)
#define ED_SCROLL_VERTICAL_XSIZE ED_SCROLLBUTTON_XSIZE
#define ED_SCROLL_VERTICAL_YSIZE (SYSIZE - 4 * ED_SCROLLBUTTON_YSIZE)
#define ED_SCROLL2_UP_XPOS 85
#define ED_SCROLL2_UP_YPOS 30
#define ED_SCROLL2_DOWN_XPOS ED_SCROLL2_UP_XPOS
-#define ED_SCROLL2_DOWN_YPOS (ED_SCROLL2_UP_YPOS + \
- ED_ELEMENTLIST_BUTTONS_VERT * \
- ED_ELEMENTLIST_YSIZE - \
+#define ED_SCROLL2_DOWN_YPOS (ED_SCROLL2_UP_YPOS + \
+ ED_ELEMENTLIST_BUTTONS_VERT * \
+ ED_ELEMENTLIST_YSIZE - \
ED_SCROLLBUTTON2_YSIZE)
#define ED_SCROLL2_VERTICAL_XPOS ED_SCROLL2_UP_XPOS
-#define ED_SCROLL2_VERTICAL_YPOS (ED_SCROLL2_UP_YPOS + \
+#define ED_SCROLL2_VERTICAL_YPOS (ED_SCROLL2_UP_YPOS + \
ED_SCROLLBUTTON2_YSIZE)
#define ED_SCROLL2_VERTICAL_XSIZE ED_SCROLLBUTTON2_XSIZE
-#define ED_SCROLL2_VERTICAL_YSIZE (ED_ELEMENTLIST_BUTTONS_VERT * \
- ED_ELEMENTLIST_YSIZE - \
+#define ED_SCROLL2_VERTICAL_YSIZE (ED_ELEMENTLIST_BUTTONS_VERT * \
+ ED_ELEMENTLIST_YSIZE - \
2 * ED_SCROLLBUTTON2_YSIZE)
/* values for checkbutton gadgets */
#define ED_RADIOBUTTON_YPOS (ED_BUTTON_MINUS_YPOS + 44)
#define ED_STICKYBUTTON_YPOS (ED_BUTTON_MINUS_YPOS + 66)
-/* some positions in the editor control window */
-#define ED_BUTTON_ELEM_XPOS 6
-#define ED_BUTTON_ELEM_YPOS 30
-#define ED_BUTTON_ELEM_XSIZE 22
-#define ED_BUTTON_ELEM_YSIZE 22
+/* values for some special graphic buttons */
+#define ED_COPY_CHANGE_PAGE_XPOS 25
+#define ED_COPY_CHANGE_PAGE_YPOS 50
+#define ED_PASTE_CHANGE_PAGE_XPOS 25
+#define ED_PASTE_CHANGE_PAGE_YPOS 70
/* some values for text input, selectbox and counter gadgets */
#define ED_BUTTON_COUNT_YPOS 60
#define ED_BUTTON_MINUS_YPOS ED_BUTTON_COUNT_YPOS
#define ED_BUTTON_MINUS_XSIZE ED_BUTTON_COUNT_XSIZE
#define ED_BUTTON_MINUS_YSIZE ED_BUTTON_COUNT_YSIZE
-#define ED_BUTTON_PLUS_XPOS (ED_WIN_COUNT_XPOS + \
+#define ED_BUTTON_PLUS_XPOS (ED_WIN_COUNT_XPOS + \
ED_WIN_COUNT_XSIZE + 2)
#define ED_BUTTON_PLUS_YPOS ED_BUTTON_COUNT_YPOS
#define ED_BUTTON_PLUS_XSIZE ED_BUTTON_COUNT_XSIZE
#define ED_BUTTON_PLUS_YSIZE ED_BUTTON_COUNT_YSIZE
#define ED_SELECTBOX_XPOS ED_WIN_COUNT_XPOS
-#define ED_SELECTBOX_YPOS (ED_WIN_COUNT_YPOS + \
+#define ED_SELECTBOX_YPOS (ED_WIN_COUNT_YPOS + \
2 + ED_WIN_COUNT_YSIZE)
#define ED_SELECTBOX_XSIZE ED_WIN_COUNT_XSIZE
#define ED_SELECTBOX_YSIZE ED_WIN_COUNT_YSIZE
#define ED_SELECTBOX_BUTTON_XSIZE 14
#define ED_TEXTBUTTON_XPOS ED_WIN_COUNT_XPOS
-#define ED_TEXTBUTTON_YPOS (ED_WIN_COUNT_YPOS + \
+#define ED_TEXTBUTTON_YPOS (ED_WIN_COUNT_YPOS + \
4 * (2 + ED_WIN_COUNT_YSIZE))
#define ED_TEXTBUTTON_INACTIVE_YPOS ED_TEXTBUTTON_YPOS
#define ED_TEXTBUTTON_TAB_XPOS ED_WIN_COUNT_XPOS
-#define ED_TEXTBUTTON_TAB_YPOS (ED_WIN_COUNT_YPOS + \
+#define ED_TEXTBUTTON_TAB_YPOS (ED_WIN_COUNT_YPOS + \
2 * (2 + ED_WIN_COUNT_YSIZE))
-#define ED_TEXTBUTTON_TAB_INACTIVE_YPOS (ED_WIN_COUNT_YPOS + \
+#define ED_TEXTBUTTON_TAB_INACTIVE_YPOS (ED_WIN_COUNT_YPOS + \
3 * (2 + ED_WIN_COUNT_YSIZE))
#define ED_TEXTBUTTON_XSIZE ED_WIN_COUNT_XSIZE
#define GADGET_ID_CUSTOM_COPY_FROM (GADGET_ID_TOOLBOX_FIRST + 22)
#define GADGET_ID_CUSTOM_COPY_TO (GADGET_ID_TOOLBOX_FIRST + 23)
#define GADGET_ID_CUSTOM_EXCHANGE (GADGET_ID_TOOLBOX_FIRST + 24)
+#define GADGET_ID_CUSTOM_COPY (GADGET_ID_TOOLBOX_FIRST + 25)
+#define GADGET_ID_CUSTOM_PASTE (GADGET_ID_TOOLBOX_FIRST + 26)
/* counter button identifiers */
-#define GADGET_ID_COUNTER_FIRST (GADGET_ID_TOOLBOX_FIRST + 25)
+#define GADGET_ID_COUNTER_FIRST (GADGET_ID_TOOLBOX_FIRST + 27)
#define GADGET_ID_SELECT_LEVEL_DOWN (GADGET_ID_COUNTER_FIRST + 0)
#define GADGET_ID_SELECT_LEVEL_TEXT (GADGET_ID_COUNTER_FIRST + 1)
#define GADGET_ID_LEVEL_TIMESCORE_DOWN (GADGET_ID_COUNTER_FIRST + 18)
#define GADGET_ID_LEVEL_TIMESCORE_TEXT (GADGET_ID_COUNTER_FIRST + 19)
#define GADGET_ID_LEVEL_TIMESCORE_UP (GADGET_ID_COUNTER_FIRST + 20)
-#define GADGET_ID_ELEMENT_SCORE_DOWN (GADGET_ID_COUNTER_FIRST + 21)
-#define GADGET_ID_ELEMENT_SCORE_TEXT (GADGET_ID_COUNTER_FIRST + 22)
-#define GADGET_ID_ELEMENT_SCORE_UP (GADGET_ID_COUNTER_FIRST + 23)
-#define GADGET_ID_ELEMENT_CONTENT_DOWN (GADGET_ID_COUNTER_FIRST + 24)
-#define GADGET_ID_ELEMENT_CONTENT_TEXT (GADGET_ID_COUNTER_FIRST + 25)
-#define GADGET_ID_ELEMENT_CONTENT_UP (GADGET_ID_COUNTER_FIRST + 26)
-#define GADGET_ID_ENVELOPE_XSIZE_DOWN (GADGET_ID_COUNTER_FIRST + 27)
-#define GADGET_ID_ENVELOPE_XSIZE_TEXT (GADGET_ID_COUNTER_FIRST + 28)
-#define GADGET_ID_ENVELOPE_XSIZE_UP (GADGET_ID_COUNTER_FIRST + 29)
-#define GADGET_ID_ENVELOPE_YSIZE_DOWN (GADGET_ID_COUNTER_FIRST + 30)
-#define GADGET_ID_ENVELOPE_YSIZE_TEXT (GADGET_ID_COUNTER_FIRST + 31)
-#define GADGET_ID_ENVELOPE_YSIZE_UP (GADGET_ID_COUNTER_FIRST + 32)
-#define GADGET_ID_CUSTOM_SCORE_DOWN (GADGET_ID_COUNTER_FIRST + 33)
-#define GADGET_ID_CUSTOM_SCORE_TEXT (GADGET_ID_COUNTER_FIRST + 34)
-#define GADGET_ID_CUSTOM_SCORE_UP (GADGET_ID_COUNTER_FIRST + 35)
-#define GADGET_ID_CUSTOM_GEMCOUNT_DOWN (GADGET_ID_COUNTER_FIRST + 36)
-#define GADGET_ID_CUSTOM_GEMCOUNT_TEXT (GADGET_ID_COUNTER_FIRST + 37)
-#define GADGET_ID_CUSTOM_GEMCOUNT_UP (GADGET_ID_COUNTER_FIRST + 38)
-#define GADGET_ID_PUSH_DELAY_FIX_DOWN (GADGET_ID_COUNTER_FIRST + 39)
-#define GADGET_ID_PUSH_DELAY_FIX_TEXT (GADGET_ID_COUNTER_FIRST + 40)
-#define GADGET_ID_PUSH_DELAY_FIX_UP (GADGET_ID_COUNTER_FIRST + 41)
-#define GADGET_ID_PUSH_DELAY_RND_DOWN (GADGET_ID_COUNTER_FIRST + 42)
-#define GADGET_ID_PUSH_DELAY_RND_TEXT (GADGET_ID_COUNTER_FIRST + 43)
-#define GADGET_ID_PUSH_DELAY_RND_UP (GADGET_ID_COUNTER_FIRST + 44)
-#define GADGET_ID_MOVE_DELAY_FIX_DOWN (GADGET_ID_COUNTER_FIRST + 45)
-#define GADGET_ID_MOVE_DELAY_FIX_TEXT (GADGET_ID_COUNTER_FIRST + 46)
-#define GADGET_ID_MOVE_DELAY_FIX_UP (GADGET_ID_COUNTER_FIRST + 47)
-#define GADGET_ID_MOVE_DELAY_RND_DOWN (GADGET_ID_COUNTER_FIRST + 48)
-#define GADGET_ID_MOVE_DELAY_RND_TEXT (GADGET_ID_COUNTER_FIRST + 49)
-#define GADGET_ID_MOVE_DELAY_RND_UP (GADGET_ID_COUNTER_FIRST + 50)
-#define GADGET_ID_EXPLOSION_DELAY_DOWN (GADGET_ID_COUNTER_FIRST + 51)
-#define GADGET_ID_EXPLOSION_DELAY_TEXT (GADGET_ID_COUNTER_FIRST + 52)
-#define GADGET_ID_EXPLOSION_DELAY_UP (GADGET_ID_COUNTER_FIRST + 53)
-#define GADGET_ID_IGNITION_DELAY_DOWN (GADGET_ID_COUNTER_FIRST + 54)
-#define GADGET_ID_IGNITION_DELAY_TEXT (GADGET_ID_COUNTER_FIRST + 55)
-#define GADGET_ID_IGNITION_DELAY_UP (GADGET_ID_COUNTER_FIRST + 56)
-#define GADGET_ID_CHANGE_DELAY_FIX_DOWN (GADGET_ID_COUNTER_FIRST + 57)
-#define GADGET_ID_CHANGE_DELAY_FIX_TEXT (GADGET_ID_COUNTER_FIRST + 58)
-#define GADGET_ID_CHANGE_DELAY_FIX_UP (GADGET_ID_COUNTER_FIRST + 59)
-#define GADGET_ID_CHANGE_DELAY_RND_DOWN (GADGET_ID_COUNTER_FIRST + 60)
-#define GADGET_ID_CHANGE_DELAY_RND_TEXT (GADGET_ID_COUNTER_FIRST + 61)
-#define GADGET_ID_CHANGE_DELAY_RND_UP (GADGET_ID_COUNTER_FIRST + 62)
-#define GADGET_ID_CHANGE_CONT_RND_DOWN (GADGET_ID_COUNTER_FIRST + 63)
-#define GADGET_ID_CHANGE_CONT_RND_TEXT (GADGET_ID_COUNTER_FIRST + 64)
-#define GADGET_ID_CHANGE_CONT_RND_UP (GADGET_ID_COUNTER_FIRST + 65)
-#define GADGET_ID_GROUP_CONTENT_DOWN (GADGET_ID_COUNTER_FIRST + 66)
-#define GADGET_ID_GROUP_CONTENT_TEXT (GADGET_ID_COUNTER_FIRST + 67)
-#define GADGET_ID_GROUP_CONTENT_UP (GADGET_ID_COUNTER_FIRST + 68)
+#define GADGET_ID_ELEMENT_VALUE1_DOWN (GADGET_ID_COUNTER_FIRST + 21)
+#define GADGET_ID_ELEMENT_VALUE1_TEXT (GADGET_ID_COUNTER_FIRST + 22)
+#define GADGET_ID_ELEMENT_VALUE1_UP (GADGET_ID_COUNTER_FIRST + 23)
+#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_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_CUSTOM_VALUE_FIX_DOWN (GADGET_ID_COUNTER_FIRST + 48)
+#define GADGET_ID_CUSTOM_VALUE_FIX_TEXT (GADGET_ID_COUNTER_FIRST + 49)
+#define GADGET_ID_CUSTOM_VALUE_FIX_UP (GADGET_ID_COUNTER_FIRST + 50)
+#define GADGET_ID_CUSTOM_VALUE_RND_DOWN (GADGET_ID_COUNTER_FIRST + 51)
+#define GADGET_ID_CUSTOM_VALUE_RND_TEXT (GADGET_ID_COUNTER_FIRST + 52)
+#define GADGET_ID_CUSTOM_VALUE_RND_UP (GADGET_ID_COUNTER_FIRST + 53)
+#define GADGET_ID_PUSH_DELAY_FIX_DOWN (GADGET_ID_COUNTER_FIRST + 54)
+#define GADGET_ID_PUSH_DELAY_FIX_TEXT (GADGET_ID_COUNTER_FIRST + 55)
+#define GADGET_ID_PUSH_DELAY_FIX_UP (GADGET_ID_COUNTER_FIRST + 56)
+#define GADGET_ID_PUSH_DELAY_RND_DOWN (GADGET_ID_COUNTER_FIRST + 57)
+#define GADGET_ID_PUSH_DELAY_RND_TEXT (GADGET_ID_COUNTER_FIRST + 58)
+#define GADGET_ID_PUSH_DELAY_RND_UP (GADGET_ID_COUNTER_FIRST + 59)
+#define GADGET_ID_DROP_DELAY_FIX_DOWN (GADGET_ID_COUNTER_FIRST + 60)
+#define GADGET_ID_DROP_DELAY_FIX_TEXT (GADGET_ID_COUNTER_FIRST + 61)
+#define GADGET_ID_DROP_DELAY_FIX_UP (GADGET_ID_COUNTER_FIRST + 62)
+#define GADGET_ID_DROP_DELAY_RND_DOWN (GADGET_ID_COUNTER_FIRST + 63)
+#define GADGET_ID_DROP_DELAY_RND_TEXT (GADGET_ID_COUNTER_FIRST + 64)
+#define GADGET_ID_DROP_DELAY_RND_UP (GADGET_ID_COUNTER_FIRST + 65)
+#define GADGET_ID_MOVE_DELAY_FIX_DOWN (GADGET_ID_COUNTER_FIRST + 66)
+#define GADGET_ID_MOVE_DELAY_FIX_TEXT (GADGET_ID_COUNTER_FIRST + 67)
+#define GADGET_ID_MOVE_DELAY_FIX_UP (GADGET_ID_COUNTER_FIRST + 68)
+#define GADGET_ID_MOVE_DELAY_RND_DOWN (GADGET_ID_COUNTER_FIRST + 69)
+#define GADGET_ID_MOVE_DELAY_RND_TEXT (GADGET_ID_COUNTER_FIRST + 70)
+#define GADGET_ID_MOVE_DELAY_RND_UP (GADGET_ID_COUNTER_FIRST + 71)
+#define GADGET_ID_EXPLOSION_DELAY_DOWN (GADGET_ID_COUNTER_FIRST + 72)
+#define GADGET_ID_EXPLOSION_DELAY_TEXT (GADGET_ID_COUNTER_FIRST + 73)
+#define GADGET_ID_EXPLOSION_DELAY_UP (GADGET_ID_COUNTER_FIRST + 74)
+#define GADGET_ID_IGNITION_DELAY_DOWN (GADGET_ID_COUNTER_FIRST + 75)
+#define GADGET_ID_IGNITION_DELAY_TEXT (GADGET_ID_COUNTER_FIRST + 76)
+#define GADGET_ID_IGNITION_DELAY_UP (GADGET_ID_COUNTER_FIRST + 77)
+#define GADGET_ID_CHANGE_DELAY_FIX_DOWN (GADGET_ID_COUNTER_FIRST + 78)
+#define GADGET_ID_CHANGE_DELAY_FIX_TEXT (GADGET_ID_COUNTER_FIRST + 79)
+#define GADGET_ID_CHANGE_DELAY_FIX_UP (GADGET_ID_COUNTER_FIRST + 80)
+#define GADGET_ID_CHANGE_DELAY_RND_DOWN (GADGET_ID_COUNTER_FIRST + 81)
+#define GADGET_ID_CHANGE_DELAY_RND_TEXT (GADGET_ID_COUNTER_FIRST + 82)
+#define GADGET_ID_CHANGE_DELAY_RND_UP (GADGET_ID_COUNTER_FIRST + 83)
+#define GADGET_ID_CHANGE_CONT_RND_DOWN (GADGET_ID_COUNTER_FIRST + 84)
+#define GADGET_ID_CHANGE_CONT_RND_TEXT (GADGET_ID_COUNTER_FIRST + 85)
+#define GADGET_ID_CHANGE_CONT_RND_UP (GADGET_ID_COUNTER_FIRST + 86)
+#define GADGET_ID_GROUP_CONTENT_DOWN (GADGET_ID_COUNTER_FIRST + 87)
+#define GADGET_ID_GROUP_CONTENT_TEXT (GADGET_ID_COUNTER_FIRST + 88)
+#define GADGET_ID_GROUP_CONTENT_UP (GADGET_ID_COUNTER_FIRST + 89)
/* drawing area identifiers */
-#define GADGET_ID_DRAWING_AREA_FIRST (GADGET_ID_COUNTER_FIRST + 69)
+#define GADGET_ID_DRAWING_AREA_FIRST (GADGET_ID_COUNTER_FIRST + 90)
#define GADGET_ID_DRAWING_LEVEL (GADGET_ID_DRAWING_AREA_FIRST + 0)
-#define GADGET_ID_ELEMENT_CONTENT_0 (GADGET_ID_DRAWING_AREA_FIRST + 1)
-#define GADGET_ID_ELEMENT_CONTENT_1 (GADGET_ID_DRAWING_AREA_FIRST + 2)
-#define GADGET_ID_ELEMENT_CONTENT_2 (GADGET_ID_DRAWING_AREA_FIRST + 3)
-#define GADGET_ID_ELEMENT_CONTENT_3 (GADGET_ID_DRAWING_AREA_FIRST + 4)
-#define GADGET_ID_ELEMENT_CONTENT_4 (GADGET_ID_DRAWING_AREA_FIRST + 5)
-#define GADGET_ID_ELEMENT_CONTENT_5 (GADGET_ID_DRAWING_AREA_FIRST + 6)
-#define GADGET_ID_ELEMENT_CONTENT_6 (GADGET_ID_DRAWING_AREA_FIRST + 7)
-#define GADGET_ID_ELEMENT_CONTENT_7 (GADGET_ID_DRAWING_AREA_FIRST + 8)
-#define GADGET_ID_AMOEBA_CONTENT (GADGET_ID_DRAWING_AREA_FIRST + 9)
-#define GADGET_ID_CUSTOM_GRAPHIC (GADGET_ID_DRAWING_AREA_FIRST + 10)
-#define GADGET_ID_CUSTOM_CONTENT (GADGET_ID_DRAWING_AREA_FIRST + 11)
-#define GADGET_ID_CUSTOM_MOVE_ENTER (GADGET_ID_DRAWING_AREA_FIRST + 12)
-#define GADGET_ID_CUSTOM_MOVE_LEAVE (GADGET_ID_DRAWING_AREA_FIRST + 13)
-#define GADGET_ID_CUSTOM_CHANGE_TARGET (GADGET_ID_DRAWING_AREA_FIRST + 14)
-#define GADGET_ID_CUSTOM_CHANGE_CONTENT (GADGET_ID_DRAWING_AREA_FIRST + 15)
-#define GADGET_ID_CUSTOM_CHANGE_TRIGGER (GADGET_ID_DRAWING_AREA_FIRST + 16)
-#define GADGET_ID_GROUP_CONTENT (GADGET_ID_DRAWING_AREA_FIRST + 17)
-#define GADGET_ID_RANDOM_BACKGROUND (GADGET_ID_DRAWING_AREA_FIRST + 18)
+#define GADGET_ID_YAMYAM_CONTENT_0 (GADGET_ID_DRAWING_AREA_FIRST + 1)
+#define GADGET_ID_YAMYAM_CONTENT_1 (GADGET_ID_DRAWING_AREA_FIRST + 2)
+#define GADGET_ID_YAMYAM_CONTENT_2 (GADGET_ID_DRAWING_AREA_FIRST + 3)
+#define GADGET_ID_YAMYAM_CONTENT_3 (GADGET_ID_DRAWING_AREA_FIRST + 4)
+#define GADGET_ID_YAMYAM_CONTENT_4 (GADGET_ID_DRAWING_AREA_FIRST + 5)
+#define GADGET_ID_YAMYAM_CONTENT_5 (GADGET_ID_DRAWING_AREA_FIRST + 6)
+#define GADGET_ID_YAMYAM_CONTENT_6 (GADGET_ID_DRAWING_AREA_FIRST + 7)
+#define GADGET_ID_YAMYAM_CONTENT_7 (GADGET_ID_DRAWING_AREA_FIRST + 8)
+#define GADGET_ID_MAGIC_BALL_CONTENT_0 (GADGET_ID_DRAWING_AREA_FIRST + 9)
+#define GADGET_ID_MAGIC_BALL_CONTENT_1 (GADGET_ID_DRAWING_AREA_FIRST + 10)
+#define GADGET_ID_MAGIC_BALL_CONTENT_2 (GADGET_ID_DRAWING_AREA_FIRST + 11)
+#define GADGET_ID_MAGIC_BALL_CONTENT_3 (GADGET_ID_DRAWING_AREA_FIRST + 12)
+#define GADGET_ID_MAGIC_BALL_CONTENT_4 (GADGET_ID_DRAWING_AREA_FIRST + 13)
+#define GADGET_ID_MAGIC_BALL_CONTENT_5 (GADGET_ID_DRAWING_AREA_FIRST + 14)
+#define GADGET_ID_MAGIC_BALL_CONTENT_6 (GADGET_ID_DRAWING_AREA_FIRST + 15)
+#define GADGET_ID_MAGIC_BALL_CONTENT_7 (GADGET_ID_DRAWING_AREA_FIRST + 16)
+#define GADGET_ID_AMOEBA_CONTENT (GADGET_ID_DRAWING_AREA_FIRST + 17)
+#define GADGET_ID_START_ELEMENT (GADGET_ID_DRAWING_AREA_FIRST + 18)
+#define GADGET_ID_CUSTOM_GRAPHIC (GADGET_ID_DRAWING_AREA_FIRST + 19)
+#define GADGET_ID_CUSTOM_CONTENT (GADGET_ID_DRAWING_AREA_FIRST + 20)
+#define GADGET_ID_CUSTOM_MOVE_ENTER (GADGET_ID_DRAWING_AREA_FIRST + 21)
+#define GADGET_ID_CUSTOM_MOVE_LEAVE (GADGET_ID_DRAWING_AREA_FIRST + 22)
+#define GADGET_ID_CUSTOM_CHANGE_TARGET (GADGET_ID_DRAWING_AREA_FIRST + 23)
+#define GADGET_ID_CUSTOM_CHANGE_CONTENT (GADGET_ID_DRAWING_AREA_FIRST + 24)
+#define GADGET_ID_CUSTOM_CHANGE_TRIGGER (GADGET_ID_DRAWING_AREA_FIRST + 25)
+#define GADGET_ID_GROUP_CONTENT (GADGET_ID_DRAWING_AREA_FIRST + 26)
+#define GADGET_ID_RANDOM_BACKGROUND (GADGET_ID_DRAWING_AREA_FIRST + 27)
/* text input identifiers */
-#define GADGET_ID_TEXT_INPUT_FIRST (GADGET_ID_DRAWING_AREA_FIRST + 19)
+#define GADGET_ID_TEXT_INPUT_FIRST (GADGET_ID_DRAWING_AREA_FIRST + 28)
#define GADGET_ID_LEVEL_NAME (GADGET_ID_TEXT_INPUT_FIRST + 0)
#define GADGET_ID_LEVEL_AUTHOR (GADGET_ID_TEXT_INPUT_FIRST + 1)
/* selectbox identifiers */
#define GADGET_ID_SELECTBOX_FIRST (GADGET_ID_TEXT_AREA_FIRST + 1)
-#define GADGET_ID_CUSTOM_WALK_TO_ACTION (GADGET_ID_SELECTBOX_FIRST + 0)
-#define GADGET_ID_CUSTOM_CONSISTENCY (GADGET_ID_SELECTBOX_FIRST + 1)
-#define GADGET_ID_CUSTOM_DEADLINESS (GADGET_ID_SELECTBOX_FIRST + 2)
-#define GADGET_ID_CUSTOM_MOVE_PATTERN (GADGET_ID_SELECTBOX_FIRST + 3)
-#define GADGET_ID_CUSTOM_MOVE_DIRECTION (GADGET_ID_SELECTBOX_FIRST + 4)
-#define GADGET_ID_CUSTOM_MOVE_STEPSIZE (GADGET_ID_SELECTBOX_FIRST + 5)
-#define GADGET_ID_CUSTOM_MOVE_LEAVE_TYPE (GADGET_ID_SELECTBOX_FIRST + 6)
-#define GADGET_ID_CUSTOM_SMASH_TARGETS (GADGET_ID_SELECTBOX_FIRST + 7)
-#define GADGET_ID_CUSTOM_SLIPPERY_TYPE (GADGET_ID_SELECTBOX_FIRST + 8)
-#define GADGET_ID_CUSTOM_ACCESS_TYPE (GADGET_ID_SELECTBOX_FIRST + 9)
-#define GADGET_ID_CUSTOM_ACCESS_LAYER (GADGET_ID_SELECTBOX_FIRST + 10)
-#define GADGET_ID_CUSTOM_ACCESS_PROTECTED (GADGET_ID_SELECTBOX_FIRST + 11)
-#define GADGET_ID_CUSTOM_ACCESS_DIRECTION (GADGET_ID_SELECTBOX_FIRST + 12)
-#define GADGET_ID_CHANGE_TIME_UNITS (GADGET_ID_SELECTBOX_FIRST + 13)
-#define GADGET_ID_CHANGE_DIRECT_ACTION (GADGET_ID_SELECTBOX_FIRST + 14)
-#define GADGET_ID_CHANGE_OTHER_ACTION (GADGET_ID_SELECTBOX_FIRST + 15)
-#define GADGET_ID_CHANGE_SIDES (GADGET_ID_SELECTBOX_FIRST + 16)
-#define GADGET_ID_CHANGE_POWER (GADGET_ID_SELECTBOX_FIRST + 17)
-#define GADGET_ID_SELECT_CHANGE_PAGE (GADGET_ID_SELECTBOX_FIRST + 18)
-#define GADGET_ID_GROUP_CHOICE_MODE (GADGET_ID_SELECTBOX_FIRST + 19)
+#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_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 + 20)
+#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_PREV_CHANGE_PAGE (GADGET_ID_GRAPHICBUTTON_FIRST + 0)
#define GADGET_ID_NEXT_CHANGE_PAGE (GADGET_ID_GRAPHICBUTTON_FIRST + 1)
+#define GADGET_ID_COPY_CHANGE_PAGE (GADGET_ID_GRAPHICBUTTON_FIRST + 2)
+#define GADGET_ID_PASTE_CHANGE_PAGE (GADGET_ID_GRAPHICBUTTON_FIRST + 3)
/* gadgets for scrolling of drawing area */
-#define GADGET_ID_SCROLLING_FIRST (GADGET_ID_GRAPHICBUTTON_FIRST + 2)
+#define GADGET_ID_SCROLLING_FIRST (GADGET_ID_GRAPHICBUTTON_FIRST + 4)
#define GADGET_ID_SCROLL_UP (GADGET_ID_SCROLLING_FIRST + 0)
#define GADGET_ID_SCROLL_DOWN (GADGET_ID_SCROLLING_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_BLOCK_LAST_FIELD (GADGET_ID_CHECKBUTTON_FIRST + 8)
-#define GADGET_ID_SP_BLOCK_LAST_FIELD (GADGET_ID_CHECKBUTTON_FIRST + 9)
-#define GADGET_ID_CAN_MOVE_INTO_ACID (GADGET_ID_CHECKBUTTON_FIRST + 10)
-#define GADGET_ID_CUSTOM_EXPLODE_RESULT (GADGET_ID_CHECKBUTTON_FIRST + 11)
-#define GADGET_ID_CUSTOM_EXPLODE_FIRE (GADGET_ID_CHECKBUTTON_FIRST + 12)
-#define GADGET_ID_CUSTOM_EXPLODE_SMASH (GADGET_ID_CHECKBUTTON_FIRST + 13)
-#define GADGET_ID_CUSTOM_EXPLODE_IMPACT (GADGET_ID_CHECKBUTTON_FIRST + 14)
-#define GADGET_ID_CUSTOM_WALK_TO_OBJECT (GADGET_ID_CHECKBUTTON_FIRST + 15)
-#define GADGET_ID_CUSTOM_DEADLY (GADGET_ID_CHECKBUTTON_FIRST + 16)
-#define GADGET_ID_CUSTOM_CAN_MOVE (GADGET_ID_CHECKBUTTON_FIRST + 17)
-#define GADGET_ID_CUSTOM_CAN_FALL (GADGET_ID_CHECKBUTTON_FIRST + 18)
-#define GADGET_ID_CUSTOM_CAN_SMASH (GADGET_ID_CHECKBUTTON_FIRST + 19)
-#define GADGET_ID_CUSTOM_SLIPPERY (GADGET_ID_CHECKBUTTON_FIRST + 20)
-#define GADGET_ID_CUSTOM_ACCESSIBLE (GADGET_ID_CHECKBUTTON_FIRST + 21)
-#define GADGET_ID_CUSTOM_USE_GRAPHIC (GADGET_ID_CHECKBUTTON_FIRST + 22)
-#define GADGET_ID_CUSTOM_USE_TEMPLATE (GADGET_ID_CHECKBUTTON_FIRST + 23)
-#define GADGET_ID_CUSTOM_CAN_CHANGE (GADGET_ID_CHECKBUTTON_FIRST + 24)
-#define GADGET_ID_CHANGE_USE_CONTENT (GADGET_ID_CHECKBUTTON_FIRST + 25)
-#define GADGET_ID_CHANGE_USE_EXPLOSION (GADGET_ID_CHECKBUTTON_FIRST + 26)
-#define GADGET_ID_CHANGE_ONLY_COMPLETE (GADGET_ID_CHECKBUTTON_FIRST + 27)
-#define GADGET_ID_CHANGE_USE_RANDOM (GADGET_ID_CHECKBUTTON_FIRST + 28)
-#define GADGET_ID_CHANGE_DELAY (GADGET_ID_CHECKBUTTON_FIRST + 29)
-#define GADGET_ID_CHANGE_BY_DIRECT_ACT (GADGET_ID_CHECKBUTTON_FIRST + 30)
-#define GADGET_ID_CHANGE_BY_OTHER_ACT (GADGET_ID_CHECKBUTTON_FIRST + 31)
+#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_USE_TIME_ORB_BUG (GADGET_ID_CHECKBUTTON_FIRST + 7)
+#define GADGET_ID_GROW_INTO_DIGGABLE (GADGET_ID_CHECKBUTTON_FIRST + 8)
+#define GADGET_ID_DOUBLE_SPEED (GADGET_ID_CHECKBUTTON_FIRST + 9)
+#define GADGET_ID_BLOCK_SNAP_FIELD (GADGET_ID_CHECKBUTTON_FIRST + 10)
+#define GADGET_ID_BLOCK_LAST_FIELD (GADGET_ID_CHECKBUTTON_FIRST + 11)
+#define GADGET_ID_SP_BLOCK_LAST_FIELD (GADGET_ID_CHECKBUTTON_FIRST + 12)
+#define GADGET_ID_INSTANT_RELOCATION (GADGET_ID_CHECKBUTTON_FIRST + 13)
+#define GADGET_ID_USE_START_ELEMENT (GADGET_ID_CHECKBUTTON_FIRST + 14)
+#define GADGET_ID_CAN_PASS_TO_WALKABLE (GADGET_ID_CHECKBUTTON_FIRST + 15)
+#define GADGET_ID_CAN_FALL_INTO_ACID (GADGET_ID_CHECKBUTTON_FIRST + 16)
+#define GADGET_ID_CAN_MOVE_INTO_ACID (GADGET_ID_CHECKBUTTON_FIRST + 17)
+#define GADGET_ID_DONT_COLLIDE_WITH (GADGET_ID_CHECKBUTTON_FIRST + 18)
+#define GADGET_ID_CUSTOM_INDESTRUCTIBLE (GADGET_ID_CHECKBUTTON_FIRST + 19)
+#define GADGET_ID_CUSTOM_CAN_EXPLODE (GADGET_ID_CHECKBUTTON_FIRST + 20)
+#define GADGET_ID_CUSTOM_EXPLODE_FIRE (GADGET_ID_CHECKBUTTON_FIRST + 21)
+#define GADGET_ID_CUSTOM_EXPLODE_SMASH (GADGET_ID_CHECKBUTTON_FIRST + 22)
+#define GADGET_ID_CUSTOM_EXPLODE_IMPACT (GADGET_ID_CHECKBUTTON_FIRST + 23)
+#define GADGET_ID_CUSTOM_WALK_TO_OBJECT (GADGET_ID_CHECKBUTTON_FIRST + 24)
+#define GADGET_ID_CUSTOM_DEADLY (GADGET_ID_CHECKBUTTON_FIRST + 25)
+#define GADGET_ID_CUSTOM_CAN_MOVE (GADGET_ID_CHECKBUTTON_FIRST + 26)
+#define GADGET_ID_CUSTOM_CAN_FALL (GADGET_ID_CHECKBUTTON_FIRST + 27)
+#define GADGET_ID_CUSTOM_CAN_SMASH (GADGET_ID_CHECKBUTTON_FIRST + 28)
+#define GADGET_ID_CUSTOM_SLIPPERY (GADGET_ID_CHECKBUTTON_FIRST + 29)
+#define GADGET_ID_CUSTOM_ACCESSIBLE (GADGET_ID_CHECKBUTTON_FIRST + 30)
+#define GADGET_ID_CUSTOM_GRAV_REACHABLE (GADGET_ID_CHECKBUTTON_FIRST + 31)
+#define GADGET_ID_CUSTOM_USE_LAST_VALUE (GADGET_ID_CHECKBUTTON_FIRST + 32)
+#define GADGET_ID_CUSTOM_USE_GRAPHIC (GADGET_ID_CHECKBUTTON_FIRST + 33)
+#define GADGET_ID_CUSTOM_USE_TEMPLATE (GADGET_ID_CHECKBUTTON_FIRST + 34)
+#define GADGET_ID_CUSTOM_CAN_CHANGE (GADGET_ID_CHECKBUTTON_FIRST + 35)
+#define GADGET_ID_CHANGE_USE_CONTENT (GADGET_ID_CHECKBUTTON_FIRST + 36)
+#define GADGET_ID_CHANGE_USE_EXPLOSION (GADGET_ID_CHECKBUTTON_FIRST + 37)
+#define GADGET_ID_CHANGE_ONLY_COMPLETE (GADGET_ID_CHECKBUTTON_FIRST + 38)
+#define GADGET_ID_CHANGE_USE_RANDOM (GADGET_ID_CHECKBUTTON_FIRST + 39)
+#define GADGET_ID_CHANGE_HAS_ACTION (GADGET_ID_CHECKBUTTON_FIRST + 40)
+#define GADGET_ID_CHANGE_DELAY (GADGET_ID_CHECKBUTTON_FIRST + 41)
+#define GADGET_ID_CHANGE_BY_DIRECT_ACT (GADGET_ID_CHECKBUTTON_FIRST + 42)
+#define GADGET_ID_CHANGE_BY_OTHER_ACT (GADGET_ID_CHECKBUTTON_FIRST + 43)
/* gadgets for buttons in element list */
-#define GADGET_ID_ELEMENTLIST_FIRST (GADGET_ID_CHECKBUTTON_FIRST + 32)
+#define GADGET_ID_ELEMENTLIST_FIRST (GADGET_ID_CHECKBUTTON_FIRST + 44)
#define GADGET_ID_ELEMENTLIST_LAST (GADGET_ID_ELEMENTLIST_FIRST + \
ED_NUM_ELEMENTLIST_BUTTONS - 1)
#define ED_COUNTER_ID_LEVEL_TIMELIMIT 4
#define ED_COUNTER_ID_LEVEL_TIMESCORE 5
#define ED_COUNTER_ID_LEVEL_RANDOM 6
-#define ED_COUNTER_ID_ELEMENT_SCORE 7
-#define ED_COUNTER_ID_ELEMENT_CONTENT 8
-#define ED_COUNTER_ID_ENVELOPE_XSIZE 9
-#define ED_COUNTER_ID_ENVELOPE_YSIZE 10
-#define ED_COUNTER_ID_CUSTOM_SCORE 11
-#define ED_COUNTER_ID_CUSTOM_GEMCOUNT 12
-#define ED_COUNTER_ID_PUSH_DELAY_FIX 13
-#define ED_COUNTER_ID_PUSH_DELAY_RND 14
-#define ED_COUNTER_ID_MOVE_DELAY_FIX 15
-#define ED_COUNTER_ID_MOVE_DELAY_RND 16
-#define ED_COUNTER_ID_EXPLOSION_DELAY 17
-#define ED_COUNTER_ID_IGNITION_DELAY 18
-#define ED_COUNTER_ID_GROUP_CONTENT 19
-#define ED_COUNTER_ID_CHANGE_DELAY_FIX 20
-#define ED_COUNTER_ID_CHANGE_DELAY_RND 21
-#define ED_COUNTER_ID_CHANGE_CONT_RND 22
-
-#define ED_NUM_COUNTERBUTTONS 23
+#define ED_COUNTER_ID_ELEMENT_VALUE1 7
+#define ED_COUNTER_ID_ELEMENT_VALUE2 8
+#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_CUSTOM_VALUE_FIX 16
+#define ED_COUNTER_ID_CUSTOM_VALUE_RND 17
+#define ED_COUNTER_ID_PUSH_DELAY_FIX 18
+#define ED_COUNTER_ID_PUSH_DELAY_RND 19
+#define ED_COUNTER_ID_DROP_DELAY_FIX 20
+#define ED_COUNTER_ID_DROP_DELAY_RND 21
+#define ED_COUNTER_ID_MOVE_DELAY_FIX 22
+#define ED_COUNTER_ID_MOVE_DELAY_RND 23
+#define ED_COUNTER_ID_EXPLOSION_DELAY 24
+#define ED_COUNTER_ID_IGNITION_DELAY 25
+#define ED_COUNTER_ID_GROUP_CONTENT 26
+#define ED_COUNTER_ID_CHANGE_DELAY_FIX 27
+#define ED_COUNTER_ID_CHANGE_DELAY_RND 28
+#define ED_COUNTER_ID_CHANGE_CONT_RND 29
+
+#define ED_NUM_COUNTERBUTTONS 30
#define ED_COUNTER_ID_LEVEL_FIRST ED_COUNTER_ID_LEVEL_XSIZE
#define ED_COUNTER_ID_LEVEL_LAST ED_COUNTER_ID_LEVEL_RANDOM
#define ED_COUNTER_ID_CUSTOM1_FIRST ED_COUNTER_ID_CUSTOM_SCORE
-#define ED_COUNTER_ID_CUSTOM1_LAST ED_COUNTER_ID_MOVE_DELAY_RND
-#define ED_COUNTER_ID_CUSTOM2_FIRST ED_COUNTER_ID_EXPLOSION_DELAY
+#define ED_COUNTER_ID_CUSTOM1_LAST ED_COUNTER_ID_DROP_DELAY_RND
+#define ED_COUNTER_ID_CUSTOM2_FIRST ED_COUNTER_ID_MOVE_DELAY_FIX
#define ED_COUNTER_ID_CUSTOM2_LAST ED_COUNTER_ID_IGNITION_DELAY
#define ED_COUNTER_ID_CUSTOM_FIRST ED_COUNTER_ID_CUSTOM1_FIRST
#define ED_COUNTER_ID_CUSTOM_LAST ED_COUNTER_ID_CUSTOM2_LAST
#define ED_TEXTAREA_ID_LEVEL_LAST ED_TEXTAREA_ID_ENVELOPE
/* values for selectbox gadgets */
-#define ED_SELECTBOX_ID_CUSTOM_ACCESS_TYPE 0
-#define ED_SELECTBOX_ID_CUSTOM_ACCESS_LAYER 1
-#define ED_SELECTBOX_ID_CUSTOM_ACCESS_PROTECTED 2
-#define ED_SELECTBOX_ID_CUSTOM_ACCESS_DIRECTION 3
-#define ED_SELECTBOX_ID_CUSTOM_WALK_TO_ACTION 4
-#define ED_SELECTBOX_ID_CUSTOM_MOVE_PATTERN 5
-#define ED_SELECTBOX_ID_CUSTOM_MOVE_DIRECTION 6
-#define ED_SELECTBOX_ID_CUSTOM_MOVE_STEPSIZE 7
-#define ED_SELECTBOX_ID_CUSTOM_MOVE_LEAVE_TYPE 8
-#define ED_SELECTBOX_ID_CUSTOM_SMASH_TARGETS 9
-#define ED_SELECTBOX_ID_CUSTOM_SLIPPERY_TYPE 10
-#define ED_SELECTBOX_ID_CUSTOM_DEADLINESS 11
-#define ED_SELECTBOX_ID_CUSTOM_CONSISTENCY 12
-#define ED_SELECTBOX_ID_CHANGE_TIME_UNITS 13
-#define ED_SELECTBOX_ID_CHANGE_DIRECT_ACTION 14
-#define ED_SELECTBOX_ID_CHANGE_OTHER_ACTION 15
-#define ED_SELECTBOX_ID_CHANGE_SIDES 16
-#define ED_SELECTBOX_ID_CHANGE_POWER 17
-#define ED_SELECTBOX_ID_SELECT_CHANGE_PAGE 18
-#define ED_SELECTBOX_ID_GROUP_CHOICE_MODE 19
-
-#define ED_NUM_SELECTBOX 20
+#define ED_SELECTBOX_ID_TIME_OR_STEPS 0
+#define ED_SELECTBOX_ID_GAME_ENGINE_TYPE 1
+#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_WIND_DIRECTION
#define ED_SELECTBOX_ID_CUSTOM1_FIRST ED_SELECTBOX_ID_CUSTOM_ACCESS_TYPE
-#define ED_SELECTBOX_ID_CUSTOM1_LAST ED_SELECTBOX_ID_CUSTOM_SLIPPERY_TYPE
-#define ED_SELECTBOX_ID_CUSTOM2_FIRST ED_SELECTBOX_ID_CUSTOM_DEADLINESS
-#define ED_SELECTBOX_ID_CUSTOM2_LAST ED_SELECTBOX_ID_CUSTOM_CONSISTENCY
+#define ED_SELECTBOX_ID_CUSTOM1_LAST ED_SELECTBOX_ID_CUSTOM_WALK_TO_ACTION
+#define ED_SELECTBOX_ID_CUSTOM2_FIRST ED_SELECTBOX_ID_CUSTOM_MOVE_PATTERN
+#define ED_SELECTBOX_ID_CUSTOM2_LAST ED_SELECTBOX_ID_CUSTOM_EXPLOSION_TYPE
#define ED_SELECTBOX_ID_CUSTOM_FIRST ED_SELECTBOX_ID_CUSTOM1_FIRST
#define ED_SELECTBOX_ID_CUSTOM_LAST ED_SELECTBOX_ID_CUSTOM2_LAST
/* values for graphicbutton gadgets */
#define ED_GRAPHICBUTTON_ID_PREV_CHANGE_PAGE 0
#define ED_GRAPHICBUTTON_ID_NEXT_CHANGE_PAGE 1
+#define ED_GRAPHICBUTTON_ID_COPY_CHANGE_PAGE 2
+#define ED_GRAPHICBUTTON_ID_PASTE_CHANGE_PAGE 3
-#define ED_NUM_GRAPHICBUTTONS 2
+#define ED_NUM_GRAPHICBUTTONS 4
-#define ED_GRAPHICBUTTON_ID_CHANGE_FIRST ED_GRAPHICBUTTON_ID_PREV_CHANGE_PAGE
-#define ED_GRAPHICBUTTON_ID_CHANGE_LAST ED_GRAPHICBUTTON_ID_NEXT_CHANGE_PAGE
+#define ED_GRAPHICBUTTON_ID_CHANGE_FIRST ED_GRAPHICBUTTON_ID_PREV_CHANGE_PAGE
+#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_BLOCK_LAST_FIELD 6
-#define ED_CHECKBUTTON_ID_SP_BLOCK_LAST_FIELD 7
-#define ED_CHECKBUTTON_ID_CAN_MOVE_INTO_ACID 8
-#define ED_CHECKBUTTON_ID_CUSTOM_USE_GRAPHIC 9
-#define ED_CHECKBUTTON_ID_CUSTOM_USE_TEMPLATE 10
-#define ED_CHECKBUTTON_ID_CUSTOM_ACCESSIBLE 11
-#define ED_CHECKBUTTON_ID_CUSTOM_WALK_TO_OBJECT 12
-#define ED_CHECKBUTTON_ID_CUSTOM_CAN_MOVE 13
-#define ED_CHECKBUTTON_ID_CUSTOM_CAN_FALL 14
-#define ED_CHECKBUTTON_ID_CUSTOM_CAN_SMASH 15
-#define ED_CHECKBUTTON_ID_CUSTOM_SLIPPERY 16
-#define ED_CHECKBUTTON_ID_CUSTOM_DEADLY 17
-#define ED_CHECKBUTTON_ID_CUSTOM_EXPLODE_RESULT 18
-#define ED_CHECKBUTTON_ID_CUSTOM_EXPLODE_FIRE 19
-#define ED_CHECKBUTTON_ID_CUSTOM_EXPLODE_SMASH 20
-#define ED_CHECKBUTTON_ID_CUSTOM_EXPLODE_IMPACT 21
-#define ED_CHECKBUTTON_ID_CUSTOM_CAN_CHANGE 22
-#define ED_CHECKBUTTON_ID_CHANGE_DELAY 23
-#define ED_CHECKBUTTON_ID_CHANGE_BY_DIRECT_ACT 24
-#define ED_CHECKBUTTON_ID_CHANGE_BY_OTHER_ACT 25
-#define ED_CHECKBUTTON_ID_CHANGE_USE_EXPLOSION 26
-#define ED_CHECKBUTTON_ID_CHANGE_USE_CONTENT 27
-#define ED_CHECKBUTTON_ID_CHANGE_ONLY_COMPLETE 28
-#define ED_CHECKBUTTON_ID_CHANGE_USE_RANDOM 29
-
-#define ED_NUM_CHECKBUTTONS 30
-
-#define ED_CHECKBUTTON_ID_LEVEL_FIRST ED_CHECKBUTTON_ID_DOUBLE_SPEED
+#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_USE_TIME_ORB_BUG 5
+#define ED_CHECKBUTTON_ID_GROW_INTO_DIGGABLE 6
+#define ED_CHECKBUTTON_ID_DOUBLE_SPEED 7
+#define ED_CHECKBUTTON_ID_BLOCK_SNAP_FIELD 8
+#define ED_CHECKBUTTON_ID_BLOCK_LAST_FIELD 9
+#define ED_CHECKBUTTON_ID_SP_BLOCK_LAST_FIELD 10
+#define ED_CHECKBUTTON_ID_INSTANT_RELOCATION 11
+#define ED_CHECKBUTTON_ID_USE_START_ELEMENT 12
+#define ED_CHECKBUTTON_ID_CAN_PASS_TO_WALKABLE 13
+#define ED_CHECKBUTTON_ID_CAN_FALL_INTO_ACID 14
+#define ED_CHECKBUTTON_ID_CAN_MOVE_INTO_ACID 15
+#define ED_CHECKBUTTON_ID_DONT_COLLIDE_WITH 16
+#define ED_CHECKBUTTON_ID_CUSTOM_USE_GRAPHIC 17
+#define ED_CHECKBUTTON_ID_CUSTOM_USE_TEMPLATE 18
+#define ED_CHECKBUTTON_ID_CUSTOM_ACCESSIBLE 19
+#define ED_CHECKBUTTON_ID_CUSTOM_GRAV_REACHABLE 20
+#define ED_CHECKBUTTON_ID_CUSTOM_USE_LAST_VALUE 21
+#define ED_CHECKBUTTON_ID_CUSTOM_WALK_TO_OBJECT 22
+#define ED_CHECKBUTTON_ID_CUSTOM_INDESTRUCTIBLE 23
+#define ED_CHECKBUTTON_ID_CUSTOM_CAN_MOVE 24
+#define ED_CHECKBUTTON_ID_CUSTOM_CAN_FALL 25
+#define ED_CHECKBUTTON_ID_CUSTOM_CAN_SMASH 26
+#define ED_CHECKBUTTON_ID_CUSTOM_SLIPPERY 27
+#define ED_CHECKBUTTON_ID_CUSTOM_DEADLY 28
+#define ED_CHECKBUTTON_ID_CUSTOM_CAN_EXPLODE 29
+#define ED_CHECKBUTTON_ID_CUSTOM_EXPLODE_FIRE 30
+#define ED_CHECKBUTTON_ID_CUSTOM_EXPLODE_SMASH 31
+#define ED_CHECKBUTTON_ID_CUSTOM_EXPLODE_IMPACT 32
+#define ED_CHECKBUTTON_ID_CUSTOM_CAN_CHANGE 33
+#define ED_CHECKBUTTON_ID_CHANGE_DELAY 34
+#define ED_CHECKBUTTON_ID_CHANGE_BY_DIRECT_ACT 35
+#define ED_CHECKBUTTON_ID_CHANGE_BY_OTHER_ACT 36
+#define ED_CHECKBUTTON_ID_CHANGE_USE_EXPLOSION 37
+#define ED_CHECKBUTTON_ID_CHANGE_USE_CONTENT 38
+#define ED_CHECKBUTTON_ID_CHANGE_ONLY_COMPLETE 39
+#define ED_CHECKBUTTON_ID_CHANGE_USE_RANDOM 40
+#define ED_CHECKBUTTON_ID_CHANGE_HAS_ACTION 41
+
+#define ED_NUM_CHECKBUTTONS 42
+
+#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_CUSTOM1_LAST ED_CHECKBUTTON_ID_CUSTOM_SLIPPERY
-#define ED_CHECKBUTTON_ID_CUSTOM2_FIRST ED_CHECKBUTTON_ID_CUSTOM_DEADLY
+#define ED_CHECKBUTTON_ID_CUSTOM1_LAST ED_CHECKBUTTON_ID_CUSTOM_INDESTRUCTIBLE
+#define ED_CHECKBUTTON_ID_CUSTOM2_FIRST ED_CHECKBUTTON_ID_CUSTOM_CAN_MOVE
#define ED_CHECKBUTTON_ID_CUSTOM2_LAST ED_CHECKBUTTON_ID_CUSTOM_EXPLODE_IMPACT
#define ED_CHECKBUTTON_ID_CUSTOM_FIRST ED_CHECKBUTTON_ID_CUSTOM1_FIRST
#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 drawing area gadgets */
#define ED_DRAWING_ID_DRAWING_LEVEL 0
-#define ED_DRAWING_ID_ELEMENT_CONTENT_0 1
-#define ED_DRAWING_ID_ELEMENT_CONTENT_1 2
-#define ED_DRAWING_ID_ELEMENT_CONTENT_2 3
-#define ED_DRAWING_ID_ELEMENT_CONTENT_3 4
-#define ED_DRAWING_ID_ELEMENT_CONTENT_4 5
-#define ED_DRAWING_ID_ELEMENT_CONTENT_5 6
-#define ED_DRAWING_ID_ELEMENT_CONTENT_6 7
-#define ED_DRAWING_ID_ELEMENT_CONTENT_7 8
-#define ED_DRAWING_ID_AMOEBA_CONTENT 9
-#define ED_DRAWING_ID_CUSTOM_GRAPHIC 10
-#define ED_DRAWING_ID_CUSTOM_CONTENT 11
-#define ED_DRAWING_ID_CUSTOM_MOVE_ENTER 12
-#define ED_DRAWING_ID_CUSTOM_MOVE_LEAVE 13
-#define ED_DRAWING_ID_CUSTOM_CHANGE_TARGET 14
-#define ED_DRAWING_ID_CUSTOM_CHANGE_CONTENT 15
-#define ED_DRAWING_ID_CUSTOM_CHANGE_TRIGGER 16
-#define ED_DRAWING_ID_GROUP_CONTENT 17
-#define ED_DRAWING_ID_RANDOM_BACKGROUND 18
-
-#define ED_NUM_DRAWING_AREAS 19
+#define ED_DRAWING_ID_YAMYAM_CONTENT_0 1
+#define ED_DRAWING_ID_YAMYAM_CONTENT_1 2
+#define ED_DRAWING_ID_YAMYAM_CONTENT_2 3
+#define ED_DRAWING_ID_YAMYAM_CONTENT_3 4
+#define ED_DRAWING_ID_YAMYAM_CONTENT_4 5
+#define ED_DRAWING_ID_YAMYAM_CONTENT_5 6
+#define ED_DRAWING_ID_YAMYAM_CONTENT_6 7
+#define ED_DRAWING_ID_YAMYAM_CONTENT_7 8
+#define ED_DRAWING_ID_MAGIC_BALL_CONTENT_0 9
+#define ED_DRAWING_ID_MAGIC_BALL_CONTENT_1 10
+#define ED_DRAWING_ID_MAGIC_BALL_CONTENT_2 11
+#define ED_DRAWING_ID_MAGIC_BALL_CONTENT_3 12
+#define ED_DRAWING_ID_MAGIC_BALL_CONTENT_4 13
+#define ED_DRAWING_ID_MAGIC_BALL_CONTENT_5 14
+#define ED_DRAWING_ID_MAGIC_BALL_CONTENT_6 15
+#define ED_DRAWING_ID_MAGIC_BALL_CONTENT_7 16
+#define ED_DRAWING_ID_AMOEBA_CONTENT 17
+#define ED_DRAWING_ID_START_ELEMENT 18
+#define ED_DRAWING_ID_CUSTOM_GRAPHIC 19
+#define ED_DRAWING_ID_CUSTOM_CONTENT 20
+#define ED_DRAWING_ID_CUSTOM_MOVE_ENTER 21
+#define ED_DRAWING_ID_CUSTOM_MOVE_LEAVE 22
+#define ED_DRAWING_ID_CUSTOM_CHANGE_TARGET 23
+#define ED_DRAWING_ID_CUSTOM_CHANGE_CONTENT 24
+#define ED_DRAWING_ID_CUSTOM_CHANGE_TRIGGER 25
+#define ED_DRAWING_ID_GROUP_CONTENT 26
+#define ED_DRAWING_ID_RANDOM_BACKGROUND 27
+
+#define ED_NUM_DRAWING_AREAS 28
/*
/* 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" },
{ '\0', "copy settings from other element" },
{ '\0', "copy settings to other element" },
- { '\0', "exchange settings with other element" },
+ { '\0', "exchange element with other element" },
+
+ { '\0', "copy settings from this element" },
+ { '\0', "paste settings to this element" },
};
static int random_placement_value = 10;
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 emeralds to collect:", NULL, NULL
+ NULL, "number of gems to collect:", NULL
},
{
- ED_SETTINGS_XPOS(0), ED_COUNTER_YPOS(4),
- 0, 999,
+ 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,
&level.time,
- "time available to solve level:", NULL, "(0 => no time limit)"
+ "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,
&level.score[SC_TIME_BONUS],
- "score for each 10 seconds left:", NULL, NULL
+ "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_SCORE_DOWN, GADGET_ID_ELEMENT_SCORE_UP,
- GADGET_ID_ELEMENT_SCORE_TEXT, GADGET_ID_NONE,
+ GADGET_ID_ELEMENT_VALUE1_DOWN, GADGET_ID_ELEMENT_VALUE1_UP,
+ GADGET_ID_ELEMENT_VALUE1_TEXT, GADGET_ID_NONE,
NULL, /* will be set when used */
NULL, NULL, NULL
},
{
- ED_SETTINGS_XPOS(0), ED_SETTINGS_YPOS(3),
+ 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, /* will be set when used */
+ NULL, NULL, NULL
+ },
+ {
+ 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_ELEMENT_CONTENT_DOWN, GADGET_ID_ELEMENT_CONTENT_UP,
- GADGET_ID_ELEMENT_CONTENT_TEXT, GADGET_ID_NONE,
+ GADGET_ID_YAMYAM_CONTENT_DOWN, GADGET_ID_YAMYAM_CONTENT_UP,
+ GADGET_ID_YAMYAM_CONTENT_TEXT, GADGET_ID_NONE,
&level.num_yamyam_contents,
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,
- NULL, "score", " "
+ &custom_element.collect_score_initial,
+ NULL, "CE 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,
- NULL, "count", NULL
+ &custom_element.collect_count_initial,
+ NULL, "CE count", NULL
},
{
- ED_SETTINGS_XPOS(1), ED_SETTINGS_YPOS(7),
- 0, 999,
+ ED_ELEMENT_SETTINGS_XPOS(0), ED_ELEMENT_SETTINGS_YPOS(12),
+ 0, 9999,
+ GADGET_ID_CUSTOM_VALUE_FIX_DOWN, GADGET_ID_CUSTOM_VALUE_FIX_UP,
+ GADGET_ID_CUSTOM_VALUE_FIX_TEXT, GADGET_ID_NONE,
+ &custom_element.ce_value_fixed_initial,
+ NULL, "CE value", NULL
+ },
+ {
+ ED_ELEMENT_SETTINGS_XPOS(0), ED_ELEMENT_SETTINGS_YPOS(12),
+ 0, 9999,
+ GADGET_ID_CUSTOM_VALUE_RND_DOWN, GADGET_ID_CUSTOM_VALUE_RND_UP,
+ GADGET_ID_CUSTOM_VALUE_RND_TEXT, GADGET_ID_CUSTOM_VALUE_FIX_UP,
+ &custom_element.ce_value_random_initial,
+ NULL, "+random", NULL
+ },
+ {
+ 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,
&custom_element.push_delay_fixed,
NULL, "push delay", NULL
},
{
- -1, ED_SETTINGS_YPOS(7),
- 0, 999,
+ -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,
&custom_element.push_delay_random,
NULL, "+random", NULL
},
{
- ED_SETTINGS_XPOS(1), ED_SETTINGS_YPOS(12),
+ 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,
+ &custom_element.drop_delay_fixed,
+ NULL, "drop delay", NULL
+ },
+ {
+ -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,
+ &custom_element.drop_delay_random,
+ NULL, "+random", NULL
+ },
+
+ /* ---------- element settings: configure 2 (custom elements) ------------ */
+
+ {
+ 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(12),
+ -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,
&custom_element.move_delay_random,
NULL, "+random", NULL
},
-
- /* ---------- element settings: configure 2 (custom elements) ------------ */
-
{
- ED_SETTINGS_XPOS(1), ED_SETTINGS_YPOS(4),
+ 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(5),
+ 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,
&custom_element_change.delay_fixed,
- NULL, "delay", NULL,
+ NULL, "CE 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(11),
+ 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,
- &custom_element_change.random,
+ &custom_element_change.random_percentage,
NULL, "use random replace:", "%"
},
};
} 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_time_or_steps[] =
+{
+ { 0, "seconds" },
+ { 1, "steps" },
+
+ { -1, NULL }
+};
+
+static struct ValueTextInfo options_game_engine_type[] =
+{
+ { 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_type[] =
{
{ EP_WALKABLE, "walkable" },
{ EP_PASSABLE, "passable" },
+
{ -1, NULL }
};
{ EP_ACCESSIBLE_OVER, "over" },
{ EP_ACCESSIBLE_INSIDE, "inside" },
{ EP_ACCESSIBLE_UNDER, "under" },
+
{ -1, NULL }
};
{
{ 0, "unprotected" },
{ 1, "protected" },
+
{ -1, NULL }
};
static struct ValueTextInfo options_access_direction[] =
{
+ { MV_NO_DIRECTION, "no direction" },
{ MV_LEFT, "left" },
{ MV_RIGHT, "right" },
{ MV_UP, "up" },
{ MV_VERTICAL | MV_LEFT, "vertical + left" },
{ MV_VERTICAL | MV_RIGHT, "vertical + right" },
{ MV_ALL_DIRECTIONS, "all directions" },
+
{ -1, NULL }
};
{ EP_DIGGABLE, "diggable" },
{ EP_COLLECTIBLE_ONLY, "collectible" },
{ EP_DROPPABLE, "collectible & droppable" },
+ { EP_THROWABLE, "collectible & throwable" },
{ EP_PUSHABLE, "pushable" },
+
{ -1, NULL }
};
{ 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" },
{ MV_TURNING_LEFT_RIGHT, "turning left, right" },
{ MV_TURNING_RIGHT_LEFT, "turning right, left" },
{ MV_TURNING_RANDOM, "turning random" },
- { MV_WHEN_PUSHED, "when pushed" },
- { MV_WHEN_DROPPED, "when dropped" },
{ MV_MAZE_RUNNER, "maze runner style" },
{ MV_MAZE_HUNTER, "maze hunter style" },
+ { MV_WHEN_PUSHED, "when pushed" },
+ { MV_WHEN_DROPPED, "when dropped/thrown" },
+
{ -1, NULL }
};
{ MV_START_DOWN, "down" },
{ MV_START_RANDOM, "random" },
{ MV_START_PREVIOUS, "previous" },
+
{ -1, NULL }
};
static struct ValueTextInfo options_move_stepsize[] =
{
+ { 0, "not moving" },
{ 1, "very slow" },
{ 2, "slow" },
{ 4, "normal" },
{ 8, "fast" },
{ 16, "very fast" },
+ { 32, "even faster" },
+
{ -1, NULL }
};
{
{ LEAVE_TYPE_UNLIMITED, "leave behind" },
{ LEAVE_TYPE_LIMITED, "change it to" },
+
{ -1, NULL }
};
{ EP_CAN_SMASH_ENEMIES, "enemies" },
#endif
{ EP_CAN_SMASH_EVERYTHING, "everything" },
+
{ -1, NULL }
};
{ SLIPPERY_ANY_RIGHT_LEFT, "right, left" },
{ SLIPPERY_ONLY_LEFT, "only left" },
{ SLIPPERY_ONLY_RIGHT, "only right" },
+
{ -1, NULL }
};
{ EP_DONT_RUN_INTO, "running into" },
{ EP_DONT_COLLIDE_WITH, "colliding with" },
{ EP_DONT_TOUCH, "touching" },
+
{ -1, NULL }
};
-static struct ValueTextInfo options_consistency[] =
+static struct ValueTextInfo options_explosion_type[] =
{
- { EP_CAN_EXPLODE_3X3, "can explode 3x3" },
- { EP_CAN_EXPLODE_DYNA, "can explode 3+3" },
- { EP_CAN_EXPLODE_1X1, "can explode 1x1" },
- { EP_INDESTRUCTIBLE, "indestructible" },
+ { EXPLODES_3X3, "3x3" },
+ { EXPLODES_CROSS, "3+3" },
+ { EXPLODES_1X1, "1x1" },
+
{ -1, NULL }
};
{
{ 1, "frames" },
{ FRAMES_PER_SECOND, "seconds" },
+
{ -1, NULL }
};
static struct ValueTextInfo options_change_direct_action[] =
{
- { CE_TOUCHED_BY_PLAYER, "touched by player ..." },
- { CE_PRESSED_BY_PLAYER, "pressed by player ..." },
- { CE_PUSHED_BY_PLAYER, "pushed by player ..." },
- { CE_ENTERED_BY_PLAYER, "entered by player ..." },
- { CE_LEFT_BY_PLAYER, "left by player ..." },
- { CE_DROPPED_BY_PLAYER, "dropped by player" },
- { CE_SWITCHED, "switched ..." },
-#if 1
- { CE_HITTING_SOMETHING, "hitting something ..." },
- { CE_HIT_BY_SOMETHING, "hit by something ..." },
-#else
- { CE_HITTING_SOMETHING, "collision ..." },
+ { CE_TOUCHED_BY_PLAYER, "touched by player" },
+ { CE_PRESSED_BY_PLAYER, "pressed by player" },
+ { CE_PUSHED_BY_PLAYER, "pushed by player" },
+ { CE_ENTERED_BY_PLAYER, "entered by player" },
+ { CE_LEFT_BY_PLAYER, "left by player" },
+ { CE_DROPPED_BY_PLAYER, "dropped/thrown by player" },
+ { CE_SWITCHED, "switched" },
+ { CE_HITTING_SOMETHING, "hitting something" },
+ { CE_HIT_BY_SOMETHING, "hit by something" },
+#if 0
+ { CE_BLOCKED, "blocked" },
#endif
{ CE_IMPACT, "impact (on something)" },
{ CE_SMASHED, "smashed (from above)" },
+ { CE_VALUE_GETS_ZERO, "CE value gets 0" },
+
{ -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" },
- { 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 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_VALUE_GETS_ZERO_OF_X, "CE value gets 0 of" },
+
+ { -1, NULL }
+};
+
+static struct ValueTextInfo options_change_trigger_side[] =
+{
+ { CH_SIDE_LEFT, "left" },
+ { CH_SIDE_RIGHT, "right" },
+ { CH_SIDE_TOP, "top" },
+ { CH_SIDE_BOTTOM, "bottom" },
+ { CH_SIDE_LEFT_RIGHT, "left/right" },
+ { CH_SIDE_TOP_BOTTOM, "top/bottom" },
+ { CH_SIDE_ANY, "any" },
+
+ { -1, NULL }
+};
+
+static struct ValueTextInfo options_change_trigger_player[] =
+{
+ { CH_PLAYER_1, "1" },
+ { CH_PLAYER_2, "2" },
+ { CH_PLAYER_3, "3" },
+ { CH_PLAYER_4, "4" },
+ { CH_PLAYER_ANY, "any" },
+
+ { -1, NULL }
+};
+
+static struct ValueTextInfo options_change_trigger_page[] =
+{
+ { (1 << 0), "1" },
+ { (1 << 1), "2" },
+ { (1 << 2), "3" },
+ { (1 << 3), "4" },
+ { (1 << 4), "5" },
+ { (1 << 5), "6" },
+ { (1 << 6), "7" },
+ { (1 << 7), "8" },
+ { (1 << 8), "9" },
+ { (1 << 9), "10" },
+ { (1 << 10), "11" },
+ { (1 << 11), "12" },
+ { (1 << 12), "13" },
+ { (1 << 13), "14" },
+ { (1 << 14), "15" },
+ { (1 << 15), "16" },
+ { (1 << 16), "17" },
+ { (1 << 17), "18" },
+ { (1 << 18), "19" },
+ { (1 << 19), "20" },
+ { (1 << 20), "21" },
+ { (1 << 21), "22" },
+ { (1 << 22), "23" },
+ { (1 << 23), "24" },
+ { (1 << 24), "25" },
+ { (1 << 25), "26" },
+ { (1 << 26), "27" },
+ { (1 << 27), "28" },
+ { (1 << 28), "29" },
+ { (1 << 29), "30" },
+ { (1 << 30), "31" },
+ { (1 << 31), "32" },
+ { CH_PAGE_ANY, "any" },
+
+ { -1, NULL }
+};
+
+static struct ValueTextInfo options_change_replace_when[] =
+{
+ { CP_WHEN_EMPTY, "empty" },
+ { CP_WHEN_WALKABLE, "walkable" },
+ { CP_WHEN_DIGGABLE, "diggable" },
+ { CP_WHEN_COLLECTIBLE, "collectible" },
+ { CP_WHEN_REMOVABLE, "removable" },
+ { CP_WHEN_DESTRUCTIBLE, "destructible" },
+
+ { -1, NULL }
+};
+
+static struct ValueTextInfo options_action_type[] =
+{
+ { CA_NO_ACTION, "no action" },
+ { CA_UNDEFINED, " " },
+ { CA_HEADLINE_LEVEL_ACTIONS, "[level actions]" },
+ { CA_RESTART_LEVEL, "restart level" },
+ { CA_SHOW_ENVELOPE, "show envelope" },
+ { CA_SET_LEVEL_TIME, "set time" },
+ { CA_SET_LEVEL_SCORE, "set score" },
+ { CA_SET_LEVEL_GEMS, "set needed gems" },
+ { CA_SET_LEVEL_GRAVITY, "set gravity" },
+ { CA_SET_LEVEL_WIND, "set wind dir." },
+ { CA_UNDEFINED, " " },
+ { CA_HEADLINE_PLAYER_ACTIONS, "[player actions]" },
+ { CA_MOVE_PLAYER, "move player" },
+ { CA_EXIT_PLAYER, "exit player" },
+ { CA_KILL_PLAYER, "kill player" },
+ { CA_SET_PLAYER_KEYS, "set keys" },
+ { CA_SET_PLAYER_SPEED, "set speed" },
+ { CA_SET_PLAYER_SHIELD, "set shield" },
+ { CA_SET_PLAYER_ARTWORK, "set artwork" },
+ { CA_UNDEFINED, " " },
+ { CA_HEADLINE_CE_ACTIONS, "[CE actions]" },
+ { CA_SET_CE_SCORE, "set CE score" },
+ { CA_SET_CE_VALUE, "set CE value" },
+
{ -1, NULL }
};
-static struct ValueTextInfo options_change_sides[] =
+static struct ValueTextInfo options_action_mode_none[] =
{
- { CH_SIDE_LEFT, "left side" },
- { CH_SIDE_RIGHT, "right side" },
- { CH_SIDE_TOP, "top side" },
- { CH_SIDE_BOTTOM, "bottom side" },
- { CH_SIDE_LEFT_RIGHT, "left/right side" },
- { CH_SIDE_TOP_BOTTOM, "top/bottom side" },
- { CH_SIDE_ANY, "any side" },
+ { CA_ARG_UNDEFINED, " " },
+
+ { -1, NULL }
+};
+
+static struct ValueTextInfo options_action_mode_assign[] =
+{
+ { CA_MODE_SET, "=" },
+
+ { -1, NULL }
+};
+
+static struct ValueTextInfo options_action_mode_add_remove[] =
+{
+ { CA_MODE_ADD, "+" },
+ { CA_MODE_SUBTRACT, "-" },
+
+ { -1, NULL }
+};
+
+static struct ValueTextInfo options_action_mode_calculate[] =
+{
+ { 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_none[] =
+{
+ { CA_ARG_UNDEFINED, " " },
+
{ -1, NULL }
};
-static struct ValueTextInfo options_change_power[] =
+static struct ValueTextInfo options_action_arg_player[] =
{
- { CP_NON_DESTRUCTIVE, "empty" },
- { CP_HALF_DESTRUCTIVE, "diggable" },
- { CP_FULL_DESTRUCTIVE, "destructible" },
+ { 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" },
+
+ { -1, NULL }
+};
+
+static struct ValueTextInfo options_action_arg_number[] =
+{
+ { 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_UNDEFINED, " " },
+ { CA_ARG_NUMBER_RESET, "reset" },
+ { CA_ARG_UNDEFINED, " " },
+ { CA_ARG_NUMBER_CE_DELAY, "CE delay" },
+ { CA_ARG_NUMBER_CE_SCORE, "CE score" },
+ { CA_ARG_NUMBER_CE_VALUE, "CE value" },
+ { CA_ARG_UNDEFINED, " " },
+ { CA_ARG_ELEMENT_HEADLINE, "[CE value" },
+ { CA_ARG_ELEMENT_HEADLINE, " of" },
+ { CA_ARG_ELEMENT_HEADLINE, " element]" },
+ { CA_ARG_ELEMENT_TARGET, "target" },
+ { CA_ARG_ELEMENT_TRIGGER, "trigger" },
+
+ { -1, NULL }
+};
+
+static struct ValueTextInfo options_action_arg_envelope[] =
+{
+ { CA_ARG_NUMBER_HEADLINE, "[number]" },
+ { CA_ARG_1, "1" },
+ { CA_ARG_2, "2" },
+ { CA_ARG_3, "3" },
+ { CA_ARG_4, "4" },
+ { CA_ARG_UNDEFINED, " " },
+ { CA_ARG_ELEMENT_HEADLINE, "[element]" },
+ { CA_ARG_ELEMENT_TARGET, "target" },
+ { CA_ARG_ELEMENT_TRIGGER, "trigger" },
+
+ { -1, NULL }
+};
+
+static struct ValueTextInfo options_action_arg_key[] =
+{
+ { CA_ARG_NUMBER_HEADLINE, "[number]" },
+ { CA_ARG_1, "1" },
+ { CA_ARG_2, "2" },
+ { CA_ARG_3, "3" },
+ { CA_ARG_4, "4" },
+ { CA_ARG_5, "5" },
+ { CA_ARG_6, "6" },
+ { CA_ARG_7, "7" },
+ { CA_ARG_8, "8" },
+ { CA_ARG_UNDEFINED, " " },
+ { CA_ARG_ELEMENT_HEADLINE, "[element]" },
+ { CA_ARG_ELEMENT_TARGET, "target" },
+ { CA_ARG_ELEMENT_TRIGGER, "trigger" },
+
+ { -1, NULL }
+};
+
+static struct ValueTextInfo options_action_arg_speed[] =
+{
+ { CA_ARG_SPEED_HEADLINE, "[speed]" },
+ { CA_ARG_SPEED_NOT_MOVING, "frozen" },
+ { CA_ARG_SPEED_VERY_SLOW, "very slow" },
+ { CA_ARG_SPEED_SLOW, "slow" },
+ { CA_ARG_SPEED_NORMAL, "normal" },
+ { CA_ARG_SPEED_FAST, "fast" },
+ { CA_ARG_SPEED_VERY_FAST, "very fast" },
+ { CA_ARG_SPEED_EVEN_FASTER, "ultrafast" },
+ { CA_ARG_UNDEFINED, " " },
+ { CA_ARG_SPEED_SLOWER, "slower" },
+ { CA_ARG_SPEED_FASTER, "faster" },
+ { CA_ARG_UNDEFINED, " " },
+ { CA_ARG_SPEED_RESET, "reset" },
+
+ { -1, NULL }
+};
+
+static struct ValueTextInfo options_action_arg_shield[] =
+{
+ { CA_ARG_SHIELD_HEADLINE, "[shield]" },
+ { CA_ARG_SHIELD_OFF, "off" },
+ { CA_ARG_SHIELD_NORMAL, "normal" },
+ { CA_ARG_SHIELD_DEADLY, "deadly" },
+
+ { -1, NULL }
+};
+
+static struct ValueTextInfo options_action_arg_artwork[] =
+{
+ { CA_ARG_ELEMENT_HEADLINE, "[element]" },
+ { CA_ARG_ELEMENT_TARGET, "target" },
+ { CA_ARG_ELEMENT_TRIGGER, "trigger" },
+
+ { -1, NULL }
+};
+
+static struct ValueTextInfo options_action_arg_gravity[] =
+{
+ { CA_ARG_GRAVITY_HEADLINE, "[gravity]" },
+ { CA_ARG_GRAVITY_ON, "on" },
+ { CA_ARG_GRAVITY_OFF, "off" },
+ { CA_ARG_GRAVITY_TOGGLE, "toggle" },
+
+ { -1, NULL }
+};
+
+static struct ValueTextInfo options_action_arg_direction[] =
+{
+ { CA_ARG_DIRECTION_HEADLINE, "[dir.]" },
+ { CA_ARG_DIRECTION_NONE, "none" },
+ { CA_ARG_DIRECTION_LEFT, "left" },
+ { CA_ARG_DIRECTION_RIGHT, "right" },
+ { CA_ARG_DIRECTION_UP, "up" },
+ { CA_ARG_DIRECTION_DOWN, "down" },
+ { CA_ARG_DIRECTION_TRIGGER, "trigger" },
+ { CA_ARG_DIRECTION_TRIGGER_BACK, "-trigger" },
+
{ -1, NULL }
};
{ ANIM_LINEAR, "linear" },
{ ANIM_PINGPONG, "pingpong" },
{ ANIM_PINGPONG2, "pingpong 2" },
+
{ -1, NULL }
};
+static struct ValueTextInfo *action_arg_modes[] =
+{
+ options_action_mode_none,
+ options_action_mode_assign,
+ options_action_mode_add_remove,
+ options_action_mode_calculate,
+};
+
+static struct
+{
+ int value;
+ int mode;
+ struct ValueTextInfo *options;
+}
+action_arg_options[] =
+{
+ { CA_NO_ACTION, 0, options_action_arg_none, },
+ { CA_EXIT_PLAYER, 0, options_action_arg_player, },
+ { CA_KILL_PLAYER, 0, options_action_arg_player, },
+ { CA_MOVE_PLAYER, 0, options_action_arg_direction, },
+ { CA_RESTART_LEVEL, 0, options_action_arg_none, },
+ { CA_SHOW_ENVELOPE, 0, options_action_arg_envelope, },
+ { CA_SET_LEVEL_TIME, 3, options_action_arg_number, },
+ { CA_SET_LEVEL_GEMS, 3, options_action_arg_number, },
+ { CA_SET_LEVEL_SCORE, 3, options_action_arg_number, },
+ { CA_SET_LEVEL_GRAVITY, 1, options_action_arg_gravity, },
+ { CA_SET_LEVEL_WIND, 1, options_action_arg_direction, },
+ { CA_SET_PLAYER_KEYS, 2, options_action_arg_key, },
+ { CA_SET_PLAYER_SPEED, 1, options_action_arg_speed, },
+ { CA_SET_PLAYER_SHIELD, 1, options_action_arg_shield, },
+ { CA_SET_PLAYER_ARTWORK, 1, options_action_arg_artwork, },
+ { CA_SET_CE_SCORE, 3, options_action_arg_number, },
+ { CA_SET_CE_VALUE, 3, options_action_arg_number, },
+
+ { -1, FALSE, NULL }
+};
+
static struct
{
int x, y;
char *text_left, *text_right, *infotext;
} selectbox_info[ED_NUM_SELECTBOX] =
{
- /* ---------- element settings: configure 1 (custom elements) ----------- */
+ /* ---------- level and editor settings ---------------------------------- */
+
+ {
+ -1, ED_LEVEL_SETTINGS_YPOS(8),
+ GADGET_ID_TIME_OR_STEPS, GADGET_ID_LEVEL_TIMELIMIT_UP,
+ -1,
+ options_time_or_steps,
+ &level.use_step_counter,
+ NULL, "(0 => no limit)", "time or step limit"
+ },
+ {
+ 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 (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,
&custom_element.walk_to_action,
NULL, NULL, "diggable/collectible/pushable"
},
+
+ /* ---------- element settings: configure 2 (custom elements) ------------ */
+
{
- ED_SETTINGS_XPOS(1), ED_SETTINGS_YPOS(8),
+ ED_ELEMENT_SETTINGS_XPOS(1), ED_ELEMENT_SETTINGS_YPOS(1),
GADGET_ID_CUSTOM_MOVE_PATTERN, GADGET_ID_NONE,
-1,
options_move_pattern,
&custom_element.move_pattern,
- "can move", NULL, "element move direction"
+ "can move", NULL, "element move pattern"
},
{
- ED_SETTINGS_XPOS(1), ED_SETTINGS_YPOS(9),
+ 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(11),
+ 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(10),
+ 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(13),
+ -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(14),
+ ED_ELEMENT_SETTINGS_XPOS(1), ED_ELEMENT_SETTINGS_YPOS(8),
GADGET_ID_CUSTOM_SLIPPERY_TYPE, GADGET_ID_NONE,
-1,
options_slippery_type,
&custom_element.slippery_type,
"slippery", NULL, "where other elements fall down"
},
-
- /* ---------- element settings: configure 2 (custom elements) ----------- */
-
{
- ED_SETTINGS_XPOS(1), ED_SETTINGS_YPOS(1),
+ 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(2),
- GADGET_ID_CUSTOM_CONSISTENCY, GADGET_ID_NONE,
+ ED_ELEMENT_SETTINGS_XPOS(1), ED_ELEMENT_SETTINGS_YPOS(10),
+ GADGET_ID_CUSTOM_EXPLOSION_TYPE, GADGET_ID_NONE,
-1,
- options_consistency,
- &custom_element.consistency,
- NULL, NULL, "consistency/destructibility"
+ options_explosion_type,
+ &custom_element.explosion_type,
+ "can explode", NULL, "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),
- GADGET_ID_CHANGE_SIDES, GADGET_ID_NONE,
+ ED_ELEMENT_SETTINGS_XPOS(2), ED_ELEMENT_SETTINGS_YPOS(6),
+ GADGET_ID_CHANGE_SIDE, GADGET_ID_NONE,
-1,
- options_change_sides,
- &custom_element_change.sides,
- "... at", NULL, "element side that causes change"
+ options_change_trigger_side,
+ &custom_element_change.trigger_side,
+ "at", "side", "element side triggering change"
},
{
- ED_SETTINGS_XPOS(2), ED_SETTINGS_YPOS(9),
- GADGET_ID_CHANGE_POWER, GADGET_ID_NONE,
+ ED_ELEMENT_SETTINGS_XPOS(2), ED_ELEMENT_SETTINGS_YPOS(7),
+ GADGET_ID_CHANGE_PLAYER, GADGET_ID_NONE,
-1,
- options_change_power,
- &custom_element_change.power,
+ options_change_trigger_player,
+ &custom_element_change.trigger_player,
+ "player:", " ", "player that causes change"
+ },
+ {
+ ED_ELEMENT_SETTINGS_XPOS(2), ED_ELEMENT_SETTINGS_YPOS(7),
+ GADGET_ID_CHANGE_PAGE, GADGET_ID_CHANGE_PLAYER,
+ -1,
+ options_change_trigger_page,
+ &custom_element_change.trigger_page,
+ "page:", NULL, "change page that causes change"
+ },
+ {
+ ED_ELEMENT_SETTINGS_XPOS(2), ED_ELEMENT_SETTINGS_YPOS(10),
+ GADGET_ID_CHANGE_REPLACE_WHEN, GADGET_ID_NONE,
+ -1,
+ options_change_replace_when,
+ &custom_element_change.replace_when,
"replace when", NULL, "which elements can be replaced"
},
{
- ED_SETTINGS_XPOS(1), ED_SETTINGS_YPOS(13),
+ 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_none,
+ &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_none,
+ &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(13),
- GADGET_ID_ADD_CHANGE_PAGE, GADGET_ID_NEXT_CHANGE_PAGE,
+ -1, ED_ELEMENT_SETTINGS_YPOS(14),
+ GADGET_ID_ADD_CHANGE_PAGE, GADGET_ID_PASTE_CHANGE_PAGE,
-1, "New",
- " ", NULL, "Add new change page"
+ NULL, NULL, "Add new change page"
},
{
- -1, ED_SETTINGS_YPOS(13),
+ -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(13),
+ 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(13),
+ -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_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_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"
+ },
};
static struct
/* ---------- 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(0),
+ 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(1),
+ GADGET_ID_USE_TIME_ORB_BUG, GADGET_ID_NONE,
+ &level.use_time_orb_bug,
+ NULL,
+ "use time orb bug", "use odd time orb behaviour"
+ },
+ {
+ 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_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(5),
+ GADGET_ID_BLOCK_SNAP_FIELD, GADGET_ID_NONE,
+ &level.block_snap_field,
+ NULL,
+ "block snap field when snapping", "use snapping delay to show animation"
+ },
+ {
+ 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(0),
+ 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(0),
+ 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_ELEMENT_SETTINGS_XPOS(0), ED_ELEMENT_SETTINGS_YPOS(6),
+ GADGET_ID_USE_START_ELEMENT, GADGET_ID_NONE,
+ &level.use_start_element[0],
+ NULL,
+ "use level start element:", "start level at this element's position"
+ },
+ {
+ 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_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_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_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,
+ "deadly when colliding with", "element is deadly when hitting player"
+ },
/* ---------- 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,
- NULL, "use graphic of element:", "use graphic for custom element"
+
+ /* !!! add separate "use existing element sound" !!! */
+#if 0
+ NULL, "use graphic/sound of element:", "use existing graphic and sound"
+#else
+ NULL, "use graphic of element:", "use existing element graphic"
+#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(5),
+ 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_ELEMENT_SETTINGS_XPOS(0), ED_ELEMENT_SETTINGS_YPOS(13),
+ GADGET_ID_CUSTOM_USE_LAST_VALUE, GADGET_ID_NONE,
+ &custom_element.use_last_ce_value,
+ NULL, "use last CE value after change", "use last CE value after change"
+ },
+ {
+ 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(8),
+ 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_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 in some direction"
+ NULL, NULL, "element can move with some pattern"
},
{
- ED_SETTINGS_XPOS(0), ED_SETTINGS_YPOS(13),
+ 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(13),
+ -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(14),
+ 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"
},
-
- /* ---------- element settings: configure 2 (custom elements) ----------- */
-
{
- ED_SETTINGS_XPOS(0), ED_SETTINGS_YPOS(1),
+ 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(2),
- GADGET_ID_CUSTOM_EXPLODE_RESULT, GADGET_ID_NONE,
- &custom_element_properties[EP_EXPLODE_RESULT],
- NULL, NULL, "set consistency/destructibility"
+ 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(3),
+ ED_ELEMENT_SETTINGS_XPOS(1), ED_ELEMENT_SETTINGS_YPOS(11),
GADGET_ID_CUSTOM_EXPLODE_FIRE, GADGET_ID_NONE,
- &custom_element.can_explode_by_fire,
+ &custom_element_properties[EP_EXPLODES_BY_FIRE],
NULL, "by fire", "element can explode by fire/explosion"
},
{
- -1, ED_SETTINGS_YPOS(3),
+ -1, ED_ELEMENT_SETTINGS_YPOS(11),
GADGET_ID_CUSTOM_EXPLODE_SMASH, GADGET_ID_CUSTOM_EXPLODE_FIRE,
- &custom_element.can_explode_smashed,
+ &custom_element_properties[EP_EXPLODES_SMASHED],
" ", "smashed", "element can explode when smashed"
},
{
- -1, ED_SETTINGS_YPOS(3),
+ -1, ED_ELEMENT_SETTINGS_YPOS(11),
GADGET_ID_CUSTOM_EXPLODE_IMPACT, GADGET_ID_CUSTOM_EXPLODE_SMASH,
- &custom_element.can_explode_impact,
+ &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(7),
+ 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(8),
+ ED_ELEMENT_SETTINGS_XPOS(1), ED_ELEMENT_SETTINGS_YPOS(9),
GADGET_ID_CHANGE_USE_CONTENT, GADGET_ID_NONE,
- &custom_element_change.use_content,
+ &custom_element_change.use_target_content,
NULL, "use extended change target:","element changes to more elements"
},
{
- ED_SETTINGS_XPOS(2), ED_SETTINGS_YPOS(10),
+ ED_ELEMENT_SETTINGS_XPOS(2), ED_ELEMENT_SETTINGS_YPOS(11),
GADGET_ID_CHANGE_ONLY_COMPLETE, GADGET_ID_NONE,
- &custom_element_change.only_complete,
+ &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(11),
+ ED_ELEMENT_SETTINGS_XPOS(2), ED_ELEMENT_SETTINGS_YPOS(12),
GADGET_ID_CHANGE_USE_RANDOM, GADGET_ID_NONE,
- &custom_element_change.use_random_change,
+ &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
{
int x, y;
- int area_xsize, area_ysize;
int gadget_id;
int gadget_id_align;
- char *text_left, *text_right, *text_below;
+ int *value;
+ int area_xsize, area_ysize;
+ char *text_left, *text_right, *text_below, *infotext;
} drawingarea_info[ED_NUM_DRAWING_AREAS] =
{
/* ---------- level playfield content ------------------------------------ */
{
- 0, 0,
- MAX_ED_FIELDX, MAX_ED_FIELDY,
+ 0, 0,
GADGET_ID_DRAWING_LEVEL, GADGET_ID_NONE,
- NULL, NULL, NULL
+ NULL, MAX_ED_FIELDX, MAX_ED_FIELDY,
+ NULL, NULL, NULL, NULL
},
/* ---------- yam yam content -------------------------------------------- */
{
ED_AREA_YAMYAM_CONTENT_XPOS(0), ED_AREA_YAMYAM_CONTENT_YPOS(0),
- 3, 3,
- GADGET_ID_ELEMENT_CONTENT_0, GADGET_ID_NONE,
- NULL, NULL, "1"
+ GADGET_ID_YAMYAM_CONTENT_0, GADGET_ID_NONE,
+ &level.yamyam_content[0].e[0][0], 3, 3,
+ NULL, NULL, "1", NULL
},
{
ED_AREA_YAMYAM_CONTENT_XPOS(1), ED_AREA_YAMYAM_CONTENT_YPOS(1),
- 3, 3,
- GADGET_ID_ELEMENT_CONTENT_1, GADGET_ID_NONE,
- NULL, NULL, "2"
+ GADGET_ID_YAMYAM_CONTENT_1, GADGET_ID_NONE,
+ &level.yamyam_content[1].e[0][0], 3, 3,
+ NULL, NULL, "2", NULL
},
{
ED_AREA_YAMYAM_CONTENT_XPOS(2), ED_AREA_YAMYAM_CONTENT_YPOS(2),
- 3, 3,
- GADGET_ID_ELEMENT_CONTENT_2, GADGET_ID_NONE,
- NULL, NULL, "3"
+ GADGET_ID_YAMYAM_CONTENT_2, GADGET_ID_NONE,
+ &level.yamyam_content[2].e[0][0], 3, 3,
+ NULL, NULL, "3", NULL
},
{
ED_AREA_YAMYAM_CONTENT_XPOS(3), ED_AREA_YAMYAM_CONTENT_YPOS(3),
- 3, 3,
- GADGET_ID_ELEMENT_CONTENT_3, GADGET_ID_NONE,
- NULL, NULL, "4"
+ GADGET_ID_YAMYAM_CONTENT_3, GADGET_ID_NONE,
+ &level.yamyam_content[3].e[0][0], 3, 3,
+ NULL, NULL, "4", NULL
},
{
ED_AREA_YAMYAM_CONTENT_XPOS(4), ED_AREA_YAMYAM_CONTENT_YPOS(4),
- 3, 3,
- GADGET_ID_ELEMENT_CONTENT_4, GADGET_ID_NONE,
- NULL, NULL, "5"
+ GADGET_ID_YAMYAM_CONTENT_4, GADGET_ID_NONE,
+ &level.yamyam_content[4].e[0][0], 3, 3,
+ NULL, NULL, "5", NULL
},
{
ED_AREA_YAMYAM_CONTENT_XPOS(5), ED_AREA_YAMYAM_CONTENT_YPOS(5),
- 3, 3,
- GADGET_ID_ELEMENT_CONTENT_5, GADGET_ID_NONE,
- NULL, NULL, "6"
+ GADGET_ID_YAMYAM_CONTENT_5, GADGET_ID_NONE,
+ &level.yamyam_content[5].e[0][0], 3, 3,
+ NULL, NULL, "6", NULL
},
{
ED_AREA_YAMYAM_CONTENT_XPOS(6), ED_AREA_YAMYAM_CONTENT_YPOS(6),
- 3, 3,
- GADGET_ID_ELEMENT_CONTENT_6, GADGET_ID_NONE,
- NULL, NULL, "7"
+ GADGET_ID_YAMYAM_CONTENT_6, GADGET_ID_NONE,
+ &level.yamyam_content[6].e[0][0], 3, 3,
+ NULL, NULL, "7", NULL
},
{
ED_AREA_YAMYAM_CONTENT_XPOS(7), ED_AREA_YAMYAM_CONTENT_YPOS(7),
- 3, 3,
- GADGET_ID_ELEMENT_CONTENT_7, GADGET_ID_NONE,
- NULL, NULL, "8"
+ GADGET_ID_YAMYAM_CONTENT_7, GADGET_ID_NONE,
+ &level.yamyam_content[7].e[0][0], 3, 3,
+ NULL, NULL, "8", NULL
+ },
+
+ /* ---------- magic ball content ----------------------------------------- */
+
+ {
+ ED_AREA_MAGIC_BALL_CONTENT_XPOS(0), ED_AREA_MAGIC_BALL_CONTENT_YPOS(0),
+ GADGET_ID_MAGIC_BALL_CONTENT_0, GADGET_ID_NONE,
+ &level.ball_content[0].e[0][0], 3, 3,
+ NULL, NULL, "1", NULL
+ },
+ {
+ ED_AREA_MAGIC_BALL_CONTENT_XPOS(1), ED_AREA_MAGIC_BALL_CONTENT_YPOS(1),
+ GADGET_ID_MAGIC_BALL_CONTENT_1, GADGET_ID_NONE,
+ &level.ball_content[1].e[0][0], 3, 3,
+ NULL, NULL, "2", NULL
+ },
+ {
+ ED_AREA_MAGIC_BALL_CONTENT_XPOS(2), ED_AREA_MAGIC_BALL_CONTENT_YPOS(2),
+ GADGET_ID_MAGIC_BALL_CONTENT_2, GADGET_ID_NONE,
+ &level.ball_content[2].e[0][0], 3, 3,
+ NULL, NULL, "3", NULL
+ },
+ {
+ ED_AREA_MAGIC_BALL_CONTENT_XPOS(3), ED_AREA_MAGIC_BALL_CONTENT_YPOS(3),
+ GADGET_ID_MAGIC_BALL_CONTENT_3, GADGET_ID_NONE,
+ &level.ball_content[3].e[0][0], 3, 3,
+ NULL, NULL, "4", NULL
+ },
+ {
+ ED_AREA_MAGIC_BALL_CONTENT_XPOS(4), ED_AREA_MAGIC_BALL_CONTENT_YPOS(4),
+ GADGET_ID_MAGIC_BALL_CONTENT_4, GADGET_ID_NONE,
+ &level.ball_content[4].e[0][0], 3, 3,
+ NULL, NULL, "5", NULL
+ },
+ {
+ ED_AREA_MAGIC_BALL_CONTENT_XPOS(5), ED_AREA_MAGIC_BALL_CONTENT_YPOS(5),
+ GADGET_ID_MAGIC_BALL_CONTENT_5, GADGET_ID_NONE,
+ &level.ball_content[5].e[0][0], 3, 3,
+ NULL, NULL, "6", NULL
+ },
+ {
+ ED_AREA_MAGIC_BALL_CONTENT_XPOS(6), ED_AREA_MAGIC_BALL_CONTENT_YPOS(6),
+ GADGET_ID_MAGIC_BALL_CONTENT_6, GADGET_ID_NONE,
+ &level.ball_content[6].e[0][0], 3, 3,
+ NULL, NULL, "7", NULL
+ },
+ {
+ ED_AREA_MAGIC_BALL_CONTENT_XPOS(7), ED_AREA_MAGIC_BALL_CONTENT_YPOS(7),
+ GADGET_ID_MAGIC_BALL_CONTENT_7, GADGET_ID_NONE,
+ &level.ball_content[7].e[0][0], 3, 3,
+ NULL, NULL, "8", NULL
},
/* ---------- amoeba content --------------------------------------------- */
{
- ED_AREA_AMOEBA_CONTENT_XPOS, ED_AREA_AMOEBA_CONTENT_YPOS,
- 1, 1,
+ ED_AREA_1X1_SETTINGS_XPOS(0), ED_AREA_1X1_SETTINGS_YPOS(3),
GADGET_ID_AMOEBA_CONTENT, GADGET_ID_NONE,
- "content:", NULL, NULL
+ &level.amoeba_content, 1, 1,
+ "content:", NULL, NULL, "amoeba content"
},
+ /* ---------- level start element ---------------------------------------- */
+
+ {
+ -1, ED_AREA_1X1_SETTINGS_YPOS(6),
+ GADGET_ID_START_ELEMENT, GADGET_ID_USE_START_ELEMENT,
+ &level.start_element[0], 1, 1,
+ NULL, NULL, NULL, "level start element"
+ },
+
+ /* ---------- element settings: configure 1 (custom elements) ----------- */
+
/* ---------- custom graphic --------------------------------------------- */
{
- -1, ED_AREA_ELEM_CONTENT3_YPOS,
- 1, 1,
+ -1, ED_AREA_1X1_SETTINGS_YPOS(1),
GADGET_ID_CUSTOM_GRAPHIC, GADGET_ID_CUSTOM_USE_GRAPHIC,
- NULL, NULL, NULL
+ &custom_element.gfx_element, 1, 1,
+ NULL, NULL, NULL, "custom graphic element"
},
+ /* ---------- element settings: configure 2 (custom elements) ----------- */
+
/* ---------- custom content (when exploding) ---------------------------- */
{
- ED_AREA_ELEM_CONTENT4_XPOS, ED_AREA_ELEM_CONTENT4_YPOS,
- 3, 3,
+ -1, ED_AREA_3X3_SETTINGS_YPOS(10),
GADGET_ID_CUSTOM_CONTENT, GADGET_ID_NONE, /* align three rows */
- "content:", NULL, NULL
+ &custom_element.content.e[0][0], 3, 3,
+ "content:", NULL, NULL, NULL
},
/* ---------- custom enter and leave element (when moving) --------------- */
{
- ED_SETTINGS_XPOS(1), ED_AREA_ELEM_CONTENT4a_YPOS,
- 1, 1,
+ ED_AREA_1X1_SETTINGS_XPOS(1), ED_AREA_1X1_SETTINGS_YPOS(3),
GADGET_ID_CUSTOM_MOVE_ENTER, GADGET_ID_NONE,
- "can dig:", " ", NULL
+ &custom_element.move_enter_element, 1, 1,
+ "can dig:", " ", NULL, "element that can be digged/collected"
},
{
- -1, ED_AREA_ELEM_CONTENT4b_YPOS,
- 1, 1,
+ -1, ED_AREA_1X1_SETTINGS_YPOS(3),
GADGET_ID_CUSTOM_MOVE_LEAVE, GADGET_ID_CUSTOM_MOVE_LEAVE_TYPE,
- NULL, NULL, NULL
+ &custom_element.move_leave_element, 1, 1,
+ NULL, NULL, NULL, "element that will be left behind"
},
+ /* ---------- element settings: advanced (custom elements) --------------- */
+
/* ---------- custom change target --------------------------------------- */
{
- -1, ED_AREA_ELEM_CONTENT2_YPOS,
- 1, 1,
+ -1, ED_AREA_1X1_SETTINGS_YPOS(1),
GADGET_ID_CUSTOM_CHANGE_TARGET, GADGET_ID_CUSTOM_CAN_CHANGE,
- NULL, "after/when:", NULL
+ &custom_element_change.target_element, 1, 1,
+ NULL, "after/when:", NULL, "new target element after change"
},
/* ---------- custom change content (extended change target) ------------- */
{
- ED_AREA_ELEM_CONTENT6_XPOS, ED_AREA_ELEM_CONTENT6_YPOS,
- 3, 3,
+ -1, ED_AREA_3X3_SETTINGS_YPOS(10),
GADGET_ID_CUSTOM_CHANGE_CONTENT, GADGET_ID_NONE, /* align three rows */
- NULL, NULL, NULL
+ &custom_element_change.target_content.e[0][0], 3, 3,
+ NULL, NULL, NULL, "new extended elements after change"
},
/* ---------- custom change trigger (element causing change) ------------- */
{
- -1, ED_AREA_ELEM_CONTENT5_YPOS,
- 1, 1,
+ -1, ED_AREA_1X1_SETTINGS_YPOS(5),
GADGET_ID_CUSTOM_CHANGE_TRIGGER, GADGET_ID_CHANGE_OTHER_ACTION,
- NULL, NULL, NULL
+ &custom_element_change.trigger_element, 1, 1,
+ NULL, NULL, NULL, "other element triggering change"
},
/* ---------- group element content -------------------------------------- */
{
- ED_AREA_GROUP_CONTENT_XPOS, ED_AREA_GROUP_CONTENT_YPOS,
- MAX_ELEMENTS_IN_GROUP, 1,
+ ED_AREA_1X1_SETTINGS_XPOS(0), ED_AREA_1X1_SETTINGS_YPOS(4),
GADGET_ID_GROUP_CONTENT, GADGET_ID_NONE,
- "content:", NULL, NULL
+ &group_element_info.element[0], MAX_ELEMENTS_IN_GROUP, 1,
+ "content:", NULL, NULL, NULL
},
/* ---------- random background (for random painting) -------------------- */
{
- -1, ED_AREA_RANDOM_BACKGROUND_YPOS,
- 1, 1,
+ -1, ED_ELEMENT_SETTINGS_YPOS(14),
GADGET_ID_RANDOM_BACKGROUND, GADGET_ID_RANDOM_RESTRICTED,
- NULL, NULL, NULL
+ &random_placement_background_element, 1, 1,
+ NULL, NULL, NULL, "random placement background"
},
};
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 ModifyEditorSelectboxValue(int, int);
+static void ModifyEditorSelectboxOptions(int, struct ValueTextInfo *);
static void ModifyEditorDrawingArea(int, int, int);
static void ModifyEditorElementList();
static void RedrawDrawingElements();
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 num_editor_hl_emerald_mine=SIZEOF_ARRAY_INT(editor_hl_emerald_mine);
static int num_editor_el_emerald_mine=SIZEOF_ARRAY_INT(editor_el_emerald_mine);
+static int editor_hl_emerald_mine_club[] =
+{
+ EL_CHAR('E'),
+ EL_CHAR('M'),
+ EL_CHAR('E'),
+ EL_CHAR('-'),
+
+ EL_CHAR('R'),
+ EL_CHAR('A'),
+ EL_CHAR('L'),
+ EL_CHAR('D'),
+
+ EL_CHAR('M'),
+ EL_CHAR('I'),
+ EL_CHAR('N'),
+ EL_CHAR('E'),
+
+ EL_CHAR('C'),
+ EL_CHAR('L'),
+ EL_CHAR('U'),
+ EL_CHAR('B'),
+};
+
+static int editor_el_emerald_mine_club[] =
+{
+ EL_EMC_KEY_5,
+ EL_EMC_KEY_6,
+ EL_EMC_KEY_7,
+ EL_EMC_KEY_8,
+
+ EL_EMC_GATE_5,
+ EL_EMC_GATE_6,
+ EL_EMC_GATE_7,
+ EL_EMC_GATE_8,
+
+ 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_STEELWALL_3,
+ EL_EMC_STEELWALL_4,
+
+ EL_EMC_WALL_13,
+ EL_EMC_WALL_14,
+ EL_EMC_WALL_15,
+ EL_EMC_WALL_16,
+
+ EL_EMC_WALL_SLIPPERY_1,
+ EL_EMC_WALL_SLIPPERY_2,
+ EL_EMC_WALL_SLIPPERY_3,
+ EL_EMC_WALL_SLIPPERY_4,
+
+ EL_EMC_WALL_1,
+ EL_EMC_WALL_2,
+ EL_EMC_WALL_3,
+ EL_EMC_WALL_4,
+
+ EL_EMC_WALL_5,
+ EL_EMC_WALL_6,
+ EL_EMC_WALL_7,
+ EL_EMC_WALL_8,
+
+ EL_EMC_WALL_9,
+ EL_EMC_WALL_10,
+ 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_BALLOON_SWITCH_UP,
+ EL_BALLOON_SWITCH_DOWN,
+
+ 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
+
+#if RELEASE_3_1_2
+ EL_EMPTY,
+#else
+ EL_EMC_DRIPPER,
+#endif
+ EL_EMC_FAKE_GRASS,
+ EL_EMPTY,
+ EL_EMPTY,
+};
+static int *editor_hl_emerald_mine_club_ptr = editor_hl_emerald_mine_club;
+static int *editor_el_emerald_mine_club_ptr = editor_el_emerald_mine_club;
+static int num_editor_hl_emerald_mine_club=SIZEOF_ARRAY_INT(editor_hl_emerald_mine_club);
+static int num_editor_el_emerald_mine_club=SIZEOF_ARRAY_INT(editor_el_emerald_mine_club);
+
static int editor_hl_more[] =
{
EL_CHAR('M'),
EL_SPACESHIP,
EL_MOLE_DOWN,
- EL_BALLOON,
- EL_BALLOON_SWITCH_ANY,
-
- EL_BALLOON_SWITCH_LEFT,
- EL_BALLOON_SWITCH_RIGHT,
- EL_BALLOON_SWITCH_UP,
- EL_BALLOON_SWITCH_DOWN,
+ EL_EMPTY,
+ EL_EMPTY,
EL_SATELLITE,
EL_EXPANDABLE_WALL_HORIZONTAL,
EL_INVISIBLE_WALL,
EL_SPEED_PILL,
EL_BLACK_ORB,
-
- EL_EMC_STEELWALL_1,
- EL_EMC_WALL_1,
- EL_EMC_WALL_2,
- EL_EMC_WALL_3,
-
- EL_EMC_WALL_4,
- EL_EMC_WALL_5,
- EL_EMC_WALL_6,
- EL_EMC_WALL_7,
};
static int *editor_hl_more_ptr = editor_hl_more;
static int *editor_el_more_ptr = editor_el_more;
static int editor_el_dx_boulderdash[] =
{
- EL_SPRING,
+ EL_EMPTY,
EL_TUBE_RIGHT_DOWN,
EL_TUBE_HORIZONTAL_DOWN,
EL_TUBE_LEFT_DOWN,
static int num_editor_hl_custom_more = SIZEOF_ARRAY_INT(editor_hl_custom_more);
static int num_editor_el_custom_more = SIZEOF_ARRAY_INT(editor_el_custom_more);
+static int editor_hl_custom_special[] =
+{
+};
+
+static int editor_el_custom_special[] =
+{
+ EL_TRIGGER_ELEMENT,
+ EL_TRIGGER_PLAYER,
+ EL_EMPTY,
+ EL_EMPTY
+};
+static int *editor_hl_custom_special_ptr = editor_hl_custom_special;
+static int *editor_el_custom_special_ptr = editor_el_custom_special;
+static int num_editor_hl_custom_special = SIZEOF_ARRAY_INT(editor_hl_custom_special);
+static int num_editor_el_custom_special = SIZEOF_ARRAY_INT(editor_el_custom_special);
+
static int editor_hl_group[] =
{
EL_CHAR('G'),
&editor_hl_emerald_mine_ptr, &num_editor_hl_emerald_mine,
&editor_el_emerald_mine_ptr, &num_editor_el_emerald_mine
},
+ {
+ &setup.editor.el_emerald_mine_club,
+ &editor_hl_emerald_mine_club_ptr, &num_editor_hl_emerald_mine_club,
+ &editor_el_emerald_mine_club_ptr, &num_editor_el_emerald_mine_club
+ },
{
&setup.editor.el_more,
&editor_hl_more_ptr, &num_editor_hl_more,
&editor_hl_custom_more_ptr, &num_editor_hl_custom_more,
&editor_el_custom_more_ptr, &num_editor_el_custom_more
},
+ {
+ &setup.editor.el_custom,
+ &editor_hl_custom_special_ptr, &num_editor_hl_custom_special,
+ &editor_el_custom_special_ptr, &num_editor_el_custom_special
+ },
{
&setup.editor.el_custom,
&editor_hl_group_ptr, &num_editor_hl_group,
}
};
-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 }
-};
-
/*
-----------------------------------------------------------------------------
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;
struct GadgetInfo *gi = level_editor_gadget[drawingarea_info[id].gadget_id];
int x, y;
- if (id == ED_DRAWING_ID_RANDOM_BACKGROUND)
- DrawMiniGraphicExt(drawto, gi->x, gi->y,
- el2edimg(random_placement_background_element));
- else if (id == ED_DRAWING_ID_AMOEBA_CONTENT)
- DrawMiniGraphicExt(drawto, gi->x, gi->y, el2edimg(level.amoeba_content));
- else if (id == ED_DRAWING_ID_CUSTOM_GRAPHIC)
- DrawMiniGraphicExt(drawto, gi->x, gi->y,
- el2edimg(custom_element.gfx_element));
- else if (id == ED_DRAWING_ID_CUSTOM_CONTENT)
- for (y = 0; y < 3; y++)
- for (x = 0; x < 3; x++)
- DrawMiniGraphicExt(drawto,
- gi->x + x * MINI_TILEX, gi->y + y * MINI_TILEY,
- el2edimg(custom_element.content[x][y]));
- else if (id == ED_DRAWING_ID_CUSTOM_MOVE_ENTER)
- DrawMiniGraphicExt(drawto, gi->x, gi->y,
- el2edimg(custom_element.move_enter_element));
- else if (id == ED_DRAWING_ID_CUSTOM_MOVE_LEAVE)
- DrawMiniGraphicExt(drawto, gi->x, gi->y,
- el2edimg(custom_element.move_leave_element));
- else if (id == ED_DRAWING_ID_CUSTOM_CHANGE_TARGET)
- DrawMiniGraphicExt(drawto, gi->x, gi->y,
- el2edimg(custom_element_change.target_element));
- else if (id == ED_DRAWING_ID_CUSTOM_CHANGE_CONTENT)
- for (y = 0; y < 3; y++)
- for (x = 0; x < 3; x++)
- DrawMiniGraphicExt(drawto,
- gi->x + x * MINI_TILEX, gi->y + y * MINI_TILEY,
- el2edimg(custom_element_change.content[x][y]));
- else if (id == ED_DRAWING_ID_CUSTOM_CHANGE_TRIGGER)
- DrawMiniGraphicExt(drawto, gi->x, gi->y,
- el2edimg(custom_element_change.trigger_element));
- else if (id == ED_DRAWING_ID_GROUP_CONTENT)
- for (x = 0; x < group_element_info.num_elements; x++)
- DrawMiniGraphicExt(drawto, gi->x + x * MINI_TILEX, gi->y,
- el2edimg(group_element_info.element[x]));
- else if (id >= ED_DRAWING_ID_ELEMENT_CONTENT_0 &&
- id <= ED_DRAWING_ID_ELEMENT_CONTENT_7)
- {
- int nr = id - ED_DRAWING_ID_ELEMENT_CONTENT_0;
+ int *value = drawingarea_info[id].value;
+ int area_xsize = drawingarea_info[id].area_xsize;
+ int area_ysize = drawingarea_info[id].area_ysize;
- for (y = 0; y < 3; y++)
- 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]));
- }
+ for (x = 0; x < area_xsize; x++)
+ for (y = 0; y < area_ysize; y++)
+ DrawMiniGraphicExt(drawto,
+ gi->x + x * MINI_TILEX,
+ gi->y + y * MINI_TILEY,
+ el2edimg(value[x * area_ysize + y]));
}
static void ScrollMiniLevel(int from_x, int from_y, int scroll)
gd_xoffset = ED_CTRL1_BUTTONS_XPOS + x * ED_CTRL1_BUTTON_XSIZE;
gd_yoffset = ED_CTRL1_BUTTONS_YPOS + y * ED_CTRL1_BUTTON_YSIZE;
- width = ED_CTRL1_BUTTON_XSIZE;
+ width = ED_CTRL1_BUTTON_XSIZE;
height = ED_CTRL1_BUTTON_YSIZE;
gd_x1 = DOOR_GFX_PAGEX8 + gd_xoffset;
gd_xoffset = ED_CTRL2_BUTTONS_XPOS + x * ED_CTRL2_BUTTON_XSIZE;
gd_yoffset = ED_CTRL2_BUTTONS_YPOS + y * ED_CTRL2_BUTTON_YSIZE;
- width = ED_CTRL2_BUTTON_XSIZE;
+ width = ED_CTRL2_BUTTON_XSIZE;
height = ED_CTRL2_BUTTON_YSIZE;
gd_x1 = DOOR_GFX_PAGEX8 + gd_xoffset;
gd_y1 = DOOR_GFX_PAGEY1 + ED_CTRL2_BUTTONS_GFX_YPOS + gd_yoffset;
gd_y2 = 0; /* no alternative graphic for these buttons */
}
- else
+ else if (id < ED_NUM_CTRL1_3_BUTTONS)
{
int x = (i - ED_NUM_CTRL1_2_BUTTONS) % ED_CTRL3_BUTTONS_HORIZ + 1;
int y = (i - ED_NUM_CTRL1_2_BUTTONS) / ED_CTRL3_BUTTONS_HORIZ;
gd_xoffset = ED_CTRL3_BUTTONS_XPOS + x * ED_CTRL3_BUTTON_XSIZE;
gd_yoffset = ED_CTRL3_BUTTONS_YPOS + y * ED_CTRL3_BUTTON_YSIZE;
- width = ED_CTRL3_BUTTON_XSIZE;
+ width = ED_CTRL3_BUTTON_XSIZE;
height = ED_CTRL3_BUTTON_YSIZE;
gd_x1 = DOOR_GFX_PAGEX6 + gd_xoffset;
gd_y1 = DOOR_GFX_PAGEY1 + ED_CTRL3_BUTTONS_GFX_YPOS + gd_yoffset;
gd_y2 = DOOR_GFX_PAGEY1 + ED_CTRL3_BUTTONS_ALT_GFX_YPOS + gd_yoffset;
}
+ else
+ {
+ int x = (i - ED_NUM_CTRL1_3_BUTTONS) % ED_CTRL4_BUTTONS_HORIZ;
+ int y = (i - ED_NUM_CTRL1_3_BUTTONS) / ED_CTRL4_BUTTONS_HORIZ + 3;
+
+ gd_xoffset = ED_CTRL4_BUTTONS_XPOS + x * ED_CTRL4_BUTTON_XSIZE;
+ gd_yoffset = ED_CTRL4_BUTTONS_YPOS + y * ED_CTRL4_BUTTON_YSIZE;
+ width = ED_CTRL4_BUTTON_XSIZE;
+ height = ED_CTRL4_BUTTON_YSIZE;
+
+ gd_x1 = DOOR_GFX_PAGEX6 + ED_CTRL4_BUTTONS_GFX_XPOS + gd_xoffset;
+ gd_x2 = DOOR_GFX_PAGEX5 + ED_CTRL4_BUTTONS_GFX_XPOS + gd_xoffset;
+ gd_y1 = DOOR_GFX_PAGEY1 + ED_CTRL4_BUTTONS_GFX_YPOS + gd_yoffset;
+ gd_y2 = 0; /* no alternative graphic for these buttons */
+ }
gi = CreateGadget(GDI_CUSTOM_ID, id,
GDI_CUSTOM_TYPE_ID, i,
GDI_NUMBER_VALUE, 0,
GDI_NUMBER_MIN, counterbutton_info[i].min_value,
GDI_NUMBER_MAX, counterbutton_info[i].max_value,
- GDI_TEXT_SIZE, 3,
+ GDI_TEXT_SIZE, 3, /* minimal counter text size */
GDI_TEXT_FONT, font_type,
GDI_TEXT_FONT_ACTIVE, font_type_active,
GDI_DESIGN_UNPRESSED, gd_bitmap, gd_x, gd_y,
event_mask = GD_EVENT_PRESSED | GD_EVENT_REPEATED;
- gd_x1 = DOOR_GFX_PAGEX4 + graphicbutton_info[i].gd_x;
- gd_x2 = DOOR_GFX_PAGEX3 + graphicbutton_info[i].gd_x;
- gd_y1 = DOOR_GFX_PAGEY1 + graphicbutton_info[i].gd_y;
- gd_y2 = gd_y1;
+ if (i <= ED_GRAPHICBUTTON_ID_NEXT_CHANGE_PAGE)
+ {
+ gd_x1 = DOOR_GFX_PAGEX4 + graphicbutton_info[i].gd_x;
+ gd_y1 = DOOR_GFX_PAGEY1 + graphicbutton_info[i].gd_y;
+ gd_x2 = DOOR_GFX_PAGEX3 + graphicbutton_info[i].gd_x;
+ gd_y2 = gd_y1;
+ }
+ else /* (i <= ED_GRAPHICBUTTON_ID_PASTE_CHANGE_PAGE) */
+ {
+ gd_x1 = DOOR_GFX_PAGEX6 + graphicbutton_info[i].gd_x;
+ gd_y1 = DOOR_GFX_PAGEY1 + graphicbutton_info[i].gd_y;
+ gd_x2 = gd_x1 - ED_BUTTON_COUNT_XSIZE;
+ gd_y2 = gd_y1;
+ }
/* determine horizontal position to the right of specified gadget */
if (graphicbutton_info[i].gadget_id_align != GADGET_ID_NONE)
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 yoffset = ED_BORDER_SIZE;
int x_left = gi_down->x - xoffset_left;
+#if 1
+ int x_right; /* set after gadget position was modified */
+#else
int x_right = gi_up->x + gi_up->width + xoffset_right;
+#endif
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 "score" counter gadget */
- if (id == ED_COUNTER_ID_ELEMENT_SCORE)
+ /* counter limits must be changed first to prevent value truncation */
+ ModifyEditorCounterLimits(id, counterbutton_info[id].min_value,
+ counterbutton_info[id].max_value);
+
+ /* right text position might have changed after setting position above */
+ x_right = gi_up->x + gi_up->width + xoffset_right;
+
+ 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);
ModifyGadget(gi_up, GDI_Y, SY + counterbutton_info[id].y, GDI_END);
}
+ /* vertical position might have changed after setting position above */
y = gi_up->y + yoffset;
if (counterbutton_info[id].text_above)
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);
if (selectbox_info[id].text_right)
DrawText(x_right, y, selectbox_info[id].text_right, FONT_TEXT_1);
- ModifyEditorSelectbox(id, *selectbox_info[id].value);
+ ModifyEditorSelectboxValue(id, *selectbox_info[id].value);
MapGadget(gi);
}
int xoffset_left = getTextWidthForGadget(checkbutton_info[id].text_left);
int xoffset_right = ED_GADGET_TEXT_DISTANCE;
int yoffset = ED_BORDER_SIZE;
- int x_left = gi->x - xoffset_left;
- int x_right = gi->x + gi->width + xoffset_right;
- int y; /* set after gadget position was modified */
+ int x_left, x_right, y; /* set after gadget position was modified */
- /* set position for "stickybutton" and "can move into acid" gadgets */
- if (id == ED_CHECKBUTTON_ID_STICK_ELEMENT ||
- id == ED_CHECKBUTTON_ID_CAN_MOVE_INTO_ACID)
- ModifyGadget(gi, GDI_Y, SY + checkbutton_info[id].y, GDI_END);
+ /* set position for gadgets with dynamically determined position */
+ if (checkbutton_info[id].x != -1) /* do not change dynamic positions */
+ ModifyGadget(gi, GDI_X, SX + checkbutton_info[id].x, GDI_END);
+ ModifyGadget(gi, GDI_Y, SY + checkbutton_info[id].y, GDI_END);
+ x_left = gi->x - xoffset_left;
+ x_right = gi->x + gi->width + xoffset_right;
y = gi->y + yoffset;
if (checkbutton_info[id].text_left)
{
if (i == GADGET_ID_CUSTOM_COPY_FROM ||
i == GADGET_ID_CUSTOM_COPY_TO ||
- i == GADGET_ID_CUSTOM_EXCHANGE)
+ i == GADGET_ID_CUSTOM_EXCHANGE ||
+ i == GADGET_ID_CUSTOM_COPY ||
+ i == GADGET_ID_CUSTOM_PASTE)
{
if (map)
MapGadget(level_editor_gadget[i]);
undo_buffer_position = -1;
undo_buffer_steps = -1;
CopyLevelToUndoBuffer(UNDO_IMMEDIATE);
+
+ level.changed = FALSE;
}
static void DrawEditModeWindow()
static boolean LevelChanged()
{
- boolean level_changed = FALSE;
+ boolean field_changed = FALSE;
int x, y;
+ if (leveldir_current->readonly)
+ return FALSE;
+
for (y = 0; y < lev_fieldy; y++)
for (x = 0; x < lev_fieldx; x++)
if (Feld[x][y] != level.field[x][y])
- level_changed = TRUE;
+ field_changed = TRUE;
- return level_changed;
+ return (level.changed || field_changed);
}
static boolean LevelContainsPlayer()
boolean player_found = FALSE;
int x, y;
+ return TRUE; /* !!! CURRENTLY DEACTIVATED !!! */
+
for (y = 0; y < lev_fieldy; y++)
for (x = 0; x < lev_fieldx; x++)
if (Feld[x][y] == EL_PLAYER_1 ||
return new_index_value;
}
-static void copy_custom_element_settings(int element_from, int element_to)
+static void setSelectboxSpecialActionOptions()
{
-#if 1
- 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];
+ /* change action mode and arg selectbox according to action type selectbox */
+ for (i = 0; action_arg_options[i].value != -1; i++)
+ {
+ if (action_arg_options[i].value == custom_element_change.action_type)
+ {
+ int mode = action_arg_options[i].mode;
- /* ---------- copy group element info ---------- */
- if (ei_from->group != NULL && ei_to->group != NULL) /* group or internal */
- *ei_to->group = *ei_from->group;
+ ModifyEditorSelectboxOptions(ED_SELECTBOX_ID_ACTION_MODE,
+ action_arg_modes[mode]);
+ ModifyEditorSelectboxValue(ED_SELECTBOX_ID_ACTION_MODE,
+ custom_element_change.action_mode);
-#else
+ ModifyEditorSelectboxOptions(ED_SELECTBOX_ID_ACTION_ARG,
+ action_arg_options[i].options);
+ ModifyEditorSelectboxValue(ED_SELECTBOX_ID_ACTION_ARG,
+ custom_element_change.action_arg);
+ }
+ }
+}
+static void copy_custom_element_settings(int element_from, int element_to)
+{
struct ElementInfo *ei_from = &element_info[element_from];
struct ElementInfo *ei_to = &element_info[element_to];
int i, x, y;
for (i = 0; i < MAX_ELEMENT_NAME_LEN + 1; i++)
ei_to->description[i] = ei_from->description[i];
- /* ---------- copy element properties ---------- */
+ /* ---------- copy element base properties ---------- */
Properties[element_to][EP_BITFIELD_BASE] =
Properties[element_from][EP_BITFIELD_BASE];
ei_to->use_gfx_element = ei_from->use_gfx_element;
ei_to->gfx_element = ei_from->gfx_element;
- ei_to->collect_score = ei_from->collect_score;
- ei_to->collect_count = ei_from->collect_count;
+ ei_to->access_direction = ei_from->access_direction;
+
+ ei_to->collect_score_initial = ei_from->collect_score_initial;
+ ei_to->collect_count_initial = ei_from->collect_count_initial;
+
+ ei_to->ce_value_fixed_initial = ei_from->ce_value_fixed_initial;
+ ei_to->ce_value_random_initial = ei_from->ce_value_random_initial;
+ ei_to->use_last_ce_value = ei_from->use_last_ce_value;
ei_to->push_delay_fixed = ei_from->push_delay_fixed;
ei_to->push_delay_random = ei_from->push_delay_random;
+ ei_to->drop_delay_fixed = ei_from->drop_delay_fixed;
+ ei_to->drop_delay_random = ei_from->drop_delay_random;
ei_to->move_delay_fixed = ei_from->move_delay_fixed;
ei_to->move_delay_random = ei_from->move_delay_random;
ei_to->move_direction_initial = ei_from->move_direction_initial;
ei_to->move_stepsize = ei_from->move_stepsize;
+ ei_to->move_enter_element = ei_from->move_enter_element;
+ ei_to->move_leave_element = ei_from->move_leave_element;
+ ei_to->move_leave_type = ei_from->move_leave_type;
+
ei_to->slippery_type = ei_from->slippery_type;
for (y = 0; y < 3; y++)
for (x = 0; x < 3; x++)
- ei_to->content[x][y] = ei_from->content[x][y];
-
- ei_to->num_change_pages = ei_from->num_change_pages;
- setElementChangePages(ei_to, ei_to->num_change_pages);
-
- for (i=0; i < ei_to->num_change_pages; i++)
- {
- struct ElementChangeInfo *change_to = &ei_to->change_page[i];
- struct ElementChangeInfo *change_from = &ei_from->change_page[i];
-
- /* always start with reliable default values */
- setElementChangeInfoToDefaults(change_to);
-
- change_to->events = change_from->events;
-
- change_to->target_element = change_from->target_element;
+ ei_to->content.e[x][y] = ei_from->content.e[x][y];
- change_to->delay_fixed = change_from->delay_fixed;
- change_to->delay_random = change_from->delay_random;
- change_to->delay_frames = change_from->delay_frames;
+ ei_to->explosion_type = ei_from->explosion_type;
+ ei_to->explosion_delay = ei_from->explosion_delay;
+ ei_to->ignition_delay = ei_from->ignition_delay;
- change_to->trigger_element = change_from->trigger_element;
-
- change_to->explode = change_from->explode;
- change_to->use_content = change_from->use_content;
- change_to->only_complete = change_from->only_complete;
- change_to->use_random_change = change_from->use_random_change;
+ /* ---------- reinitialize and copy change pages ---------- */
- change_to->random = change_from->random;
- change_to->power = change_from->power;
+ ei_to->num_change_pages = ei_from->num_change_pages;
+ ei_to->current_change_page = ei_from->current_change_page;
- for (y = 0; y < 3; y++)
- for (x = 0; x < 3; x++)
- change_to->content[x][y] = change_from->content[x][y];
+ setElementChangePages(ei_to, ei_to->num_change_pages);
- change_to->can_change = change_from->can_change;
+ for (i=0; i < ei_to->num_change_pages; i++)
+ ei_to->change_page[i] = ei_from->change_page[i];
- change_to->sides = change_from->sides;
- }
-#endif
+ /* ---------- copy group element info ---------- */
+ if (ei_from->group != NULL && ei_to->group != NULL) /* group or internal */
+ *ei_to->group = *ei_from->group;
/* 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->content[x][y] == element_from)
- change->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 */
static boolean CopyCustomElement(int element_old, int element_new,
int copy_mode)
{
- if (IS_CUSTOM_ELEMENT(element_old) && !IS_CUSTOM_ELEMENT(element_new))
+ if (copy_mode == GADGET_ID_CUSTOM_COPY)
+ {
+ element_new = (IS_CUSTOM_ELEMENT(element_old) ?
+ EL_INTERNAL_CLIPBOARD_CUSTOM : EL_INTERNAL_CLIPBOARD_GROUP);
+ copy_mode = GADGET_ID_CUSTOM_COPY_TO;
+ }
+ else if (copy_mode == GADGET_ID_CUSTOM_PASTE)
+ {
+ element_old = (IS_CUSTOM_ELEMENT(element_new) ?
+ EL_INTERNAL_CLIPBOARD_CUSTOM : EL_INTERNAL_CLIPBOARD_GROUP);
+ copy_mode = GADGET_ID_CUSTOM_COPY_TO;
+
+ level.changed = TRUE;
+ }
+ else if (IS_CUSTOM_ELEMENT(element_old) && !IS_CUSTOM_ELEMENT(element_new))
{
Request("Please choose custom element !", REQ_CONFIRM);
return FALSE;
}
+ else
+ {
+ level.changed = TRUE;
+ }
if (copy_mode == GADGET_ID_CUSTOM_COPY_FROM)
{
}
else if (copy_mode == GADGET_ID_CUSTOM_EXCHANGE)
{
- copy_custom_element_settings(element_old, EL_INTERNAL_EDITOR);
+ copy_custom_element_settings(element_old, EL_INTERNAL_DUMMY);
copy_custom_element_settings(element_new, element_old);
- copy_custom_element_settings(EL_INTERNAL_EDITOR, element_new);
+ copy_custom_element_settings(EL_INTERNAL_DUMMY, element_new);
- replace_custom_element_in_settings(element_old, EL_INTERNAL_EDITOR);
+ replace_custom_element_in_settings(element_old, EL_INTERNAL_DUMMY);
replace_custom_element_in_settings(element_new, element_old);
- replace_custom_element_in_settings(EL_INTERNAL_EDITOR, element_new);
+ replace_custom_element_in_settings(EL_INTERNAL_DUMMY, element_new);
- replace_custom_element_in_playfield(element_old, EL_INTERNAL_EDITOR);
+ replace_custom_element_in_playfield(element_old, EL_INTERNAL_DUMMY);
replace_custom_element_in_playfield(element_new, element_old);
- replace_custom_element_in_playfield(EL_INTERNAL_EDITOR, element_new);
+ replace_custom_element_in_playfield(EL_INTERNAL_DUMMY, element_new);
}
UpdateCustomElementGraphicGadgets();
custom_element = element_info[element];
custom_element_change = *element_info[element].change;
+ /* needed to initially set selectbox options for special action options */
+ setSelectboxSpecialActionOptions();
+
/* needed to initially set selectbox value variables to reliable defaults */
for (i = 0; i < ED_NUM_SELECTBOX; i++)
setSelectboxValue(i, *selectbox_info[i].value);
(IS_DIGGABLE(element) ? EP_DIGGABLE :
IS_COLLECTIBLE_ONLY(element) ? EP_COLLECTIBLE_ONLY :
IS_DROPPABLE(element) ? EP_DROPPABLE :
+ IS_THROWABLE(element) ? EP_THROWABLE :
IS_PUSHABLE(element) ? EP_PUSHABLE :
custom_element.walk_to_action);
custom_element_properties[EP_WALK_TO_OBJECT] =
(IS_DIGGABLE(element) ||
IS_COLLECTIBLE_ONLY(element) ||
IS_DROPPABLE(element) ||
+ IS_THROWABLE(element) ||
IS_PUSHABLE(element));
/* set smash targets selectbox help value */
DONT_COLLIDE_WITH(element) ||
DONT_RUN_INTO(element));
- /* set consistency selectbox help value */
- custom_element.consistency =
- (IS_INDESTRUCTIBLE(element) ? EP_INDESTRUCTIBLE :
- CAN_EXPLODE_1X1(element) ? EP_CAN_EXPLODE_1X1 :
- CAN_EXPLODE_3X3(element) ? EP_CAN_EXPLODE_3X3 :
- CAN_EXPLODE_DYNA(element) ? EP_CAN_EXPLODE_DYNA :
- custom_element.consistency);
- custom_element_properties[EP_EXPLODE_RESULT] =
- (IS_INDESTRUCTIBLE(element) ||
- CAN_EXPLODE_1X1(element) ||
- CAN_EXPLODE_3X3(element) ||
- CAN_EXPLODE_DYNA(element));
-
- /* special case: sub-settings dependent from main setting */
- 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;
-
/* ---------- element settings: advanced (custom elements) --------------- */
/* set "change by direct action" selectbox help value */
HAS_CHANGE_EVENT(element, CE_SWITCHED) ? CE_SWITCHED :
HAS_CHANGE_EVENT(element, CE_HITTING_SOMETHING) ? CE_HITTING_SOMETHING :
HAS_CHANGE_EVENT(element, CE_HIT_BY_SOMETHING) ? CE_HIT_BY_SOMETHING :
+ 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_VALUE_GETS_ZERO) ? CE_VALUE_GETS_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_VALUE_GETS_ZERO_OF_X) ? CE_VALUE_GETS_ZERO_OF_X :
custom_element_change.other_action);
}
static void CopyClassicElementPropertiesToEditor(int element)
{
-#if 1
- if (COULD_MOVE_INTO_ACID(element))
+ if (ELEM_IS_PLAYER(element) || COULD_MOVE_INTO_ACID(element))
custom_element_properties[EP_CAN_MOVE_INTO_ACID] =
getMoveIntoAcidProperty(&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 & (1 << bit_nr)) != 0);
- }
-#endif
+ if (MAYBE_DONT_COLLIDE_WITH(element))
+ custom_element_properties[EP_DONT_COLLIDE_WITH] =
+ getDontCollideWithProperty(&level, element);
}
static void CopyElementPropertiesToEditor(int element)
/* mark that this custom element has been modified */
custom_element.modified_settings = TRUE;
+ level.changed = TRUE;
if (level.use_custom_template)
{
custom_element_properties[EP_DIGGABLE] = FALSE;
custom_element_properties[EP_COLLECTIBLE_ONLY] = FALSE;
custom_element_properties[EP_DROPPABLE] = FALSE;
+ custom_element_properties[EP_THROWABLE] = FALSE;
custom_element_properties[EP_PUSHABLE] = FALSE;
custom_element_properties[custom_element.walk_to_action] =
custom_element_properties[EP_WALK_TO_OBJECT];
custom_element_properties[custom_element.deadliness] =
custom_element_properties[EP_DEADLY];
- /* set consistency property from checkbox and selectbox */
- custom_element_properties[EP_INDESTRUCTIBLE] = FALSE;
- custom_element_properties[EP_CAN_EXPLODE_1X1] = FALSE;
- custom_element_properties[EP_CAN_EXPLODE_3X3] = FALSE;
- custom_element_properties[EP_CAN_EXPLODE_DYNA] = 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.consistency] =
- custom_element_properties[EP_EXPLODE_RESULT];
-
- /* special case: sub-settings dependent from main setting */
- if (custom_element_properties[EP_CAN_EXPLODE_1X1] ||
- custom_element_properties[EP_CAN_EXPLODE_3X3] ||
- custom_element_properties[EP_CAN_EXPLODE_DYNA])
- {
- 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;
- }
-
/* ---------- element settings: advanced (custom elements) --------------- */
/* set player change event from checkbox and selectbox */
custom_element_change_events[CE_SWITCHED] = FALSE;
custom_element_change_events[CE_HITTING_SOMETHING] = FALSE;
custom_element_change_events[CE_HIT_BY_SOMETHING] = FALSE;
+ 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_VALUE_GETS_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_VALUE_GETS_ZERO_OF_X] = FALSE;
custom_element_change_events[custom_element_change.other_action] =
custom_element_change_events[CE_BY_OTHER_ACTION];
/* mark that this group element has been modified */
element_info[element].modified_settings = TRUE;
+ level.changed = TRUE;
}
static void CopyClassicElementPropertiesToGame(int element)
{
-#if 1
- if (COULD_MOVE_INTO_ACID(element))
+ if (ELEM_IS_PLAYER(element) || COULD_MOVE_INTO_ACID(element))
setMoveIntoAcidProperty(&level, element,
custom_element_properties[EP_CAN_MOVE_INTO_ACID]);
-#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 &= ~(1 << bit_nr);
-
- if (custom_element_properties[EP_CAN_MOVE_INTO_ACID])
- level.can_move_into_acid |= (1 << bit_nr);
- }
- }
-#endif
+ if (MAYBE_DONT_COLLIDE_WITH(element))
+ setDontCollideWithProperty(&level, element,
+ custom_element_properties[EP_DONT_COLLIDE_WITH]);
}
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(); /* only needed after setup changes */
-#if 0
- ModifyEditorElementList(); /* may be needed for custom elements */
-#endif
+ ReinitializeElementListButtons(); /* custom element may look different */
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;
struct GadgetInfo *gi = level_editor_gadget[gadget_id];
ModifyGadget(gi, GDI_NUMBER_MIN, min, GDI_NUMBER_MAX, max, GDI_END);
+
+ if (counter_id >= ED_COUNTER_ID_ELEMENT_VALUE1 &&
+ counter_id <= ED_COUNTER_ID_ELEMENT_VALUE4)
+ {
+ int gadget_id_up = counterbutton_info[counter_id].gadget_id_up;
+ struct GadgetInfo *gi_up = level_editor_gadget[gadget_id_up];
+
+ ModifyGadget(gi, GDI_TEXT_SIZE, (max < 10 ? 1 : 3), GDI_END);
+ ModifyGadget(gi_up, GDI_X, gi->x + gi->width + ED_GADGET_DISTANCE,GDI_END);
+ }
}
-static void ModifyEditorSelectbox(int selectbox_id, int new_value)
+static void ModifyEditorSelectboxValue(int selectbox_id, int new_value)
{
int gadget_id = selectbox_info[selectbox_id].gadget_id;
struct GadgetInfo *gi = level_editor_gadget[gadget_id];
ModifyGadget(gi, GDI_SELECTBOX_INDEX, new_index_value, GDI_END);
}
+static void ModifyEditorSelectboxOptions(int selectbox_id,
+ struct ValueTextInfo *options)
+{
+ int gadget_id = selectbox_info[selectbox_id].gadget_id;
+ struct GadgetInfo *gi = level_editor_gadget[gadget_id];
+
+ selectbox_info[selectbox_id].options = options;
+
+ /* set index to zero -- list may be shorter now (correct later, if needed) */
+ ModifyGadget(gi, GDI_SELECTBOX_INDEX, 0,
+ GDI_SELECTBOX_OPTIONS, options, GDI_END);
+}
+
static void ModifyEditorDrawingArea(int drawingarea_id, int xsize, int ysize)
{
int gadget_id = drawingarea_info[drawingarea_id].gadget_id;
for (i = ED_COUNTER_ID_LEVEL_FIRST; i <= ED_COUNTER_ID_LEVEL_LAST; i++)
MapCounterButtons(i);
+ /* draw selectbox gadgets */
+ for (i = ED_SELECTBOX_ID_LEVEL_FIRST; i <= ED_SELECTBOX_ID_LEVEL_LAST; i++)
+ MapSelectboxGadget(i);
+
/* draw checkbutton gadgets */
for (i=ED_CHECKBUTTON_ID_LEVEL_FIRST; i <= ED_CHECKBUTTON_ID_LEVEL_LAST; i++)
MapCheckbuttonGadget(i);
int id = ED_DRAWING_ID_CUSTOM_CONTENT;
struct GadgetInfo *gi = level_editor_gadget[drawingarea_info[id].gadget_id];
int x1 = right_gadget_border[GADGET_ID_CUSTOM_DEADLINESS];
- int x2 = right_gadget_border[GADGET_ID_CUSTOM_CONSISTENCY];
+ int x2 = right_gadget_border[GADGET_ID_CUSTOM_EXPLOSION_TYPE];
int x3 = right_gadget_border[GADGET_ID_CUSTOM_EXPLODE_IMPACT];
int xoffset = ED_DRAWINGAREA_TEXT_DISTANCE;
int id = ED_DRAWING_ID_CUSTOM_CHANGE_CONTENT;
struct GadgetInfo *gi = level_editor_gadget[drawingarea_info[id].gadget_id];
int x1 = right_gadget_border[GADGET_ID_CHANGE_USE_CONTENT];
- int x2 = right_gadget_border[GADGET_ID_CHANGE_POWER];
+ int x2 = right_gadget_border[GADGET_ID_CHANGE_REPLACE_WHEN];
int x3 = right_gadget_border[GADGET_ID_CHANGE_ONLY_COMPLETE];
int xoffset = ED_DRAWINGAREA_TEXT_DISTANCE;
MapDrawingArea(id);
}
-static void DrawElementContentAreas()
+static void DrawYamYamContentAreas()
{
int x = SX + ED_AREA_YAMYAM_CONTENT_XPOS(3) + 4 * MINI_TILEX;
int y = SY + ED_AREA_YAMYAM_CONTENT_YPOS(0) + ED_BORDER_AREA_YSIZE;
int i;
/* display counter to choose number of element content areas */
- MapCounterButtons(ED_COUNTER_ID_ELEMENT_CONTENT);
+ MapCounterButtons(ED_COUNTER_ID_YAMYAM_CONTENT);
for (i = 0; i < MAX_ELEMENT_CONTENTS; i++)
{
- int id = ED_DRAWING_ID_ELEMENT_CONTENT_0 + i;
- int font_height = getFontHeight(FONT_TEXT_1);
+ int id = ED_DRAWING_ID_YAMYAM_CONTENT_0 + i;
if (i < level.num_yamyam_contents)
+ {
MapDrawingArea(id);
+ }
else
{
+ int font_height = getFontHeight(FONT_TEXT_1);
+
UnmapDrawingArea(id);
/* delete content areas in case of reducing number of them */
DrawText(x, y + 2 * MINI_TILEY, "smashed", FONT_TEXT_1);
}
+static void DrawMagicBallContentAreas()
+{
+ int x = SX + ED_AREA_MAGIC_BALL_CONTENT_XPOS(3) + 4 * MINI_TILEX;
+ int y = SY + ED_AREA_MAGIC_BALL_CONTENT_YPOS(0) + ED_BORDER_AREA_YSIZE;
+ int 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);
+ DrawText(x, y + 1 * MINI_TILEY, "when", FONT_TEXT_1);
+ DrawText(x, y + 2 * MINI_TILEY, "active", FONT_TEXT_1);
+}
+
static void DrawGroupElementArea(int element)
{
int num_elements = group_element_info.num_elements;
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];
{ EP_PASSABLE_OVER, "- player can pass over it" },
{ EP_PASSABLE_INSIDE, "- player can pass through it" },
{ EP_PASSABLE_UNDER, "- player can pass under it" },
+ { EP_PROTECTED, "- player is protected by it" },
{ EP_DIGGABLE, "- can be digged away" },
{ EP_COLLECTIBLE, "- can be collected" },
{ EP_DROPPABLE, "- can be dropped after collecting" },
+ { EP_THROWABLE, "- can be thrown after collecting" },
{ EP_PUSHABLE, "- can be pushed" },
- { EP_CAN_MOVE, "- can move" },
{ EP_CAN_FALL, "- can fall" },
+ { EP_CAN_MOVE, "- can move" },
{ EP_CAN_SMASH_PLAYER, "- can smash player" },
#if 0
#endif
{ EP_CAN_SMASH_EVERYTHING, "- can smash everything smashable" },
- { EP_SLIPPERY, "- slippery for falling objects" },
+ { EP_SLIPPERY, "- slippery for falling elements" },
{ EP_EM_SLIPPERY_WALL, "- slippery for some gems (EM style)" },
{ EP_DONT_RUN_INTO, "- deadly when running into" },
/* pre-defined properties */
{ EP_CAN_PASS_MAGIC_WALL, "- can pass magic walls" },
+ { EP_SWITCHABLE, "- can be switched" },
{ EP_HAS_CONTENT, "- can contain other elements" },
{ -1, NULL }
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_COLLECTING "Score for collecting"
#define TEXT_SMASHING "Score for smashing"
+#define TEXT_SLURPING "Score for slurping"
#define TEXT_CRACKING "Score for cracking"
-#define TEXT_SPEED "Speed of amoeba growth"
+#define TEXT_AMOEBA_SPEED "Speed of amoeba growth"
#define TEXT_DURATION "Duration when activated"
+#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_AMOEBA_WET, &level.amoeba_speed, TEXT_SPEED },
- { EL_AMOEBA_DRY, &level.amoeba_speed, TEXT_SPEED },
- { EL_AMOEBA_FULL, &level.amoeba_speed, TEXT_SPEED },
- { EL_BD_AMOEBA, &level.amoeba_speed, TEXT_SPEED },
+ { 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 },
+ { EL_EMC_MAGIC_BALL, &level.ball_time, TEXT_BALL_DELAY },
+ { EL_EMC_LENSES, &level.lenses_score, TEXT_COLLECTING },
+ { EL_EMC_MAGNIFIER, &level.magnify_score, TEXT_COLLECTING },
+ { EL_ROBOT, &level.slurp_score, TEXT_SLURPING },
+ { EL_EMC_LENSES, &level.lenses_time, TEXT_DURATION },
+ { EL_EMC_MAGNIFIER, &level.magnify_time, TEXT_DURATION },
+#endif
+
{ -1, NULL, NULL }
};
IS_ENVELOPE(element) ||
ELEM_IS_PLAYER(element) ||
HAS_CONTENT(element) ||
+ CAN_GROW(element) ||
COULD_MOVE_INTO_ACID(element) ||
- element == EL_SPRING)
+ MAYBE_DONT_COLLIDE_WITH(element))
return TRUE;
else
for (i = 0; elements_with_counter[i].element != -1; i++)
static void DrawPropertiesConfig()
{
+ int max_num_element_counters = 4;
+ int num_element_counters = 0;
int i;
if (!checkPropertiesConfig(properties_element))
return;
}
- /* check if there are elements where a score can be chosen for */
+ /* check if there are elements where a value can be chosen for */
for (i = 0; elements_with_counter[i].element != -1; i++)
{
if (elements_with_counter[i].element == properties_element)
{
- int counter_id = ED_COUNTER_ID_ELEMENT_SCORE;
+ 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) +
- (COULD_MOVE_INTO_ACID(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)+
+ num_element_counters);
counterbutton_info[counter_id].value = elements_with_counter[i].value;
counterbutton_info[counter_id].text_right= elements_with_counter[i].text;
+ 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);
- break;
+ num_element_counters++;
+ if (num_element_counters >= max_num_element_counters)
+ break;
}
}
if (IS_AMOEBOID(properties_element))
MapDrawingArea(ED_DRAWING_ID_AMOEBA_CONTENT);
- else
- DrawElementContentAreas();
+ else if (properties_element == EL_YAMYAM)
+ DrawYamYamContentAreas();
}
+ if (properties_element == EL_EMC_MAGIC_BALL)
+ DrawMagicBallContentAreas();
+
if (ELEM_IS_PLAYER(properties_element))
+ {
+ int player_nr = GET_PLAYER_NR(properties_element);
+
+ /* this property can be set for every player individually */
+ drawingarea_info[ED_DRAWING_ID_START_ELEMENT].value =
+ &level.start_element[player_nr];
+
+ /* this property can be set for every player individually */
+ checkbutton_info[ED_CHECKBUTTON_ID_USE_START_ELEMENT].value =
+ &level.use_start_element[player_nr];
+
+ MapCheckbuttonGadget(ED_CHECKBUTTON_ID_CAN_FALL_INTO_ACID);
MapCheckbuttonGadget(properties_element == EL_SP_MURPHY ?
ED_CHECKBUTTON_ID_SP_BLOCK_LAST_FIELD :
ED_CHECKBUTTON_ID_BLOCK_LAST_FIELD);
+ MapCheckbuttonGadget(ED_CHECKBUTTON_ID_BLOCK_SNAP_FIELD);
+ MapCheckbuttonGadget(ED_CHECKBUTTON_ID_INSTANT_RELOCATION);
+ MapCheckbuttonGadget(ED_CHECKBUTTON_ID_USE_START_ELEMENT);
+ MapCheckbuttonGadget(ED_CHECKBUTTON_ID_CAN_PASS_TO_WALKABLE);
+ MapCheckbuttonGadget(ED_CHECKBUTTON_ID_DOUBLE_SPEED);
+
+ MapDrawingArea(ED_DRAWING_ID_START_ELEMENT);
+ }
if (IS_GEM(properties_element))
MapCheckbuttonGadget(ED_CHECKBUTTON_ID_EM_SLIPPERY_GEMS);
if (COULD_MOVE_INTO_ACID(properties_element) &&
+ !ELEM_IS_PLAYER(properties_element) &&
(!IS_CUSTOM_ELEMENT(properties_element) ||
edit_mode_properties == ED_MODE_PROPERTIES_CONFIG_2))
{
+ /* set position for checkbutton for "can move into acid" */
+ checkbutton_info[ED_CHECKBUTTON_ID_CAN_MOVE_INTO_ACID].x =
+ 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 (MAYBE_DONT_COLLIDE_WITH(properties_element))
+ MapCheckbuttonGadget(ED_CHECKBUTTON_ID_DONT_COLLIDE_WITH);
+
if (properties_element == EL_SPRING)
MapCheckbuttonGadget(ED_CHECKBUTTON_ID_USE_SPRING_BUG);
+ if (properties_element == EL_TIME_ORB_FULL)
+ MapCheckbuttonGadget(ED_CHECKBUTTON_ID_USE_TIME_ORB_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_ELEMENT_SETTINGS_YPOS(HAS_CONTENT(properties_element) ? 1 : 0);
+
+ MapCheckbuttonGadget(ED_CHECKBUTTON_ID_GROW_INTO_DIGGABLE);
+ }
+
if (IS_ENVELOPE(properties_element))
{
int counter1_id = ED_COUNTER_ID_ENVELOPE_XSIZE;
/* draw drawing area gadgets */
MapDrawingArea(ED_DRAWING_ID_CUSTOM_GRAPHIC);
- MapDrawingArea(ED_DRAWING_ID_CUSTOM_MOVE_ENTER);
- MapDrawingArea(ED_DRAWING_ID_CUSTOM_MOVE_LEAVE);
}
else if (edit_mode_properties == ED_MODE_PROPERTIES_CONFIG_2)
{
- /* set position for special checkbutton for "can move into acid" */
-
/* draw checkbutton gadgets */
for (i = ED_CHECKBUTTON_ID_CUSTOM2_FIRST;
i <= ED_CHECKBUTTON_ID_CUSTOM2_LAST; i++)
MapSelectboxGadget(i);
/* draw drawing area gadgets */
+ MapDrawingArea(ED_DRAWING_ID_CUSTOM_MOVE_ENTER);
+ MapDrawingArea(ED_DRAWING_ID_CUSTOM_MOVE_LEAVE);
DrawCustomContentArea();
}
}
{
int i;
+ /* needed to initially set selectbox options for special action options */
+ setSelectboxSpecialActionOptions();
+
/* draw stickybutton gadget */
MapCheckbuttonGadget(ED_CHECKBUTTON_ID_STICK_ELEMENT);
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;
- 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;
- }
- }
+ element_mapped = EL_CUSTOM_START;
+ else if (IS_GROUP_ELEMENT(element))
+ element_mapped = EL_GROUP_START;
+ else if (element >= NUM_FILE_ELEMENTS)
+ element_mapped = EL_UNKNOWN;
- printf("`%s", element_string);
+ 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;
DrawLevelText(start_sx, sy + 1, 0, TEXT_SETCURSOR);
else
DrawLevelText(0, 0, 0, TEXT_END);
+
+ level.changed = TRUE;
}
break;
SetBorderElement();
if (BorderElement != last_border_element)
DrawMiniLevel(ed_fieldx, ed_fieldy, level_xpos, level_ypos);
+
+ level.changed = TRUE;
}
static void RandomPlacement(int new_element)
{
static boolean free_position[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
- int num_free_positions;
- int num_percentage;
- int num_elements;
+ int num_free_positions = 0;
+ int num_percentage, num_elements;
int x, y;
- /* determine number of free positions for the new elements */
- /* (maybe this statement should be formatted a bit more readable...) */
- num_free_positions = 0;
- for (x = 0; x < lev_fieldx; x++)
- for (y = 0; y < lev_fieldy; y++)
- if ((free_position[x][y] =
- ((random_placement_background_restricted &&
- Feld[x][y] == random_placement_background_element) ||
- (!random_placement_background_restricted &&
- Feld[x][y] != new_element))) == TRUE)
- num_free_positions++;
+ /* determine number of free positions for randomly placing the new element */
+ for (x = 0; x < lev_fieldx; x++) for (y = 0; y < lev_fieldy; y++)
+ {
+ free_position[x][y] =
+ (random_placement_background_restricted ?
+ Feld[x][y] == random_placement_background_element :
+ Feld[x][y] != new_element);
+
+ if (free_position[x][y])
+ num_free_positions++;
+ }
/* determine number of new elements to place there */
num_percentage = num_free_positions * random_placement_value / 100;
num_elements = (random_placement_method == RANDOM_USE_PERCENTAGE ?
num_percentage : random_placement_value);
- /* if not more free positions than elements to place, fill whole level */
- if (num_elements >= num_free_positions)
+ /* if less free positions than elements to place, fill all these positions */
+ if (num_free_positions < num_elements)
{
for (x = 0; x < lev_fieldx; x++)
for (y = 0; y < lev_fieldy; y++)
- Feld[x][y] = new_element;
-
- DrawMiniLevel(ed_fieldx, ed_fieldy, level_xpos, level_ypos);
- CopyLevelToUndoBuffer(UNDO_IMMEDIATE);
- return;
+ if (free_position[x][y])
+ Feld[x][y] = new_element;
}
-
- while (num_elements > 0)
+ else
{
- x = RND(lev_fieldx);
- y = RND(lev_fieldy);
-
- /* don't place element at the same position twice */
- if (free_position[x][y])
+ while (num_elements > 0)
{
- free_position[x][y] = FALSE;
- Feld[x][y] = new_element;
- num_elements--;
+ x = RND(lev_fieldx);
+ y = RND(lev_fieldy);
+
+ /* don't place element at the same position twice */
+ if (free_position[x][y])
+ {
+ free_position[x][y] = FALSE;
+ Feld[x][y] = new_element;
+ num_elements--;
+ }
}
}
if (!started_inside_drawing_area)
return;
+#if 1
+ if (!IS_VALID_BUTTON(button))
+ return;
+#endif
+
if (!button && !button_release_event)
return;
}
else
{
+ int type_id = gi->custom_type_id;
+ int pos = sx * drawingarea_info[type_id].area_ysize + sy;
+
if (item_xsize == MINI_TILEX && item_ysize == MINI_TILEY)
DrawMiniGraphicExt(drawto,
gi->x + sx * MINI_TILEX,
gi->y + sy * TILEY,
el2img(new_element), 0);
- if (id == GADGET_ID_AMOEBA_CONTENT)
- level.amoeba_content = new_element;
- else if (id == GADGET_ID_CUSTOM_GRAPHIC)
- {
+ if (id == GADGET_ID_CUSTOM_GRAPHIC)
new_element = GFX_ELEMENT(new_element);
- custom_element.gfx_element = new_element;
-
- CopyElementPropertiesToGame(properties_element);
-
- UpdateCustomElementGraphicGadgets();
-
- FrameCounter = 0; /* restart animation frame counter */
- }
- else if (id == GADGET_ID_CUSTOM_CONTENT)
- {
- custom_element.content[sx][sy] = new_element;
-
- CopyCustomElementPropertiesToGame(properties_element);
- }
- else if (id == GADGET_ID_CUSTOM_MOVE_ENTER)
- {
- custom_element.move_enter_element = new_element;
-
- CopyCustomElementPropertiesToGame(properties_element);
- }
- else if (id == GADGET_ID_CUSTOM_MOVE_LEAVE)
- {
- custom_element.move_leave_element = new_element;
-
- CopyCustomElementPropertiesToGame(properties_element);
- }
- else if (id == GADGET_ID_CUSTOM_CHANGE_TARGET)
- {
- custom_element_change.target_element = new_element;
- CopyCustomElementPropertiesToGame(properties_element);
- }
- else if (id == GADGET_ID_CUSTOM_CHANGE_CONTENT)
- {
- custom_element_change.content[sx][sy] = new_element;
+ drawingarea_info[type_id].value[pos] = new_element;
- CopyCustomElementPropertiesToGame(properties_element);
- }
- else if (id == GADGET_ID_CUSTOM_CHANGE_TRIGGER)
- {
- custom_element_change.trigger_element = new_element;
+ CopyElementPropertiesToGame(properties_element);
- CopyCustomElementPropertiesToGame(properties_element);
- }
- else if (id == GADGET_ID_GROUP_CONTENT)
+ if (id == GADGET_ID_CUSTOM_GRAPHIC)
{
- group_element_info.element[sx] = new_element;
+ UpdateCustomElementGraphicGadgets();
- CopyGroupElementPropertiesToGame(properties_element);
+ FrameCounter = 0; /* restart animation frame counter */
}
- else if (id == GADGET_ID_RANDOM_BACKGROUND)
- random_placement_background_element = new_element;
- else if (id >= GADGET_ID_ELEMENT_CONTENT_0 &&
- id <= GADGET_ID_ELEMENT_CONTENT_7)
- level.yamyam_content[id - GADGET_ID_ELEMENT_CONTENT_0][sx][sy] =
- new_element;
}
break;
MB_LEFTBUTTON);
else if (draw_level)
PickDrawingElement(button, Feld[lx][ly]);
- else if (id == GADGET_ID_AMOEBA_CONTENT)
- PickDrawingElement(button, level.amoeba_content);
- 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]);
- else if (id == GADGET_ID_CUSTOM_MOVE_ENTER)
- PickDrawingElement(button, custom_element.move_enter_element);
- else if (id == GADGET_ID_CUSTOM_MOVE_LEAVE)
- PickDrawingElement(button, custom_element.move_leave_element);
- 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.content[sx][sy]);
- else if (id == GADGET_ID_CUSTOM_CHANGE_TRIGGER)
- PickDrawingElement(button, custom_element_change.trigger_element);
- else if (id == GADGET_ID_GROUP_CONTENT)
- PickDrawingElement(button, group_element_info.element[sx]);
- else if (id == GADGET_ID_RANDOM_BACKGROUND)
- PickDrawingElement(button, random_placement_background_element);
- else if (id >= GADGET_ID_ELEMENT_CONTENT_0 &&
- id <= GADGET_ID_ELEMENT_CONTENT_7)
+ else
{
- int i = id - GADGET_ID_ELEMENT_CONTENT_0;
+ int type_id = gi->custom_type_id;
+ int pos = sx * drawingarea_info[type_id].area_ysize + sy;
- PickDrawingElement(button, level.yamyam_content[i][sx][sy]);
+ PickDrawingElement(button, drawingarea_info[type_id].value[pos]);
}
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)
+ {
+ LoadLevel(level_nr);
+ TapeErase();
+ ResetUndoBuffer();
+ DrawEditModeWindow();
+
+ return;
+ }
switch (counter_id)
{
- case ED_COUNTER_ID_ELEMENT_CONTENT:
- DrawElementContentAreas();
+ case ED_COUNTER_ID_YAMYAM_CONTENT:
+ DrawYamYamContentAreas();
break;
case ED_COUNTER_ID_GROUP_CONTENT:
lev_fieldy = level.fieldy;
break;
- case ED_COUNTER_ID_SELECT_LEVEL:
- LoadLevel(level_nr);
- TapeErase();
- ResetUndoBuffer();
- DrawEditModeWindow();
- break;
-
default:
break;
}
(counter_id >= ED_COUNTER_ID_CHANGE_FIRST &&
counter_id <= ED_COUNTER_ID_CHANGE_LAST))
CopyElementPropertiesToGame(properties_element);
+
+ level.changed = TRUE;
}
static void HandleTextInputGadgets(struct GadgetInfo *gi)
ModifyEditorElementList(); /* update changed button info text */
}
+
+ level.changed = TRUE;
}
static void HandleTextAreaGadgets(struct GadgetInfo *gi)
int type_id = gi->custom_type_id;
strcpy(textarea_info[type_id].value, gi->textarea.value);
+
+ level.changed = TRUE;
}
static void HandleSelectboxGadgets(struct GadgetInfo *gi)
{
int type_id = gi->custom_type_id;
+ int value_old = *selectbox_info[type_id].value;
+ int value_new = selectbox_info[type_id].options[gi->selectbox.index].value;
- *selectbox_info[type_id].value =
- selectbox_info[type_id].options[gi->selectbox.index].value;
+ *selectbox_info[type_id].value = value_new;
if (type_id == ED_SELECTBOX_ID_SELECT_CHANGE_PAGE)
{
(type_id >= ED_SELECTBOX_ID_CHANGE_FIRST &&
type_id <= ED_SELECTBOX_ID_CHANGE_LAST) ||
(type_id == ED_SELECTBOX_ID_GROUP_CHOICE_MODE))
+ {
+ if (type_id == ED_SELECTBOX_ID_ACTION_TYPE)
+ {
+ /* when changing action type, reset action mode and action arg */
+ if (value_old != value_new)
+ {
+ custom_element_change.action_mode = -1;
+ custom_element_change.action_arg = -1;
+ }
+
+ DrawPropertiesChange();
+ }
+
CopyElementPropertiesToGame(properties_element);
+
+ level.changed = TRUE;
+ }
}
static void HandleTextbuttonGadgets(struct GadgetInfo *gi)
setElementChangeInfoToDefaults(ei->change);
DrawPropertiesWindow();
+
+ level.changed = TRUE;
}
else if (type_id == ED_TEXTBUTTON_ID_DEL_CHANGE_PAGE &&
custom_element.num_change_pages > MIN_CHANGE_PAGES)
setElementChangePages(ei, ei->num_change_pages - 1);
DrawPropertiesWindow();
+
+ level.changed = TRUE;
}
}
else if (ei->current_change_page >= ei->num_change_pages)
ei->current_change_page = ei->num_change_pages - 1;
+ DrawPropertiesWindow();
+ }
+ else if (type_id == ED_GRAPHICBUTTON_ID_COPY_CHANGE_PAGE ||
+ type_id == ED_GRAPHICBUTTON_ID_PASTE_CHANGE_PAGE)
+ {
+ struct ElementInfo *ei = &element_info[properties_element];
+ int current_change_page = ei->current_change_page;
+
+ if (type_id == ED_GRAPHICBUTTON_ID_COPY_CHANGE_PAGE)
+ element_info[EL_INTERNAL_CLIPBOARD_CHANGE].change_page[0] =
+ ei->change_page[current_change_page];
+ else if (type_id == ED_GRAPHICBUTTON_ID_PASTE_CHANGE_PAGE)
+ {
+ ei->change_page[current_change_page] =
+ element_info[EL_INTERNAL_CLIPBOARD_CHANGE].change_page[0];
+
+ level.changed = TRUE;
+ }
+
DrawPropertiesWindow();
}
}
{
*radiobutton_info[gi->custom_type_id].value =
radiobutton_info[gi->custom_type_id].checked_value;
+
+ level.changed = TRUE;
}
static void HandleCheckbuttons(struct GadgetInfo *gi)
*checkbutton_info[type_id].value ^= TRUE;
- if (type_id == ED_CHECKBUTTON_ID_CAN_MOVE_INTO_ACID ||
+ if (type_id == ED_CHECKBUTTON_ID_CAN_FALL_INTO_ACID ||
+ type_id == ED_CHECKBUTTON_ID_CAN_MOVE_INTO_ACID ||
+ type_id == ED_CHECKBUTTON_ID_DONT_COLLIDE_WITH ||
(((type_id >= ED_CHECKBUTTON_ID_CUSTOM_FIRST &&
type_id <= ED_CHECKBUTTON_ID_CUSTOM_LAST) ||
(type_id >= ED_CHECKBUTTON_ID_CHANGE_FIRST &&
DrawEditModeWindow();
}
+
+ level.changed = TRUE;
}
static void HandleControlButtons(struct GadgetInfo *gi)
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);
last_drawing_function = drawing_function;
break;
+ case GADGET_ID_CUSTOM_COPY:
+ CopyCustomElement(properties_element, -1, id);
+ break;
+
+ case GADGET_ID_CUSTOM_PASTE:
+ CopyCustomElement(-1, properties_element, id);
+ break;
+
case GADGET_ID_UNDO:
if (undo_buffer_steps == 0)
{
for (x = 0; x < MAX_LEV_FIELDX; x++)
for (y = 0; y < MAX_LEV_FIELDY; y++)
Feld[x][y] = (button == 1 ? EL_EMPTY : new_element);
+
CopyLevelToUndoBuffer(GADGET_ID_CLEAR);
DrawMiniLevel(ed_fieldx, ed_fieldy, level_xpos, level_ypos);
break;
}
- if (!LevelContainsPlayer)
+ if (!LevelContainsPlayer())
Request("No Level without Gregor Mc Duffin please !", REQ_CONFIRM);
else
{
if (new_level)
Request("Level saved !", REQ_CONFIRM);
+
+ level.changed = FALSE;
}
break;
case GADGET_ID_TEST:
- if (!LevelContainsPlayer)
+ if (!LevelContainsPlayer())
Request("No Level without Gregor Mc Duffin please !", REQ_CONFIRM);
else
{
CopyPlayfield(level.field, FieldBackup);
CopyPlayfield(Feld, level.field);
+ CopyNativeLevel_RND_to_Native(&level);
+
UnmapLevelEditorGadgets();
UndrawSpecialEditorDoor();
DrawCompleteVideoDisplay();
- if (setup.autorecord)
- TapeStartRecording();
-
level_editor_test_game = TRUE;
- game_status = GAME_MODE_PLAYING;
- InitGame();
+ StartGameActions(FALSE, setup.autorecord, NEW_RANDOMIZE);
}
break;
{
RequestExitLevelEditor(setup.ask_on_escape);
}
- else
+ else if (edit_mode == ED_MODE_INFO)
+ {
+ HandleControlButtons(level_editor_gadget[GADGET_ID_INFO]);
+ }
+ else if (edit_mode == ED_MODE_PROPERTIES)
+ {
+ HandleControlButtons(level_editor_gadget[GADGET_ID_PROPERTIES]);
+ }
+ else /* should never happen */
{
DrawDrawingWindow();
edit_mode = ED_MODE_DRAWING;
{
static int start_lx, start_ly;
int id = gi->custom_id;
+ int type_id = gi->custom_type_id;
int sx = gi->event.x;
int sy = gi->event.y;
int lx = sx + level_xpos;
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 (actual_drawing_function == GADGET_ID_PICK_ELEMENT)
{
- int element = EL_EMPTY;
-
- if (id == GADGET_ID_AMOEBA_CONTENT)
- element = level.amoeba_content;
- 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];
- else if (id == GADGET_ID_CUSTOM_MOVE_ENTER)
- element = custom_element.move_enter_element;
- else if (id == GADGET_ID_CUSTOM_MOVE_LEAVE)
- element = custom_element.move_leave_element;
- 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.content[sx][sy];
- else if (id == GADGET_ID_CUSTOM_CHANGE_TRIGGER)
- element = custom_element_change.trigger_element;
- else if (id == GADGET_ID_GROUP_CONTENT)
- element = group_element_info.element[sx];
- else if (id == GADGET_ID_RANDOM_BACKGROUND)
- element = random_placement_background_element;
- else if (id >= GADGET_ID_ELEMENT_CONTENT_0 &&
- id <= GADGET_ID_ELEMENT_CONTENT_7)
- element = level.yamyam_content[id - GADGET_ID_ELEMENT_CONTENT_0][sx][sy];
+ int pos = sx * drawingarea_info[type_id].area_ysize + sy;
+ int element = drawingarea_info[type_id].value[pos];
strncpy(infotext, getElementInfoText(element), max_infotext_len);
}
else
{
- if (id == GADGET_ID_AMOEBA_CONTENT)
- strcpy(infotext, "Amoeba content");
- else if (id == GADGET_ID_CUSTOM_GRAPHIC)
- strcpy(infotext, "Custom graphic element");
- else if (id == GADGET_ID_CUSTOM_CONTENT)
- sprintf(infotext, "Custom element content position: %d, %d", sx, sy);
- else if (id == GADGET_ID_CUSTOM_MOVE_ENTER)
- strcpy(infotext, "Element that can be digged/collected");
- else if (id == GADGET_ID_CUSTOM_MOVE_LEAVE)
- strcpy(infotext, "Element that will be left behind");
- else if (id == GADGET_ID_CUSTOM_CHANGE_TARGET)
- strcpy(infotext, "New element after change");
- else if (id == GADGET_ID_CUSTOM_CHANGE_CONTENT)
- strcpy(infotext, "New extended elements after change");
- else if (id == GADGET_ID_CUSTOM_CHANGE_TRIGGER)
- strcpy(infotext, "Other element triggering change");
+ if (id == GADGET_ID_CUSTOM_CONTENT)
+ sprintf(infotext, "custom element content position: %d, %d", sx, sy);
else if (id == GADGET_ID_GROUP_CONTENT)
- sprintf(infotext, "Group element position: %d", sx + 1);
- else if (id == GADGET_ID_RANDOM_BACKGROUND)
- strcpy(infotext, "Random placement background");
- else if (id >= GADGET_ID_ELEMENT_CONTENT_0 &&
- id <= GADGET_ID_ELEMENT_CONTENT_7)
- sprintf(infotext, "Content area %d position: %d, %d",
- id - GADGET_ID_ELEMENT_CONTENT_0 + 1, sx, sy);
+ sprintf(infotext, "group element position: %d", sx + 1);
+ else if (id >= GADGET_ID_YAMYAM_CONTENT_0 &&
+ id <= GADGET_ID_YAMYAM_CONTENT_7)
+ sprintf(infotext, "content area %d position: %d, %d",
+ id - GADGET_ID_YAMYAM_CONTENT_0 + 1, sx, sy);
+ else if (id >= GADGET_ID_MAGIC_BALL_CONTENT_0 &&
+ id <= GADGET_ID_MAGIC_BALL_CONTENT_7)
+ sprintf(infotext, "content area %d position: %d, %d",
+ id - GADGET_ID_MAGIC_BALL_CONTENT_0 + 1, sx, sy);
+ else if (drawingarea_info[type_id].infotext != NULL)
+ strcpy(infotext, drawingarea_info[type_id].infotext);
}
infotext[max_infotext_len] = '\0';
{
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
else
{
CloseDoor(DOOR_CLOSE_1);
- BlitBitmap(bitmap_db_door, bitmap_db_door,
- DOOR_GFX_PAGEX2, DOOR_GFX_PAGEY1, DXSIZE,DYSIZE,
- DOOR_GFX_PAGEX1, DOOR_GFX_PAGEY1);
- OpenDoor(DOOR_OPEN_1);
+ OpenDoor(DOOR_OPEN_1 | DOOR_COPY_BACK);
}
}