From 07f941f734b88e84dcd8f9863db0e201ab3ef597 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Sun, 20 Feb 2005 04:53:57 +0000 Subject: [PATCH] allow more than 3 mappings per GameInput (but don't show them in ScreenMapControllers) --- stepmania/src/InputMapper.h | 2 +- stepmania/src/ScreenMapControllers.cpp | 10 +++++----- stepmania/src/ScreenMapControllers.h | 3 ++- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/stepmania/src/InputMapper.h b/stepmania/src/InputMapper.h index 5888b11bfe..beeaa36245 100644 --- a/stepmania/src/InputMapper.h +++ b/stepmania/src/InputMapper.h @@ -11,7 +11,7 @@ -const int NUM_GAME_TO_DEVICE_SLOTS = 3; // three device inputs may map to one game input +const int NUM_GAME_TO_DEVICE_SLOTS = 5; // five device inputs may map to one game input class InputMapper diff --git a/stepmania/src/ScreenMapControllers.cpp b/stepmania/src/ScreenMapControllers.cpp index 6ecd5a495d..68bab3d826 100644 --- a/stepmania/src/ScreenMapControllers.cpp +++ b/stepmania/src/ScreenMapControllers.cpp @@ -24,12 +24,12 @@ static const ThemeMetric ODD_LINE_OUT ("ScreenMapControllers"," const int FramesToWaitForInput = 2; // reserve the 3rd slot for hard-coded keys -const int NUM_CHANGABLE_SLOTS = NUM_GAME_TO_DEVICE_SLOTS-1; +const int NUM_CHANGABLE_SLOTS = NUM_SHOWN_GAME_TO_DEVICE_SLOTS-1; const float LINE_START_Y = 64; const float LINE_GAP_Y = 28; -const float BUTTON_COLUMN_X[NUM_GAME_TO_DEVICE_SLOTS*MAX_GAME_CONTROLLERS] = +const float BUTTON_COLUMN_X[NUM_SHOWN_GAME_TO_DEVICE_SLOTS*MAX_GAME_CONTROLLERS] = { 50, 125, 200, 440, 515, 590 }; @@ -68,10 +68,10 @@ ScreenMapControllers::ScreenMapControllers( CString sClassName ) : ScreenWithMen for( int p=0; pGetPathF("ScreenMapControllers","entry") ); - m_textMappedTo[p][b][s].SetXY( BUTTON_COLUMN_X[p*NUM_GAME_TO_DEVICE_SLOTS+s], 0 ); + m_textMappedTo[p][b][s].SetXY( BUTTON_COLUMN_X[p*NUM_SHOWN_GAME_TO_DEVICE_SLOTS+s], 0 ); m_textMappedTo[p][b][s].SetZoom( 0.5f ); m_textMappedTo[p][b][s].SetShadowLength( 0 ); m_Line[b].AddChild( &m_textMappedTo[p][b][s] ); @@ -333,7 +333,7 @@ void ScreenMapControllers::Refresh() { for( int b=0; bGetCurrentGame()->m_iButtonsPerController; b++ ) { - for( int s=0; s