CabinetLight_Invalid
This commit is contained in:
@@ -12,7 +12,7 @@
|
|||||||
#include "ThemeManager.h"
|
#include "ThemeManager.h"
|
||||||
#include "LuaReference.h"
|
#include "LuaReference.h"
|
||||||
#include "MessageManager.h"
|
#include "MessageManager.h"
|
||||||
#include "LightsManager.h" // for NUM_CABINET_LIGHTS
|
#include "LightsManager.h" // for NUM_CabinetLight
|
||||||
#include "ActorUtil.h"
|
#include "ActorUtil.h"
|
||||||
|
|
||||||
/* It's useful to be able to construct a basic Actor in XML, in
|
/* It's useful to be able to construct a basic Actor in XML, in
|
||||||
@@ -30,7 +30,7 @@ float Actor::g_fCurrentBGMTime = 0, Actor::g_fCurrentBGMBeat;
|
|||||||
|
|
||||||
Actor *Actor::Copy() const { return new Actor(*this); }
|
Actor *Actor::Copy() const { return new Actor(*this); }
|
||||||
|
|
||||||
static float g_fCabinetLights[NUM_CABINET_LIGHTS];
|
static float g_fCabinetLights[NUM_CabinetLight];
|
||||||
|
|
||||||
static const char *HorizAlignNames[] = {
|
static const char *HorizAlignNames[] = {
|
||||||
"Left",
|
"Left",
|
||||||
@@ -54,7 +54,7 @@ void Actor::SetBGMTime( float fTime, float fBeat )
|
|||||||
|
|
||||||
void Actor::SetBGMLight( int iLightNumber, float fCabinetLights )
|
void Actor::SetBGMLight( int iLightNumber, float fCabinetLights )
|
||||||
{
|
{
|
||||||
ASSERT( iLightNumber < NUM_CABINET_LIGHTS );
|
ASSERT( iLightNumber < NUM_CabinetLight );
|
||||||
g_fCabinetLights[iLightNumber] = fCabinetLights;
|
g_fCabinetLights[iLightNumber] = fCabinetLights;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -852,7 +852,7 @@ void Actor::SetEffectClockString( const RString &s )
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
CabinetLight cl = StringToCabinetLight( s );
|
CabinetLight cl = StringToCabinetLight( s );
|
||||||
if( cl != LIGHT_INVALID )
|
if( cl != CabinetLight_Invalid )
|
||||||
{
|
{
|
||||||
this->SetEffectClock( (EffectClock) (cl + CLOCK_LIGHT_1) );
|
this->SetEffectClock( (EffectClock) (cl + CLOCK_LIGHT_1) );
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
#include "NoteSkinManager.h"
|
#include "NoteSkinManager.h"
|
||||||
#include "RageInputDevice.h"
|
#include "RageInputDevice.h"
|
||||||
#include "ThemeManager.h"
|
#include "ThemeManager.h"
|
||||||
#include "LightsManager.h" // for NUM_CABINET_LIGHTS
|
#include "LightsManager.h" // for NUM_CabinetLight
|
||||||
#include "Game.h"
|
#include "Game.h"
|
||||||
#include "Style.h"
|
#include "Style.h"
|
||||||
|
|
||||||
@@ -104,7 +104,7 @@ static struct
|
|||||||
{ "techno-double5", 10, ST_FLAGS_NONE },
|
{ "techno-double5", 10, ST_FLAGS_NONE },
|
||||||
{ "pnm-five", 5, ST_FLAGS_NONE }, // called "pnm" for backward compat
|
{ "pnm-five", 5, ST_FLAGS_NONE }, // called "pnm" for backward compat
|
||||||
{ "pnm-nine", 9, ST_FLAGS_NONE }, // called "pnm" for backward compat
|
{ "pnm-nine", 9, ST_FLAGS_NONE }, // called "pnm" for backward compat
|
||||||
{ "lights-cabinet", NUM_CABINET_LIGHTS, ST_FLAGS_DONT_AUTOGEN }, // XXX disable lights autogen for now
|
{ "lights-cabinet", NUM_CabinetLight, ST_FLAGS_DONT_AUTOGEN }, // XXX disable lights autogen for now
|
||||||
};
|
};
|
||||||
|
|
||||||
//
|
//
|
||||||
@@ -2607,7 +2607,7 @@ static Style g_Styles[] =
|
|||||||
"cabinet", // m_szName
|
"cabinet", // m_szName
|
||||||
STEPS_TYPE_LIGHTS_CABINET, // m_StepsType
|
STEPS_TYPE_LIGHTS_CABINET, // m_StepsType
|
||||||
ONE_PLAYER_ONE_SIDE, // m_StyleType
|
ONE_PLAYER_ONE_SIDE, // m_StyleType
|
||||||
NUM_CABINET_LIGHTS, // m_iColsPerPlayer
|
NUM_CabinetLight, // m_iColsPerPlayer
|
||||||
{ // m_ColumnInfo[NUM_PLAYERS][MAX_COLS_PER_PLAYER];
|
{ // m_ColumnInfo[NUM_PLAYERS][MAX_COLS_PER_PLAYER];
|
||||||
{ // PLAYER_1
|
{ // PLAYER_1
|
||||||
{ TRACK_1, -DANCE_COL_SPACING*3.5f, NULL },
|
{ TRACK_1, -DANCE_COL_SPACING*3.5f, NULL },
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ static const char *CabinetLightNames[] = {
|
|||||||
"BassLeft",
|
"BassLeft",
|
||||||
"BassRight",
|
"BassRight",
|
||||||
};
|
};
|
||||||
XToString( CabinetLight, NUM_CABINET_LIGHTS );
|
XToString( CabinetLight, NUM_CabinetLight );
|
||||||
StringToX( CabinetLight );
|
StringToX( CabinetLight );
|
||||||
|
|
||||||
static const char *LightsModeNames[] = {
|
static const char *LightsModeNames[] = {
|
||||||
@@ -92,7 +92,7 @@ LightsManager::LightsManager()
|
|||||||
sDriver = DEFAULT_LIGHTS_DRIVER;
|
sDriver = DEFAULT_LIGHTS_DRIVER;
|
||||||
MakeLightsDrivers( sDriver, m_vpDrivers );
|
MakeLightsDrivers( sDriver, m_vpDrivers );
|
||||||
m_fTestAutoCycleCurrentIndex = 0;
|
m_fTestAutoCycleCurrentIndex = 0;
|
||||||
m_clTestManualCycleCurrent = LIGHT_INVALID;
|
m_clTestManualCycleCurrent = CabinetLight_Invalid;
|
||||||
m_iControllerTestManualCycleCurrent = -1;
|
m_iControllerTestManualCycleCurrent = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -167,7 +167,7 @@ void LightsManager::Update( float fDeltaTime )
|
|||||||
if( m_LightsMode == LIGHTSMODE_TEST_AUTO_CYCLE )
|
if( m_LightsMode == LIGHTSMODE_TEST_AUTO_CYCLE )
|
||||||
{
|
{
|
||||||
m_fTestAutoCycleCurrentIndex += fDeltaTime;
|
m_fTestAutoCycleCurrentIndex += fDeltaTime;
|
||||||
m_fTestAutoCycleCurrentIndex = fmodf( m_fTestAutoCycleCurrentIndex, NUM_CABINET_LIGHTS*100 );
|
m_fTestAutoCycleCurrentIndex = fmodf( m_fTestAutoCycleCurrentIndex, NUM_CabinetLight*100 );
|
||||||
}
|
}
|
||||||
|
|
||||||
switch( m_LightsMode )
|
switch( m_LightsMode )
|
||||||
@@ -266,7 +266,7 @@ void LightsManager::Update( float fDeltaTime )
|
|||||||
int iSec = GetTestAutoCycleCurrentIndex();
|
int iSec = GetTestAutoCycleCurrentIndex();
|
||||||
FOREACH_CabinetLight( cl )
|
FOREACH_CabinetLight( cl )
|
||||||
{
|
{
|
||||||
bool bOn = (iSec%NUM_CABINET_LIGHTS) == cl;
|
bool bOn = (iSec%NUM_CabinetLight) == cl;
|
||||||
m_LightsState.m_bCabinetLights[cl] = bOn;
|
m_LightsState.m_bCabinetLights[cl] = bOn;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -426,12 +426,12 @@ void LightsManager::ChangeTestCabinetLight( int iDir )
|
|||||||
m_iControllerTestManualCycleCurrent = -1;
|
m_iControllerTestManualCycleCurrent = -1;
|
||||||
|
|
||||||
m_clTestManualCycleCurrent = (CabinetLight)(m_clTestManualCycleCurrent+iDir);
|
m_clTestManualCycleCurrent = (CabinetLight)(m_clTestManualCycleCurrent+iDir);
|
||||||
wrap( (int&)m_clTestManualCycleCurrent, NUM_CABINET_LIGHTS );
|
wrap( (int&)m_clTestManualCycleCurrent, NUM_CabinetLight );
|
||||||
}
|
}
|
||||||
|
|
||||||
void LightsManager::ChangeTestGameButtonLight( int iDir )
|
void LightsManager::ChangeTestGameButtonLight( int iDir )
|
||||||
{
|
{
|
||||||
m_clTestManualCycleCurrent = LIGHT_INVALID;
|
m_clTestManualCycleCurrent = CabinetLight_Invalid;
|
||||||
|
|
||||||
vector<GameInput> vGI;
|
vector<GameInput> vGI;
|
||||||
GetUsedGameInputs( vGI );
|
GetUsedGameInputs( vGI );
|
||||||
@@ -447,7 +447,7 @@ CabinetLight LightsManager::GetFirstLitCabinetLight()
|
|||||||
if( m_LightsState.m_bCabinetLights[cl] )
|
if( m_LightsState.m_bCabinetLights[cl] )
|
||||||
return cl;
|
return cl;
|
||||||
}
|
}
|
||||||
return LIGHT_INVALID;
|
return CabinetLight_Invalid;
|
||||||
}
|
}
|
||||||
|
|
||||||
void LightsManager::GetFirstLitGameButtonLight( GameController &gcOut, GameButton &gbOut )
|
void LightsManager::GetFirstLitGameButtonLight( GameController &gcOut, GameButton &gbOut )
|
||||||
|
|||||||
@@ -21,10 +21,10 @@ enum CabinetLight
|
|||||||
LIGHT_BUTTONS_RIGHT,
|
LIGHT_BUTTONS_RIGHT,
|
||||||
LIGHT_BASS_LEFT,
|
LIGHT_BASS_LEFT,
|
||||||
LIGHT_BASS_RIGHT,
|
LIGHT_BASS_RIGHT,
|
||||||
NUM_CABINET_LIGHTS,
|
NUM_CabinetLight,
|
||||||
LIGHT_INVALID
|
CabinetLight_Invalid
|
||||||
};
|
};
|
||||||
#define FOREACH_CabinetLight( i ) FOREACH_ENUM( CabinetLight, NUM_CABINET_LIGHTS, i )
|
#define FOREACH_CabinetLight( i ) FOREACH_ENUM( CabinetLight, NUM_CabinetLight, i )
|
||||||
const RString& CabinetLightToString( CabinetLight cl );
|
const RString& CabinetLightToString( CabinetLight cl );
|
||||||
CabinetLight StringToCabinetLight( const RString& s);
|
CabinetLight StringToCabinetLight( const RString& s);
|
||||||
|
|
||||||
@@ -45,7 +45,7 @@ const RString& LightsModeToString( LightsMode lm );
|
|||||||
|
|
||||||
struct LightsState
|
struct LightsState
|
||||||
{
|
{
|
||||||
bool m_bCabinetLights[NUM_CABINET_LIGHTS];
|
bool m_bCabinetLights[NUM_CabinetLight];
|
||||||
bool m_bGameButtonLights[NUM_GameController][MAX_GAME_BUTTONS];
|
bool m_bGameButtonLights[NUM_GameController][MAX_GAME_BUTTONS];
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -80,10 +80,10 @@ private:
|
|||||||
void ChangeTestCabinetLight( int iDir );
|
void ChangeTestCabinetLight( int iDir );
|
||||||
void ChangeTestGameButtonLight( int iDir );
|
void ChangeTestGameButtonLight( int iDir );
|
||||||
|
|
||||||
float m_fSecsLeftInCabinetLightBlink[NUM_CABINET_LIGHTS];
|
float m_fSecsLeftInCabinetLightBlink[NUM_CabinetLight];
|
||||||
float m_fSecsLeftInGameButtonBlink[NUM_GameController][MAX_GAME_BUTTONS];
|
float m_fSecsLeftInGameButtonBlink[NUM_GameController][MAX_GAME_BUTTONS];
|
||||||
float m_fActorLights[NUM_CABINET_LIGHTS]; // current "power" of each actor light
|
float m_fActorLights[NUM_CabinetLight]; // current "power" of each actor light
|
||||||
float m_fSecsLeftInActorLightBlink[NUM_CABINET_LIGHTS]; // duration to "power" an actor light
|
float m_fSecsLeftInActorLightBlink[NUM_CabinetLight]; // duration to "power" an actor light
|
||||||
|
|
||||||
vector<LightsDriver*> m_vpDrivers;
|
vector<LightsDriver*> m_vpDrivers;
|
||||||
LightsMode m_LightsMode;
|
LightsMode m_LightsMode;
|
||||||
|
|||||||
@@ -662,8 +662,8 @@ void NoteDataUtil::LoadTransformedLightsFromTwo( const NoteData &marquee, const
|
|||||||
transformed_marquee.CopyAll( marquee );
|
transformed_marquee.CopyAll( marquee );
|
||||||
Wide( transformed_marquee );
|
Wide( transformed_marquee );
|
||||||
|
|
||||||
const int iOriginalTrackToTakeFrom[NUM_CABINET_LIGHTS] = { 0, 1, 2, 3, -1, -1, -1, -1 };
|
const int iOriginalTrackToTakeFrom[NUM_CabinetLight] = { 0, 1, 2, 3, -1, -1, -1, -1 };
|
||||||
out.LoadTransformed( transformed_marquee, NUM_CABINET_LIGHTS, iOriginalTrackToTakeFrom );
|
out.LoadTransformed( transformed_marquee, NUM_CabinetLight, iOriginalTrackToTakeFrom );
|
||||||
}
|
}
|
||||||
|
|
||||||
/* For each track in "bass", enable the bass lights. */
|
/* For each track in "bass", enable the bass lights. */
|
||||||
|
|||||||
@@ -1870,7 +1870,7 @@ void ScreenGameplay::UpdateLights()
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
const Style* pStyle = GAMESTATE->GetCurrentStyle();
|
const Style* pStyle = GAMESTATE->GetCurrentStyle();
|
||||||
bool bBlinkCabinetLight[NUM_CABINET_LIGHTS];
|
bool bBlinkCabinetLight[NUM_CabinetLight];
|
||||||
bool bBlinkGameButton[NUM_GameController][MAX_GAME_BUTTONS];
|
bool bBlinkGameButton[NUM_GameController][MAX_GAME_BUTTONS];
|
||||||
ZERO( bBlinkCabinetLight );
|
ZERO( bBlinkCabinetLight );
|
||||||
ZERO( bBlinkGameButton );
|
ZERO( bBlinkGameButton );
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ void ScreenTestLights::Update( float fDeltaTime )
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( cl == LIGHT_INVALID )
|
if( cl == CabinetLight_Invalid )
|
||||||
s += CABINET_LIGHT.GetValue()+": -----\n";
|
s += CABINET_LIGHT.GetValue()+": -----\n";
|
||||||
else
|
else
|
||||||
s += ssprintf( CABINET_LIGHT.GetValue()+": %d %s\n", cl, CabinetLightToString(cl).c_str() );
|
s += ssprintf( CABINET_LIGHT.GetValue()+": %d %s\n", cl, CabinetLightToString(cl).c_str() );
|
||||||
|
|||||||
Reference in New Issue
Block a user