rnd-20030606-1-src
authorHolger Schemel <info@artsoft.org>
Fri, 6 Jun 2003 00:27:31 +0000 (02:27 +0200)
committerHolger Schemel <info@artsoft.org>
Sat, 30 Aug 2014 08:41:58 +0000 (10:41 +0200)
src/conftime.h
src/editor.c
src/game.c
src/init.c
src/main.h
src/tools.c

index a768c0113f74f721e566b579fae45fdeb1875b54..4ebbb3697a1c7e68ea1e8f1cb752542f440cec5a 100644 (file)
@@ -1 +1 @@
-#define COMPILE_DATE_STRING "[2003-06-02 01:57]"
+#define COMPILE_DATE_STRING "[2003-06-06 02:25]"
index 7618a332fd5efc3d0065ca3c71ccb6e495a8529e..29b34116a901fb4e9ef2630384883061d3013e34 100644 (file)
 #define ED_AREA_ELEM_CONTENT3_YPOS     (ED_SETTINGS_YPOS(1) + \
                                         ED_GADGET_DISTANCE)
 
+#if 1
+#define ED_AREA_ELEM_CONTENT4_XPOS     (29 * MINI_TILEX)
+#define ED_AREA_ELEM_CONTENT4_YPOS     (ED_SETTINGS_YPOS(3) + \
+                                        ED_GADGET_DISTANCE - MINI_TILEY)
+#else
 #define ED_AREA_ELEM_CONTENT4_XPOS     (17 * MINI_TILEX)
 #define ED_AREA_ELEM_CONTENT4_YPOS     (ED_SETTINGS_YPOS(11) + \
                                         ED_GADGET_DISTANCE - MINI_TILEY)
+#endif
 
 /* values for random placement background drawing area */
 #define ED_AREA_RANDOM_BACKGROUND_XPOS (29 * MINI_TILEX)
 #define GADGET_ID_SELECTBOX_FIRST      (GADGET_ID_TEXT_INPUT_FIRST + 2)
 
 #define GADGET_ID_CUSTOM_WALK_TO_ACTION        (GADGET_ID_SELECTBOX_FIRST + 0)
-#define GADGET_ID_CUSTOM_DEADLINESS    (GADGET_ID_SELECTBOX_FIRST + 1)
-#define GADGET_ID_CUSTOM_MOVE_PATTERN  (GADGET_ID_SELECTBOX_FIRST + 2)
-#define GADGET_ID_CUSTOM_MOVE_DIRECTION        (GADGET_ID_SELECTBOX_FIRST + 3)
-#define GADGET_ID_CUSTOM_WALKABLE_LAYER        (GADGET_ID_SELECTBOX_FIRST + 4)
-#define GADGET_ID_CHANGE_TIME_UNITS    (GADGET_ID_SELECTBOX_FIRST + 5)
-#define GADGET_ID_CHANGE_CAUSE         (GADGET_ID_SELECTBOX_FIRST + 6)
+#define GADGET_ID_CUSTOM_CONSISTENCY   (GADGET_ID_SELECTBOX_FIRST + 1)
+#define GADGET_ID_CUSTOM_DEADLINESS    (GADGET_ID_SELECTBOX_FIRST + 2)
+#define GADGET_ID_CUSTOM_MOVE_PATTERN  (GADGET_ID_SELECTBOX_FIRST + 3)
+#define GADGET_ID_CUSTOM_MOVE_DIRECTION        (GADGET_ID_SELECTBOX_FIRST + 4)
+#define GADGET_ID_CUSTOM_WALKABLE_LAYER        (GADGET_ID_SELECTBOX_FIRST + 5)
+#define GADGET_ID_CHANGE_TIME_UNITS    (GADGET_ID_SELECTBOX_FIRST + 6)
+#define GADGET_ID_CHANGE_CAUSE         (GADGET_ID_SELECTBOX_FIRST + 7)
 
 /* textbutton identifiers */
-#define GADGET_ID_TEXTBUTTON_FIRST     (GADGET_ID_SELECTBOX_FIRST + 7)
+#define GADGET_ID_TEXTBUTTON_FIRST     (GADGET_ID_SELECTBOX_FIRST + 8)
 
 #define GADGET_ID_PROPERTIES_INFO      (GADGET_ID_TEXTBUTTON_FIRST + 0)
 #define GADGET_ID_PROPERTIES_CONFIG    (GADGET_ID_TEXTBUTTON_FIRST + 1)
 #define GADGET_ID_GRAVITY              (GADGET_ID_CHECKBUTTON_FIRST + 4)
 #define GADGET_ID_STICK_ELEMENT                (GADGET_ID_CHECKBUTTON_FIRST + 5)
 #define GADGET_ID_EM_SLIPPERY_GEMS     (GADGET_ID_CHECKBUTTON_FIRST + 6)
-#define GADGET_ID_CUSTOM_INDESTRUCTIBLE        (GADGET_ID_CHECKBUTTON_FIRST + 7)
+#define GADGET_ID_CUSTOM_EXPLODE_RESULT        (GADGET_ID_CHECKBUTTON_FIRST + 7)
 #define GADGET_ID_CUSTOM_WALK_TO_OBJECT        (GADGET_ID_CHECKBUTTON_FIRST + 8)
 #define GADGET_ID_CUSTOM_DEADLY                (GADGET_ID_CHECKBUTTON_FIRST + 9)
 #define GADGET_ID_CUSTOM_CAN_MOVE      (GADGET_ID_CHECKBUTTON_FIRST + 10)
 #define GADGET_ID_CUSTOM_CAN_FALL      (GADGET_ID_CHECKBUTTON_FIRST + 11)
 #define GADGET_ID_CUSTOM_CAN_SMASH     (GADGET_ID_CHECKBUTTON_FIRST + 12)
-#define GADGET_ID_CUSTOM_CAN_EXPLODE   (GADGET_ID_CHECKBUTTON_FIRST + 13)
-#define GADGET_ID_CUSTOM_SLIPPERY      (GADGET_ID_CHECKBUTTON_FIRST + 14)
-#define GADGET_ID_CUSTOM_WALKABLE      (GADGET_ID_CHECKBUTTON_FIRST + 15)
-#define GADGET_ID_CUSTOM_USE_GRAPHIC   (GADGET_ID_CHECKBUTTON_FIRST + 16)
-#define GADGET_ID_CUSTOM_USE_TEMPLATE  (GADGET_ID_CHECKBUTTON_FIRST + 17)
-#define GADGET_ID_CUSTOM_CHANGEABLE    (GADGET_ID_CHECKBUTTON_FIRST + 18)
-#define GADGET_ID_CHANGE_DELAY         (GADGET_ID_CHECKBUTTON_FIRST + 19)
+#define GADGET_ID_CUSTOM_SLIPPERY      (GADGET_ID_CHECKBUTTON_FIRST + 13)
+#define GADGET_ID_CUSTOM_WALKABLE      (GADGET_ID_CHECKBUTTON_FIRST + 14)
+#define GADGET_ID_CUSTOM_USE_GRAPHIC   (GADGET_ID_CHECKBUTTON_FIRST + 15)
+#define GADGET_ID_CUSTOM_USE_TEMPLATE  (GADGET_ID_CHECKBUTTON_FIRST + 16)
+#define GADGET_ID_CUSTOM_CHANGEABLE    (GADGET_ID_CHECKBUTTON_FIRST + 17)
+#define GADGET_ID_CHANGE_DELAY         (GADGET_ID_CHECKBUTTON_FIRST + 18)
 
 /* gadgets for buttons in element list */
