CString -> RString
This commit is contained in:
@@ -9,9 +9,9 @@
|
||||
#include "PlayerState.h"
|
||||
|
||||
|
||||
CString GetAttackPieceName( const CString &sAttack )
|
||||
RString GetAttackPieceName( const RString &sAttack )
|
||||
{
|
||||
CString ret = ssprintf( "attack %s", sAttack.c_str() );
|
||||
RString ret = ssprintf( "attack %s", sAttack.c_str() );
|
||||
|
||||
/* 1.5x -> 1_5x. If we pass a period to THEME->GetPathTo, it'll think
|
||||
* we're looking for a specific file and not search. */
|
||||
@@ -42,19 +42,19 @@ void AttackDisplay::Init( const PlayerState* pPlayerState )
|
||||
GAMESTATE->m_PlayMode != PLAY_MODE_RAVE )
|
||||
return;
|
||||
|
||||
set<CString> attacks;
|
||||
set<RString> attacks;
|
||||
for( int al=0; al<NUM_ATTACK_LEVELS; al++ )
|
||||
{
|
||||
const Character *ch = GAMESTATE->m_pCurCharacters[pn];
|
||||
ASSERT( ch );
|
||||
const CString* asAttacks = ch->m_sAttacks[al];
|
||||
const RString* asAttacks = ch->m_sAttacks[al];
|
||||
for( int att = 0; att < NUM_ATTACKS_PER_LEVEL; ++att )
|
||||
attacks.insert( asAttacks[att] );
|
||||
}
|
||||
|
||||
for( set<CString>::const_iterator it = attacks.begin(); it != attacks.end(); ++it )
|
||||
for( set<RString>::const_iterator it = attacks.begin(); it != attacks.end(); ++it )
|
||||
{
|
||||
const CString path = THEME->GetPathG( "AttackDisplay", GetAttackPieceName( *it ), true );
|
||||
const RString path = THEME->GetPathG( "AttackDisplay", GetAttackPieceName( *it ), true );
|
||||
if( path == "" )
|
||||
{
|
||||
LOG->Trace( "Couldn't find \"%s\"", GetAttackPieceName( *it ).c_str() );
|
||||
@@ -96,9 +96,9 @@ void AttackDisplay::Update( float fDelta )
|
||||
}
|
||||
}
|
||||
|
||||
void AttackDisplay::SetAttack( const CString &sText )
|
||||
void AttackDisplay::SetAttack( const RString &sText )
|
||||
{
|
||||
const CString path = THEME->GetPathG( "AttackDisplay", GetAttackPieceName(sText), true );
|
||||
const RString path = THEME->GetPathG( "AttackDisplay", GetAttackPieceName(sText), true );
|
||||
if( path == "" )
|
||||
return;
|
||||
|
||||
@@ -108,7 +108,7 @@ void AttackDisplay::SetAttack( const CString &sText )
|
||||
// TODO: Remove use of PlayerNumber.
|
||||
PlayerNumber pn = m_pPlayerState->m_PlayerNumber;
|
||||
|
||||
const CString sName = ssprintf( "%sP%i", sText.c_str(), pn+1 );
|
||||
const RString sName = ssprintf( "%sP%i", sText.c_str(), pn+1 );
|
||||
m_sprAttack.RunCommands( THEME->GetMetricA("AttackDisplay", sName + "OnCommand") );
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user