simplify, fix fallback, fix lights transform not being run
This commit is contained in:
@@ -1026,34 +1026,24 @@ void ScreenGameplay::LoadNextSong()
|
|||||||
// Load cabinet lights data
|
// Load cabinet lights data
|
||||||
//
|
//
|
||||||
{
|
{
|
||||||
vector<Steps*> vSteps;
|
|
||||||
m_CabinetLightsNoteData.Init();
|
m_CabinetLightsNoteData.Init();
|
||||||
ASSERT( GAMESTATE->m_pCurSong );
|
ASSERT( GAMESTATE->m_pCurSong );
|
||||||
|
|
||||||
// From what I understood, if there is no pre-defined step set for lights, then we fall-back
|
Steps *pSteps = GAMESTATE->m_pCurSong->GetClosestNotes( STEPS_TYPE_LIGHTS_CABINET, StringToDifficulty(PREFSMAN->m_sLightsStepsDifficulty) );
|
||||||
// onto the specified difficulty's stepchart, flashing all cabinet lights on each tap note.
|
if( pSteps != NULL )
|
||||||
// -- Miryokuteki
|
{
|
||||||
// Steps *pSteps = GAMESTATE->m_pCurSong->GetClosestNotes( STEPS_TYPE_LIGHTS_CABINET, StringToDifficulty(PREFSMAN->m_sLightsStepsDifficulty) );
|
pSteps->GetNoteData( &m_CabinetLightsNoteData );
|
||||||
|
}
|
||||||
vSteps = GAMESTATE->m_pCurSong->GetAllSteps( STEPS_TYPE_LIGHTS_CABINET);
|
else
|
||||||
|
{
|
||||||
//If there are no light steps do this (to get current style's steps
|
pSteps = GAMESTATE->m_pCurSong->GetClosestNotes( GAMESTATE->GetCurrentStyle()->m_StepsType, StringToDifficulty(PREFSMAN->m_sLightsStepsDifficulty) );
|
||||||
if (vSteps.empty())
|
if( pSteps )
|
||||||
GAMESTATE->m_pCurSong->GetSteps(vSteps,
|
{
|
||||||
GAMESTATE->GetCurrentStyle()->m_StepsType);
|
NoteData TapNoteData;
|
||||||
|
pSteps->GetNoteData( &TapNoteData );
|
||||||
//Obtain the default steps (just in case the desired difficulty does not exist)
|
NoteDataUtil::LoadTransformedLights( TapNoteData, m_CabinetLightsNoteData, GameManager::StepsTypeToNumTracks(STEPS_TYPE_LIGHTS_CABINET) );
|
||||||
if(!vSteps.empty())
|
}
|
||||||
vSteps[0]->GetNoteData(&m_CabinetLightsNoteData);
|
}
|
||||||
|
|
||||||
//Scan through all available steps, to see if any match our desired difficulty
|
|
||||||
for (unsigned i = 0; i < vSteps.size(); ++i)
|
|
||||||
if (StringToDifficulty(PREFSMAN->m_sLightsStepsDifficulty) ==
|
|
||||||
vSteps[i]->GetDifficulty())
|
|
||||||
vSteps[i]->GetNoteData( &m_CabinetLightsNoteData );
|
|
||||||
|
|
||||||
//if( pSteps != NULL )
|
|
||||||
// pSteps->GetNoteData( &m_CabinetLightsNoteData );
|
|
||||||
|
|
||||||
// Convert to 4s so that we can check if we're inside a hold with just
|
// Convert to 4s so that we can check if we're inside a hold with just
|
||||||
// GetTapNote().
|
// GetTapNote().
|
||||||
|
|||||||
@@ -1093,6 +1093,9 @@ void Song::AddAutoGenNotes()
|
|||||||
/* If m_bAutogenSteps is disabled, only autogen lights. */
|
/* If m_bAutogenSteps is disabled, only autogen lights. */
|
||||||
if( !PREFSMAN->m_bAutogenSteps && stMissing != STEPS_TYPE_LIGHTS_CABINET )
|
if( !PREFSMAN->m_bAutogenSteps && stMissing != STEPS_TYPE_LIGHTS_CABINET )
|
||||||
continue;
|
continue;
|
||||||
|
/* XXX: disable lights autogen for now */
|
||||||
|
if( stMissing == STEPS_TYPE_LIGHTS_CABINET )
|
||||||
|
continue;
|
||||||
|
|
||||||
// missing Steps of this type
|
// missing Steps of this type
|
||||||
int iNumTracksOfMissing = GAMEMAN->StepsTypeToNumTracks(stMissing);
|
int iNumTracksOfMissing = GAMEMAN->StepsTypeToNumTracks(stMissing);
|
||||||
|
|||||||
Reference in New Issue
Block a user