Etterna 0.74.4
|
Reads a Song from an .SM file. More...
#include <NotesLoaderSM.h>
Public Member Functions | |
SMLoader (std::string ext) | |
virtual bool | LoadFromDir (const std::string &sPath, Song &out) |
Attempt to load a song from a specified path. | |
virtual bool | LoadNoteDataFromSimfile (const std::string &path, Steps &out) |
Retrieve the relevant notedata from the simfile. | |
virtual bool | LoadFromSimfile (const std::string &sPath, Song &out, bool bFromCache=false) |
Attempt to load the specified sm file. | |
virtual void | GetApplicableFiles (const std::string &sPath, std::vector< std::string > &out) |
Retrieve the list of .sm files. | |
virtual bool | LoadFromBGChangesString (BackgroundChange &change, const std::string &sBGChangeExpression) |
void | ParseBPMs (std::vector< std::pair< float, float > > &out, const std::string &line, const int rowsPerBeat=-1) |
Parse BPM Changes data from a string. | |
void | ProcessBPMs (TimingData &out, const std::vector< std::pair< float, float > > &vBPMChanges) |
Process the BPM Segments from the string. | |
void | ParseStops (std::vector< std::pair< float, float > > &out, const std::string &line, const int rowsPerBeat=-1) |
Parse Stops data from a string. | |
void | ProcessStops (TimingData &out, const std::vector< std::pair< float, float > > &vStops) |
Process the Stop Segments from the data. | |
void | ProcessBPMsAndStops (TimingData &out, std::vector< std::pair< float, float > > &vBPMs, std::vector< std::pair< float, float > > &vStops) |
Process BPM and stop segments from the data. | |
void | ProcessDelays (TimingData &out, const std::string &line, const int rowsPerBeat=-1) |
Process the Delay Segments from the string. | |
void | ProcessTimeSignatures (TimingData &out, const std::string &line, const int rowsPerBeat=-1) |
Process the Time Signature Segments from the string. | |
void | ProcessTickcounts (TimingData &out, const std::string &line, const int rowsPerBeat=-1) |
Process the Tickcount Segments from the string. | |
virtual void | ProcessSpeeds (TimingData &out, const std::string &line, const int rowsPerBeat=-1) |
Process the Speed Segments from the string. | |
virtual void | ProcessCombos (TimingData &, const std::string &line, const int=-1) |
virtual void | ProcessFakes (TimingData &out, const std::string &line, const int rowsPerBeat=-1) |
Process the Fake Segments from the string. | |
virtual void | ProcessBGChanges (Song &out, const std::string &sValueName, const std::string &sPath, const std::string &sParam) |
void | ProcessInstrumentTracks (Song &out, const std::string &sParam) |
virtual void | SetSongTitle (const std::string &title) |
Set the song title. | |
virtual std::string | GetSongTitle () const |
Get the song title. | |
Static Public Member Functions | |
static void | TidyUpData (Song &song, bool bFromCache) |
Perform some cleanup on the loaded song. | |
static void | ProcessDelays (TimingData &out, const std::string &line, const std::string &songname, const int rowsPerBeat=-1) |
static void | ProcessTimeSignatures (TimingData &out, const std::string &line, const std::string &songname, const int rowsPerBeat=-1) |
static void | ProcessTickcounts (TimingData &out, const std::string &line, const std::string &songname, const int rowsPerBeat=-1) |
static void | ProcessSpeeds (TimingData &out, const std::string &line, const std::string &songname, const int rowsPerBeat=-1) |
static void | ProcessFakes (TimingData &out, const std::string &line, const std::string &songname, const int rowsPerBeat=-1) |
static float | RowToBeat (const std::string &line, const int rowsPerBeat) |
Convert a row value to the proper beat value. | |
Protected Member Functions | |
virtual void | LoadFromTokens (std::string sStepsType, std::string sDescription, std::string sDifficulty, std::string sMeter, std::string sNoteData, Steps &out) |
Process the different tokens we have available to get NoteData. | |
std::string | GetFileExtension () const |
Retrieve the file extension associated with this loader. | |
std::string | GetChartPath () const |
Get the chart path. | |
Reads a Song from an .SM file.
|
virtual |
Retrieve the list of .sm files.
sPath | a const reference to the path on the hard drive to check. |
out | a vector of files found in the path. |
|
inlineprotected |
Get the chart path.
|
inlineprotected |
Retrieve the file extension associated with this loader.
|
virtual |
Get the song title.
|
virtual |
Attempt to load a song from a specified path.
sPath | a const reference to the path on the hard drive to check. |
out | a reference to the Song that will retrieve the song information. |
|
virtual |
Attempt to load the specified sm file.
sPath | a const reference to the path on the hard drive to check. |
out | a reference to the Song that will retrieve the song information. |
bFromCache | a check to see if we are getting certain information from the cache file. |
|
protectedvirtual |
Process the different tokens we have available to get NoteData.
stepsType | The current StepsType. |
description | The description of the chart. |
difficulty | The difficulty (in words) of the chart. |
meter | the difficulty (in numbers) of the chart. |
radarValues | the calculated radar values. |
noteData | the note data itself. |
out | the Steps getting the data. |
|
virtual |
void SMLoader::ParseBPMs | ( | std::vector< std::pair< float, float > > & | out, |
const std::string & | line, | ||
const int | rowsPerBeat = -1 |
||
) |
Parse BPM Changes data from a string.
out | the vector to put the data in. |
line | the string in question. |
rowsPerBeat | the number of rows per beat for this purpose. |
void SMLoader::ParseStops | ( | std::vector< std::pair< float, float > > & | out, |
const std::string & | line, | ||
const int | rowsPerBeat = -1 |
||
) |
Parse Stops data from a string.
out | the vector to put the data in. |
line | the string in question. |
rowsPerBeat | the number of rows per beat for this purpose. |
void SMLoader::ProcessBPMs | ( | TimingData & | out, |
const std::vector< std::pair< float, float > > & | vBPMChanges | ||
) |
Process the BPM Segments from the string.
out | the TimingData being modified. |
vBPMChanges | the vector of BPM Changes data. |
void SMLoader::ProcessBPMsAndStops | ( | TimingData & | out, |
std::vector< std::pair< float, float > > & | vBPMs, | ||
std::vector< std::pair< float, float > > & | vStops | ||
) |
Process BPM and stop segments from the data.
out | the TimingData being modified. |
vBPMs | the vector of BPM changes. |
vStops | the vector of stops. |
void SMLoader::ProcessDelays | ( | TimingData & | out, |
const std::string & | line, | ||
const int | rowsPerBeat = -1 |
||
) |
Process the Delay Segments from the string.
out | the TimingData being modified. |
line | the string in question. |
rowsPerBeat | the number of rows per beat for this purpose. |
|
virtual |
Process the Fake Segments from the string.
out | the TimingData being modified. |
line | the string in question. |
rowsPerBeat | the number of rows per beat for this purpose. |
|
virtual |
Process the Speed Segments from the string.
out | the TimingData being modified. |
line | the string in question. |
rowsPerBeat | the number of rows per beat for this purpose. |
Reimplemented in SMALoader.
void SMLoader::ProcessStops | ( | TimingData & | out, |
const std::vector< std::pair< float, float > > & | vStops | ||
) |
Process the Stop Segments from the data.
out | the TimingData being modified. |
vStops | the vector of Stops data. |
void SMLoader::ProcessTickcounts | ( | TimingData & | out, |
const std::string & | line, | ||
const int | rowsPerBeat = -1 |
||
) |
Process the Tickcount Segments from the string.
out | the TimingData being modified. |
line | the string in question. |
rowsPerBeat | the number of rows per beat for this purpose. |
void SMLoader::ProcessTimeSignatures | ( | TimingData & | out, |
const std::string & | line, | ||
const int | rowsPerBeat = -1 |
||
) |
Process the Time Signature Segments from the string.
out | the TimingData being modified. |
line | the string in question. |
rowsPerBeat | the number of rows per beat for this purpose. |
|
static |
Convert a row value to the proper beat value.
This is primarily used for assistance with converting SMA files.
line | The line that contains the value. |
rowsPerBeat | the number of rows per beat according to the original file. |
|
virtual |
Set the song title.
t | the song title. |
|
static |
Perform some cleanup on the loaded song.
song | a reference to the song that may need cleaning up. |
bFromCache | a flag to determine if this song is loaded from a cache file. |