From 90b1b20c89424cf1dbb1eb7384371d9f143bfcdb Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Fri, 12 Jan 2007 06:28:57 +0000 Subject: [PATCH] gameplay fixup --- stepmania/src/Style.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/stepmania/src/Style.cpp b/stepmania/src/Style.cpp index c8b9cea697..6862ff3ba8 100644 --- a/stepmania/src/Style.cpp +++ b/stepmania/src/Style.cpp @@ -58,14 +58,17 @@ GameInput Style::StyleInputToGameInput( int iCol, PlayerNumber pn ) const int Style::GameInputToColumn( const GameInput &GameI ) const { - if( m_iInputColumn[GameI.controller][GameI.button] == NO_MAPPING ) + if( GameI.button < GAME_BUTTON_NEXT ) + return Column_Invalid; + int iColumnIndex = GameI.button - GAME_BUTTON_NEXT; + if( m_iInputColumn[GameI.controller][iColumnIndex] == NO_MAPPING ) return Column_Invalid; - for( int i = 0; i <= GameI.button; ++i ) + for( int i = 0; i <= iColumnIndex; ++i ) if( m_iInputColumn[GameI.controller][i] == END_MAPPING ) return Column_Invalid; - return m_iInputColumn[GameI.controller][GameI.button]; + return m_iInputColumn[GameI.controller][iColumnIndex]; }