return NULL; // cannot find specified artwork file anywhere
}
+static char *getCreditsBasename(int nr)
+{
+ static char basename[32];
+
+ sprintf(basename, "credits_%d.txt", nr + 1);
+
+ return basename;
+}
+
+char *getCreditsFilename(int nr, boolean global)
+{
+ char *basename = getCreditsBasename(nr);
+ char *basepath = NULL;
+ static char *credits_subdir = NULL;
+ static char *filename = NULL;
+
+ if (credits_subdir == NULL)
+ credits_subdir = getPath2(DOCS_DIRECTORY, CREDITS_DIRECTORY);
+
+ checked_free(filename);
+
+ // look for credits file in the game's base or current level set directory
+ basepath = (global ? options.base_directory : getCurrentLevelDir());
+
+ filename = getPath3(basepath, credits_subdir, basename);
+ if (fileExists(filename))
+ return filename;
+
+ return NULL; // cannot find credits file
+}
+
static char *getCorrectedArtworkBasename(char *basename)
{
return basename;
char *getHelpTextFilename(void);
char *getLevelSetInfoFilename(void);
char *getLevelSetTitleMessageFilename(int, boolean);
+char *getCreditsFilename(int, boolean);
char *getImageFilename(char *);
char *getCustomImageFilename(char *);
char *getCustomSoundFilename(char *);
#define SCORES_DIRECTORY "scores"
#define DOCS_DIRECTORY "docs"
#define ELEMENTS_DIRECTORY "elements"
+#define CREDITS_DIRECTORY "credits"
#define CACHE_DIRECTORY "cache"
#define CONF_DIRECTORY "conf"
#define NETWORK_DIRECTORY "network"