X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Ftools.c;h=b20e04cb85ef05904d15107494bb2b9f59a54ce9;hb=601cca5b35649856ff49e1bcb3806592b736662c;hp=e6f0753e4914aecfa85760c32b675388f93a0944;hpb=7119b5d2e756b1ab23818ea39d19aece0563bab0;p=rocksndiamonds.git diff --git a/src/tools.c b/src/tools.c index e6f0753e..b20e04cb 100644 --- a/src/tools.c +++ b/src/tools.c @@ -959,16 +959,22 @@ void getMiniGraphicSource(int graphic, Bitmap **bitmap, int *x, int *y) int src_x = mini_startx + graphic_info[graphic].src_x / 2; int src_y = mini_starty + graphic_info[graphic].src_y / 2; +#if 0 + /* !!! not needed anymore, because of automatically created mini graphics */ if (src_x + MINI_TILEX > src_bitmap->width || src_y + MINI_TILEY > src_bitmap->height) { /* graphic of desired size seems not to be contained in this image; dirty workaround: get it from the middle of the normal sized image */ + printf("::: using dirty workaround for %d (%d, %d)\n", + graphic, src_bitmap->width, src_bitmap->height); + getGraphicSource(graphic, 0, &src_bitmap, &src_x, &src_y); src_x += (TILEX / 2 - MINI_TILEX / 2); src_y += (TILEY / 2 - MINI_TILEY / 2); } +#endif *bitmap = src_bitmap; *x = src_x;