+ if ((level_artwork = getTreeInfoFromIdentifier(ti, artwork_set)))
+ *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. */
+
+ char *dir = getPath2(getCurrentLevelDir(), ARTWORK_DIRECTORY(ti->type));
+
+ if (fileExists(dir))
+ *artwork_path_ptr = getStringCopy(getDefaultArtworkDir(ti->type));
+ else
+ *artwork_path_ptr = getStringCopy(UNDEFINED_FILENAME);
+
+ free(dir);
+ }