From 1a90d3c57ea27b5cfa7ed06c188793f89320788f Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Wed, 13 Sep 2006 02:08:54 +0000 Subject: [PATCH] unused --- stepmania/src/Game.cpp | 2 -- stepmania/src/InputQueue.cpp | 30 ------------------------------ 2 files changed, 32 deletions(-) diff --git a/stepmania/src/Game.cpp b/stepmania/src/Game.cpp index c460d3d450..929838f7d7 100644 --- a/stepmania/src/Game.cpp +++ b/stepmania/src/Game.cpp @@ -3,9 +3,7 @@ #include "RageLog.h" #include "RageUtil.h" #include "Style.h" -#include "RageException.h" #include "GameState.h" -#include "InputMapper.h" #include "PrefsManager.h" int Game::GetNumGameplayButtons() const diff --git a/stepmania/src/InputQueue.cpp b/stepmania/src/InputQueue.cpp index e784da3e93..378aa3acc6 100644 --- a/stepmania/src/InputQueue.cpp +++ b/stepmania/src/InputQueue.cpp @@ -22,36 +22,6 @@ void InputQueue::RememberInput( const InputEventPlus &iep ) m_aQueue[c].push_back( iep ); } -bool InputQueue::MatchesSequence( GameController c, const MenuButton* button_sequence, const int iNumButtons, float fMaxSecondsBack ) -{ - if( c == GAME_CONTROLLER_INVALID ) - return false; - - if( fMaxSecondsBack == -1 ) - fMaxSecondsBack = 0.4f + iNumButtons*0.15f; - - RageTimer OldestTimeAllowed; - OldestTimeAllowed += -fMaxSecondsBack; - - int sequence_index = iNumButtons-1; // count down - for( int queue_index=m_aQueue[c].size()-1; queue_index>=0; queue_index-- ) // iterate newest to oldest - { - const InputEventPlus &iep = m_aQueue[c][queue_index]; - if( iep.MenuI.button != button_sequence[sequence_index] || - iep.DeviceI.ts < OldestTimeAllowed ) - { - return false; - } - if( sequence_index == 0 ) // we matched the whole pattern - { - m_aQueue[c].clear(); // empty the queue so we don't match on it again - return true; - } - sequence_index--; - } - return false; -} - bool InputQueue::MatchesSequence( GameController c, const GameButton* button_sequence, const int iNumButtons, float fMaxSecondsBack ) { if( c == GAME_CONTROLLER_INVALID )