[notesloader] More cleanup.

Need to test something in gameplay before continuing.
This commit is contained in:
Jason Felds
2011-06-09 15:14:47 -04:00
parent dec615a2e7
commit 68fd21fdc8
5 changed files with 19 additions and 15 deletions
-10
View File
@@ -25,19 +25,9 @@ bool SMLoader::LoadFromDir( const RString &sPath, Song &out )
{
LOG->UserLog( "Song", sPath, "has more than one SM file. There can be only one (unless you are using TougaKiryuu's AnimeMix files somehow, which assume a different version of StepMania)!" );
return false;
/*
for( unsigned i=0; i<aFileNames.size(); i++ )
{
if(!LoadFromSMFile( sPath + aFileNames[i], out ))
return false;
}
return true;
*/
}
ASSERT( aFileNames.size() == 1 );
/* We should have at least one; if we had none, we shouldn't have been
* called to begin with. */
//ASSERT( aFileNames.size() >= 1 );
return LoadFromSMFile( sPath + aFileNames[0], out );
+6 -1
View File
@@ -29,7 +29,12 @@ struct SMLoader
virtual void TidyUpData( Song &song, bool bFromCache );
bool LoadFromSMFile( const RString &sPath, Song &out, bool bFromCache = false );
void GetApplicableFiles( const RString &sPath, vector<RString> &out );
/**
* @brief Retrieve the list of .sm files.
* @param sPath a const reference to the path on the hard drive to check.
* @param out a vector of files found in the path.
*/
virtual void GetApplicableFiles( const RString &sPath, vector<RString> &out );
virtual bool LoadEditFromFile( RString sEditFilePath, ProfileSlot slot, bool bAddStepsToSong );
virtual bool LoadEditFromBuffer( const RString &sBuffer, const RString &sEditFilePath, ProfileSlot slot );
virtual bool LoadEditFromMsd( const MsdFile &msd, const RString &sEditFilePath, ProfileSlot slot, bool bAddStepsToSong );
+11 -1
View File
@@ -26,10 +26,20 @@ struct SMALoader : public SMLoader
bool LoadFromDir( const RString &sPath, Song &out );
bool LoadFromSMAFile( const RString &sPath, Song &out );
void GetApplicableFiles( const RString &sPath, vector<RString> &out );
/**
* @brief Retrieve the list of .sma files.
* @param sPath a const reference to the path on the hard drive to check.
* @param out a vector of files found in the path.
*/
virtual void GetApplicableFiles( const RString &sPath, vector<RString> &out );
void ProcessBeatsPerMeasure( TimingData &out, const RString sParam );
void ProcessMultipliers( TimingData &out, const int iRowsPerBeat, const RString sParam );
/**
* @brief Process the Speed Segments from the string.
* @param out the TimingData being modified.
* @param line the string in question.
* @param rowsPerBeat the number of rows per beat for this purpose. */
virtual void ProcessSpeeds( TimingData &out, const RString line, const int rowsPerBeat );
};
+1 -2
View File
@@ -30,8 +30,7 @@ bool SSCLoader::LoadFromDir( const RString &sPath, Song &out )
return false;
}
ASSERT( aFileNames.size() == 1 ); // Ensure one was found entirely.
ASSERT( aFileNames.size() == 1 );
return LoadFromSSCFile( sPath + aFileNames[0], out );
}
+1 -1
View File
@@ -52,7 +52,7 @@ struct SSCLoader : public SMLoader
* @param sPath a const reference to the path on the hard drive to check.
* @param out a vector of files found in the path.
*/
void GetApplicableFiles( const RString &sPath, vector<RString> &out );
virtual void GetApplicableFiles( const RString &sPath, vector<RString> &out );
/**
* @brief Attempt to load an edit from the hard drive.
* @param sEditFilePath a path on the hard drive to check.