-#define GADGET_ID_ELEMENTLIST_FIRST    (GADGET_ID_CHECKBUTTON_FIRST + 20)
+#define GADGET_ID_ELEMENTLIST_FIRST    (GADGET_ID_CHECKBUTTON_FIRST + 19)
 #define GADGET_ID_ELEMENTLIST_LAST     (GADGET_ID_ELEMENTLIST_FIRST +  \
                                        ED_NUM_ELEMENTLIST_BUTTONS - 1)
 
 
 /* values for selectbox gadgets */
 #define ED_SELECTBOX_ID_CUSTOM_WALK_TO_ACTION  0
-#define ED_SELECTBOX_ID_CUSTOM_DEADLINESS      1
-#define ED_SELECTBOX_ID_CUSTOM_MOVE_PATTERN    2
-#define ED_SELECTBOX_ID_CUSTOM_MOVE_DIRECTION  3
-#define ED_SELECTBOX_ID_CUSTOM_WALKABLE_LAYER  4
-#define ED_SELECTBOX_ID_CHANGE_TIME_UNITS      5
-#define ED_SELECTBOX_ID_CHANGE_CAUSE           6
+#define ED_SELECTBOX_ID_CUSTOM_CONSISTENCY     1
+#define ED_SELECTBOX_ID_CUSTOM_DEADLINESS      2
+#define ED_SELECTBOX_ID_CUSTOM_MOVE_PATTERN    3
+#define ED_SELECTBOX_ID_CUSTOM_MOVE_DIRECTION  4
+#define ED_SELECTBOX_ID_CUSTOM_WALKABLE_LAYER  5
+#define ED_SELECTBOX_ID_CHANGE_TIME_UNITS      6
+#define ED_SELECTBOX_ID_CHANGE_CAUSE           7
 
-#define ED_NUM_SELECTBOX                       7
+#define ED_NUM_SELECTBOX                       8
 
 #define ED_SELECTBOX_ID_CUSTOM_FIRST   ED_SELECTBOX_ID_CUSTOM_WALK_TO_ACTION
 #define ED_SELECTBOX_ID_CUSTOM_LAST    ED_SELECTBOX_ID_CUSTOM_WALKABLE_LAYER
 #define ED_CHECKBUTTON_ID_RANDOM_RESTRICTED    2
 #define ED_CHECKBUTTON_ID_STICK_ELEMENT                3
 #define ED_CHECKBUTTON_ID_EM_SLIPPERY_GEMS     4
-#define ED_CHECKBUTTON_ID_CUSTOM_INDESTRUCTIBLE        5
+#define ED_CHECKBUTTON_ID_CUSTOM_EXPLODE_RESULT        5
 #define ED_CHECKBUTTON_ID_CUSTOM_WALK_TO_OBJECT        6
 #define ED_CHECKBUTTON_ID_CUSTOM_DEADLY                7
 #define ED_CHECKBUTTON_ID_CUSTOM_CAN_MOVE      8
 #define ED_CHECKBUTTON_ID_CUSTOM_CAN_FALL      9
 #define ED_CHECKBUTTON_ID_CUSTOM_CAN_SMASH     10
-#define ED_CHECKBUTTON_ID_CUSTOM_CAN_EXPLODE   11
-#define ED_CHECKBUTTON_ID_CUSTOM_SLIPPERY      12
-#define ED_CHECKBUTTON_ID_CUSTOM_WALKABLE      13
-#define ED_CHECKBUTTON_ID_CUSTOM_USE_GRAPHIC   14
-#define ED_CHECKBUTTON_ID_CUSTOM_USE_TEMPLATE  15
-#define ED_CHECKBUTTON_ID_CUSTOM_CHANGEABLE    16
-#define ED_CHECKBUTTON_ID_CHANGE_DELAY         17
+#define ED_CHECKBUTTON_ID_CUSTOM_SLIPPERY      11
+#define ED_CHECKBUTTON_ID_CUSTOM_WALKABLE      12
+#define ED_CHECKBUTTON_ID_CUSTOM_USE_GRAPHIC   13
+#define ED_CHECKBUTTON_ID_CUSTOM_USE_TEMPLATE  14
+#define ED_CHECKBUTTON_ID_CUSTOM_CHANGEABLE    15
+#define ED_CHECKBUTTON_ID_CHANGE_DELAY         16
 
-#define ED_NUM_CHECKBUTTONS                    18
+#define ED_NUM_CHECKBUTTONS                    17
 
 #define ED_CHECKBUTTON_ID_LEVEL_FIRST  ED_CHECKBUTTON_ID_DOUBLE_SPEED
 #define ED_CHECKBUTTON_ID_LEVEL_LAST   ED_CHECKBUTTON_ID_RANDOM_RESTRICTED
 
-#define ED_CHECKBUTTON_ID_CUSTOM_FIRST ED_CHECKBUTTON_ID_CUSTOM_INDESTRUCTIBLE
+#define ED_CHECKBUTTON_ID_CUSTOM_FIRST ED_CHECKBUTTON_ID_CUSTOM_EXPLODE_RESULT
 #define ED_CHECKBUTTON_ID_CUSTOM_LAST  ED_CHECKBUTTON_ID_CUSTOM_WALKABLE
 
 #define ED_CHECKBUTTON_ID_CHANGE_FIRST ED_CHECKBUTTON_ID_CUSTOM_USE_GRAPHIC
