remove InputMapper::IsBeingPressed(StyleI)

This commit is contained in:
Glenn Maynard
2006-09-13 01:45:10 +00:00
parent 9f54f1b248
commit d6ad18f73e
4 changed files with 11 additions and 12 deletions
-8
View File
@@ -820,14 +820,6 @@ bool InputMapper::IsBeingPressed( const MenuInput &MenuI )
return false; return false;
} }
bool InputMapper::IsBeingPressed( const StyleInput &StyleI, PlayerNumber pn, MultiPlayer mp )
{
GameInput GameI;
StyleToGame( StyleI, pn, GameI );
return IsBeingPressed( GameI, mp );
}
float InputMapper::GetSecsHeld( const GameInput &GameI, MultiPlayer mp ) float InputMapper::GetSecsHeld( const GameInput &GameI, MultiPlayer mp )
{ {
float fMaxSecsHeld = 0; float fMaxSecsHeld = 0;
-1
View File
@@ -48,7 +48,6 @@ public:
bool IsBeingPressed( const GameInput &GameI, MultiPlayer mp = MultiPlayer_INVALID, const DeviceInputList *pButtonState = NULL ); bool IsBeingPressed( const GameInput &GameI, MultiPlayer mp = MultiPlayer_INVALID, const DeviceInputList *pButtonState = NULL );
bool IsBeingPressed( const MenuInput &MenuI ); bool IsBeingPressed( const MenuInput &MenuI );
bool IsBeingPressed( const StyleInput &StyleI, PlayerNumber pn, MultiPlayer mp = MultiPlayer_INVALID );
void ResetKeyRepeat( const GameInput &GameI ); void ResetKeyRepeat( const GameInput &GameI );
void ResetKeyRepeat( const MenuInput &MenuI ); void ResetKeyRepeat( const MenuInput &MenuI );
+8 -2
View File
@@ -542,6 +542,8 @@ void Player::Update( float fDeltaTime )
// TODO: Remove use of PlayerNumber. // TODO: Remove use of PlayerNumber.
PlayerNumber pn = m_pPlayerState->m_PlayerNumber; PlayerNumber pn = m_pPlayerState->m_PlayerNumber;
GameInput GameI;
INPUTMAPPER->StyleToGame( col, m_pPlayerState->m_PlayerNumber, GameI );
bool bIsHoldingButton = INPUTMAPPER->IsBeingPressed( col, pn ); bool bIsHoldingButton = INPUTMAPPER->IsBeingPressed( col, pn );
// TODO: Make this work for non-human-controlled players // TODO: Make this work for non-human-controlled players
@@ -620,7 +622,9 @@ void Player::Update( float fDeltaTime )
} }
else else
{ {
bIsHoldingButton = INPUTMAPPER->IsBeingPressed( iTrack, pn, m_pPlayerState->m_mp ); GameInput GameI;
INPUTMAPPER->StyleToGame( iTrack, pn, GameI );
bIsHoldingButton = INPUTMAPPER->IsBeingPressed( GameI, m_pPlayerState->m_mp );
} }
int iEndRow = iRow + tn.iDuration; int iEndRow = iRow + tn.iDuration;
@@ -1497,7 +1501,9 @@ void Player::CrossedMineRow( int iNoteRow, const RageTimer &now )
} }
else else
{ {
bool bIsDown = INPUTMAPPER->IsBeingPressed( t, pn, m_pPlayerState->m_mp ); GameInput GameI;
INPUTMAPPER->StyleToGame( t, pn, GameI );
bool bIsDown = INPUTMAPPER->IsBeingPressed( GameI, m_pPlayerState->m_mp );
if( bIsDown ) if( bIsDown )
Step( t, iNoteRow, now, true, false ); Step( t, iNoteRow, now, true, false );
} }
+3 -1
View File
@@ -935,7 +935,9 @@ void ScreenEdit::Update( float fDeltaTime )
bool bButtonIsBeingPressed = false; bool bButtonIsBeingPressed = false;
for( int t=0; t<GAMESTATE->GetCurrentStyle()->m_iColsPerPlayer; t++ ) // for each track for( int t=0; t<GAMESTATE->GetCurrentStyle()->m_iColsPerPlayer; t++ ) // for each track
{ {
if( INPUTMAPPER->IsBeingPressed(t, PLAYER_1) ) GameInput GameI;
INPUTMAPPER->StyleToGame( t, PLAYER_1, GameI );
if( INPUTMAPPER->IsBeingPressed(GameI) )
bButtonIsBeingPressed = true; bButtonIsBeingPressed = true;
} }