+ if (mask_mode == USE_MASKING)
+ {
+ if (tile_clipmask[tile] != None)
+ {
+ XSetClipMask(display, tile_clip_gc, tile_clipmask[tile]);
+ XSetClipOrigin(display, tile_clip_gc, dest_x,dest_y);
+ XCopyArea(display, src_pixmap, drawto_field, tile_clip_gc,
+ src_x,src_y, TILEX,TILEY, dest_x,dest_y);
+ }
+ else
+ {
+#if DEBUG
+ printf("DrawGraphicShifted(): tile '%d' needs clipping!\n", tile);
+#endif
+
+ XSetClipOrigin(display, drawing_gc, dest_x-src_x, dest_y-src_y);
+ XCopyArea(display, src_pixmap, drawto_field, drawing_gc,
+ src_x,src_y, width,height, dest_x,dest_y);
+ }
+ }
+ else
+ XCopyArea(display, src_pixmap, drawto_field, gc,
+ src_x,src_y, width,height, dest_x,dest_y);
+
+ MarkTileDirty(x,y);
+}
+
+void DrawGraphicShiftedThruMask(int x,int y, int dx,int dy, int graphic,
+ int cut_mode)
+{
+ DrawGraphicShifted(x,y, dx,dy, graphic, cut_mode, USE_MASKING);