From: Holger Schemel Date: Fri, 12 Oct 2007 19:16:32 +0000 (+0200) Subject: rnd-20071012-1-src X-Git-Tag: 3.2.6.0^2~32 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=93926b59ca45db5bb31f63e08d7ee729745e0306;p=rocksndiamonds.git rnd-20071012-1-src --- diff --git a/src/conftime.h b/src/conftime.h index 44ea4b95..62b5b85d 100644 --- a/src/conftime.h +++ b/src/conftime.h @@ -1 +1 @@ -#define COMPILE_DATE_STRING "2007-10-09 00:21" +#define COMPILE_DATE_STRING "2007-10-12 21:15" diff --git a/src/init.c b/src/init.c index 9c89ceb5..5d862c6f 100644 --- a/src/init.c +++ b/src/init.c @@ -5611,8 +5611,30 @@ static void InitImages() { print_timestamp_init("InitImages"); +#if 0 + printf("::: leveldir_current->identifier == '%s'\n", + leveldir_current == NULL ? "[NULL]" : leveldir_current->identifier); + printf("::: leveldir_current->graphics_path == '%s'\n", + leveldir_current == NULL ? "[NULL]" : leveldir_current->graphics_path); + printf("::: leveldir_current->graphics_set == '%s'\n", + leveldir_current == NULL ? "[NULL]" : leveldir_current->graphics_set); + printf("::: getLevelArtworkSet(ARTWORK_TYPE_GRAPHICS) == '%s'\n", + leveldir_current == NULL ? "[NULL]" : LEVELDIR_ARTWORK_SET(leveldir_current, ARTWORK_TYPE_GRAPHICS)); +#endif + setLevelArtworkDir(artwork.gfx_first); +#if 0 + printf("::: leveldir_current->identifier == '%s'\n", + leveldir_current == NULL ? "[NULL]" : leveldir_current->identifier); + printf("::: leveldir_current->graphics_path == '%s'\n", + leveldir_current == NULL ? "[NULL]" : leveldir_current->graphics_path); + printf("::: leveldir_current->graphics_set == '%s'\n", + leveldir_current == NULL ? "[NULL]" : leveldir_current->graphics_set); + printf("::: getLevelArtworkSet(ARTWORK_TYPE_GRAPHICS) == '%s'\n", + leveldir_current == NULL ? "[NULL]" : LEVELDIR_ARTWORK_SET(leveldir_current, ARTWORK_TYPE_GRAPHICS)); +#endif + #if 0 printf("::: InitImages for '%s' ['%s', '%s'] ['%s', '%s']\n", leveldir_current->identifier, @@ -5749,17 +5771,42 @@ static void InitOverrideArtwork() char *filename_base, *filename_local; boolean redefined_ce_found = FALSE; + setLevelArtworkDir(artwork.gfx_first); + +#if 0 + printf("::: leveldir_current->identifier == '%s'\n", + leveldir_current == NULL ? "[NULL]" : leveldir_current->identifier); + printf("::: leveldir_current->graphics_path == '%s'\n", + leveldir_current == NULL ? "[NULL]" : leveldir_current->graphics_path); + printf("::: leveldir_current->graphics_set == '%s'\n", + leveldir_current == NULL ? "[NULL]" : leveldir_current->graphics_set); + printf("::: getLevelArtworkSet(ARTWORK_TYPE_GRAPHICS) == '%s'\n", + leveldir_current == NULL ? "[NULL]" : LEVELDIR_ARTWORK_SET(leveldir_current, ARTWORK_TYPE_GRAPHICS)); +#endif + /* first look for special artwork configured in level series config */ filename_base = getCustomArtworkLevelConfigFilename(ARTWORK_TYPE_GRAPHICS); +#if 0 + printf("::: filename_base == '%s'\n", filename_base); +#endif + if (fileExists(filename_base)) redefined_ce_found |= CheckArtworkConfigForCustomElements(filename_base); filename_local = getCustomArtworkConfigFilename(ARTWORK_TYPE_GRAPHICS); +#if 0 + printf("::: filename_local == '%s'\n", filename_local); +#endif + if (filename_local != NULL && !strEqual(filename_base, filename_local)) redefined_ce_found |= CheckArtworkConfigForCustomElements(filename_local); +#if 0 + printf("::: redefined_ce_found == %d\n", redefined_ce_found); +#endif + if (!redefined_ce_found) { gfx.override_level_graphics = TRUE; diff --git a/src/libgame/setup.c b/src/libgame/setup.c index 9d095724..65e504e5 100644 --- a/src/libgame/setup.c +++ b/src/libgame/setup.c @@ -334,7 +334,9 @@ char *setLevelArtworkDir(TreeInfo *ti) checked_free(*artwork_path_ptr); if ((level_artwork = getTreeInfoFromIdentifier(ti, *artwork_set_ptr))) + { *artwork_path_ptr = getStringCopy(getSetupArtworkDir(level_artwork)); + } else { /*