rnd-20040326-1-src
[rocksndiamonds.git] / src / init.c
index 480784b1041ad2680a4294af5eecf27c42cc90f2..715a57fde04e3dfaf450288dce2bb90f048b5973 100644 (file)
@@ -1585,6 +1585,7 @@ static int get_special_property_bit(int element, int property_bit_nr)
     { EL_PLAYER_3,             0       },
     { EL_PLAYER_4,             0       },
     { EL_SP_MURPHY,            0       },
+    { EL_SOKOBAN_FIELD_PLAYER, 0       },
 
     /* all element that can move may be able to also move into acid */
     { EL_BUG,                  1       },
@@ -1733,6 +1734,7 @@ void InitElementPropertiesStatic()
     EL_INVISIBLE_SAND_ACTIVE,
 
     /* !!! currently not diggable, but handled by 'ep_dont_run_into' !!! */
+    /* (if amoeba can grow into anything diggable, maybe keep these out) */
 #if 0
     EL_LANDMINE,
     EL_TRAP_ACTIVE,
@@ -2234,7 +2236,7 @@ void InitElementPropertiesStatic()
     -1
   };
 
-  static int ep_can_explode_dyna[] =
+  static int ep_can_explode_cross[] =
   {
     -1
   };
@@ -2261,6 +2263,7 @@ void InitElementPropertiesStatic()
     EL_PLAYER_3,
     EL_PLAYER_4,
     EL_SP_MURPHY,
+    EL_SOKOBAN_FIELD_PLAYER,
     -1
   };
 
@@ -2322,6 +2325,9 @@ void InitElementPropertiesStatic()
     EL_EXIT_OPEN,
     EL_STEELWALL,
     EL_PLAYER_1,
+    EL_PLAYER_2,
+    EL_PLAYER_3,
+    EL_PLAYER_4,
     EL_BD_FIREFLY,
     EL_BD_FIREFLY_1,
     EL_BD_FIREFLY_2,
@@ -2405,7 +2411,11 @@ void InitElementPropertiesStatic()
     EL_SOKOBAN_OBJECT,
     EL_SOKOBAN_FIELD_EMPTY,
     EL_SOKOBAN_FIELD_FULL,
+    EL_SOKOBAN_FIELD_PLAYER,
     EL_PLAYER_1,
+    EL_PLAYER_2,
+    EL_PLAYER_3,
+    EL_PLAYER_4,
     EL_INVISIBLE_STEELWALL,
     -1
   };
@@ -2830,6 +2840,24 @@ void InitElementPropertiesStatic()
     -1
   };
 
+  static int ep_can_turn_each_move[] =
+  {
+    /* !!! do something with this one !!! */
+    -1
+  };
+
+  static int ep_can_grow[] =
+  {
+    EL_BD_AMOEBA,
+    EL_AMOEBA_DROP,
+    EL_AMOEBA_WET,
+    EL_AMOEBA_DRY,
+    EL_AMOEBA_FULL,
+    EL_GAME_OF_LIFE,
+    EL_BIOMAZE,
+    -1
+  };
+
   static int ep_active_bomb[] =
   {
     EL_DYNAMITE_ACTIVE,
@@ -3026,7 +3054,7 @@ void InitElementPropertiesStatic()
     { ep_droppable,            EP_DROPPABLE            },
     { ep_can_explode_1x1,      EP_CAN_EXPLODE_1X1      },
     { ep_pushable,             EP_PUSHABLE             },
-    { ep_can_explode_dyna,     EP_CAN_EXPLODE_DYNA     },
+    { ep_can_explode_cross,    EP_CAN_EXPLODE_CROSS    },
     { ep_protected,            EP_PROTECTED            },
 
     { ep_player,               EP_PLAYER               },
@@ -3050,6 +3078,8 @@ void InitElementPropertiesStatic()
     { ep_amoeboid,             EP_AMOEBOID             },
     { ep_amoebalive,           EP_AMOEBALIVE           },
     { ep_has_content,          EP_HAS_CONTENT          },
+    { ep_can_turn_each_move,   EP_CAN_TURN_EACH_MOVE   },
+    { ep_can_grow,             EP_CAN_GROW             },
     { ep_active_bomb,          EP_ACTIVE_BOMB          },
     { ep_inactive,             EP_INACTIVE             },
 
@@ -3320,7 +3350,7 @@ void InitElementPropertiesEngine(int engine_version)
     /* ---------- CAN_EXPLODE_3X3 ------------------------------------------ */
     SET_PROPERTY(i, EP_CAN_EXPLODE_3X3, (CAN_EXPLODE(i) &&
                                         !CAN_EXPLODE_1X1(i) &&
-                                        !CAN_EXPLODE_DYNA(i)));
+                                        !CAN_EXPLODE_CROSS(i)));
 
     /* ---------- CAN_EXPLODE_BY_DRAGONFIRE -------------------------------- */
     SET_PROPERTY(i, EP_CAN_EXPLODE_BY_DRAGONFIRE, CAN_EXPLODE_BY_FIRE(i));
@@ -3330,7 +3360,8 @@ void InitElementPropertiesEngine(int engine_version)
                                                  i == EL_BLACK_ORB));
 
     /* ---------- COULD_MOVE_INTO_ACID ------------------------------------- */
-    SET_PROPERTY(i, EP_COULD_MOVE_INTO_ACID, (CAN_MOVE(i) ||
+    SET_PROPERTY(i, EP_COULD_MOVE_INTO_ACID, (ELEM_IS_PLAYER(i) ||
+                                             CAN_MOVE(i) ||
                                              IS_CUSTOM_ELEMENT(i)));
 
     /* ---------- MAYBE_DONT_COLLIDE_WITH ---------------------------------- */
@@ -3356,7 +3387,7 @@ void InitElementPropertiesEngine(int engine_version)
       printf("::: %d, %d, %d -> %d\n",
             CAN_EXPLODE_1X1(i),
             CAN_EXPLODE_3X3(i),
-            CAN_EXPLODE_DYNA(i),
+            CAN_EXPLODE_CROSS(i),
             CAN_EXPLODE(i));
 #endif