add LightsDriver_ScreenMessage

This commit is contained in:
Chris Danford
2003-11-20 11:55:45 +00:00
parent 4e80f3057a
commit ffc40fe994
12 changed files with 186 additions and 42 deletions
@@ -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 );
}