-#define COMPILE_DATE_STRING "[2003-04-16 19:38]"
+#define COMPILE_DATE_STRING "[2003-04-16 20:04]"
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);
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] =
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
};
-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;
{ ep_belt_switch, EP_BELT_SWITCH },
{ ep_sp_element, EP_SP_ELEMENT },
{ ep_has_content, EP_HAS_CONTENT },
+ { ep_tube, EP_TUBE },
{ NULL, -1 }
};
#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
#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)