return music_dir;
}
-#if 1
-static char *getDefaultArtworkSet(int type)
-{
- return (type == TREE_TYPE_GRAPHICS_DIR ? "gfx_classic" :
- type == TREE_TYPE_SOUNDS_DIR ? "snd_classic" :
- type == TREE_TYPE_MUSIC_DIR ? "mus_classic" : "");
-}
-
-static char *getDefaultArtworkDir(int type)
-{
- return (type == TREE_TYPE_GRAPHICS_DIR ?
- getDefaultGraphicsDir("gfx_classic") :
- type == TREE_TYPE_SOUNDS_DIR ?
- getDefaultSoundsDir("snd_classic") :
- type == TREE_TYPE_MUSIC_DIR ?
- getDefaultMusicDir("mus_classic") : "");
-}
-
-#else
-
-static char *getDefaultArtworkSet(int type)
+static char *getClassicArtworkSet(int type)
{
return (type == TREE_TYPE_GRAPHICS_DIR ? GFX_CLASSIC_SUBDIR :
type == TREE_TYPE_SOUNDS_DIR ? SND_CLASSIC_SUBDIR :
type == TREE_TYPE_MUSIC_DIR ? MUS_CLASSIC_SUBDIR : "");
}
-static char *getDefaultArtworkDir(int type)
+static char *getClassicArtworkDir(int type)
{
return (type == TREE_TYPE_GRAPHICS_DIR ?
getDefaultGraphicsDir(GFX_CLASSIC_SUBDIR) :
type == TREE_TYPE_MUSIC_DIR ?
getDefaultMusicDir(MUS_CLASSIC_SUBDIR) : "");
}
-#endif
static char *getUserGraphicsDir()
{
checked_free(*artwork_path_ptr);
if ((level_artwork = getTreeInfoFromIdentifier(ti, *artwork_set_ptr)))
+ {
*artwork_path_ptr = getStringCopy(getSetupArtworkDir(level_artwork));
+ }
else
{
- /* No (or non-existing) artwork configured in "levelinfo.conf". This would
- normally result in using the artwork configured in the setup menu. But
- if an artwork subdirectory exists (which might contain custom artwork
- or an artwork configuration file), this level artwork must be treated
- as relative to the default "classic" artwork, not to the artwork that
- is currently configured in the setup menu. */
+ /*
+ No (or non-existing) artwork configured in "levelinfo.conf". This would
+ normally result in using the artwork configured in the setup menu. But
+ if an artwork subdirectory exists (which might contain custom artwork
+ or an artwork configuration file), this level artwork must be treated
+ as relative to the default "classic" artwork, not to the artwork that
+ is currently configured in the setup menu.
+
+ Update: For "special" versions of R'n'D (like "R'n'D jue"), do not use
+ the "default" artwork (which would be "jue0" for "R'n'D jue"), but use
+ the real "classic" artwork from the original R'n'D (like "gfx_classic").
+ */
char *dir = getPath2(getCurrentLevelDir(), ARTWORK_DIRECTORY(ti->type));
if (fileExists(dir))
{
- *artwork_path_ptr = getStringCopy(getDefaultArtworkDir(ti->type));
- *artwork_set_ptr = getStringCopy(getDefaultArtworkSet(ti->type));
+ *artwork_path_ptr = getStringCopy(getClassicArtworkDir(ti->type));
+ *artwork_set_ptr = getStringCopy(getClassicArtworkSet(ti->type));
}
else
{
}
/* 5th try: look for default artwork in new default artwork directory */
- filename = getPath2(getDefaultGraphicsDir(GFX_CLASSIC_SUBDIR), basename);
+ filename = getPath2(getDefaultGraphicsDir(GFX_DEFAULT_SUBDIR), basename);
if (fileExists(filename))
return filename;
}
/* 4th try: look for default artwork in new default artwork directory */
- filename = getPath2(getDefaultGraphicsDir(GFX_CLASSIC_SUBDIR), basename);
+ filename = getPath2(getDefaultGraphicsDir(GFX_DEFAULT_SUBDIR), basename);
if (fileExists(filename))
return filename;
if (fileExists(filename))
return filename;
-#if CREATE_SPECIAL_EDITION
+#if defined(CREATE_SPECIAL_EDITION)
free(filename);
- /* !!! INSERT WARNING HERE TO REPORT MISSING ARTWORK FILES !!! */
-#if 0
- printf("::: MISSING ARTWORK FILE '%s'\n", basename);
-#endif
+ if (options.debug)
+ Error(ERR_WARN, "cannot find artwork file '%s' (using fallback)", basename);
/* 6th try: look for fallback artwork in old default artwork directory */
/* (needed to prevent errors when trying to access unused artwork files) */
}
/* 4th try: look for default artwork in new default artwork directory */
- filename = getPath2(getDefaultSoundsDir(SND_CLASSIC_SUBDIR), basename);
+ filename = getPath2(getDefaultSoundsDir(SND_DEFAULT_SUBDIR), basename);
if (fileExists(filename))
return filename;
if (fileExists(filename))
return filename;
-#if CREATE_SPECIAL_EDITION
+#if defined(CREATE_SPECIAL_EDITION)
free(filename);
+ if (options.debug)
+ Error(ERR_WARN, "cannot find artwork file '%s' (using fallback)", basename);
+
/* 6th try: look for fallback artwork in old default artwork directory */
/* (needed to prevent errors when trying to access unused artwork files) */
filename = getPath2(options.sounds_directory, SND_FALLBACK_FILENAME);
}
/* 4th try: look for default artwork in new default artwork directory */
- filename = getPath2(getDefaultMusicDir(MUS_CLASSIC_SUBDIR), basename);
+ filename = getPath2(getDefaultMusicDir(MUS_DEFAULT_SUBDIR), basename);
if (fileExists(filename))
return filename;
if (fileExists(filename))
return filename;
-#if CREATE_SPECIAL_EDITION
+#if defined(CREATE_SPECIAL_EDITION)
free(filename);
+ if (options.debug)
+ Error(ERR_WARN, "cannot find artwork file '%s' (using fallback)", basename);
+
/* 6th try: look for fallback artwork in old default artwork directory */
/* (needed to prevent errors when trying to access unused artwork files) */
filename = getPath2(options.music_directory, MUS_FALLBACK_FILENAME);
}
/* 4th try: look for default artwork in new default artwork directory */
- directory = getStringCopy(getDefaultMusicDir(MUS_CLASSIC_SUBDIR));
+ directory = getStringCopy(getDefaultMusicDir(MUS_DEFAULT_SUBDIR));
if (fileExists(directory))
return directory;
getTreeInfoFromIdentifier(artwork.gfx_first, setup.graphics_set);
if (artwork.gfx_current == NULL)
artwork.gfx_current =
- getTreeInfoFromIdentifier(artwork.gfx_first, GFX_CLASSIC_SUBDIR);
+ getTreeInfoFromIdentifier(artwork.gfx_first, GFX_DEFAULT_SUBDIR);
if (artwork.gfx_current == NULL)
artwork.gfx_current = getFirstValidTreeInfoEntry(artwork.gfx_first);
getTreeInfoFromIdentifier(artwork.snd_first, setup.sounds_set);
if (artwork.snd_current == NULL)
artwork.snd_current =
- getTreeInfoFromIdentifier(artwork.snd_first, SND_CLASSIC_SUBDIR);
+ getTreeInfoFromIdentifier(artwork.snd_first, SND_DEFAULT_SUBDIR);
if (artwork.snd_current == NULL)
artwork.snd_current = getFirstValidTreeInfoEntry(artwork.snd_first);
getTreeInfoFromIdentifier(artwork.mus_first, setup.music_set);
if (artwork.mus_current == NULL)
artwork.mus_current =
- getTreeInfoFromIdentifier(artwork.mus_first, MUS_CLASSIC_SUBDIR);
+ getTreeInfoFromIdentifier(artwork.mus_first, MUS_DEFAULT_SUBDIR);
if (artwork.mus_current == NULL)
artwork.mus_current = getFirstValidTreeInfoEntry(artwork.mus_first);
getTreeInfoFromIdentifier(artwork.gfx_first, setup.graphics_set);
if (artwork.gfx_current == NULL)
artwork.gfx_current =
- getTreeInfoFromIdentifier(artwork.gfx_first, GFX_CLASSIC_SUBDIR);
+ getTreeInfoFromIdentifier(artwork.gfx_first, GFX_DEFAULT_SUBDIR);
if (artwork.gfx_current == NULL)
artwork.gfx_current = getFirstValidTreeInfoEntry(artwork.gfx_first);
}
getTreeInfoFromIdentifier(artwork.snd_first, setup.sounds_set);
if (artwork.snd_current == NULL)
artwork.snd_current =
- getTreeInfoFromIdentifier(artwork.snd_first, SND_CLASSIC_SUBDIR);
+ getTreeInfoFromIdentifier(artwork.snd_first, SND_DEFAULT_SUBDIR);
if (artwork.snd_current == NULL)
artwork.snd_current = getFirstValidTreeInfoEntry(artwork.snd_first);
}
getTreeInfoFromIdentifier(artwork.mus_first, setup.music_set);
if (artwork.mus_current == NULL)
artwork.mus_current =
- getTreeInfoFromIdentifier(artwork.mus_first, MUS_CLASSIC_SUBDIR);
+ getTreeInfoFromIdentifier(artwork.mus_first, MUS_DEFAULT_SUBDIR);
if (artwork.mus_current == NULL)
artwork.mus_current = getFirstValidTreeInfoEntry(artwork.mus_first);
}
/* always start with reliable default values */
leveldir_current = getFirstValidTreeInfoEntry(leveldir_first);
-#if CREATE_SPECIAL_EDITION_RND_JUE
+#if defined(CREATE_SPECIAL_EDITION_RND_JUE)
leveldir_current = getTreeInfoFromIdentifier(leveldir_first,
"jue_start");
if (leveldir_current == NULL)