stats.xml:
theme more elements show HighScore details clean up some tables
This commit is contained in:
@@ -4536,18 +4536,10 @@ ShowStyleDouble=1
|
|||||||
ShowStyleCouple=1
|
ShowStyleCouple=1
|
||||||
ShowStyleSolo=1
|
ShowStyleSolo=1
|
||||||
ShowStyleReal=1
|
ShowStyleReal=1
|
||||||
|
InternetRankingHomeUrl=http://www.stepmania.com/stepmania
|
||||||
|
InternetRankingUploadUrl=http://www.stepmania.com/stepmania/upload_stats.php
|
||||||
ShowHighScoreGrade=1
|
InternetRankingViewGuidUrl=http://www.stepmania.com/stepmania/view_guid.php
|
||||||
ShowHighScoreScore=1
|
StatsTitle=StepMania Stats
|
||||||
ShowHighScorePercent=1
|
StatsHeader=StepMania Stats
|
||||||
ShowRadarCategoryStream=1
|
StatsFooterText=generated by StepMania
|
||||||
ShowRadarCategoryVoltage=1
|
StatsFooterLink=http://www.stepmania.com
|
||||||
ShowRadarCategoryAir=1
|
|
||||||
ShowRadarCategoryFreeze=1
|
|
||||||
ShowRadarCategoryChaos=1
|
|
||||||
ShowRadarCategoryTaps=1
|
|
||||||
ShowRadarCategoryJumps=1
|
|
||||||
ShowRadarCategoryHolds=1
|
|
||||||
ShowRadarCategoryMines=1
|
|
||||||
ShowRadarCategoryHands=1
|
|
||||||
|
|||||||
@@ -23,6 +23,7 @@
|
|||||||
#define INTERNET_RANKING_HOME_URL THEME->GetMetric ("CatalogXml","InternetRankingHomeUrl")
|
#define INTERNET_RANKING_HOME_URL THEME->GetMetric ("CatalogXml","InternetRankingHomeUrl")
|
||||||
#define INTERNET_RANKING_UPLOAD_URL THEME->GetMetric ("CatalogXml","InternetRankingUploadUrl")
|
#define INTERNET_RANKING_UPLOAD_URL THEME->GetMetric ("CatalogXml","InternetRankingUploadUrl")
|
||||||
#define INTERNET_RANKING_VIEW_GUID_URL THEME->GetMetric ("CatalogXml","InternetRankingViewGuidUrl")
|
#define INTERNET_RANKING_VIEW_GUID_URL THEME->GetMetric ("CatalogXml","InternetRankingViewGuidUrl")
|
||||||
|
#define STATS_TITLE THEME->GetMetric ("CatalogXml","StatsTitle")
|
||||||
#define STATS_HEADER THEME->GetMetric ("CatalogXml","StatsHeader")
|
#define STATS_HEADER THEME->GetMetric ("CatalogXml","StatsHeader")
|
||||||
#define STATS_FOOTER_TEXT THEME->GetMetric ("CatalogXml","StatsFooterText")
|
#define STATS_FOOTER_TEXT THEME->GetMetric ("CatalogXml","StatsFooterText")
|
||||||
#define STATS_FOOTER_LINK THEME->GetMetric ("CatalogXml","StatsFooterLink")
|
#define STATS_FOOTER_LINK THEME->GetMetric ("CatalogXml","StatsFooterLink")
|
||||||
@@ -183,11 +184,46 @@ void SaveCatalogXml()
|
|||||||
pNode2->AppendAttr( "DisplayAs", GradeToThemedString(g) );
|
pNode2->AppendAttr( "DisplayAs", GradeToThemedString(g) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
FOREACH_TapNoteScore( tns )
|
||||||
|
{
|
||||||
|
XNode* pNode2 = pNode->AppendChild( "TapNoteScore", TapNoteScoreToString(tns) );
|
||||||
|
pNode2->AppendAttr( "DisplayAs", TapNoteScoreToThemedString(tns) );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
FOREACH_HoldNoteScore( hns )
|
||||||
|
{
|
||||||
|
XNode* pNode2 = pNode->AppendChild( "HoldNoteScore", HoldNoteScoreToString(hns) );
|
||||||
|
pNode2->AppendAttr( "DisplayAs", HoldNoteScoreToThemedString(hns) );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
FOREACH_RadarCategory( rc )
|
||||||
|
{
|
||||||
|
XNode* pNode2 = pNode->AppendChild( "RadarValue", RadarCategoryToString(rc) );
|
||||||
|
pNode2->AppendAttr( "DisplayAs", RadarCategoryToThemedString(rc) );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
set<CString> modifiers;
|
||||||
|
THEME->GetModifierNames( modifiers );
|
||||||
|
for( set<CString>::const_iterator iter = modifiers.begin(); iter != modifiers.end(); iter++ )
|
||||||
|
{
|
||||||
|
XNode* pNode2 = pNode->AppendChild( "Modifier", *iter );
|
||||||
|
pNode2->AppendAttr( "DisplayAs", PlayerOptions::ThemeMod(*iter) );
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
xml.AppendChild( "InternetRankingHomeUrl", INTERNET_RANKING_HOME_URL );
|
xml.AppendChild( "InternetRankingHomeUrl", INTERNET_RANKING_HOME_URL );
|
||||||
xml.AppendChild( "InternetRankingUploadUrl", INTERNET_RANKING_UPLOAD_URL );
|
xml.AppendChild( "InternetRankingUploadUrl", INTERNET_RANKING_UPLOAD_URL );
|
||||||
xml.AppendChild( "InternetRankingViewGuidUrl", INTERNET_RANKING_VIEW_GUID_URL );
|
xml.AppendChild( "InternetRankingViewGuidUrl", INTERNET_RANKING_VIEW_GUID_URL );
|
||||||
|
xml.AppendChild( "StatsTitle", STATS_TITLE );
|
||||||
xml.AppendChild( "StatsHeader", STATS_HEADER );
|
xml.AppendChild( "StatsHeader", STATS_HEADER );
|
||||||
xml.AppendChild( "StatsFooterText", STATS_FOOTER_TEXT );
|
xml.AppendChild( "StatsFooterText", STATS_FOOTER_TEXT );
|
||||||
xml.AppendChild( "StatsFooterLink", STATS_FOOTER_LINK );
|
xml.AppendChild( "StatsFooterLink", STATS_FOOTER_LINK );
|
||||||
|
|||||||
@@ -43,6 +43,20 @@ struct DateTime : public tm
|
|||||||
// they're equal
|
// they're equal
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
bool operator==( const DateTime& other ) const
|
||||||
|
{
|
||||||
|
#define COMPARE(x) if( x!=other.x ) return false;
|
||||||
|
COMPARE( tm_year );
|
||||||
|
COMPARE( tm_mon );
|
||||||
|
COMPARE( tm_mday );
|
||||||
|
COMPARE( tm_hour );
|
||||||
|
COMPARE( tm_min );
|
||||||
|
COMPARE( tm_sec );
|
||||||
|
#undef COMPARE
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
bool operator!=( const DateTime& other ) const { return !operator==(other); }
|
||||||
|
|
||||||
static DateTime GetNowDateTime();
|
static DateTime GetNowDateTime();
|
||||||
static DateTime GetNowDate(); // GetNowDateTime() with time chopped off
|
static DateTime GetNowDate(); // GetNowDateTime() with time chopped off
|
||||||
|
|
||||||
|
|||||||
@@ -99,6 +99,7 @@ static const CString TapNoteScoreNames[NUM_TAP_NOTE_SCORES] = {
|
|||||||
};
|
};
|
||||||
XToString( TapNoteScore );
|
XToString( TapNoteScore );
|
||||||
StringToX( TapNoteScore );
|
StringToX( TapNoteScore );
|
||||||
|
XToThemedString( TapNoteScore );
|
||||||
|
|
||||||
|
|
||||||
static const CString HoldNoteScoreNames[NUM_HOLD_NOTE_SCORES] = {
|
static const CString HoldNoteScoreNames[NUM_HOLD_NOTE_SCORES] = {
|
||||||
@@ -108,6 +109,7 @@ static const CString HoldNoteScoreNames[NUM_HOLD_NOTE_SCORES] = {
|
|||||||
};
|
};
|
||||||
XToString( HoldNoteScore );
|
XToString( HoldNoteScore );
|
||||||
StringToX( HoldNoteScore );
|
StringToX( HoldNoteScore );
|
||||||
|
XToThemedString( HoldNoteScore );
|
||||||
|
|
||||||
|
|
||||||
static const CString MemoryCardStateNames[NUM_MEMORY_CARD_STATES] = {
|
static const CString MemoryCardStateNames[NUM_MEMORY_CARD_STATES] = {
|
||||||
|
|||||||
@@ -164,6 +164,7 @@ enum TapNoteScore {
|
|||||||
};
|
};
|
||||||
#define FOREACH_TapNoteScore( tns ) FOREACH_ENUM( TapNoteScore, NUM_TAP_NOTE_SCORES, tns )
|
#define FOREACH_TapNoteScore( tns ) FOREACH_ENUM( TapNoteScore, NUM_TAP_NOTE_SCORES, tns )
|
||||||
const CString& TapNoteScoreToString( TapNoteScore tns );
|
const CString& TapNoteScoreToString( TapNoteScore tns );
|
||||||
|
CString TapNoteScoreToThemedString( TapNoteScore tns );
|
||||||
TapNoteScore StringToTapNoteScore( const CString& str );
|
TapNoteScore StringToTapNoteScore( const CString& str );
|
||||||
|
|
||||||
|
|
||||||
@@ -175,7 +176,8 @@ enum HoldNoteScore
|
|||||||
NUM_HOLD_NOTE_SCORES
|
NUM_HOLD_NOTE_SCORES
|
||||||
};
|
};
|
||||||
#define FOREACH_HoldNoteScore( hns ) FOREACH_ENUM( HoldNoteScore, NUM_HOLD_NOTE_SCORES, hns )
|
#define FOREACH_HoldNoteScore( hns ) FOREACH_ENUM( HoldNoteScore, NUM_HOLD_NOTE_SCORES, hns )
|
||||||
const CString& HoldNoteScoreToString( HoldNoteScore tns );
|
const CString& HoldNoteScoreToString( HoldNoteScore hns );
|
||||||
|
CString HoldNoteScoreToThemedString( HoldNoteScore hns );
|
||||||
HoldNoteScore StringToHoldNoteScore( const CString& str );
|
HoldNoteScore StringToHoldNoteScore( const CString& str );
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ XNode* HighScore::CreateNode() const
|
|||||||
pNode->AppendChild( "PercentDP", fPercentDP );
|
pNode->AppendChild( "PercentDP", fPercentDP );
|
||||||
pNode->AppendChild( "SurviveSeconds", fSurviveSeconds );
|
pNode->AppendChild( "SurviveSeconds", fSurviveSeconds );
|
||||||
pNode->AppendChild( "Modifiers", sModifiers );
|
pNode->AppendChild( "Modifiers", sModifiers );
|
||||||
pNode->AppendChild( "Time", (int)time );
|
pNode->AppendChild( "DateTime", dateTime );
|
||||||
pNode->AppendChild( "PlayerGuid", sPlayerGuid );
|
pNode->AppendChild( "PlayerGuid", sPlayerGuid );
|
||||||
pNode->AppendChild( "MachineGuid", sMachineGuid );
|
pNode->AppendChild( "MachineGuid", sMachineGuid );
|
||||||
pNode->AppendChild( "ProductID", iProductID );
|
pNode->AppendChild( "ProductID", iProductID );
|
||||||
@@ -54,8 +54,7 @@ XNode* HighScore::CreateNode() const
|
|||||||
XNode* pHoldNoteScores = pNode->AppendChild( "HoldNoteScores" );
|
XNode* pHoldNoteScores = pNode->AppendChild( "HoldNoteScores" );
|
||||||
FOREACH_HoldNoteScore( hns )
|
FOREACH_HoldNoteScore( hns )
|
||||||
pHoldNoteScores->AppendChild( HoldNoteScoreToString(hns), iHoldNoteScores[hns] );
|
pHoldNoteScores->AppendChild( HoldNoteScoreToString(hns), iHoldNoteScores[hns] );
|
||||||
XNode* pRadarCategories = pNode->AppendChild( "RadarActuals" );
|
pNode->AppendChild( radarValues.CreateNode() );
|
||||||
pRadarCategories->AppendChild( radarValues.CreateNode() );
|
|
||||||
|
|
||||||
return pNode;
|
return pNode;
|
||||||
}
|
}
|
||||||
@@ -77,7 +76,7 @@ void HighScore::LoadFromNode( const XNode* pNode )
|
|||||||
pNode->GetChildValue( "PercentDP", fPercentDP );
|
pNode->GetChildValue( "PercentDP", fPercentDP );
|
||||||
pNode->GetChildValue( "SurviveSeconds", fSurviveSeconds );
|
pNode->GetChildValue( "SurviveSeconds", fSurviveSeconds );
|
||||||
pNode->GetChildValue( "Modifiers", sModifiers );
|
pNode->GetChildValue( "Modifiers", sModifiers );
|
||||||
pNode->GetChildValue( "Time", (int&)time );
|
pNode->GetChildValue( "DateTime", dateTime );
|
||||||
pNode->GetChildValue( "PlayerGuid", sPlayerGuid );
|
pNode->GetChildValue( "PlayerGuid", sPlayerGuid );
|
||||||
pNode->GetChildValue( "MachineGuid", sMachineGuid );
|
pNode->GetChildValue( "MachineGuid", sMachineGuid );
|
||||||
pNode->GetChildValue( "ProductID", iProductID );
|
pNode->GetChildValue( "ProductID", iProductID );
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
#include "Grade.h"
|
#include "Grade.h"
|
||||||
#include "GameConstantsAndTypes.h"
|
#include "GameConstantsAndTypes.h"
|
||||||
#include "RadarValues.h"
|
#include "RadarValues.h"
|
||||||
|
#include "DateTime.h"
|
||||||
|
|
||||||
struct XNode;
|
struct XNode;
|
||||||
|
|
||||||
@@ -17,7 +18,7 @@ struct HighScore
|
|||||||
float fPercentDP;
|
float fPercentDP;
|
||||||
float fSurviveSeconds;
|
float fSurviveSeconds;
|
||||||
CString sModifiers;
|
CString sModifiers;
|
||||||
time_t time; // return value of time() when screenshot was taken
|
DateTime dateTime; // return value of time() when screenshot was taken
|
||||||
CString sPlayerGuid; // who made this high score
|
CString sPlayerGuid; // who made this high score
|
||||||
CString sMachineGuid; // where this high score was made
|
CString sMachineGuid; // where this high score was made
|
||||||
int iProductID;
|
int iProductID;
|
||||||
@@ -34,7 +35,7 @@ struct HighScore
|
|||||||
fPercentDP = 0;
|
fPercentDP = 0;
|
||||||
fSurviveSeconds = 0;
|
fSurviveSeconds = 0;
|
||||||
sModifiers = "";
|
sModifiers = "";
|
||||||
time = 0;
|
dateTime.Init();
|
||||||
sPlayerGuid = "";
|
sPlayerGuid = "";
|
||||||
sMachineGuid = "";
|
sMachineGuid = "";
|
||||||
iProductID = 0;
|
iProductID = 0;
|
||||||
@@ -53,7 +54,7 @@ struct HighScore
|
|||||||
COMPARE( fPercentDP );
|
COMPARE( fPercentDP );
|
||||||
COMPARE( fSurviveSeconds );
|
COMPARE( fSurviveSeconds );
|
||||||
COMPARE( sModifiers );
|
COMPARE( sModifiers );
|
||||||
COMPARE( time );
|
COMPARE( dateTime );
|
||||||
COMPARE( sPlayerGuid );
|
COMPARE( sPlayerGuid );
|
||||||
COMPARE( sMachineGuid );
|
COMPARE( sMachineGuid );
|
||||||
COMPARE( iProductID );
|
COMPARE( iProductID );
|
||||||
|
|||||||
@@ -89,7 +89,7 @@ void Profile::InitGeneralData()
|
|||||||
m_iNumToasties = 0;
|
m_iNumToasties = 0;
|
||||||
m_UnlockedSongs.clear();
|
m_UnlockedSongs.clear();
|
||||||
m_sLastPlayedMachineGuid = "";
|
m_sLastPlayedMachineGuid = "";
|
||||||
m_LastPlayedDate = DateTime::GetNowDate();
|
m_LastPlayedDate.Init();
|
||||||
m_iTotalTapsAndHolds = 0;
|
m_iTotalTapsAndHolds = 0;
|
||||||
m_iTotalJumps = 0;
|
m_iTotalJumps = 0;
|
||||||
m_iTotalHolds = 0;
|
m_iTotalHolds = 0;
|
||||||
|
|||||||
@@ -929,7 +929,7 @@ void ScreenEvaluation::CommitScores(
|
|||||||
hs.fPercentDP = stageStats.GetPercentDancePoints( p );
|
hs.fPercentDP = stageStats.GetPercentDancePoints( p );
|
||||||
hs.fSurviveSeconds = stageStats.fAliveSeconds[p];
|
hs.fSurviveSeconds = stageStats.fAliveSeconds[p];
|
||||||
hs.sModifiers = GAMESTATE->m_PlayerOptions[p].GetString();
|
hs.sModifiers = GAMESTATE->m_PlayerOptions[p].GetString();
|
||||||
hs.time = time(NULL);
|
hs.dateTime = DateTime::GetNowDateTime();
|
||||||
hs.sPlayerGuid = PROFILEMAN->IsUsingProfile(p) ? PROFILEMAN->GetProfile(p)->m_sGuid : "";
|
hs.sPlayerGuid = PROFILEMAN->IsUsingProfile(p) ? PROFILEMAN->GetProfile(p)->m_sGuid : "";
|
||||||
hs.sMachineGuid = PROFILEMAN->GetMachineProfile()->m_sGuid;
|
hs.sMachineGuid = PROFILEMAN->GetMachineProfile()->m_sGuid;
|
||||||
hs.iProductID = PREFSMAN->m_iProductID;
|
hs.iProductID = PREFSMAN->m_iProductID;
|
||||||
|
|||||||
@@ -642,6 +642,21 @@ CString ThemeManager::GetPathToN( CString sFileName, bool bOptional ) { CString
|
|||||||
CString ThemeManager::GetPathToS( CString sFileName, bool bOptional ) { CString sClassName, sElement; FileNameToClassAndElement(sFileName,sClassName,sElement); return GetPathS(sClassName,sElement,bOptional); }
|
CString ThemeManager::GetPathToS( CString sFileName, bool bOptional ) { CString sClassName, sElement; FileNameToClassAndElement(sFileName,sClassName,sElement); return GetPathS(sClassName,sElement,bOptional); }
|
||||||
CString ThemeManager::GetPathToO( CString sFileName, bool bOptional ) { CString sClassName, sElement; FileNameToClassAndElement(sFileName,sClassName,sElement); return GetPathO(sClassName,sElement,bOptional); }
|
CString ThemeManager::GetPathToO( CString sFileName, bool bOptional ) { CString sClassName, sElement; FileNameToClassAndElement(sFileName,sClassName,sElement); return GetPathO(sClassName,sElement,bOptional); }
|
||||||
|
|
||||||
|
void ThemeManager::GetModifierNames( set<CString>& AddTo )
|
||||||
|
{
|
||||||
|
const IniFile::key *cur = m_pIniCurMetrics->GetKey( "OptionNames" );
|
||||||
|
const IniFile::key *base = m_pIniBaseMetrics->GetKey( "OptionNames" );
|
||||||
|
|
||||||
|
for( IniFile::key::const_iterator iter = cur->begin(); iter != cur->end(); iter++ )
|
||||||
|
{
|
||||||
|
AddTo.insert( iter->first );
|
||||||
|
}
|
||||||
|
for( IniFile::key::const_iterator iter = base->begin(); iter != base->end(); iter++ )
|
||||||
|
{
|
||||||
|
AddTo.insert( iter->first );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* (c) 2001-2004 Chris Danford
|
* (c) 2001-2004 Chris Danford
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
|
|
||||||
#include "RageTypes.h"
|
#include "RageTypes.h"
|
||||||
#include "RageTimer.h"
|
#include "RageTimer.h"
|
||||||
|
#include <set>
|
||||||
|
|
||||||
class IniFile;
|
class IniFile;
|
||||||
|
|
||||||
@@ -27,6 +28,7 @@ public:
|
|||||||
void NextTheme();
|
void NextTheme();
|
||||||
void ReloadMetrics();
|
void ReloadMetrics();
|
||||||
void ReloadMetricsIfNecessary();
|
void ReloadMetricsIfNecessary();
|
||||||
|
void GetModifierNames( set<CString>& AddTo );
|
||||||
|
|
||||||
/* I renamed these for two reasons. The overload conflicts with the ones below:
|
/* I renamed these for two reasons. The overload conflicts with the ones below:
|
||||||
* GetPathToB( str, str ) was matching the ones below instead of these. It's also
|
* GetPathToB( str, str ) was matching the ones below instead of these. It's also
|
||||||
|
|||||||
Reference in New Issue
Block a user