int screen_line = 0;
int i, x, y;
+#if DEBUG
+ if (IS_CUSTOM_ELEMENT(properties_element))
+ {
+ DrawTextF(pad_x, pad_y + screen_line++ * font2_height, FONT_TEXT_3,
+ "[Custom Element %d]", properties_element - EL_CUSTOM_START + 1);
+ screen_line++;
+ }
+#endif
+
/* ----- print number of elements / percentage of this element in level */
num_elements_in_level = 0;
for (j=0; j < ei->num_change_pages; j++)
{
- if (!ei->change_page->can_change)
+ if (!ei->change_page[j].can_change)
continue;
if (ei->change_page[j].events & CH_EVENT_BIT(CE_BY_OTHER_ACTION))
static void ChangeElement(int x, int y, int page)
{
int element = MovingOrBlocked2Element(x, y);
- struct ElementChangeInfo *change = &element_info[element].change_page[page];
+ struct ElementInfo *ei = &element_info[element];
+ struct ElementChangeInfo *change = &ei->change_page[page];
#if 0
#ifdef DEBUG
{
struct ElementChangeInfo *change = &element_info[element].change_page[j];
- if (change->sides & trigger_side &&
+ if (change->can_change &&
+ change->sides & trigger_side &&
change->trigger_element == trigger_element)
{
change_element = TRUE;
struct ElementChangeInfo *change =
&element_info[center_element].change_page[j];
- if (change->events & CH_EVENT_BIT(CE_OTHER_IS_TOUCHING) &&
+ if (change->can_change &&
+ change->events & CH_EVENT_BIT(CE_OTHER_IS_TOUCHING) &&
change->sides & border_side &&
change->trigger_element == border_element)
{
struct ElementChangeInfo *change =
&element_info[border_element].change_page[j];
- if (change->events & CH_EVENT_BIT(CE_OTHER_IS_TOUCHING) &&
+ if (change->can_change &&
+ change->events & CH_EVENT_BIT(CE_OTHER_IS_TOUCHING) &&
change->sides & center_side &&
change->trigger_element == center_element)
{