pref to bass simplify lighting

This commit is contained in:
din
2023-12-13 08:53:08 -08:00
committed by teejusb
parent 980c3a4c3a
commit 9efc73df61
4 changed files with 26 additions and 1 deletions
+19
View File
@@ -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.
+1
View File
@@ -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 ),
+1
View File
@@ -313,6 +313,7 @@ public:
Preference<int> m_iRageSoundSampleCountClamp;
Preference<int> m_iSoundPreferredSampleRate;
Preference<RString> m_sLightsStepsDifficulty;
Preference<bool> m_bLightsSimplifyBass;
Preference<bool> m_bAllowUnacceleratedRenderer;
Preference<bool> m_bThreadedInput;
Preference<bool> m_bThreadedMovieDecode;
+5 -1
View File
@@ -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 );