remove InputMapper::StyleToGame(StyleI)
This commit is contained in:
@@ -541,10 +541,9 @@ void Player::Update( float fDeltaTime )
|
|||||||
ASSERT( m_pPlayerState );
|
ASSERT( m_pPlayerState );
|
||||||
|
|
||||||
// TODO: Remove use of PlayerNumber.
|
// TODO: Remove use of PlayerNumber.
|
||||||
GameInput GameI;
|
GameInput GameI = GAMESTATE->m_pCurStyle->StyleInputToGameInput( col, m_pPlayerState->m_PlayerNumber );
|
||||||
INPUTMAPPER->StyleToGame( col, m_pPlayerState->m_PlayerNumber, GameI );
|
|
||||||
|
|
||||||
bool bIsHoldingButton = INPUTMAPPER->IsBeingPressed( col, pn );
|
bool bIsHoldingButton = INPUTMAPPER->IsBeingPressed( GameI );
|
||||||
// TODO: Make this work for non-human-controlled players
|
// TODO: Make this work for non-human-controlled players
|
||||||
if( bIsHoldingButton && !GAMESTATE->m_bDemonstrationOrJukebox && m_pPlayerState->m_PlayerController==PC_HUMAN )
|
if( bIsHoldingButton && !GAMESTATE->m_bDemonstrationOrJukebox && m_pPlayerState->m_PlayerController==PC_HUMAN )
|
||||||
if( m_pNoteField )
|
if( m_pNoteField )
|
||||||
@@ -621,8 +620,7 @@ void Player::Update( float fDeltaTime )
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
GameInput GameI;
|
GameInput GameI = GAMESTATE->m_pCurStyle->StyleInputToGameInput( iTrack, pn );
|
||||||
INPUTMAPPER->StyleToGame( iTrack, pn, GameI );
|
|
||||||
bIsHoldingButton = INPUTMAPPER->IsBeingPressed( GameI, m_pPlayerState->m_mp );
|
bIsHoldingButton = INPUTMAPPER->IsBeingPressed( GameI, m_pPlayerState->m_mp );
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1009,8 +1007,7 @@ void Player::Step( int col, int row, const RageTimer &tm, bool bHeld, bool bRele
|
|||||||
int iNumTracksHeld = 0;
|
int iNumTracksHeld = 0;
|
||||||
for( int t=0; t<m_NoteData.GetNumTracks(); t++ )
|
for( int t=0; t<m_NoteData.GetNumTracks(); t++ )
|
||||||
{
|
{
|
||||||
GameInput GameI;
|
GameInput GameI = GAMESTATE->m_pCurStyle->StyleInputToGameInput( t, pn );
|
||||||
INPUTMAPPER->StyleToGame( t, pn, GameI );
|
|
||||||
const float fSecsHeld = INPUTMAPPER->GetSecsHeld( GameI );
|
const float fSecsHeld = INPUTMAPPER->GetSecsHeld( GameI );
|
||||||
if( fSecsHeld > 0 && fSecsHeld < JUMP_WINDOW_SECONDS )
|
if( fSecsHeld > 0 && fSecsHeld < JUMP_WINDOW_SECONDS )
|
||||||
iNumTracksHeld++;
|
iNumTracksHeld++;
|
||||||
@@ -1490,18 +1487,14 @@ void Player::CrossedMineRow( int iNoteRow, const RageTimer &now )
|
|||||||
// TODO: Remove use of PlayerNumber.
|
// TODO: Remove use of PlayerNumber.
|
||||||
PlayerNumber pn = m_pPlayerState->m_PlayerNumber;
|
PlayerNumber pn = m_pPlayerState->m_PlayerNumber;
|
||||||
|
|
||||||
|
GameInput GameI = GAMESTATE->m_pCurStyle->StyleInputToGameInput( t, pn );
|
||||||
if( PREFSMAN->m_fPadStickSeconds > 0 )
|
if( PREFSMAN->m_fPadStickSeconds > 0 )
|
||||||
{
|
{
|
||||||
GameInput GameI;
|
|
||||||
INPUTMAPPER->StyleToGame( t, pn, GameI );
|
|
||||||
float fSecsHeld = INPUTMAPPER->GetSecsHeld( GameI, m_pPlayerState->m_mp );
|
|
||||||
if( fSecsHeld >= PREFSMAN->m_fPadStickSeconds )
|
if( fSecsHeld >= PREFSMAN->m_fPadStickSeconds )
|
||||||
Step( t, -1, now+(-PREFSMAN->m_fPadStickSeconds), true, false );
|
Step( t, -1, now+(-PREFSMAN->m_fPadStickSeconds), true, false );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
GameInput GameI;
|
|
||||||
INPUTMAPPER->StyleToGame( t, pn, GameI );
|
|
||||||
bool bIsDown = INPUTMAPPER->IsBeingPressed( GameI, m_pPlayerState->m_mp );
|
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 );
|
||||||
|
|||||||
@@ -886,8 +886,7 @@ void ScreenEdit::Update( float fDeltaTime )
|
|||||||
{
|
{
|
||||||
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
|
||||||
{
|
{
|
||||||
GameInput GameI;
|
GameInput GameI = GAMESTATE->m_pCurStyle->StyleInputToGameInput( t, PLAYER_1 );
|
||||||
INPUTMAPPER->StyleToGame( t, PLAYER_1, GameI );
|
|
||||||
float fSecsHeld = INPUTMAPPER->GetSecsHeld( GameI );
|
float fSecsHeld = INPUTMAPPER->GetSecsHeld( GameI );
|
||||||
fSecsHeld = min( fSecsHeld, m_RemoveNoteButtonLastChanged.Ago() );
|
fSecsHeld = min( fSecsHeld, m_RemoveNoteButtonLastChanged.Ago() );
|
||||||
if( fSecsHeld == 0 )
|
if( fSecsHeld == 0 )
|
||||||
@@ -935,8 +934,7 @@ 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
|
||||||
{
|
{
|
||||||
GameInput GameI;
|
GameInput GameI = GAMESTATE->m_pCurStyle->StyleInputToGameInput( t, PLAYER_1 );
|
||||||
INPUTMAPPER->StyleToGame( t, PLAYER_1, GameI );
|
|
||||||
if( INPUTMAPPER->IsBeingPressed(GameI) )
|
if( INPUTMAPPER->IsBeingPressed(GameI) )
|
||||||
bButtonIsBeingPressed = true;
|
bButtonIsBeingPressed = true;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user