- XCopyArea(display, pix[PIX_DB_DOOR], drawto, gc,
- DOOR_GFX_PAGEX1, DOOR_GFX_PAGEY1 + i/2,
- DXSIZE,DYSIZE - i/2, DX, DY);
-
- XFillRectangle(display, drawto, gc, DX, DY + DYSIZE - i/2, DXSIZE,i/2);
-
- XSetClipOrigin(display, clip_gc[PIX_DOOR],
- DX - i, (DY + j) - DOOR_GFX_PAGEY1);
- XCopyArea(display, pix[PIX_DOOR], drawto,clip_gc[PIX_DOOR],
- DXSIZE, DOOR_GFX_PAGEY1, i, 77, DX + DXSIZE - i, DY + j);
- XCopyArea(display, pix[PIX_DOOR], drawto, clip_gc[PIX_DOOR],
- DXSIZE, DOOR_GFX_PAGEY1 + 140, i, 63, DX + DXSIZE - i,
- DY + 140 + j);
- XSetClipOrigin(display, clip_gc[PIX_DOOR],
- DX - DXSIZE + i, DY - (DOOR_GFX_PAGEY1 + j));
- XCopyArea(display, pix[PIX_DOOR], drawto, clip_gc[PIX_DOOR],
- DXSIZE - i, DOOR_GFX_PAGEY1 + j, i, 77 - j, DX, DY);
- XCopyArea(display, pix[PIX_DOOR], drawto, clip_gc[PIX_DOOR],
- DXSIZE-i, DOOR_GFX_PAGEY1 + 140, i, 63, DX, DY + 140 - j);
-
- XCopyArea(display, pix[PIX_DOOR], drawto, clip_gc[PIX_DOOR],
- DXSIZE - i, DOOR_GFX_PAGEY1 + 77, i, 63,
- DX, DY + 77 - j);
- XCopyArea(display, pix[PIX_DOOR], drawto, clip_gc[PIX_DOOR],
- DXSIZE - i, DOOR_GFX_PAGEY1 + 203, i, 77,
- DX, DY + 203 - j);
- XSetClipOrigin(display, clip_gc[PIX_DOOR],
- DX - i, (DY + j) - DOOR_GFX_PAGEY1);
- XCopyArea(display, pix[PIX_DOOR], drawto, clip_gc[PIX_DOOR],
- DXSIZE, DOOR_GFX_PAGEY1 + 77, i, 63,
- DX + DXSIZE - i, DY + 77 + j);
- XCopyArea(display, pix[PIX_DOOR], drawto, clip_gc[PIX_DOOR],
- DXSIZE, DOOR_GFX_PAGEY1 + 203, i, 77 - j,
- DX + DXSIZE - i, DY + 203 + j);
+ BlitBitmap(pix[PIX_DB_DOOR], drawto,
+ DOOR_GFX_PAGEX1, DOOR_GFX_PAGEY1 + i/2,
+ DXSIZE,DYSIZE - i/2, DX, DY);
+
+ ClearRectangle(drawto, DX, DY + DYSIZE - i/2, DXSIZE,i/2);
+
+ SetClipOrigin(bitmap, gc, DX - i, (DY + j) - DOOR_GFX_PAGEY1);
+ BlitBitmapMasked(bitmap, drawto,
+ DXSIZE, DOOR_GFX_PAGEY1, i, 77,
+ DX + DXSIZE - i, DY + j);
+ BlitBitmapMasked(bitmap, drawto,
+ DXSIZE, DOOR_GFX_PAGEY1 + 140, i, 63,
+ DX + DXSIZE - i, DY + 140 + j);
+ SetClipOrigin(bitmap, gc, DX - DXSIZE + i, DY - (DOOR_GFX_PAGEY1 + j));
+ BlitBitmapMasked(bitmap, drawto,
+ DXSIZE - i, DOOR_GFX_PAGEY1 + j, i, 77 - j,
+ DX, DY);
+ BlitBitmapMasked(bitmap, drawto,
+ DXSIZE-i, DOOR_GFX_PAGEY1 + 140, i, 63,
+ DX, DY + 140 - j);
+
+ BlitBitmapMasked(bitmap, drawto,
+ DXSIZE - i, DOOR_GFX_PAGEY1 + 77, i, 63,
+ DX, DY + 77 - j);
+ BlitBitmapMasked(bitmap, drawto,
+ DXSIZE - i, DOOR_GFX_PAGEY1 + 203, i, 77,
+ DX, DY + 203 - j);
+ SetClipOrigin(bitmap, gc, DX - i, (DY + j) - DOOR_GFX_PAGEY1);
+ BlitBitmapMasked(bitmap, drawto,
+ DXSIZE, DOOR_GFX_PAGEY1 + 77, i, 63,
+ DX + DXSIZE - i, DY + 77 + j);
+ BlitBitmapMasked(bitmap, drawto,
+ DXSIZE, DOOR_GFX_PAGEY1 + 203, i, 77 - j,
+ DX + DXSIZE - i, DY + 203 + j);