From 7bab74efab4cc4b6d0156cf2575b1e950a71fe2c Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Tue, 12 Sep 2006 23:29:08 +0000 Subject: [PATCH] As far as I can tell, StyleI.player is always the same as MenuI.player if the style is set. Phase it out. --- stepmania/src/ScreenEdit.cpp | 4 ++-- stepmania/src/ScreenGameplay.cpp | 2 +- stepmania/src/ScreenGameplay.h | 2 +- stepmania/src/ScreenGameplaySyncMachine.cpp | 4 ++-- stepmania/src/ScreenNameEntry.cpp | 10 +++++----- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/stepmania/src/ScreenEdit.cpp b/stepmania/src/ScreenEdit.cpp index c7f24daec0..1ee802da6e 100644 --- a/stepmania/src/ScreenEdit.cpp +++ b/stepmania/src/ScreenEdit.cpp @@ -1920,7 +1920,7 @@ void ScreenEdit::InputRecord( const InputEventPlus &input, EditButton EditB ) return; } - if( input.StyleI.player != PLAYER_1 ) + if( input.MenuI.player != PLAYER_1 ) return; // ignore const int iCol = input.StyleI.col; @@ -2082,7 +2082,7 @@ void ScreenEdit::InputPlay( const InputEventPlus &input, EditButton EditB ) if( PREFSMAN->m_AutoPlay != PC_HUMAN ) return; - switch( input.StyleI.player ) + switch( input.MenuI.player ) { case PLAYER_1: m_Player->Step( input.StyleI.col, -1, input.DeviceI.ts, false, input.type == IET_RELEASE ); diff --git a/stepmania/src/ScreenGameplay.cpp b/stepmania/src/ScreenGameplay.cpp index 369cfb2c98..387e8b3877 100644 --- a/stepmania/src/ScreenGameplay.cpp +++ b/stepmania/src/ScreenGameplay.cpp @@ -2162,7 +2162,7 @@ void ScreenGameplay::Input( const InputEventPlus &input ) // if( input.type==IET_FIRST_PRESS && input.StyleI.IsValid() && - GAMESTATE->IsHumanPlayer( input.StyleI.player ) ) + GAMESTATE->IsHumanPlayer( input.MenuI.player ) ) { AbortGiveUp( true ); diff --git a/stepmania/src/ScreenGameplay.h b/stepmania/src/ScreenGameplay.h index e21ab8a96e..54a9e32b76 100644 --- a/stepmania/src/ScreenGameplay.h +++ b/stepmania/src/ScreenGameplay.h @@ -223,7 +223,7 @@ protected: vector m_vPlayerInfo; // filled by SGameplay derivatives in Init virtual void FillPlayerInfo( vector &vPlayerInfoOut ) = 0; - virtual PlayerInfo &GetPlayerInfoForInput( const InputEventPlus& iep ) { return m_vPlayerInfo[iep.StyleI.player]; } + virtual PlayerInfo &GetPlayerInfoForInput( const InputEventPlus& iep ) { return m_vPlayerInfo[iep.MenuI.player]; } }; vector::iterator GetNextEnabledPlayerInfo ( vector::iterator iter, vector &v ); diff --git a/stepmania/src/ScreenGameplaySyncMachine.cpp b/stepmania/src/ScreenGameplaySyncMachine.cpp index 199258188c..597fbc6e9e 100644 --- a/stepmania/src/ScreenGameplaySyncMachine.cpp +++ b/stepmania/src/ScreenGameplaySyncMachine.cpp @@ -65,8 +65,8 @@ void ScreenGameplaySyncMachine::Input( const InputEventPlus &input ) _input.GameI.controller = GAME_CONTROLLER_1; if( _input.MenuI.player != PLAYER_INVALID ) _input.MenuI.player = PLAYER_1; - if( _input.StyleI.player != PLAYER_INVALID ) - _input.StyleI.player = PLAYER_1; + if( _input.MenuI.player != PLAYER_INVALID ) + _input.MenuI.player = PLAYER_1; ScreenGameplay::Input( _input ); } diff --git a/stepmania/src/ScreenNameEntry.cpp b/stepmania/src/ScreenNameEntry.cpp index c385a845f1..89c7541987 100644 --- a/stepmania/src/ScreenNameEntry.cpp +++ b/stepmania/src/ScreenNameEntry.cpp @@ -346,16 +346,16 @@ void ScreenNameEntry::Input( const InputEventPlus &input ) if( input.type != IET_FIRST_PRESS ) return; // ignore - if( input.StyleI.IsValid() && m_bStillEnteringName[input.StyleI.player]) + if( input.StyleI.IsValid() && m_bStillEnteringName[input.MenuI.player]) { - int iStringIndex = m_ColToStringIndex[input.StyleI.player][input.StyleI.col]; + int iStringIndex = m_ColToStringIndex[input.MenuI.player][input.StyleI.col]; if( iStringIndex != -1 ) { - m_ReceptorArrowRow[input.StyleI.player].Step( input.StyleI.col, TNS_W1 ); + m_ReceptorArrowRow[input.MenuI.player].Step( input.StyleI.col, TNS_W1 ); m_soundStep.Play(); char c = NAME_CHARS[GetClosestCharIndex(m_fFakeBeat)]; - m_textSelectedChars[input.StyleI.player][input.StyleI.col].SetText( ssprintf("%c",c) ); - m_sSelectedName[input.StyleI.player][iStringIndex] = c; + m_textSelectedChars[input.MenuI.player][input.StyleI.col].SetText( ssprintf("%c",c) ); + m_sSelectedName[input.MenuI.player][iStringIndex] = c; } }