added additional score information from score server to score info page
authorHolger Schemel <info@artsoft.org>
Tue, 1 Mar 2022 17:07:11 +0000 (18:07 +0100)
committerHolger Schemel <info@artsoft.org>
Tue, 1 Mar 2022 17:07:11 +0000 (18:07 +0100)
src/files.c
src/main.h
src/screens.c

index 8656cecc76e46dc61ba0ccabf50364bc65c6a13d..7902221e0c9d4e3513cb9587826c989fff307092 100644 (file)
@@ -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                       }
   };
index 213d1e9d7cc18b9117dc470ec1c82cedd477ae59..e689b266ef6b6263d0e689c330df1e6e375f2b0b 100644 (file)
 #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
index a3f9de148b4dbd348b5ef384ce811dcf759d7b70..bc1adac0ac4b76d1a308e8dd9f5f9299b66616f5 100644 (file)
@@ -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");