split out ScreenGameplay::LoadLights
This commit is contained in:
@@ -1081,27 +1081,7 @@ void ScreenGameplay::LoadNextSong()
|
|||||||
//
|
//
|
||||||
// Load cabinet lights data
|
// Load cabinet lights data
|
||||||
//
|
//
|
||||||
if( LIGHTSMAN->IsEnabled() )
|
LoadLights();
|
||||||
{
|
|
||||||
m_CabinetLightsNoteData.Init();
|
|
||||||
ASSERT( GAMESTATE->m_pCurSong );
|
|
||||||
|
|
||||||
Steps *pSteps = GAMESTATE->m_pCurSong->GetClosestNotes( STEPS_TYPE_LIGHTS_CABINET, StringToDifficulty(PREFSMAN->m_sLightsStepsDifficulty) );
|
|
||||||
if( pSteps != NULL )
|
|
||||||
{
|
|
||||||
pSteps->GetNoteData( m_CabinetLightsNoteData );
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
pSteps = GAMESTATE->m_pCurSong->GetClosestNotes( GAMESTATE->GetCurrentStyle()->m_StepsType, StringToDifficulty(PREFSMAN->m_sLightsStepsDifficulty) );
|
|
||||||
if( pSteps )
|
|
||||||
{
|
|
||||||
NoteData TapNoteData;
|
|
||||||
pSteps->GetNoteData( TapNoteData );
|
|
||||||
NoteDataUtil::LoadTransformedLights( TapNoteData, m_CabinetLightsNoteData, GameManager::StepsTypeToNumTracks(STEPS_TYPE_LIGHTS_CABINET) );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Load the music last, since it may start streaming and we don't want the music
|
/* Load the music last, since it may start streaming and we don't want the music
|
||||||
* to compete with other loading. */
|
* to compete with other loading. */
|
||||||
@@ -1109,6 +1089,31 @@ void ScreenGameplay::LoadNextSong()
|
|||||||
m_pSoundMusic = m_AutoKeysounds.GetSound();
|
m_pSoundMusic = m_AutoKeysounds.GetSound();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ScreenGameplay::LoadLights()
|
||||||
|
{
|
||||||
|
if( !LIGHTSMAN->IsEnabled() )
|
||||||
|
return;
|
||||||
|
|
||||||
|
m_CabinetLightsNoteData.Init();
|
||||||
|
ASSERT( GAMESTATE->m_pCurSong );
|
||||||
|
|
||||||
|
Steps *pSteps = GAMESTATE->m_pCurSong->GetClosestNotes( STEPS_TYPE_LIGHTS_CABINET, StringToDifficulty(PREFSMAN->m_sLightsStepsDifficulty) );
|
||||||
|
if( pSteps != NULL )
|
||||||
|
{
|
||||||
|
pSteps->GetNoteData( m_CabinetLightsNoteData );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
pSteps = GAMESTATE->m_pCurSong->GetClosestNotes( GAMESTATE->GetCurrentStyle()->m_StepsType, StringToDifficulty(PREFSMAN->m_sLightsStepsDifficulty) );
|
||||||
|
if( pSteps )
|
||||||
|
{
|
||||||
|
NoteData TapNoteData;
|
||||||
|
pSteps->GetNoteData( TapNoteData );
|
||||||
|
NoteDataUtil::LoadTransformedLights( TapNoteData, m_CabinetLightsNoteData, GameManager::StepsTypeToNumTracks(STEPS_TYPE_LIGHTS_CABINET) );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
float ScreenGameplay::StartPlayingSong(float MinTimeToNotes, float MinTimeToMusic)
|
float ScreenGameplay::StartPlayingSong(float MinTimeToNotes, float MinTimeToMusic)
|
||||||
{
|
{
|
||||||
ASSERT(MinTimeToNotes >= 0);
|
ASSERT(MinTimeToNotes >= 0);
|
||||||
|
|||||||
@@ -64,6 +64,7 @@ protected:
|
|||||||
void LoadNextSong();
|
void LoadNextSong();
|
||||||
void LoadCourseSongNumber( int SongNumber );
|
void LoadCourseSongNumber( int SongNumber );
|
||||||
float StartPlayingSong(float MinTimeToNotes, float MinTimeToMusic);
|
float StartPlayingSong(float MinTimeToNotes, float MinTimeToMusic);
|
||||||
|
void LoadLights();
|
||||||
void PauseGame( bool bPause, GameController gc = GAME_CONTROLLER_INVALID );
|
void PauseGame( bool bPause, GameController gc = GAME_CONTROLLER_INVALID );
|
||||||
void ShowSavePrompt( ScreenMessage SM_SendWhenDone );
|
void ShowSavePrompt( ScreenMessage SM_SendWhenDone );
|
||||||
void PlayAnnouncer( CString type, float fSeconds );
|
void PlayAnnouncer( CString type, float fSeconds );
|
||||||
|
|||||||
Reference in New Issue
Block a user