This change makes sure to always use the original sized bitmaps for
backgrounds, instead of the "standard size" bitmap size, which can
indeed be scaled down if the same image file was used not only for
a background bitmap, but also for a game element, but with a tile
size larger than 32x32 (which results in the image being scaled down
to also get a 32x32 tile size). When using the same image for
background graphics, the unmodified original bitmap size must be used
instead of the "normalized" or "standard" (scaled down) bitmap size.
if (graphic == IMG_UNDEFINED)
g = &g_undefined;
if (graphic == IMG_UNDEFINED)
g = &g_undefined;
+ // always use original size bitmap for backgrounds, if existing
+ Bitmap *bitmap = (g->bitmaps != NULL &&
+ g->bitmaps[IMG_BITMAP_PTR_ORIGINAL] != NULL ?
+ g->bitmaps[IMG_BITMAP_PTR_ORIGINAL] : g->bitmap);
+
// remove every mask before setting mask for window, and
// remove window area mask before setting mask for main or door area
int remove_mask = (redraw_mask == REDRAW_ALL ? 0xffff : REDRAW_ALL);
// (!!! TO BE FIXED: The whole REDRAW_* system really sucks! !!!)
SetBackgroundBitmap(NULL, remove_mask, 0, 0, 0, 0); // !!! FIX THIS !!!
// remove every mask before setting mask for window, and
// remove window area mask before setting mask for main or door area
int remove_mask = (redraw_mask == REDRAW_ALL ? 0xffff : REDRAW_ALL);
// (!!! TO BE FIXED: The whole REDRAW_* system really sucks! !!!)
SetBackgroundBitmap(NULL, remove_mask, 0, 0, 0, 0); // !!! FIX THIS !!!
- SetBackgroundBitmap(g->bitmap, redraw_mask,
+ SetBackgroundBitmap(bitmap, redraw_mask,
g->src_x, g->src_y,
g->width, g->height);
}
g->src_x, g->src_y,
g->width, g->height);
}