diff --git a/Docs/Luadoc/Lua.xml b/Docs/Luadoc/Lua.xml index f063bfdb02..affad2d99a 100644 --- a/Docs/Luadoc/Lua.xml +++ b/Docs/Luadoc/Lua.xml @@ -522,6 +522,7 @@ + @@ -627,6 +628,7 @@ + @@ -1427,8 +1429,8 @@ - + @@ -2103,6 +2105,6 @@ - sm-ssc v1.2.5 - 2011-05-19 + StepMania 5 v5.0 Preview 1 + 2011-06-02 diff --git a/Docs/Luadoc/LuaDocumentation.xml b/Docs/Luadoc/LuaDocumentation.xml index 0f01eb1189..a47d7541a4 100644 --- a/Docs/Luadoc/LuaDocumentation.xml +++ b/Docs/Luadoc/LuaDocumentation.xml @@ -1578,6 +1578,9 @@ The second argument is optional. Apply the GameCommand represented by sCommand for pn, if given. See . + + Removes any stage modifiers that are illegal for course play. + Returns true if enough credits have been inserted to join. @@ -1681,12 +1684,18 @@ Returns an array of s corresponding to Human players. + + Returns the index of the next song in the course. + Returns the master player number. Returns true if the game is Multiplayer. + + Returns the PlayerState for the specified MultiPlayer. + Returns the number of active multiplayer NoteFields. @@ -1723,21 +1732,27 @@ Returns the current Premium. - - - Returns the current beat of the song. + + + Kind of does what it says on the tin. + + + [01 compat.lua] Returns the current beat of the song. + + + [01 compat.lua] Returns the current beat of the song without an offset. Returns the current visible beat of the song. - - Returns the song's current beats per second. + + [01 compat.lua] Returns the song's current beats per second. - - Returns true if a delay is active in the song. + + [01 compat.lua] Returns true if a delay is active in the song. - - Returns true if the song is currently in a freeze. + + [01 compat.lua] Returns true if the song is currently in a freeze. 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 fBeat. - + Returns the current SongPosition. Returns the current SortOrder. diff --git a/src/NotesLoaderSM.cpp b/src/NotesLoaderSM.cpp index c57655d51f..d287660dc5 100644 --- a/src/NotesLoaderSM.cpp +++ b/src/NotesLoaderSM.cpp @@ -84,20 +84,6 @@ void SMLoader::GetApplicableFiles( const RString &sPath, vector &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 ) { 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 aBGChangeValues; @@ -568,7 +507,6 @@ bool SMLoader::LoadFromSMFile( const RString &sPath, Song &out, bool bFromCache } out.m_SongTiming.m_sFile = sPath; - LoadTimingFromSMFile( msd, out.m_SongTiming ); for( unsigned i=0; iUserLog( "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 ); return true; } diff --git a/src/NotesLoaderSM.h b/src/NotesLoaderSM.h index d1c4feded0..94dfdd2dfe 100644 --- a/src/NotesLoaderSM.h +++ b/src/NotesLoaderSM.h @@ -26,8 +26,6 @@ namespace SMLoader bool LoadFromSMFile( const RString &sPath, Song &out, bool bFromCache = false ); void GetApplicableFiles( const RString &sPath, vector &out ); - bool LoadTimingFromFile( const RString &fn, TimingData &out ); - void LoadTimingFromSMFile( const MsdFile &msd, TimingData &out ); bool LoadEditFromFile( RString sEditFilePath, ProfileSlot slot, bool bAddStepsToSong ); bool LoadEditFromBuffer( const RString &sBuffer, const RString &sEditFilePath, ProfileSlot slot ); bool LoadEditFromMsd( const MsdFile &msd, const RString &sEditFilePath, ProfileSlot slot, bool bAddStepsToSong );