@@ -717,12 +723,12 @@ static struct
     NULL,                              NULL, "number of content areas"
   },
   {
-    ED_SETTINGS_XPOS(0),               ED_SETTINGS_YPOS(1),
+    ED_SETTINGS_XPOS(9),               ED_SETTINGS_YPOS(4),
     MIN_SCORE,                         MAX_SCORE,
     GADGET_ID_CUSTOM_SCORE_DOWN,       GADGET_ID_CUSTOM_SCORE_UP,
     GADGET_ID_CUSTOM_SCORE_TEXT,
     &custom_element.score,
-    NULL,                              NULL, "score for certain actions"
+    NULL,                              "score", NULL
   },
   {
     ED_SETTINGS_XPOS(1),               ED_SETTINGS_YPOS(5),
@@ -801,75 +807,85 @@ static struct
 
 static struct ValueTextInfo options_walk_to_action[] =
 {
-  { EP_DIGGABLE,               "diggable"              },
-  { EP_COLLECTIBLE,            "collectible"           },
-  { EP_PUSHABLE,               "pushable"              },
-  { -1,                                NULL                    }
+  { EP_DIGGABLE,               "diggable"                      },
+  { EP_COLLECTIBLE,            "collectible"                   },
+  { EP_PUSHABLE,               "pushable"                      },
+  { -1,                                NULL                            }
 };
 static int index_walk_to_action = 0;
 
 static struct ValueTextInfo options_move_pattern[] =
 {
-  { MV_LEFT,                   "left"                  },
-  { MV_RIGHT,                  "right"                 },
-  { MV_UP,                     "up"                    },
-  { MV_DOWN,                   "down"                  },
-  { MV_HORIZONTAL,             "horizontal"            },
-  { MV_VERTICAL,               "vertical"              },
-  { MV_ALL_DIRECTIONS,         "all directions"        },
-  { MV_TOWARDS_PLAYER,         "towards player"        },
-  { MV_AWAY_FROM_PLAYER,       "away from player"      },
-  { MV_ALONG_LEFT_SIDE,                "along left side"       },
-  { MV_ALONG_RIGHT_SIDE,       "along right side"      },
-  { -1,                                NULL                    }
+  { MV_LEFT,                   "left"                          },
+  { MV_RIGHT,                  "right"                         },
+  { MV_UP,                     "up"                            },
+  { MV_DOWN,                   "down"                          },
+  { MV_HORIZONTAL,             "horizontal"                    },
+  { MV_VERTICAL,               "vertical"                      },
+  { MV_ALL_DIRECTIONS,         "all directions"                },
+  { MV_TOWARDS_PLAYER,         "towards player"                },
+  { MV_AWAY_FROM_PLAYER,       "away from player"              },
+  { MV_ALONG_LEFT_SIDE,                "along left side"               },
+  { MV_ALONG_RIGHT_SIDE,       "along right side"              },
+  { -1,                                NULL                            }
 };
 static int index_move_pattern = 0;
 
 static struct ValueTextInfo options_move_direction[] =
 {
-  { MV_NO_MOVING,              "automatic"             },
-  { MV_LEFT,                   "left"                  },
-  { MV_RIGHT,                  "right"                 },
-  { MV_UP,                     "up"                    },
-  { MV_DOWN,                   "down"                  },
-  { -1,                                NULL                    }
+  { MV_NO_MOVING,              "automatic"                     },
+  { MV_LEFT,                   "left"                          },
+  { MV_RIGHT,                  "right"                         },
+  { MV_UP,                     "up"                            },
+  { MV_DOWN,                   "down"                          },
+  { -1,                                NULL                            }
 };
 static int index_move_direction = 0;
 
+static struct ValueTextInfo options_consistency[] =
+{
+  { EP_INDESTRUCTIBLE,         "indestructible"                },
+  { EP_CAN_EXPLODE_BY_FIRE,    "can explode by fire"           },
+  { EP_CAN_EXPLODE_SMASHED,    "can explode when smashed"      },
+  { EP_CAN_EXPLODE_IMPACT,     "can explode on impact"         },
+  { -1,                                NULL                            }
+};
+static int index_consistency = 0;
+
 static struct ValueTextInfo options_deadliness[] =
 {
-  { EP_DONT_GO_TO,             "walking to"            },
-  { EP_ENEMY,                  "hitting"               },
-  { EP_DONT_TOUCH,             "touching"              },
-  { -1,                                NULL                    }
+  { EP_DONT_RUN_INTO,          "running into"                  },
+  { EP_DONT_COLLIDE_WITH,      "colliding with"                },
+  { EP_DONT_TOUCH,             "touching"                      },
+  { -1,                                NULL                            }
 };
 static int index_deadliness = 0;
 
 static struct ValueTextInfo options_walkable_layer[] =
 {
-  { EP_WALKABLE_OVER,          "over"                  },
-  { EP_WALKABLE_INSIDE,                "inside"                },
-  { EP_WALKABLE_UNDER,         "under"                 },
-  { -1,                                NULL                    }
+  { EP_WALKABLE_OVER,          "over"                          },
+  { EP_WALKABLE_INSIDE,                "inside"                        },
+  { EP_WALKABLE_UNDER,         "under"                         },
+  { -1,                                NULL                            }
 };
 static int index_walkable_layer = 0;
 
 static struct ValueTextInfo options_time_units[] =
 {
-  { 50,                                "seconds"               },
-  { 1,                         "frames"                },
-  { -1,                                NULL                    }
+  { 50,                                "seconds"                       },
+  { 1,                         "frames"                        },
+  { -1,                                NULL                            }
 };
 static int index_time_units = 0;
 
 static struct ValueTextInfo options_change_cause[] =
 {
-  { 1,                         "specified delay"       },
-  { 2,                         "impact (active)"       },
-  { 3,                         "impact (passive)"      },
-  { 4,                         "touched by player"     },
-  { 5,                         "pressed by player"     },
-  { -1,                                NULL                    }
+  { 1,                         "specified delay"               },
+  { 2,                         "impact (active)"               },
+  { 3,                         "impact (passive)"              },
+  { 4,                         "touched by player"             },
+  { 5,                         "pressed by player"             },
+  { -1,                                NULL                            }
 };
 static int index_change_cause = 0, value_change_cause = 0;
 
@@ -880,7 +896,7 @@ static struct
   int size;    /* char size of selectbox or '-1' (dynamically determined) */
   struct ValueTextInfo *options;
   int *index, *value;
-  char *text_left, *infotext;
+  char *text_left, *text_right, *infotext;
 } selectbox_info[ED_NUM_SELECTBOX] =
 {
   {
@@ -889,7 +905,15 @@ static struct
     -1,
     options_walk_to_action, &index_walk_to_action,
     &custom_element.walk_to_action,
-    NULL, "diggable/collectible/pushable"
+    NULL, NULL, "diggable/collectible/pushable"
+  },
+  {
+    ED_SETTINGS_XPOS(1),               ED_SETTINGS_YPOS(3),
+    GADGET_ID_CUSTOM_CONSISTENCY,
+    -1,
+    options_consistency, &index_consistency,
+    &custom_element.consistency,
+    NULL, "to", "consistency/destructibility"
   },
   {
     ED_SETTINGS_XPOS(1),               ED_SETTINGS_YPOS(2),
@@ -897,7 +921,7 @@ static struct
     -1,
     options_deadliness, &index_deadliness,
     &custom_element.deadliness,
-    "deadly when", "deadliness of element"
+    "deadly when", NULL, "deadliness of element"
   },
   {
     ED_SETTINGS_XPOS(1),               ED_SETTINGS_YPOS(6),
@@ -905,7 +929,7 @@ static struct
     -1,
     options_move_pattern, &index_move_pattern,
     &custom_element.move_pattern,
-    "can move", "element move direction"
+    "can move", NULL, "element move direction"
   },
   {
     ED_SETTINGS_XPOS(1),               ED_SETTINGS_YPOS(7),
@@ -913,7 +937,7 @@ static struct
     -1,
     options_move_direction, &index_move_direction,
     &custom_element.move_direction_initial,
-    "starts moving", "initial element move direction"
+    "starts moving", NULL, "initial element move direction"
   },
   {
     ED_SETTINGS_XPOS(1),               ED_SETTINGS_YPOS(13),
@@ -921,7 +945,7 @@ static struct
     -1,
     options_walkable_layer, &index_walkable_layer,
     &custom_element.walkable_layer,
-    "player can walk", "layer where player can walk"
+    "player can walk", NULL, "layer where player can walk"
   },
   {
     ED_SETTINGS_XPOS(2),               ED_SETTINGS_YPOS(4),
@@ -929,7 +953,7 @@ static struct
     -1,
     options_time_units, &index_time_units,
     &custom_element.change.delay_frames,
-    "delay time given in", "delay time units for change"
+    "delay time given in", NULL, "delay time units for change"
   },
   {
     ED_SETTINGS_XPOS(0),               ED_COUNTER_YPOS(8),
@@ -937,7 +961,7 @@ static struct
     -1,
     options_change_cause, &index_change_cause,
     &value_change_cause,
-    "test:", "test-selectbox entry"
+    "test:", NULL, "test-selectbox entry"
   },
 };
 
