[ScreenHowToPlay] Allow themers to use either .ssc or .sm files.
(update comment on ScreenGameplaySyncMachine)
This commit is contained in:
@@ -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 );
|
||||
|
||||
Reference in New Issue
Block a user