diff --git a/src/NoteDataUtil.cpp b/src/NoteDataUtil.cpp index 1d1e140b94..50c8154e6a 100644 --- a/src/NoteDataUtil.cpp +++ b/src/NoteDataUtil.cpp @@ -752,6 +752,24 @@ void LightTransformHelper( const NoteData &in, NoteData &out, const std::vector< // For every track enabled in "in", enable all tracks in "out". void NoteDataUtil::LoadTransformedLights( const NoteData &in, NoteData &out, int iNewNumTracks ) { + // make a new NoteData that is a copy of the input. + NoteData bass; + bass.Init(); + bass.CopyAll( in ); + + // if the user desires, + // copy from the marquee data, but slim down the notes. + // this makes it look more bass-ish and less like the original chart. + if(PREFSMAN->m_bLightsSimplifyBass) + { + RemoveHoldNotes( bass ); + Little( bass ); + } + + LoadTransformedLightsFromTwo( in, bass, out ); + + // old code which will make all lights blink on every note. + /* // reset all notes out.Init(); @@ -762,6 +780,7 @@ void NoteDataUtil::LoadTransformedLights( const NoteData &in, NoteData &out, int aiTracks.push_back( i ); LightTransformHelper( in, out, aiTracks ); + */ } // This transform is specific to StepsType_lights_cabinet. diff --git a/src/PrefsManager.cpp b/src/PrefsManager.cpp index 779c9780fa..bc62c03ffc 100644 --- a/src/PrefsManager.cpp +++ b/src/PrefsManager.cpp @@ -287,6 +287,7 @@ PrefsManager::PrefsManager() : 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", "hard,medium" ), + m_bLightsSimplifyBass ( "LightsSimplifyBass", false), m_bAllowUnacceleratedRenderer ( "AllowUnacceleratedRenderer", false ), m_bThreadedInput ( "ThreadedInput", true ), m_bThreadedMovieDecode ( "ThreadedMovieDecode", true ), diff --git a/src/PrefsManager.h b/src/PrefsManager.h index 7f5d0b4e43..09b1f46da4 100644 --- a/src/PrefsManager.h +++ b/src/PrefsManager.h @@ -313,6 +313,7 @@ public: Preference m_iRageSoundSampleCountClamp; Preference m_iSoundPreferredSampleRate; Preference m_sLightsStepsDifficulty; + Preference m_bLightsSimplifyBass; Preference m_bAllowUnacceleratedRenderer; Preference m_bThreadedInput; Preference m_bThreadedMovieDecode; diff --git a/src/ScreenGameplay.cpp b/src/ScreenGameplay.cpp index 9318829345..1041403134 100644 --- a/src/ScreenGameplay.cpp +++ b/src/ScreenGameplay.cpp @@ -1419,6 +1419,7 @@ void ScreenGameplay::LoadLights() pSteps->GetNoteData( TapNoteData1 ); //taken from oitg, restores arrow -> marquee/bass light mapping. + //if the user has a pref for more than one difficulty to make the lighting chart... if( asDifficulties.size() > 1 ) { Difficulty d2 = StringToDifficulty( asDifficulties[1] ); @@ -1427,7 +1428,10 @@ void ScreenGameplay::LoadLights() pSteps2 = SongUtil::GetClosestNotes( GAMESTATE->m_pCurSong, st, d2 ); - if(pSteps2 != nullptr) + //if the difficulities are actually different + //then we can use them to generate a lighting chart. + //as the user defined. + if(pSteps != pSteps2) { NoteData TapNoteData2; pSteps2->GetNoteData( TapNoteData2 );