use input.pn

This commit is contained in:
Glenn Maynard
2006-09-13 10:11:36 +00:00
parent aeb9c89191
commit cbfebb16bb
4 changed files with 17 additions and 17 deletions
+5 -5
View File
@@ -346,16 +346,16 @@ void ScreenNameEntry::Input( const InputEventPlus &input )
return; // ignore
const int iCol = GAMESTATE->m_pCurStyle->GameInputToColumn( input.GameI );
if( iCol != Column_INVALID && m_bStillEnteringName[input.MenuI.player])
if( iCol != Column_INVALID && m_bStillEnteringName[input.pn] )
{
int iStringIndex = m_ColToStringIndex[input.MenuI.player][iCol];
int iStringIndex = m_ColToStringIndex[input.pn][iCol];
if( iStringIndex != -1 )
{
m_ReceptorArrowRow[input.MenuI.player].Step( iCol, TNS_W1 );
m_ReceptorArrowRow[input.pn].Step( iCol, TNS_W1 );
m_soundStep.Play();
char c = NAME_CHARS[GetClosestCharIndex(m_fFakeBeat)];
m_textSelectedChars[input.MenuI.player][iCol].SetText( ssprintf("%c",c) );
m_sSelectedName[input.MenuI.player][iStringIndex] = c;
m_textSelectedChars[input.pn][iCol].SetText( ssprintf("%c",c) );
m_sSelectedName[input.pn][iStringIndex] = c;
}
}
+2 -2
View File
@@ -250,7 +250,7 @@ void ScreenNetRoom::MenuLeft( const InputEventPlus &input )
if( input.type == IET_FIRST_PRESS )
m_RoomWheel.Move(-1);
ScreenNetSelectBase::MenuLeft( input.MenuI.player );
ScreenNetSelectBase::MenuLeft( input.pn );
}
void ScreenNetRoom::MenuRight( const InputEventPlus &input )
@@ -258,7 +258,7 @@ void ScreenNetRoom::MenuRight( const InputEventPlus &input )
if( input.type == IET_FIRST_PRESS )
m_RoomWheel.Move(1);
ScreenNetSelectBase::MenuRight( input.MenuI.player );
ScreenNetSelectBase::MenuRight( input.pn );
}
void ScreenNetRoom::UpdateRoomsList()
+1 -1
View File
@@ -357,7 +357,7 @@ void ScreenNetSelectMusic::MenuDown( const InputEventPlus &input )
their difficulty. */
/* Why? Nothing else allows that. */
PlayerNumber pn = input.MenuI.player;
PlayerNumber pn = input.pn;
if ( GAMESTATE->IsPlayerEnabled( PLAYER_2 ) &&
!GAMESTATE->IsPlayerEnabled( PLAYER_1 ) )
pn = PLAYER_2;
+9 -9
View File
@@ -492,7 +492,7 @@ void ScreenOptions::Input( const InputEventPlus &input )
if( m_Cancel.IsTransitioning() || m_Out.IsTransitioning() || m_fLockInputSecs > 0 )
return;
if( !GAMESTATE->IsHumanPlayer(input.MenuI.player) )
if( !GAMESTATE->IsHumanPlayer(input.pn) )
return;
if( input.type == IET_RELEASE )
@@ -503,9 +503,9 @@ void ScreenOptions::Input( const InputEventPlus &input )
case MENU_BUTTON_SELECT:
case MENU_BUTTON_RIGHT:
case MENU_BUTTON_LEFT:
INPUTMAPPER->ResetKeyRepeat( MenuInput(input.MenuI.player, MENU_BUTTON_START) );
INPUTMAPPER->ResetKeyRepeat( MenuInput(input.MenuI.player, MENU_BUTTON_RIGHT) );
INPUTMAPPER->ResetKeyRepeat( MenuInput(input.MenuI.player, MENU_BUTTON_LEFT) );
INPUTMAPPER->ResetKeyRepeat( MenuInput(input.pn, MENU_BUTTON_START) );
INPUTMAPPER->ResetKeyRepeat( MenuInput(input.pn, MENU_BUTTON_RIGHT) );
INPUTMAPPER->ResetKeyRepeat( MenuInput(input.pn, MENU_BUTTON_LEFT) );
}
}
@@ -772,7 +772,7 @@ bool ScreenOptions::AllAreOnLastRow() const
void ScreenOptions::MenuStart( const InputEventPlus &input )
{
PlayerNumber pn = input.MenuI.player;
PlayerNumber pn = input.pn;
switch( input.type )
{
case IET_FIRST_PRESS:
@@ -810,7 +810,7 @@ void ScreenOptions::MenuStart( const InputEventPlus &input )
void ScreenOptions::ProcessMenuStart( const InputEventPlus &input )
{
PlayerNumber pn = input.MenuI.player;
PlayerNumber pn = input.pn;
int iCurRow = m_iCurrentRow[pn];
OptionRow &row = *m_pRows[iCurRow];
@@ -818,11 +818,11 @@ void ScreenOptions::ProcessMenuStart( const InputEventPlus &input )
{
/* In NAV_THREE_KEY_MENU mode, if a row doesn't set a screen, it does
* something. Apply it now, and don't go to the next screen. */
RString sScreen = GetNextScreenForSelection( input.MenuI.player );
RString sScreen = GetNextScreenForSelection( input.pn );
if( sScreen.empty() )
{
vector<PlayerNumber> vpns;
vpns.push_back( input.MenuI.player );
vpns.push_back( input.pn );
ExportOptions( iCurRow, vpns );
return;
}
@@ -1215,7 +1215,7 @@ void ScreenOptions::MenuSelect( const InputEventPlus &input )
void ScreenOptions::MenuUpDown( const InputEventPlus &input, int iDir )
{
ASSERT( iDir == -1 || iDir == +1 );
PlayerNumber pn = input.MenuI.player;
PlayerNumber pn = input.pn;
if( input.type == IET_REPEAT )
{