void readjoy(byte, struct PLAYER *);
void input_eventloop(void);
-void blitscreen(void);
void game_initscreen(void);
-void game_animscreen(void);
void play_sound(int, int, int);
void sound_play(void);
static int screentiles[MAX_PLAYFIELD_HEIGHT + 2][MAX_PLAYFIELD_WIDTH + 2];
static int crumbled_state[MAX_PLAYFIELD_HEIGHT + 2][MAX_PLAYFIELD_WIDTH + 2];
-/* copy the entire screen to the window at the scroll position */
-
void BlitScreenToBitmap_EM(Bitmap *target_bitmap)
{
+ /* blit all (up to four) parts of the scroll buffer to the target bitmap */
+
int x = screen_x % (MAX_BUF_XSIZE * TILEX);
int y = screen_y % (MAX_BUF_YSIZE * TILEY);
int sx, sy, sxsize, sysize;
void BackToFront_EM(void)
{
- /* blit all (up to four) parts of the scroll buffer to the backbuffer */
- BlitScreenToBitmap_EM(backbuffer);
-
- /* blit the completely updated backbuffer to the window (in one blit) */
BlitBitmap(backbuffer, window, SX, SY, SXSIZE, SYSIZE, SX, SY);
}
-void blitscreen(void)
-{
- BackToFront_EM();
-}
-
static struct GraphicInfo_EM *getObjectGraphic(int x, int y)
{
int tile = Draw[y][x];
for (i = 0; i < MAX_PLAYERS; i++)
blitplayer(&ply[i]);
- blitscreen();
+ BlitScreenToBitmap_EM(backbuffer);
+ BackToFront_EM();
Delay(wait_delay_value);
for (i = 0; i < MAX_PLAYERS; i++)
blitplayer(&ply[i]);
- blitscreen();
+ BlitScreenToBitmap_EM(backbuffer);
+ BackToFront_EM();
Delay(wait_delay_value);
}
for (i = 0; i < MAX_PLAYERS; i++)
blitplayer(&ply[i]);
}
-
-void game_animscreen(void)
-{
- RedrawPlayfield_EM(FALSE);
-}
prepare_em_level();
game_initscreen();
- game_animscreen();
+
+ RedrawPlayfield_EM(FALSE);
}
void UpdateGameDoorValues_EM()
CheckSingleStepMode_EM(action, frame, game_em.any_player_moving,
game_em.any_player_snapping, any_player_dropping);
- game_animscreen();
+ RedrawPlayfield_EM(FALSE);
- blitscreen();
+ BlitScreenToBitmap_EM(backbuffer);
+ BackToFront_EM();
}
/* read input device for players */