- BlitBitmap(screenBitmap, target_bitmap, 0, y,
- x - 2 * TILEX, MAX_BUF_YSIZE * TILEY - y,
- sx + MAX_BUF_XSIZE * TILEX - x, sy);
- BlitBitmap(screenBitmap, target_bitmap, x, 0,
- MAX_BUF_XSIZE * TILEX - x, y - 2 * TILEY,
- sx, sy + MAX_BUF_YSIZE * TILEY - y);
- BlitBitmap(screenBitmap, target_bitmap, 0, 0,
- x - 2 * TILEX, y - 2 * TILEY,
- sx + MAX_BUF_XSIZE * TILEX - x, sy + MAX_BUF_YSIZE * TILEY - y);
- }
-}
-
-void BackToFront_EM(void)
-{
- static int screen_x_last = -1, screen_y_last = -1;
- static boolean scrolling_last = FALSE;
- int left = screen_x / TILEX;
- int top = screen_y / TILEY;
- boolean scrolling = (screen_x != screen_x_last || screen_y != screen_y_last);
- int x, y;
-
- if (redraw_tiles > REDRAWTILES_THRESHOLD || scrolling || scrolling_last)
- {
- /* 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);