rnd-20031008-2-src
authorHolger Schemel <info@artsoft.org>
Wed, 8 Oct 2003 20:51:09 +0000 (22:51 +0200)
committerHolger Schemel <info@artsoft.org>
Sat, 30 Aug 2014 08:44:09 +0000 (10:44 +0200)
src/conftime.h
src/editor.c
src/game.c

index 8ee439ca930eea5a071ca822e321f71e85d416ad..fb83199154b84ec62264c74b348ce8ed6c7f2853 100644 (file)
@@ -1 +1 @@
-#define COMPILE_DATE_STRING "[2003-10-08 01:12]"
+#define COMPILE_DATE_STRING "[2003-10-08 20:20]"
index 1e45e10641304a26a353278d04b6aea85f7d1dd9..5c3298f84201a9e98daeaa1190e17a2500812152 100644 (file)
@@ -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;
index a67f9def973370667b5e45266cbfd76c70ecb4fd..7dcaaadfd73bb33d1e8ebc57f3e16fa150f9203f 100644 (file)
@@ -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)
        {