- 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);
- }
- }
- }
-
- FlushDisplay();
-
- for (x = 0; x < MAX_BUF_XSIZE; x++)
- for (y = 0; y < MAX_BUF_YSIZE; y++)
+ for (x = 0; x < 2 + MAX_PLAYFIELD_WIDTH + 2; x++)
+ for (y = 0; y < 2 + MAX_PLAYFIELD_HEIGHT + 2; y++)