@@ -1119,9 +1143,9 @@ static struct
   },
   {
     ED_SETTINGS_XPOS(0),               ED_SETTINGS_YPOS(3),
-    GADGET_ID_CUSTOM_INDESTRUCTIBLE,
-    &custom_element_properties[EP_INDESTRUCTIBLE],
-    "indestructible",                  "element cannot be destroyed"
+    GADGET_ID_CUSTOM_EXPLODE_RESULT,
+    &custom_element_properties[EP_EXPLODE_RESULT],
+    NULL,                              "set consistency/destructibility"
   },
   {
     ED_SETTINGS_XPOS(0),               ED_SETTINGS_YPOS(4),
@@ -1148,19 +1172,13 @@ static struct
     "can fall",                                "element can fall down"
   },
   {
-    ED_SETTINGS_XPOS(0),               ED_SETTINGS_YPOS(10),
+    ED_SETTINGS_XPOS(6),               ED_SETTINGS_YPOS(9),
     GADGET_ID_CUSTOM_CAN_SMASH,
     &custom_element_properties[EP_CAN_SMASH],
-    "can smash",                       "element can smash other elements"
+    "can smash on impact",             "element can smash other elements"
   },
   {
-    ED_SETTINGS_XPOS(0),               ED_SETTINGS_YPOS(11),
-    GADGET_ID_CUSTOM_CAN_EXPLODE,
-    &custom_element_properties[EP_CAN_EXPLODE],
-    "can explode to:",                 "element can explode to other elements"
-  },
-  {
-    ED_SETTINGS_XPOS(0),               ED_SETTINGS_YPOS(12),
+    ED_SETTINGS_XPOS(0),               ED_SETTINGS_YPOS(10),
     GADGET_ID_CUSTOM_SLIPPERY,
     &custom_element_properties[EP_SLIPPERY],
     "slippery",                                "other elements can fall down from it"
@@ -3123,8 +3141,8 @@ static void MapTextInputGadget(int id)
 
   sprintf(infotext, "%s:", textinput_info[id].infotext);
   infotext[max_infotext_len] = '\0';
-
   DrawTextF(x, y, FONT_TEXT_1, infotext);
+
   ModifyGadget(level_editor_gadget[textinput_info[id].gadget_id],
               GDI_TEXT_VALUE, textinput_info[id].value, GDI_END);
 
@@ -3135,10 +3153,23 @@ static void MapSelectboxGadget(int id)
 {
   int xoffset_left = 0;
   int yoffset_left = ED_BORDER_SIZE;
+  int xoffset_right = ED_BORDER_SIZE;
+  int yoffset_right = ED_BORDER_SIZE;
   int x = selectbox_info[id].x + xoffset_left;
   int y = selectbox_info[id].y + yoffset_left;
 
   DrawTextF(x, y, FONT_TEXT_1, selectbox_info[id].text_left);
+
+  if (selectbox_info[id].text_right)
+  {
+    struct GadgetInfo *gi = level_editor_gadget[selectbox_info[id].gadget_id];
+
+    x = gi->x + gi->width + xoffset_right;
+    y = SY + selectbox_info[id].y + yoffset_right;
+
+    DrawText(x, y, selectbox_info[id].text_right, FONT_TEXT_1);
+  }
+
   ModifyEditorSelectbox(id, *selectbox_info[id].value);
 
   MapGadget(level_editor_gadget[selectbox_info[id].gadget_id]);
@@ -3305,13 +3336,30 @@ static void CopyCustomElementPropertiesToEditor(int element)
      IS_COLLECTIBLE(element) ? EP_COLLECTIBLE :
      IS_PUSHABLE(element) ? EP_PUSHABLE :
      EP_DIGGABLE);
+  custom_element_properties[EP_WALK_TO_OBJECT] =
+    (IS_DIGGABLE(element) ||
+     IS_COLLECTIBLE(element) ||
+     IS_PUSHABLE(element));
+
+  /* set consistency selectbox help value */
+  custom_element.consistency =
+    (IS_INDESTRUCTIBLE(element) ? EP_INDESTRUCTIBLE :
+     CAN_EXPLODE_BY_FIRE(element) ? EP_CAN_EXPLODE_BY_FIRE :
+     EP_INDESTRUCTIBLE);
+  custom_element_properties[EP_EXPLODE_RESULT] =
+    (IS_INDESTRUCTIBLE(element) ||
+     CAN_EXPLODE_BY_FIRE(element));
 
   /* set deadliness selectbox help value */
   custom_element.deadliness =
     (DONT_TOUCH(element) ? EP_DONT_TOUCH :
-     IS_ENEMY(element) ? EP_ENEMY :
-     DONT_GO_TO(element) ? EP_DONT_GO_TO :
-     EP_DONT_GO_TO);
+     DONT_COLLIDE_WITH(element) ? EP_DONT_COLLIDE_WITH :
+     DONT_RUN_INTO(element) ? EP_DONT_RUN_INTO :
+     EP_DONT_RUN_INTO);
+  custom_element_properties[EP_DEADLY] =
+    (DONT_TOUCH(element) ||
+     DONT_COLLIDE_WITH(element) ||
+     DONT_RUN_INTO(element));
 
   /* set walkable layer selectbox help value */
   custom_element.walkable_layer =
@@ -3319,6 +3367,10 @@ static void CopyCustomElementPropertiesToEditor(int element)
      IS_WALKABLE_INSIDE(element) ? EP_WALKABLE_INSIDE :
      IS_WALKABLE_UNDER(element) ? EP_WALKABLE_UNDER :
      EP_WALKABLE_OVER);
+  custom_element_properties[EP_WALKABLE] =
+    (IS_WALKABLE_OVER(element) ||
+     IS_WALKABLE_INSIDE(element) ||
+     IS_WALKABLE_UNDER(element));
 }
 
 static void CopyCustomElementPropertiesToGame(int element)
@@ -3334,9 +3386,15 @@ static void CopyCustomElementPropertiesToGame(int element)
   custom_element_properties[custom_element.walk_to_action] =
     custom_element_properties[EP_WALK_TO_OBJECT];
 
+  /* set consistency property from checkbox and selectbox */
+  custom_element_properties[EP_INDESTRUCTIBLE] = FALSE;
+  custom_element_properties[EP_CAN_EXPLODE_BY_FIRE] = FALSE;
+  custom_element_properties[custom_element.consistency] =
+    custom_element_properties[EP_EXPLODE_RESULT];
+
   /* set deadliness property from checkbox and selectbox */
-  custom_element_properties[EP_DONT_GO_TO] = FALSE;
-  custom_element_properties[EP_ENEMY] = FALSE;
+  custom_element_properties[EP_DONT_RUN_INTO] = FALSE;
+  custom_element_properties[EP_DONT_COLLIDE_WITH] = FALSE;
   custom_element_properties[EP_DONT_TOUCH] = FALSE;
   custom_element_properties[custom_element.deadliness] =
     custom_element_properties[EP_DEADLY];
