diff --git a/Docs/Changelog_sm-ssc.txt b/Docs/Changelog_sm-ssc.txt index 8138cab2a1..52a743c94c 100644 --- a/Docs/Changelog_sm-ssc.txt +++ b/Docs/Changelog_sm-ssc.txt @@ -18,6 +18,7 @@ sm-ssc v1.2.3 | 201102?? * Reverted ArrowSpacing back to 64 (which was the previous value). Please re-adjust your speed mods accordingly. [AJ] * [OptionRow] Added GetLayoutType() and GetSelectType() Lua bindings. [AJ] +* Fix .sm-style edits not being loaded. [AJ] ================================================================================ sm-ssc v1.2.2 | 20110220 diff --git a/src/NotesLoaderSSC.cpp b/src/NotesLoaderSSC.cpp index 63be9cacde..0bcd9b35b0 100644 --- a/src/NotesLoaderSSC.cpp +++ b/src/NotesLoaderSSC.cpp @@ -951,7 +951,7 @@ bool SSCLoader::LoadEditFromMsd( const MsdFile &msd, const RString &sEditFilePat Song* pSong = NULL; Steps* pNewNotes; bool bSSCFormat = false; - + for( unsigned i=0; iUserLog( "Edit file", sEditFilePath, "has more than one #SONG tag." ); return false; } - + RString sSongFullTitle = sParams[1]; sSongFullTitle.Replace( '\\', '/' ); - + pSong = SONGMAN->FindSong( sSongFullTitle ); if( pSong == NULL ) { LOG->UserLog( "Edit file", sEditFilePath, "requires a song \"%s\" that isn't present.", sSongFullTitle.c_str() ); return false; } - + if( pSong->GetNumStepsLoadedFromProfile(slot) >= MAX_EDITS_PER_SONG_PER_PROFILE ) { LOG->UserLog( "Song file", sSongFullTitle, "already has the maximum number of edits allowed for ProfileSlotP%d.", slot+1 ); return false; } } + else if( sValueName=="NOTEDATA" ) { pNewNotes = new Steps; @@ -1107,7 +1108,7 @@ bool SSCLoader::LoadEditFromMsd( const MsdFile &msd, const RString &sEditFilePat SAFE_DELETE( pNewNotes ); return false; } - + pSong->AddSteps( pNewNotes ); return true; // Only allow one Steps per edit file! } @@ -1117,7 +1118,9 @@ bool SSCLoader::LoadEditFromMsd( const MsdFile &msd, const RString &sEditFilePat } } - return true; + //return true; + // only load a SSC edit if it passes the checks. -aj + return bSSCFormat; } void SSCLoader::TidyUpData( Song &song, bool bFromCache ) diff --git a/src/SongManager.cpp b/src/SongManager.cpp index dfd342657a..5f5376b8b7 100644 --- a/src/SongManager.cpp +++ b/src/SongManager.cpp @@ -16,6 +16,7 @@ #include "NoteSkinManager.h" #include "NotesLoaderDWI.h" #include "NotesLoaderSSC.h" +#include "NotesLoaderSM.h" #include "PrefsManager.h" #include "Profile.h" #include "ProfileManager.h" @@ -460,10 +461,8 @@ RageColor SongManager::GetSongColor( const Song* pSong ) const } else { - - /* XXX: - * Previously, this matched all notes, which set a song to "extra" if - * it had any 10-foot steps at all, even edits or doubles. + /* XXX: Previously, this matched all notes, which set a song to "extra" + * if it had any 10-foot steps at all, even edits or doubles. * * For now, only look at notes for the current note type. This means * that if a song has 10-foot steps on Doubles, it'll only show up red @@ -471,8 +470,7 @@ RageColor SongManager::GetSongColor( const Song* pSong ) const * in the song scroll, which is a little odd but harmless. * * XXX: Ack. This means this function can only be called when we have - * a style set up, which is too restrictive. How to handle this? - */ + * a style set up, which is too restrictive. How to handle this? */ //const StepsType st = GAMESTATE->GetCurrentStyle()->m_StepsType; const vector& vpSteps = pSong->GetAllSteps(); for( unsigned i=0; i