From: Holger Schemel Date: Sat, 24 Apr 2021 23:35:47 +0000 (+0200) Subject: extended function to set score info structure to default values X-Git-Tag: 4.3.0.0~179 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=2eb60cf4c36db6802cb11c8eadd9b2c5a0e5fd1c;p=rocksndiamonds.git extended function to set score info structure to default values --- diff --git a/src/files.c b/src/files.c index 92bc92d5..ab6a5958 100644 --- a/src/files.c +++ b/src/files.c @@ -8424,21 +8424,25 @@ void DumpTape(struct TapeInfo *tape) // score file functions // ============================================================================ -static void setScoreInfoToDefaults(void) +static void setScoreInfoToDefaultsExt(struct ScoreInfo *scores) { int i; for (i = 0; i < MAX_SCORE_ENTRIES; i++) { - strcpy(scores.entry[i].tape_basename, UNDEFINED_FILENAME); - strcpy(scores.entry[i].name, EMPTY_PLAYER_NAME); - scores.entry[i].score = 0; - scores.entry[i].time = 0; + strcpy(scores->entry[i].tape_basename, UNDEFINED_FILENAME); + strcpy(scores->entry[i].name, EMPTY_PLAYER_NAME); + scores->entry[i].score = 0; + scores->entry[i].time = 0; } - scores.num_entries = 0; - scores.last_added = -1; + scores->num_entries = 0; + scores->last_added = -1; +} +static void setScoreInfoToDefaults(void) +{ + setScoreInfoToDefaultsExt(&scores); } static void LoadScore_OLD(int nr)