From: Holger Schemel Date: Tue, 1 Mar 2022 17:07:11 +0000 (+0100) Subject: added additional score information from score server to score info page X-Git-Tag: 4.3.2.0~100 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=25df48564c041446cea7967bc6079d0243b3c20a;p=rocksndiamonds.git added additional score information from score server to score info page --- diff --git a/src/files.c b/src/files.c index 8656cecc..7902221e 100644 --- a/src/files.c +++ b/src/files.c @@ -9443,6 +9443,12 @@ static void LoadServerScoreFromCache(int nr) { &score_entry.time, FALSE, 0 }, { score_entry.name, TRUE, MAX_PLAYER_NAME_LEN }, { score_entry.tape_basename, TRUE, MAX_FILENAME_LEN }, + { score_entry.tape_date, TRUE, MAX_ISO_DATE_LEN }, + { &score_entry.id, FALSE, 0 }, + { score_entry.platform, TRUE, MAX_PLATFORM_TEXT_LEN }, + { score_entry.version, TRUE, MAX_VERSION_TEXT_LEN }, + { score_entry.country_code, TRUE, MAX_COUNTRY_CODE_LEN }, + { score_entry.country_name, TRUE, MAX_COUNTRY_NAME_LEN }, { NULL, FALSE, 0 } }; diff --git a/src/main.h b/src/main.h index 213d1e9d..e689b266 100644 --- a/src/main.h +++ b/src/main.h @@ -984,6 +984,12 @@ #define MAX_ANDROID_ELEMENTS 32 #define MAX_ANDROID_ELEMENTS_OLD 16 // (extended since version 4.2.0.0) +#define MAX_ISO_DATE_LEN 10 +#define MAX_PLATFORM_TEXT_LEN 16 +#define MAX_VERSION_TEXT_LEN 16 +#define MAX_COUNTRY_CODE_LEN 2 +#define MAX_COUNTRY_NAME_LEN 64 + // values for elements with content #define MIN_ELEMENT_CONTENTS 1 #define STD_ELEMENT_CONTENTS 4 @@ -3085,6 +3091,14 @@ struct ScoreEntry char name[MAX_PLAYER_NAME_LEN + 1]; int score; int time; // time (in frames) or steps played + + // additional score information for score info screen + int id; + char tape_date[MAX_ISO_DATE_LEN + 1]; + char platform[MAX_PLATFORM_TEXT_LEN + 1]; + char version[MAX_VERSION_TEXT_LEN + 1]; + char country_code[MAX_COUNTRY_CODE_LEN + 1]; + char country_name[MAX_COUNTRY_NAME_LEN + 1]; }; struct ScoreInfo diff --git a/src/screens.c b/src/screens.c index a3f9de14..bc1adac0 100644 --- a/src/screens.c +++ b/src/screens.c @@ -5903,6 +5903,22 @@ static void DrawScoreInfo_Content(int entry_nr) DrawTextF(xstart2, ystart, font_text, entry->name); ystart += ystep_line; + DrawTextF(xstart1, ystart, font_head, "Platform"); + DrawTextF(xstart2, ystart, font_text, entry->platform); + ystart += ystep_line; + + DrawTextF(xstart1, ystart, font_head, "Version"); + DrawTextF(xstart2, ystart, font_text, entry->version); + ystart += ystep_line; + + DrawTextF(xstart1, ystart, font_head, "Country"); + DrawTextF(xstart2, ystart, font_text, entry->country_name); + ystart += ystep_line; + + DrawTextF(xstart1, ystart, font_head, "Tape Date"); + DrawTextF(xstart2, ystart, font_text, entry->tape_date); + ystart += ystep_line; + if (level.use_step_counter) { DrawTextF(xstart1, ystart, font_head, "Steps");