move lights driver pref into LightsMan
This commit is contained in:
@@ -17,6 +17,8 @@
|
|||||||
|
|
||||||
#include "arch/arch.h"
|
#include "arch/arch.h"
|
||||||
|
|
||||||
|
const CString DEFAULT_LIGHTS_DRIVER = "Null";
|
||||||
|
static Preference<CString> g_sLightsDriver( "LightsDriver", "" ); // "" == DEFAULT_LIGHTS_DRIVER
|
||||||
Preference<float> g_fLightsFalloffSeconds( "LightsFalloffSeconds", 0.1f );
|
Preference<float> g_fLightsFalloffSeconds( "LightsFalloffSeconds", 0.1f );
|
||||||
Preference<float> g_fLightsAheadSeconds( "LightsAheadSeconds", 0.05f );
|
Preference<float> g_fLightsAheadSeconds( "LightsAheadSeconds", 0.05f );
|
||||||
|
|
||||||
@@ -78,7 +80,7 @@ static void GetUsedGameInputs( vector<GameInput> &vGameInputsOut )
|
|||||||
|
|
||||||
LightsManager* LIGHTSMAN = NULL; // global and accessable from anywhere in our program
|
LightsManager* LIGHTSMAN = NULL; // global and accessable from anywhere in our program
|
||||||
|
|
||||||
LightsManager::LightsManager(CString sDriver)
|
LightsManager::LightsManager()
|
||||||
{
|
{
|
||||||
ZERO( m_fSecsLeftInCabinetLightBlink );
|
ZERO( m_fSecsLeftInCabinetLightBlink );
|
||||||
ZERO( m_fSecsLeftInGameButtonBlink );
|
ZERO( m_fSecsLeftInGameButtonBlink );
|
||||||
@@ -86,6 +88,9 @@ LightsManager::LightsManager(CString sDriver)
|
|||||||
ZERO( m_fSecsLeftInActorLightBlink );
|
ZERO( m_fSecsLeftInActorLightBlink );
|
||||||
|
|
||||||
m_LightsMode = LIGHTSMODE_JOINING;
|
m_LightsMode = LIGHTSMODE_JOINING;
|
||||||
|
CString sDriver = g_sLightsDriver.Get();
|
||||||
|
if( sDriver.empty() )
|
||||||
|
sDriver = DEFAULT_LIGHTS_DRIVER;
|
||||||
MakeLightsDrivers( sDriver, m_vpDrivers );
|
MakeLightsDrivers( sDriver, m_vpDrivers );
|
||||||
m_fTestAutoCycleCurrentIndex = 0;
|
m_fTestAutoCycleCurrentIndex = 0;
|
||||||
m_clTestManualCycleCurrent = LIGHT_INVALID;
|
m_clTestManualCycleCurrent = LIGHT_INVALID;
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ class LightsDriver;
|
|||||||
class LightsManager
|
class LightsManager
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
LightsManager(CString sDriver);
|
LightsManager();
|
||||||
~LightsManager();
|
~LightsManager();
|
||||||
|
|
||||||
void Update( float fDeltaTime );
|
void Update( float fDeltaTime );
|
||||||
|
|||||||
@@ -19,8 +19,6 @@ const CString TYPE_TXT_FILE = "Data/Type.txt";
|
|||||||
|
|
||||||
PrefsManager* PREFSMAN = NULL; // global and accessable from anywhere in our program
|
PrefsManager* PREFSMAN = NULL; // global and accessable from anywhere in our program
|
||||||
|
|
||||||
const CString DEFAULT_LIGHTS_DRIVER = "Null";
|
|
||||||
|
|
||||||
static const CString TimingWindowNames[] = {
|
static const CString TimingWindowNames[] = {
|
||||||
"W1",
|
"W1",
|
||||||
"W2",
|
"W2",
|
||||||
@@ -301,7 +299,6 @@ PrefsManager::PrefsManager() :
|
|||||||
m_iSoundDevice ( "SoundDevice", "" ),
|
m_iSoundDevice ( "SoundDevice", "" ),
|
||||||
m_iSoundPreferredSampleRate ( "SoundPreferredSampleRate", 44100 ),
|
m_iSoundPreferredSampleRate ( "SoundPreferredSampleRate", 44100 ),
|
||||||
m_sInputDrivers ( "InputDrivers", "" ),
|
m_sInputDrivers ( "InputDrivers", "" ),
|
||||||
m_sLightsDriver ( "LightsDriver", "" ),
|
|
||||||
m_sMovieDrivers ( "MovieDrivers", "" ),
|
m_sMovieDrivers ( "MovieDrivers", "" ),
|
||||||
m_sLightsStepsDifficulty ( "LightsStepsDifficulty", "medium" ),
|
m_sLightsStepsDifficulty ( "LightsStepsDifficulty", "medium" ),
|
||||||
m_bBlinkGameplayButtonLightsOnNote ( "BlinkGameplayButtonLightsOnNote",false ),
|
m_bBlinkGameplayButtonLightsOnNote ( "BlinkGameplayButtonLightsOnNote",false ),
|
||||||
@@ -533,14 +530,6 @@ CString PrefsManager::GetMovieDrivers()
|
|||||||
return m_sMovieDrivers;
|
return m_sMovieDrivers;
|
||||||
}
|
}
|
||||||
|
|
||||||
CString PrefsManager::GetLightsDriver()
|
|
||||||
{
|
|
||||||
if ( m_sLightsDriver.Get().empty() )
|
|
||||||
return (CString)DEFAULT_LIGHTS_DRIVER;
|
|
||||||
else
|
|
||||||
return m_sLightsDriver;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool PrefsManager::MessageIsIgnored( const CString &ID )
|
bool PrefsManager::MessageIsIgnored( const CString &ID )
|
||||||
{
|
{
|
||||||
vector<CString> list;
|
vector<CString> list;
|
||||||
|
|||||||
@@ -226,7 +226,6 @@ public:
|
|||||||
Preference<int> m_iSoundPreferredSampleRate;
|
Preference<int> m_iSoundPreferredSampleRate;
|
||||||
private:
|
private:
|
||||||
Preference<CString> m_sInputDrivers; // "" == default
|
Preference<CString> m_sInputDrivers; // "" == default
|
||||||
Preference<CString> m_sLightsDriver; // "" == default
|
|
||||||
public:
|
public:
|
||||||
Preference<CString> m_sMovieDrivers; // "" == default
|
Preference<CString> m_sMovieDrivers; // "" == default
|
||||||
Preference<CString> m_sLightsStepsDifficulty;
|
Preference<CString> m_sLightsStepsDifficulty;
|
||||||
@@ -260,7 +259,6 @@ public:
|
|||||||
float GetSoundVolume();
|
float GetSoundVolume();
|
||||||
CString GetInputDrivers();
|
CString GetInputDrivers();
|
||||||
CString GetMovieDrivers();
|
CString GetMovieDrivers();
|
||||||
CString GetLightsDriver();
|
|
||||||
|
|
||||||
|
|
||||||
void ReadPrefsFromIni( const IniFile &ini, const CString &sSection );
|
void ReadPrefsFromIni( const IniFile &ini, const CString &sSection );
|
||||||
|
|||||||
@@ -1030,7 +1030,7 @@ int main(int argc, char* argv[])
|
|||||||
SOUNDMAN->SetMixVolume( PREFSMAN->GetSoundVolume() );
|
SOUNDMAN->SetMixVolume( PREFSMAN->GetSoundVolume() );
|
||||||
SOUND = new GameSoundManager;
|
SOUND = new GameSoundManager;
|
||||||
BOOKKEEPER = new Bookkeeper;
|
BOOKKEEPER = new Bookkeeper;
|
||||||
LIGHTSMAN = new LightsManager( PREFSMAN->GetLightsDriver() );
|
LIGHTSMAN = new LightsManager;
|
||||||
INPUTFILTER = new InputFilter;
|
INPUTFILTER = new InputFilter;
|
||||||
INPUTMAPPER = new InputMapper;
|
INPUTMAPPER = new InputMapper;
|
||||||
INPUTQUEUE = new InputQueue;
|
INPUTQUEUE = new InputQueue;
|
||||||
|
|||||||
Reference in New Issue
Block a user