remove CStringArray #define
This commit is contained in:
@@ -56,7 +56,7 @@ retry:
|
||||
RageFileManager::FileType ft = FILEMAN->GetFileType( sPath );
|
||||
if( ft != RageFileManager::TYPE_FILE && ft != RageFileManager::TYPE_DIR )
|
||||
{
|
||||
CStringArray asPaths;
|
||||
vector<CString> asPaths;
|
||||
GetDirListing( sPath + "*", asPaths, false, true ); // return path too
|
||||
|
||||
if( asPaths.empty() )
|
||||
|
||||
@@ -15,7 +15,7 @@ AnnouncerManager::AnnouncerManager()
|
||||
LOG->Trace("AnnouncerManager::AnnouncerManager()");
|
||||
}
|
||||
|
||||
void AnnouncerManager::GetAnnouncerNames( CStringArray& AddTo )
|
||||
void AnnouncerManager::GetAnnouncerNames( vector<CString>& AddTo )
|
||||
{
|
||||
GetDirListing( ANNOUNCERS_DIR+"*", AddTo, true );
|
||||
|
||||
@@ -32,7 +32,7 @@ bool AnnouncerManager::DoesAnnouncerExist( CString sAnnouncerName )
|
||||
if( sAnnouncerName == "" )
|
||||
return true;
|
||||
|
||||
CStringArray asAnnouncerNames;
|
||||
vector<CString> asAnnouncerNames;
|
||||
GetAnnouncerNames( asAnnouncerNames );
|
||||
for( unsigned i=0; i<asAnnouncerNames.size(); i++ )
|
||||
if( 0==stricmp(sAnnouncerName, asAnnouncerNames[i]) )
|
||||
@@ -127,7 +127,7 @@ bool AnnouncerManager::HasSoundsFor( CString sFolderName )
|
||||
|
||||
void AnnouncerManager::NextAnnouncer()
|
||||
{
|
||||
CStringArray as;
|
||||
vector<CString> as;
|
||||
GetAnnouncerNames( as );
|
||||
if( as.size()==0 )
|
||||
return;
|
||||
|
||||
@@ -6,7 +6,7 @@ class AnnouncerManager
|
||||
public:
|
||||
AnnouncerManager();
|
||||
|
||||
void GetAnnouncerNames( CStringArray& AddTo );
|
||||
void GetAnnouncerNames( vector<CString>& AddTo );
|
||||
bool DoesAnnouncerExist( CString sAnnouncerName );
|
||||
void SwitchAnnouncer( CString sNewAnnouncerName );
|
||||
CString GetCurAnnouncerName() { return m_sCurAnnouncerName; };
|
||||
|
||||
@@ -123,7 +123,7 @@ void BGAnimation::LoadFromAniDir( const CString &_sAniDir )
|
||||
// This is an old style BGAnimation (not using .ini)
|
||||
|
||||
// loading a directory of layers
|
||||
CStringArray asImagePaths;
|
||||
vector<CString> asImagePaths;
|
||||
ASSERT( sAniDir != "" );
|
||||
|
||||
GetDirListing( sAniDir+"*.png", asImagePaths, false, true );
|
||||
|
||||
@@ -324,7 +324,7 @@ bool BackgroundImpl::Layer::CreateBackground( const Song *pSong, const Backgroun
|
||||
// - song's dir
|
||||
// - RandomMovies dir
|
||||
// - BGAnimations dir.
|
||||
CStringArray vsPaths, vsThrowAway;
|
||||
vector<CString> vsPaths, vsThrowAway;
|
||||
|
||||
// Look for BGAnims in the song dir
|
||||
if( sToResolve == SONG_BACKGROUND_FILE )
|
||||
@@ -507,7 +507,7 @@ void BackgroundImpl::LoadFromSong( const Song* pSong )
|
||||
// Choose a bunch of background that we'll use for the random file marker
|
||||
//
|
||||
{
|
||||
CStringArray vsThrowAway, vsNames;
|
||||
vector<CString> vsThrowAway, vsNames;
|
||||
switch( PREFSMAN->m_RandomBackgroundMode )
|
||||
{
|
||||
default:
|
||||
|
||||
@@ -372,12 +372,12 @@ void BitmapText::SetText( const CString& _sText, const CString& _sAlternateText,
|
||||
/* It doesn't. I can add Japanese wrapping, at least. We could handle hyphens
|
||||
* and soft hyphens and pretty easily, too. -glenn */
|
||||
// TODO: Move this wrapping logic into Font
|
||||
CStringArray asLines;
|
||||
vector<CString> asLines;
|
||||
split( m_sText, "\n", asLines, false );
|
||||
|
||||
for( unsigned line = 0; line < asLines.size(); ++line )
|
||||
{
|
||||
CStringArray asWords;
|
||||
vector<CString> asWords;
|
||||
split( asLines[line], " ", asWords );
|
||||
|
||||
CString sCurLine;
|
||||
|
||||
@@ -25,7 +25,7 @@ bool Character::Load( CString sCharDir )
|
||||
}
|
||||
|
||||
{
|
||||
CStringArray as;
|
||||
vector<CString> as;
|
||||
GetDirListing( m_sCharDir+"card.png", as, false, true );
|
||||
GetDirListing( m_sCharDir+"card.jpg", as, false, true );
|
||||
GetDirListing( m_sCharDir+"card.gif", as, false, true );
|
||||
@@ -37,7 +37,7 @@ bool Character::Load( CString sCharDir )
|
||||
}
|
||||
|
||||
{
|
||||
CStringArray as;
|
||||
vector<CString> as;
|
||||
GetDirListing( m_sCharDir+"icon.png", as, false, true );
|
||||
GetDirListing( m_sCharDir+"icon.jpg", as, false, true );
|
||||
GetDirListing( m_sCharDir+"icon.gif", as, false, true );
|
||||
@@ -67,7 +67,7 @@ bool Character::Load( CString sCharDir )
|
||||
|
||||
CString GetRandomFileInDir( CString sDir )
|
||||
{
|
||||
CStringArray asFiles;
|
||||
vector<CString> asFiles;
|
||||
GetDirListing( sDir, asFiles, false, true );
|
||||
if( asFiles.empty() )
|
||||
return CString();
|
||||
@@ -90,7 +90,7 @@ CString Character::GetWarmUpAnimationPath() const { return DerefRedir(GetRandomF
|
||||
CString Character::GetDanceAnimationPath() const { return DerefRedir(GetRandomFileInDir(m_sCharDir + "Dance/")); }
|
||||
CString Character::GetTakingABreakPath() const
|
||||
{
|
||||
CStringArray as;
|
||||
vector<CString> as;
|
||||
GetDirListing( m_sCharDir+"break.png", as, false, true );
|
||||
GetDirListing( m_sCharDir+"break.jpg", as, false, true );
|
||||
GetDirListing( m_sCharDir+"break.gif", as, false, true );
|
||||
@@ -103,7 +103,7 @@ CString Character::GetTakingABreakPath() const
|
||||
|
||||
CString Character::GetSongSelectIconPath() const
|
||||
{
|
||||
CStringArray as;
|
||||
vector<CString> as;
|
||||
// first try and find an icon specific to the select music screen
|
||||
// so you can have different icons for music select / char select
|
||||
GetDirListing( m_sCharDir+"selectmusicicon.png", as, false, true );
|
||||
@@ -129,7 +129,7 @@ CString Character::GetSongSelectIconPath() const
|
||||
|
||||
CString Character::GetStageIconPath() const
|
||||
{
|
||||
CStringArray as;
|
||||
vector<CString> as;
|
||||
// first try and find an icon specific to the select music screen
|
||||
// so you can have different icons for music select / char select
|
||||
GetDirListing( m_sCharDir+"stageicon.png", as, false, true );
|
||||
|
||||
@@ -14,7 +14,7 @@ CharacterManager::CharacterManager()
|
||||
SAFE_DELETE( m_pCharacters[i] );
|
||||
m_pCharacters.clear();
|
||||
|
||||
CStringArray as;
|
||||
vector<CString> as;
|
||||
GetDirListing( CHARACTERS_DIR "*", as, true, true );
|
||||
StripCvs( as );
|
||||
|
||||
|
||||
@@ -96,7 +96,7 @@ bool CodeItem::Load( CString sButtonsNames )
|
||||
buttons.clear();
|
||||
|
||||
const Game* pGame = GAMESTATE->GetCurrentGame();
|
||||
CStringArray asButtonNames;
|
||||
vector<CString> asButtonNames;
|
||||
|
||||
bool bHasAPlus = sButtonsNames.Find( '+' ) != -1;
|
||||
bool bHasADash = sButtonsNames.Find( '-' ) != -1;
|
||||
|
||||
@@ -126,7 +126,7 @@ CString Commands::GetOriginalCommandString() const
|
||||
|
||||
void ParseCommands( const CString &sCommands, Commands &vCommandsOut )
|
||||
{
|
||||
CStringArray vsCommands;
|
||||
vector<CString> vsCommands;
|
||||
SplitWithQuotes( sCommands, ';', vsCommands, true ); // do ignore empty
|
||||
vCommandsOut.v.resize( vsCommands.size() );
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ void ThemeMetricDifficultiesToShow::Read()
|
||||
|
||||
m_v.clear();
|
||||
|
||||
CStringArray v;
|
||||
vector<CString> v;
|
||||
split( ThemeMetric<CString>::GetValue(), ",", v );
|
||||
ASSERT( v.size() > 0 );
|
||||
|
||||
@@ -67,7 +67,7 @@ void ThemeMetricCourseDifficultiesToShow::Read()
|
||||
|
||||
m_v.clear();
|
||||
|
||||
CStringArray v;
|
||||
vector<CString> v;
|
||||
split( ThemeMetric<CString>::GetValue(), ",", v );
|
||||
ASSERT( v.size() > 0 );
|
||||
|
||||
@@ -84,7 +84,7 @@ const vector<CourseDifficulty>& ThemeMetricCourseDifficultiesToShow::GetValue()
|
||||
|
||||
static void RemoveStepsTypes( vector<StepsType>& inout, CString sStepsTypesToRemove )
|
||||
{
|
||||
CStringArray v;
|
||||
vector<CString> v;
|
||||
split( sStepsTypesToRemove, ",", v );
|
||||
ASSERT( v.size() > 0 );
|
||||
|
||||
|
||||
@@ -935,7 +935,7 @@ void Course::UpdateCourseStats( StepsType st )
|
||||
|
||||
bool Course::IsRanking() const
|
||||
{
|
||||
CStringArray rankingsongs;
|
||||
vector<CString> rankingsongs;
|
||||
|
||||
split(THEME->GetMetric("ScreenRanking", "CoursesToShow"), ",", rankingsongs);
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ bool CourseLoaderCRS::LoadFromMsd( const CString &sPath, const MsdFile &msd, Cou
|
||||
{
|
||||
const CString sFName = SetExtension( out.m_sPath, "" );
|
||||
|
||||
CStringArray arrayPossibleBanners;
|
||||
vector<CString> arrayPossibleBanners;
|
||||
GetDirListing( sFName + "*.png", arrayPossibleBanners, false, true );
|
||||
GetDirListing( sFName + "*.jpg", arrayPossibleBanners, false, true );
|
||||
GetDirListing( sFName + "*.bmp", arrayPossibleBanners, false, true );
|
||||
@@ -86,7 +86,7 @@ bool CourseLoaderCRS::LoadFromMsd( const CString &sPath, const MsdFile &msd, Cou
|
||||
float end = -9999;
|
||||
for( unsigned j = 1; j < sParams.params.size(); ++j )
|
||||
{
|
||||
CStringArray sBits;
|
||||
vector<CString> sBits;
|
||||
split( sParams[j], "=", sBits, false );
|
||||
if( sBits.size() < 2 )
|
||||
continue;
|
||||
@@ -149,7 +149,7 @@ bool CourseLoaderCRS::LoadFromMsd( const CString &sPath, const MsdFile &msd, Cou
|
||||
new_entry.bSecret = true;
|
||||
CString sSong = sParams[1];
|
||||
sSong.Replace( "\\", "/" );
|
||||
CStringArray bits;
|
||||
vector<CString> bits;
|
||||
split( sSong, "/", bits );
|
||||
if( bits.size() == 2 )
|
||||
{
|
||||
@@ -206,7 +206,7 @@ bool CourseLoaderCRS::LoadFromMsd( const CString &sPath, const MsdFile &msd, Cou
|
||||
{
|
||||
/* If "showcourse" or "noshowcourse" is in the list, force new_entry.secret
|
||||
* on or off. */
|
||||
CStringArray mods;
|
||||
vector<CString> mods;
|
||||
split( sParams[3], ",", mods, true );
|
||||
for( int j = (int) mods.size()-1; j >= 0 ; --j )
|
||||
{
|
||||
@@ -278,7 +278,7 @@ bool CourseLoaderCRS::LoadFromCRSFile( const CString &_sPath, Course &out )
|
||||
|
||||
// save group name
|
||||
{
|
||||
CStringArray parts;
|
||||
vector<CString> parts;
|
||||
split( sPath, "/", parts, false );
|
||||
if( parts.size() >= 4 ) // e.g. "/Courses/blah/fun.cvs"
|
||||
out.m_sGroupName = parts[parts.size()-2];
|
||||
|
||||
@@ -58,7 +58,7 @@ bool CourseWriterCRS::Write( const Course &course, RageFileBasic &f, bool bSavin
|
||||
StepsType st = entry.first;
|
||||
CourseDifficulty cd = entry.second;
|
||||
|
||||
CStringArray asRadarValues;
|
||||
vector<CString> asRadarValues;
|
||||
const RadarValues &rv = it->second;
|
||||
for( int r=0; r < NUM_RADAR_CATEGORIES; r++ )
|
||||
asRadarValues.push_back( ssprintf("%.3f", rv[r]) );
|
||||
@@ -103,7 +103,7 @@ bool CourseWriterCRS::Write( const Course &course, RageFileBasic &f, bool bSavin
|
||||
else if( entry.pSong )
|
||||
{
|
||||
// strip off everything but the group name and song dir
|
||||
CStringArray as;
|
||||
vector<CString> as;
|
||||
ASSERT( entry.pSong != NULL );
|
||||
split( entry.pSong->GetSongDir(), "/", as );
|
||||
ASSERT( as.size() >= 2 );
|
||||
|
||||
@@ -102,7 +102,7 @@ private:
|
||||
Difficulty dc;
|
||||
};
|
||||
|
||||
CStringArray m_sGroups;
|
||||
vector<CString> m_sGroups;
|
||||
vector<Song*> m_pSongs;
|
||||
vector<StepsType> m_StepsTypes;
|
||||
vector<StepsAndDifficulty> m_vpSteps;
|
||||
|
||||
@@ -333,10 +333,10 @@ void Font::SetDefaultGlyph( FontPage *pPage )
|
||||
|
||||
|
||||
/* Given the INI for a font, find all of the texture pages for the font. */
|
||||
void Font::GetFontPaths( const CString &sFontIniPath, CStringArray &asTexturePathsOut )
|
||||
void Font::GetFontPaths( const CString &sFontIniPath, vector<CString> &asTexturePathsOut )
|
||||
{
|
||||
CString sPrefix = SetExtension( sFontIniPath, "" );
|
||||
CStringArray asFiles;
|
||||
vector<CString> asFiles;
|
||||
GetDirListing( sPrefix + "*", asFiles, false, true );
|
||||
|
||||
for( unsigned i = 0; i < asFiles.size(); ++i )
|
||||
@@ -628,7 +628,7 @@ CString FontPageSettings::MapRange( CString sMapping, int iMapOffset, int iGlyph
|
||||
return CString();
|
||||
}
|
||||
|
||||
static CStringArray LoadStack;
|
||||
static vector<CString> LoadStack;
|
||||
|
||||
/*
|
||||
* A font set is a set of files, eg:
|
||||
@@ -671,7 +671,7 @@ void Font::Load( const CString &sIniPath, CString sChars )
|
||||
m_sChars = sChars;
|
||||
|
||||
/* Get the filenames associated with this font. */
|
||||
CStringArray asTexturePaths;
|
||||
vector<CString> asTexturePaths;
|
||||
GetFontPaths( sIniPath, asTexturePaths );
|
||||
|
||||
bool bCapitalsOnly = false;
|
||||
@@ -688,7 +688,7 @@ void Font::Load( const CString &sIniPath, CString sChars )
|
||||
|
||||
{
|
||||
/* If this is a top-level font (not a subfont), load the default font first. */
|
||||
CStringArray ImportList;
|
||||
vector<CString> ImportList;
|
||||
if( LoadStack.size() == 1 )
|
||||
ImportList.push_back("Common default");
|
||||
|
||||
|
||||
@@ -159,7 +159,7 @@ private:
|
||||
CString m_sChars;
|
||||
|
||||
void LoadFontPageSettings( FontPageSettings &cfg, IniFile &ini, const CString &sTexturePath, const CString &PageName, CString sChars );
|
||||
static void GetFontPaths( const CString &sFontOrTextureFilePath, CStringArray &sTexturePaths );
|
||||
static void GetFontPaths( const CString &sFontOrTextureFilePath, vector<CString> &sTexturePaths );
|
||||
CString GetPageNameFromFileName( const CString &sFilename );
|
||||
};
|
||||
|
||||
|
||||
@@ -2713,7 +2713,7 @@ const Game* GameManager::GetGameFromIndex( int index ) const
|
||||
|
||||
bool GameManager::IsGameEnabled( const Game *pGame ) const
|
||||
{
|
||||
CStringArray asNoteSkins;
|
||||
vector<CString> asNoteSkins;
|
||||
NOTESKIN->GetNoteSkinNames( pGame, asNoteSkins, false ); /* don't omit default */
|
||||
return asNoteSkins.size() > 0;
|
||||
}
|
||||
|
||||
@@ -261,7 +261,7 @@ static void DoPlayOnceFromDir( CString sPath )
|
||||
if( sPath.Right(1) != "/" )
|
||||
sPath += "/";
|
||||
|
||||
CStringArray arraySoundFiles;
|
||||
vector<CString> arraySoundFiles;
|
||||
GetDirListing( sPath + "*.mp3", arraySoundFiles );
|
||||
GetDirListing( sPath + "*.wav", arraySoundFiles );
|
||||
GetDirListing( sPath + "*.ogg", arraySoundFiles );
|
||||
|
||||
@@ -44,7 +44,7 @@ bool GroupList::ItemIsOnScreen( int n ) const
|
||||
return offset >= 0 && offset < MAX_GROUPS_ONSCREEN;
|
||||
}
|
||||
|
||||
void GroupList::Load( const CStringArray& asGroupNames )
|
||||
void GroupList::Load( const vector<CString>& asGroupNames )
|
||||
{
|
||||
m_asLabels = asGroupNames;
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ public:
|
||||
CString GetSelectionName() const { return m_asLabels[m_iSelection]; }
|
||||
void Up();
|
||||
void Down();
|
||||
void Load( const CStringArray& asGroupNames );
|
||||
void Load( const vector<CString>& asGroupNames );
|
||||
void TweenOffScreen();
|
||||
void TweenOnScreen();
|
||||
};
|
||||
|
||||
@@ -35,7 +35,7 @@ void HelpDisplay::SetName( const CString &sName )
|
||||
BitmapText::SetName( sName );
|
||||
}
|
||||
|
||||
void HelpDisplay::SetTips( const CStringArray &arrayTips, const CStringArray &arrayTipsAlt )
|
||||
void HelpDisplay::SetTips( const vector<CString> &arrayTips, const vector<CString> &arrayTipsAlt )
|
||||
{
|
||||
ASSERT( arrayTips.size() == arrayTipsAlt.size() );
|
||||
|
||||
@@ -117,7 +117,7 @@ public:
|
||||
|
||||
static int gettips( T* p, lua_State *L )
|
||||
{
|
||||
CStringArray arrayTips, arrayTipsAlt;
|
||||
vector<CString> arrayTips, arrayTipsAlt;
|
||||
p->GetTips( arrayTips, arrayTipsAlt );
|
||||
|
||||
LuaHelpers::CreateTableFromArray( arrayTips, L );
|
||||
|
||||
@@ -18,9 +18,9 @@ public:
|
||||
void LoadFromNode( const CString& sDir, const XNode* pNode );
|
||||
virtual Actor *Copy() const;
|
||||
|
||||
void SetTips( const CStringArray &arrayTips ) { SetTips( arrayTips, arrayTips ); }
|
||||
void SetTips( const CStringArray &arrayTips, const CStringArray &arrayTipsAlt );
|
||||
void GetTips( CStringArray &arrayTipsOut, CStringArray &arrayTipsAltOut ) const { arrayTipsOut = m_arrayTips; arrayTipsAltOut = m_arrayTipsAlt; }
|
||||
void SetTips( const vector<CString> &arrayTips ) { SetTips( arrayTips, arrayTips ); }
|
||||
void SetTips( const vector<CString> &arrayTips, const vector<CString> &arrayTipsAlt );
|
||||
void GetTips( vector<CString> &arrayTipsOut, vector<CString> &arrayTipsAltOut ) const { arrayTipsOut = m_arrayTips; arrayTipsAltOut = m_arrayTipsAlt; }
|
||||
|
||||
virtual void Update( float fDeltaTime );
|
||||
virtual void SetName( const CString &sName );
|
||||
@@ -31,7 +31,7 @@ public:
|
||||
protected:
|
||||
ThemeMetric<float> TIP_SHOW_TIME;
|
||||
|
||||
CStringArray m_arrayTips, m_arrayTipsAlt;
|
||||
vector<CString> m_arrayTips, m_arrayTipsAlt;
|
||||
int m_iCurTipIndex;
|
||||
|
||||
float m_fSecsUntilSwitch;
|
||||
|
||||
@@ -462,7 +462,7 @@ void InputMapper::ReadMappingsFromDisk()
|
||||
GameInput GameI;
|
||||
GameI.fromString( pGame, name );
|
||||
|
||||
CStringArray sDeviceInputStrings;
|
||||
vector<CString> sDeviceInputStrings;
|
||||
split( value, ",", sDeviceInputStrings, false );
|
||||
|
||||
for( unsigned i=0; i<sDeviceInputStrings.size() && i<unsigned(NUM_GAME_TO_DEVICE_SLOTS); i++ )
|
||||
|
||||
@@ -215,7 +215,7 @@ and once only.
|
||||
void MusicBannerWheel::LoadSongData()
|
||||
{
|
||||
Song* pSong = NULL;
|
||||
CStringArray asGraphicPaths;
|
||||
vector<CString> asGraphicPaths;
|
||||
|
||||
if(MAXSONGSINBUFFER >= arraySongs.size() && SingleLoad != 1) // less than the MAXSONGSINBUFFER means we can get away with loading the lot in one go
|
||||
{
|
||||
|
||||
@@ -68,7 +68,7 @@ void NoteDataUtil::LoadFromSMNoteDataString( NoteData &out, CString sSMNoteData
|
||||
sSMNoteData.erase( iIndexCommentStart, iIndexCommentEnd-iIndexCommentStart );
|
||||
}
|
||||
|
||||
CStringArray asMeasures;
|
||||
vector<CString> asMeasures;
|
||||
split( sSMNoteData, ",", asMeasures, true ); // ignore empty is important
|
||||
for( unsigned m=0; m<asMeasures.size(); m++ ) // foreach measure
|
||||
{
|
||||
@@ -76,7 +76,7 @@ void NoteDataUtil::LoadFromSMNoteDataString( NoteData &out, CString sSMNoteData
|
||||
TrimLeft(sMeasureString);
|
||||
TrimRight(sMeasureString);
|
||||
|
||||
CStringArray asMeasureLines;
|
||||
vector<CString> asMeasureLines;
|
||||
split( sMeasureString, "\n", asMeasureLines, true ); // ignore empty is important
|
||||
|
||||
for( unsigned l=0; l<asMeasureLines.size(); l++ )
|
||||
|
||||
@@ -40,7 +40,7 @@ void NoteSkinManager::RefreshNoteSkinData( const Game* pGame )
|
||||
g_PathCache.clear();
|
||||
|
||||
CString sBaseSkinFolder = NOTESKINS_DIR + pGame->m_szName + "/";
|
||||
CStringArray asNoteSkinNames;
|
||||
vector<CString> asNoteSkinNames;
|
||||
GetDirListing( sBaseSkinFolder + "*", asNoteSkinNames, true );
|
||||
|
||||
StripCvs( asNoteSkinNames );
|
||||
@@ -96,12 +96,12 @@ void NoteSkinManager::LoadNoteSkinDataRecursive( const CString &sNoteSkinName, N
|
||||
}
|
||||
|
||||
|
||||
void NoteSkinManager::GetNoteSkinNames( CStringArray &AddTo )
|
||||
void NoteSkinManager::GetNoteSkinNames( vector<CString> &AddTo )
|
||||
{
|
||||
GetNoteSkinNames( GAMESTATE->m_pCurGame, AddTo );
|
||||
}
|
||||
|
||||
void NoteSkinManager::GetNoteSkinNames( const Game* pGame, CStringArray &AddTo, bool bFilterDefault )
|
||||
void NoteSkinManager::GetNoteSkinNames( const Game* pGame, vector<CString> &AddTo, bool bFilterDefault )
|
||||
{
|
||||
if( pGame == m_pCurGame )
|
||||
{
|
||||
@@ -121,7 +121,7 @@ void NoteSkinManager::GetNoteSkinNames( const Game* pGame, CStringArray &AddTo,
|
||||
|
||||
/* Move "default" to the front if it exists. */
|
||||
{
|
||||
CStringArray::iterator iter = find( AddTo.begin(), AddTo.end(), "default" );
|
||||
vector<CString>::iterator iter = find( AddTo.begin(), AddTo.end(), "default" );
|
||||
if( iter != AddTo.end() )
|
||||
{
|
||||
AddTo.erase( iter );
|
||||
@@ -134,7 +134,7 @@ void NoteSkinManager::GetNoteSkinNames( const Game* pGame, CStringArray &AddTo,
|
||||
|
||||
bool NoteSkinManager::DoesNoteSkinExist( const CString &sSkinName )
|
||||
{
|
||||
CStringArray asSkinNames;
|
||||
vector<CString> asSkinNames;
|
||||
GetNoteSkinNames( asSkinNames );
|
||||
for( unsigned i=0; i<asSkinNames.size(); i++ )
|
||||
if( 0==stricmp(sSkinName, asSkinNames[i]) )
|
||||
@@ -278,7 +278,7 @@ try_again:
|
||||
|
||||
CString NoteSkinManager::GetPathFromDirAndFile( const CString &sDir, const CString &sFileName )
|
||||
{
|
||||
CStringArray matches; // fill this with the possible files
|
||||
vector<CString> matches; // fill this with the possible files
|
||||
|
||||
GetDirListing( sDir+sFileName+"*", matches, false, true );
|
||||
|
||||
|
||||
@@ -19,8 +19,8 @@ public:
|
||||
~NoteSkinManager();
|
||||
|
||||
void RefreshNoteSkinData( const Game* game );
|
||||
void GetNoteSkinNames( const Game* game, CStringArray &AddTo, bool bFilterDefault=true );
|
||||
void GetNoteSkinNames( CStringArray &AddTo ); // looks up current const Game* in GAMESTATE
|
||||
void GetNoteSkinNames( const Game* game, vector<CString> &AddTo, bool bFilterDefault=true );
|
||||
void GetNoteSkinNames( vector<CString> &AddTo ); // looks up current const Game* in GAMESTATE
|
||||
bool DoesNoteSkinExist( const CString &sNoteSkin ); // looks up current const Game* in GAMESTATE
|
||||
|
||||
void SetCurrentNoteSkin( const CString &sNoteSkin ) { m_sCurrentNoteSkin = sNoteSkin; }
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
bool NotesLoader::Loadable( CString sPath )
|
||||
{
|
||||
CStringArray list;
|
||||
vector<CString> list;
|
||||
GetApplicableFiles( sPath, list );
|
||||
return !list.empty();
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ class Song;
|
||||
class NotesLoader
|
||||
{
|
||||
protected:
|
||||
virtual void GetApplicableFiles( CString sPath, CStringArray &out )=0;
|
||||
virtual void GetApplicableFiles( CString sPath, vector<CString> &out )=0;
|
||||
|
||||
set<istring> BlacklistedImages;
|
||||
|
||||
|
||||
@@ -512,7 +512,7 @@ bool BMSLoader::LoadFromBMSFile( const CString &sPath, const NameToData_t &mapNa
|
||||
return true;
|
||||
}
|
||||
|
||||
void BMSLoader::GetApplicableFiles( CString sPath, CStringArray &out )
|
||||
void BMSLoader::GetApplicableFiles( CString sPath, vector<CString> &out )
|
||||
{
|
||||
GetDirListing( sPath + CString("*.bms"), out );
|
||||
GetDirListing( sPath + CString("*.bme"), out );
|
||||
@@ -852,7 +852,7 @@ bool BMSLoader::LoadFromDir( CString sDir, Song &out )
|
||||
ASSERT( out.m_vsKeysoundFile.empty() );
|
||||
|
||||
m_sDir = sDir;
|
||||
CStringArray arrayBMSFileNames;
|
||||
vector<CString> arrayBMSFileNames;
|
||||
GetApplicableFiles( sDir, arrayBMSFileNames );
|
||||
|
||||
/* We should have at least one; if we had none, we shouldn't have been
|
||||
|
||||
@@ -32,7 +32,7 @@ class BMSLoader: public NotesLoader
|
||||
map<CString,int> m_mapWavIdToKeysoundIndex;
|
||||
|
||||
public:
|
||||
void GetApplicableFiles( CString sPath, CStringArray &out );
|
||||
void GetApplicableFiles( CString sPath, vector<CString> &out );
|
||||
bool LoadFromDir( CString sDir, Song &out );
|
||||
};
|
||||
|
||||
|
||||
@@ -442,12 +442,12 @@ bool DWILoader::LoadFromDWIFile( CString sPath, Song &out )
|
||||
|
||||
else if( 0==stricmp(sValueName,"FREEZE") )
|
||||
{
|
||||
CStringArray arrayFreezeExpressions;
|
||||
vector<CString> arrayFreezeExpressions;
|
||||
split( sParams[1], ",", arrayFreezeExpressions );
|
||||
|
||||
for( unsigned f=0; f<arrayFreezeExpressions.size(); f++ )
|
||||
{
|
||||
CStringArray arrayFreezeValues;
|
||||
vector<CString> arrayFreezeValues;
|
||||
split( arrayFreezeExpressions[f], "=", arrayFreezeValues );
|
||||
if( arrayFreezeValues.size() != 2 )
|
||||
{
|
||||
@@ -464,12 +464,12 @@ bool DWILoader::LoadFromDWIFile( CString sPath, Song &out )
|
||||
|
||||
else if( 0==stricmp(sValueName,"CHANGEBPM") || 0==stricmp(sValueName,"BPMCHANGE") )
|
||||
{
|
||||
CStringArray arrayBPMChangeExpressions;
|
||||
vector<CString> arrayBPMChangeExpressions;
|
||||
split( sParams[1], ",", arrayBPMChangeExpressions );
|
||||
|
||||
for( unsigned b=0; b<arrayBPMChangeExpressions.size(); b++ )
|
||||
{
|
||||
CStringArray arrayBPMChangeValues;
|
||||
vector<CString> arrayBPMChangeValues;
|
||||
split( arrayBPMChangeExpressions[b], "=", arrayBPMChangeValues );
|
||||
if( arrayBPMChangeValues.size() != 2 )
|
||||
{
|
||||
@@ -536,14 +536,14 @@ bool DWILoader::LoadFromDWIFile( CString sPath, Song &out )
|
||||
return true;
|
||||
}
|
||||
|
||||
void DWILoader::GetApplicableFiles( CString sPath, CStringArray &out )
|
||||
void DWILoader::GetApplicableFiles( CString sPath, vector<CString> &out )
|
||||
{
|
||||
GetDirListing( sPath + CString("*.dwi"), out );
|
||||
}
|
||||
|
||||
bool DWILoader::LoadFromDir( CString sPath, Song &out )
|
||||
{
|
||||
CStringArray aFileNames;
|
||||
vector<CString> aFileNames;
|
||||
GetApplicableFiles( sPath, aFileNames );
|
||||
|
||||
if( aFileNames.size() > 1 )
|
||||
|
||||
@@ -26,7 +26,7 @@ class DWILoader: public NotesLoader
|
||||
CString m_sLoadingFile;
|
||||
|
||||
public:
|
||||
void GetApplicableFiles( CString sPath, CStringArray &out );
|
||||
void GetApplicableFiles( CString sPath, vector<CString> &out );
|
||||
bool Loadable( CString sPath );
|
||||
bool LoadFromDir( CString sPath, Song &out );
|
||||
};
|
||||
|
||||
@@ -68,7 +68,7 @@ bool KSFLoader::LoadFromKSFFile( const CString &sPath, Steps &out, const Song &s
|
||||
RageException::Throw( "Error opening file '%s'.", sPath.c_str() );
|
||||
|
||||
int iTickCount = -1; // this is the value we read for TICKCOUNT
|
||||
CStringArray asRows;
|
||||
vector<CString> asRows;
|
||||
|
||||
for( unsigned i=0; i<msd.GetNumValues(); i++ )
|
||||
{
|
||||
@@ -220,7 +220,7 @@ bool KSFLoader::LoadFromKSFFile( const CString &sPath, Steps &out, const Song &s
|
||||
return true;
|
||||
}
|
||||
|
||||
void KSFLoader::GetApplicableFiles( CString sPath, CStringArray &out )
|
||||
void KSFLoader::GetApplicableFiles( CString sPath, vector<CString> &out )
|
||||
{
|
||||
GetDirListing( sPath + CString("*.ksf"), out );
|
||||
}
|
||||
@@ -229,7 +229,7 @@ void KSFLoader::LoadTags( const CString &str, Song &out )
|
||||
{
|
||||
/* str is either a #TITLE or a directory component. Fill in missing information.
|
||||
* str is either "title", "artist - title", or "artist - title - difficulty". */
|
||||
CStringArray asBits;
|
||||
vector<CString> asBits;
|
||||
split( str, " - ", asBits, false );
|
||||
/* Ignore the difficulty, since we get that elsewhere. */
|
||||
if( asBits.size() == 3 &&
|
||||
@@ -323,7 +323,7 @@ bool KSFLoader::LoadGlobalData( const CString &sPath, Song &out )
|
||||
|
||||
/* Try to fill in missing bits of information from the pathname. */
|
||||
{
|
||||
CStringArray asBits;
|
||||
vector<CString> asBits;
|
||||
split( sPath, "/", asBits, true);
|
||||
|
||||
ASSERT(asBits.size() > 1);
|
||||
@@ -331,7 +331,7 @@ bool KSFLoader::LoadGlobalData( const CString &sPath, Song &out )
|
||||
}
|
||||
|
||||
// search for music with song in the file name
|
||||
CStringArray arrayPossibleMusic;
|
||||
vector<CString> arrayPossibleMusic;
|
||||
GetDirListing( out.GetSongDir() + CString("song.mp3"), arrayPossibleMusic );
|
||||
GetDirListing( out.GetSongDir() + CString("song.ogg"), arrayPossibleMusic );
|
||||
GetDirListing( out.GetSongDir() + CString("song.wav"), arrayPossibleMusic );
|
||||
@@ -346,7 +346,7 @@ bool KSFLoader::LoadFromDir( CString sDir, Song &out )
|
||||
{
|
||||
LOG->Trace( "Song::LoadFromKSFDir(%s)", sDir.c_str() );
|
||||
|
||||
CStringArray arrayKSFFileNames;
|
||||
vector<CString> arrayKSFFileNames;
|
||||
GetDirListing( sDir + CString("*.ksf"), arrayKSFFileNames );
|
||||
|
||||
/* We shouldn't have been called to begin with if there were no KSFs. */
|
||||
|
||||
@@ -17,7 +17,7 @@ class KSFLoader: public NotesLoader
|
||||
void LoadTags( const CString &str, Song &out );
|
||||
|
||||
public:
|
||||
void GetApplicableFiles( CString sPath, CStringArray &out );
|
||||
void GetApplicableFiles( CString sPath, vector<CString> &out );
|
||||
bool LoadFromDir( CString sDir, Song &out );
|
||||
|
||||
};
|
||||
|
||||
@@ -47,7 +47,7 @@ void SMLoader::LoadFromSMTokens(
|
||||
out.SetDifficulty( DIFFICULTY_CHALLENGE );
|
||||
|
||||
out.SetMeter(atoi(sMeter));
|
||||
CStringArray saValues;
|
||||
vector<CString> saValues;
|
||||
split( sRadarValues, ",", saValues, true );
|
||||
if( saValues.size() == NUM_RADAR_CATEGORIES )
|
||||
{
|
||||
@@ -62,7 +62,7 @@ void SMLoader::LoadFromSMTokens(
|
||||
out.TidyUpData();
|
||||
}
|
||||
|
||||
void SMLoader::GetApplicableFiles( CString sPath, CStringArray &out )
|
||||
void SMLoader::GetApplicableFiles( CString sPath, vector<CString> &out )
|
||||
{
|
||||
GetDirListing( sPath + CString("*.sm"), out );
|
||||
}
|
||||
@@ -99,12 +99,12 @@ void SMLoader::LoadTimingFromSMFile( const MsdFile &msd, TimingData &out )
|
||||
}
|
||||
else if( sValueName=="STOPS" || sValueName=="FREEZES" )
|
||||
{
|
||||
CStringArray arrayFreezeExpressions;
|
||||
vector<CString> arrayFreezeExpressions;
|
||||
split( sParams[1], ",", arrayFreezeExpressions );
|
||||
|
||||
for( unsigned f=0; f<arrayFreezeExpressions.size(); f++ )
|
||||
{
|
||||
CStringArray arrayFreezeValues;
|
||||
vector<CString> arrayFreezeValues;
|
||||
split( arrayFreezeExpressions[f], "=", arrayFreezeValues );
|
||||
/* XXX: Once we have a way to display warnings that the user actually
|
||||
* cares about (unlike most warnings), this should be one of them. */
|
||||
@@ -130,12 +130,12 @@ void SMLoader::LoadTimingFromSMFile( const MsdFile &msd, TimingData &out )
|
||||
|
||||
else if( sValueName=="BPMS" )
|
||||
{
|
||||
CStringArray arrayBPMChangeExpressions;
|
||||
vector<CString> arrayBPMChangeExpressions;
|
||||
split( sParams[1], ",", arrayBPMChangeExpressions );
|
||||
|
||||
for( unsigned b=0; b<arrayBPMChangeExpressions.size(); b++ )
|
||||
{
|
||||
CStringArray arrayBPMChangeValues;
|
||||
vector<CString> arrayBPMChangeValues;
|
||||
split( arrayBPMChangeExpressions[b], "=", arrayBPMChangeValues );
|
||||
/* XXX: Once we have a way to display warnings that the user actually
|
||||
* cares about (unlike most warnings), this should be one of them. */
|
||||
@@ -161,7 +161,7 @@ void SMLoader::LoadTimingFromSMFile( const MsdFile &msd, TimingData &out )
|
||||
|
||||
bool LoadFromBGChangesString( BackgroundChange &change, const CString &sBGChangeExpression )
|
||||
{
|
||||
CStringArray aBGChangeValues;
|
||||
vector<CString> aBGChangeValues;
|
||||
split( sBGChangeExpression, "=", aBGChangeValues, false );
|
||||
|
||||
aBGChangeValues.resize( min((int)aBGChangeValues.size(),11) );
|
||||
@@ -377,7 +377,7 @@ bool SMLoader::LoadFromSMFile( CString sPath, Song &out )
|
||||
}
|
||||
else
|
||||
{
|
||||
CStringArray aBGChangeExpressions;
|
||||
vector<CString> aBGChangeExpressions;
|
||||
split( sParams[1], ",", aBGChangeExpressions );
|
||||
|
||||
for( unsigned b=0; b<aBGChangeExpressions.size(); b++ )
|
||||
@@ -391,7 +391,7 @@ bool SMLoader::LoadFromSMFile( CString sPath, Song &out )
|
||||
|
||||
else if( sValueName=="FGCHANGES" )
|
||||
{
|
||||
CStringArray aFGChangeExpressions;
|
||||
vector<CString> aFGChangeExpressions;
|
||||
split( sParams[1], ",", aFGChangeExpressions );
|
||||
|
||||
for( unsigned b=0; b<aFGChangeExpressions.size(); b++ )
|
||||
@@ -404,7 +404,7 @@ bool SMLoader::LoadFromSMFile( CString sPath, Song &out )
|
||||
|
||||
else if( sValueName=="KEYSOUNDS" )
|
||||
{
|
||||
CStringArray aKeysoundFiles;
|
||||
vector<CString> aKeysoundFiles;
|
||||
split( sParams[1], ",", aKeysoundFiles );
|
||||
|
||||
for( unsigned k=0; k<aKeysoundFiles.size(); k++ )
|
||||
@@ -446,7 +446,7 @@ bool SMLoader::LoadFromSMFile( CString sPath, Song &out )
|
||||
|
||||
bool SMLoader::LoadFromDir( CString sPath, Song &out )
|
||||
{
|
||||
CStringArray aFileNames;
|
||||
vector<CString> aFileNames;
|
||||
GetApplicableFiles( sPath, aFileNames );
|
||||
|
||||
if( aFileNames.size() > 1 )
|
||||
|
||||
@@ -33,7 +33,7 @@ public:
|
||||
return LoadFromSMFile( sPath, out );
|
||||
}
|
||||
|
||||
void GetApplicableFiles( CString sPath, CStringArray &out );
|
||||
void GetApplicableFiles( CString sPath, vector<CString> &out );
|
||||
bool LoadFromDir( CString sPath, Song &out );
|
||||
void TidyUpData( Song &song, bool cache );
|
||||
static bool LoadTimingFromFile( const CString &fn, TimingData &out );
|
||||
|
||||
@@ -170,7 +170,7 @@ CString NotesWriterSM::GetSMNotesTag( const Song &song, const Steps &in, bool bS
|
||||
lines.push_back( ssprintf( " %d:", in.GetMeter() ) );
|
||||
|
||||
int MaxRadar = bSavingCache? NUM_RADAR_CATEGORIES:5;
|
||||
CStringArray asRadarValues;
|
||||
vector<CString> asRadarValues;
|
||||
for( int r=0; r < MaxRadar; r++ )
|
||||
asRadarValues.push_back( ssprintf("%.3f", in.GetRadarValues()[r]) );
|
||||
/* Don't append a newline here; it's added in NoteDataUtil::GetSMNoteDataString.
|
||||
|
||||
@@ -103,7 +103,7 @@ void OptionIconRow::SetFromGameState( PlayerNumber pn )
|
||||
// init
|
||||
|
||||
CString sOptions = GAMESTATE->m_pPlayerState[pn]->m_PlayerOptions.GetString();
|
||||
CStringArray asOptions;
|
||||
vector<CString> asOptions;
|
||||
split( sOptions, ", ", asOptions, true );
|
||||
|
||||
|
||||
|
||||
@@ -277,7 +277,7 @@ public:
|
||||
defOut.m_bOneChoiceForAllPlayers = false;
|
||||
defOut.m_bAllowThemeItems = false; // we theme the text ourself
|
||||
|
||||
CStringArray arraySkinNames;
|
||||
vector<CString> arraySkinNames;
|
||||
NOTESKIN->GetNoteSkinNames( arraySkinNames );
|
||||
for( unsigned skin=0; skin<arraySkinNames.size(); skin++ )
|
||||
{
|
||||
|
||||
@@ -205,7 +205,7 @@ void PlayerOptions::FromString( CString sOptions, bool bWarnOnInvalid )
|
||||
ASSERT( NOTESKIN );
|
||||
// Init();
|
||||
sOptions.MakeLower();
|
||||
CStringArray asBits;
|
||||
vector<CString> asBits;
|
||||
split( sOptions, ",", asBits, true );
|
||||
|
||||
FOREACH( CString, asBits, bit )
|
||||
@@ -221,7 +221,7 @@ void PlayerOptions::FromString( CString sOptions, bool bWarnOnInvalid )
|
||||
|
||||
float level = 1;
|
||||
float speed = 1;
|
||||
CStringArray asParts;
|
||||
vector<CString> asParts;
|
||||
split( sBit, " ", asParts, true );
|
||||
|
||||
FOREACH_CONST( CString, asParts, s )
|
||||
@@ -624,7 +624,7 @@ void PlayerOptions::GetThemedMods( vector<CString> &AddTo ) const
|
||||
|
||||
ASSERT( !sOneMod.empty() );
|
||||
|
||||
CStringArray asTokens;
|
||||
vector<CString> asTokens;
|
||||
split( sOneMod, " ", asTokens );
|
||||
|
||||
if( asTokens.empty() )
|
||||
|
||||
@@ -66,7 +66,7 @@ CString RadarValues::ToString( int iMaxValues ) const
|
||||
iMaxValues = NUM_RADAR_CATEGORIES;
|
||||
iMaxValues = min( iMaxValues, (int)NUM_RADAR_CATEGORIES );
|
||||
|
||||
CStringArray asRadarValues;
|
||||
vector<CString> asRadarValues;
|
||||
for( int r=0; r < iMaxValues; r++ )
|
||||
asRadarValues.push_back( ssprintf("%.3f", m_Values.f[r]) );
|
||||
|
||||
@@ -75,7 +75,7 @@ CString RadarValues::ToString( int iMaxValues ) const
|
||||
|
||||
void RadarValues::FromString( CString sRadarValues )
|
||||
{
|
||||
CStringArray saValues;
|
||||
vector<CString> saValues;
|
||||
split( sRadarValues, ",", saValues, true );
|
||||
|
||||
if( saValues.size() != NUM_RADAR_CATEGORIES )
|
||||
|
||||
@@ -42,7 +42,7 @@ int RageFileDriver::GetPathValue( const CString &path )
|
||||
return 0;
|
||||
}
|
||||
|
||||
void RageFileDriver::GetDirListing( const CString &sPath, CStringArray &AddTo, bool bOnlyDirs, bool bReturnPathToo )
|
||||
void RageFileDriver::GetDirListing( const CString &sPath, vector<CString> &AddTo, bool bOnlyDirs, bool bReturnPathToo )
|
||||
{
|
||||
FDB->GetDirListing( sPath, AddTo, bOnlyDirs, bReturnPathToo );
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ public:
|
||||
RageFileDriver( FilenameDB *db ) { FDB = db; }
|
||||
virtual ~RageFileDriver();
|
||||
virtual RageFileBasic *Open( const CString &path, int mode, int &err ) = 0;
|
||||
virtual void GetDirListing( const CString &sPath, CStringArray &AddTo, bool bOnlyDirs, bool bReturnPathToo );
|
||||
virtual void GetDirListing( const CString &sPath, vector<CString> &AddTo, bool bOnlyDirs, bool bReturnPathToo );
|
||||
virtual RageFileManager::FileType GetFileType( const CString &sPath );
|
||||
virtual int GetFileSizeInBytes( const CString &sFilePath );
|
||||
virtual int GetFileHash( const CString &sPath );
|
||||
|
||||
@@ -119,7 +119,7 @@ bool WinMoveFile( CString sOldPath, CString sNewPath )
|
||||
bool CreateDirectories( CString Path )
|
||||
{
|
||||
/* XXX: handle "//foo/bar" paths in Windows */
|
||||
CStringArray parts;
|
||||
vector<CString> parts;
|
||||
CString curpath;
|
||||
|
||||
/* If Path is absolute, add the initial slash ("ignore empty" will remove it). */
|
||||
|
||||
@@ -294,7 +294,7 @@ static void NormalizePath( CString &sPath )
|
||||
|
||||
bool ilt( const CString &a, const CString &b ) { return a.CompareNoCase(b) < 0; }
|
||||
bool ieq( const CString &a, const CString &b ) { return a.CompareNoCase(b) == 0; }
|
||||
void RageFileManager::GetDirListing( CString sPath, CStringArray &AddTo, bool bOnlyDirs, bool bReturnPathToo )
|
||||
void RageFileManager::GetDirListing( CString sPath, vector<CString> &AddTo, bool bOnlyDirs, bool bReturnPathToo )
|
||||
{
|
||||
NormalizePath( sPath );
|
||||
|
||||
@@ -334,7 +334,7 @@ void RageFileManager::GetDirListing( CString sPath, CStringArray &AddTo, bool bO
|
||||
{
|
||||
/* More than one driver returned files. Remove duplicates (case-insensitively). */
|
||||
sort( AddTo.begin()+iOldSize, AddTo.end(), ilt );
|
||||
CStringArray::iterator it = unique( AddTo.begin()+iOldSize, AddTo.end(), ieq );
|
||||
vector<CString>::iterator it = unique( AddTo.begin()+iOldSize, AddTo.end(), ieq );
|
||||
AddTo.erase( it, AddTo.end() );
|
||||
}
|
||||
}
|
||||
@@ -827,12 +827,12 @@ unsigned GetFileSizeInBytes( const CString &sPath )
|
||||
return FILEMAN->GetFileSizeInBytes( sPath );
|
||||
}
|
||||
|
||||
void GetDirListing( const CString &sPath, CStringArray &AddTo, bool bOnlyDirs, bool bReturnPathToo )
|
||||
void GetDirListing( const CString &sPath, vector<CString> &AddTo, bool bOnlyDirs, bool bReturnPathToo )
|
||||
{
|
||||
FILEMAN->GetDirListing( sPath, AddTo, bOnlyDirs, bReturnPathToo );
|
||||
}
|
||||
|
||||
void GetDirListingRecursive( const CString &sDir, const CString &sMatch, CStringArray &AddTo )
|
||||
void GetDirListingRecursive( const CString &sDir, const CString &sMatch, vector<CString> &AddTo )
|
||||
{
|
||||
ASSERT( sDir.Right(1) == "/" );
|
||||
GetDirListing( sDir+sMatch, AddTo, false, true );
|
||||
@@ -883,7 +883,7 @@ unsigned int GetHashForDirectory( const CString &sDir )
|
||||
|
||||
hash += GetHashForString( sDir );
|
||||
|
||||
CStringArray arrayFiles;
|
||||
vector<CString> arrayFiles;
|
||||
GetDirListing( sDir+"*", arrayFiles, false );
|
||||
for( unsigned i=0; i<arrayFiles.size(); i++ )
|
||||
{
|
||||
|
||||
@@ -19,7 +19,7 @@ public:
|
||||
~RageFileManager();
|
||||
void MountInitialFilesystems();
|
||||
|
||||
void GetDirListing( CString sPath, CStringArray &AddTo, bool bOnlyDirs, bool bReturnPathToo );
|
||||
void GetDirListing( CString sPath, vector<CString> &AddTo, bool bOnlyDirs, bool bReturnPathToo );
|
||||
bool Move( CString sOldPath, CString sNewPath );
|
||||
bool Remove( CString sPath );
|
||||
void CreateDir( CString sDir );
|
||||
|
||||
@@ -52,7 +52,7 @@ void RageTexture::CreateFrameRects()
|
||||
void RageTexture::GetFrameDimensionsFromFileName( CString sPath, int* piFramesWide, int* piFramesHigh )
|
||||
{
|
||||
static Regex match( " ([0-9]+)x([0-9]+)([\\. ]|$)" );
|
||||
CStringArray asMatch;
|
||||
vector<CString> asMatch;
|
||||
if( !match.Compare(sPath, asMatch) )
|
||||
{
|
||||
*piFramesWide = *piFramesHigh = 1;
|
||||
|
||||
@@ -108,7 +108,7 @@ bool IsHexVal( const CString &s )
|
||||
|
||||
float HHMMSSToSeconds( const CString &sHHMMSS )
|
||||
{
|
||||
CStringArray arrayBits;
|
||||
vector<CString> arrayBits;
|
||||
split( sHHMMSS, ":", arrayBits, false );
|
||||
|
||||
while( arrayBits.size() < 3 )
|
||||
@@ -457,7 +457,7 @@ CString GetLanguageNameFromISO639Code( CString sName )
|
||||
return "";
|
||||
}
|
||||
|
||||
CString join( const CString &Deliminator, const CStringArray& Source)
|
||||
CString join( const CString &Deliminator, const vector<CString>& Source)
|
||||
{
|
||||
if( Source.empty() )
|
||||
return CString();
|
||||
@@ -473,7 +473,7 @@ CString join( const CString &Deliminator, const CStringArray& Source)
|
||||
return csTmp;
|
||||
}
|
||||
|
||||
CString join( const CString &Delimitor, CStringArray::const_iterator begin, CStringArray::const_iterator end )
|
||||
CString join( const CString &Delimitor, vector<CString>::const_iterator begin, vector<CString>::const_iterator end )
|
||||
{
|
||||
if( begin == end )
|
||||
return CString();
|
||||
@@ -540,7 +540,7 @@ void do_split( const S &Source, const C Delimitor, vector<S> &AddIt, const bool
|
||||
}
|
||||
|
||||
|
||||
void split( const CString &Source, const CString &Delimitor, CStringArray &AddIt, const bool bIgnoreEmpty )
|
||||
void split( const CString &Source, const CString &Delimitor, vector<CString> &AddIt, const bool bIgnoreEmpty )
|
||||
{
|
||||
if( Delimitor.size() == 1 )
|
||||
do_split( Source, Delimitor[0], AddIt, bIgnoreEmpty );
|
||||
@@ -634,7 +634,7 @@ void splitpath( const CString &Path, CString& Dir, CString& Filename, CString& E
|
||||
{
|
||||
Dir = Filename = Ext = "";
|
||||
|
||||
CStringArray mat;
|
||||
vector<CString> mat;
|
||||
|
||||
/* One level of escapes for the regex, one for C. Ew.
|
||||
* This is really:
|
||||
@@ -802,7 +802,7 @@ bool DirectoryIsEmpty( const CString &dir )
|
||||
if(!DoesFileExist(dir))
|
||||
return true;
|
||||
|
||||
CStringArray asFileNames;
|
||||
vector<CString> asFileNames;
|
||||
GetDirListing( dir, asFileNames );
|
||||
return asFileNames.empty();
|
||||
}
|
||||
@@ -817,7 +817,7 @@ bool CompareCStringsDesc(const CString &str1, const CString &str2)
|
||||
return str1.CompareNoCase( str2 ) > 0;
|
||||
}
|
||||
|
||||
void SortCStringArray( CStringArray &arrayCStrings, const bool bSortAscending )
|
||||
void SortCStringArray( vector<CString> &arrayCStrings, const bool bSortAscending )
|
||||
{
|
||||
sort( arrayCStrings.begin(), arrayCStrings.end(),
|
||||
bSortAscending?CompareCStringsAsc:CompareCStringsDesc);
|
||||
|
||||
@@ -280,8 +280,8 @@ wstring CStringToWstring( const CString &sString );
|
||||
|
||||
CString GetLanguageNameFromISO639Code( CString sName );
|
||||
|
||||
// Splits a CString into an CStringArray according the Delimitor.
|
||||
void split( const CString &sSource, const CString &sDelimitor, CStringArray& asAddIt, const bool bIgnoreEmpty = true );
|
||||
// Splits a CString into an vector<CString> according the Delimitor.
|
||||
void split( const CString &sSource, const CString &sDelimitor, vector<CString>& asAddIt, const bool bIgnoreEmpty = true );
|
||||
void split( const wstring &sSource, const wstring &sDelimitor, vector<wstring> &asAddIt, const bool bIgnoreEmpty = true );
|
||||
|
||||
/* In-place split. */
|
||||
@@ -292,9 +292,9 @@ void split( const wstring &sSource, const wstring &sDelimitor, int &iBegin, int
|
||||
void split( const CString &sSource, const CString &sDelimitor, int &iBegin, int &iSize, int iLen, const bool bIgnoreEmpty ); /* no default to avoid ambiguity */
|
||||
void split( const wstring &sSource, const wstring &sDelimitor, int &iBegin, int &iSize, int iLen, const bool bIgnoreEmpty );
|
||||
|
||||
// Joins a CStringArray to create a CString according the Deliminator.
|
||||
CString join( const CString &sDelimitor, const CStringArray& sSource );
|
||||
CString join( const CString &sDelimitor, CStringArray::const_iterator begin, CStringArray::const_iterator end );
|
||||
// Joins a vector<CString> to create a CString according the Deliminator.
|
||||
CString join( const CString &sDelimitor, const vector<CString>& sSource );
|
||||
CString join( const CString &sDelimitor, vector<CString>::const_iterator begin, vector<CString>::const_iterator end );
|
||||
|
||||
CString GetCwd();
|
||||
|
||||
@@ -311,7 +311,7 @@ bool DirectoryIsEmpty( const CString &sPath );
|
||||
|
||||
bool CompareCStringsAsc( const CString &sStr1, const CString &sStr2 );
|
||||
bool CompareCStringsDesc( const CString &sStr1, const CString &sStr2 );
|
||||
void SortCStringArray( CStringArray &asAddTo, const bool bSortAscending = true );
|
||||
void SortCStringArray( vector<CString> &asAddTo, const bool bSortAscending = true );
|
||||
|
||||
/* Find the mean and standard deviation of all numbers in [start,end). */
|
||||
float calc_mean( const float *pStart, const float *pEnd );
|
||||
@@ -424,8 +424,8 @@ typedef basic_string<char,char_traits_char_nocase> istring;
|
||||
|
||||
/* Compatibility/convenience shortcuts. These are actually defined in RageFileManager.h, but
|
||||
* declared here since they're used in many places. */
|
||||
void GetDirListing( const CString &sPath, CStringArray &AddTo, bool bOnlyDirs=false, bool bReturnPathToo=false );
|
||||
void GetDirListingRecursive( const CString &sDir, const CString &sMatch, CStringArray &AddTo ); /* returns path too */
|
||||
void GetDirListing( const CString &sPath, vector<CString> &AddTo, bool bOnlyDirs=false, bool bReturnPathToo=false );
|
||||
void GetDirListingRecursive( const CString &sDir, const CString &sMatch, vector<CString> &AddTo ); /* returns path too */
|
||||
bool DeleteRecursive( const CString &sDir ); /* delete the dir and all files/subdirs inside it */
|
||||
bool DoesFileExist( const CString &sPath );
|
||||
bool IsAFile( const CString &sPath );
|
||||
|
||||
@@ -101,7 +101,7 @@ static bool AttemptJapaneseConversion( CString &txt ) { return false; }
|
||||
|
||||
bool ConvertString(CString &str, const CString &encodings)
|
||||
{
|
||||
CStringArray lst;
|
||||
vector<CString> lst;
|
||||
split(encodings, ",", lst);
|
||||
|
||||
for(unsigned i = 0; i < lst.size(); ++i)
|
||||
|
||||
@@ -386,8 +386,8 @@ void FilenameDB::AddFile( const CString &sPath_, int iSize, int iHash, void *pPr
|
||||
vector<CString> asParts;
|
||||
split( sPath, "/", asParts, false );
|
||||
|
||||
CStringArray::const_iterator begin = asParts.begin();
|
||||
CStringArray::const_iterator end = asParts.end();
|
||||
vector<CString>::const_iterator begin = asParts.begin();
|
||||
vector<CString>::const_iterator end = asParts.end();
|
||||
|
||||
bool IsDir = true;
|
||||
if( sPath[sPath.size()-1] != '/' )
|
||||
@@ -545,7 +545,7 @@ const void *FilenameDB::GetFilePriv( const CString &path )
|
||||
|
||||
|
||||
|
||||
void FilenameDB::GetDirListing( CString sPath, CStringArray &asAddTo, bool bOnlyDirs, bool bReturnPathToo )
|
||||
void FilenameDB::GetDirListing( CString sPath, vector<CString> &asAddTo, bool bOnlyDirs, bool bReturnPathToo )
|
||||
{
|
||||
// LOG->Trace( "GetDirListing( %s )", sPath.c_str() );
|
||||
|
||||
|
||||
@@ -103,7 +103,7 @@ public:
|
||||
RageFileManager::FileType GetFileType( const CString &sPath );
|
||||
int GetFileSize( const CString &sPath );
|
||||
int GetFileHash( const CString &sFilePath );
|
||||
void GetDirListing( CString sPath, CStringArray &asAddTo, bool bOnlyDirs, bool bReturnPathToo );
|
||||
void GetDirListing( CString sPath, vector<CString> &asAddTo, bool bOnlyDirs, bool bReturnPathToo );
|
||||
|
||||
void FlushDirCache();
|
||||
|
||||
|
||||
@@ -51,7 +51,7 @@ bool RandomSample::LoadSoundDir( CString sDir, int iMaxToLoad )
|
||||
sDir += "/";
|
||||
#endif
|
||||
|
||||
CStringArray arraySoundFiles;
|
||||
vector<CString> arraySoundFiles;
|
||||
GetDirListing( sDir + "*.mp3", arraySoundFiles );
|
||||
GetDirListing( sDir + "*.ogg", arraySoundFiles );
|
||||
GetDirListing( sDir + "*.wav", arraySoundFiles );
|
||||
|
||||
@@ -26,7 +26,7 @@ ScoreDisplayBattle::ScoreDisplayBattle()
|
||||
this->AddChild( &m_ItemIcon[i] );
|
||||
}
|
||||
|
||||
CStringArray asIconPaths;
|
||||
vector<CString> asIconPaths;
|
||||
GetDirListing( THEME->GetCurThemeDir()+"Graphic/ScoreDisplayBattle icon*", asIconPaths );
|
||||
for( unsigned j=0; j<asIconPaths.size(); j++ )
|
||||
m_TexturePreload.Load( asIconPaths[j] );
|
||||
|
||||
@@ -25,7 +25,7 @@ void ScreenCenterImage::Init()
|
||||
ScreenWithMenuElements::Init();
|
||||
|
||||
#if defined(XBOX)
|
||||
CStringArray strArray;
|
||||
vector<CString> strArray;
|
||||
CString text("Use the left analog stick to translate the screen and right right analog stick to scale");
|
||||
strArray.push_back(text);
|
||||
m_textHelp->SetTips(strArray);
|
||||
|
||||
@@ -36,7 +36,7 @@ protected:
|
||||
void UpdateOptions( PlayerNumber pn, int nosound );
|
||||
|
||||
CString sOptions;
|
||||
CStringArray asOptions;
|
||||
vector<CString> asOptions;
|
||||
|
||||
void TweenOffScreen();
|
||||
|
||||
|
||||
@@ -32,13 +32,13 @@ ScreenOptionsMaster::ScreenOptionsMaster( CString sClassName ):
|
||||
|
||||
void ScreenOptionsMaster::Init()
|
||||
{
|
||||
CStringArray asLineNames;
|
||||
vector<CString> asLineNames;
|
||||
split( LINE_NAMES, ",", asLineNames );
|
||||
if( asLineNames.empty() )
|
||||
RageException::Throw( "%s::LineNames is empty.", m_sName.c_str() );
|
||||
|
||||
|
||||
CStringArray Flags;
|
||||
vector<CString> Flags;
|
||||
split( OPTION_MENU_FLAGS, ";", Flags, true );
|
||||
InputMode im = INPUTMODE_INDIVIDUAL;
|
||||
bool Explanations = false;
|
||||
|
||||
@@ -24,7 +24,7 @@ static void GetPrefsDefaultModifiers( PlayerOptions &po, SongOptions &so )
|
||||
|
||||
static void SetPrefsDefaultModifiers( const PlayerOptions &po, const SongOptions &so )
|
||||
{
|
||||
CStringArray as;
|
||||
vector<CString> as;
|
||||
if( po.GetString() != "" )
|
||||
as.push_back( po.GetString() );
|
||||
if( so.GetString() != "" )
|
||||
@@ -119,7 +119,7 @@ static void MovePref( int &iSel, bool bToSel, const ConfOption *pConfOption )
|
||||
}
|
||||
}
|
||||
|
||||
static void GameChoices( CStringArray &out )
|
||||
static void GameChoices( vector<CString> &out )
|
||||
{
|
||||
vector<const Game*> aGames;
|
||||
GAMEMAN->GetEnabledGames( aGames );
|
||||
@@ -133,7 +133,7 @@ static void GameChoices( CStringArray &out )
|
||||
|
||||
static void GameSel( int &sel, bool ToSel, const ConfOption *pConfOption )
|
||||
{
|
||||
CStringArray choices;
|
||||
vector<CString> choices;
|
||||
pConfOption->MakeOptionsList( choices );
|
||||
|
||||
if( ToSel )
|
||||
@@ -151,14 +151,14 @@ static void GameSel( int &sel, bool ToSel, const ConfOption *pConfOption )
|
||||
}
|
||||
}
|
||||
|
||||
static void LanguageChoices( CStringArray &out )
|
||||
static void LanguageChoices( vector<CString> &out )
|
||||
{
|
||||
THEME->GetLanguages( out );
|
||||
}
|
||||
|
||||
static void Language( int &sel, bool ToSel, const ConfOption *pConfOption )
|
||||
{
|
||||
CStringArray choices;
|
||||
vector<CString> choices;
|
||||
pConfOption->MakeOptionsList( choices );
|
||||
|
||||
if( ToSel )
|
||||
@@ -175,12 +175,12 @@ static void Language( int &sel, bool ToSel, const ConfOption *pConfOption )
|
||||
}
|
||||
}
|
||||
|
||||
static void ThemeChoices( CStringArray &out )
|
||||
static void ThemeChoices( vector<CString> &out )
|
||||
{
|
||||
THEME->GetThemeNames( out );
|
||||
}
|
||||
|
||||
static void DisplayResolutionChoices( CStringArray &out )
|
||||
static void DisplayResolutionChoices( vector<CString> &out )
|
||||
{
|
||||
DisplayResolutions d;
|
||||
DISPLAY->GetDisplayResolutions( d );
|
||||
@@ -194,7 +194,7 @@ static void DisplayResolutionChoices( CStringArray &out )
|
||||
|
||||
static void Theme( int &sel, bool ToSel, const ConfOption *pConfOption )
|
||||
{
|
||||
CStringArray choices;
|
||||
vector<CString> choices;
|
||||
pConfOption->MakeOptionsList( choices );
|
||||
|
||||
if( ToSel )
|
||||
@@ -210,7 +210,7 @@ static void Theme( int &sel, bool ToSel, const ConfOption *pConfOption )
|
||||
}
|
||||
}
|
||||
|
||||
static void AnnouncerChoices( CStringArray &out )
|
||||
static void AnnouncerChoices( vector<CString> &out )
|
||||
{
|
||||
ANNOUNCER->GetAnnouncerNames( out );
|
||||
out.insert( out.begin(), "Off" );
|
||||
@@ -218,7 +218,7 @@ static void AnnouncerChoices( CStringArray &out )
|
||||
|
||||
static void Announcer( int &sel, bool ToSel, const ConfOption *pConfOption )
|
||||
{
|
||||
CStringArray choices;
|
||||
vector<CString> choices;
|
||||
pConfOption->MakeOptionsList( choices );
|
||||
|
||||
if( ToSel )
|
||||
@@ -233,7 +233,7 @@ static void Announcer( int &sel, bool ToSel, const ConfOption *pConfOption )
|
||||
}
|
||||
}
|
||||
|
||||
static void DefaultNoteSkinChoices( CStringArray &out )
|
||||
static void DefaultNoteSkinChoices( vector<CString> &out )
|
||||
{
|
||||
NOTESKIN->GetNoteSkinNames( out );
|
||||
for( unsigned i = 0; i < out.size(); ++i )
|
||||
@@ -242,7 +242,7 @@ static void DefaultNoteSkinChoices( CStringArray &out )
|
||||
|
||||
static void DefaultNoteSkin( int &sel, bool ToSel, const ConfOption *pConfOption )
|
||||
{
|
||||
CStringArray choices;
|
||||
vector<CString> choices;
|
||||
pConfOption->MakeOptionsList( choices );
|
||||
|
||||
if( ToSel )
|
||||
@@ -670,7 +670,7 @@ void ConfOption::UpdateAvailableOptions()
|
||||
}
|
||||
}
|
||||
|
||||
void ConfOption::MakeOptionsList( CStringArray &out ) const
|
||||
void ConfOption::MakeOptionsList( vector<CString> &out ) const
|
||||
{
|
||||
out = names;
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@ struct ConfOption
|
||||
|
||||
/* Return the list of available selections; Get() and Put() use indexes into this
|
||||
* array. UpdateAvailableOptions() should be called before using this. */
|
||||
void MakeOptionsList( CStringArray &out ) const;
|
||||
void MakeOptionsList( vector<CString> &out ) const;
|
||||
|
||||
inline int Get() const { int sel; MoveData( sel, true, this ); return sel; }
|
||||
inline void Put( int sel ) const { MoveData( sel, false, this ); }
|
||||
@@ -49,7 +49,7 @@ struct ConfOption
|
||||
#undef PUSH
|
||||
|
||||
ConfOption( const char *n, MoveData_t m,
|
||||
void (*lst)( CStringArray &out ) )
|
||||
void (*lst)( vector<CString> &out ) )
|
||||
{
|
||||
name = n;
|
||||
MoveData = m;
|
||||
@@ -61,7 +61,7 @@ struct ConfOption
|
||||
|
||||
// private:
|
||||
vector<CString> names;
|
||||
void (*MakeOptionsListCB)( CStringArray &out );
|
||||
void (*MakeOptionsListCB)( vector<CString> &out );
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -510,7 +510,7 @@ void ScreenPackages::EnterURL( const CString & sURL )
|
||||
//if we are not talking about a file, let's not worry
|
||||
if( m_sEndName != "" && m_bIsPackage )
|
||||
{
|
||||
CStringArray AddTo;
|
||||
vector<CString> AddTo;
|
||||
GetDirListing( "Packages/"+m_sEndName, AddTo, false, false );
|
||||
if ( AddTo.size() > 0 )
|
||||
{
|
||||
|
||||
@@ -46,7 +46,7 @@ private:
|
||||
BitmapText m_textPackages;
|
||||
BitmapText m_textWeb;
|
||||
|
||||
CStringArray m_Packages;
|
||||
vector<CString> m_Packages;
|
||||
|
||||
vector <CString> m_Links;
|
||||
vector <CString> m_LinkTitles;
|
||||
|
||||
@@ -95,7 +95,7 @@ void ScreenProfileOptions::ImportOptions( int iRow, const vector<PlayerNumber> &
|
||||
vector<CString> vsProfiles;
|
||||
PROFILEMAN->GetLocalProfileIDs( vsProfiles );
|
||||
|
||||
CStringArray::iterator iter = find(
|
||||
vector<CString>::iterator iter = find(
|
||||
vsProfiles.begin(),
|
||||
vsProfiles.end(),
|
||||
MemoryCardManager::m_sMemoryCardOsMountPoint[pn].Get() );
|
||||
|
||||
@@ -66,7 +66,7 @@ void ScreenSMOnlineLogin::ImportOptions( int iRow, const vector<PlayerNumber> &v
|
||||
|
||||
FOREACH_PlayerNumber( pn )
|
||||
{
|
||||
CStringArray::iterator iter = find(vsProfiles.begin(), vsProfiles.end(), ProfileManager::m_sDefaultLocalProfileID[pn].Get() );
|
||||
vector<CString>::iterator iter = find(vsProfiles.begin(), vsProfiles.end(), ProfileManager::m_sDefaultLocalProfileID[pn].Get() );
|
||||
if( iter != vsProfiles.end() )
|
||||
m_pRows[0]->SetOneSelection((PlayerNumber) pn, iter - vsProfiles.begin());
|
||||
}
|
||||
|
||||
@@ -47,7 +47,7 @@ void ScreenSelect::Init()
|
||||
// element in the list is a choice name. This level of indirection
|
||||
// makes it easier to add or remove items without having to change a bunch
|
||||
// of indices.
|
||||
CStringArray asChoiceNames;
|
||||
vector<CString> asChoiceNames;
|
||||
split( CHOICE_NAMES, ",", asChoiceNames, true );
|
||||
|
||||
for( unsigned c=0; c<asChoiceNames.size(); c++ )
|
||||
@@ -65,7 +65,7 @@ void ScreenSelect::Init()
|
||||
// Load codes
|
||||
//
|
||||
{
|
||||
CStringArray vsCodeNames;
|
||||
vector<CString> vsCodeNames;
|
||||
split( CODE_NAMES, ",", vsCodeNames, true );
|
||||
|
||||
for( unsigned c=0; c<vsCodeNames.size(); c++ )
|
||||
|
||||
@@ -188,7 +188,7 @@ void ScreenSelectMode::MenuRight( PlayerNumber pn )
|
||||
|
||||
void ScreenSelectMode::UpdateSelectableChoices()
|
||||
{
|
||||
CStringArray GraphicPaths;
|
||||
vector<CString> GraphicPaths;
|
||||
m_iNumChoices = 0;
|
||||
unsigned i=0;
|
||||
unsigned j=0;
|
||||
|
||||
@@ -44,7 +44,7 @@ protected:
|
||||
RageSound m_soundModeChange;
|
||||
RageSound m_soundConfirm;
|
||||
RageSound m_soundStart;
|
||||
CStringArray arrayLocations;
|
||||
vector<CString> arrayLocations;
|
||||
ScrollingList m_ScrollingList;
|
||||
Sprite m_ChoiceListFrame;
|
||||
Sprite m_ChoiceListHighlight;
|
||||
|
||||
@@ -68,7 +68,7 @@ void ScreenTestInput::Update( float fDeltaTime )
|
||||
{
|
||||
Screen::Update( fDeltaTime );
|
||||
|
||||
CStringArray asInputs;
|
||||
vector<CString> asInputs;
|
||||
|
||||
DeviceInput di;
|
||||
|
||||
|
||||
@@ -195,7 +195,7 @@ ScreenWithMenuElements::~ScreenWithMenuElements()
|
||||
|
||||
void ScreenWithMenuElements::LoadHelpText()
|
||||
{
|
||||
CStringArray vs;
|
||||
vector<CString> vs;
|
||||
CString s = THEME->GetMetric(m_sName,"HelpText");
|
||||
split( s, "\n", vs );
|
||||
|
||||
|
||||
@@ -145,7 +145,7 @@ void ScrollingList::StopBouncing()
|
||||
Allows us to create a graphic element
|
||||
in the scrolling list
|
||||
*************************************/
|
||||
void ScrollingList::Load( const CStringArray& asGraphicPaths )
|
||||
void ScrollingList::Load( const vector<CString>& asGraphicPaths )
|
||||
{
|
||||
Unload();
|
||||
if(m_iSpriteType == SPRITE_TYPE_SPRITE)
|
||||
|
||||
@@ -13,7 +13,7 @@ public:
|
||||
ScrollingList();
|
||||
~ScrollingList();
|
||||
|
||||
void Load( const CStringArray& asGraphicPaths );
|
||||
void Load( const vector<CString>& asGraphicPaths );
|
||||
void Unload(); // delete all items. Called automatically on Load()
|
||||
|
||||
virtual void Update( float fDeltaTime );
|
||||
|
||||
+12
-12
@@ -218,7 +218,7 @@ bool Song::LoadFromSongDir( CString sDir )
|
||||
m_sSongDir = sDir;
|
||||
|
||||
// save group name
|
||||
CStringArray sDirectoryParts;
|
||||
vector<CString> sDirectoryParts;
|
||||
split( m_sSongDir, "/", sDirectoryParts, false );
|
||||
ASSERT( sDirectoryParts.size() >= 4 ); /* e.g. "/Songs/Slow/Taps/" */
|
||||
m_sGroupName = sDirectoryParts[sDirectoryParts.size()-3]; // second from last item
|
||||
@@ -315,7 +315,7 @@ bool Song::LoadFromSongDir( CString sDir )
|
||||
return true; // do load this song
|
||||
}
|
||||
|
||||
static void GetImageDirListing( CString sPath, CStringArray &AddTo, bool bReturnPathToo=false )
|
||||
static void GetImageDirListing( CString sPath, vector<CString> &AddTo, bool bReturnPathToo=false )
|
||||
{
|
||||
GetDirListing( sPath + ".png", AddTo, false, bReturnPathToo );
|
||||
GetDirListing( sPath + ".jpg", AddTo, false, bReturnPathToo );
|
||||
@@ -460,7 +460,7 @@ void Song::TidyUpData()
|
||||
|
||||
if( !HasMusic() )
|
||||
{
|
||||
CStringArray arrayPossibleMusic;
|
||||
vector<CString> arrayPossibleMusic;
|
||||
GetDirListing( m_sSongDir + CString("*.mp3"), arrayPossibleMusic );
|
||||
GetDirListing( m_sSongDir + CString("*.ogg"), arrayPossibleMusic );
|
||||
GetDirListing( m_sSongDir + CString("*.wav"), arrayPossibleMusic );
|
||||
@@ -592,7 +592,7 @@ void Song::TidyUpData()
|
||||
// m_sBannerFile = "";
|
||||
|
||||
// find an image with "banner" in the file name
|
||||
CStringArray arrayPossibleBanners;
|
||||
vector<CString> arrayPossibleBanners;
|
||||
GetImageDirListing( m_sSongDir + "*banner*", arrayPossibleBanners );
|
||||
|
||||
/* Some people do things differently for the sake of being different. Don't
|
||||
@@ -608,7 +608,7 @@ void Song::TidyUpData()
|
||||
// m_sBackgroundFile = "";
|
||||
|
||||
// find an image with "bg" or "background" in the file name
|
||||
CStringArray arrayPossibleBGs;
|
||||
vector<CString> arrayPossibleBGs;
|
||||
GetImageDirListing( m_sSongDir + "*bg*", arrayPossibleBGs );
|
||||
GetImageDirListing( m_sSongDir + "*background*", arrayPossibleBGs );
|
||||
if( !arrayPossibleBGs.empty() )
|
||||
@@ -618,7 +618,7 @@ void Song::TidyUpData()
|
||||
if( !HasCDTitle() )
|
||||
{
|
||||
// find an image with "cdtitle" in the file name
|
||||
CStringArray arrayPossibleCDTitles;
|
||||
vector<CString> arrayPossibleCDTitles;
|
||||
GetImageDirListing( m_sSongDir + "*cdtitle*", arrayPossibleCDTitles );
|
||||
if( !arrayPossibleCDTitles.empty() )
|
||||
m_sCDTitleFile = arrayPossibleCDTitles[0];
|
||||
@@ -627,7 +627,7 @@ void Song::TidyUpData()
|
||||
if( !HasLyrics() )
|
||||
{
|
||||
// Check if there is a lyric file in here
|
||||
CStringArray arrayLyricFiles;
|
||||
vector<CString> arrayLyricFiles;
|
||||
GetDirListing(m_sSongDir + CString("*.lrc"), arrayLyricFiles );
|
||||
if( !arrayLyricFiles.empty() )
|
||||
m_sLyricsFile = arrayLyricFiles[0];
|
||||
@@ -636,7 +636,7 @@ void Song::TidyUpData()
|
||||
//
|
||||
// Now, For the images we still haven't found, look at the image dimensions of the remaining unclassified images.
|
||||
//
|
||||
CStringArray arrayImages;
|
||||
vector<CString> arrayImages;
|
||||
GetImageDirListing( m_sSongDir + "*", arrayImages );
|
||||
|
||||
for( unsigned i=0; i<arrayImages.size(); i++ ) // foreach image
|
||||
@@ -727,7 +727,7 @@ void Song::TidyUpData()
|
||||
// they are DWI style where the movie begins at beat 0.
|
||||
if( !HasBGChanges() )
|
||||
{
|
||||
CStringArray arrayPossibleMovies;
|
||||
vector<CString> arrayPossibleMovies;
|
||||
GetDirListing( m_sSongDir + CString("*.avi"), arrayPossibleMovies );
|
||||
GetDirListing( m_sSongDir + CString("*.mpg"), arrayPossibleMovies );
|
||||
GetDirListing( m_sSongDir + CString("*.mpeg"), arrayPossibleMovies );
|
||||
@@ -766,7 +766,7 @@ void Song::TidyUpData()
|
||||
* filename, and should always be the title of the song (unlike KSFs).
|
||||
*/
|
||||
m_sSongFileName = m_sSongDir;
|
||||
CStringArray asFileNames;
|
||||
vector<CString> asFileNames;
|
||||
GetDirListing( m_sSongDir+"*.sm", asFileNames );
|
||||
if( !asFileNames.empty() )
|
||||
m_sSongFileName += asFileNames[0];
|
||||
@@ -1003,7 +1003,7 @@ void Song::Save()
|
||||
|
||||
/* We've safely written our files and created backups. Rename non-SM and non-DWI
|
||||
* files to avoid confusion. */
|
||||
CStringArray arrayOldFileNames;
|
||||
vector<CString> arrayOldFileNames;
|
||||
GetDirListing( m_sSongDir + "*.bms", arrayOldFileNames );
|
||||
GetDirListing( m_sSongDir + "*.ksf", arrayOldFileNames );
|
||||
|
||||
@@ -1390,7 +1390,7 @@ bool Song::Matches(CString sGroup, CString sSong) const
|
||||
|
||||
CString sDir = this->GetSongDir();
|
||||
sDir.Replace("\\","/");
|
||||
CStringArray bits;
|
||||
vector<CString> bits;
|
||||
split( sDir, "/", bits );
|
||||
ASSERT(bits.size() >= 2); /* should always have at least two parts */
|
||||
const CString &sLastBit = bits[bits.size()-1];
|
||||
|
||||
@@ -50,7 +50,7 @@ static void EmptyDir( CString dir )
|
||||
{
|
||||
ASSERT(dir[dir.size()-1] == '/');
|
||||
|
||||
CStringArray asCacheFileNames;
|
||||
vector<CString> asCacheFileNames;
|
||||
GetDirListing( dir, asCacheFileNames );
|
||||
for( unsigned i=0; i<asCacheFileNames.size(); i++ )
|
||||
{
|
||||
|
||||
@@ -105,7 +105,7 @@ void SongManager::InitSongsFromDisk( LoadingWindow *ld )
|
||||
void SongManager::SanityCheckGroupDir( CString sDir ) const
|
||||
{
|
||||
// Check to see if they put a song directly inside the group folder.
|
||||
CStringArray arrayFiles;
|
||||
vector<CString> arrayFiles;
|
||||
GetDirListing( sDir + "/*.mp3", arrayFiles );
|
||||
GetDirListing( sDir + "/*.ogg", arrayFiles );
|
||||
GetDirListing( sDir + "/*.wav", arrayFiles );
|
||||
@@ -130,7 +130,7 @@ void SongManager::AddGroup( CString sDir, CString sGroupDirName )
|
||||
return; /* the group is already added */
|
||||
|
||||
// Look for a group banner in this group folder
|
||||
CStringArray arrayGroupBanners;
|
||||
vector<CString> arrayGroupBanners;
|
||||
GetDirListing( sDir+sGroupDirName+"/*.png", arrayGroupBanners );
|
||||
GetDirListing( sDir+sGroupDirName+"/*.jpg", arrayGroupBanners );
|
||||
GetDirListing( sDir+sGroupDirName+"/*.gif", arrayGroupBanners );
|
||||
@@ -163,7 +163,7 @@ void SongManager::LoadStepManiaSongDir( CString sDir, LoadingWindow *ld )
|
||||
sDir += "/";
|
||||
|
||||
// Find all group directories in "Songs" folder
|
||||
CStringArray arrayGroupDirs;
|
||||
vector<CString> arrayGroupDirs;
|
||||
GetDirListing( sDir+"*", arrayGroupDirs, true );
|
||||
SortCStringArray( arrayGroupDirs );
|
||||
StripCvs( arrayGroupDirs );
|
||||
@@ -175,7 +175,7 @@ void SongManager::LoadStepManiaSongDir( CString sDir, LoadingWindow *ld )
|
||||
SanityCheckGroupDir(sDir+sGroupDirName);
|
||||
|
||||
// Find all Song folders in this group directory
|
||||
CStringArray arraySongDirs;
|
||||
vector<CString> arraySongDirs;
|
||||
GetDirListing( sDir+sGroupDirName + "/*", arraySongDirs, true, true );
|
||||
StripCvs( arraySongDirs );
|
||||
SortCStringArray( arraySongDirs );
|
||||
@@ -229,7 +229,7 @@ void SongManager::LoadStepManiaSongDir( CString sDir, LoadingWindow *ld )
|
||||
void SongManager::LoadGroupSymLinks(CString sDir, CString sGroupFolder)
|
||||
{
|
||||
// Find all symlink files in this folder
|
||||
CStringArray arraySymLinks;
|
||||
vector<CString> arraySymLinks;
|
||||
GetDirListing( sDir+sGroupFolder+"/*.include", arraySymLinks, false );
|
||||
SortCStringArray( arraySymLinks );
|
||||
for( unsigned s=0; s< arraySymLinks.size(); s++ ) // for each symlink in this dir, add it in as a song.
|
||||
@@ -319,7 +319,7 @@ CString SongManager::GetSongGroupBannerPath( CString sSongGroup )
|
||||
return CString();
|
||||
}
|
||||
|
||||
void SongManager::GetSongGroupNames( CStringArray &AddTo )
|
||||
void SongManager::GetSongGroupNames( vector<CString> &AddTo )
|
||||
{
|
||||
AddTo.insert(AddTo.end(), m_sSongGroupNames.begin(), m_sSongGroupNames.end() );
|
||||
}
|
||||
@@ -393,7 +393,7 @@ CString SongManager::GetCourseGroupBannerPath( const CString &sCourseGroup )
|
||||
}
|
||||
}
|
||||
|
||||
void SongManager::GetCourseGroupNames( CStringArray &AddTo )
|
||||
void SongManager::GetCourseGroupNames( vector<CString> &AddTo )
|
||||
{
|
||||
FOREACHM_CONST( CString, CourseGroupInfo, m_mapCourseGroupToInfo, iter )
|
||||
AddTo.push_back( iter->first );
|
||||
@@ -504,7 +504,7 @@ void SongManager::InitCoursesFromDisk( LoadingWindow *ld )
|
||||
// Load courses from in Courses dir
|
||||
//
|
||||
{
|
||||
CStringArray saCourseFiles;
|
||||
vector<CString> saCourseFiles;
|
||||
GetDirListing( COURSES_DIR+"*.crs", saCourseFiles, false, true );
|
||||
for( unsigned i=0; i<saCourseFiles.size(); i++ )
|
||||
{
|
||||
@@ -533,7 +533,7 @@ void SongManager::InitCoursesFromDisk( LoadingWindow *ld )
|
||||
FOREACH( CString, vsCourseGroupNames, sCourseGroup ) // for each dir in /Courses/
|
||||
{
|
||||
// Find all CRS files in this group directory
|
||||
CStringArray vsCoursePaths;
|
||||
vector<CString> vsCoursePaths;
|
||||
GetDirListing( COURSES_DIR + *sCourseGroup + "/*.crs", vsCoursePaths, false, true );
|
||||
SortCStringArray( vsCoursePaths );
|
||||
|
||||
@@ -562,7 +562,7 @@ void SongManager::InitAutogenCourses()
|
||||
//
|
||||
// Create group courses for Endless and Nonstop
|
||||
//
|
||||
CStringArray saGroupNames;
|
||||
vector<CString> saGroupNames;
|
||||
this->GetSongGroupNames( saGroupNames );
|
||||
Course* pCourse;
|
||||
for( unsigned g=0; g<saGroupNames.size(); g++ ) // foreach Group
|
||||
@@ -1171,7 +1171,7 @@ Course* SongManager::GetCourseFromName( CString sName )
|
||||
Song *SongManager::FindSong( CString sPath )
|
||||
{
|
||||
sPath.Replace( '\\', '/' );
|
||||
CStringArray bits;
|
||||
vector<CString> bits;
|
||||
split( sPath, "/", bits );
|
||||
|
||||
if( bits.size() == 1 )
|
||||
@@ -1270,7 +1270,7 @@ void SongManager::UpdateRankingCourses()
|
||||
{
|
||||
/* Updating the ranking courses data is fairly expensive
|
||||
* since it involves comparing strings. Do so sparingly. */
|
||||
CStringArray RankingCourses;
|
||||
vector<CString> RankingCourses;
|
||||
split( THEME->GetMetric("ScreenRanking","CoursesToShow"),",", RankingCourses);
|
||||
|
||||
for( unsigned i=0; i < m_pCourses.size(); i++ )
|
||||
@@ -1309,7 +1309,7 @@ void SongManager::LoadAllFromProfileDir( const CString &sProfileDir, ProfileSlot
|
||||
//
|
||||
CString sDir = sProfileDir + EDIT_STEPS_SUBDIR;
|
||||
|
||||
CStringArray vsFiles;
|
||||
vector<CString> vsFiles;
|
||||
GetDirListing( sDir+"*.edit", vsFiles, false, true );
|
||||
|
||||
int iNumEditsLoaded = GetNumEditsLoadedFromProfile( slot );
|
||||
@@ -1329,7 +1329,7 @@ void SongManager::LoadAllFromProfileDir( const CString &sProfileDir, ProfileSlot
|
||||
//
|
||||
CString sDir = sProfileDir + EDIT_COURSES_SUBDIR;
|
||||
|
||||
CStringArray vsFiles;
|
||||
vector<CString> vsFiles;
|
||||
GetDirListing( sDir+"*.crs", vsFiles, false, true );
|
||||
|
||||
int iNumEditsLoaded = GetNumEditsLoadedFromProfile( slot );
|
||||
|
||||
@@ -57,13 +57,13 @@ public:
|
||||
void PreloadSongImages();
|
||||
|
||||
CString GetSongGroupBannerPath( CString sSongGroup );
|
||||
void GetSongGroupNames( CStringArray &AddTo );
|
||||
void GetSongGroupNames( vector<CString> &AddTo );
|
||||
bool DoesSongGroupExist( CString sSongGroup );
|
||||
RageColor GetSongGroupColor( const CString &sSongGroupName );
|
||||
RageColor GetSongColor( const Song* pSong );
|
||||
|
||||
CString GetCourseGroupBannerPath( const CString &sCourseGroup );
|
||||
void GetCourseGroupNames( CStringArray &AddTo );
|
||||
void GetCourseGroupNames( vector<CString> &AddTo );
|
||||
bool DoesCourseGroupExist( const CString &sCourseGroup );
|
||||
RageColor GetCourseGroupColor( const CString &sCourseGroupName );
|
||||
RageColor GetCourseColor( const Course* pCourse );
|
||||
@@ -129,8 +129,8 @@ protected:
|
||||
vector<Song*> m_pSongs; // all songs that can be played
|
||||
vector<Song*> m_pBestSongs[NUM_ProfileSlot];
|
||||
vector<Song*> m_pShuffledSongs; // used by GetRandomSong
|
||||
CStringArray m_sSongGroupNames;
|
||||
CStringArray m_sSongGroupBannerPaths; // each song group may have a banner associated with it
|
||||
vector<CString> m_sSongGroupNames;
|
||||
vector<CString> m_sSongGroupBannerPaths; // each song group may have a banner associated with it
|
||||
|
||||
vector<Course*> m_pCourses;
|
||||
vector<Course*> m_pBestCourses[NUM_ProfileSlot][NUM_CourseType];
|
||||
|
||||
@@ -74,7 +74,7 @@ void SongOptions::FromString( CString sOptions )
|
||||
{
|
||||
// Init();
|
||||
sOptions.MakeLower();
|
||||
CStringArray asBits;
|
||||
vector<CString> asBits;
|
||||
split( sOptions, ",", asBits, true );
|
||||
|
||||
for( unsigned i=0; i<asBits.size(); i++ )
|
||||
@@ -100,7 +100,7 @@ void SongOptions::FromString( CString sOptions )
|
||||
ASSERT( ret == 1 );
|
||||
}
|
||||
|
||||
CStringArray asParts;
|
||||
vector<CString> asParts;
|
||||
split( sBit, " ", asParts, true );
|
||||
bool on = true;
|
||||
if( asParts.size() > 1 )
|
||||
|
||||
@@ -1311,9 +1311,6 @@ struct StdStringEqualsNoCaseA
|
||||
#pragma warning (pop)
|
||||
#endif
|
||||
|
||||
#define CString CStdString
|
||||
#define CStringArray vector<CString>
|
||||
|
||||
#endif // #ifndef STDSTRING_H
|
||||
|
||||
/*
|
||||
|
||||
@@ -722,7 +722,7 @@ RageDisplay *CreateDisplay()
|
||||
VIDEO_TROUBLESHOOTING_URL "\n\n"
|
||||
"Video Driver: "+GetVideoDriverName()+"\n\n";
|
||||
|
||||
CStringArray asRenderers;
|
||||
vector<CString> asRenderers;
|
||||
split( PREFSMAN->m_sVideoRenderers, ",", asRenderers, true );
|
||||
|
||||
if( asRenderers.empty() )
|
||||
@@ -982,14 +982,14 @@ int main(int argc, char* argv[])
|
||||
/* Set up alternative filesystem trees. */
|
||||
if( PREFSMAN->m_sAdditionalFolders.Get() != "" )
|
||||
{
|
||||
CStringArray dirs;
|
||||
vector<CString> dirs;
|
||||
split( PREFSMAN->m_sAdditionalFolders, ",", dirs, true );
|
||||
for( unsigned i=0; i < dirs.size(); i++)
|
||||
FILEMAN->Mount( "dir", dirs[i], "/" );
|
||||
}
|
||||
if( PREFSMAN->m_sAdditionalSongFolders.Get() != "" )
|
||||
{
|
||||
CStringArray dirs;
|
||||
vector<CString> dirs;
|
||||
split( PREFSMAN->m_sAdditionalSongFolders, ",", dirs, true );
|
||||
for( unsigned i=0; i < dirs.size(); i++)
|
||||
FILEMAN->Mount( "dir", dirs[i], "/Songs" );
|
||||
|
||||
@@ -113,7 +113,7 @@ ThemeManager::ThemeManager()
|
||||
/* We don't have any theme loaded until SwitchThemeAndLanguage is called. */
|
||||
m_sCurThemeName = "";
|
||||
|
||||
CStringArray arrayThemeNames;
|
||||
vector<CString> arrayThemeNames;
|
||||
GetThemeNames( arrayThemeNames );
|
||||
}
|
||||
|
||||
@@ -123,7 +123,7 @@ ThemeManager::~ThemeManager()
|
||||
SAFE_DELETE( g_pIniMetrics );
|
||||
}
|
||||
|
||||
void ThemeManager::GetThemeNames( CStringArray& AddTo )
|
||||
void ThemeManager::GetThemeNames( vector<CString>& AddTo )
|
||||
{
|
||||
GetDirListing( THEMES_DIR + "*", AddTo, true );
|
||||
StripCvs( AddTo );
|
||||
@@ -131,7 +131,7 @@ void ThemeManager::GetThemeNames( CStringArray& AddTo )
|
||||
|
||||
bool ThemeManager::DoesThemeExist( const CString &sThemeName )
|
||||
{
|
||||
CStringArray asThemeNames;
|
||||
vector<CString> asThemeNames;
|
||||
GetThemeNames( asThemeNames );
|
||||
for( unsigned i=0; i<asThemeNames.size(); i++ )
|
||||
{
|
||||
@@ -141,7 +141,7 @@ bool ThemeManager::DoesThemeExist( const CString &sThemeName )
|
||||
return false;
|
||||
}
|
||||
|
||||
void ThemeManager::GetLanguages( CStringArray& AddTo )
|
||||
void ThemeManager::GetLanguages( vector<CString>& AddTo )
|
||||
{
|
||||
AddTo.clear();
|
||||
|
||||
@@ -150,13 +150,13 @@ void ThemeManager::GetLanguages( CStringArray& AddTo )
|
||||
|
||||
// remove dupes
|
||||
sort( AddTo.begin(), AddTo.end() );
|
||||
CStringArray::iterator it = unique( AddTo.begin(), AddTo.end() );
|
||||
vector<CString>::iterator it = unique( AddTo.begin(), AddTo.end() );
|
||||
AddTo.erase(it, AddTo.end());
|
||||
}
|
||||
|
||||
bool ThemeManager::DoesLanguageExist( const CString &sLanguage )
|
||||
{
|
||||
CStringArray asLanguages;
|
||||
vector<CString> asLanguages;
|
||||
GetLanguages( asLanguages );
|
||||
|
||||
for( unsigned i=0; i<asLanguages.size(); i++ )
|
||||
@@ -329,7 +329,7 @@ void ThemeManager::RunLuaScripts( const CString &sMask )
|
||||
{
|
||||
--iter;
|
||||
const CString &sThemeDir = GetThemeDirFromName( iter->sThemeName );
|
||||
CStringArray asElementPaths;
|
||||
vector<CString> asElementPaths;
|
||||
GetDirListing( sThemeDir + "Scripts/" + sMask, asElementPaths, false, true );
|
||||
for( unsigned i = 0; i < asElementPaths.size(); ++i )
|
||||
{
|
||||
@@ -401,7 +401,7 @@ try_element_again:
|
||||
const CString sThemeDir = GetThemeDirFromName( sThemeName );
|
||||
const CString &sCategory = ElementCategoryToString(category);
|
||||
|
||||
CStringArray asElementPaths;
|
||||
vector<CString> asElementPaths;
|
||||
|
||||
// If sFileName already has an extension, we're looking for a specific file
|
||||
bool bLookingForSpecificFile = sElement.find_last_of('.') != sElement.npos;
|
||||
@@ -412,7 +412,7 @@ try_element_again:
|
||||
}
|
||||
else // look for all files starting with sFileName that have types we can use
|
||||
{
|
||||
CStringArray asPaths;
|
||||
vector<CString> asPaths;
|
||||
GetDirListing( sThemeDir + sCategory + "/" + ClassAndElementToFileName(sClassName,sElement) + "*",
|
||||
asPaths, false, true );
|
||||
|
||||
@@ -844,7 +844,7 @@ apActorCommands ThemeManager::GetMetricA( const CString &sClassName, const CStri
|
||||
|
||||
void ThemeManager::NextTheme()
|
||||
{
|
||||
CStringArray as;
|
||||
vector<CString> as;
|
||||
GetThemeNames( as );
|
||||
unsigned i;
|
||||
for( i=0; i<as.size(); i++ )
|
||||
@@ -854,10 +854,10 @@ void ThemeManager::NextTheme()
|
||||
SwitchThemeAndLanguage( as[iNewIndex], m_sCurLanguage );
|
||||
}
|
||||
|
||||
void ThemeManager::GetLanguagesForTheme( const CString &sThemeName, CStringArray& asLanguagesOut )
|
||||
void ThemeManager::GetLanguagesForTheme( const CString &sThemeName, vector<CString>& asLanguagesOut )
|
||||
{
|
||||
CString sLanguageDir = GetThemeDirFromName(sThemeName) + LANGUAGES_SUBDIR;
|
||||
CStringArray as;
|
||||
vector<CString> as;
|
||||
GetDirListing( sLanguageDir + "*.ini", as );
|
||||
|
||||
// stip out metrics.ini
|
||||
|
||||
@@ -34,9 +34,9 @@ public:
|
||||
ThemeManager();
|
||||
~ThemeManager();
|
||||
|
||||
void GetThemeNames( CStringArray& AddTo );
|
||||
void GetThemeNames( vector<CString>& AddTo );
|
||||
bool DoesThemeExist( const CString &sThemeName );
|
||||
void GetLanguages( CStringArray& AddTo );
|
||||
void GetLanguages( vector<CString>& AddTo );
|
||||
bool DoesLanguageExist( const CString &sLanguage );
|
||||
void SwitchThemeAndLanguage( const CString &sThemeName, const CString &sLanguage );
|
||||
void UpdateLuaGlobals();
|
||||
@@ -103,7 +103,7 @@ protected:
|
||||
static CString GetThemeDirFromName( const CString &sThemeName );
|
||||
CString GetElementDir( const CString &sThemeName );
|
||||
static CString GetMetricsIniPath( const CString &sThemeName );
|
||||
static void GetLanguagesForTheme( const CString &sThemeName, CStringArray& asLanguagesOut );
|
||||
static void GetLanguagesForTheme( const CString &sThemeName, vector<CString>& asLanguagesOut );
|
||||
static CString GetLanguageIniPath( const CString &sThemeName, const CString &sLanguage );
|
||||
CString GetDefaultLanguage();
|
||||
|
||||
|
||||
@@ -295,7 +295,7 @@ void UnlockManager::Load()
|
||||
{
|
||||
LOG->Trace( "UnlockManager::Load()" );
|
||||
|
||||
CStringArray asUnlockNames;
|
||||
vector<CString> asUnlockNames;
|
||||
split( UNLOCK_NAMES, ",", asUnlockNames );
|
||||
if( asUnlockNames.empty() )
|
||||
return;
|
||||
|
||||
@@ -415,7 +415,7 @@ void ArchHooks_Win32::MountInitialFilesystems( const CString &sDirOfExecutable )
|
||||
{
|
||||
/* All Windows data goes in the directory one level above the executable. */
|
||||
CHECKPOINT_M( ssprintf( "DOE \"%s\"", sDirOfExecutable.c_str()) );
|
||||
CStringArray parts;
|
||||
vector<CString> parts;
|
||||
split( sDirOfExecutable, "/", parts );
|
||||
CHECKPOINT_M( ssprintf( "... %i parts", parts.size()) );
|
||||
ASSERT_M( parts.size() > 1, ssprintf("Strange sDirOfExecutable: %s", sDirOfExecutable.c_str()) );
|
||||
|
||||
@@ -293,7 +293,7 @@ void ArchHooks_darwin::MountInitialFilesystems( const CString &sDirOfExecutable
|
||||
{
|
||||
#if defined(MACOSX)
|
||||
CHECKPOINT_M( ssprintf("DOE \"%s\"", sDirOfExecutable.c_str()) );
|
||||
CStringArray parts;
|
||||
vector<CString> parts;
|
||||
split( sDirOfExecutable, "/", parts );
|
||||
ASSERT( parts.size() > 3 );
|
||||
CString Dir = '/' + join( "/", parts.begin(), parts.end()-3 );
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
DialogDriver *MakeDialogDriver()
|
||||
{
|
||||
CString sDrivers = "win32,cocoa,null";
|
||||
CStringArray asDriversToTry;
|
||||
vector<CString> asDriversToTry;
|
||||
split( sDrivers, ",", asDriversToTry, true );
|
||||
|
||||
ASSERT( asDriversToTry.size() != 0 );
|
||||
|
||||
@@ -136,7 +136,7 @@ void LoadingWindow_Win32::Paint()
|
||||
|
||||
void LoadingWindow_Win32::SetText( CString sText )
|
||||
{
|
||||
CStringArray asMessageLines;
|
||||
vector<CString> asMessageLines;
|
||||
split( sText, "\n", asMessageLines, false );
|
||||
while( asMessageLines.size() < 3 )
|
||||
asMessageLines.push_back( "" );
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
#include "InputHandler/Selector_InputHandler.h"
|
||||
void MakeInputHandlers(CString drivers, vector<InputHandler *> &Add)
|
||||
{
|
||||
CStringArray DriversToTry;
|
||||
vector<CString> DriversToTry;
|
||||
split(drivers, ",", DriversToTry, true);
|
||||
|
||||
ASSERT( DriversToTry.size() != 0 );
|
||||
@@ -100,7 +100,7 @@ LoadingWindow *MakeLoadingWindow()
|
||||
/* Don't load NULL by default. On most systems, if we can't load the SDL
|
||||
* loading window, we won't be able to init OpenGL, either, so don't bother. */
|
||||
CString drivers = "xbox,win32,cocoa,gtk";
|
||||
CStringArray DriversToTry;
|
||||
vector<CString> DriversToTry;
|
||||
split(drivers, ",", DriversToTry, true);
|
||||
|
||||
ASSERT( DriversToTry.size() != 0 );
|
||||
@@ -180,7 +180,7 @@ RageMovieTexture *MakeRageMovieTexture(RageTextureID ID)
|
||||
{
|
||||
DumpAVIDebugInfo( ID.filename );
|
||||
|
||||
CStringArray DriversToTry;
|
||||
vector<CString> DriversToTry;
|
||||
split(PREFSMAN->GetMovieDrivers(), ",", DriversToTry, true);
|
||||
ASSERT(DriversToTry.size() != 0);
|
||||
|
||||
@@ -227,7 +227,7 @@ RageMovieTexture *MakeRageMovieTexture(RageTextureID ID)
|
||||
#include "Sound/Selector_RageSoundDriver.h"
|
||||
RageSoundDriver *MakeRageSoundDriver(CString drivers)
|
||||
{
|
||||
CStringArray DriversToTry;
|
||||
vector<CString> DriversToTry;
|
||||
split(drivers, ",", DriversToTry, true);
|
||||
|
||||
ASSERT( DriversToTry.size() != 0 );
|
||||
|
||||
@@ -397,7 +397,7 @@ void BacktraceNames::FromAddr( const void *p )
|
||||
fprintf(stderr, "FromAddr read() failed: %s\n", strerror(errno));
|
||||
return;
|
||||
}
|
||||
CStringArray mangledAndFile;
|
||||
vector<CString> mangledAndFile;
|
||||
|
||||
split(f, " ", mangledAndFile, true);
|
||||
if (mangledAndFile.size() == 0)
|
||||
|
||||
@@ -232,7 +232,7 @@ static void child_process()
|
||||
if( !child_read(3, temp, size) )
|
||||
return;
|
||||
|
||||
CStringArray Checkpoints;
|
||||
vector<CString> Checkpoints;
|
||||
split(temp, "$$", Checkpoints);
|
||||
delete [] temp;
|
||||
|
||||
|
||||
@@ -78,7 +78,7 @@ bool RegistryAccess::GetRegValue( const CString &sKey, const CString &sName, CSt
|
||||
return true;
|
||||
}
|
||||
|
||||
bool RegistryAccess::GetRegValue( const CString &sKey, CString sName, int &iVal )
|
||||
bool RegistryAccess::GetRegValue( const CString &sKey, const CString &sName, int &iVal )
|
||||
{
|
||||
HKEY hKey = OpenRegKey( sKey );
|
||||
if( hKey == NULL )
|
||||
|
||||
@@ -135,6 +135,8 @@ void ShowWarning( const char *file, int line, const char *message ); // don't pu
|
||||
/* Use CStdString: */
|
||||
#include "StdString.h"
|
||||
using namespace StdString;
|
||||
//#define CString CStdString
|
||||
typedef StdString::CStdString CString;
|
||||
|
||||
/* Include this here to make sure our assertion handler is always
|
||||
* used. (This file is a dependency of most everything anyway,
|
||||
|
||||
Reference in New Issue
Block a user