rnd-20030416-3-src
authorHolger Schemel <info@artsoft.org>
Wed, 16 Apr 2003 18:10:17 +0000 (20:10 +0200)
committerHolger Schemel <info@artsoft.org>
Sat, 30 Aug 2014 08:41:13 +0000 (10:41 +0200)
src/conftime.h
src/game.c
src/init.c
src/main.h

index 26c387b9203e7dd277a505ade0ed392dbf29b1c4..b4b2276959937e9e3e2b30ef1bef29ba4f7c2a4f 100644 (file)
@@ -1 +1 @@
-#define COMPILE_DATE_STRING "[2003-04-16 19:38]"
+#define COMPILE_DATE_STRING "[2003-04-16 20:04]"
index ce66ee8711fecdaeaee3a670fc7c5924ce5a23e3..fb479b0e964d2086a206fd79e217ab23fc2ae3fb 100644 (file)
@@ -5316,7 +5316,7 @@ void ScrollFigure(struct PlayerInfo *player, int mode)
 
   if (player->MovPos == 0)
   {
-    if (IS_WALKABLE_THROUGH(Feld[last_jx][last_jy]))
+    if (IS_PASSABLE(Feld[last_jx][last_jy]))
     {
       /* continue with normal speed after quickly moving through gate */
       HALVE_PLAYER_SPEED(player);
@@ -5706,7 +5706,7 @@ int DigField(struct PlayerInfo *player,
   if (IS_MOVING(x, y) || IS_PLAYER(x, y))
     return MF_NO_ACTION;
 
-  if (IS_WALKABLE_THROUGH(Feld[jx][jy]))
+  if (IS_TUBE(Feld[jx][jy]))
   {
     int i = 0;
     int tube_leave_directions[][2] =
index 9224bb64fd5958983e155f303c083852431e8ef2..02657be305ec1cd48a54b56436a19fc68dba9974 100644 (file)
@@ -2069,24 +2069,24 @@ void InitElementProperties()
     EL_SP_PORT_RIGHT,
     EL_SP_PORT_UP,
     EL_SP_PORT_DOWN,
+    EL_SP_PORT_HORIZONTAL,
+    EL_SP_PORT_VERTICAL,
+    EL_SP_PORT_ANY,
     EL_SP_GRAVITY_PORT_LEFT,
     EL_SP_GRAVITY_PORT_RIGHT,
     EL_SP_GRAVITY_PORT_UP,
     EL_SP_GRAVITY_PORT_DOWN,
-    EL_SP_PORT_HORIZONTAL,
-    EL_SP_PORT_VERTICAL,
-    EL_SP_PORT_ANY,
-    EL_TUBE_ANY,
-    EL_TUBE_VERTICAL,
-    EL_TUBE_HORIZONTAL,
-    EL_TUBE_VERTICAL_LEFT,
-    EL_TUBE_VERTICAL_RIGHT,
-    EL_TUBE_HORIZONTAL_UP,
-    EL_TUBE_HORIZONTAL_DOWN,
     EL_TUBE_LEFT_UP,
     EL_TUBE_LEFT_DOWN,
     EL_TUBE_RIGHT_UP,
     EL_TUBE_RIGHT_DOWN,
+    EL_TUBE_HORIZONTAL,
+    EL_TUBE_HORIZONTAL_UP,
+    EL_TUBE_HORIZONTAL_DOWN,
+    EL_TUBE_VERTICAL,
+    EL_TUBE_VERTICAL_LEFT,
+    EL_TUBE_VERTICAL_RIGHT,
+    EL_TUBE_ANY,
     -1
   };
 
@@ -2212,6 +2212,22 @@ void InitElementProperties()
     -1
   };
 
+  static int ep_tube[] =
+  {
+    EL_TUBE_LEFT_UP,
+    EL_TUBE_LEFT_DOWN,
+    EL_TUBE_RIGHT_UP,
+    EL_TUBE_RIGHT_DOWN,
+    EL_TUBE_HORIZONTAL,
+    EL_TUBE_HORIZONTAL_UP,
+    EL_TUBE_HORIZONTAL_DOWN,
+    EL_TUBE_VERTICAL,
+    EL_TUBE_VERTICAL_LEFT,
+    EL_TUBE_VERTICAL_RIGHT,
+    EL_TUBE_ANY,
+    -1
+  };
+
   static struct
   {
     int *elements;
@@ -2259,6 +2275,7 @@ void InitElementProperties()
     { ep_belt_switch,          EP_BELT_SWITCH          },
     { ep_sp_element,           EP_SP_ELEMENT           },
     { ep_has_content,          EP_HAS_CONTENT          },
+    { ep_tube,                 EP_TUBE                 },
     { NULL,                    -1                      }
   };
 
index 656481d5581a5c0a982a2c26e43ba62d8a3bcac4..025e1b1c5f9266982a72c957449fe6a11543cc65 100644 (file)
@@ -60,7 +60,7 @@
 #define IN_SCR_FIELD(x,y) ((x)>=BX1 && (x)<=BX2 && (y)>=BY1 &&(y)<=BY2)
 #define IN_LEV_FIELD(x,y) ((x)>=0 && (x)<lev_fieldx && (y)>=0 &&(y)<lev_fieldy)
 
-/* values for base properties */
+/* values for base properties (storable) */
 #define EP_AMOEBALIVE          0
 #define EP_AMOEBOID            1
 #define EP_CAN_BE_CRUMBLED     2
@@ -94,7 +94,7 @@
 #define EP_PASSABLE_THROUGH    30
 #define EP_PASSABLE_UNDER      31
 
-/* values for runtime properties */
+/* values for runtime properties (non-storable) */
 #define EP_WALKABLE            32
 #define EP_PASSABLE            33
 #define EP_PLAYER_OVER         34
 #define EP_BELT_SWITCH         43
 #define EP_SP_ELEMENT          44
 #define EP_HAS_CONTENT         45
+#define EP_TUBE                        46
 
-#define NUM_ELEMENT_PROPERTIES 46
+#define NUM_ELEMENT_PROPERTIES 47
 
 #define NUM_EP_BITFIELDS       ((NUM_ELEMENT_PROPERTIES + 31) / 32)
 #define EP_BITFIELD_BASE       0
 #define IS_BELT_SWITCH(e)      HAS_PROPERTY(e, EP_BELT_SWITCH)
 #define IS_SP_ELEMENT(e)       HAS_PROPERTY(e, EP_SP_ELEMENT)
 #define HAS_CONTENT(e)         HAS_PROPERTY(e, EP_HAS_CONTENT)
+#define IS_TUBE(e)             HAS_PROPERTY(e, EP_TUBE)
 
 #define IS_CUSTOM_ELEMENT(e)   ((e) >= EL_CUSTOM_START &&      \
                                 (e) <= EL_CUSTOM_END)