@@ -4064,14 +4122,22 @@ static void DrawPropertiesInfo()
   {
     /* configurable properties */
     { EP_INDESTRUCTIBLE,       "- undestructible"                      },
+    { EP_SLIPPERY,             "- slippery for falling objects"        },
+    { EP_EM_SLIPPERY_WALL,     "- slippery for some gems (EM style)"   },
+
     { EP_DIGGABLE,             "- diggable"                            },
     { EP_COLLECTIBLE,          "- collectible"                         },
     { EP_PUSHABLE,             "- pushable"                            },
+
+    { EP_CAN_MOVE,             "- can move"                            },
     { EP_CAN_FALL,             "- can fall"                            },
     { EP_CAN_SMASH,            "- can smash other objects"             },
-    { EP_CAN_MOVE,             "- can move"                            },
-    { EP_SLIPPERY,             "- slippery for falling objects"        },
-    { EP_EM_SLIPPERY_WALL,     "- slippery for some gems (EM style)"   },
+    { EP_CAN_EXPLODE_BY_FIRE,  "- can explode (by fire/explosion)"     },
+
+    { EP_DONT_RUN_INTO,                "- deadly when running into"            },
+    { EP_DONT_COLLIDE_WITH,    "- deadly when colliding with"          },
+    { EP_DONT_TOUCH,           "- deadly when touching"                },
+
     { EP_WALKABLE_OVER,                "- player can walk over it"             },
     { EP_WALKABLE_INSIDE,      "- player can walk inside it"           },
     { EP_WALKABLE_UNDER,       "- player can walk under it"            },
@@ -4081,10 +4147,6 @@ static void DrawPropertiesInfo()
 
     /* pre-defined properties */
     { EP_CAN_PASS_MAGIC_WALL,  "- can pass magic walls"                },
-    { EP_DONT_TOUCH,           "- deadly when touched"                 },
-    { EP_ENEMY,                        "- can kill the player"                 },
-    { EP_DONT_GO_TO,           "- deadly when walked to"               },
-    { EP_CAN_EXPLODE,          "- can explode"                         },
     { EP_HAS_CONTENT,          "- can contain other elements"          },
 
     { -1,                      NULL                                    }
@@ -5559,6 +5621,12 @@ static void HandleControlButtons(struct GadgetInfo *gi)
        break;
       }
 
+      if (edit_mode != ED_MODE_DRAWING)
+      {
+       DrawDrawingWindow();
+       edit_mode = ED_MODE_DRAWING;
+      }
+
       undo_buffer_position =
        (undo_buffer_position - 1 + NUM_UNDO_STEPS) % NUM_UNDO_STEPS;
       undo_buffer_steps--;
@@ -5583,6 +5651,12 @@ static void HandleControlButtons(struct GadgetInfo *gi)
       break;
 
     case GADGET_ID_CLEAR:
+      if (edit_mode != ED_MODE_DRAWING)
+      {
+       DrawDrawingWindow();
+       edit_mode = ED_MODE_DRAWING;
+      }
+
       for(x=0; x<MAX_LEV_FIELDX; x++) 
        for(y=0; y<MAX_LEV_FIELDY; y++) 
          Feld[x][y] = (button == 1 ? EL_EMPTY : new_element);
index 99d8fb3055b4bd592ba86eda326bef20586f2ca6..948d46bb90083e3228985d257963e25038fe1bb2 100644 (file)
@@ -1825,7 +1825,7 @@ void Explode(int ex, int ey, int phase, int mode)
 
     if (IS_PLAYER(x, y))
       KillHeroUnlessProtected(x, y);
-    else if (CAN_EXPLODE(element))
+    else if (CAN_EXPLODE_BY_FIRE(element))
     {
       Feld[x][y] = Store2[x][y];
       Store2[x][y] = 0;
@@ -2411,7 +2411,7 @@ void Impact(int x, int y)
     }
     else if (element == EL_BD_DIAMOND)
     {
-      if (IS_ENEMY(smashed) && IS_BD_ELEMENT(smashed))
+      if (IS_CLASSIC_ENEMY(smashed) && IS_BD_ELEMENT(smashed))
       {
        Bang(x, y + 1);
        return;
@@ -2430,7 +2430,7 @@ void Impact(int x, int y)
             element == EL_SP_ZONK ||
             element == EL_BD_ROCK)
     {
-      if (IS_ENEMY(smashed) ||
+      if (IS_CLASSIC_ENEMY(smashed) ||
          smashed == EL_BOMB ||
          smashed == EL_SP_DISK_ORANGE ||
          smashed == EL_DX_SUPABOMB ||
@@ -2931,11 +2931,11 @@ void TurnRound(int x, int y)
 
     if (IN_LEV_FIELD(left_x, left_y) &&
        (IS_FREE(left_x, left_y) ||
-        (IS_ENEMY(element) && IS_FREE_OR_PLAYER(left_x, left_y))))
+        (DONT_COLLIDE_WITH(element) && IS_FREE_OR_PLAYER(left_x, left_y))))
       can_turn_left = TRUE;
     if (IN_LEV_FIELD(right_x, right_y) &&
        (IS_FREE(right_x, right_y) ||
-        (IS_ENEMY(element) && IS_FREE_OR_PLAYER(right_x, right_y))))
+        (DONT_COLLIDE_WITH(element) && IS_FREE_OR_PLAYER(right_x, right_y))))
       can_turn_right = TRUE;
 
     if (can_turn_left && can_turn_right)
@@ -2970,11 +2970,11 @@ void TurnRound(int x, int y)
   {
     if (IN_LEV_FIELD(left_x, left_y) &&
        (IS_FREE(left_x, left_y) ||
-        (IS_ENEMY(element) && IS_FREE_OR_PLAYER(left_x, left_y))))
+        (DONT_COLLIDE_WITH(element) && IS_FREE_OR_PLAYER(left_x, left_y))))
       MovDir[x][y] = left_dir;
     else if (!IN_LEV_FIELD(move_x, move_y) ||
             (!IS_FREE(move_x, move_y) &&
-             (!IS_ENEMY(element) || !IS_FREE_OR_PLAYER(move_x, move_y))))
+             (!DONT_COLLIDE_WITH(element) || !IS_FREE_OR_PLAYER(move_x, move_y))))
       MovDir[x][y] = right_dir;
 
     if (MovDir[x][y] != old_move_dir)
@@ -2984,11 +2984,11 @@ void TurnRound(int x, int y)
   {
     if (IN_LEV_FIELD(right_x, right_y) &&
        (IS_FREE(right_x, right_y) ||
-        (IS_ENEMY(element) && IS_FREE_OR_PLAYER(right_x, right_y))))
+        (DONT_COLLIDE_WITH(element) && IS_FREE_OR_PLAYER(right_x, right_y))))
       MovDir[x][y] = right_dir;
     else if (!IN_LEV_FIELD(move_x, move_y) ||
             (!IS_FREE(move_x, move_y) &&
-             (!IS_ENEMY(element) || !IS_FREE_OR_PLAYER(move_x, move_y))))
+             (!DONT_COLLIDE_WITH(element) || !IS_FREE_OR_PLAYER(move_x, move_y))))
       MovDir[x][y] = left_dir;
 
     if (MovDir[x][y] != old_move_dir)
