-#endif
-
- BlitBitmap(bitmap_db_field_sp, target_bitmap, px, py, sxsize, sysize, sx, sy);
-}
-
-void BackToFront_SP(void)
-{
- static boolean scrolling_last = FALSE;
- int left = mScrollX / TILEX;
- int top = mScrollY / TILEY;
- boolean scrolling = (mScrollX % TILEX != 0 || mScrollY % TILEY != 0);
- int x, y;
-
- SyncDisplay();
-
- if (1 ||
- redraw_tiles > REDRAWTILES_THRESHOLD || scrolling || scrolling_last)
- {
- BlitScreenToBitmap_SP(window);
- }
- else
- {
- for (x = 0; x < SCR_FIELDX; x++)
- {
- for (y = 0; y < SCR_FIELDY; y++)
- {
- int xx = (left + x) % MAX_BUF_XSIZE;
- int yy = (top + y) % MAX_BUF_YSIZE;
-
- if (redraw[xx][yy])
- BlitBitmap(bitmap_db_field_sp, window,
- xx * TILEX, yy * TILEY, TILEX, TILEY,
- SX + x * TILEX, SY + y * TILEY);
- }
- }
- }