From: Holger Schemel Date: Wed, 8 Oct 2003 20:51:09 +0000 (+0200) Subject: rnd-20031008-2-src X-Git-Tag: 3.0.7^2~18 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=91d0abcc7245a29c7c938ad2b48f9c85075e0e34;p=rocksndiamonds.git rnd-20031008-2-src --- diff --git a/src/conftime.h b/src/conftime.h index 8ee439ca..fb831991 100644 --- a/src/conftime.h +++ b/src/conftime.h @@ -1 +1 @@ -#define COMPILE_DATE_STRING "[2003-10-08 01:12]" +#define COMPILE_DATE_STRING "[2003-10-08 20:20]" diff --git a/src/editor.c b/src/editor.c index 1e45e106..5c3298f8 100644 --- a/src/editor.c +++ b/src/editor.c @@ -5412,6 +5412,15 @@ static void DrawPropertiesInfo() 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; diff --git a/src/game.c b/src/game.c index a67f9def..7dcaaadf 100644 --- a/src/game.c +++ b/src/game.c @@ -895,7 +895,7 @@ static void InitGameEngine() 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)) @@ -5622,7 +5622,8 @@ static boolean ChangeElementNow(int x, int y, int element, int page) 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 @@ -5702,7 +5703,8 @@ static boolean CheckTriggeredElementSideChange(int lx, int ly, { 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; @@ -7001,7 +7003,8 @@ void TestIfElementTouchesCustomElement(int x, int y) 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) { @@ -7022,7 +7025,8 @@ void TestIfElementTouchesCustomElement(int x, int y) 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) {