prefs for lights
This commit is contained in:
@@ -9,9 +9,14 @@
|
||||
#include "Game.h"
|
||||
#include "PrefsManager.h"
|
||||
#include "Actor.h"
|
||||
#include "Preference.h"
|
||||
|
||||
#include "arch/arch.h"
|
||||
|
||||
Preference<float> g_fLightsFalloffSeconds( Options, "LightsFalloffSeconds", 0.1f );
|
||||
Preference<float> g_fLightsAheadSeconds( Options, "LightsAheadSeconds", 0.05f );
|
||||
|
||||
|
||||
static const CString CabinetLightNames[NUM_CABINET_LIGHTS] = {
|
||||
"MarqueeUpLeft",
|
||||
"MarqueeUpRight",
|
||||
@@ -182,6 +187,7 @@ void LightsManager::Update( float fDeltaTime )
|
||||
default: ASSERT(0);
|
||||
}
|
||||
|
||||
/* Flash the button lights for active players. */
|
||||
bool bBlinkOn = (iBeat%2)==0;
|
||||
|
||||
FOREACH_PlayerNumber( pn )
|
||||
@@ -341,12 +347,12 @@ void LightsManager::Update( float fDeltaTime )
|
||||
|
||||
void LightsManager::BlinkCabinetLight( CabinetLight cl )
|
||||
{
|
||||
m_fSecsLeftInCabinetLightBlink[cl] = LIGHTS_FALLOFF_SECONDS;
|
||||
m_fSecsLeftInCabinetLightBlink[cl] = g_fLightsFalloffSeconds;
|
||||
}
|
||||
|
||||
void LightsManager::BlinkGameButton( GameInput gi )
|
||||
{
|
||||
m_fSecsLeftInGameButtonBlink[gi.controller][gi.button] = LIGHTS_FALLOFF_SECONDS;
|
||||
m_fSecsLeftInGameButtonBlink[gi.controller][gi.button] = g_fLightsFalloffSeconds;
|
||||
}
|
||||
|
||||
void LightsManager::SetLightsMode( LightsMode lm )
|
||||
|
||||
@@ -6,8 +6,12 @@
|
||||
#include "PlayerNumber.h"
|
||||
#include "GameInput.h"
|
||||
#include "EnumHelper.h"
|
||||
#include "Preference.h"
|
||||
|
||||
const float LIGHTS_AHEAD_SECONDS = 0.1f;
|
||||
const float LIGHTS_FALLOFF_SECONDS = 0.1f;
|
||||
extern Preference<float> g_fLightsFalloffSeconds;
|
||||
extern Preference<float> g_fLightsAheadSeconds;
|
||||
|
||||
enum CabinetLight
|
||||
{
|
||||
|
||||
@@ -1650,7 +1650,7 @@ void ScreenGameplay::UpdateLights()
|
||||
ZERO( bBlinkGameButton );
|
||||
bool bCrossedABeat = false;
|
||||
{
|
||||
float fPositionSeconds = GAMESTATE->m_fMusicSeconds + LIGHTS_FALLOFF_SECONDS/2; // trigger the light a tiny bit early
|
||||
float fPositionSeconds = GAMESTATE->m_fMusicSeconds + g_fLightsAheadSeconds; // trigger the light a tiny bit early
|
||||
float fSongBeat = GAMESTATE->m_pCurSong->GetBeatFromElapsedTime( fPositionSeconds );
|
||||
const int iSongRow = BeatToNoteRowNotRounded( fSongBeat );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user