From 527cd01034b88c1ed239decc1a4a5ad86e858631 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Wed, 27 Sep 2006 04:35:27 +0000 Subject: [PATCH] NUM_KeyboardRow --- stepmania/src/ScreenTextEntry.cpp | 6 +++--- stepmania/src/ScreenTextEntry.h | 7 ++++--- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/stepmania/src/ScreenTextEntry.cpp b/stepmania/src/ScreenTextEntry.cpp index 891d08cc5c..731cc0d572 100644 --- a/stepmania/src/ScreenTextEntry.cpp +++ b/stepmania/src/ScreenTextEntry.cpp @@ -13,7 +13,7 @@ #include "RageInput.h" #include "LocalizedString.h" -static const char* g_szKeys[NUM_KEYBOARD_ROWS][KEYS_PER_ROW] = +static const char* g_szKeys[NUM_KeyboardRow][KEYS_PER_ROW] = { {"A","B","C","D","E","F","G","H","I","J","K","L","M"}, {"N","O","P","Q","R","S","T","U","V","W","X","Y","Z"}, @@ -360,7 +360,7 @@ void ScreenTextEntryVisual::BeginScreen() { BitmapText &bt = *m_ptextKeys[r][x]; float fX = roundf( SCALE( x, 0, KEYS_PER_ROW-1, ROW_START_X, ROW_END_X ) ); - float fY = roundf( SCALE( r, 0, NUM_KEYBOARD_ROWS-1, ROW_START_Y, ROW_END_Y ) ); + float fY = roundf( SCALE( r, 0, NUM_KeyboardRow-1, ROW_START_Y, ROW_END_Y ) ); bt.SetXY( fX, fY ); } } @@ -406,7 +406,7 @@ void ScreenTextEntryVisual::MoveY( int iDir ) do { m_iFocusY = enum_add2( m_iFocusY, +iDir ); - wrap( (int&)m_iFocusY, NUM_KEYBOARD_ROWS ); + wrap( (int&)m_iFocusY, NUM_KeyboardRow ); // HACK: Round to nearest option so that we always stop // on KEYBOARD_ROW_SPECIAL. diff --git a/stepmania/src/ScreenTextEntry.h b/stepmania/src/ScreenTextEntry.h index 0af7e6e4d7..5e8f3d4745 100644 --- a/stepmania/src/ScreenTextEntry.h +++ b/stepmania/src/ScreenTextEntry.h @@ -13,9 +13,10 @@ enum KeyboardRow { R1, R2, R3, R4, R5, R6, R7, KEYBOARD_ROW_SPECIAL, - NUM_KEYBOARD_ROWS + NUM_KeyboardRow, + KeyboardRow_Invalid }; -#define FOREACH_KeyboardRow( i ) FOREACH_ENUM( KeyboardRow, NUM_KEYBOARD_ROWS, i ) +#define FOREACH_KeyboardRow( i ) FOREACH_ENUM( KeyboardRow, NUM_KeyboardRow, i ) const int KEYS_PER_ROW = 13; enum KeyboardRowSpecialKey { @@ -120,7 +121,7 @@ protected: KeyboardRow m_iFocusY; AutoActor m_sprCursor; - BitmapText *m_ptextKeys[NUM_KEYBOARD_ROWS][KEYS_PER_ROW]; + BitmapText *m_ptextKeys[NUM_KeyboardRow][KEYS_PER_ROW]; RageSound m_sndChange;