input.MenuI.player -> input.pn
This commit is contained in:
+12
-12
@@ -153,20 +153,20 @@ void Screen::Update( float fDeltaTime )
|
||||
}
|
||||
}
|
||||
|
||||
void Screen::MenuUp( const InputEventPlus &input ) { if(input.type==IET_FIRST_PRESS) MenuUp(input.MenuI.player); }
|
||||
void Screen::MenuDown( const InputEventPlus &input ) { if(input.type==IET_FIRST_PRESS) MenuDown(input.MenuI.player); }
|
||||
void Screen::MenuLeft( const InputEventPlus &input ) { if(input.type==IET_FIRST_PRESS) MenuLeft(input.MenuI.player); }
|
||||
void Screen::MenuRight( const InputEventPlus &input ) { if(input.type==IET_FIRST_PRESS) MenuRight(input.MenuI.player); }
|
||||
void Screen::MenuStart( const InputEventPlus &input ) { if(input.type==IET_FIRST_PRESS) MenuStart(input.MenuI.player); }
|
||||
void Screen::MenuSelect( const InputEventPlus &input ) { if(input.type==IET_FIRST_PRESS) MenuSelect(input.MenuI.player); }
|
||||
void Screen::MenuUp( const InputEventPlus &input ) { if(input.type==IET_FIRST_PRESS) MenuUp(input.pn); }
|
||||
void Screen::MenuDown( const InputEventPlus &input ) { if(input.type==IET_FIRST_PRESS) MenuDown(input.pn); }
|
||||
void Screen::MenuLeft( const InputEventPlus &input ) { if(input.type==IET_FIRST_PRESS) MenuLeft(input.pn); }
|
||||
void Screen::MenuRight( const InputEventPlus &input ) { if(input.type==IET_FIRST_PRESS) MenuRight(input.pn); }
|
||||
void Screen::MenuStart( const InputEventPlus &input ) { if(input.type==IET_FIRST_PRESS) MenuStart(input.pn); }
|
||||
void Screen::MenuSelect( const InputEventPlus &input ) { if(input.type==IET_FIRST_PRESS) MenuSelect(input.pn); }
|
||||
|
||||
void Screen::MenuBack( const InputEventPlus &input )
|
||||
{
|
||||
if(!PREFSMAN->m_bDelayedBack || input.type==IET_REPEAT )
|
||||
MenuBack( input.MenuI.player) ;
|
||||
MenuBack( input.pn) ;
|
||||
}
|
||||
|
||||
void Screen::MenuCoin( const InputEventPlus &input ) { if(input.type==IET_FIRST_PRESS) MenuCoin(input.MenuI.player); }
|
||||
void Screen::MenuCoin( const InputEventPlus &input ) { if(input.type==IET_FIRST_PRESS) MenuCoin(input.pn); }
|
||||
|
||||
/* ScreenManager sends input here first. Overlay screens can use it to get a first
|
||||
* pass at input. Return true if the input was handled and should not be passed
|
||||
@@ -192,7 +192,7 @@ void Screen::Input( const InputEventPlus &input )
|
||||
/* Don't make the user hold the back button if they're pressing escape and escape is the back button. */
|
||||
if( input.MenuI.button == MENU_BUTTON_BACK && input.DeviceI.device == DEVICE_KEYBOARD && input.DeviceI.button == KEY_ESC )
|
||||
{
|
||||
this->MenuBack( input.MenuI.player );
|
||||
this->MenuBack( input.pn );
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -250,7 +250,7 @@ bool Screen::JoinInput( const MenuInput &MenuI )
|
||||
if( MenuI.IsValid() && MenuI.button==MENU_BUTTON_START )
|
||||
{
|
||||
/* If this side is already in, don't re-join (and re-pay!). */
|
||||
if(GAMESTATE->m_bSideIsJoined[MenuI.player])
|
||||
if(GAMESTATE->m_bSideIsJoined[pn])
|
||||
return false;
|
||||
|
||||
/* subtract coins */
|
||||
@@ -267,7 +267,7 @@ bool Screen::JoinInput( const MenuInput &MenuI )
|
||||
if( GAMESTATE->GetNumSidesJoined() > 0 )
|
||||
SCREENMAN->PlayStartSound();
|
||||
|
||||
GAMESTATE->JoinPlayer( MenuI.player );
|
||||
GAMESTATE->JoinPlayer( pn );
|
||||
|
||||
// don't load memory card profiles here. It's slow and can cause a big skip.
|
||||
/* Don't load the local profile, either. It causes a 150+ms skip on my A64 3000+,
|
||||
@@ -275,7 +275,7 @@ bool Screen::JoinInput( const MenuInput &MenuI )
|
||||
* anyway: leave it unloaded and display "INSERT CARD" until the normal time, and
|
||||
* load the local profile at the time we would have loaded the memory card if none
|
||||
* was inserted (via LoadFirstAvailableProfile). */
|
||||
// PROFILEMAN->LoadLocalProfileFromMachine( MenuI.player );
|
||||
// PROFILEMAN->LoadLocalProfileFromMachine( pn );
|
||||
SCREENMAN->RefreshCreditsMessages();
|
||||
|
||||
return true;
|
||||
|
||||
@@ -1920,7 +1920,7 @@ void ScreenEdit::InputRecord( const InputEventPlus &input, EditButton EditB )
|
||||
return;
|
||||
}
|
||||
|
||||
if( input.MenuI.player != PLAYER_1 )
|
||||
if( input.pn != PLAYER_1 )
|
||||
return; // ignore
|
||||
|
||||
const int iCol = GAMESTATE->m_pCurStyle->GameInputToColumn( input.GameI );
|
||||
@@ -2082,7 +2082,7 @@ void ScreenEdit::InputPlay( const InputEventPlus &input, EditButton EditB )
|
||||
if( PREFSMAN->m_AutoPlay != PC_HUMAN || iCol == -1 )
|
||||
return;
|
||||
|
||||
switch( input.MenuI.player )
|
||||
switch( input.pn )
|
||||
{
|
||||
case PLAYER_1:
|
||||
m_Player->Step( iCol, -1, input.DeviceI.ts, false, input.type == IET_RELEASE );
|
||||
|
||||
@@ -223,7 +223,7 @@ protected:
|
||||
|
||||
vector<PlayerInfo> m_vPlayerInfo; // filled by SGameplay derivatives in Init
|
||||
virtual void FillPlayerInfo( vector<PlayerInfo> &vPlayerInfoOut ) = 0;
|
||||
virtual PlayerInfo &GetPlayerInfoForInput( const InputEventPlus& iep ) { return m_vPlayerInfo[iep.MenuI.player]; }
|
||||
virtual PlayerInfo &GetPlayerInfoForInput( const InputEventPlus& iep ) { return m_vPlayerInfo[iep.pn]; }
|
||||
};
|
||||
|
||||
vector<PlayerInfo>::iterator GetNextEnabledPlayerInfo ( vector<PlayerInfo>::iterator iter, vector<PlayerInfo> &v );
|
||||
|
||||
@@ -63,10 +63,8 @@ void ScreenGameplaySyncMachine::Input( const InputEventPlus &input )
|
||||
|
||||
if( _input.GameI.controller != GAME_CONTROLLER_INVALID )
|
||||
_input.GameI.controller = GAME_CONTROLLER_1;
|
||||
if( _input.MenuI.player != PLAYER_INVALID )
|
||||
_input.MenuI.player = PLAYER_1;
|
||||
if( _input.MenuI.player != PLAYER_INVALID )
|
||||
_input.MenuI.player = PLAYER_1;
|
||||
if( _input.pn != PLAYER_INVALID )
|
||||
_input.pn = PLAYER_1;
|
||||
|
||||
ScreenGameplay::Input( _input );
|
||||
}
|
||||
|
||||
@@ -77,8 +77,8 @@ protected:
|
||||
virtual void MenuBack( PlayerNumber pn );
|
||||
virtual void MenuStart( const InputEventPlus &input );
|
||||
virtual void ProcessMenuStart( const InputEventPlus &input );
|
||||
virtual void MenuLeft( const InputEventPlus &input ) { ChangeValueInRowRelative(m_iCurrentRow[input.MenuI.player],input.MenuI.player,-1, input.type != IET_FIRST_PRESS); }
|
||||
virtual void MenuRight( const InputEventPlus &input ) { ChangeValueInRowRelative(m_iCurrentRow[input.MenuI.player], input.MenuI.player,+1, input.type != IET_FIRST_PRESS); }
|
||||
virtual void MenuLeft( const InputEventPlus &input ) { ChangeValueInRowRelative(m_iCurrentRow[input.pn],input.pn,-1, input.type != IET_FIRST_PRESS); }
|
||||
virtual void MenuRight( const InputEventPlus &input ) { ChangeValueInRowRelative(m_iCurrentRow[input.pn], input.pn,+1, input.type != IET_FIRST_PRESS); }
|
||||
virtual void MenuUp( const InputEventPlus &input );
|
||||
virtual void MenuDown( const InputEventPlus &input );
|
||||
virtual void MenuSelect( const InputEventPlus &input );
|
||||
|
||||
@@ -160,7 +160,7 @@ void ScreenSelect::Input( const InputEventPlus &input )
|
||||
}
|
||||
|
||||
// block input of disabled players
|
||||
if( !ALLOW_DISABLED_PLAYER_INPUT && !GAMESTATE->IsPlayerEnabled(input.MenuI.player) )
|
||||
if( !ALLOW_DISABLED_PLAYER_INPUT && !GAMESTATE->IsPlayerEnabled(input.pn) )
|
||||
return;
|
||||
|
||||
if( IsTransitioning() )
|
||||
@@ -172,7 +172,7 @@ void ScreenSelect::Input( const InputEventPlus &input )
|
||||
continue;
|
||||
|
||||
LOG->Trace("entered code for index %d", i);
|
||||
m_aCodeChoices[i].Apply( input.MenuI.player );
|
||||
m_aCodeChoices[i].Apply( input.pn );
|
||||
}
|
||||
Screen::Input( input ); // default input handler
|
||||
}
|
||||
|
||||
@@ -396,7 +396,7 @@ try_again:
|
||||
|
||||
void ScreenSelectMaster::MenuLeft( const InputEventPlus &input )
|
||||
{
|
||||
PlayerNumber pn = input.MenuI.player;
|
||||
PlayerNumber pn = input.pn;
|
||||
if( m_fLockInputSecs > 0 || m_bChosen[pn] )
|
||||
return;
|
||||
if( input.type == IET_RELEASE )
|
||||
@@ -419,7 +419,7 @@ void ScreenSelectMaster::MenuLeft( const InputEventPlus &input )
|
||||
|
||||
void ScreenSelectMaster::MenuRight( const InputEventPlus &input )
|
||||
{
|
||||
PlayerNumber pn = input.MenuI.player;
|
||||
PlayerNumber pn = input.pn;
|
||||
if( m_fLockInputSecs > 0 || m_bChosen[pn] )
|
||||
return;
|
||||
if( input.type == IET_RELEASE )
|
||||
@@ -442,7 +442,7 @@ void ScreenSelectMaster::MenuRight( const InputEventPlus &input )
|
||||
|
||||
void ScreenSelectMaster::MenuUp( const InputEventPlus &input )
|
||||
{
|
||||
PlayerNumber pn = input.MenuI.player;
|
||||
PlayerNumber pn = input.pn;
|
||||
if( m_fLockInputSecs > 0 || m_bChosen[pn] )
|
||||
return;
|
||||
if( input.type == IET_RELEASE )
|
||||
@@ -465,7 +465,7 @@ void ScreenSelectMaster::MenuUp( const InputEventPlus &input )
|
||||
|
||||
void ScreenSelectMaster::MenuDown( const InputEventPlus &input )
|
||||
{
|
||||
PlayerNumber pn = input.MenuI.player;
|
||||
PlayerNumber pn = input.pn;
|
||||
if( m_fLockInputSecs > 0 || m_bChosen[pn] )
|
||||
return;
|
||||
if( input.type == IET_RELEASE )
|
||||
|
||||
Reference in New Issue
Block a user