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) + \
+#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(10) + \
+#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) + \
#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_DROP_DELAY_FIX_DOWN (GADGET_ID_COUNTER_FIRST + 45)
+#define GADGET_ID_DROP_DELAY_FIX_TEXT (GADGET_ID_COUNTER_FIRST + 46)
+#define GADGET_ID_DROP_DELAY_FIX_UP (GADGET_ID_COUNTER_FIRST + 47)
+#define GADGET_ID_DROP_DELAY_RND_DOWN (GADGET_ID_COUNTER_FIRST + 48)
+#define GADGET_ID_DROP_DELAY_RND_TEXT (GADGET_ID_COUNTER_FIRST + 49)
+#define GADGET_ID_DROP_DELAY_RND_UP (GADGET_ID_COUNTER_FIRST + 50)
+#define GADGET_ID_MOVE_DELAY_FIX_DOWN (GADGET_ID_COUNTER_FIRST + 51)
+#define GADGET_ID_MOVE_DELAY_FIX_TEXT (GADGET_ID_COUNTER_FIRST + 52)
+#define GADGET_ID_MOVE_DELAY_FIX_UP (GADGET_ID_COUNTER_FIRST + 53)
+#define GADGET_ID_MOVE_DELAY_RND_DOWN (GADGET_ID_COUNTER_FIRST + 54)
+#define GADGET_ID_MOVE_DELAY_RND_TEXT (GADGET_ID_COUNTER_FIRST + 55)
+#define GADGET_ID_MOVE_DELAY_RND_UP (GADGET_ID_COUNTER_FIRST + 56)
+#define GADGET_ID_EXPLOSION_DELAY_DOWN (GADGET_ID_COUNTER_FIRST + 57)
+#define GADGET_ID_EXPLOSION_DELAY_TEXT (GADGET_ID_COUNTER_FIRST + 58)
+#define GADGET_ID_EXPLOSION_DELAY_UP (GADGET_ID_COUNTER_FIRST + 59)
+#define GADGET_ID_IGNITION_DELAY_DOWN (GADGET_ID_COUNTER_FIRST + 60)
+#define GADGET_ID_IGNITION_DELAY_TEXT (GADGET_ID_COUNTER_FIRST + 61)
+#define GADGET_ID_IGNITION_DELAY_UP (GADGET_ID_COUNTER_FIRST + 62)
+#define GADGET_ID_CHANGE_DELAY_FIX_DOWN (GADGET_ID_COUNTER_FIRST + 63)
+#define GADGET_ID_CHANGE_DELAY_FIX_TEXT (GADGET_ID_COUNTER_FIRST + 64)
+#define GADGET_ID_CHANGE_DELAY_FIX_UP (GADGET_ID_COUNTER_FIRST + 65)
+#define GADGET_ID_CHANGE_DELAY_RND_DOWN (GADGET_ID_COUNTER_FIRST + 66)
+#define GADGET_ID_CHANGE_DELAY_RND_TEXT (GADGET_ID_COUNTER_FIRST + 67)
+#define GADGET_ID_CHANGE_DELAY_RND_UP (GADGET_ID_COUNTER_FIRST + 68)
+#define GADGET_ID_CHANGE_CONT_RND_DOWN (GADGET_ID_COUNTER_FIRST + 69)
+#define GADGET_ID_CHANGE_CONT_RND_TEXT (GADGET_ID_COUNTER_FIRST + 70)
+#define GADGET_ID_CHANGE_CONT_RND_UP (GADGET_ID_COUNTER_FIRST + 71)
+#define GADGET_ID_GROUP_CONTENT_DOWN (GADGET_ID_COUNTER_FIRST + 72)
+#define GADGET_ID_GROUP_CONTENT_TEXT (GADGET_ID_COUNTER_FIRST + 73)
+#define GADGET_ID_GROUP_CONTENT_UP (GADGET_ID_COUNTER_FIRST + 74)
/* drawing area identifiers */
-#define GADGET_ID_DRAWING_AREA_FIRST (GADGET_ID_COUNTER_FIRST + 69)
+#define GADGET_ID_DRAWING_AREA_FIRST (GADGET_ID_COUNTER_FIRST + 75)
#define GADGET_ID_DRAWING_LEVEL (GADGET_ID_DRAWING_AREA_FIRST + 0)
#define GADGET_ID_ELEMENT_CONTENT_0 (GADGET_ID_DRAWING_AREA_FIRST + 1)
#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_DROP_DELAY_FIX 15
+#define ED_COUNTER_ID_DROP_DELAY_RND 16
+#define ED_COUNTER_ID_MOVE_DELAY_FIX 17
+#define ED_COUNTER_ID_MOVE_DELAY_RND 18
+#define ED_COUNTER_ID_EXPLOSION_DELAY 19
+#define ED_COUNTER_ID_IGNITION_DELAY 20
+#define ED_COUNTER_ID_GROUP_CONTENT 21
+#define ED_COUNTER_ID_CHANGE_DELAY_FIX 22
+#define ED_COUNTER_ID_CHANGE_DELAY_RND 23
+#define ED_COUNTER_ID_CHANGE_CONT_RND 24
+
+#define ED_NUM_COUNTERBUTTONS 25
#define ED_COUNTER_ID_LEVEL_FIRST ED_COUNTER_ID_LEVEL_XSIZE
#define ED_COUNTER_ID_LEVEL_LAST ED_COUNTER_ID_LEVEL_RANDOM
#define ED_SELECTBOX_ID_LEVEL_LAST ED_SELECTBOX_ID_TIME_OR_STEPS
#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_CUSTOM1_LAST ED_SELECTBOX_ID_CUSTOM_MOVE_LEAVE_TYPE
+#define ED_SELECTBOX_ID_CUSTOM2_FIRST ED_SELECTBOX_ID_CUSTOM_SMASH_TARGETS
#define ED_SELECTBOX_ID_CUSTOM2_LAST ED_SELECTBOX_ID_CUSTOM_CONSISTENCY
#define ED_SELECTBOX_ID_CUSTOM_FIRST ED_SELECTBOX_ID_CUSTOM1_FIRST
#define ED_SELECTBOX_ID_CUSTOM_LAST ED_SELECTBOX_ID_CUSTOM2_LAST
#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_CAN_MOVE
+#define ED_CHECKBUTTON_ID_CUSTOM2_FIRST ED_CHECKBUTTON_ID_CUSTOM_CAN_FALL
#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
},
{
ED_SETTINGS_XPOS(1), ED_SETTINGS_YPOS(7),
- 0, 999,
+ 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,
},
{
-1, ED_SETTINGS_YPOS(7),
- 0, 999,
+ 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_SETTINGS_XPOS(1), ED_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_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
+ },
+ {
+ ED_SETTINGS_XPOS(1), ED_SETTINGS_YPOS(13),
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_SETTINGS_YPOS(13),
0, 999,
GADGET_ID_MOVE_DELAY_RND_DOWN, GADGET_ID_MOVE_DELAY_RND_UP,
GADGET_ID_MOVE_DELAY_RND_TEXT, GADGET_ID_MOVE_DELAY_FIX_UP,
NULL, NULL, "diggable/collectible/pushable"
},
{
- ED_SETTINGS_XPOS(1), ED_SETTINGS_YPOS(8),
+ ED_SETTINGS_XPOS(1), ED_SETTINGS_YPOS(9),
GADGET_ID_CUSTOM_MOVE_PATTERN, GADGET_ID_NONE,
-1,
options_move_pattern,
"can move", NULL, "element move direction"
},
{
- ED_SETTINGS_XPOS(1), ED_SETTINGS_YPOS(9),
+ ED_SETTINGS_XPOS(1), ED_SETTINGS_YPOS(10),
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_SETTINGS_XPOS(1), ED_SETTINGS_YPOS(12),
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_SETTINGS_XPOS(1), ED_SETTINGS_YPOS(11),
GADGET_ID_CUSTOM_MOVE_LEAVE_TYPE, GADGET_ID_NONE,
-1,
options_move_leave_type,
NULL, NULL, "player can dig/collect/push element"
},
{
- ED_SETTINGS_XPOS(0), ED_SETTINGS_YPOS(8),
+ ED_SETTINGS_XPOS(0), ED_SETTINGS_YPOS(9),
GADGET_ID_CUSTOM_CAN_MOVE, GADGET_ID_NONE,
&custom_element_properties[EP_CAN_MOVE],
NULL, NULL, "element can move in some direction"
EL_CUSTOM_START + 252,
EL_CUSTOM_START + 253,
EL_CUSTOM_START + 254,
- EL_CUSTOM_START + 255,
+ EL_CUSTOM_START + 255
+};
+static int *editor_hl_custom_more_ptr = editor_hl_custom_more;
+static int *editor_el_custom_more_ptr = editor_el_custom_more;
+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_more_ptr = editor_hl_custom_more;
-static int *editor_el_custom_more_ptr = editor_el_custom_more;
-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_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[] =
{
&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,
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;
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))
{
#define GET_NEW_PUSH_DELAY(e) ( (element_info[e].push_delay_fixed) + \
RND(element_info[e].push_delay_random))
+#define GET_NEW_DROP_DELAY(e) ( (element_info[e].drop_delay_fixed) + \
+ RND(element_info[e].drop_delay_random))
#define GET_NEW_MOVE_DELAY(e) ( (element_info[e].move_delay_fixed) + \
RND(element_info[e].move_delay_random))
#define GET_MAX_MOVE_DELAY(e) ( (element_info[e].move_delay_fixed) + \
break;
}
+
+#if 1
+ if (MovDir[x][y] == MV_NO_MOVING) /* no start direction found */
+ MovDir[x][y] = 1 << RND(4); /* => use random direction */
+#endif
}
}
}
}
#if 1
+#if 1
+ Store[newx][newy] = EL_EMPTY;
+ if (IS_EQUAL_OR_IN_GROUP(new_element, MOVE_ENTER_EL(element)))
+ Store[newx][newy] = element_info[element].move_leave_element;
+#else
Store[newx][newy] = EL_EMPTY;
if (IS_EQUAL_OR_IN_GROUP(new_element, MOVE_ENTER_EL(element)) ||
element_info[element].move_leave_type == LEAVE_TYPE_UNLIMITED)
Store[newx][newy] = element_info[element].move_leave_element;
+#endif
#else
if (IS_EQUAL_OR_IN_GROUP(new_element, MOVE_ENTER_EL(element)))
element_info[element].can_leave_element = TRUE;
}
#if 1
else if (IS_CUSTOM_ELEMENT(element) && !IS_PLAYER(x, y) &&
- ei->move_leave_element != EL_EMPTY && Store[x][y] != EL_EMPTY)
+ ei->move_leave_element != EL_EMPTY &&
+ (ei->move_leave_type == LEAVE_TYPE_UNLIMITED ||
+ Store[x][y] != EL_EMPTY))
{
/* some elements can leave other elements behind after moving */
- Feld[x][y] = Store[x][y];
+ Feld[x][y] = ei->move_leave_element;
InitField(x, y, FALSE);
if (GFX_CRUMBLED(Feld[x][y]))
player->step_counter++;
+#if 0
player->drop_delay = 0;
+#endif
PlayerVisit[jx][jy] = FrameCounter;
int drop_direction = player->MovDir;
int drop_side = trigger_sides[MV_DIR_BIT(drop_direction)];
int old_element = Feld[jx][jy];
- int new_element = (player->inventory_size > 0 ?
- player->inventory_element[player->inventory_size - 1] :
- player->inventory_infinite_element != EL_UNDEFINED ?
- player->inventory_infinite_element :
- player->dynabombs_left > 0 ?
- EL_DYNABOMB_PLAYER_1_ACTIVE + player->index_nr :
- EL_UNDEFINED);
+ int drop_element = (player->inventory_size > 0 ?
+ player->inventory_element[player->inventory_size - 1] :
+ player->inventory_infinite_element != EL_UNDEFINED ?
+ player->inventory_infinite_element :
+ player->dynabombs_left > 0 ?
+ EL_DYNABOMB_PLAYER_1_ACTIVE + player->index_nr :
+ EL_UNDEFINED);
+ int new_element = drop_element; /* default: element does not change */
/* check if player is active, not moving and ready to drop */
if (!player->active || player->MovPos || player->drop_delay > 0)
#endif
}
- new_element = Feld[jx][jy];
+ new_element = Feld[jx][jy]; /* element might have changed */
if (IS_CUSTOM_ELEMENT(new_element) && CAN_MOVE(new_element) &&
element_info[new_element].move_pattern == MV_WHEN_DROPPED)
{
+#if 0
int move_stepsize = element_info[new_element].move_stepsize;
+#endif
int direction, dx, dy, nextx, nexty;
if (element_info[new_element].move_direction_initial == MV_START_AUTOMATIC)
#endif
}
+#if 0
player->drop_delay = 2 * TILEX / move_stepsize + 1;
+#endif
}
#if 0
player->drop_delay = 8 + 8 + 8;
#endif
+#if 1
+ player->drop_delay = GET_NEW_DROP_DELAY(drop_element);
+#endif
+
#endif
player->is_dropping = TRUE;