don't show unused lights
This commit is contained in:
@@ -20,6 +20,13 @@
|
|||||||
#include "InputMapper.h"
|
#include "InputMapper.h"
|
||||||
#include "PrefsManager.h"
|
#include "PrefsManager.h"
|
||||||
|
|
||||||
|
int GameDef::GetNumGameplayButtons()
|
||||||
|
{
|
||||||
|
int iIndexOfStart = ButtonNameToIndex( "Start" );
|
||||||
|
ASSERT( iIndexOfStart != GAME_BUTTON_INVALID );
|
||||||
|
return iIndexOfStart;
|
||||||
|
}
|
||||||
|
|
||||||
GameButton GameDef::ButtonNameToIndex( const CString &sButtonName ) const
|
GameButton GameDef::ButtonNameToIndex( const CString &sButtonName ) const
|
||||||
{
|
{
|
||||||
for( int i=0; i<m_iButtonsPerController; i++ )
|
for( int i=0; i<m_iButtonsPerController; i++ )
|
||||||
|
|||||||
@@ -48,6 +48,7 @@ public:
|
|||||||
char m_szDescription[60];
|
char m_szDescription[60];
|
||||||
int m_iNumControllers;
|
int m_iNumControllers;
|
||||||
int m_iButtonsPerController;
|
int m_iButtonsPerController;
|
||||||
|
int GetNumGameplayButtons();
|
||||||
char m_szButtonNames[MAX_GAME_BUTTONS][60]; // The name used by the button graphics system. e.g. "left", "right", "middle C", "snare"
|
char m_szButtonNames[MAX_GAME_BUTTONS][60]; // The name used by the button graphics system. e.g. "left", "right", "middle C", "snare"
|
||||||
char m_szSecondaryFunction[MAX_GAME_BUTTONS][60]; // displayed on the mapping screen
|
char m_szSecondaryFunction[MAX_GAME_BUTTONS][60]; // displayed on the mapping screen
|
||||||
GameButton m_DedicatedMenuButton[NUM_MENU_BUTTONS];
|
GameButton m_DedicatedMenuButton[NUM_MENU_BUTTONS];
|
||||||
|
|||||||
@@ -60,8 +60,8 @@ void ScreenTestLights::Update( float fDeltaTime )
|
|||||||
int iSec = (int)RageTimer::GetTimeSinceStart();
|
int iSec = (int)RageTimer::GetTimeSinceStart();
|
||||||
|
|
||||||
CabinetLight cl = (CabinetLight)(iSec%NUM_CABINET_LIGHTS);
|
CabinetLight cl = (CabinetLight)(iSec%NUM_CABINET_LIGHTS);
|
||||||
int iNumGameButtons = GAMESTATE->GetCurrentGameDef()->m_iButtonsPerController;
|
int iNumGameButtonsToShow = GAMESTATE->GetCurrentGameDef()->GetNumGameplayButtons();
|
||||||
GameButton gb = (GameButton)(iSec%iNumGameButtons);
|
GameButton gb = (GameButton)(iSec%iNumGameButtonsToShow);
|
||||||
CString sCabLight = CabinetLightToString(cl);
|
CString sCabLight = CabinetLightToString(cl);
|
||||||
CString sGameButton = GAMESTATE->GetCurrentGameDef()->m_szButtonNames[gb];
|
CString sGameButton = GAMESTATE->GetCurrentGameDef()->m_szButtonNames[gb];
|
||||||
|
|
||||||
|
|||||||
@@ -12,6 +12,8 @@
|
|||||||
|
|
||||||
#include "LightsDriver_SystemMessage.h"
|
#include "LightsDriver_SystemMessage.h"
|
||||||
#include "ScreenManager.h"
|
#include "ScreenManager.h"
|
||||||
|
#include "GameState.h"
|
||||||
|
#include "GameDef.h"
|
||||||
|
|
||||||
|
|
||||||
LightsDriver_SystemMessage::LightsDriver_SystemMessage()
|
LightsDriver_SystemMessage::LightsDriver_SystemMessage()
|
||||||
@@ -33,10 +35,12 @@ void LightsDriver_SystemMessage::Set( const LightsState *ls )
|
|||||||
}
|
}
|
||||||
s += "\n";
|
s += "\n";
|
||||||
|
|
||||||
|
int iNumGameButtonsToShow = GAMESTATE->GetCurrentGameDef()->GetNumGameplayButtons();
|
||||||
|
|
||||||
FOREACH_GameController( gc )
|
FOREACH_GameController( gc )
|
||||||
{
|
{
|
||||||
s += ssprintf("Controller%d: ",gc+1);
|
s += ssprintf("Controller%d: ",gc+1);
|
||||||
FOREACH_GameButton( gb )
|
for( int gb=0; gb<iNumGameButtonsToShow; gb++ )
|
||||||
{
|
{
|
||||||
s += ls->m_bGameButtonLights[gc][gb] ? '1' : '0';
|
s += ls->m_bGameButtonLights[gc][gb] ? '1' : '0';
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user