use input.pn

This commit is contained in:
Glenn Maynard
2006-09-13 10:02:58 +00:00
parent 4f83f9b9ae
commit aeb9c89191
4 changed files with 5 additions and 13 deletions
+1 -2
View File
@@ -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) )
{
+1 -1
View File
@@ -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) )
{
+1 -2
View File
@@ -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
+2 -8
View File
@@ -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;
}
}