From aeb9c8919199357185a33fed4d49920ea0e5ee0f Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Wed, 13 Sep 2006 10:02:58 +0000 Subject: [PATCH] use input.pn --- stepmania/src/ScreenEvaluation.cpp | 3 +-- stepmania/src/ScreenEz2SelectMusic.cpp | 2 +- stepmania/src/ScreenPlayerOptions.cpp | 3 +-- stepmania/src/ScreenPrompt.cpp | 10 ++-------- 4 files changed, 5 insertions(+), 13 deletions(-) diff --git a/stepmania/src/ScreenEvaluation.cpp b/stepmania/src/ScreenEvaluation.cpp index b08ec724dc..e1e9890902 100644 --- a/stepmania/src/ScreenEvaluation.cpp +++ b/stepmania/src/ScreenEvaluation.cpp @@ -24,7 +24,6 @@ #include "RageDisplay.h" #include "StepMania.h" #include "CryptManager.h" -#include "Style.h" #include "MemoryCardManager.h" #include "PlayerState.h" #include "CommonMetrics.h" @@ -851,7 +850,7 @@ void ScreenEvaluation::Input( const InputEventPlus &input ) if( CodeDetector::EnteredCode(input.GameI.controller, CODE_SAVE_SCREENSHOT1) || CodeDetector::EnteredCode(input.GameI.controller, CODE_SAVE_SCREENSHOT2) ) { - PlayerNumber pn = GAMESTATE->GetCurrentStyle()->ControllerToPlayerNumber( input.GameI.controller ); + PlayerNumber pn = input.pn; if( !m_bSavedScreenshot[pn] && // only allow one screenshot PROFILEMAN->IsPersistentProfile(pn) ) { diff --git a/stepmania/src/ScreenEz2SelectMusic.cpp b/stepmania/src/ScreenEz2SelectMusic.cpp index b01a94ef01..71055a4b9f 100644 --- a/stepmania/src/ScreenEz2SelectMusic.cpp +++ b/stepmania/src/ScreenEz2SelectMusic.cpp @@ -254,7 +254,7 @@ void ScreenEz2SelectMusic::Input( const InputEventPlus &input ) if( m_bMadeChoice ) return; - PlayerNumber pn = GAMESTATE->GetCurrentStyle()->ControllerToPlayerNumber( input.GameI.controller ); + PlayerNumber pn = input.pn; if( CodeDetector::EnteredEasierDifficulty(input.GameI.controller) ) { diff --git a/stepmania/src/ScreenPlayerOptions.cpp b/stepmania/src/ScreenPlayerOptions.cpp index b58789628f..ffdd664c17 100644 --- a/stepmania/src/ScreenPlayerOptions.cpp +++ b/stepmania/src/ScreenPlayerOptions.cpp @@ -10,7 +10,6 @@ #include "PrefsManager.h" #include "CodeDetector.h" #include "ScreenDimensions.h" -#include "Style.h" #include "PlayerState.h" #include "Foreach.h" #include "InputEventPlus.h" @@ -95,7 +94,7 @@ void ScreenPlayerOptions::Input( const InputEventPlus &input ) } } - PlayerNumber pn = GAMESTATE->GetCurrentStyle()->ControllerToPlayerNumber( input.GameI.controller ); + PlayerNumber pn = input.pn; if( GAMESTATE->IsHumanPlayer(pn) && CodeDetector::EnteredCode(input.GameI.controller,CODE_CANCEL_ALL_PLAYER_OPTIONS) ) { // apply the game default mods, but not the Profile saved mods diff --git a/stepmania/src/ScreenPrompt.cpp b/stepmania/src/ScreenPrompt.cpp index 62468033fa..4d5d737d50 100644 --- a/stepmania/src/ScreenPrompt.cpp +++ b/stepmania/src/ScreenPrompt.cpp @@ -4,7 +4,6 @@ #include "GameSoundManager.h" #include "GameConstantsAndTypes.h" #include "GameState.h" -#include "Style.h" #include "ThemeManager.h" #include "ScreenDimensions.h" #include "ActorUtil.h" @@ -113,18 +112,13 @@ void ScreenPrompt::Input( const InputEventPlus &input ) if( input.DeviceI.device==DEVICE_KEYBOARD && input.type==IET_FIRST_PRESS ) { - PlayerNumber pn; - if( GAMESTATE->GetCurrentStyle() == NULL ) - pn = (PlayerNumber)input.GameI.controller; - else - pn = GAMESTATE->GetCurrentStyle()->ControllerToPlayerNumber( input.GameI.controller ); switch( input.DeviceI.button ) { case KEY_LEFT: - this->MenuLeft( pn ); + this->MenuLeft( input.pn ); return; case KEY_RIGHT: - this->MenuRight( pn ); + this->MenuRight( input.pn ); return; } }