add LightsDriver_ScreenMessage
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
#include "global.h"
|
||||
/*
|
||||
-----------------------------------------------------------------------------
|
||||
Class: LightsDriver_SystemMessage
|
||||
|
||||
Desc: See header.
|
||||
|
||||
Copyright (c) 2003 by the person(s) listed below. All rights reserved.
|
||||
Chris Danford
|
||||
-----------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#include "LightsDriver_SystemMessage.h"
|
||||
#include "ScreenManager.h"
|
||||
|
||||
|
||||
bool g_bLightOn[NUM_LIGHTS];
|
||||
|
||||
LightsDriver_SystemMessage::LightsDriver_SystemMessage()
|
||||
{
|
||||
memset( g_bLightOn, 0, sizeof(g_bLightOn) );
|
||||
}
|
||||
|
||||
LightsDriver_SystemMessage::~LightsDriver_SystemMessage()
|
||||
{
|
||||
}
|
||||
|
||||
void LightsDriver_SystemMessage::SetLight( Light light, bool bOn )
|
||||
{
|
||||
g_bLightOn[light] = bOn;
|
||||
}
|
||||
|
||||
void LightsDriver_SystemMessage::Flush()
|
||||
{
|
||||
CString s = "Lights: ";
|
||||
for( int i=0; i<NUM_LIGHTS; i++ )
|
||||
{
|
||||
s += g_bLightOn[i] ? '1' : '0';
|
||||
}
|
||||
SCREENMAN->SystemMessageNoAnimate( s );
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
#ifndef LightsDriver_SystemMessage_H
|
||||
#define LightsDriver_SystemMessage_H
|
||||
/*
|
||||
-----------------------------------------------------------------------------
|
||||
Class: LightsDriver_SystemMessage
|
||||
|
||||
Desc: Control lights.
|
||||
|
||||
Copyright (c) 2003 by the person(s) listed below. All rights reserved.
|
||||
Chris Danford
|
||||
-----------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#include "arch/Lights/LightsDriver.h"
|
||||
|
||||
class LightsDriver_SystemMessage : public LightsDriver
|
||||
{
|
||||
public:
|
||||
LightsDriver_SystemMessage();
|
||||
virtual ~LightsDriver_SystemMessage();
|
||||
|
||||
virtual void SetLight( Light light, bool bOn );
|
||||
virtual void Flush();
|
||||
};
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
@@ -155,6 +155,7 @@ LightsDriver *MakeLightsDriver(CString driver)
|
||||
#ifdef LINUX
|
||||
if(!driver.CompareNoCase("Serial")) ret = new LightsDriver_LinuxSerial;
|
||||
#endif
|
||||
if(!driver.CompareNoCase("SystemMessage")) ret = new LightsDriver_SystemMessage;
|
||||
if(!driver.CompareNoCase("Null")) ret = new LightsDriver_Null;
|
||||
if( !ret )
|
||||
{
|
||||
|
||||
@@ -34,6 +34,7 @@
|
||||
#include "ArchHooks/ArchHooks_none.h"
|
||||
#include "Sound/RageSoundDriver_Null.h"
|
||||
#include "Lights/LightsDriver_Null.h"
|
||||
#include "Lights/LightsDriver_SystemMessage.h"
|
||||
|
||||
#if defined(SUPPORT_OPENGL)
|
||||
#include "LowLevelWindow/LowLevelWindow_SDL.h"
|
||||
|
||||
Reference in New Issue
Block a user