+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);
+}
+
+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);
+}
+
+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);
+}
+
+void DrawMaskedBorder_DOOR_3()
+{
+ /* currently not available */
+}
+
+void DrawMaskedBorder_ALL()
+{
+ DrawMaskedBorder_FIELD();
+ DrawMaskedBorder_DOOR_1();
+ DrawMaskedBorder_DOOR_2();
+ DrawMaskedBorder_DOOR_3();
+}
+
+void DrawMaskedBorder(int redraw_mask)
+{
+ if (redraw_mask & REDRAW_ALL)
+ DrawMaskedBorder_ALL();
+ else
+ {
+ if (redraw_mask & REDRAW_FIELD)
+ DrawMaskedBorder_FIELD();
+ if (redraw_mask & REDRAW_DOOR_1)
+ DrawMaskedBorder_DOOR_1();
+ if (redraw_mask & REDRAW_DOOR_2)
+ DrawMaskedBorder_DOOR_2();
+ if (redraw_mask & REDRAW_DOOR_3)
+ DrawMaskedBorder_DOOR_3();
+ }
+}
+