From: Holger Schemel Date: Mon, 20 Oct 2014 23:30:29 +0000 (+0200) Subject: fixed bug with non-element graphics while custom game tile size defined X-Git-Tag: 4.0.0.0-rc1~324 X-Git-Url: https://git.artsoft.org/?p=rocksndiamonds.git;a=commitdiff_plain;h=1cc33c6c62699350ffbf9fd2b779dddc0b138c27 fixed bug with non-element graphics while custom game tile size defined --- diff --git a/ChangeLog b/ChangeLog index 332ee32d..cab54d53 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,8 @@ 2014-10-20 * fixed using buttons on main screen with size other than 32x32 pixels * fixed some initialization bugs for scrollbars and main screen buttons + * fixed bug when drawing non-element graphics (without separate in-game + graphic/bitmap defined) while non-standard game tile size is defined 2014-10-17 * removed some remaining unused X11 stuff diff --git a/src/conftime.h b/src/conftime.h index 44d3b231..97a2de1a 100644 --- a/src/conftime.h +++ b/src/conftime.h @@ -1 +1 @@ -#define COMPILE_DATE_STRING "2014-10-21 00:38" +#define COMPILE_DATE_STRING "2014-10-21 01:20" diff --git a/src/tools.c b/src/tools.c index a0423872..861d6b7a 100644 --- a/src/tools.c +++ b/src/tools.c @@ -1052,6 +1052,10 @@ void getSizedGraphicSourceExt(int graphic, int frame, int tilesize, int src_y = g->src_y + (get_backside ? g->offset2_y : 0); int tilesize_capped = MIN(MAX(1, tilesize), TILESIZE); + // if no in-game graphics defined, always use standard graphic size + if (g->bitmaps[IMG_BITMAP_GAME] == NULL) + tilesize = TILESIZE; + if (tilesize == gfx.standard_tile_size) src_bitmap = g->bitmaps[IMG_BITMAP_STANDARD]; else if (tilesize == game.tile_size)