void PlayLevelSound_EM(int, int, int, int);
void InitGraphicInfo_EM(void);
-void CheckSingleStepMode_EM(byte action[], int, boolean, boolean, boolean);
+boolean CheckSingleStepMode_EM(byte action[], int, boolean, boolean, boolean);
void SetGfxAnimation_EM(struct GraphicInfo_EM *, int, int, int, int);
void getGraphicSourceObjectExt_EM(struct GraphicInfo_EM *, int, int, int, int);
ply[i].dynamite_cnt < 5)
any_player_dropping = TRUE;
- CheckSingleStepMode_EM(action, frame, game_em.any_player_moving,
- game_em.any_player_snapping, any_player_dropping);
+ boolean single_step_mode_paused =
+ CheckSingleStepMode_EM(action, frame, game_em.any_player_moving,
+ game_em.any_player_snapping, any_player_dropping);
+
+ // draw wrapping around before going to single step pause mode
+ if (single_step_mode_paused && logic_check_wrap())
+ logic_move();
RedrawPlayfield_EM(FALSE);
}
void play_sound(int, int, int);
void play_element_sound(int, int, int, int);
+boolean logic_check_wrap(void);
+void logic_move(void);
void logic_init(void);
void logic(void);
}
}
-static void logic_players(void)
+boolean logic_check_wrap(void)
{
- int start_check_nr;
int i;
- cave = lev.cave;
- next = lev.next;
- boom = lev.boom;
-
- game_em.any_player_moving = FALSE;
- game_em.any_player_snapping = FALSE;
-
- /* must test for death and actually kill separately */
for (i = 0; i < MAX_PLAYERS; i++)
{
- boolean ply_kill = player_killed(&ply[i]);
+ if (!ply[i].alive)
+ continue;
- if (ply[i].alive && ply_kill)
- kill_player(&ply[i]);
+ /* check for wrap-around movement */
+ if (ply[i].x < lev.left ||
+ ply[i].x > lev.right - 1)
+ return TRUE;
}
+ return FALSE;
+}
+
+void logic_move(void)
+{
+ int i;
+
for (i = 0; i < MAX_PLAYERS; i++)
{
if (!ply[i].alive)
ply[i].prev_y = ply[i].y;
ply[i].anim = PLY_still;
}
+}
+
+static void logic_players(void)
+{
+ int start_check_nr;
+ int i;
+
+ cave = lev.cave;
+ next = lev.next;
+ boom = lev.boom;
+
+ game_em.any_player_moving = FALSE;
+ game_em.any_player_snapping = FALSE;
+
+ /* must test for death and actually kill separately */
+ for (i = 0; i < MAX_PLAYERS; i++)
+ {
+ boolean ply_kill = player_killed(&ply[i]);
+
+ if (ply[i].alive && ply_kill)
+ kill_player(&ply[i]);
+ }
+
+ logic_move();
start_check_nr = ((game_em.random & 128 ? 0 : 1) * 2 +
(game_em.random & 256 ? 0 : 1));
}
}
-void CheckSingleStepMode_EM(byte action[MAX_PLAYERS], int frame,
- boolean any_player_moving,
- boolean any_player_snapping,
- boolean any_player_dropping)
+boolean CheckSingleStepMode_EM(byte action[MAX_PLAYERS], int frame,
+ boolean any_player_moving,
+ boolean any_player_snapping,
+ boolean any_player_dropping)
{
if (tape.single_step && tape.recording && !tape.pausing)
if (frame == 7 && !any_player_dropping)
CheckSaveEngineSnapshot_EM(action, frame, any_player_moving,
any_player_snapping, any_player_dropping);
+
+ return tape.pausing;
}
void CheckSingleStepMode_SP(boolean murphy_is_waiting,