#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 + \
+#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_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 */
+/* values for the settings windows */
#define ED_SETTINGS_XSTART (3 * MINI_TILEX / 2)
#define ED_SETTINGS_YSTART (MINI_TILEY * 10)
-#define ED_XOFFSET_CHECKBOX (ED_CHECKBUTTON_XSIZE + \
+#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_SETTINGS_XPOS(n) (ED_SETTINGS_XSTART + \
(n) * ED_SETTINGS_XOFFSET)
-#define ED_SETTINGS_YPOS(n) (ED_SETTINGS_YSTART + \
+#define ED_SETTINGS_YPOS(n) (ED_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_SETTINGS_XPOS(n))
+#define ED_AREA_1X1_SETTINGS_YPOS(n) (ED_SETTINGS_YPOS(n) + \
ED_GADGET_DISTANCE)
+#define ED_AREA_3X3_SETTINGS_XPOS(n) (ED_SETTINGS_XPOS(n))
+#define ED_AREA_3X3_SETTINGS_YPOS(n) (ED_SETTINGS_YPOS(n) + \
+ 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(11) + \
- ED_GADGET_DISTANCE)
-#define ED_AREA_ELEM_CONTENT4b_XPOS (29 * MINI_TILEX)
-#define ED_AREA_ELEM_CONTENT4b_YPOS (ED_SETTINGS_YPOS(11) + \
- 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(10) + \
- 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)
-
/* values for scrolling gadgets for drawing area */
#define ED_SCROLLBUTTON_XPOS 24
#define ED_SCROLLBUTTON_YPOS 0
#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_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
/* ---------- amoeba content --------------------------------------------- */
{
- ED_AREA_AMOEBA_CONTENT_XPOS, ED_AREA_AMOEBA_CONTENT_YPOS,
+ ED_AREA_1X1_SETTINGS_XPOS(0), ED_AREA_1X1_SETTINGS_YPOS(2),
1, 1,
GADGET_ID_AMOEBA_CONTENT, GADGET_ID_NONE,
"content:", NULL, NULL
/* ---------- custom graphic --------------------------------------------- */
{
- -1, ED_AREA_ELEM_CONTENT3_YPOS,
+ -1, ED_AREA_1X1_SETTINGS_YPOS(1),
1, 1,
GADGET_ID_CUSTOM_GRAPHIC, GADGET_ID_CUSTOM_USE_GRAPHIC,
NULL, NULL, NULL
/* ---------- custom content (when exploding) ---------------------------- */
{
- ED_AREA_ELEM_CONTENT4_XPOS, ED_AREA_ELEM_CONTENT4_YPOS,
+ -1, ED_AREA_3X3_SETTINGS_YPOS(2),
3, 3,
GADGET_ID_CUSTOM_CONTENT, GADGET_ID_NONE, /* align three rows */
"content:", NULL, NULL
/* ---------- custom enter and leave element (when moving) --------------- */
{
- ED_SETTINGS_XPOS(1), ED_AREA_ELEM_CONTENT4a_YPOS,
+ ED_AREA_1X1_SETTINGS_XPOS(1), ED_AREA_1X1_SETTINGS_YPOS(11),
1, 1,
GADGET_ID_CUSTOM_MOVE_ENTER, GADGET_ID_NONE,
"can dig:", " ", NULL
},
{
- -1, ED_AREA_ELEM_CONTENT4b_YPOS,
+ -1, ED_AREA_1X1_SETTINGS_YPOS(11),
1, 1,
GADGET_ID_CUSTOM_MOVE_LEAVE, GADGET_ID_CUSTOM_MOVE_LEAVE_TYPE,
NULL, NULL, NULL
/* ---------- custom change target --------------------------------------- */
{
- -1, ED_AREA_ELEM_CONTENT2_YPOS,
+ -1, ED_AREA_1X1_SETTINGS_YPOS(1),
1, 1,
GADGET_ID_CUSTOM_CHANGE_TARGET, GADGET_ID_CUSTOM_CAN_CHANGE,
NULL, "after/when:", NULL
/* ---------- custom change content (extended change target) ------------- */
{
- ED_AREA_ELEM_CONTENT6_XPOS, ED_AREA_ELEM_CONTENT6_YPOS,
+ -1, ED_AREA_3X3_SETTINGS_YPOS(10),
3, 3,
GADGET_ID_CUSTOM_CHANGE_CONTENT, GADGET_ID_NONE, /* align three rows */
NULL, NULL, NULL
/* ---------- custom change trigger (element causing change) ------------- */
{
- -1, ED_AREA_ELEM_CONTENT5_YPOS,
+ -1, ED_AREA_1X1_SETTINGS_YPOS(5),
1, 1,
GADGET_ID_CUSTOM_CHANGE_TRIGGER, GADGET_ID_CHANGE_OTHER_ACTION,
NULL, NULL, NULL
/* ---------- group element content -------------------------------------- */
{
- ED_AREA_GROUP_CONTENT_XPOS, ED_AREA_GROUP_CONTENT_YPOS,
+ ED_AREA_1X1_SETTINGS_XPOS(0), ED_AREA_1X1_SETTINGS_YPOS(4),
MAX_ELEMENTS_IN_GROUP, 1,
GADGET_ID_GROUP_CONTENT, GADGET_ID_NONE,
"content:", NULL, NULL
/* ---------- random background (for random painting) -------------------- */
{
- -1, ED_AREA_RANDOM_BACKGROUND_YPOS,
+ -1, ED_SETTINGS_YPOS(14),
1, 1,
GADGET_ID_RANDOM_BACKGROUND, GADGET_ID_RANDOM_RESTRICTED,
NULL, NULL, NULL
#define EP_AMOEBOID 50
#define EP_AMOEBALIVE 51
#define EP_HAS_CONTENT 52
-#define EP_ACTIVE_BOMB 53
-#define EP_INACTIVE 54
+#define EP_CAN_TURN_EACH_MOVE 53
+#define EP_ACTIVE_BOMB 54
+#define EP_INACTIVE 55
/* values for special configurable properties (depending on level settings) */
-#define EP_EM_SLIPPERY_WALL 55
+#define EP_EM_SLIPPERY_WALL 56
/* values for special graphics properties (no effect on game engine) */
-#define EP_GFX_CRUMBLED 56
+#define EP_GFX_CRUMBLED 57
/* values for derived properties (determined from properties above) */
-#define EP_ACCESSIBLE_OVER 57
-#define EP_ACCESSIBLE_INSIDE 58
-#define EP_ACCESSIBLE_UNDER 59
-#define EP_WALKABLE 60
-#define EP_PASSABLE 61
-#define EP_ACCESSIBLE 62
-#define EP_COLLECTIBLE 63
-#define EP_SNAPPABLE 64
-#define EP_WALL 65
-#define EP_SOLID_FOR_PUSHING 66
-#define EP_DRAGONFIRE_PROOF 67
-#define EP_EXPLOSION_PROOF 68
-#define EP_CAN_SMASH 69
-#define EP_CAN_EXPLODE 70
-#define EP_CAN_EXPLODE_3X3 71
-#define EP_SP_PORT 72
-#define EP_CAN_EXPLODE_BY_DRAGONFIRE 73
-#define EP_CAN_EXPLODE_BY_EXPLOSION 74
-#define EP_COULD_MOVE_INTO_ACID 75
-#define EP_MAYBE_DONT_COLLIDE_WITH 76
+#define EP_ACCESSIBLE_OVER 58
+#define EP_ACCESSIBLE_INSIDE 59
+#define EP_ACCESSIBLE_UNDER 60
+#define EP_WALKABLE 61
+#define EP_PASSABLE 62
+#define EP_ACCESSIBLE 63
+#define EP_COLLECTIBLE 64
+#define EP_SNAPPABLE 65
+#define EP_WALL 66
+#define EP_SOLID_FOR_PUSHING 67
+#define EP_DRAGONFIRE_PROOF 68
+#define EP_EXPLOSION_PROOF 69
+#define EP_CAN_SMASH 70
+#define EP_CAN_EXPLODE 71
+#define EP_CAN_EXPLODE_3X3 72
+#define EP_SP_PORT 73
+#define EP_CAN_EXPLODE_BY_DRAGONFIRE 74
+#define EP_CAN_EXPLODE_BY_EXPLOSION 75
+#define EP_COULD_MOVE_INTO_ACID 76
+#define EP_MAYBE_DONT_COLLIDE_WITH 77
/* values for internal purpose only (level editor) */
-#define EP_EXPLODE_RESULT 77
-#define EP_WALK_TO_OBJECT 78
-#define EP_DEADLY 79
+#define EP_EXPLODE_RESULT 78
+#define EP_WALK_TO_OBJECT 79
+#define EP_DEADLY 80
-#define NUM_ELEMENT_PROPERTIES 80
+#define NUM_ELEMENT_PROPERTIES 81
#define NUM_EP_BITFIELDS ((NUM_ELEMENT_PROPERTIES + 31) / 32)
#define EP_BITFIELD_BASE 0
#define IS_AMOEBOID(e) HAS_PROPERTY(e, EP_AMOEBOID)
#define IS_AMOEBALIVE(e) HAS_PROPERTY(e, EP_AMOEBALIVE)
#define HAS_CONTENT(e) HAS_PROPERTY(e, EP_HAS_CONTENT)
+#define CAN_TURN_EACH_MOVE(e) HAS_PROPERTY(e, EP_CAN_TURN_EACH_MOVE)
#define IS_ACTIVE_BOMB(e) HAS_PROPERTY(e, EP_ACTIVE_BOMB)
#define IS_INACTIVE(e) HAS_PROPERTY(e, EP_INACTIVE)