Pre-Release Version 2.2.0rc7 [?? ??? ????]
------------------------------------------
+ - fixed bug when picking element in the editor
+ - added more custom elements properties
Pre-Release Version 2.2.0rc6 [22 APR 2003]
------------------------------------------
-#define COMPILE_DATE_STRING "[2003-04-28 13:02]"
+#define COMPILE_DATE_STRING "[2003-04-29 02:32]"
case GADGET_ID_FLOOD_FILL:
case GADGET_ID_GRAB_BRUSH:
case GADGET_ID_PICK_ELEMENT:
- last_drawing_function = drawing_function;
+ if (drawing_function != GADGET_ID_PICK_ELEMENT)
+ last_drawing_function = drawing_function;
drawing_function = id;
draw_with_brush = FALSE;
break;
if (!player->active || (!dx && !dy))
return FALSE;
-#if 0
- {
- static boolean done = FALSE;
- static old_count = -1;
-
- if (FrameCounter < old_count)
- done = FALSE;
-
- if (FrameCounter < 100)
- {
- printf("::: wanna move [%d] [%d]\n",
- FrameCounter, player->push_delay_value);
- done = TRUE;
- old_count = FrameCounter;
- }
- }
-#endif
-
#if 0
if (!FrameReached(&player->move_delay, player->move_delay_value) &&
!tape.playing)
dy == +1 ? MV_DOWN : MV_NO_MOVING);
int element;
-#if 0
- {
- static boolean done = FALSE;
-
- if (FrameCounter < 10)
- done = FALSE;
-
- if (!done &&
- real_dx == -1 &&
- FrameCounter > 10)
- {
- printf("::: wanna move left [%d] [%d]\n",
- FrameCounter, player->push_delay_value);
- done = TRUE;
- }
- }
-#endif
-
if (player->MovPos == 0)
{
player->is_digging = FALSE;
{
player->Switching = FALSE;
player->push_delay = 0;
+
return MF_NO_ACTION;
}
element = Feld[x][y];
+#if 1
+ if (mode == DF_SNAP && !IS_SNAPPABLE(element) &&
+ game.engine_version >= VERSION_IDENT(2,2,0))
+ return MF_NO_ACTION;
+#endif
+
switch (element)
{
case EL_EMPTY:
int jx = player->jx, jy = player->jy;
int x = jx + dx, y = jy + dy;
+ if (player->MovPos && game.engine_version >= VERSION_IDENT(2,2,0))
+ return FALSE;
+
if (!player->active || !IN_LEV_FIELD(x, y))
return FALSE;
dy < 0 ? MV_UP :
dy > 0 ? MV_DOWN : MV_NO_MOVING);
- if (!DigField(player, x, y, 0, 0, DF_SNAP))
+ if (DigField(player, x, y, 0, 0, DF_SNAP) == MF_NO_ACTION)
return FALSE;
player->snapped = TRUE;
-1
};
+ static int ep_switchable[] =
+ {
+ EL_ROBOT_WHEEL,
+ EL_SP_TERMINAL,
+ EL_CONVEYOR_BELT_1_SWITCH_LEFT,
+ EL_CONVEYOR_BELT_1_SWITCH_MIDDLE,
+ EL_CONVEYOR_BELT_1_SWITCH_RIGHT,
+ EL_CONVEYOR_BELT_2_SWITCH_LEFT,
+ EL_CONVEYOR_BELT_2_SWITCH_MIDDLE,
+ EL_CONVEYOR_BELT_2_SWITCH_RIGHT,
+ EL_CONVEYOR_BELT_3_SWITCH_LEFT,
+ EL_CONVEYOR_BELT_3_SWITCH_MIDDLE,
+ EL_CONVEYOR_BELT_3_SWITCH_RIGHT,
+ EL_CONVEYOR_BELT_4_SWITCH_LEFT,
+ EL_CONVEYOR_BELT_4_SWITCH_MIDDLE,
+ EL_CONVEYOR_BELT_4_SWITCH_RIGHT,
+ EL_SWITCHGATE_SWITCH_UP,
+ EL_SWITCHGATE_SWITCH_DOWN,
+ EL_LIGHT_SWITCH,
+ EL_LIGHT_SWITCH_ACTIVE,
+ EL_TIMEGATE_SWITCH,
+ EL_BALLOON_SWITCH_LEFT,
+ EL_BALLOON_SWITCH_RIGHT,
+ EL_BALLOON_SWITCH_UP,
+ EL_BALLOON_SWITCH_DOWN,
+ EL_BALLOON_SWITCH_ANY,
+ EL_LAMP,
+ EL_TIME_ORB_FULL,
+ -1
+ };
+
static int ep_dont_touch[] =
{
EL_BUG,
{ ep_can_be_crumbled, EP_CAN_BE_CRUMBLED },
{ ep_can_move, EP_CAN_MOVE },
{ 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 },
SET_PROPERTY(i, EP_ACCESSIBLE, (IS_WALKABLE(i) ||
IS_PASSABLE(i)));
+ /* ---------- SNAPPABLE ------------------------------------------------ */
+ SET_PROPERTY(i, EP_SNAPPABLE, (IS_DIGGABLE(i) ||
+ IS_COLLECTIBLE(i) ||
+ IS_SWITCHABLE(i) ||
+ i == EL_BD_ROCK));
+
/* ---------- WALL ----------------------------------------------------- */
SET_PROPERTY(i, EP_WALL, TRUE); /* default: element is wall */
#define EP_CAN_BE_CRUMBLED 27
#define EP_CAN_MOVE 28
#define EP_CAN_PASS_MAGIC_WALL 29
-#define EP_DONT_TOUCH 30
-#define EP_ENEMY 31
-#define EP_DONT_GO_TO 32
-#define EP_CAN_EXPLODE 33
-#define EP_BD_ELEMENT 34
-#define EP_SP_ELEMENT 35
-#define EP_SB_ELEMENT 36
-#define EP_GEM 37
-#define EP_FOOD_DARK_YAMYAM 38
-#define EP_FOOD_PENGUIN 39
-#define EP_FOOD_PIG 40
-#define EP_HISTORIC_WALL 41
-#define EP_HISTORIC_SOLID 42
-#define EP_BELT 43
-#define EP_BELT_ACTIVE 44
-#define EP_BELT_SWITCH 45
-#define EP_TUBE 46
-#define EP_KEYGATE 47
-#define EP_AMOEBOID 48
-#define EP_AMOEBALIVE 49
-#define EP_HAS_CONTENT 50
-#define EP_ACTIVE_BOMB 51
-#define EP_INACTIVE 52
+#define EP_SWITCHABLE 30
+#define EP_DONT_TOUCH 31
+#define EP_ENEMY 32
+#define EP_DONT_GO_TO 33
+#define EP_CAN_EXPLODE 34
+#define EP_BD_ELEMENT 35
+#define EP_SP_ELEMENT 36
+#define EP_SB_ELEMENT 37
+#define EP_GEM 38
+#define EP_FOOD_DARK_YAMYAM 39
+#define EP_FOOD_PENGUIN 40
+#define EP_FOOD_PIG 41
+#define EP_HISTORIC_WALL 42
+#define EP_HISTORIC_SOLID 43
+#define EP_BELT 44
+#define EP_BELT_ACTIVE 45
+#define EP_BELT_SWITCH 46
+#define EP_TUBE 47
+#define EP_KEYGATE 48
+#define EP_AMOEBOID 49
+#define EP_AMOEBALIVE 50
+#define EP_HAS_CONTENT 51
+#define EP_ACTIVE_BOMB 52
+#define EP_INACTIVE 53
/* values for derived properties (determined from properties above) */
-#define EP_ACCESSIBLE_OVER 53
-#define EP_ACCESSIBLE_INSIDE 54
-#define EP_ACCESSIBLE_UNDER 55
-#define EP_WALKABLE 56
-#define EP_PASSABLE 57
-#define EP_ACCESSIBLE 58
-#define EP_WALL 59
-#define EP_SOLID_FOR_PUSHING 60
-#define EP_DRAGONFIRE_PROOF 61
-#define EP_EXPLOSION_PROOF 62
-
-#define NUM_ELEMENT_PROPERTIES 63
+#define EP_ACCESSIBLE_OVER 54
+#define EP_ACCESSIBLE_INSIDE 55
+#define EP_ACCESSIBLE_UNDER 56
+#define EP_WALKABLE 57
+#define EP_PASSABLE 58
+#define EP_ACCESSIBLE 59
+#define EP_SNAPPABLE 60
+#define EP_WALL 61
+#define EP_SOLID_FOR_PUSHING 62
+#define EP_DRAGONFIRE_PROOF 63
+#define EP_EXPLOSION_PROOF 64
+
+#define NUM_ELEMENT_PROPERTIES 65
#define NUM_EP_BITFIELDS ((NUM_ELEMENT_PROPERTIES + 31) / 32)
#define EP_BITFIELD_BASE 0
#define CAN_BE_CRUMBLED(e) HAS_PROPERTY(e, EP_CAN_BE_CRUMBLED)
#define CAN_MOVE(e) HAS_PROPERTY(e, EP_CAN_MOVE)
#define CAN_PASS_MAGIC_WALL(e) HAS_PROPERTY(e, EP_CAN_PASS_MAGIC_WALL)
+#define IS_SWITCHABLE(e) HAS_PROPERTY(e, EP_SWITCHABLE)
#define DONT_TOUCH(e) HAS_PROPERTY(e, EP_DONT_TOUCH)
#define IS_ENEMY(e) HAS_PROPERTY(e, EP_ENEMY)
#define DONT_GO_TO(e) HAS_PROPERTY(e, EP_DONT_GO_TO)
#define IS_ACCESSIBLE_OVER(e) HAS_PROPERTY(e, EP_ACCESSIBLE_OVER)
#define IS_ACCESSIBLE_INSIDE(e) HAS_PROPERTY(e, EP_ACCESSIBLE_INSIDE)
#define IS_ACCESSIBLE_UNDER(e) HAS_PROPERTY(e, EP_ACCESSIBLE_UNDER)
+#define IS_SNAPPABLE(e) HAS_PROPERTY(e, EP_SNAPPABLE)
#define IS_WALKABLE(e) HAS_PROPERTY(e, EP_WALKABLE)
#define IS_PASSABLE(e) HAS_PROPERTY(e, EP_PASSABLE)
#define IS_ACCESSIBLE(e) HAS_PROPERTY(e, EP_ACCESSIBLE)