From 94c551bf0e0e36e4c7d8de2697b8d48166c546aa Mon Sep 17 00:00:00 2001 From: Chris Danford Date: Fri, 28 May 2004 05:58:35 +0000 Subject: [PATCH] reduce MAX_PLAYER_STATS_XML_SIZE_BYTES --- stepmania/src/Profile.cpp | 14 +++++++++++--- stepmania/src/Profile.h | 7 ------- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/stepmania/src/Profile.cpp b/stepmania/src/Profile.cpp index bc58755e3e..3ba7503acc 100644 --- a/stepmania/src/Profile.cpp +++ b/stepmania/src/Profile.cpp @@ -51,6 +51,13 @@ const int SM_390A12_COURSE_SCORES_VERSION = 8; #define MAX_RECENT_SCORES_TO_SAVE 100 +#define MAX_EDITABLE_INI_SIZE_BYTES 2*1024 // 2KB +#define MAX_PLAYER_STATS_XML_SIZE_BYTES \ + 100 /* Songs */ \ + * 3 /* Steps per Song */ \ + * 10 /* HighScores per Steps */ \ + * 1024 /* size in bytes of a HighScores XNode */ + #if defined(WIN32) #pragma warning (disable : 4706) // assignment within conditional expression #endif @@ -732,10 +739,11 @@ XNode* Profile::SaveGeneralDataCreateNode() const XNode* pGeneralDataNode = new XNode; pGeneralDataNode->name = "GeneralData"; - // TRICKY: DisplayName is only written and is not read on load. The reason - // for this is so that other apps that read this XML can get the player - // name without having to read Editable.ini. + // TRICKY: These are write-only elements that are never read again. This + // data is required by other apps (like internet ranking), but is + // redundant to the game app. pGeneralDataNode->AppendChild( "DisplayName", GetDisplayName() ); + pGeneralDataNode->AppendChild( "IsMachine", IsMachine() ); pGeneralDataNode->AppendChild( "Guid", m_sGuid ); pGeneralDataNode->AppendChild( "UsingProfileDefaultModifiers", m_bUsingProfileDefaultModifiers ); diff --git a/stepmania/src/Profile.h b/stepmania/src/Profile.h index 3b1aae9859..e3db4da64e 100644 --- a/stepmania/src/Profile.h +++ b/stepmania/src/Profile.h @@ -50,13 +50,6 @@ const CString PUBLIC_KEY_FILE = "public.key"; const CString SCREENSHOTS_SUBDIR = "Screenshots/"; const CString EDITS_SUBDIR = "Edits/"; -#define MAX_EDITABLE_INI_SIZE_BYTES 2*1024 // 2KB -#define MAX_PLAYER_STATS_XML_SIZE_BYTES \ - 100 /* Songs */ \ - * 10 /* Steps per Song */ \ - * 10 /* HighScores per Steps */ \ - * 1024 /* size in bytes of a HighScores XNode */ - class Song; class Steps;