[notesloader] More cleanup.
Need to test something in gameplay before continuing.
This commit is contained in:
@@ -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)!" );
|
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;
|
return false;
|
||||||
/*
|
|
||||||
for( unsigned i=0; i<aFileNames.size(); i++ )
|
|
||||||
{
|
|
||||||
if(!LoadFromSMFile( sPath + aFileNames[i], out ))
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ASSERT( aFileNames.size() == 1 );
|
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 );
|
//ASSERT( aFileNames.size() >= 1 );
|
||||||
|
|
||||||
return LoadFromSMFile( sPath + aFileNames[0], out );
|
return LoadFromSMFile( sPath + aFileNames[0], out );
|
||||||
|
|||||||
+6
-1
@@ -29,7 +29,12 @@ struct SMLoader
|
|||||||
virtual void TidyUpData( Song &song, bool bFromCache );
|
virtual void TidyUpData( Song &song, bool bFromCache );
|
||||||
|
|
||||||
bool LoadFromSMFile( const RString &sPath, Song &out, bool bFromCache = false );
|
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 LoadEditFromFile( RString sEditFilePath, ProfileSlot slot, bool bAddStepsToSong );
|
||||||
virtual bool LoadEditFromBuffer( const RString &sBuffer, const RString &sEditFilePath, ProfileSlot slot );
|
virtual bool LoadEditFromBuffer( const RString &sBuffer, const RString &sEditFilePath, ProfileSlot slot );
|
||||||
virtual bool LoadEditFromMsd( const MsdFile &msd, const RString &sEditFilePath, ProfileSlot slot, bool bAddStepsToSong );
|
virtual bool LoadEditFromMsd( const MsdFile &msd, const RString &sEditFilePath, ProfileSlot slot, bool bAddStepsToSong );
|
||||||
|
|||||||
+11
-1
@@ -26,10 +26,20 @@ struct SMALoader : public SMLoader
|
|||||||
bool LoadFromDir( const RString &sPath, Song &out );
|
bool LoadFromDir( const RString &sPath, Song &out );
|
||||||
|
|
||||||
bool LoadFromSMAFile( 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 ProcessBeatsPerMeasure( TimingData &out, const RString sParam );
|
||||||
void ProcessMultipliers( TimingData &out, const int iRowsPerBeat, 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 );
|
virtual void ProcessSpeeds( TimingData &out, const RString line, const int rowsPerBeat );
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -30,8 +30,7 @@ bool SSCLoader::LoadFromDir( const RString &sPath, Song &out )
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
ASSERT( aFileNames.size() == 1 ); // Ensure one was found entirely.
|
ASSERT( aFileNames.size() == 1 );
|
||||||
|
|
||||||
return LoadFromSSCFile( sPath + aFileNames[0], out );
|
return LoadFromSSCFile( sPath + aFileNames[0], out );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ struct SSCLoader : public SMLoader
|
|||||||
* @param sPath a const reference to the path on the hard drive to check.
|
* @param sPath a const reference to the path on the hard drive to check.
|
||||||
* @param out a vector of files found in the path.
|
* @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.
|
* @brief Attempt to load an edit from the hard drive.
|
||||||
* @param sEditFilePath a path on the hard drive to check.
|
* @param sEditFilePath a path on the hard drive to check.
|
||||||
|
|||||||
Reference in New Issue
Block a user