don't show unused lights
This commit is contained in:
@@ -20,6 +20,13 @@
|
||||
#include "InputMapper.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
|
||||
{
|
||||
for( int i=0; i<m_iButtonsPerController; i++ )
|
||||
|
||||
@@ -48,6 +48,7 @@ public:
|
||||
char m_szDescription[60];
|
||||
int m_iNumControllers;
|
||||
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_szSecondaryFunction[MAX_GAME_BUTTONS][60]; // displayed on the mapping screen
|
||||
GameButton m_DedicatedMenuButton[NUM_MENU_BUTTONS];
|
||||
|
||||
@@ -60,8 +60,8 @@ void ScreenTestLights::Update( float fDeltaTime )
|
||||
int iSec = (int)RageTimer::GetTimeSinceStart();
|
||||
|
||||
CabinetLight cl = (CabinetLight)(iSec%NUM_CABINET_LIGHTS);
|
||||
int iNumGameButtons = GAMESTATE->GetCurrentGameDef()->m_iButtonsPerController;
|
||||
GameButton gb = (GameButton)(iSec%iNumGameButtons);
|
||||
int iNumGameButtonsToShow = GAMESTATE->GetCurrentGameDef()->GetNumGameplayButtons();
|
||||
GameButton gb = (GameButton)(iSec%iNumGameButtonsToShow);
|
||||
CString sCabLight = CabinetLightToString(cl);
|
||||
CString sGameButton = GAMESTATE->GetCurrentGameDef()->m_szButtonNames[gb];
|
||||
|
||||
|
||||
@@ -12,6 +12,8 @@
|
||||
|
||||
#include "LightsDriver_SystemMessage.h"
|
||||
#include "ScreenManager.h"
|
||||
#include "GameState.h"
|
||||
#include "GameDef.h"
|
||||
|
||||
|
||||
LightsDriver_SystemMessage::LightsDriver_SystemMessage()
|
||||
@@ -32,11 +34,13 @@ void LightsDriver_SystemMessage::Set( const LightsState *ls )
|
||||
s += ls->m_bCabinetLights[cl] ? '1' : '0';
|
||||
}
|
||||
s += "\n";
|
||||
|
||||
int iNumGameButtonsToShow = GAMESTATE->GetCurrentGameDef()->GetNumGameplayButtons();
|
||||
|
||||
FOREACH_GameController( gc )
|
||||
{
|
||||
s += ssprintf("Controller%d: ",gc+1);
|
||||
FOREACH_GameButton( gb )
|
||||
for( int gb=0; gb<iNumGameButtonsToShow; gb++ )
|
||||
{
|
||||
s += ls->m_bGameButtonLights[gc][gb] ? '1' : '0';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user