void SaveScore_OLD(int nr)
{
int i;
- int permissions = (program.global_scores ? PERMS_PUBLIC : PERMS_PRIVATE);
char *filename = getScoreFilename(nr);
FILE *file;
fclose(file);
- SetFilePermissions(filename, permissions);
+ SetFilePermissions(filename, PERMS_PRIVATE);
}
#endif
static void SaveScoreToFilename(char *filename)
{
FILE *file;
- int permissions = (program.global_scores ? PERMS_PUBLIC : PERMS_PRIVATE);
int info_chunk_size;
int name_chunk_size;
int scor_chunk_size;
fclose(file);
- SetFilePermissions(filename, permissions);
+ SetFilePermissions(filename, PERMS_PRIVATE);
}
void SaveScore(int nr)
void NewHighScore(int level_nr)
{
struct ScoreEntry new_entry = {{ 0 }}; // (prevent warning from GCC bug 53119)
- boolean one_per_name = !program.many_scores_per_name;
+ boolean one_per_name = FALSE;
strncpy(new_entry.tape_basename, tape.score_tape_basename, MAX_FILENAME_LEN);
strncpy(new_entry.name, setup.player_name, MAX_PLAYER_NAME_LEN);
void MergeServerScore(void)
{
struct ScoreEntry last_added_entry;
- boolean one_per_name = !program.many_scores_per_name;
+ boolean one_per_name = FALSE;
int i;
if (scores.last_added >= 0)
print_timestamp_time("[init setup/config stuff (1)]");
- InitScoresInfo();
-
if (options.execute_command)
Execute_Command(options.execute_command);
char *score_subdir = SCORES_DIRECTORY;
if (score_dir == NULL)
- {
- if (program.global_scores)
- score_dir = getPath2(getCommonDataDir(), score_subdir);
- else
- score_dir = getPath2(getMainUserGameDataDir(), score_subdir);
- }
+ score_dir = getPath2(getMainUserGameDataDir(), score_subdir);
if (level_subdir != NULL)
{
void InitScoreDirectory(char *level_subdir)
{
- int permissions = (program.global_scores ? PERMS_PUBLIC : PERMS_PRIVATE);
-
- if (program.global_scores)
- createDirectory(getCommonDataDir(), "common data", permissions);
- else
- createDirectory(getMainUserGameDataDir(), "main user data", permissions);
-
- createDirectory(getScoreDir(NULL), "main score", permissions);
- createDirectory(getScoreDir(level_subdir), "level score", permissions);
+ createDirectory(getMainUserGameDataDir(), "main user data", PERMS_PRIVATE);
+ createDirectory(getScoreDir(NULL), "main score", PERMS_PRIVATE);
+ createDirectory(getScoreDir(level_subdir), "level score", PERMS_PRIVATE);
}
void InitScoreCacheDirectory(char *level_subdir)
void InitScoreTapeDirectory(char *level_subdir, int nr)
{
- int permissions = (program.global_scores ? PERMS_PUBLIC : PERMS_PRIVATE);
-
InitScoreDirectory(level_subdir);
- createDirectory(getScoreTapeDir(level_subdir, nr), "score tape", permissions);
+ createDirectory(getScoreTapeDir(level_subdir, nr), "score tape", PERMS_PRIVATE);
}
static void SaveUserLevelInfo(void);
runtime.api_server = setup.api_server;
}
-void InitScoresInfo(void)
-{
- char *global_scores_dir = getPath2(getCommonDataDir(), SCORES_DIRECTORY);
-
- program.global_scores = directoryExists(global_scores_dir);
- program.many_scores_per_name = !program.global_scores;
-
-#if 0
- if (options.debug)
- {
- if (program.global_scores)
- {
- Debug("internal:path", "Using global, multi-user scores directory '%s'.",
- global_scores_dir);
- Debug("internal:path", "Remove to enable single-user scores directory.");
- Debug("internal:path", "(This enables multipe score entries per user.)");
- }
- else
- {
- Debug("internal:path", "Using private, single-user scores directory.");
- }
- }
-#endif
-
- free(global_scores_dir);
-}
-
void SetWindowTitle(void)
{
program.window_title = program.window_title_function();
void (*exit_message_function)(char *, va_list);
void (*exit_function)(int);
- boolean global_scores;
- boolean many_scores_per_name;
-
boolean headless;
};
void InitNetworkInfo(boolean, boolean, boolean, char *, int);
void InitRuntimeInfo(void);
-void InitScoresInfo(void);
void SetWindowTitle(void);
void InitWindowTitleFunction(char *(*window_title_function)(void));