LoadTapeFromFilename(filename);
}
+void LoadScoreCacheTape(char *score_tape_basename, int nr)
+{
+ char *filename = getScoreCacheTapeFilename(score_tape_basename, nr);
+
+ LoadTapeFromFilename(filename);
+}
+
static boolean checkSaveTape_SCRN(struct TapeInfo *tape)
{
// chunk required for team mode tapes with non-default screen size
return score_tape_dir;
}
+static char *getScoreCacheTapeDir(char *level_subdir, int nr)
+{
+ static char *score_cache_tape_dir = NULL;
+ char tape_subdir[MAX_FILENAME_LEN];
+
+ checked_free(score_cache_tape_dir);
+
+ sprintf(tape_subdir, "%03d", nr);
+ score_cache_tape_dir = getPath2(getScoreCacheDir(level_subdir), tape_subdir);
+
+ return score_cache_tape_dir;
+}
+
static char *getUserSubdir(int nr)
{
static char user_subdir[16] = { 0 };
return filename;
}
+char *getScoreCacheTapeFilename(char *basename_no_ext, int nr)
+{
+ static char *filename = NULL;
+ char basename[MAX_FILENAME_LEN];
+
+ checked_free(filename);
+
+ sprintf(basename, "%s.%s", basename_no_ext, TAPEFILE_EXTENSION);
+
+ // used instead of "leveldir_current->subdir" (for network games)
+ filename = getPath2(getScoreCacheTapeDir(levelset.identifier, nr), basename);
+
+ return filename;
+}
+
char *getSetupFilename(void)
{
static char *filename = NULL;
createDirectory(getScoreTapeDir(level_subdir, nr), "score tape", PERMS_PRIVATE);
}
+void InitScoreCacheTapeDirectory(char *level_subdir, int nr)
+{
+ InitScoreCacheDirectory(level_subdir);
+
+ createDirectory(getScoreCacheTapeDir(level_subdir, nr), "score tape", PERMS_PRIVATE);
+}
+
static void SaveUserLevelInfo(void);
void InitUserLevelDirectory(char *level_subdir)
char *getScoreCacheFilename(int);
char *getScoreTapeBasename(char *);
char *getScoreTapeFilename(char *, int);
+char *getScoreCacheTapeFilename(char *, int);
char *getSetupFilename(void);
char *getDefaultSetupFilename(void);
char *getEditorSetupFilename(void);
void InitScoreDirectory(char *);
void InitScoreCacheDirectory(char *);
void InitScoreTapeDirectory(char *, int);
+void InitScoreCacheTapeDirectory(char *, int);
void InitUserLevelDirectory(char *);
void InitNetworkLevelDirectory(char *);
void InitLevelSetupDirectory(char *);