allow more than 3 mappings per GameInput (but don't show them in

ScreenMapControllers)
This commit is contained in:
Glenn Maynard
2005-02-20 04:53:57 +00:00
parent e9a6b578e3
commit 07f941f734
3 changed files with 8 additions and 7 deletions
+1 -1
View File
@@ -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
+5 -5
View File
@@ -24,12 +24,12 @@ static const ThemeMetric<apActorCommands> 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; p<MAX_GAME_CONTROLLERS; p++ )
{
for( int s=0; s<NUM_GAME_TO_DEVICE_SLOTS; s++ )
for( int s=0; s<NUM_SHOWN_GAME_TO_DEVICE_SLOTS; s++ )
{
m_textMappedTo[p][b][s].LoadFromFont( THEME->GetPathF("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; b<GAMESTATE->GetCurrentGame()->m_iButtonsPerController; b++ )
{
for( int s=0; s<NUM_GAME_TO_DEVICE_SLOTS; s++ )
for( int s=0; s<NUM_SHOWN_GAME_TO_DEVICE_SLOTS; s++ )
{
bool bSelected = p == m_iCurController && b == m_iCurButton && s == m_iCurSlot;
+2 -1
View File
@@ -8,6 +8,7 @@
#include "BitmapText.h"
#include "InputMapper.h"
enum { NUM_SHOWN_GAME_TO_DEVICE_SLOTS = 3 };
class ScreenMapControllers : public ScreenWithMenuElements
{
@@ -41,7 +42,7 @@ private:
BitmapText m_textError;
BitmapText m_textName[MAX_GAME_BUTTONS];
BitmapText m_textName2[MAX_GAME_BUTTONS];
BitmapText m_textMappedTo[MAX_GAME_CONTROLLERS][MAX_GAME_BUTTONS][NUM_GAME_TO_DEVICE_SLOTS];
BitmapText m_textMappedTo[MAX_GAME_CONTROLLERS][MAX_GAME_BUTTONS][NUM_SHOWN_GAME_TO_DEVICE_SLOTS];
ActorFrame m_Line[MAX_GAME_BUTTONS];
};