From cbfebb16bb640168468e9e763f735b29059d7b7b Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Wed, 13 Sep 2006 10:11:36 +0000 Subject: [PATCH] use input.pn --- stepmania/src/ScreenNameEntry.cpp | 10 +++++----- stepmania/src/ScreenNetRoom.cpp | 4 ++-- stepmania/src/ScreenNetSelectMusic.cpp | 2 +- stepmania/src/ScreenOptions.cpp | 18 +++++++++--------- 4 files changed, 17 insertions(+), 17 deletions(-) diff --git a/stepmania/src/ScreenNameEntry.cpp b/stepmania/src/ScreenNameEntry.cpp index 9c4de63556..0519755f39 100644 --- a/stepmania/src/ScreenNameEntry.cpp +++ b/stepmania/src/ScreenNameEntry.cpp @@ -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; } } diff --git a/stepmania/src/ScreenNetRoom.cpp b/stepmania/src/ScreenNetRoom.cpp index 9e287af62b..33f23b60a9 100644 --- a/stepmania/src/ScreenNetRoom.cpp +++ b/stepmania/src/ScreenNetRoom.cpp @@ -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() diff --git a/stepmania/src/ScreenNetSelectMusic.cpp b/stepmania/src/ScreenNetSelectMusic.cpp index feee07be8e..65801e1c04 100644 --- a/stepmania/src/ScreenNetSelectMusic.cpp +++ b/stepmania/src/ScreenNetSelectMusic.cpp @@ -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; diff --git a/stepmania/src/ScreenOptions.cpp b/stepmania/src/ScreenOptions.cpp index ca166ec39b..56e2e6acfd 100644 --- a/stepmania/src/ScreenOptions.cpp +++ b/stepmania/src/ScreenOptions.cpp @@ -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 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 ) {