From 48d5a784291ac3ef4cb8dfeb0cca7219290daa18 Mon Sep 17 00:00:00 2001 From: Chris Danford Date: Sun, 16 Nov 2003 04:45:12 +0000 Subject: [PATCH] basic lights support --- stepmania/src/GameState.cpp | 3 + stepmania/src/LightsManager.cpp | 138 ++++++++++++++++++ stepmania/src/LightsManager.h | 61 ++++++++ stepmania/src/PrefsManager.cpp | 5 + stepmania/src/PrefsManager.h | 1 + stepmania/src/ScreenEvaluation.cpp | 3 + stepmania/src/ScreenGameplay.cpp | 9 ++ stepmania/src/ScreenSelectMusic.cpp | 3 + stepmania/src/ScreenSelectStyle.cpp | 3 + stepmania/src/ScreenStage.cpp | 4 + stepmania/src/ScreenTitleMenu.cpp | 6 +- stepmania/src/StepMania.cpp | 4 + stepmania/src/arch/Lights/LightsDriver.h | 26 ++++ stepmania/src/arch/Lights/LightsDriver_Null.h | 26 ++++ .../Lights/LightsDriver_Win32Parallel.cpp | 55 +++++++ .../arch/Lights/LightsDriver_Win32Parallel.h | 27 ++++ stepmania/src/arch/arch.cpp | 20 +++ stepmania/src/arch/arch.h | 2 + stepmania/src/arch/arch_Win32.h | 2 + stepmania/src/arch/arch_default.h | 1 + 20 files changed, 397 insertions(+), 2 deletions(-) create mode 100644 stepmania/src/LightsManager.cpp create mode 100644 stepmania/src/LightsManager.h create mode 100644 stepmania/src/arch/Lights/LightsDriver.h create mode 100644 stepmania/src/arch/Lights/LightsDriver_Null.h create mode 100644 stepmania/src/arch/Lights/LightsDriver_Win32Parallel.cpp create mode 100644 stepmania/src/arch/Lights/LightsDriver_Win32Parallel.h diff --git a/stepmania/src/GameState.cpp b/stepmania/src/GameState.cpp index 2d0e5cfa23..d8c676fbe5 100644 --- a/stepmania/src/GameState.cpp +++ b/stepmania/src/GameState.cpp @@ -33,6 +33,7 @@ #include "ThemeManager.h" #include "fstream" #include "Bookkeeper.h" +#include "LightsManager.h" #define DEFAULT_MODIFIERS THEME->GetMetric( "Common","DefaultModifiers" ) @@ -142,6 +143,8 @@ void GameState::Reset() // save stats info intermitently in case of crash BOOKKEEPER->WriteToDisk(); SONGMAN->SaveMachineScoresToDisk(); + + LIGHTSMAN->SetLightMode( LIGHTMODE_ATTRACT ); } void GameState::Update( float fDelta ) diff --git a/stepmania/src/LightsManager.cpp b/stepmania/src/LightsManager.cpp new file mode 100644 index 0000000000..72ae635c1e --- /dev/null +++ b/stepmania/src/LightsManager.cpp @@ -0,0 +1,138 @@ +#include "global.h" +/* +----------------------------------------------------------------------------- + Class: LightsManager + + Desc: See header. + + Copyright (c) 2001-2002 by the person(s) listed below. All rights reserved. + Chris Danford +----------------------------------------------------------------------------- +*/ + +#include "LightsManager.h" +#include "GameState.h" +#include "RageTimer.h" +#include "arch/Lights/LightsDriver.h" +#include "arch/arch.h" +#include "RageUtil.h" + +#include "windows.h" + +LightsManager* LIGHTSMAN = NULL; // global and accessable from anywhere in our program + +LightsManager::LightsManager(CString sDriver) +{ + m_LightMode = LIGHTMODE_JOINING; + + m_pDriver = MakeLightsDriver(sDriver); +} + +LightsManager::~LightsManager() +{ + SAFE_DELETE( m_pDriver ); +} + +void LightsManager::Update( float fDeltaTime ) +{ + switch( m_LightMode ) + { + case LIGHTMODE_JOINING: + { + switch( GAMESTATE->GetNumSidesJoined() ) + { + case 0: + { + int iSec = (int)(RageTimer::GetTimeSinceStart()*2); + float fBeatPercentage = GAMESTATE->m_fSongBeat - (int)GAMESTATE->m_fSongBeat; + bool bOn = (iSec%2)==0; + for( int i=0; i<8; i++ ) + m_pDriver->SetLight( (Light)i, bOn ); + } + break; + default: + for( int i=0; i<8; i++ ) + { + bool bOn = GAMESTATE->m_bSideIsJoined[i%2]; + m_pDriver->SetLight( (Light)i, bOn ); + } + } + } + break; + case LIGHTMODE_ATTRACT: + { + int iSec = (int)RageTimer::GetTimeSinceStart(); + int i; + for( i=0; i<4; i++ ) + { + bool bOn = (iSec%4)==i; + m_pDriver->SetLight( (Light)i, bOn ); + } + for( i=4; i<6; i++ ) + { + bool bOn = false; + m_pDriver->SetLight( (Light)i, bOn ); + } + for( i=6; i<8; i++ ) + { + bool bOn = (iSec%3)==0; + m_pDriver->SetLight( (Light)i, bOn ); + } + } + break; + case LIGHTMODE_MENU: + { + int iSec = (int)RageTimer::GetTimeSinceStart(); + int i; + for( i=0; i<2; i++ ) + { + bool bOn = (iSec%2)==0; + m_pDriver->SetLight( (Light)i, bOn ); + } + for( i=2; i<4; i++ ) + { + bool bOn = (iSec%2)==1; + m_pDriver->SetLight( (Light)i, bOn ); + } + for( i=4; i<6; i++ ) + { + bool bOn = (iSec%2)==0; + m_pDriver->SetLight( (Light)i, bOn ); + } + for( i=6; i<8; i++ ) + { + bool bOn = (iSec%2)==1; + m_pDriver->SetLight( (Light)i, bOn ); + } + } + break; + case LIGHTMODE_DEMONSTRATION: + case LIGHTMODE_GAMEPLAY: + { + float fBeatPercentage = GAMESTATE->m_fSongBeat - (int)GAMESTATE->m_fSongBeat; + bool bOn = fBeatPercentage < 0.1 || fBeatPercentage > 0.9; + for( int i=0; i<8; i++ ) + m_pDriver->SetLight( (Light)i, bOn ); + } + break; + case LIGHTMODE_ALL_ON: + { + for( int i=0; i<8; i++ ) + m_pDriver->SetLight( (Light)i, true ); + } + break; + case LIGHTMODE_ALL_OFF: + { + for( int i=0; i<8; i++ ) + m_pDriver->SetLight( (Light)i, false ); + } + break; + default: + ASSERT(0); + } +} + +void LightsManager::SetLightMode( LightMode lm ) +{ + m_LightMode = lm; +} \ No newline at end of file diff --git a/stepmania/src/LightsManager.h b/stepmania/src/LightsManager.h new file mode 100644 index 0000000000..c502b613ba --- /dev/null +++ b/stepmania/src/LightsManager.h @@ -0,0 +1,61 @@ +#ifndef LightsManager_H +#define LightsManager_H +/* +----------------------------------------------------------------------------- + Class: LightsManager + + Desc: Control lights. + + Copyright (c) 2001-2002 by the person(s) listed below. All rights reserved. + Chris Danford +----------------------------------------------------------------------------- +*/ + + +enum Light +{ + LIGHT_MARUQEE_UP_LEFT, + LIGHT_MARUQEE_UP_RIGHT, + LIGHT_MARUQEE_LR_LEFT, + LIGHT_MARUQEE_LR_RIGHT, + LIGHT_MARUQEE_MENU_LEFT, + LIGHT_MARUQEE_MENU_RIGHT, + LIGHT_MARUQEE_BASS_LEFT, + LIGHT_MARUQEE_BASS_RIGHT, + NUM_LIGHTS +}; + +enum LightMode +{ + LIGHTMODE_ATTRACT, + LIGHTMODE_JOINING, + LIGHTMODE_MENU, + LIGHTMODE_DEMONSTRATION, + LIGHTMODE_GAMEPLAY, + LIGHTMODE_ALL_ON, + LIGHTMODE_ALL_OFF, +}; + +class LightsDriver; + +class LightsManager +{ +public: + LightsManager(CString sDriver); + ~LightsManager(); + + void Update( float fDeltaTime ); + + void SetLightMode( LightMode lm ); + +private: + void SetLight( Light light, bool bOn ); + + LightsDriver* m_pDriver; + LightMode m_LightMode; +}; + + +extern LightsManager* LIGHTSMAN; // global and accessable from anywhere in our program + +#endif diff --git a/stepmania/src/PrefsManager.cpp b/stepmania/src/PrefsManager.cpp index bed409323b..c697ed54c8 100644 --- a/stepmania/src/PrefsManager.cpp +++ b/stepmania/src/PrefsManager.cpp @@ -26,6 +26,7 @@ PrefsManager* PREFSMAN = NULL; // global and accessable from anywhere in our program const float DEFAULT_SOUND_VOLUME = 1.00f; +const CString DEFAULT_LIGHTS_DRIVER = "Null"; bool g_bAutoRestart = false; @@ -186,6 +187,7 @@ PrefsManager::PrefsManager() #endif m_fSoundVolume = DEFAULT_SOUND_VOLUME; + m_sLightsDriver = DEFAULT_LIGHTS_DRIVER; /* This is experimental: let's see if preloading helps people's skipping. * If it doesn't do anything useful, it'll be removed. */ m_bSoundPreloadAll = false; @@ -285,6 +287,7 @@ void PrefsManager::ReadGlobalPrefsFromDisk() ini.GetValue( "Options", "EasterEggs", m_bEasterEggs ); ini.GetValue( "Options", "MarvelousTiming", (int&)m_iMarvelousTiming ); ini.GetValue( "Options", "SoundVolume", m_fSoundVolume ); + ini.GetValue( "Options", "LightsDriver", m_sLightsDriver ); ini.GetValue( "Options", "SoundPreloadAll", m_bSoundPreloadAll ); ini.GetValue( "Options", "SoundResampleQuality", m_iSoundResampleQuality ); ini.GetValue( "Options", "CoinMode", m_iCoinMode ); @@ -518,6 +521,8 @@ void PrefsManager::SaveGlobalPrefsToDisk() const ini.SetValue ( "Options", "SoundDrivers", m_sSoundDrivers ); if(m_fSoundVolume != DEFAULT_SOUND_VOLUME) ini.SetValue( "Options", "SoundVolume", m_fSoundVolume ); + if(m_sLightsDriver != DEFAULT_LIGHTS_DRIVER) + ini.SetValue( "Options", "LightsDriver", m_sLightsDriver ); if(m_sMovieDrivers != DEFAULT_MOVIE_DRIVER_LIST) ini.SetValue ( "Options", "MovieDrivers", m_sMovieDrivers ); diff --git a/stepmania/src/PrefsManager.h b/stepmania/src/PrefsManager.h index 78ee1f8e12..48d18c9700 100644 --- a/stepmania/src/PrefsManager.h +++ b/stepmania/src/PrefsManager.h @@ -155,6 +155,7 @@ public: bool m_bAntiAliasing; CString m_sSoundDrivers; CString m_sMovieDrivers; + CString m_sLightsDriver; float m_fSoundVolume; bool m_bSoundPreloadAll; int m_iSoundResampleQuality; diff --git a/stepmania/src/ScreenEvaluation.cpp b/stepmania/src/ScreenEvaluation.cpp index 1ad73e96c8..51f5316cdb 100644 --- a/stepmania/src/ScreenEvaluation.cpp +++ b/stepmania/src/ScreenEvaluation.cpp @@ -28,6 +28,7 @@ #include "RageTimer.h" #include "UnlockSystem.h" #include "Course.h" +#include "LightsManager.h" const int NUM_SCORE_DIGITS = 9; @@ -92,6 +93,8 @@ ScreenEvaluation::ScreenEvaluation( CString sClassName ) : Screen(sClassName) LOG->Trace( "ScreenEvaluation::ScreenEvaluation()" ); + LIGHTSMAN->SetLightMode( LIGHTMODE_MENU ); + m_bFailed = false; // the evaluation is not showing failed results by default m_sName = sClassName; diff --git a/stepmania/src/ScreenGameplay.cpp b/stepmania/src/ScreenGameplay.cpp index c212e98861..502390ae3e 100644 --- a/stepmania/src/ScreenGameplay.cpp +++ b/stepmania/src/ScreenGameplay.cpp @@ -45,6 +45,7 @@ #include "Course.h" #include "NoteDataUtil.h" #include "UnlockSystem.h" +#include "LightsManager.h" // // Defines @@ -92,6 +93,11 @@ ScreenGameplay::ScreenGameplay( CString sName, bool bDemonstration ) : Screen("S m_bDemonstration = bDemonstration; + if( m_bDemonstration ) + LIGHTSMAN->SetLightMode( LIGHTMODE_DEMONSTRATION ); + else + LIGHTSMAN->SetLightMode( LIGHTMODE_GAMEPLAY ); + SECONDS_BETWEEN_COMMENTS.Refresh(); G_TICK_EARLY_SECONDS.Refresh(); @@ -1709,6 +1715,9 @@ void ScreenGameplay::HandleScreenMessage( const ScreenMessage SM ) GAMESTATE->RemoveAllActiveAttacks(); + LIGHTSMAN->SetLightMode( LIGHTMODE_ALL_OFF ); + + if( bAllReallyFailed ) { this->PostScreenMessage( SM_BeginFailed, 0 ); diff --git a/stepmania/src/ScreenSelectMusic.cpp b/stepmania/src/ScreenSelectMusic.cpp index 4aaf37ae77..3104e1aade 100644 --- a/stepmania/src/ScreenSelectMusic.cpp +++ b/stepmania/src/ScreenSelectMusic.cpp @@ -36,6 +36,7 @@ #include "Course.h" #include "ProfileManager.h" #include "MenuTimer.h" +#include "LightsManager.h" const int NUM_SCORE_DIGITS = 9; @@ -78,6 +79,8 @@ ScreenSelectMusic::ScreenSelectMusic( CString sClassName ) : Screen( sClassName { LOG->Trace( "ScreenSelectMusic::ScreenSelectMusic()" ); + LIGHTSMAN->SetLightMode( LIGHTMODE_MENU ); + m_bInCourseDisplayMode = GAMESTATE->IsCourseMode(); /* Cache: */ diff --git a/stepmania/src/ScreenSelectStyle.cpp b/stepmania/src/ScreenSelectStyle.cpp index 2b4363530e..800524e29a 100644 --- a/stepmania/src/ScreenSelectStyle.cpp +++ b/stepmania/src/ScreenSelectStyle.cpp @@ -19,6 +19,7 @@ #include "GameState.h" #include "AnnouncerManager.h" #include "ActorUtil.h" +#include "LightsManager.h" #define ICON_GAIN_FOCUS_COMMAND THEME->GetMetric (m_sName,"IconGainFocusCommand") @@ -30,6 +31,8 @@ ScreenSelectStyle::ScreenSelectStyle( CString sClassName ) : ScreenSelect( sClas { m_iSelection = 0; + LIGHTSMAN->SetLightMode( LIGHTMODE_MENU ); + unsigned i; for( i=0; iGetMetric ("ScreenStage","NextScreen") @@ -56,6 +57,9 @@ ScreenStage::ScreenStage( CString sClassName ) : Screen( sClassName ) { SOUND->StopMusic(); + LIGHTSMAN->SetLightMode( LIGHTMODE_ALL_ON ); + + m_Background.LoadFromAniDir( THEME->GetPathToB("ScreenStage "+GAMESTATE->GetStageText()) ); this->AddChild( &m_Background ); diff --git a/stepmania/src/ScreenTitleMenu.cpp b/stepmania/src/ScreenTitleMenu.cpp index 9400287f8a..52d33a5331 100644 --- a/stepmania/src/ScreenTitleMenu.cpp +++ b/stepmania/src/ScreenTitleMenu.cpp @@ -29,7 +29,7 @@ #include "RageTextureManager.h" #include "UnlockSystem.h" #include "ProductInfo.h" -//#include "NetworkManager.h" +#include "LightsManager.h" #define LOGO_ON_COMMAND THEME->GetMetric("ScreenTitleMenu","LogoOnCommand") @@ -62,7 +62,6 @@ ScreenTitleMenu::ScreenTitleMenu( CString sClassName ) : ScreenSelect( sClassNam { LOG->Trace( "ScreenTitleMenu::ScreenTitleMenu()" ); - // Don't show screen title menu (says "Press Start") // if there are 0 credits and inserted and CoinMode is pay. if( PREFSMAN->m_iCoinMode == COIN_PAY && @@ -78,6 +77,9 @@ ScreenTitleMenu::ScreenTitleMenu( CString sClassName ) : ScreenSelect( sClassNam * things stinks ... */ GAMESTATE->Reset(); + LIGHTSMAN->SetLightMode( LIGHTMODE_JOINING ); // do this after Reset! + + CodeDetector::RefreshCacheItems(); m_sprLogo.Load( THEME->GetPathToG(ssprintf("ScreenLogo %s",GAMESTATE->GetCurrentGameDef()->m_szName)) ); diff --git a/stepmania/src/StepMania.cpp b/stepmania/src/StepMania.cpp index 77d1cc168a..16bf7fc5d8 100644 --- a/stepmania/src/StepMania.cpp +++ b/stepmania/src/StepMania.cpp @@ -53,6 +53,7 @@ #include "arch/ArchHooks/ArchHooks.h" #include "RageFile.h" #include "Bookkeeper.h" +#include "LightsManager.h" #if defined(_XBOX) @@ -837,6 +838,7 @@ int main(int argc, char* argv[]) SOUND = new RageSounds; PROFILEMAN = new ProfileManager; BOOKKEEPER = new Bookkeeper; + LIGHTSMAN = new LightsManager(PREFSMAN->m_sLightsDriver); INPUTFILTER = new InputFilter; INPUTMAPPER = new InputMapper; INPUTQUEUE = new InputQueue; @@ -946,6 +948,7 @@ int main(int argc, char* argv[]) SAFE_DELETE( ANNOUNCER ); SAFE_DELETE( PROFILEMAN ); SAFE_DELETE( BOOKKEEPER ); + SAFE_DELETE( LIGHTSMAN ); SAFE_DELETE( SOUND ); SAFE_DELETE( SOUNDMAN ); SAFE_DELETE( FONT ); @@ -1081,6 +1084,7 @@ bool HandleGlobalInputs( DeviceInput DeviceI, InputEventType type, GameInput Gam static void HandleInputEvents(float fDeltaTime) { INPUTFILTER->Update( fDeltaTime ); + LIGHTSMAN->Update( fDeltaTime ); static InputEventArray ieArray; ieArray.clear(); // empty the array diff --git a/stepmania/src/arch/Lights/LightsDriver.h b/stepmania/src/arch/Lights/LightsDriver.h new file mode 100644 index 0000000000..82ac43aac9 --- /dev/null +++ b/stepmania/src/arch/Lights/LightsDriver.h @@ -0,0 +1,26 @@ +#ifndef LightsDriver_H +#define LightsDriver_H +/* +----------------------------------------------------------------------------- + Class: LightsDriver + + Desc: Control lights. + + Copyright (c) 2001-2002 by the person(s) listed below. All rights reserved. + Chris Danford +----------------------------------------------------------------------------- +*/ + +#include "LightsManager.h" + +class LightsDriver +{ +public: + LightsDriver() {}; + virtual ~LightsDriver() {}; + + virtual void SetLight( Light light, bool bOn ) = 0; +}; + + +#endif diff --git a/stepmania/src/arch/Lights/LightsDriver_Null.h b/stepmania/src/arch/Lights/LightsDriver_Null.h new file mode 100644 index 0000000000..f95edcfe78 --- /dev/null +++ b/stepmania/src/arch/Lights/LightsDriver_Null.h @@ -0,0 +1,26 @@ +#ifndef LightsDriver_Null_H +#define LightsDriver_Null_H +/* +----------------------------------------------------------------------------- + Class: LightsDriver_Null + + Desc: Control lights. + + Copyright (c) 2001-2002 by the person(s) listed below. All rights reserved. + Chris Danford +----------------------------------------------------------------------------- +*/ + +#include "LightsDriver.h" + +class LightsDriver_Null : public LightsDriver +{ +public: + LightsDriver_Null() {}; + virtual ~LightsDriver_Null() {}; + + virtual void SetLight( Light light, bool bOn ) {}; +}; + + +#endif diff --git a/stepmania/src/arch/Lights/LightsDriver_Win32Parallel.cpp b/stepmania/src/arch/Lights/LightsDriver_Win32Parallel.cpp new file mode 100644 index 0000000000..76aedca405 --- /dev/null +++ b/stepmania/src/arch/Lights/LightsDriver_Win32Parallel.cpp @@ -0,0 +1,55 @@ +#include "global.h" +/* +----------------------------------------------------------------------------- + Class: LightsDriver_Win32Parallel + + Desc: See header. + + Copyright (c) 2001-2002 by the person(s) listed below. All rights reserved. + Chris Danford +----------------------------------------------------------------------------- +*/ + +#include "LightsDriver_Win32Parallel.h" +#include "windows.h" + + +HINSTANCE hDLL = NULL; + +typedef void (WINAPI PORTOUT)(short int Port, char Data); +PORTOUT* PortOut = NULL; +typedef short int (WINAPI ISDRIVERINSTALLED)(); +ISDRIVERINSTALLED* IsDriverInstalled = NULL; + + +LightsDriver_Win32Parallel::LightsDriver_Win32Parallel() +{ + // init io.dll + hDLL = LoadLibrary("parallel_lights_io.dll"); + if(hDLL == NULL) + { + MessageBox(NULL, "Could not LoadLibrary( parallel_lights_io.dll ).", "ERROR", MB_OK ); + return; + } + + //Get the function pointers + PortOut = (PORTOUT*) GetProcAddress(hDLL, "PortOut"); + IsDriverInstalled = (ISDRIVERINSTALLED*) GetProcAddress(hDLL, "IsDriverInstalled"); +} + +LightsDriver_Win32Parallel::~LightsDriver_Win32Parallel() +{ + FreeLibrary( hDLL ); +} + +void LightsDriver_Win32Parallel::SetLight( Light light, bool bOn ) +{ + static BYTE data = 0x00; + BYTE mask = 0x01 << light; + if( bOn ) + data |= mask; + else + data &= ~mask; + PortOut( 0x378, data ); + // ports of interest: 0x278, 0x3BC, 0x378 +} diff --git a/stepmania/src/arch/Lights/LightsDriver_Win32Parallel.h b/stepmania/src/arch/Lights/LightsDriver_Win32Parallel.h new file mode 100644 index 0000000000..745c51d83b --- /dev/null +++ b/stepmania/src/arch/Lights/LightsDriver_Win32Parallel.h @@ -0,0 +1,27 @@ +#ifndef LightsDriver_Win32Parallel_H +#define LightsDriver_Win32Parallel_H +/* +----------------------------------------------------------------------------- + Class: LightsDriver_Win32Parallel + + Desc: Control lights. + + Copyright (c) 2001-2002 by the person(s) listed below. All rights reserved. + Chris Danford +----------------------------------------------------------------------------- +*/ + +#include "arch/Lights/LightsDriver.h" + +class LightsDriver_Win32Parallel : public LightsDriver +{ +public: + LightsDriver_Win32Parallel(); + virtual ~LightsDriver_Win32Parallel(); + + virtual void SetLight( Light light, bool bOn ); +}; + + + +#endif diff --git a/stepmania/src/arch/arch.cpp b/stepmania/src/arch/arch.cpp index 796479db89..2815103958 100644 --- a/stepmania/src/arch/arch.cpp +++ b/stepmania/src/arch/arch.cpp @@ -142,6 +142,26 @@ RageSoundDriver *MakeRageSoundDriver(CString drivers) return ret; } +/* Err, this is ugly--breaks arch encapsulation. Hmm. */ +LightsDriver *MakeLightsDriver(CString driver) +{ + LOG->Trace("Initializing lights driver: %s", driver.c_str()); + + LightsDriver *ret = NULL; + +#ifdef _WINDOWS + if(!driver.CompareNoCase("Parallel")) ret = new LightsDriver_Win32Parallel; +#endif + if(!driver.CompareNoCase("Null")) ret = new LightsDriver_Null; + if( !ret ) + { + LOG->Warn("Unknown lights driver name: %s", driver.c_str()); + ret = new LightsDriver_Null; + } + + return ret; +} + /* * Copyright (c) 2002 by the person(s) listed below. All rights reserved. * diff --git a/stepmania/src/arch/arch.h b/stepmania/src/arch/arch.h index 31a362e774..73ee8ae318 100644 --- a/stepmania/src/arch/arch.h +++ b/stepmania/src/arch/arch.h @@ -7,6 +7,7 @@ class RageSoundDriver; class ArchHooks; class InputHandler; class LowLevelWindow; +class LightsDriver; LoadingWindow *MakeLoadingWindow(); ArchHooks *MakeArchHooks(); @@ -14,6 +15,7 @@ LowLevelWindow *MakeLowLevelWindow(); void MakeInputHandlers(vector &Add); RageSoundDriver *MakeRageSoundDriver(CString drivers); +LightsDriver *MakeLightsDriver(CString driver); /* These definitions are in here, instead of in arch_*.h, because they * need to be available to other modules. It'd be overkill to create separate diff --git a/stepmania/src/arch/arch_Win32.h b/stepmania/src/arch/arch_Win32.h index 6a7849682a..31127ff7c4 100644 --- a/stepmania/src/arch/arch_Win32.h +++ b/stepmania/src/arch/arch_Win32.h @@ -13,6 +13,8 @@ #include "Sound/RageSoundDriver_DSound_Software.h" #include "Sound/RageSoundDriver_WaveOut.h" +#include "Lights/LightsDriver_Win32Parallel.h" + #undef SUPPORT_SDL_INPUT #endif diff --git a/stepmania/src/arch/arch_default.h b/stepmania/src/arch/arch_default.h index 72b85192db..5a527471c2 100644 --- a/stepmania/src/arch/arch_default.h +++ b/stepmania/src/arch/arch_default.h @@ -33,6 +33,7 @@ #include "LoadingWindow/LoadingWindow_Null.h" #include "ArchHooks/ArchHooks_none.h" #include "Sound/RageSoundDriver_Null.h" +#include "Lights/LightsDriver_Null.h" #if defined(SUPPORT_OPENGL) #include "LowLevelWindow/LowLevelWindow_SDL.h"