+2004-04-10
+ * added "collectible" and "removable" to extended replacement types
+ (where "removable" replaces "diggable" and "collectible" elements)
+ * added "collectible & throwable" (to throw element to the next field)
+ * fixed bug with CEs digging elements that are just about to explode
+ * changed mouse cursor now always being visible when game is paused
+
2004-04-09
* added possibility to push/press accessible elements from a side that
is not accessible
-#define COMPILE_DATE_STRING "[2004-04-10 02:27]"
+#define COMPILE_DATE_STRING "[2004-04-11 03:36]"
{ EP_DIGGABLE, "diggable" },
{ EP_COLLECTIBLE_ONLY, "collectible" },
{ EP_DROPPABLE, "collectible & droppable" },
+ { EP_THROWABLE, "collectible & throwable" },
{ EP_PUSHABLE, "pushable" },
{ -1, NULL }
{ MV_TURNING_LEFT_RIGHT, "turning left, right" },
{ MV_TURNING_RIGHT_LEFT, "turning right, left" },
{ MV_TURNING_RANDOM, "turning random" },
- { MV_WHEN_PUSHED, "when pushed" },
- { MV_WHEN_DROPPED, "when dropped" },
{ MV_MAZE_RUNNER, "maze runner style" },
{ MV_MAZE_HUNTER, "maze hunter style" },
+ { MV_WHEN_PUSHED, "when pushed" },
+ { MV_WHEN_DROPPED, "when dropped/thrown" },
{ -1, NULL }
};
static struct ValueTextInfo options_change_direct_action[] =
{
- { CE_TOUCHED_BY_PLAYER, "touched by player ..." },
- { CE_PRESSED_BY_PLAYER, "pressed by player ..." },
- { CE_PUSHED_BY_PLAYER, "pushed by player ..." },
- { CE_ENTERED_BY_PLAYER, "entered by player ..." },
- { CE_LEFT_BY_PLAYER, "left by player ..." },
- { CE_DROPPED_BY_PLAYER, "dropped by player" },
- { CE_SWITCHED, "switched ..." },
+ { CE_TOUCHED_BY_PLAYER, "touched by player" },
+ { CE_PRESSED_BY_PLAYER, "pressed by player" },
+ { CE_PUSHED_BY_PLAYER, "pushed by player" },
+ { CE_ENTERED_BY_PLAYER, "entered by player" },
+ { CE_LEFT_BY_PLAYER, "left by player" },
+ { CE_DROPPED_BY_PLAYER, "dropped/thrown by player" },
+ { CE_SWITCHED, "switched" },
#if 1
- { CE_HITTING_SOMETHING, "hitting something ..." },
- { CE_HIT_BY_SOMETHING, "hit by something ..." },
+ { CE_HITTING_SOMETHING, "hitting something" },
+ { CE_HIT_BY_SOMETHING, "hit by something" },
#else
- { CE_HITTING_SOMETHING, "collision ..." },
-#endif
-
-#if 0
- { CE_BLOCKED, "blocked ..." },
+ { CE_HITTING_SOMETHING, "collision" },
#endif
-
{ CE_IMPACT, "impact (on something)" },
{ CE_SMASHED, "smashed (from above)" },
static struct ValueTextInfo options_change_other_action[] =
{
- { CE_OTHER_GETS_TOUCHED, "player touches ..." },
- { CE_OTHER_GETS_PRESSED, "player presses ..." },
- { CE_OTHER_GETS_PUSHED, "player pushes ..." },
- { CE_OTHER_GETS_ENTERED, "player enters ..." },
- { CE_OTHER_GETS_LEFT, "player leaves ..." },
+ { CE_OTHER_GETS_TOUCHED, "player touches" },
+ { CE_OTHER_GETS_PRESSED, "player presses" },
+ { CE_OTHER_GETS_PUSHED, "player pushes" },
+ { CE_OTHER_GETS_ENTERED, "player enters" },
+ { CE_OTHER_GETS_LEFT, "player leaves" },
{ CE_OTHER_GETS_DIGGED, "player digs" },
{ CE_OTHER_GETS_COLLECTED, "player collects" },
- { CE_OTHER_GETS_DROPPED, "player drops" },
- { CE_OTHER_IS_TOUCHING, "touching ..." },
+ { CE_OTHER_GETS_DROPPED, "player drops/throws" },
+ { CE_OTHER_IS_TOUCHING, "touching" },
#if 1
- { CE_OTHER_IS_HITTING, "hitting ..." },
- { CE_OTHER_GETS_HIT, "hit by ..." },
+ { CE_OTHER_IS_HITTING, "hitting" },
+ { CE_OTHER_GETS_HIT, "hit by" },
#endif
- { CE_OTHER_IS_SWITCHING, "switch of ..." },
+ { CE_OTHER_IS_SWITCHING, "switch of" },
{ CE_OTHER_IS_CHANGING, "change by page of" },
{ CE_OTHER_IS_EXPLODING, "explosion of" },
{
{ CP_WHEN_EMPTY, "empty" },
{ CP_WHEN_DIGGABLE, "diggable" },
+ { CP_WHEN_COLLECTIBLE, "collectible" },
+ { CP_WHEN_REMOVABLE, "removable" },
{ CP_WHEN_DESTRUCTIBLE, "destructible" },
{ -1, NULL }
-1,
options_change_trigger_side,
&custom_element_change.trigger_side,
- "... at", "side", "element side that causes change"
+ "at", "side", "element side that causes change"
},
{
ED_SETTINGS_XPOS(2), ED_SETTINGS_YPOS(7),
(IS_DIGGABLE(element) ? EP_DIGGABLE :
IS_COLLECTIBLE_ONLY(element) ? EP_COLLECTIBLE_ONLY :
IS_DROPPABLE(element) ? EP_DROPPABLE :
+ IS_THROWABLE(element) ? EP_THROWABLE :
IS_PUSHABLE(element) ? EP_PUSHABLE :
custom_element.walk_to_action);
custom_element_properties[EP_WALK_TO_OBJECT] =
(IS_DIGGABLE(element) ||
IS_COLLECTIBLE_ONLY(element) ||
IS_DROPPABLE(element) ||
+ IS_THROWABLE(element) ||
IS_PUSHABLE(element));
/* set smash targets selectbox help value */
HAS_CHANGE_EVENT(element, CE_SWITCHED) ? CE_SWITCHED :
HAS_CHANGE_EVENT(element, CE_HITTING_SOMETHING) ? CE_HITTING_SOMETHING :
HAS_CHANGE_EVENT(element, CE_HIT_BY_SOMETHING) ? CE_HIT_BY_SOMETHING :
- HAS_CHANGE_EVENT(element, CE_BLOCKED) ? CE_BLOCKED :
HAS_CHANGE_EVENT(element, CE_IMPACT) ? CE_IMPACT :
HAS_CHANGE_EVENT(element, CE_SMASHED) ? CE_SMASHED :
custom_element_change.direct_action);
custom_element_properties[EP_DIGGABLE] = FALSE;
custom_element_properties[EP_COLLECTIBLE_ONLY] = FALSE;
custom_element_properties[EP_DROPPABLE] = FALSE;
+ custom_element_properties[EP_THROWABLE] = FALSE;
custom_element_properties[EP_PUSHABLE] = FALSE;
custom_element_properties[custom_element.walk_to_action] =
custom_element_properties[EP_WALK_TO_OBJECT];
custom_element_change_events[CE_SWITCHED] = FALSE;
custom_element_change_events[CE_HITTING_SOMETHING] = FALSE;
custom_element_change_events[CE_HIT_BY_SOMETHING] = FALSE;
- custom_element_change_events[CE_BLOCKED] = FALSE;
custom_element_change_events[CE_IMPACT] = FALSE;
custom_element_change_events[CE_SMASHED] = FALSE;
custom_element_change_events[custom_element_change.direct_action] =
{ EP_PASSABLE_OVER, "- player can pass over it" },
{ EP_PASSABLE_INSIDE, "- player can pass through it" },
{ EP_PASSABLE_UNDER, "- player can pass under it" },
+ { EP_PROTECTED, "- player is protected by it" },
{ EP_DIGGABLE, "- can be digged away" },
{ EP_COLLECTIBLE, "- can be collected" },
{ EP_DROPPABLE, "- can be dropped after collecting" },
+ { EP_THROWABLE, "- can be thrown after collecting" },
{ EP_PUSHABLE, "- can be pushed" },
- { EP_CAN_MOVE, "- can move" },
{ EP_CAN_FALL, "- can fall" },
+ { EP_CAN_MOVE, "- can move" },
{ EP_CAN_SMASH_PLAYER, "- can smash player" },
#if 0
#endif
{ EP_CAN_SMASH_EVERYTHING, "- can smash everything smashable" },
- { EP_SLIPPERY, "- slippery for falling objects" },
+ { EP_SLIPPERY, "- slippery for falling elements" },
{ EP_EM_SLIPPERY_WALL, "- slippery for some gems (EM style)" },
{ EP_DONT_RUN_INTO, "- deadly when running into" },
/* pre-defined properties */
{ EP_CAN_PASS_MAGIC_WALL, "- can pass magic walls" },
+ { EP_SWITCHABLE, "- can be switched" },
{ EP_HAS_CONTENT, "- can contain other elements" },
{ -1, NULL }
else
{
/* when playing, display a special mouse pointer inside the playfield */
- if (game_status == GAME_MODE_PLAYING)
+ if (game_status == GAME_MODE_PLAYING && !tape.pausing)
{
if (!playfield_cursor_set && cursor_inside_playfield &&
DelayReached(&playfield_cursor_delay, 1000))
/* values for other actions */
#define MOVE_STEPSIZE_NORMAL (TILEX / MOVE_DELAY_NORMAL_SPEED)
+#define GET_DX_FROM_DIR(d) ((d) == MV_LEFT ? -1 : (d) == MV_RIGHT ? 1 : 0)
+#define GET_DY_FROM_DIR(d) ((d) == MV_UP ? -1 : (d) == MV_DOWN ? 1 : 0)
+
#define INIT_GFX_RANDOM() (SimpleRND(1000000))
#define GET_NEW_PUSH_DELAY(e) ( (element_info[e].push_delay_fixed) + \
AmoebaNr[x][y] = 0;
WasJustMoving[x][y] = 0;
WasJustFalling[x][y] = 0;
+ CheckCollision[x][y] = 0;
Stop[x][y] = FALSE;
Pushed[x][y] = FALSE;
ChangePage[x][y] = -1;
Pushed[x][y] = FALSE;
+#if 0
+ ExplodeField[x][y] = EX_TYPE_NONE;
+#endif
+
GfxElement[x][y] = EL_UNDEFINED;
GfxAction[x][y] = ACTION_DEFAULT;
GfxDir[x][y] = MV_NO_MOVING;
return;
}
+ /* !!! not sufficient for all cases -- see EL_PEARL below !!! */
/* only reset graphic animation if graphic really changes after impact */
if (impact &&
el_act_dir2img(element, GfxAction[x][y], MV_DOWN) != el2img(element))
}
else if (impact && element == EL_PEARL)
{
+ ResetGfxAnimation(x, y);
+
Feld[x][y] = EL_PEARL_BREAKING;
PlayLevelSound(x, y, SND_PEARL_BREAKING);
return;
}
else if (smashed == EL_PEARL)
{
+ ResetGfxAnimation(x, y);
+
Feld[x][y + 1] = EL_PEARL_BREAKING;
PlayLevelSound(x, y, SND_PEARL_BREAKING);
return;
#endif
}
#if 1
- else if ((game.engine_version < VERSION_IDENT(2,2,0,7) &&
- CAN_SMASH(element) && WasJustMoving[x][y] && !Pushed[x][y + 1] &&
- (Feld[x][y + 1] == EL_BLOCKED)) ||
+ else if ((game.engine_version >= VERSION_IDENT(3,1,0,0) &&
+ CheckCollision[x][y] && !IS_FREE(x, y + 1)) ||
+
(game.engine_version >= VERSION_IDENT(3,0,7,0) &&
CAN_SMASH(element) && WasJustFalling[x][y] &&
- (Feld[x][y + 1] == EL_BLOCKED || IS_PLAYER(x, y + 1))))
+ (Feld[x][y + 1] == EL_BLOCKED || IS_PLAYER(x, y + 1))) ||
+
+ (game.engine_version < VERSION_IDENT(2,2,0,7) &&
+ CAN_SMASH(element) && WasJustMoving[x][y] && !Pushed[x][y + 1] &&
+ (Feld[x][y + 1] == EL_BLOCKED)))
#else
#if 1
return;
#endif
+#if 1
+
#if 1
+ if (game.engine_version >= VERSION_IDENT(3,1,0,0) &&
+ CheckCollision[x][y] && IN_LEV_FIELD_AND_NOT_FREE(newx, newy))
+#else
if (game.engine_version >= VERSION_IDENT(3,1,0,0) &&
WasJustMoving[x][y] && IN_LEV_FIELD(newx, newy) &&
(Feld[newx][newy] == EL_BLOCKED || IS_PLAYER(newx, newy)))
+#endif
{
#if 0
printf("::: element %d '%s' WasJustMoving %d [%d, %d, %d, %d]\n",
DrawLevelField(newx, newy);
}
+ /* if digged element was about to explode, prevent the explosion */
+ ExplodeField[newx][newy] = EX_TYPE_NONE;
+
PlayLevelSoundAction(x, y, action);
}
if (!pushed_by_player)
{
+ int nextx = newx + dx, nexty = newy + dy;
+ boolean check_collision_again = IN_LEV_FIELD_AND_IS_FREE(nextx, nexty);
+
WasJustMoving[newx][newy] = 3;
if (CAN_FALL(element) && direction == MV_DOWN)
WasJustFalling[newx][newy] = 3;
+
+ if ((!CAN_FALL(element) || direction == MV_DOWN) && check_collision_again)
+ CheckCollision[newx][newy] = 2;
}
if (DONT_TOUCH(element)) /* object may be nasty to player or others */
{
boolean is_empty;
boolean is_diggable;
+ boolean is_collectible;
+ boolean is_removable;
boolean is_destructible;
int ex = x + xx - 1;
int ey = y + yy - 1;
IS_WALKABLE(content_element)));
#endif
is_diggable = (is_empty || IS_DIGGABLE(e));
+ is_collectible = (is_empty || IS_COLLECTIBLE(e));
+ is_removable = (is_diggable || is_collectible);
is_destructible = (is_empty || !IS_INDESTRUCTIBLE(e));
can_replace[xx][yy] =
- ((change->replace_when == CP_WHEN_EMPTY && is_empty) ||
- (change->replace_when == CP_WHEN_DIGGABLE && is_diggable) ||
+ ((change->replace_when == CP_WHEN_EMPTY && is_empty) ||
+ (change->replace_when == CP_WHEN_DIGGABLE && is_diggable) ||
+ (change->replace_when == CP_WHEN_COLLECTIBLE && is_collectible) ||
+ (change->replace_when == CP_WHEN_REMOVABLE && is_removable) ||
(change->replace_when == CP_WHEN_DESTRUCTIBLE && is_destructible));
if (!can_replace[xx][yy])
WasJustMoving[x][y]--;
if (WasJustFalling[x][y] > 0)
WasJustFalling[x][y]--;
+ if (CheckCollision[x][y] > 0)
+ CheckCollision[x][y]--;
GfxFrame[x][y]++;
ShowEnvelope(element - EL_ENVELOPE_1);
#endif
}
- else if (IS_DROPPABLE(element)) /* can be collected and dropped */
+ else if (IS_DROPPABLE(element) ||
+ IS_THROWABLE(element)) /* can be collected and dropped */
{
int i;
CH_SIDE_TOP, /* dropping up */
CH_SIDE_BOTTOM, /* dropping down */
};
- int jx = player->jx, jy = player->jy;
+ int old_element, new_element;
+ int dropx = player->jx, dropy = player->jy;
int drop_direction = player->MovDir;
int drop_side = trigger_sides[MV_DIR_BIT(drop_direction)];
- int old_element = Feld[jx][jy];
int drop_element = (player->inventory_size > 0 ?
player->inventory_element[player->inventory_size - 1] :
player->inventory_infinite_element != EL_UNDEFINED ?
player->dynabombs_left > 0 ?
EL_DYNABOMB_PLAYER_1_ACTIVE + player->index_nr :
EL_UNDEFINED);
- int new_element = drop_element; /* default: element does not change */
+
+ if (IS_THROWABLE(drop_element))
+ {
+ dropx += GET_DX_FROM_DIR(drop_direction);
+ dropy += GET_DY_FROM_DIR(drop_direction);
+
+ if (!IN_LEV_FIELD(dropx, dropy))
+ return FALSE;
+ }
+
+ old_element = Feld[dropx][dropy]; /* old element at dropping position */
+ new_element = drop_element; /* default: no change when dropping */
/* check if player is active, not moving and ready to drop */
if (!player->active || player->MovPos || player->drop_delay > 0)
#endif
if (old_element != EL_EMPTY)
- Back[jx][jy] = old_element; /* store old element on this field */
+ Back[dropx][dropy] = old_element; /* store old element on this field */
- ResetGfxAnimation(jx, jy);
- ResetRandomAnimationValue(jx, jy);
+ ResetGfxAnimation(dropx, dropy);
+ ResetRandomAnimationValue(dropx, dropy);
if (player->inventory_size > 0 ||
player->inventory_infinite_element != EL_UNDEFINED)
new_element = EL_SP_DISK_RED_ACTIVE;
}
- Feld[jx][jy] = new_element;
+ Feld[dropx][dropy] = new_element;
- if (IN_SCR_FIELD(SCREENX(jx), SCREENY(jy)))
- DrawGraphicThruMask(SCREENX(jx), SCREENY(jy), el2img(Feld[jx][jy]), 0);
+ if (IN_SCR_FIELD(SCREENX(dropx), SCREENY(dropy)))
+ DrawGraphicThruMask(SCREENX(dropx), SCREENY(dropy),
+ el2img(Feld[dropx][dropy]), 0);
- PlayLevelSoundAction(jx, jy, ACTION_DROPPING);
+ PlayLevelSoundAction(dropx, dropy, ACTION_DROPPING);
#if 1
/* needed if previous element just changed to "empty" in the last frame */
- Changed[jx][jy] = 0; /* allow another change */
+ Changed[dropx][dropy] = 0; /* allow another change */
#endif
#if 1
/* !!! TEST ONLY !!! */
- CheckElementChangeByPlayer(jx, jy, new_element, CE_DROPPED_BY_PLAYER,
+ CheckElementChangeByPlayer(dropx, dropy, new_element, CE_DROPPED_BY_PLAYER,
player->index_bit, drop_side);
- CheckTriggeredElementChangeByPlayer(jx, jy, new_element,
+ CheckTriggeredElementChangeByPlayer(dropx, dropy, new_element,
CE_OTHER_GETS_DROPPED,
player->index_bit, drop_side);
#else
- CheckTriggeredElementChangeByPlayer(jx, jy, new_element,
+ CheckTriggeredElementChangeByPlayer(dropx, dropy, new_element,
CE_OTHER_GETS_DROPPED,
player->index_bit, drop_side);
- CheckElementChangeByPlayer(jx, jy, new_element, CE_DROPPED_BY_PLAYER,
+ CheckElementChangeByPlayer(dropx, dropy, new_element, CE_DROPPED_BY_PLAYER,
player->index_bit, drop_side);
#endif
- TestIfElementTouchesCustomElement(jx, jy);
+ TestIfElementTouchesCustomElement(dropx, dropy);
}
else /* player is dropping a dyna bomb */
{
new_element = EL_DYNABOMB_PLAYER_1_ACTIVE + player->index_nr;
#endif
- Feld[jx][jy] = new_element;
+ Feld[dropx][dropy] = new_element;
- if (IN_SCR_FIELD(SCREENX(jx), SCREENY(jy)))
- DrawGraphicThruMask(SCREENX(jx), SCREENY(jy), el2img(Feld[jx][jy]), 0);
+ if (IN_SCR_FIELD(SCREENX(dropx), SCREENY(dropy)))
+ DrawGraphicThruMask(SCREENX(dropx), SCREENY(dropy),
+ el2img(Feld[dropx][dropy]), 0);
- PlayLevelSoundAction(jx, jy, ACTION_DROPPING);
+ PlayLevelSoundAction(dropx, dropy, ACTION_DROPPING);
}
#if 1
- if (Feld[jx][jy] == new_element) /* uninitialized unless CE change */
+ if (Feld[dropx][dropy] == new_element) /* uninitialized unless CE change */
{
#if 1
- InitField_WithBug1(jx, jy, FALSE);
+ InitField_WithBug1(dropx, dropy, FALSE);
#else
- InitField(jx, jy, FALSE);
- if (CAN_MOVE(Feld[jx][jy]))
- InitMovDir(jx, jy);
+ InitField(dropx, dropy, FALSE);
+ if (CAN_MOVE(Feld[dropx][dropy]))
+ InitMovDir(dropx, dropy);
#endif
}
- new_element = Feld[jx][jy]; /* element might have changed */
+ new_element = Feld[dropx][dropy]; /* element might have changed */
if (IS_CUSTOM_ELEMENT(new_element) && CAN_MOVE(new_element) &&
element_info[new_element].move_pattern == MV_WHEN_DROPPED)
#if 0
int move_stepsize = element_info[new_element].move_stepsize;
#endif
- int direction, dx, dy, nextx, nexty;
+ int move_direction, nextx, nexty;
if (element_info[new_element].move_direction_initial == MV_START_AUTOMATIC)
- MovDir[jx][jy] = player->MovDir;
+ MovDir[dropx][dropy] = drop_direction;
- direction = MovDir[jx][jy];
- dx = (direction == MV_LEFT ? -1 : direction == MV_RIGHT ? +1 : 0);
- dy = (direction == MV_UP ? -1 : direction == MV_DOWN ? +1 : 0);
- nextx = jx + dx;
- nexty = jy + dy;
+ move_direction = MovDir[dropx][dropy];
+ nextx = dropx + GET_DX_FROM_DIR(move_direction);
+ nexty = dropy + GET_DY_FROM_DIR(move_direction);
+
+#if 1
+ Changed[dropx][dropy] = 0; /* allow another change */
+ CheckCollision[dropx][dropy] = 2;
+#else
if (IN_LEV_FIELD(nextx, nexty) && IS_FREE(nextx, nexty))
{
#if 0
- WasJustMoving[jx][jy] = 3;
+ WasJustMoving[dropx][dropy] = 3;
#else
- InitMovingField(jx, jy, direction);
- ContinueMoving(jx, jy);
+#if 1
+ InitMovingField(dropx, dropy, move_direction);
+ ContinueMoving(dropx, dropy);
+#endif
#endif
}
+#if 1
else
{
- Changed[jx][jy] = 0; /* allow another change */
+ Changed[dropx][dropy] = 0; /* allow another change */
#if 1
- TestIfElementHitsCustomElement(jx, jy, direction);
+ TestIfElementHitsCustomElement(dropx, dropy, move_direction);
#else
- CheckElementChangeBySide(jx, jy, new_element, touched_element,
- CE_HITTING_SOMETHING, direction);
+ CheckElementChangeBySide(dropx, dropy, new_element, touched_element,
+ CE_HITTING_SOMETHING, move_direction);
#endif
}
+#endif
+
+#endif
#if 0
player->drop_delay = 2 * TILEX / move_stepsize + 1;
-1
};
+ static int ep_throwable[] =
+ {
+ -1
+ };
+
static int ep_player[] =
{
EL_PLAYER_1,
{ ep_pushable, EP_PUSHABLE },
{ ep_can_explode_cross, EP_CAN_EXPLODE_CROSS },
{ ep_protected, EP_PROTECTED },
+ { ep_throwable, EP_THROWABLE },
{ ep_player, EP_PLAYER },
{ ep_can_pass_magic_wall, EP_CAN_PASS_MAGIC_WALL },
/* ---------- COLLECTIBLE ---------------------------------------------- */
SET_PROPERTY(i, EP_COLLECTIBLE, (IS_COLLECTIBLE_ONLY(i) ||
- IS_DROPPABLE(i)));
+ IS_DROPPABLE(i) ||
+ IS_THROWABLE(i)));
/* ---------- SNAPPABLE ------------------------------------------------ */
SET_PROPERTY(i, EP_SNAPPABLE, (IS_DIGGABLE(i) ||
unsigned long ChangeEvent[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
short WasJustMoving[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
short WasJustFalling[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
+short CheckCollision[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
short AmoebaNr[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
short AmoebaCnt[MAX_NUM_AMOEBA];
short AmoebaCnt2[MAX_NUM_AMOEBA];
#define EP_CAN_EXPLODE_CROSS 25
#define EP_PROTECTED 26
#define EP_CAN_MOVE_INTO_ACID 27
+#define EP_THROWABLE 28
/* values for pre-defined properties */
#define EP_PLAYER 32
#define CE_HIT_BY_SOMETHING 27
#define CE_OTHER_IS_HITTING 28
#define CE_OTHER_GETS_HIT 29
-#define CE_BLOCKED 30
-#define NUM_CHANGE_EVENTS 31
+#define NUM_CHANGE_EVENTS 30
#define CE_BITMASK_DEFAULT 0
#define CP_WHEN_EMPTY 0
#define CP_WHEN_DIGGABLE 1
#define CP_WHEN_DESTRUCTIBLE 2
+#define CP_WHEN_COLLECTIBLE 3
+#define CP_WHEN_REMOVABLE 4
/* values for custom move patterns (bits 0 - 3: basic move directions) */
#define MV_BIT_TOWARDS_PLAYER 4
#define CAN_EXPLODE_CROSS(e) HAS_PROPERTY(e, EP_CAN_EXPLODE_CROSS)
#define IS_PROTECTED(e) HAS_PROPERTY(e, EP_PROTECTED)
#define CAN_MOVE_INTO_ACID(e) HAS_PROPERTY(e, EP_CAN_MOVE_INTO_ACID)
+#define IS_THROWABLE(e) HAS_PROPERTY(e, EP_THROWABLE)
/* macros for special configurable properties */
#define IS_EM_SLIPPERY_WALL(e) HAS_PROPERTY(e, EP_EM_SLIPPERY_WALL)
extern unsigned long ChangeEvent[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
extern short WasJustMoving[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
extern short WasJustFalling[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
+extern short CheckCollision[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
extern short AmoebaNr[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
extern short AmoebaCnt[MAX_NUM_AMOEBA];
extern short AmoebaCnt2[MAX_NUM_AMOEBA];
void TapeQuickLoad()
{
+ if (tape.recording && !Request("Stop recording and load tape ?",
+ REQ_ASK | REQ_STAY_CLOSED))
+ {
+ BlitBitmap(bitmap_db_door, bitmap_db_door,
+ DOOR_GFX_PAGEX2, DOOR_GFX_PAGEY1, DXSIZE, DYSIZE,
+ DOOR_GFX_PAGEX1, DOOR_GFX_PAGEY1);
+ OpenDoor(DOOR_OPEN_1);
+
+ return;
+ }
+
if (game_status == GAME_MODE_PLAYING || game_status == GAME_MODE_MAIN)
{
TapeStop();
if (!(req_state & REQ_STAY_CLOSED) && (old_door_state & DOOR_OPEN_1))
{
BlitBitmap(bitmap_db_door, bitmap_db_door,
- DOOR_GFX_PAGEX2,DOOR_GFX_PAGEY1, DXSIZE,DYSIZE,
- DOOR_GFX_PAGEX1,DOOR_GFX_PAGEY1);
+ DOOR_GFX_PAGEX2, DOOR_GFX_PAGEY1, DXSIZE, DYSIZE,
+ DOOR_GFX_PAGEX1, DOOR_GFX_PAGEY1);
OpenDoor(DOOR_OPEN_1);
}
}