kill alternative input
This commit is contained in:
@@ -3080,7 +3080,6 @@ Class="ScreenGameplayNormal"
|
||||
NextScreen=Branch.AfterGameplay()
|
||||
PrevScreen=Branch.BackOutOfStageInformation()
|
||||
#
|
||||
UseAlternativeInput=false
|
||||
ShowLifeMeterForDisabledPlayers=false
|
||||
StopCourseEarly=false
|
||||
ShowEvaluationOnFail=true
|
||||
|
||||
+6
-8
@@ -31,14 +31,12 @@ struct AutoMappingEntry
|
||||
int m_iSlotIndex;
|
||||
DeviceButton m_deviceButton;
|
||||
GameButton m_gb; // GameButton_Invalid means unmap this button
|
||||
/*
|
||||
* If this is true, this is an auxilliary mapping assigned to the second
|
||||
* player. If two of the same device are found, and the device has secondary
|
||||
* entries, the later entries take precedence. This way, if a Pump pad is
|
||||
* found, it'll map P1 to the primary pad and P2 to the secondary pad.
|
||||
* (We can't tell if a slave pad is actually there.) Then, if a second primary
|
||||
* is found (DEVICE_PUMP2), 2P will be mapped to it.
|
||||
*/
|
||||
/* If this is true, this is an auxilliary mapping assigned to the second
|
||||
* player. If two of the same device are found, and the device has secondary
|
||||
* entries, the later entries take precedence. This way, if a Pump pad is
|
||||
* found, it'll map P1 to the primary pad and P2 to the secondary pad. (We
|
||||
* can't tell if a slave pad is actually there.) Then, if a second primary
|
||||
* is found (DEVICE_PUMP2), 2P will be mapped to it. */
|
||||
bool m_bSecondController;
|
||||
};
|
||||
|
||||
|
||||
@@ -797,17 +797,6 @@ void Player::Update( float fDeltaTime )
|
||||
|
||||
bool bIsHoldingButton = INPUTMAPPER->IsBeingPressed( GameI );
|
||||
|
||||
if( m_vAlterMap.size() > 0 ) // alternate input is being used
|
||||
{
|
||||
for( unsigned int i=0; i < m_vAlterMap.size(); ++i )
|
||||
{
|
||||
if( m_vAlterMap[i].inpMain == GameI )
|
||||
{
|
||||
bIsHoldingButton = bIsHoldingButton || INPUTMAPPER->IsBeingPressed( m_vAlterMap[i].inpAlt );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: Make this work for non-human-controlled players
|
||||
if( bIsHoldingButton && !GAMESTATE->m_bDemonstrationOrJukebox && m_pPlayerState->m_PlayerController==PC_HUMAN )
|
||||
if( m_pNoteField )
|
||||
@@ -1094,17 +1083,6 @@ void Player::UpdateHoldNotes( int iSongRow, float fDeltaTime, vector<TrackRowTap
|
||||
// this previously read as bIsHoldingButton &=
|
||||
// was there a specific reason for this? - Friez
|
||||
bIsHoldingButton &= INPUTMAPPER->IsBeingPressed( GameI, m_pPlayerState->m_mp );
|
||||
|
||||
if( m_vAlterMap.size() > 0 ) // alternate input is being used
|
||||
{
|
||||
for( unsigned int i=0; i < m_vAlterMap.size(); ++i )
|
||||
{
|
||||
if( m_vAlterMap[i].inpMain == GameI )
|
||||
{
|
||||
bIsHoldingButton = bIsHoldingButton | INPUTMAPPER->IsBeingPressed( m_vAlterMap[i].inpAlt );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2747,39 +2725,11 @@ void Player::CrossedRows( int iLastRowCrossed, const RageTimer &now )
|
||||
float fSecsHeld = INPUTMAPPER->GetSecsHeld( GameI, m_pPlayerState->m_mp );
|
||||
if( fSecsHeld >= PREFSMAN->m_fPadStickSeconds )
|
||||
Step( iTrack, -1, now - PREFSMAN->m_fPadStickSeconds, true, false );
|
||||
|
||||
if( m_vAlterMap.size() > 0 ) // alternate input is being used
|
||||
{
|
||||
for( unsigned int i=0; i < m_vAlterMap.size(); ++i )
|
||||
{
|
||||
if( m_vAlterMap[i].inpMain == GameI )
|
||||
{
|
||||
GameInput GameIB = m_vAlterMap[i].inpAlt;
|
||||
float fSecsHeld = INPUTMAPPER->GetSecsHeld( GameIB, m_pPlayerState->m_mp );
|
||||
if( fSecsHeld >= PREFSMAN->m_fPadStickSeconds )
|
||||
Step( iTrack, -1, now - PREFSMAN->m_fPadStickSeconds, true, false );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else if( INPUTMAPPER->IsBeingPressed(GameI, m_pPlayerState->m_mp) )
|
||||
{
|
||||
Step( iTrack, -1, now, true, false );
|
||||
}
|
||||
else if( m_vAlterMap.size() > 0 ) // alternate input being used
|
||||
{
|
||||
for( unsigned int i=0; i < m_vAlterMap.size(); ++i )
|
||||
{
|
||||
if( m_vAlterMap[i].inpMain == GameI )
|
||||
{
|
||||
GameInput GameIB = m_vAlterMap[i].inpAlt;
|
||||
if( INPUTMAPPER->IsBeingPressed(GameIB, m_pPlayerState->m_mp) )
|
||||
{
|
||||
Step( iTrack, -1, now, true, false );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
case TapNote::mine:
|
||||
|
||||
@@ -104,8 +104,6 @@ public:
|
||||
|
||||
void SetSendJudgmentAndComboMessages( bool b ) { m_bSendJudgmentAndComboMessages = b; }
|
||||
|
||||
vector<AlternateMapping> m_vAlterMap;
|
||||
|
||||
// Lua
|
||||
virtual void PushSelf( lua_State *L );
|
||||
|
||||
|
||||
@@ -352,7 +352,6 @@ void ScreenGameplay::Init()
|
||||
GIVING_UP_GOES_TO_PREV_SCREEN.Load( m_sName, "GivingUpGoesToPrevScreen" );
|
||||
FAIL_ON_MISS_COMBO.Load( m_sName, "FailOnMissCombo" );
|
||||
ALLOW_CENTER_1_PLAYER.Load( m_sName, "AllowCenter1Player" );
|
||||
USE_ALTERNATIVE_INPUT.Load( m_sName, "UseAlternativeInput");
|
||||
// configurable:
|
||||
UNPAUSE_WITH_START.Load( m_sName, "UnpauseWithStart");
|
||||
|
||||
@@ -763,38 +762,6 @@ void ScreenGameplay::Init()
|
||||
LoadNextSong();
|
||||
|
||||
m_GiveUpTimer.SetZero();
|
||||
|
||||
if( USE_ALTERNATIVE_INPUT ) // using alternative input
|
||||
{
|
||||
int iNumCols = GAMESTATE->GetCurrentStyle()->m_iColsPerPlayer;
|
||||
FOREACH_EnabledPlayerInfo( m_vPlayerInfo, pi )
|
||||
{
|
||||
for( int col=0; col < iNumCols; ++col )
|
||||
{
|
||||
// TODO: Remove use of PlayerNumber.
|
||||
GameInput GameI = GAMESTATE->GetCurrentStyle()->StyleInputToGameInput( col, pi->m_pn );
|
||||
|
||||
ThemeMetric<RString> tmpMetric;
|
||||
tmpMetric.Load( m_sName,ssprintf( "AltInp%s%s",GAMESTATE->GetCurrentStyle()->m_szName,GameI.ToString( INPUTMAPPER->GetInputScheme() ).c_str() ) );
|
||||
|
||||
if(tmpMetric.GetValue() != "")
|
||||
{
|
||||
GameInput GameIAlt;
|
||||
GameIAlt.FromString( INPUTMAPPER->GetInputScheme(),tmpMetric.GetValue() );
|
||||
|
||||
AlternateMapping tmpMap;
|
||||
tmpMap.inpMain = GameI;
|
||||
tmpMap.inpAlt = GameIAlt;
|
||||
m_vAlterMap.push_back( tmpMap );
|
||||
|
||||
FOREACH( PlayerInfo, m_vPlayerInfo, pi )
|
||||
{
|
||||
pi->m_pPlayer->m_vAlterMap.push_back( tmpMap );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool ScreenGameplay::Center1Player() const
|
||||
@@ -2260,17 +2227,6 @@ void ScreenGameplay::Input( const InputEventPlus &input )
|
||||
|
||||
int iCol = GAMESTATE->GetCurrentStyle()->GameInputToColumn( input.GameI );
|
||||
|
||||
if( USE_ALTERNATIVE_INPUT ) // using alternative input
|
||||
{
|
||||
for( unsigned int i=0; i < m_vAlterMap.size(); ++i )
|
||||
{
|
||||
if( m_vAlterMap[i].inpAlt == input.GameI )
|
||||
{
|
||||
iCol = GAMESTATE->GetCurrentStyle()->GameInputToColumn( m_vAlterMap[i].inpMain );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Don't pass on any inputs to Player that aren't a press or a release.
|
||||
switch( input.type )
|
||||
{
|
||||
|
||||
@@ -189,11 +189,8 @@ protected:
|
||||
ThemeMetric<bool> GIVING_UP_GOES_TO_PREV_SCREEN;
|
||||
ThemeMetric<int> FAIL_ON_MISS_COMBO;
|
||||
ThemeMetric<bool> ALLOW_CENTER_1_PLAYER;
|
||||
ThemeMetric<bool> USE_ALTERNATIVE_INPUT;
|
||||
ThemeMetric<bool> UNPAUSE_WITH_START;
|
||||
|
||||
vector<AlternateMapping> m_vAlterMap;
|
||||
|
||||
bool IsLastSong();
|
||||
void SetupSong( int iSongIndex );
|
||||
void ReloadCurrentSong();
|
||||
|
||||
Reference in New Issue
Block a user