this time, really allow themers to use either .ssc or .sm simfiles for ScreenGameplaySyncMachine.

This commit is contained in:
AJ Kelly
2011-03-02 01:29:58 -06:00
parent bbfeedab5a
commit 182bb0590c
2 changed files with 9 additions and 5 deletions
+4 -3
View File
@@ -21,15 +21,16 @@ void ScreenGameplaySyncMachine::Init()
RString sFile = THEME->GetPathO("ScreenGameplaySyncMachine","music");
// Allow themers to use .ssc and .sm files. -aj
bool bLoadedSSCFile = SSCLoader::LoadFromSSCFile( sFile, m_Song );
if( !bLoadedSSCFile )
if(sFile.Right(4) == ".ssc")
SSCLoader::LoadFromSSCFile( sFile, m_Song );
else
SMLoader::LoadFromSMFile( sFile, m_Song );
m_Song.SetSongDir( Dirname(sFile) );
m_Song.TidyUpData();
GAMESTATE->m_pCurSong.Set( &m_Song );
// needs proper StepsType - freem
// Needs proper StepsType -freem
vector<Steps*> vpSteps;
SongUtil::GetPlayableSteps( &m_Song, vpSteps );
ASSERT_M(vpSteps.size() > 0, "No playable steps for ScreenGameplaySyncMachine");