-#if 0
-
-static void DrawBitmapFromTile(Bitmap *bitmap, Bitmap *tile,
- int dest_x, int dest_y, int width, int height)
-{
- int bitmap_xsize = width;
- int bitmap_ysize = height;
- int tile_xsize = tile->width;
- int tile_ysize = tile->height;
- int tile_xsteps = (bitmap_xsize + tile_xsize - 1) / tile_xsize;
- int tile_ysteps = (bitmap_ysize + tile_ysize - 1) / tile_ysize;
- int x, y;
-
- for (y = 0; y < tile_ysteps; y++)
- {
- for (x = 0; x < tile_xsteps; x++)
- {
- int draw_x = dest_x + x * tile_xsize;
- int draw_y = dest_y + y * tile_ysize;
- int draw_xsize = MIN(tile_xsize, bitmap_xsize - x * tile_xsize);
- int draw_ysize = MIN(tile_ysize, bitmap_ysize - y * tile_ysize);
-
- BlitBitmap(tile, bitmap, 0, 0, draw_xsize, draw_ysize, draw_x, draw_y);
- }
- }
-}
-
-void SetBackgroundBitmap(Bitmap *background_bitmap_tile, int mask)
-{
- if (background_bitmap_tile != NULL)
- gfx.background_bitmap_mask |= mask;
- else
- gfx.background_bitmap_mask &= ~mask;
-
-#if 0
- if (gfx.background_bitmap == NULL)
- gfx.background_bitmap = CreateBitmap(video.width, video.height,
- DEFAULT_DEPTH);
-#endif
-
- if (background_bitmap_tile == NULL) /* empty background requested */
- return;
-
- if (mask == REDRAW_ALL)
- DrawBitmapFromTile(gfx.background_bitmap, background_bitmap_tile,
- 0, 0, video.width, video.height);
- else if (mask == REDRAW_FIELD)
- DrawBitmapFromTile(gfx.background_bitmap, background_bitmap_tile,
- gfx.real_sx, gfx.real_sy,
- gfx.full_sxsize, gfx.full_sysize);
- else if (mask == REDRAW_DOOR_1)
- DrawBitmapFromTile(gfx.background_bitmap, background_bitmap_tile,
- gfx.dx, gfx.dy,
- gfx.dxsize, gfx.dysize);
-}
-
-#else
-