@@ -3049,7 +3049,7 @@ void TurnRound(int x, int y)
       Moving2Blocked(x, y, &newx, &newy);
 
       if (IN_LEV_FIELD(newx, newy) && (IS_FREE(newx, newy) ||
-                                      (IS_ENEMY(element) &&
+                                      (DONT_COLLIDE_WITH(element) &&
                                        IS_FREE_OR_PLAYER(newx, newy)) ||
                                       Feld[newx][newy] == EL_ACID))
        return;
@@ -3059,7 +3059,7 @@ void TurnRound(int x, int y)
       Moving2Blocked(x, y, &newx, &newy);
 
       if (IN_LEV_FIELD(newx, newy) && (IS_FREE(newx, newy) ||
-                                      (IS_ENEMY(element) &&
+                                      (DONT_COLLIDE_WITH(element) &&
                                        IS_FREE_OR_PLAYER(newx, newy)) ||
                                       Feld[newx][newy] == EL_ACID))
        return;
@@ -3431,7 +3431,7 @@ void StartMoving(int x, int y)
          {
            int flamed = MovingOrBlocked2Element(xx, yy);
 
-           if (IS_ENEMY(flamed) || CAN_EXPLODE(flamed))
+           if (IS_CLASSIC_ENEMY(flamed) || CAN_EXPLODE_BY_FIRE(flamed))
              Bang(xx, yy);
            else
              RemoveMovingField(xx, yy);
@@ -3463,14 +3463,14 @@ void StartMoving(int x, int y)
 
     Moving2Blocked(x, y, &newx, &newy);        /* get next screen position */
 
-    if (IS_ENEMY(element) && IS_PLAYER(newx, newy) &&
+    if (DONT_COLLIDE_WITH(element) && IS_PLAYER(newx, newy) &&
        !PLAYER_PROTECTED(newx, newy))
     {
 #if 1
       TestIfBadThingRunsIntoHero(x, y, MovDir[x][y]);
       return;
 #else
-      /* enemy got the player */
+      /* player killed by element which is deadly when colliding with */
       MovDir[x][y] = 0;
       KillHero(PLAYERINFO(newx, newy));
       return;
@@ -3515,6 +3515,8 @@ void StartMoving(int x, int y)
       }
       else if (!IS_FREE(newx, newy))
       {
+       GfxAction[x][y] = ACTION_WAITING;
+
        if (IS_PLAYER(x, y))
          DrawPlayerField(x, y);
        else
@@ -3566,7 +3568,9 @@ void StartMoving(int x, int y)
        int element2 = (IN_LEV_FIELD(newx2, newy2) ?
                        MovingOrBlocked2Element(newx2, newy2) : EL_STEELWALL);
 
-       if ((wanna_flame || IS_ENEMY(element1) || IS_ENEMY(element2)) &&
+       if ((wanna_flame ||
+            IS_CLASSIC_ENEMY(element1) ||
+            IS_CLASSIC_ENEMY(element2)) &&
            element1 != EL_DRAGON && element2 != EL_DRAGON &&
            element1 != EL_FLAMES && element2 != EL_FLAMES)
        {
@@ -5491,7 +5495,7 @@ boolean MoveFigureOneStep(struct PlayerInfo *player,
   element = MovingOrBlocked2ElementIfNotLeaving(new_jx, new_jy);
 #endif
 
-  if (DONT_GO_TO(element))
+  if (DONT_RUN_INTO(element))
   {
     if (element == EL_ACID && dx == 0 && dy == 1)
     {
@@ -5829,11 +5833,11 @@ void TestIfGoodThingHitsBadThing(int good_x, int good_y, int good_move_dir)
     test_element = MovingOrBlocked2ElementIfNotLeaving(test_x, test_y);
 #endif
 
-    /* 1st case: good thing is moving towards DONT_GO_TO style bad thing;
+    /* 1st case: good thing is moving towards DONT_RUN_INTO style bad thing;
        2nd case: DONT_TOUCH style bad thing does not move away from good thing
     */
-    if ((DONT_GO_TO(test_element) && good_move_dir == test_dir[i]) ||
-       (DONT_TOUCH(test_element) && test_move_dir != test_dir[i]))
+    if ((DONT_RUN_INTO(test_element) && good_move_dir == test_dir[i]) ||
+       (DONT_TOUCH(test_element)    && test_move_dir != test_dir[i]))
     {
       kill_x = test_x;
       kill_y = test_y;
@@ -5893,11 +5897,11 @@ void TestIfBadThingHitsGoodThing(int bad_x, int bad_y, int bad_move_dir)
 
     test_element = Feld[test_x][test_y];
 
-    /* 1st case: good thing is moving towards DONT_GO_TO style bad thing;
+    /* 1st case: good thing is moving towards DONT_RUN_INTO style bad thing;
        2nd case: DONT_TOUCH style bad thing does not move away from good thing
     */
-    if ((DONT_GO_TO(bad_element) &&  bad_move_dir == test_dir[i]) ||
-       (DONT_TOUCH(bad_element) && test_move_dir != test_dir[i]))
+    if ((DONT_RUN_INTO(bad_element) &&  bad_move_dir == test_dir[i]) ||
+       (DONT_TOUCH(bad_element)    && test_move_dir != test_dir[i]))
     {
       /* good thing is player or penguin that does not move away */
       if (IS_PLAYER(test_x, test_y))
index 9b2e9ea702ec7fa57275dfb29f9c05641ad8f998..5274a2ac5a30aaa3f2808727564f0a60f90a95d7 100644 (file)
@@ -1101,7 +1101,7 @@ void InitElementPropertiesStatic()
     EL_INVISIBLE_SAND,
     EL_INVISIBLE_SAND_ACTIVE,
 
-    /* !!! currently not diggable, but handled by 'ep_dont_go_to' !!! */
+    /* !!! currently not diggable, but handled by 'ep_dont_run_into' !!! */
 #if 0
     EL_LANDMINE,
     EL_TRAP_ACTIVE,
@@ -1272,7 +1272,7 @@ void InitElementPropertiesStatic()
     -1
   };
 
-  static int ep_can_explode[] =
+  static int ep_can_explode_by_fire[] =
   {
     EL_BOMB,
     EL_DYNAMITE_ACTIVE,
@@ -1302,29 +1302,6 @@ void InitElementPropertiesStatic()
 
   static int ep_can_move[] =
   {
-    /* only stored in level file */
-    EL_BUG_RIGHT,
-    EL_BUG_UP,
-    EL_BUG_LEFT,
-    EL_BUG_DOWN,
-    EL_SPACESHIP_RIGHT,
-    EL_SPACESHIP_UP,
-    EL_SPACESHIP_LEFT,
-    EL_SPACESHIP_DOWN,
-    EL_BD_BUTTERFLY_RIGHT,
-    EL_BD_BUTTERFLY_UP,
-    EL_BD_BUTTERFLY_LEFT,
-    EL_BD_BUTTERFLY_DOWN,
-    EL_BD_FIREFLY_RIGHT,
-    EL_BD_FIREFLY_UP,
-    EL_BD_FIREFLY_LEFT,
-    EL_BD_FIREFLY_DOWN,
-    EL_PACMAN_RIGHT,
-    EL_PACMAN_UP,
-    EL_PACMAN_LEFT,
-    EL_PACMAN_DOWN,
-
-    /* level file and runtime elements */
     EL_BUG,
     EL_SPACESHIP,
     EL_BD_BUTTERFLY,
@@ -1563,7 +1540,7 @@ void InitElementPropertiesStatic()
     -1
   };
 
-  static int ep_enemy[] =
+  static int ep_dont_collide_with[] =
   {
     EL_BUG,
     EL_SPACESHIP,
@@ -1579,7 +1556,7 @@ void InitElementPropertiesStatic()
     -1
   };
 
-  static int ep_dont_go_to[] =
+  static int ep_dont_run_into[] =
   {
     EL_BUG,
     EL_SPACESHIP,
@@ -1983,6 +1960,22 @@ void InitElementPropertiesStatic()
     -1
   };
 
+  static int ep_classic_enemy[] =
+  {
+    EL_BUG,
+    EL_SPACESHIP,
+    EL_BD_BUTTERFLY,
+    EL_BD_FIREFLY,
+
+    EL_YAMYAM,
+    EL_DARK_YAMYAM,
+    EL_ROBOT,
+    EL_PACMAN,
+    EL_SP_SNIKSNAK,
+    EL_SP_ELECTRON,
+    -1
+  };
+
   static int ep_belt[] =
   {
     EL_CONVEYOR_BELT_1_LEFT,
@@ -2273,9 +2266,9 @@ void InitElementPropertiesStatic()
     { ep_can_pass_magic_wall,  EP_CAN_PASS_MAGIC_WALL  },
     { ep_switchable,           EP_SWITCHABLE           },
     { ep_dont_touch,           EP_DONT_TOUCH           },
-    { ep_enemy,                        EP_ENEMY                },
-    { ep_dont_go_to,           EP_DONT_GO_TO           },
-    { ep_can_explode,          EP_CAN_EXPLODE          },
+    { ep_dont_collide_with,    EP_DONT_COLLIDE_WITH    },
+    { ep_dont_run_into,                EP_DONT_RUN_INTO        },
+    { ep_can_explode_by_fire,  EP_CAN_EXPLODE_BY_FIRE  },
     { ep_bd_element,           EP_BD_ELEMENT           },
     { ep_sp_element,           EP_SP_ELEMENT           },
     { ep_sb_element,           EP_SB_ELEMENT           },
@@ -2285,6 +2278,7 @@ void InitElementPropertiesStatic()
     { ep_food_pig,             EP_FOOD_PIG             },
     { ep_historic_wall,                EP_HISTORIC_WALL        },
     { ep_historic_solid,       EP_HISTORIC_SOLID       },
+    { ep_classic_enemy,                EP_CLASSIC_ENEMY        },
     { ep_belt,                 EP_BELT                 },
     { ep_belt_active,          EP_BELT_ACTIVE          },
     { ep_belt_switch,          EP_BELT_SWITCH          },
@@ -2299,7 +2293,40 @@ void InitElementPropertiesStatic()
     { NULL,                    -1                      }
   };
 
-  int i, j;
+  static int copy_properties[][5] =
+  {
+    {
+      EL_BUG,
+      EL_BUG_LEFT,             EL_BUG_RIGHT,
+      EL_BUG_UP,               EL_BUG_DOWN
+    },
+    {
+      EL_SPACESHIP,
+      EL_SPACESHIP_LEFT,       EL_SPACESHIP_RIGHT,
+      EL_SPACESHIP_UP,         EL_SPACESHIP_DOWN
+    },
+    {
+      EL_BD_BUTTERFLY,
+      EL_BD_BUTTERFLY_LEFT,    EL_BD_BUTTERFLY_RIGHT,
+      EL_BD_BUTTERFLY_UP,      EL_BD_BUTTERFLY_DOWN
+    },
+    {
+      EL_BD_FIREFLY,
+      EL_BD_FIREFLY_LEFT,      EL_BD_FIREFLY_RIGHT,
+      EL_BD_FIREFLY_UP,                EL_BD_FIREFLY_DOWN
+    },
+    {
+      EL_PACMAN,
+      EL_PACMAN_LEFT,          EL_PACMAN_RIGHT,
+      EL_PACMAN_UP,            EL_PACMAN_DOWN
+    },
+    {
+      -1,
+      -1, -1, -1, -1
+    }
+  };
+
+  int i, j, k;
 
   /* always start with reliable default values (element has no properties) */
   for (i=0; i < MAX_NUM_ELEMENTS; i++)
@@ -2311,6 +2338,13 @@ void InitElementPropertiesStatic()
     for (j=0; (element_properties[i].elements)[j] != -1; j++)
       SET_PROPERTY((element_properties[i].elements)[j],
                   element_properties[i].property, TRUE);
+
+  /* copy properties to some elements that are only stored in level file */
+  for (i=0; i < NUM_ELEMENT_PROPERTIES; i++)
+    for (j=0; copy_properties[j][0] != -1; j++)
+      if (HAS_PROPERTY(copy_properties[j][0], i))
+       for (k=1; k<=4; k++)
+         SET_PROPERTY(copy_properties[j][k], i, TRUE);
 }
 
 void InitElementPropertiesEngine(int engine_version)
@@ -2321,16 +2355,16 @@ void InitElementPropertiesEngine(int engine_version)
     EP_AMOEBALIVE,
     EP_AMOEBOID,
     EP_PFORTE,
-    EP_ENEMY,
+    EP_DONT_COLLIDE_WITH,
     EP_MAUER,
     EP_CAN_FALL,
     EP_CAN_SMASH,
     EP_CAN_PASS_MAGIC_WALL,
     EP_CAN_MOVE,
     EP_DONT_TOUCH,
-    EP_DONT_GO_TO,
+    EP_DONT_RUN_INTO,
     EP_GEM,
-    EP_CAN_EXPLODE,
+    EP_CAN_EXPLODE_BY_FIRE,
     EP_PUSHABLE,
     EP_PLAYER,
     EP_HAS_CONTENT,
@@ -2353,11 +2387,11 @@ void InitElementPropertiesEngine(int engine_version)
     EP_AMOEBALIVE,
     EP_AMOEBOID,
     EP_CAN_BE_CRUMBLED,
-    EP_ENEMY,
+    EP_DONT_COLLIDE_WITH,
     EP_CAN_FALL,
     EP_CAN_SMASH,
     EP_CAN_MOVE,
-    EP_DONT_GO_TO,
+    EP_DONT_RUN_INTO,
     EP_FOOD_DARK_YAMYAM,
     EP_GEM,
     EP_FOOD_PENGUIN,
@@ -2455,13 +2489,13 @@ void InitElementPropertiesEngine(int engine_version)
                                           !IS_WALKABLE_OVER(i) &&
                                           !IS_WALKABLE_UNDER(i)));
 
-    /* ---------- ENEMY ---------------------------------------------------- */
-    if (DONT_TOUCH(i))
-      SET_PROPERTY(i, EP_ENEMY, TRUE);
+    /* ---------- DONT_COLLIDE_WITH ---------------------------------------- */
+    if (DONT_TOUCH(i))         /* dont_touch => dont_collide_with */
+      SET_PROPERTY(i, EP_DONT_COLLIDE_WITH, TRUE);
 
-    /* ---------- DONT_GO_TO ----------------------------------------------- */
-    if (IS_ENEMY(i))
-      SET_PROPERTY(i, EP_DONT_GO_TO, TRUE);
+    /* ---------- DONT_RUN_INTO -------------------------------------------- */
+    if (DONT_COLLIDE_WITH(i))  /* dont_collide_with => dont_run_into */
+      SET_PROPERTY(i, EP_DONT_RUN_INTO, TRUE);
   }
 
 #if 0
index 8ffeb3de6d9736a06e51fbfc382ea7b95da61b6d..1e7ea6b7ea2e71499e2c58c6134cf8c11aba378a 100644 (file)
 /* values for configurable properties (custom elem's only, else pre-defined) */
 #define EP_DIGGABLE            0
 #define EP_COLLECTIBLE         1
-#define EP_DONT_GO_TO          2
-#define EP_ENEMY               3
+#define EP_DONT_RUN_INTO       2
+#define EP_DONT_COLLIDE_WITH   3
 #define EP_DONT_TOUCH          4
 #define EP_INDESTRUCTIBLE      5
 #define EP_SLIPPERY            6
-#define EP_CAN_EXPLODE         7
+#define EP_CAN_EXPLODE_BY_FIRE 7
 #define EP_CAN_MOVE            8
 #define EP_CAN_FALL            9
 #define EP_CAN_SMASH           10
@@ -79,8 +79,8 @@
 #define EP_PASSABLE_INSIDE     15
 #define EP_PASSABLE_UNDER      16
 #define EP_CHANGEABLE          17
-#define EP_UNUSED_18           18
-#define EP_UNUSED_19           19
+#define EP_CAN_EXPLODE_SMASHED 18
+#define EP_CAN_EXPLODE_IMPACT  19
 #define EP_UNUSED_20           20
 #define EP_UNUSED_21           21
 #define EP_UNUSED_22           22
 #define EP_FOOD_PIG            36
 #define EP_HISTORIC_WALL       37
 #define EP_HISTORIC_SOLID      38
-#define EP_BELT                        39
-#define EP_BELT_ACTIVE         40
-#define EP_BELT_SWITCH         41
-#define EP_TUBE                        42
-#define EP_KEYGATE             43
-#define EP_AMOEBOID            44
-#define EP_AMOEBALIVE          45
-#define EP_HAS_CONTENT         46
-#define EP_ACTIVE_BOMB         47
-#define EP_INACTIVE            48
+#define EP_CLASSIC_ENEMY       39
+#define EP_BELT                        40
+#define EP_BELT_ACTIVE         41
+#define EP_BELT_SWITCH         42
+#define EP_TUBE                        43
+#define EP_KEYGATE             44
+#define EP_AMOEBOID            45
+#define EP_AMOEBALIVE          46
+#define EP_HAS_CONTENT         47
+#define EP_ACTIVE_BOMB         48
+#define EP_INACTIVE            49
 
 /* values for derived properties (determined from properties above) */
-#define EP_ACCESSIBLE_OVER     49
-#define EP_ACCESSIBLE_INSIDE   50
-#define EP_ACCESSIBLE_UNDER    51
-#define EP_WALKABLE            52
-#define EP_PASSABLE            53
-#define EP_ACCESSIBLE          54
-#define EP_SNAPPABLE           55
-#define EP_WALL                        56
-#define EP_SOLID_FOR_PUSHING   57
-#define EP_DRAGONFIRE_PROOF    58
-#define EP_EXPLOSION_PROOF     59
+#define EP_ACCESSIBLE_OVER     50
+#define EP_ACCESSIBLE_INSIDE   51
+#define EP_ACCESSIBLE_UNDER    52
+#define EP_WALKABLE            53
+#define EP_PASSABLE            54
+#define EP_ACCESSIBLE          55
+#define EP_SNAPPABLE           56
+#define EP_WALL                        57
+#define EP_SOLID_FOR_PUSHING   58
+#define EP_DRAGONFIRE_PROOF    59
+#define EP_EXPLOSION_PROOF     60
 
 /* values for internal purpose only (level editor) */
-#define EP_WALK_TO_OBJECT      60
-#define EP_DEADLY              61
+#define EP_EXPLODE_RESULT      61
+#define EP_WALK_TO_OBJECT      62
+#define EP_DEADLY              63
 
-#define NUM_ELEMENT_PROPERTIES 62
+#define NUM_ELEMENT_PROPERTIES 64
 
 #define NUM_EP_BITFIELDS       ((NUM_ELEMENT_PROPERTIES + 31) / 32)
 #define EP_BITFIELD_BASE       0
 /* macros for configurable properties */
 #define IS_DIGGABLE(e)         HAS_PROPERTY(e, EP_DIGGABLE)
 #define IS_COLLECTIBLE(e)      HAS_PROPERTY(e, EP_COLLECTIBLE)
-#define DONT_GO_TO(e)          HAS_PROPERTY(e, EP_DONT_GO_TO)
-#define IS_ENEMY(e)            HAS_PROPERTY(e, EP_ENEMY)
+#define DONT_RUN_INTO(e)       HAS_PROPERTY(e, EP_DONT_RUN_INTO)
+#define DONT_COLLIDE_WITH(e)   HAS_PROPERTY(e, EP_DONT_COLLIDE_WITH)
 #define DONT_TOUCH(e)          HAS_PROPERTY(e, EP_DONT_TOUCH)
 #define IS_INDESTRUCTIBLE(e)   HAS_PROPERTY(e, EP_INDESTRUCTIBLE)
 #define IS_SLIPPERY(e)         HAS_PROPERTY(e, EP_SLIPPERY)
-#define CAN_EXPLODE(e)         HAS_PROPERTY(e, EP_CAN_EXPLODE)
+#define CAN_EXPLODE_BY_FIRE(e) HAS_PROPERTY(e, EP_CAN_EXPLODE_BY_FIRE)
 #define CAN_MOVE(e)            HAS_PROPERTY(e, EP_CAN_MOVE)
 #define CAN_FALL(e)            HAS_PROPERTY(e, EP_CAN_FALL)
 #define CAN_SMASH(e)           HAS_PROPERTY(e, EP_CAN_SMASH)
 #define IS_FOOD_PIG(e)         HAS_PROPERTY(e, EP_FOOD_PIG)
 #define IS_HISTORIC_WALL(e)    HAS_PROPERTY(e, EP_HISTORIC_WALL)
 #define IS_HISTORIC_SOLID(e)   HAS_PROPERTY(e, EP_HISTORIC_SOLID)
+#define IS_CLASSIC_ENEMY(e)    HAS_PROPERTY(e, EP_CLASSIC_ENEMY)
 #define IS_BELT(e)             HAS_PROPERTY(e, EP_BELT)
 #define IS_BELT_ACTIVE(e)      HAS_PROPERTY(e, EP_BELT_ACTIVE)
 #define IS_BELT_SWITCH(e)      HAS_PROPERTY(e, EP_BELT_SWITCH)
@@ -1173,6 +1176,7 @@ struct ElementInfo
   int move_pattern;            /* direction movable element moves to */
   int move_direction_initial;  /* initial direction element moves to */
 
+  int consistency;             /* only for level editor; not stored */
   int walk_to_action;          /* only for level editor; not stored */
   int deadliness;              /* only for level editor; not stored */
   int walkable_layer;          /* only for level editor; not stored */
index f2f3cdd03859b746a9b97f774d6854db2c8d7a0c..369e0488f9c81eebd52549ea9b348267d1f036bb 100644 (file)
@@ -1191,7 +1191,7 @@ static void DrawLevelFieldCrumbledSandExt(int x, int y, int graphic, int frame)
   element = (GfxElement[x][y] != EL_UNDEFINED ? GfxElement[x][y] : Feld[x][y]);
 
   /* crumble field itself */
-  if (CAN_BE_CRUMBLED(element))
+  if (CAN_BE_CRUMBLED(element) && !IS_MOVING(x, y))
   {
     if (!IN_SCR_FIELD(sx, sy))
       return;
@@ -1206,7 +1206,7 @@ static void DrawLevelFieldCrumbledSandExt(int x, int y, int graphic, int frame)
       element = (IN_LEV_FIELD(xx, yy) ? Feld[xx][yy] : EL_STEELWALL);
 
       /* check if neighbour field is of same type */
-      if (CAN_BE_CRUMBLED(element))
+      if (CAN_BE_CRUMBLED(element) && !IS_MOVING(xx, yy))
        continue;
 
       if (i == 1 || i == 2)
@@ -1243,7 +1243,8 @@ static void DrawLevelFieldCrumbledSandExt(int x, int y, int graphic, int frame)
 
       if (!IN_LEV_FIELD(xx, yy) ||
          !IN_SCR_FIELD(sxx, syy) ||
-         !CAN_BE_CRUMBLED(Feld[xx][yy]))
+         !CAN_BE_CRUMBLED(Feld[xx][yy]) ||
+         IS_MOVING(xx, yy))
        continue;
 
       if (i == 1 || i == 2)