Merge with default
This commit is contained in:
+5
-3
@@ -522,6 +522,7 @@
|
|||||||
<Function name='SetFromCourse'/>
|
<Function name='SetFromCourse'/>
|
||||||
<Function name='SetFromGameState'/>
|
<Function name='SetFromGameState'/>
|
||||||
<Function name='SetFromSong'/>
|
<Function name='SetFromSong'/>
|
||||||
|
<Function name='SetFromSteps'/>
|
||||||
</Class>
|
</Class>
|
||||||
<Class base='Sprite' name='Banner'>
|
<Class base='Sprite' name='Banner'>
|
||||||
<Function name='GetPercentScrolling'/>
|
<Function name='GetPercentScrolling'/>
|
||||||
@@ -627,6 +628,7 @@
|
|||||||
<Class name='CryptManager'>
|
<Class name='CryptManager'>
|
||||||
<Function name='MD5File'/>
|
<Function name='MD5File'/>
|
||||||
<Function name='MD5String'/>
|
<Function name='MD5String'/>
|
||||||
|
<Function name='SHA1File'/>
|
||||||
<Function name='SHA1String'/>
|
<Function name='SHA1String'/>
|
||||||
</Class>
|
</Class>
|
||||||
<Class base='Sprite' name='DifficultyIcon'>
|
<Class base='Sprite' name='DifficultyIcon'>
|
||||||
@@ -1427,8 +1429,8 @@
|
|||||||
<Function name='HasBPMChanges'/>
|
<Function name='HasBPMChanges'/>
|
||||||
<Function name='HasFakes'/>
|
<Function name='HasFakes'/>
|
||||||
<Function name='HasNegativeBPMs'/>
|
<Function name='HasNegativeBPMs'/>
|
||||||
<Function name='HasSpeedChanges'/>
|
|
||||||
<Function name='HasScrollChanges'/>
|
<Function name='HasScrollChanges'/>
|
||||||
|
<Function name='HasSpeedChanges'/>
|
||||||
<Function name='HasStops'/>
|
<Function name='HasStops'/>
|
||||||
<Function name='HasWarps'/>
|
<Function name='HasWarps'/>
|
||||||
</Class>
|
</Class>
|
||||||
@@ -2103,6 +2105,6 @@
|
|||||||
<Constant name='sGame' value=''dance''/>
|
<Constant name='sGame' value=''dance''/>
|
||||||
<Constant name='top' value=''VertAlign_Top''/>
|
<Constant name='top' value=''VertAlign_Top''/>
|
||||||
</Constants>
|
</Constants>
|
||||||
<Version>sm-ssc v1.2.5</Version>
|
<Version>StepMania 5 v5.0 Preview 1</Version>
|
||||||
<Date>2011-05-19</Date>
|
<Date>2011-06-02</Date>
|
||||||
</Lua>
|
</Lua>
|
||||||
|
|||||||
@@ -1578,6 +1578,9 @@
|
|||||||
The second argument is optional. Apply the GameCommand represented by <code>sCommand</code>
|
The second argument is optional. Apply the GameCommand represented by <code>sCommand</code>
|
||||||
for <code>pn</code>, if given. See <Link class='GameCommand' />.
|
for <code>pn</code>, if given. See <Link class='GameCommand' />.
|
||||||
</Function>
|
</Function>
|
||||||
|
<Function name='ClearStageModifiersIllegalForCourse' return='void' arguments=''>
|
||||||
|
Removes any stage modifiers that are illegal for course play.
|
||||||
|
</Function>
|
||||||
<Function name='EnoughCreditsToJoin' return='bool' arguments=''>
|
<Function name='EnoughCreditsToJoin' return='bool' arguments=''>
|
||||||
Returns <code>true</code> if enough credits have been inserted to join.
|
Returns <code>true</code> if enough credits have been inserted to join.
|
||||||
</Function>
|
</Function>
|
||||||
@@ -1681,12 +1684,18 @@
|
|||||||
<Function name='GetHumanPlayers' return='{PlayerNumber}' arguments=''>
|
<Function name='GetHumanPlayers' return='{PlayerNumber}' arguments=''>
|
||||||
Returns an array of <Link class='PlayerNumber' />s corresponding to Human players.
|
Returns an array of <Link class='PlayerNumber' />s corresponding to Human players.
|
||||||
</Function>
|
</Function>
|
||||||
|
<Function name='GetLoadingCourseSongIndex' return='int' arguments=''>
|
||||||
|
Returns the index of the next song in the course.
|
||||||
|
</Function>
|
||||||
<Function name='GetMasterPlayerNumber' return='PlayerNumber' arguments=''>
|
<Function name='GetMasterPlayerNumber' return='PlayerNumber' arguments=''>
|
||||||
Returns the master player number.
|
Returns the master player number.
|
||||||
</Function>
|
</Function>
|
||||||
<Function name='GetMultiplayer' return='bool' arguments=''>
|
<Function name='GetMultiplayer' return='bool' arguments=''>
|
||||||
Returns <code>true</code> if the game is Multiplayer.
|
Returns <code>true</code> if the game is Multiplayer.
|
||||||
</Function>
|
</Function>
|
||||||
|
<Function name='GetMultiPlayerState' return='PlayerState' arguments='MultiPlayer mp'>
|
||||||
|
Returns the PlayerState for the specified MultiPlayer.
|
||||||
|
</Function>
|
||||||
<Function name='GetNumMultiplayerNoteFields' return='int' arguments=''>
|
<Function name='GetNumMultiplayerNoteFields' return='int' arguments=''>
|
||||||
Returns the number of active multiplayer NoteFields.
|
Returns the number of active multiplayer NoteFields.
|
||||||
</Function>
|
</Function>
|
||||||
@@ -1723,21 +1732,27 @@
|
|||||||
<Function name='GetPremium' return='Premium' arguments=''>
|
<Function name='GetPremium' return='Premium' arguments=''>
|
||||||
Returns the current Premium.
|
Returns the current Premium.
|
||||||
</Function>
|
</Function>
|
||||||
<Function name='GetSongBeat' return='float' arguments=''>
|
<Function name='GetSmallestNumStagesLeftForAnyHumanPlayer' return='int' arguments=''>
|
||||||
<!-- XXX: Not exactly sure on this. -->
|
<!-- Returns the smallest number of stages left for any human player. -->
|
||||||
Returns the current beat of the song.
|
Kind of does what it says on the tin.
|
||||||
|
</Function>
|
||||||
|
<Function name='GetSongBeat' theme='_fallback' return='float' arguments=''>
|
||||||
|
[01 compat.lua] Returns the current beat of the song.
|
||||||
|
</Function>
|
||||||
|
<Function name='GetSongBeatNoOffset' theme='_fallback' return='float' arguments=''>
|
||||||
|
[01 compat.lua] Returns the current beat of the song without an offset.
|
||||||
</Function>
|
</Function>
|
||||||
<Function name='GetSongBeatVisible' return='float' arguments=''>
|
<Function name='GetSongBeatVisible' return='float' arguments=''>
|
||||||
Returns the current visible beat of the song.
|
Returns the current visible beat of the song.
|
||||||
</Function>
|
</Function>
|
||||||
<Function name='GetSongBPS' return='float' arguments=''>
|
<Function name='GetSongBPS' theme='_fallback' return='float' arguments=''>
|
||||||
Returns the song's current beats per second.
|
[01 compat.lua] Returns the song's current beats per second.
|
||||||
</Function>
|
</Function>
|
||||||
<Function name='GetSongDelay' sm-ssc='true' return='bool' arguments=''>
|
<Function name='GetSongDelay' theme='_fallback' return='bool' arguments=''>
|
||||||
Returns <code>true</code> if a delay is active in the song.
|
[01 compat.lua] Returns <code>true</code> if a delay is active in the song.
|
||||||
</Function>
|
</Function>
|
||||||
<Function name='GetSongFreeze' return='bool' arguments=''>
|
<Function name='GetSongFreeze' theme='_fallback' return='bool' arguments=''>
|
||||||
Returns <code>true</code> if the song is currently in a freeze.
|
[01 compat.lua] Returns <code>true</code> if the song is currently in a freeze.
|
||||||
</Function>
|
</Function>
|
||||||
<Function name='GetSongOptions' return='string' arguments='ModsLevel ml'>
|
<Function name='GetSongOptions' return='string' arguments='ModsLevel ml'>
|
||||||
Returns the song options for the specified ModsLevel as a string.
|
Returns the song options for the specified ModsLevel as a string.
|
||||||
@@ -1749,7 +1764,7 @@
|
|||||||
Returns how much of the song is through at beat <code>fBeat</code>.
|
Returns how much of the song is through at beat <code>fBeat</code>.
|
||||||
</Function>
|
</Function>
|
||||||
<Function name='GetSongPosition' sm-ssc='true' return='SongPosition' arguments=''>
|
<Function name='GetSongPosition' sm-ssc='true' return='SongPosition' arguments=''>
|
||||||
<!-- todo -->
|
Returns the current SongPosition.
|
||||||
</Function>
|
</Function>
|
||||||
<Function name='GetSortOrder' return='SortOrder' arguments=''>
|
<Function name='GetSortOrder' return='SortOrder' arguments=''>
|
||||||
Returns the current SortOrder.
|
Returns the current SortOrder.
|
||||||
|
|||||||
+35
-67
@@ -84,20 +84,6 @@ void SMLoader::GetApplicableFiles( const RString &sPath, vector<RString> &out )
|
|||||||
GetDirListing( sPath + RString("*.sm"), out );
|
GetDirListing( sPath + RString("*.sm"), out );
|
||||||
}
|
}
|
||||||
|
|
||||||
bool SMLoader::LoadTimingFromFile( const RString &fn, TimingData &out )
|
|
||||||
{
|
|
||||||
MsdFile msd;
|
|
||||||
if( !msd.ReadFile( fn, true ) ) // unescape
|
|
||||||
{
|
|
||||||
LOG->UserLog( "Song file", fn, "couldn't be loaded: %s", msd.GetError().c_str() );
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
out.m_sFile = fn;
|
|
||||||
LoadTimingFromSMFile( msd, out );
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
void SMLoader::ProcessBGChanges( Song &out, const RString &sValueName, const RString &sPath, const RString &sParam )
|
void SMLoader::ProcessBGChanges( Song &out, const RString &sValueName, const RString &sPath, const RString &sParam )
|
||||||
{
|
{
|
||||||
BackgroundLayer iLayer = BACKGROUND_LAYER_1;
|
BackgroundLayer iLayer = BACKGROUND_LAYER_1;
|
||||||
@@ -423,53 +409,6 @@ void SMLoader::ProcessTickcounts( TimingData &out, const RString sParam )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void SMLoader::LoadTimingFromSMFile( const MsdFile &msd, TimingData &out )
|
|
||||||
{
|
|
||||||
out.m_fBeat0OffsetInSeconds = 0;
|
|
||||||
out.m_BPMSegments.clear();
|
|
||||||
out.m_StopSegments.clear();
|
|
||||||
out.m_WarpSegments.clear();
|
|
||||||
out.m_vTimeSignatureSegments.clear();
|
|
||||||
|
|
||||||
for( unsigned i=0; i<msd.GetNumValues(); i++ )
|
|
||||||
{
|
|
||||||
const MsdFile::value_t &sParams = msd.GetValue(i);
|
|
||||||
RString sValueName = sParams[0];
|
|
||||||
sValueName.MakeUpper();
|
|
||||||
|
|
||||||
if( sValueName=="OFFSET" )
|
|
||||||
{
|
|
||||||
out.m_fBeat0OffsetInSeconds = StringToFloat( sParams[1] );
|
|
||||||
}
|
|
||||||
else if( sValueName=="BPMS" )
|
|
||||||
{
|
|
||||||
ProcessBPMs(out, sParams[1]);
|
|
||||||
}
|
|
||||||
|
|
||||||
else if( sValueName=="STOPS" || sValueName=="FREEZES" )
|
|
||||||
{
|
|
||||||
ProcessStops(out, sParams[1]);
|
|
||||||
}
|
|
||||||
|
|
||||||
else if( sValueName=="DELAYS" )
|
|
||||||
{
|
|
||||||
ProcessDelays(out, sParams[1]);
|
|
||||||
}
|
|
||||||
|
|
||||||
else if( sValueName=="TIMESIGNATURES" )
|
|
||||||
{
|
|
||||||
ProcessTimeSignatures(out, sParams[1]);
|
|
||||||
}
|
|
||||||
|
|
||||||
else if( sValueName=="TICKCOUNTS" )
|
|
||||||
{
|
|
||||||
ProcessTickcounts(out, sParams[1]);
|
|
||||||
}
|
|
||||||
// Ensure all of the warps are handled right.
|
|
||||||
sort(out.m_WarpSegments.begin(), out.m_WarpSegments.end());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
bool SMLoader::LoadFromBGChangesString( BackgroundChange &change, const RString &sBGChangeExpression )
|
bool SMLoader::LoadFromBGChangesString( BackgroundChange &change, const RString &sBGChangeExpression )
|
||||||
{
|
{
|
||||||
vector<RString> aBGChangeValues;
|
vector<RString> aBGChangeValues;
|
||||||
@@ -568,7 +507,6 @@ bool SMLoader::LoadFromSMFile( const RString &sPath, Song &out, bool bFromCache
|
|||||||
}
|
}
|
||||||
|
|
||||||
out.m_SongTiming.m_sFile = sPath;
|
out.m_SongTiming.m_sFile = sPath;
|
||||||
LoadTimingFromSMFile( msd, out.m_SongTiming );
|
|
||||||
|
|
||||||
for( unsigned i=0; i<msd.GetNumValues(); i++ )
|
for( unsigned i=0; i<msd.GetNumValues(); i++ )
|
||||||
{
|
{
|
||||||
@@ -620,6 +558,36 @@ bool SMLoader::LoadFromSMFile( const RString &sPath, Song &out, bool bFromCache
|
|||||||
else if( sValueName=="MUSIC" )
|
else if( sValueName=="MUSIC" )
|
||||||
out.m_sMusicFile = sParams[1];
|
out.m_sMusicFile = sParams[1];
|
||||||
|
|
||||||
|
else if( sValueName=="OFFSET" )
|
||||||
|
{
|
||||||
|
out.m_fBeat0OffsetInSeconds = StringToFloat( sParams[1] );
|
||||||
|
}
|
||||||
|
else if( sValueName=="BPMS" )
|
||||||
|
{
|
||||||
|
ProcessBPMs(out.m_SongTiming, sParams[1]);
|
||||||
|
}
|
||||||
|
|
||||||
|
else if( sValueName=="STOPS" || sValueName=="FREEZES" )
|
||||||
|
{
|
||||||
|
ProcessStops(out.m_SongTiming, sParams[1]);
|
||||||
|
}
|
||||||
|
|
||||||
|
else if( sValueName=="DELAYS" )
|
||||||
|
{
|
||||||
|
ProcessDelays(out.m_SongTiming, sParams[1]);
|
||||||
|
}
|
||||||
|
|
||||||
|
else if( sValueName=="TIMESIGNATURES" )
|
||||||
|
{
|
||||||
|
ProcessTimeSignatures(out.m_SongTiming, sParams[1]);
|
||||||
|
}
|
||||||
|
|
||||||
|
else if( sValueName=="TICKCOUNTS" )
|
||||||
|
{
|
||||||
|
ProcessTickcounts(out.m_SongTiming, sParams[1]);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
else if( sValueName=="INSTRUMENTTRACK" )
|
else if( sValueName=="INSTRUMENTTRACK" )
|
||||||
{
|
{
|
||||||
ProcessInstrumentTracks( out, sParams[1] );
|
ProcessInstrumentTracks( out, sParams[1] );
|
||||||
@@ -762,15 +730,15 @@ bool SMLoader::LoadFromSMFile( const RString &sPath, Song &out, bool bFromCache
|
|||||||
|
|
||||||
out.AddSteps( pNewNotes );
|
out.AddSteps( pNewNotes );
|
||||||
}
|
}
|
||||||
/*
|
// XXX: Does anyone know what LEADTRACK is for? -Wolfman2000
|
||||||
* We used to check for timing data in this section. That has
|
else if( sValueName=="LEADTRACK" )
|
||||||
* since been moved to a dedicated function.
|
|
||||||
*/
|
|
||||||
else if( sValueName=="OFFSET" || sValueName=="BPMS" || sValueName=="STOPS" || sValueName=="FREEZES" || sValueName=="DELAYS" || sValueName=="TIMESIGNATURES" || sValueName=="LEADTRACK" || sValueName=="TICKCOUNTS" )
|
|
||||||
;
|
;
|
||||||
else
|
else
|
||||||
LOG->UserLog( "Song file", sPath, "has an unexpected value named \"%s\".", sValueName.c_str() );
|
LOG->UserLog( "Song file", sPath, "has an unexpected value named \"%s\".", sValueName.c_str() );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Ensure all warps from negative time changes are in order.
|
||||||
|
sort(out.m_SongTiming.m_WarpSegments.begin(), out.m_SongTiming.m_WarpSegments.end());
|
||||||
TidyUpData( out, bFromCache );
|
TidyUpData( out, bFromCache );
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,8 +26,6 @@ namespace SMLoader
|
|||||||
|
|
||||||
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 );
|
void GetApplicableFiles( const RString &sPath, vector<RString> &out );
|
||||||
bool LoadTimingFromFile( const RString &fn, TimingData &out );
|
|
||||||
void LoadTimingFromSMFile( const MsdFile &msd, TimingData &out );
|
|
||||||
bool LoadEditFromFile( RString sEditFilePath, ProfileSlot slot, bool bAddStepsToSong );
|
bool LoadEditFromFile( RString sEditFilePath, ProfileSlot slot, bool bAddStepsToSong );
|
||||||
bool LoadEditFromBuffer( const RString &sBuffer, const RString &sEditFilePath, ProfileSlot slot );
|
bool LoadEditFromBuffer( const RString &sBuffer, const RString &sEditFilePath, ProfileSlot slot );
|
||||||
bool LoadEditFromMsd( const MsdFile &msd, const RString &sEditFilePath, ProfileSlot slot, bool bAddStepsToSong );
|
bool LoadEditFromMsd( const MsdFile &msd, const RString &sEditFilePath, ProfileSlot slot, bool bAddStepsToSong );
|
||||||
|
|||||||
Reference in New Issue
Block a user