[ScreenHowToPlay] Allow themers to use either .ssc or .sm files.

(update comment on ScreenGameplaySyncMachine)
This commit is contained in:
AJ Kelly
2011-03-02 01:33:29 -06:00
parent 182bb0590c
commit 402000e6e0
3 changed files with 10 additions and 7 deletions
+7 -5
View File
@@ -133,17 +133,19 @@ void ScreenHowToPlay::Init()
ActorUtil::LoadAllCommandsAndSetXY( m_pLifeMeterBar, m_sName );
m_pLifeMeterBar->FillForHowToPlay( NUM_W2S, NUM_MISSES );
// Allow themers to use .ssc and .sm files. -aj
bool bLoadedSSCFile = SSCLoader::LoadFromSSCFile( THEME->GetPathO(m_sName, "steps"), m_Song, false );
if( !bLoadedSSCFile )
SMLoader::LoadFromSMFile( THEME->GetPathO(m_sName, "steps"), m_Song, false );
// Allow themers to use either a .ssc or .sm file for this. -aj
RString sStepsPath = THEME->GetPathO(m_sName, "steps");
if( sPath.Right(4) == ".ssc" )
SSCLoader::LoadFromSSCFile( sStepsPath, m_Song, false );
else
SMLoader::LoadFromSMFile( sStepsPath, m_Song, false );
m_Song.AddAutoGenNotes();
const Style* pStyle = GAMESTATE->GetCurrentStyle();
Steps *pSteps = SongUtil::GetStepsByDescription( &m_Song, pStyle->m_StepsType, "" );
// todo: make StepsType human readable. -aj
ASSERT_M( pSteps != NULL, ssprintf("StepsType %i is NULL", pStyle->m_StepsType) );
ASSERT_M( pSteps != NULL, "No playable steps for ScreenHowToPlay" );
NoteData tempNoteData;
pSteps->GetNoteData( tempNoteData );