const RString & for easier debug stepping
This commit is contained in:
@@ -3,14 +3,14 @@
|
||||
#include "NoteTypes.h"
|
||||
#include "GameManager.h"
|
||||
|
||||
bool NotesLoader::Loadable( RString sPath )
|
||||
bool NotesLoader::Loadable( const RString &sPath )
|
||||
{
|
||||
vector<RString> list;
|
||||
GetApplicableFiles( sPath, list );
|
||||
return !list.empty();
|
||||
}
|
||||
|
||||
void NotesLoader::GetMainAndSubTitlesFromFullTitle( const RString sFullTitle, RString &sMainTitleOut, RString &sSubTitleOut )
|
||||
void NotesLoader::GetMainAndSubTitlesFromFullTitle( const RString &sFullTitle, RString &sMainTitleOut, RString &sSubTitleOut )
|
||||
{
|
||||
const RString sLeftSeps[] = { " -", " ~", " (", " [", "\t" };
|
||||
|
||||
|
||||
@@ -11,17 +11,17 @@ class Song;
|
||||
class NotesLoader
|
||||
{
|
||||
protected:
|
||||
virtual void GetApplicableFiles( RString sPath, vector<RString> &out )=0;
|
||||
virtual void GetApplicableFiles( const RString &sPath, vector<RString> &out )=0;
|
||||
|
||||
set<istring> BlacklistedImages;
|
||||
|
||||
public:
|
||||
virtual ~NotesLoader() { }
|
||||
const set<istring> &GetBlacklistedImages() const { return BlacklistedImages; }
|
||||
static void GetMainAndSubTitlesFromFullTitle( const RString sFullTitle, RString &sMainTitleOut, RString &sSubTitleOut );
|
||||
virtual bool LoadFromDir( RString sPath, Song &out ) = 0;
|
||||
static void GetMainAndSubTitlesFromFullTitle( const RString &sFullTitle, RString &sMainTitleOut, RString &sSubTitleOut );
|
||||
virtual bool LoadFromDir( const RString &sPath, Song &out ) = 0;
|
||||
virtual void TidyUpData( Song &song, bool cache ) { }
|
||||
bool Loadable( RString sPath );
|
||||
bool Loadable( const RString &sPath );
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -512,7 +512,7 @@ bool BMSLoader::LoadFromBMSFile( const RString &sPath, const NameToData_t &mapNa
|
||||
return true;
|
||||
}
|
||||
|
||||
void BMSLoader::GetApplicableFiles( RString sPath, vector<RString> &out )
|
||||
void BMSLoader::GetApplicableFiles( const RString &sPath, vector<RString> &out )
|
||||
{
|
||||
GetDirListing( sPath + RString("*.bms"), out );
|
||||
GetDirListing( sPath + RString("*.bme"), out );
|
||||
@@ -845,7 +845,7 @@ void BMSLoader::SetTimeSigAdjustments( const MeasureToTimeSig_t &sigs, Song *pOu
|
||||
}
|
||||
}
|
||||
|
||||
bool BMSLoader::LoadFromDir( RString sDir, Song &out )
|
||||
bool BMSLoader::LoadFromDir( const RString &sDir, Song &out )
|
||||
{
|
||||
LOG->Trace( "Song::LoadFromBMSDir(%s)", sDir.c_str() );
|
||||
|
||||
|
||||
@@ -32,8 +32,8 @@ class BMSLoader: public NotesLoader
|
||||
map<RString,int> m_mapWavIdToKeysoundIndex;
|
||||
|
||||
public:
|
||||
void GetApplicableFiles( RString sPath, vector<RString> &out );
|
||||
bool LoadFromDir( RString sDir, Song &out );
|
||||
void GetApplicableFiles( const RString &sPath, vector<RString> &out );
|
||||
bool LoadFromDir( const RString &sDir, Song &out );
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -359,7 +359,7 @@ float DWILoader::ParseBrokenDWITimestamp(const RString &arg1, const RString &arg
|
||||
return HHMMSSToSeconds( arg1+":"+arg2+":"+arg3 );
|
||||
}
|
||||
|
||||
bool DWILoader::LoadFromDWIFile( RString sPath, Song &out )
|
||||
bool DWILoader::LoadFromDWIFile( const RString &sPath, Song &out )
|
||||
{
|
||||
LOG->Trace( "Song::LoadFromDWIFile(%s)", sPath.c_str() );
|
||||
m_sLoadingFile = sPath;
|
||||
@@ -536,12 +536,12 @@ bool DWILoader::LoadFromDWIFile( RString sPath, Song &out )
|
||||
return true;
|
||||
}
|
||||
|
||||
void DWILoader::GetApplicableFiles( RString sPath, vector<RString> &out )
|
||||
void DWILoader::GetApplicableFiles( const RString &sPath, vector<RString> &out )
|
||||
{
|
||||
GetDirListing( sPath + RString("*.dwi"), out );
|
||||
}
|
||||
|
||||
bool DWILoader::LoadFromDir( RString sPath, Song &out )
|
||||
bool DWILoader::LoadFromDir( const RString &sPath, Song &out )
|
||||
{
|
||||
vector<RString> aFileNames;
|
||||
GetApplicableFiles( sPath, aFileNames );
|
||||
|
||||
@@ -19,16 +19,16 @@ class DWILoader: public NotesLoader
|
||||
RString sStepData2,
|
||||
Steps &out );
|
||||
|
||||
bool LoadFromDWIFile( RString sPath, Song &out );
|
||||
bool LoadFromDWIFile( const RString &sPath, Song &out );
|
||||
|
||||
static float ParseBrokenDWITimestamp(const RString &arg1, const RString &arg2, const RString &arg3);
|
||||
static bool Is192( const RString &str, size_t pos );
|
||||
RString m_sLoadingFile;
|
||||
|
||||
public:
|
||||
void GetApplicableFiles( RString sPath, vector<RString> &out );
|
||||
bool Loadable( RString sPath );
|
||||
bool LoadFromDir( RString sPath, Song &out );
|
||||
void GetApplicableFiles( const RString &sPath, vector<RString> &out );
|
||||
bool Loadable( const RString &sPath );
|
||||
bool LoadFromDir( const RString &sPath, Song &out );
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -220,7 +220,7 @@ bool KSFLoader::LoadFromKSFFile( const RString &sPath, Steps &out, const Song &s
|
||||
return true;
|
||||
}
|
||||
|
||||
void KSFLoader::GetApplicableFiles( RString sPath, vector<RString> &out )
|
||||
void KSFLoader::GetApplicableFiles( const RString &sPath, vector<RString> &out )
|
||||
{
|
||||
GetDirListing( sPath + RString("*.ksf"), out );
|
||||
}
|
||||
@@ -342,7 +342,7 @@ bool KSFLoader::LoadGlobalData( const RString &sPath, Song &out )
|
||||
return true;
|
||||
}
|
||||
|
||||
bool KSFLoader::LoadFromDir( RString sDir, Song &out )
|
||||
bool KSFLoader::LoadFromDir( const RString &sDir, Song &out )
|
||||
{
|
||||
LOG->Trace( "Song::LoadFromKSFDir(%s)", sDir.c_str() );
|
||||
|
||||
|
||||
@@ -17,8 +17,8 @@ class KSFLoader: public NotesLoader
|
||||
void LoadTags( const RString &str, Song &out );
|
||||
|
||||
public:
|
||||
void GetApplicableFiles( RString sPath, vector<RString> &out );
|
||||
bool LoadFromDir( RString sDir, Song &out );
|
||||
void GetApplicableFiles( const RString &sPath, vector<RString> &out );
|
||||
bool LoadFromDir( const RString &sDir, Song &out );
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -62,7 +62,7 @@ void SMLoader::LoadFromSMTokens(
|
||||
out.TidyUpData();
|
||||
}
|
||||
|
||||
void SMLoader::GetApplicableFiles( RString sPath, vector<RString> &out )
|
||||
void SMLoader::GetApplicableFiles( const RString &sPath, vector<RString> &out )
|
||||
{
|
||||
GetDirListing( sPath + RString("*.sm"), out );
|
||||
}
|
||||
@@ -225,7 +225,7 @@ bool LoadFromBGChangesString( BackgroundChange &change, const RString &sBGChange
|
||||
return aBGChangeValues.size() >= 2;
|
||||
}
|
||||
|
||||
bool SMLoader::LoadFromSMFile( RString sPath, Song &out )
|
||||
bool SMLoader::LoadFromSMFile( const RString &sPath, Song &out )
|
||||
{
|
||||
LOG->Trace( "Song::LoadFromSMFile(%s)", sPath.c_str() );
|
||||
|
||||
@@ -444,7 +444,7 @@ bool SMLoader::LoadFromSMFile( RString sPath, Song &out )
|
||||
}
|
||||
|
||||
|
||||
bool SMLoader::LoadFromDir( RString sPath, Song &out )
|
||||
bool SMLoader::LoadFromDir( const RString &sPath, Song &out )
|
||||
{
|
||||
vector<RString> aFileNames;
|
||||
GetApplicableFiles( sPath, aFileNames );
|
||||
@@ -483,14 +483,14 @@ bool SMLoader::LoadEdit( RString sEditFilePath, ProfileSlot slot )
|
||||
return LoadEditFromMsd( msd, sEditFilePath, slot );
|
||||
}
|
||||
|
||||
bool SMLoader::LoadEditFromBuffer( const RString &sBuffer, RString sEditFilePath, ProfileSlot slot )
|
||||
bool SMLoader::LoadEditFromBuffer( const RString &sBuffer, const RString &sEditFilePath, ProfileSlot slot )
|
||||
{
|
||||
MsdFile msd;
|
||||
msd.ReadFromString( sBuffer );
|
||||
return LoadEditFromMsd( msd, sEditFilePath, slot );
|
||||
}
|
||||
|
||||
bool SMLoader::LoadEditFromMsd( const MsdFile &msd, RString sEditFilePath, ProfileSlot slot )
|
||||
bool SMLoader::LoadEditFromMsd( const MsdFile &msd, const RString &sEditFilePath, ProfileSlot slot )
|
||||
{
|
||||
Song* pSong = NULL;
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/* SMLoader - Reads a Song from an .SM file. */
|
||||
|
||||
#ifndef NOTES_LOADER_SM_H
|
||||
#define NOTES_LOADER_SM_H
|
||||
#ifndef NotesLoaderSM_H
|
||||
#define NotesLoaderSM_H
|
||||
|
||||
#include "NotesLoader.h"
|
||||
#include "GameConstantsAndTypes.h"
|
||||
@@ -26,22 +26,22 @@ class SMLoader: public NotesLoader
|
||||
|
||||
public:
|
||||
SMLoader() { FromCache = false; }
|
||||
bool LoadFromSMFile( RString sPath, Song &out );
|
||||
bool LoadFromSMFile( RString sPath, Song &out, bool cache )
|
||||
bool LoadFromSMFile( const RString &sPath, Song &out );
|
||||
bool LoadFromSMFile( const RString &sPath, Song &out, bool cache )
|
||||
{
|
||||
FromCache=cache;
|
||||
return LoadFromSMFile( sPath, out );
|
||||
}
|
||||
|
||||
void GetApplicableFiles( RString sPath, vector<RString> &out );
|
||||
bool LoadFromDir( RString sPath, Song &out );
|
||||
void GetApplicableFiles( const RString &sPath, vector<RString> &out );
|
||||
bool LoadFromDir( const RString &sPath, Song &out );
|
||||
void TidyUpData( Song &song, bool cache );
|
||||
static bool LoadTimingFromFile( const RString &fn, TimingData &out );
|
||||
static void LoadTimingFromSMFile( const MsdFile &msd, TimingData &out );
|
||||
static bool LoadEdit( RString sEditFilePath, ProfileSlot slot );
|
||||
static bool LoadEditFromBuffer( const RString &sBuffer, RString sEditFilePath, ProfileSlot slot );
|
||||
static bool LoadEditFromBuffer( const RString &sBuffer, const RString &sEditFilePath, ProfileSlot slot );
|
||||
private:
|
||||
static bool LoadEditFromMsd( const MsdFile &msd, RString sEditFilePath, ProfileSlot slot );
|
||||
static bool LoadEditFromMsd( const MsdFile &msd, const RString &sEditFilePath, ProfileSlot slot );
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user