#define USE_NEW_AMOEBA_CODE FALSE
/* EXPERIMENTAL STUFF */
-#define USE_NEW_MOVEMENT FALSE
-#define USE_NEW_MOVE_DELAY TRUE *1
-#define USE_NEW_PUSH_DELAY TRUE *1
+#define USE_NEW_MOVE_STYLE TRUE *0
+#define USE_NEW_MOVE_DELAY TRUE *1
+#define USE_NEW_PUSH_DELAY TRUE *1
+#define USE_NEW_BLOCK_STYLE TRUE *1
/* for DigField() */
#define DF_NO_PUSH 0
static struct ChangingElementInfo change_delay_list[] =
{
+#if USE_NEW_BLOCK_STYLE
+#if 0
+ {
+ EL_PLAYER_IS_LEAVING,
+ EL_EMPTY,
+ -1, /* delay for blocking field left by player set at runtime */
+ NULL,
+ NULL,
+ NULL
+ },
+#endif
+#endif
{
EL_NUT_BREAKING,
EL_EMERALD,
{
struct PlayerInfo *player = &stored_player[Feld[x][y] - EL_PLAYER_1];
int jx = player->jx, jy = player->jy;
+ int sp_block_delay = 7;
+ int em_block_delay = 7;
+ int sp_no_block_delay = 1;
+ int em_no_block_delay = 1;
player->present = TRUE;
level.sp_block_last_field :
level.block_last_field);
+ player->block_delay_value =
+ (element == EL_SP_MURPHY ?
+ (player->block_last_field ? sp_block_delay : sp_no_block_delay) :
+ (player->block_last_field ? em_block_delay : em_no_block_delay));
+
if (!options.network || player->connected)
{
player->active = TRUE;
{
if (IS_SP_ELEMENT(i))
{
+#if USE_NEW_MOVE_STYLE
+ element_info[i].push_delay_fixed = 7; /* just enough to escape ... */
+ element_info[i].push_delay_random = 0; /* ... from falling zonk */
+#else
element_info[i].push_delay_fixed = 6; /* just enough to escape ... */
element_info[i].push_delay_random = 0; /* ... from falling zonk */
+#endif
}
}
}
player->use_murphy_graphic = FALSE;
- player->block_last_field = FALSE;
+ player->block_last_field = FALSE; /* initialized in InitPlayerField() */
+ player->block_delay = 0;
+ player->block_delay_value = -1; /* initialized in InitPlayerField() */
+
player->can_fall_into_acid = CAN_MOVE_INTO_ACID(player->element_nr);
player->actual_frame_counter = 0;
else if (element == EL_PENGUIN)
TestIfFriendTouchesBadThing(newx, newy);
-#if USE_NEW_MOVEMENT
+#if USE_NEW_MOVE_STYLE
#if 0
if (CAN_FALL(element) && direction == MV_DOWN &&
(newy == lev_fieldy - 1 || !IS_FREE(x, newy + 1)) &&
Changed[x][y] = CE_BITMASK_DEFAULT;
ChangeEvent[x][y] = CE_BITMASK_DEFAULT;
+ /* this must be handled before main playfield loop */
+ if (Feld[x][y] == EL_PLAYER_IS_LEAVING)
+ {
+ MovDelay[x][y]--;
+ if (MovDelay[x][y] <= 0)
+ RemoveField(x, y);
+ }
+
#if DEBUG
if (ChangePage[x][y] != -1 && ChangeDelay[x][y] != 1)
{
*/
player->is_moving = FALSE;
-#if USE_NEW_MOVEMENT
+#if USE_NEW_MOVE_STYLE
/* player is ALLOWED to move, but CANNOT move (something blocks his way) */
/* ensure that the player is also allowed to move in the next frame */
/* (currently, the player is forced to wait eight frames before he can try
again!!!) */
- player->move_delay = -1; /* allow direct movement in the next frame */
+ player->move_delay = 0; /* allow direct movement in the next frame */
#endif
}
player->actual_frame_counter = FrameCounter;
player->GfxPos = move_stepsize * (player->MovPos / move_stepsize);
-#if USE_NEW_MOVEMENT
+#if USE_NEW_BLOCK_STYLE
+ if (player->block_delay_value > 0 &&
+ Feld[last_jx][last_jy] == EL_EMPTY)
+ {
+ Feld[last_jx][last_jy] = EL_PLAYER_IS_LEAVING;
+#if 1
+ MovDelay[last_jx][last_jy] = player->block_delay_value + 1;
+#else
+ ChangeDelay[last_jx][last_jy] = player->block_last_field_delay;
+#endif
+ }
+#else
+#if USE_NEW_MOVE_STYLE
if (player->block_last_field &&
Feld[last_jx][last_jy] == EL_EMPTY)
Feld[last_jx][last_jy] = EL_PLAYER_IS_LEAVING;
if (Feld[last_jx][last_jy] == EL_EMPTY)
Feld[last_jx][last_jy] = EL_PLAYER_IS_LEAVING;
#endif
+#endif
#if 0
DrawPlayer(player);
player->MovPos += (player->MovPos > 0 ? -1 : 1) * move_stepsize;
player->GfxPos = move_stepsize * (player->MovPos / move_stepsize);
+#if USE_NEW_BLOCK_STYLE
+#else
if (!player->block_last_field &&
Feld[last_jx][last_jy] == EL_PLAYER_IS_LEAVING)
+#if 1
+ RemoveField(last_jx, last_jy);
+#else
Feld[last_jx][last_jy] = EL_EMPTY;
+#endif
+#endif
/* before DrawPlayer() to draw correct player graphic for this case */
if (player->MovPos == 0)
}
#endif
+#if USE_NEW_BLOCK_STYLE
+#else
if (player->block_last_field &&
Feld[last_jx][last_jy] == EL_PLAYER_IS_LEAVING)
+#if 1
+ RemoveField(last_jx, last_jy);
+#else
Feld[last_jx][last_jy] = EL_EMPTY;
+#endif
+#endif
player->last_jx = jx;
player->last_jy = jy;