From 95122bbccbaa5ecbf770c120bdf46f038d94f5c0 Mon Sep 17 00:00:00 2001 From: dinsfire64 Date: Mon, 16 Dec 2019 20:44:02 -0600 Subject: [PATCH] restore autogen lights --- src/PrefsManager.cpp | 2 +- src/ScreenGameplay.cpp | 21 +++++++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/src/PrefsManager.cpp b/src/PrefsManager.cpp index 4cefde812a..a8c911c58b 100644 --- a/src/PrefsManager.cpp +++ b/src/PrefsManager.cpp @@ -275,7 +275,7 @@ PrefsManager::PrefsManager() : m_iSoundDevice ( "SoundDevice", "" ), m_iRageSoundSampleCountClamp ("RageSoundSampleCountClamp", 0), //some sound drivers mask the sample location number, the most popular number for this is 2^27, this causes lockup after ~50 minutes at 44.1khz sample rate m_iSoundPreferredSampleRate ( "SoundPreferredSampleRate", 0 ), - m_sLightsStepsDifficulty ( "LightsStepsDifficulty", "medium" ), + m_sLightsStepsDifficulty ( "LightsStepsDifficulty", "hard,medium" ), m_bAllowUnacceleratedRenderer ( "AllowUnacceleratedRenderer", false ), m_bThreadedInput ( "ThreadedInput", true ), m_bThreadedMovieDecode ( "ThreadedMovieDecode", true ), diff --git a/src/ScreenGameplay.cpp b/src/ScreenGameplay.cpp index ec4e7d492f..075639c600 100644 --- a/src/ScreenGameplay.cpp +++ b/src/ScreenGameplay.cpp @@ -1452,6 +1452,27 @@ void ScreenGameplay::LoadLights() NoteData TapNoteData1; pSteps->GetNoteData( TapNoteData1 ); + //taken from oitg, restores arrow -> marquee/bass light mapping. + if( asDifficulties.size() > 1 ) + { + Difficulty d2 = StringToDifficulty( asDifficulties[1] ); + + Steps *pSteps2; + + pSteps2 = SongUtil::GetClosestNotes( GAMESTATE->m_pCurSong, st, d2 ); + + if(pSteps2 != nullptr) + { + NoteData TapNoteData2; + pSteps2->GetNoteData( TapNoteData2 ); + + NoteDataUtil::LoadTransformedLightsFromTwo( TapNoteData1, TapNoteData2, m_CabinetLightsNoteData ); + return; + } + + /* fall through */ + } + NoteDataUtil::LoadTransformedLights( TapNoteData1, m_CabinetLightsNoteData, GAMEMAN->GetStepsTypeInfo(StepsType_lights_cabinet).iNumTracks ); }