diff --git a/Themes/_fallback/metrics.ini b/Themes/_fallback/metrics.ini index b374e7382d..1cc853a60a 100644 --- a/Themes/_fallback/metrics.ini +++ b/Themes/_fallback/metrics.ini @@ -3080,7 +3080,6 @@ Class="ScreenGameplayNormal" NextScreen=Branch.AfterGameplay() PrevScreen=Branch.BackOutOfStageInformation() # -UseAlternativeInput=false ShowLifeMeterForDisabledPlayers=false StopCourseEarly=false ShowEvaluationOnFail=true diff --git a/src/InputMapper.h b/src/InputMapper.h index f823f6549a..25f86c996c 100644 --- a/src/InputMapper.h +++ b/src/InputMapper.h @@ -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; }; @@ -174,7 +172,7 @@ public: bool CheckForChangedInputDevicesAndRemap( RString &sMessageOut ); bool IsMapped( const DeviceInput &DeviceI ) const; - + bool DeviceToGame( const DeviceInput &DeviceI, GameInput& GameI ) const; // return true if there is a mapping from device to pad bool GameToDevice( const GameInput &GameI, int iSlotNum, DeviceInput& DeviceI ) const; // return true if there is a mapping from pad to device diff --git a/src/Player.cpp b/src/Player.cpp index b1fe98c48d..66bdc60d44 100644 --- a/src/Player.cpp +++ b/src/Player.cpp @@ -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, vectorIsBeingPressed( 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: diff --git a/src/Player.h b/src/Player.h index 4afd0c76e9..2036b46d1e 100644 --- a/src/Player.h +++ b/src/Player.h @@ -104,8 +104,6 @@ public: void SetSendJudgmentAndComboMessages( bool b ) { m_bSendJudgmentAndComboMessages = b; } - vector m_vAlterMap; - // Lua virtual void PushSelf( lua_State *L ); diff --git a/src/ScreenGameplay.cpp b/src/ScreenGameplay.cpp index 8ff1bc1896..251c73aa1d 100644 --- a/src/ScreenGameplay.cpp +++ b/src/ScreenGameplay.cpp @@ -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 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 @@ -2253,23 +2220,12 @@ void ScreenGameplay::Input( const InputEventPlus &input ) return; } } - + bool bRelease = input.type == IET_RELEASE; if( !input.GameI.IsValid() ) return; - + 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 ) diff --git a/src/ScreenGameplay.h b/src/ScreenGameplay.h index 5e428f18fb..f73c0236ae 100644 --- a/src/ScreenGameplay.h +++ b/src/ScreenGameplay.h @@ -189,11 +189,8 @@ protected: ThemeMetric GIVING_UP_GOES_TO_PREV_SCREEN; ThemeMetric FAIL_ON_MISS_COMBO; ThemeMetric ALLOW_CENTER_1_PLAYER; - ThemeMetric USE_ALTERNATIVE_INPUT; ThemeMetric UNPAUSE_WITH_START; - vector m_vAlterMap; - bool IsLastSong(); void SetupSong( int iSongIndex ); void ReloadCurrentSong();