diff --git a/Docs/Changelog_sm-ssc.txt b/Docs/Changelog_sm-ssc.txt index 105f76d9cc..c8afd97265 100644 --- a/Docs/Changelog_sm-ssc.txt +++ b/Docs/Changelog_sm-ssc.txt @@ -18,6 +18,7 @@ sm-ssc v1.2.3 | 201102?? * [ScreenEdit] Display the Player Number for Routine mode. [Wolfman2000] * [ScreenEdit] Add format string metrics for the right hand side of the editor. [Wolfman2000] +* [ScreenGameplaySyncMachine] Allow themes to use either .ssc or .sm files [AJ] 20110221 -------- diff --git a/src/ScreenGameplaySyncMachine.cpp b/src/ScreenGameplaySyncMachine.cpp index 62ca1d3d29..150d9c7b81 100644 --- a/src/ScreenGameplaySyncMachine.cpp +++ b/src/ScreenGameplaySyncMachine.cpp @@ -1,6 +1,7 @@ #include "global.h" #include "ScreenGameplaySyncMachine.h" #include "NotesLoaderSSC.h" +#include "NotesLoaderSM.h" #include "GameState.h" #include "GameManager.h" #include "PrefsManager.h" @@ -19,7 +20,11 @@ void ScreenGameplaySyncMachine::Init() AdjustSync::ResetOriginalSyncData(); RString sFile = THEME->GetPathO("ScreenGameplaySyncMachine","music"); - SSCLoader::LoadFromSSCFile( sFile, m_Song ); + // Allow themers to use .ssc and .sm files. -aj + bool bLoadedSSCFile = SSCLoader::LoadFromSSCFile( sFile, m_Song ); + if( !bLoadedSSCFile ) + SMLoader::LoadFromSMFile( sFile, m_Song ); + m_Song.SetSongDir( Dirname(sFile) ); m_Song.TidyUpData(); @@ -27,7 +32,7 @@ void ScreenGameplaySyncMachine::Init() // needs proper StepsType - freem vector vpSteps; SongUtil::GetPlayableSteps( &m_Song, vpSteps ); - ASSERT(vpSteps.size() > 0); + ASSERT_M(vpSteps.size() > 0, "No playable steps for ScreenGameplaySyncMachine"); Steps *pSteps = vpSteps[0]; GAMESTATE->m_pCurSteps[0].Set( pSteps );