BlitBitmap(drawto, window, x, y, width, height, x, y);
}
+void DrawMaskedBorder_Rect(int x, int y, int width, int height)
+{
+ Bitmap *bitmap = graphic_info[IMG_GLOBAL_BORDER].bitmap;
+
+ SetClipOrigin(bitmap, bitmap->stored_clip_gc, 0, 0);
+ BlitBitmapMasked(bitmap, backbuffer, x, y, width, height, x, y);
+}
+
void DrawMaskedBorder_FIELD()
{
if (game_status >= GAME_MODE_TITLE &&
game_status <= GAME_MODE_PLAYING &&
border.draw_masked[game_status])
- BlitBitmapMasked(graphic_info[IMG_GLOBAL_BORDER].bitmap, backbuffer,
- REAL_SX, REAL_SY, FULL_SXSIZE, FULL_SYSIZE,
- REAL_SX, REAL_SY);
+ DrawMaskedBorder_Rect(REAL_SX, REAL_SY, FULL_SXSIZE, FULL_SYSIZE);
}
void DrawMaskedBorder_DOOR_1()
if (border.draw_masked[GFX_SPECIAL_ARG_DOOR] &&
(game_status != GAME_MODE_EDITOR ||
border.draw_masked[GFX_SPECIAL_ARG_EDITOR]))
- BlitBitmapMasked(graphic_info[IMG_GLOBAL_BORDER].bitmap, backbuffer,
- DX, DY, DXSIZE, DYSIZE, DX, DY);
+ DrawMaskedBorder_Rect(DX, DY, DXSIZE, DYSIZE);
}
void DrawMaskedBorder_DOOR_2()
{
if (border.draw_masked[GFX_SPECIAL_ARG_DOOR] &&
game_status != GAME_MODE_EDITOR)
- BlitBitmapMasked(graphic_info[IMG_GLOBAL_BORDER].bitmap, backbuffer,
- VX, VY, VXSIZE, VYSIZE, VX, VY);
+ DrawMaskedBorder_Rect(VX, VY, VXSIZE, VYSIZE);
}
void DrawMaskedBorder_DOOR_3()
if (redraw_mask == REDRAW_NONE)
return;
+ if (redraw_mask & REDRAW_TILES &&
+ game_status == GAME_MODE_PLAYING &&
+ border.draw_masked[game_status])
+ redraw_mask |= REDRAW_FIELD;
+
if (global.fps_slowdown && game_status == GAME_MODE_PLAYING)
{
static boolean last_frame_skipped = FALSE;
SyncDisplay();
+#if 1
+ DrawMaskedBorder(redraw_mask);
+#endif
+
if (redraw_mask & REDRAW_ALL)
{
+#if 0
+ DrawMaskedBorder(REDRAW_ALL);
+#endif
BlitBitmap(backbuffer, window, 0, 0, WIN_XSIZE, WIN_YSIZE, 0, 0);
redraw_mask = REDRAW_NONE;
if (game_status != GAME_MODE_PLAYING ||
redraw_mask & REDRAW_FROM_BACKBUFFER)
{
+#if 0
DrawMaskedBorder(REDRAW_FIELD);
+#endif
BlitBitmap(backbuffer, window,
REAL_SX, REAL_SY, FULL_SXSIZE, FULL_SYSIZE, REAL_SX, REAL_SY);
}
{
if (redraw_mask & REDRAW_DOOR_1)
{
+#if 0
DrawMaskedBorder(REDRAW_DOOR_1);
+#endif
BlitBitmap(backbuffer, window, DX, DY, DXSIZE, DYSIZE, DX, DY);
}
if (redraw_mask & REDRAW_DOOR_2)
{
+#if 0
DrawMaskedBorder(REDRAW_DOOR_2);
+#endif
BlitBitmap(backbuffer, window, VX, VY, VXSIZE, VYSIZE, VX, VY);
}
if (redraw_mask & REDRAW_DOOR_3)
{
+#if 0
DrawMaskedBorder(REDRAW_DOOR_3);
+#endif
BlitBitmap(backbuffer, window, EX, EY, EXSIZE, EYSIZE, EX, EY);
}
DoAnimation();
+#if 1
+ if (!PendingEvent()) /* delay only if no pending events */
+ Delay(10);
+#else
/* don't eat all CPU time */
Delay(10);
+#endif
}
if (game_status != GAME_MODE_MAIN)