CString -> RString
This commit is contained in:
+16
-16
@@ -11,15 +11,15 @@
|
||||
|
||||
struct HighScoreImpl
|
||||
{
|
||||
CString sName; // name that shows in the machine's ranking screen
|
||||
RString sName; // name that shows in the machine's ranking screen
|
||||
Grade grade;
|
||||
int iScore;
|
||||
float fPercentDP;
|
||||
float fSurviveSeconds;
|
||||
CString sModifiers;
|
||||
RString sModifiers;
|
||||
DateTime dateTime; // return value of time() when screenshot was taken
|
||||
CString sPlayerGuid; // who made this high score
|
||||
CString sMachineGuid; // where this high score was made
|
||||
RString sPlayerGuid; // who made this high score
|
||||
RString sMachineGuid; // where this high score was made
|
||||
int iProductID;
|
||||
int iTapNoteScores[NUM_TapNoteScore];
|
||||
int iHoldNoteScores[NUM_HoldNoteScore];
|
||||
@@ -82,7 +82,7 @@ XNode *HighScoreImpl::CreateNode() const
|
||||
pNode->m_sName = "HighScore";
|
||||
|
||||
// TRICKY: Don't write "name to fill in" markers.
|
||||
pNode->AppendChild( "Name", IsRankingToFillIn(sName) ? CString("") : sName );
|
||||
pNode->AppendChild( "Name", IsRankingToFillIn(sName) ? RString("") : sName );
|
||||
pNode->AppendChild( "Grade", GradeToString(grade) );
|
||||
pNode->AppendChild( "Score", iScore );
|
||||
pNode->AppendChild( "PercentDP", fPercentDP );
|
||||
@@ -110,7 +110,7 @@ void HighScoreImpl::LoadFromNode( const XNode *pNode )
|
||||
{
|
||||
ASSERT( pNode->m_sName == "HighScore" );
|
||||
|
||||
CString s;
|
||||
RString s;
|
||||
|
||||
pNode->GetChildValue( "Name", sName );
|
||||
pNode->GetChildValue( "Grade", s );
|
||||
@@ -152,31 +152,31 @@ void HighScore::Unset()
|
||||
m_Impl = new HighScoreImpl;
|
||||
}
|
||||
|
||||
CString HighScore::GetName() const { return m_Impl->sName; }
|
||||
RString HighScore::GetName() const { return m_Impl->sName; }
|
||||
Grade HighScore::GetGrade() const { return m_Impl->grade; }
|
||||
int HighScore::GetScore() const { return m_Impl->iScore; }
|
||||
float HighScore::GetPercentDP() const { return m_Impl->fPercentDP; }
|
||||
float HighScore::GetSurviveSeconds() const { return m_Impl->fSurviveSeconds; }
|
||||
float HighScore::GetSurvivalSeconds() const { return GetSurviveSeconds() + GetLifeRemainingSeconds(); }
|
||||
CString HighScore::GetModifiers() const { return m_Impl->sModifiers; }
|
||||
RString HighScore::GetModifiers() const { return m_Impl->sModifiers; }
|
||||
DateTime HighScore::GetDateTime() const { return m_Impl->dateTime; }
|
||||
CString HighScore::GetPlayerGuid() const { return m_Impl->sPlayerGuid; }
|
||||
CString HighScore::GetMachineGuid() const { return m_Impl->sMachineGuid; }
|
||||
RString HighScore::GetPlayerGuid() const { return m_Impl->sPlayerGuid; }
|
||||
RString HighScore::GetMachineGuid() const { return m_Impl->sMachineGuid; }
|
||||
int HighScore::GetProductID() const { return m_Impl->iProductID; }
|
||||
int HighScore::GetTapNoteScore( TapNoteScore tns ) const { return m_Impl->iTapNoteScores[tns]; }
|
||||
int HighScore::GetHoldNoteScore( HoldNoteScore hns ) const { return m_Impl->iHoldNoteScores[hns]; }
|
||||
const RadarValues &HighScore::GetRadarValues() const { return m_Impl->radarValues; }
|
||||
float HighScore::GetLifeRemainingSeconds() const { return m_Impl->fLifeRemainingSeconds; }
|
||||
|
||||
void HighScore::SetName( const CString &sName ) { m_Impl->sName = sName; }
|
||||
void HighScore::SetName( const RString &sName ) { m_Impl->sName = sName; }
|
||||
void HighScore::SetGrade( Grade g ) { m_Impl->grade = g; }
|
||||
void HighScore::SetScore( int iScore ) { m_Impl->iScore = iScore; }
|
||||
void HighScore::SetPercentDP( float f ) { m_Impl->fPercentDP = f; }
|
||||
void HighScore::SetSurviveSeconds( float f ) { m_Impl->fSurviveSeconds = f; }
|
||||
void HighScore::SetModifiers( CString s ) { m_Impl->sModifiers = s; }
|
||||
void HighScore::SetModifiers( RString s ) { m_Impl->sModifiers = s; }
|
||||
void HighScore::SetDateTime( DateTime d ) { m_Impl->dateTime = d; }
|
||||
void HighScore::SetPlayerGuid( CString s ) { m_Impl->sPlayerGuid = s; }
|
||||
void HighScore::SetMachineGuid( CString s ) { m_Impl->sMachineGuid = s; }
|
||||
void HighScore::SetPlayerGuid( RString s ) { m_Impl->sPlayerGuid = s; }
|
||||
void HighScore::SetMachineGuid( RString s ) { m_Impl->sMachineGuid = s; }
|
||||
void HighScore::SetProductID( int i ) { m_Impl->iProductID = i; }
|
||||
void HighScore::SetTapNoteScore( TapNoteScore tns, int i ) { m_Impl->iTapNoteScores[tns] = i; }
|
||||
void HighScore::SetHoldNoteScore( HoldNoteScore hns, int i ) { m_Impl->iHoldNoteScores[hns] = i; }
|
||||
@@ -186,7 +186,7 @@ void HighScore::SetLifeRemainingSeconds( float f ) { m_Impl->fLifeRemainingSecon
|
||||
/* We normally don't give direct access to the members. We need this one
|
||||
* for NameToFillIn; use a special accessor so it's easy to find where this
|
||||
* is used. */
|
||||
CString *HighScore::GetNameMutable() { return &m_Impl->sName; }
|
||||
RString *HighScore::GetNameMutable() { return &m_Impl->sName; }
|
||||
|
||||
bool HighScore::operator>=( const HighScore& other ) const
|
||||
{
|
||||
@@ -221,7 +221,7 @@ void HighScore::LoadFromNode( const XNode* pNode )
|
||||
m_Impl->LoadFromNode( pNode );
|
||||
}
|
||||
|
||||
CString HighScore::GetDisplayName() const
|
||||
RString HighScore::GetDisplayName() const
|
||||
{
|
||||
if( GetName().empty() )
|
||||
return EMPTY_NAME;
|
||||
|
||||
Reference in New Issue
Block a user