From dd2f259a2fdb73d8ef64267707b98345459075c4 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Thu, 14 Sep 2006 20:45:51 +0000 Subject: [PATCH] MenuInput -> MenuButton --- stepmania/src/Game.cpp | 4 ++-- stepmania/src/Game.h | 2 +- stepmania/src/InputMapper.cpp | 8 ++++---- stepmania/src/InputMapper.h | 8 ++++---- stepmania/src/ScreenEdit.cpp | 6 +++--- 5 files changed, 14 insertions(+), 14 deletions(-) diff --git a/stepmania/src/Game.cpp b/stepmania/src/Game.cpp index 71594a4653..ec2ec45b81 100644 --- a/stepmania/src/Game.cpp +++ b/stepmania/src/Game.cpp @@ -38,7 +38,7 @@ MenuButton Game::GameInputToMenuButton( GameInput GameI ) const return MenuButton_INVALID; // invalid GameInput } -void Game::MenuInputToGameInput( MenuInput MenuI, PlayerNumber pn, GameInput GameIout[4] ) const +void Game::MenuInputToGameInput( MenuButton MenuI, PlayerNumber pn, GameInput GameIout[4] ) const { ASSERT( MenuI != MenuButton_INVALID ); @@ -70,7 +70,7 @@ void Game::MenuInputToGameInput( MenuInput MenuI, PlayerNumber pn, GameInput Gam ASSERT(0); // invalid m_StyleType }; - GameButton button[2] = { m_DedicatedMenuButton[MenuI.button], m_SecondaryMenuButton[MenuI.button] }; + GameButton button[2] = { m_DedicatedMenuButton[MenuI], m_SecondaryMenuButton[MenuI] }; int iNumButtonsUsing = PREFSMAN->m_bOnlyDedicatedMenuButtons ? 1 : 2; for( int i=0; iGameInputToMenuButton( GameI ); } -void InputMapper::MenuToGame( const MenuInput &MenuI, PlayerNumber pn, GameInput GameIout[4] ) +void InputMapper::MenuToGame( MenuButton MenuI, PlayerNumber pn, GameInput GameIout[4] ) { const Game* pGame = GAMESTATE->GetCurrentGame(); pGame->MenuInputToGameInput( MenuI, pn, GameIout ); @@ -800,7 +800,7 @@ bool InputMapper::IsBeingPressed( const GameInput &GameI, MultiPlayer mp, const return false; } -bool InputMapper::IsBeingPressed( const MenuInput &MenuI, PlayerNumber pn ) +bool InputMapper::IsBeingPressed( MenuButton MenuI, PlayerNumber pn ) { GameInput GameI[4]; MenuToGame( MenuI, pn, GameI ); @@ -849,7 +849,7 @@ float InputMapper::GetSecsHeld( const GameInput &GameI, MultiPlayer mp ) return fMaxSecsHeld; } -float InputMapper::GetSecsHeld( const MenuInput &MenuI, PlayerNumber pn ) +float InputMapper::GetSecsHeld( MenuButton MenuI, PlayerNumber pn ) { float fMaxSecsHeld = 0; @@ -872,7 +872,7 @@ void InputMapper::ResetKeyRepeat( const GameInput &GameI ) } } -void InputMapper::ResetKeyRepeat( const MenuInput &MenuI, PlayerNumber pn ) +void InputMapper::ResetKeyRepeat( MenuButton MenuI, PlayerNumber pn ) { GameInput GameI[4]; MenuToGame( MenuI, pn, GameI ); diff --git a/stepmania/src/InputMapper.h b/stepmania/src/InputMapper.h index 479d96966b..7357d83407 100644 --- a/stepmania/src/InputMapper.h +++ b/stepmania/src/InputMapper.h @@ -37,17 +37,17 @@ public: bool GameToDevice( const GameInput &GameI, int iSlotNum, DeviceInput& DeviceI ); // return true if there is a mapping from pad to device MenuButton GameToMenu( const GameInput &GameI ); - void MenuToGame( const MenuInput &MenuI, PlayerNumber pn, GameInput GameIout[4] ); + void MenuToGame( MenuButton MenuI, PlayerNumber pn, GameInput GameIout[4] ); PlayerNumber ControllerToPlayerNumber( GameController controller ); float GetSecsHeld( const GameInput &GameI, MultiPlayer mp = MultiPlayer_INVALID ); - float GetSecsHeld( const MenuInput &MenuI, PlayerNumber pn ); + float GetSecsHeld( MenuButton MenuI, PlayerNumber pn ); bool IsBeingPressed( const GameInput &GameI, MultiPlayer mp = MultiPlayer_INVALID, const DeviceInputList *pButtonState = NULL ); - bool IsBeingPressed( const MenuInput &MenuI, PlayerNumber pn ); + bool IsBeingPressed( MenuButton MenuI, PlayerNumber pn ); void ResetKeyRepeat( const GameInput &GameI ); - void ResetKeyRepeat( const MenuInput &MenuI, PlayerNumber pn ); + void ResetKeyRepeat( MenuButton MenuI, PlayerNumber pn ); void RepeatStopKey( const GameInput &GameI ); void RepeatStopKey( MenuButton MenuI, PlayerNumber pn ); diff --git a/stepmania/src/ScreenEdit.cpp b/stepmania/src/ScreenEdit.cpp index 68467e146a..fa6e653696 100644 --- a/stepmania/src/ScreenEdit.cpp +++ b/stepmania/src/ScreenEdit.cpp @@ -354,7 +354,7 @@ bool ScreenEdit::DeviceToEdit( const DeviceInput &DeviceI, EditButton &button ) } /* Given a DeviceInput that was just depressed, return an active edit function. */ -bool ScreenEdit::MenuInputToEditButton( const MenuInput &MenuI, EditButton &button ) const +bool ScreenEdit::MenuInputToEditButton( MenuButton MenuI, EditButton &button ) const { const MapEditButtonToMenuButton *pCurrentMap = GetCurrentMenuButtonMap(); @@ -362,7 +362,7 @@ bool ScreenEdit::MenuInputToEditButton( const MenuInput &MenuI, EditButton &butt { for( int slot = 0; slot < NUM_EDIT_TO_MENU_SLOTS; ++slot ) { - if( pCurrentMap->button[e][slot] == MenuI.button ) + if( pCurrentMap->button[e][slot] == MenuI ) { /* The button maps to this function. */ button = e; @@ -1086,7 +1086,7 @@ void ScreenEdit::Input( const InputEventPlus &input ) EditButton EditB; if( !DeviceToEdit( input.DeviceI, EditB ) ) - MenuInputToEditButton( input.MenuI, EditB ); + MenuInputToEditButton( input.MenuI.button, EditB ); if( EditB == EDIT_BUTTON_REMOVE_NOTE )