From: Holger Schemel Date: Fri, 28 Aug 2015 17:32:08 +0000 (+0200) Subject: fixed graphic problems caused by tile size bugs in custom graphics X-Git-Tag: 4.0.0.0-rc1~153 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=7a4209660d8bb271aa0aae2163bce560ae79d4dd;p=rocksndiamonds.git fixed graphic problems caused by tile size bugs in custom graphics (also see commit '8125bee6411975e55f2f571748782b11e9b6aae9') --- diff --git a/src/libgame/image.c b/src/libgame/image.c index 7f789cff..7fc7e2b8 100644 --- a/src/libgame/image.c +++ b/src/libgame/image.c @@ -270,7 +270,6 @@ static boolean CheckIfImageContainsSmallImages(ImageInfo *img_info, // custom artwork set redefines classic (or default) graphics with wrong tile // size (by mistake or by intention), it will be corrected to its original // tile size here by forcing complete re-creation of all small images again - // (this does not work if different tile sizes are used in same image file) if (!strEqual(img_info->leveldir, leveldir_current->identifier) && img_info->conf_tile_size != tile_size) @@ -304,6 +303,16 @@ static boolean CheckIfImageContainsSmallImages(ImageInfo *img_info, return FALSE; } + // special case 1 (continued): + // + // if different tile sizes are used in same image file (usually by mistake, + // like forgetting option ".tile_size" for one or more graphic definitions), + // make sure to use only the first tile size that is processed for this image + // (and ignore all subsequent, potentially different tile size definitions + // for this image within the current level set by disabling the above check) + + setString(&img_info->leveldir, leveldir_current->identifier); + // special case 2: // // graphic config setting "game.tile_size" has changed since last level set;