7-key in BM; make 5-key a subset (no need for separate game

types).  Name the keys by number; "center", etc. are confusing
with 7-key.  Add secondary scratch (both directions are registered,
so we can use them as menu inputs).  Change "back" to "select".

TODO: Only one scratch direction is currently recognized for the actual
track.  The input config screen can't handle this many keys (goes off
the screen).

I won't get to fixing the above soon.  I wasn't ready to actually add BM
support yet, and I don't want to spend too much time on it before I
add keyed support (which is coming after the sound code is stable) ...
This commit is contained in:
Glenn Maynard
2003-01-01 22:08:05 +00:00
parent d848550137
commit cc1ab17ea1
2 changed files with 75 additions and 57 deletions
+13 -8
View File
@@ -108,14 +108,19 @@ enum // 3DDX Buttons
enum // BM Buttons enum // BM Buttons
{ {
BM_BUTTON_LEFTWHITE, BM_BUTTON_KEY1,
BM_BUTTON_LEFTBLACK, BM_BUTTON_KEY2,
BM_BUTTON_CENTERWHITE, BM_BUTTON_KEY3,
BM_BUTTON_RIGHTBLACK, BM_BUTTON_KEY4,
BM_BUTTON_RIGHTWHITE, BM_BUTTON_KEY5,
BM_BUTTON_SCRATCH, BM_BUTTON_KEY6,
BM_BUTTON_KEY7,
BM_BUTTON_SCRATCHUP,
/* XXX special case: this button is an alias of BM_BUTTON_SCRATCHUP for track
* matching. */
BM_BUTTON_SCRATCHDOWN,
BM_BUTTON_START, BM_BUTTON_START,
BM_BUTTON_BACK, BM_BUTTON_SELECT,
BM_BUTTON_MENULEFT, BM_BUTTON_MENULEFT,
BM_BUTTON_MENURIGHT, BM_BUTTON_MENURIGHT,
BM_BUTTON_MENUUP, BM_BUTTON_MENUUP,
@@ -123,7 +128,7 @@ enum // BM Buttons
NUM_BM_BUTTONS, // leave this at the end. NUM_BM_BUTTONS, // leave this at the end.
}; };
const GameButton MAX_GAME_BUTTONS = 14; const GameButton MAX_GAME_BUTTONS = 20;
const GameButton GAME_BUTTON_INVALID = MAX_GAME_BUTTONS+1; const GameButton GAME_BUTTON_INVALID = MAX_GAME_BUTTONS+1;
+62 -49
View File
@@ -470,27 +470,34 @@ GameDef g_GameDefs[NUM_GAMES] =
2, // m_iNumControllers 2, // m_iNumControllers
NUM_BM_BUTTONS, // m_iButtonsPerController NUM_BM_BUTTONS, // m_iButtonsPerController
{ // m_szButtonNames { // m_szButtonNames
"LeftWhiteKey", "Key1",
"LeftBlackKey", "Key2",
"CenterWhiteKey", "Key3",
"RightBlackKey", "Key4",
"RightWhiteKey", "Key5",
"Key6",
"Key7",
"Scratch", "Scratch",
"Scratch (down)",
"Start", "Start",
"Back", "Select",
"MenuLeft", "MenuLeft",
"MenuRight", "MenuRight",
"MenuUp", "MenuUp",
"MenuDown", "MenuDown",
}, },
{ // m_szSecondaryFunction { // m_szSecondaryFunction
"(MenuUp)",
"(MenuLeft)", "(MenuLeft)",
"(Start)",
"(MenuRight)",
"(MenuDown)",
"", "",
"(dedicated)", "(MenuRight)",
"",
"",
"",
"",
"(MenuUp)",
"(MenuDown)",
"(Start)",
"(Back)",
"(dedicated)", "(dedicated)",
"(dedicated)", "(dedicated)",
"(dedicated)", "(dedicated)",
@@ -498,45 +505,51 @@ GameDef g_GameDefs[NUM_GAMES] =
"(dedicated)", "(dedicated)",
}, },
{ // m_DedicatedMenuButton { // m_DedicatedMenuButton
BM_BUTTON_MENULEFT, // MENU_BUTTON_LEFT BM_BUTTON_MENULEFT, // MENU_BUTTON_LEFT
BM_BUTTON_MENURIGHT, // MENU_BUTTON_RIGHT BM_BUTTON_MENURIGHT, // MENU_BUTTON_RIGHT
BM_BUTTON_MENUUP, // MENU_BUTTON_UP BM_BUTTON_MENUUP, // MENU_BUTTON_UP
BM_BUTTON_MENUDOWN, // MENU_BUTTON_DOWN BM_BUTTON_MENUDOWN, // MENU_BUTTON_DOWN
BM_BUTTON_START, // MENU_BUTTON_START BM_BUTTON_START, // MENU_BUTTON_START
BM_BUTTON_BACK, // MENU_BUTTON_BACK BM_BUTTON_SELECT, // MENU_BUTTON_BACK
}, },
{ // m_SecondaryMenuButton { // m_SecondaryMenuButton
BM_BUTTON_LEFTBLACK, // MENU_BUTTON_LEFT BM_BUTTON_KEY1, // MENU_BUTTON_LEFT
BM_BUTTON_RIGHTBLACK, // MENU_BUTTON_RIGHT BM_BUTTON_KEY3, // MENU_BUTTON_RIGHT
BM_BUTTON_LEFTWHITE, // MENU_BUTTON_UP BM_BUTTON_SCRATCHUP, // MENU_BUTTON_UP
BM_BUTTON_RIGHTWHITE, // MENU_BUTTON_DOWN BM_BUTTON_SCRATCHDOWN, // MENU_BUTTON_DOWN
BM_BUTTON_CENTERWHITE, // MENU_BUTTON_START BM_BUTTON_START, // MENU_BUTTON_START
BM_BUTTON_BACK, // MENU_BUTTON_BACK BM_BUTTON_SELECT, // MENU_BUTTON_BACK
}, },
{ // m_iDefaultKeyboardKey { // m_iDefaultKeyboardKey
{ // PLAYER_1 { // PLAYER_1
SDLK_z, // BM_BUTTON_LEFTWHITE, SDLK_m, // BM_BUTTON_KEY1,
SDLK_s, // BM_BUTTON_LEFTBLACK, SDLK_k, // BM_BUTTON_KEY2,
SDLK_x, // BM_BUTTON_CENTERWHITE, SDLK_COMMA, // BM_BUTTON_KEY3,
SDLK_d, // BM_BUTTON_RIGHTBLACK, SDLK_l, // BM_BUTTON_KEY4,
SDLK_c, // BM_BUTTON_RIGHTWHITE, SDLK_PERIOD, // BM_BUTTON_KEY5,
SDLK_b, // BM_BUTTON_SCRATCH, SDLK_SEMICOLON, // BM_BUTTON_KEY6,
SDLK_SLASH, // BM_BUTTON_KEY7,
SDLK_LSHIFT, // BM_BUTTON_SCRATCHUP,
-1, // BM_BUTTON_SCRATCHDOWN,
SDLK_RETURN, // BM_BUTTON_START, SDLK_RETURN, // BM_BUTTON_START,
SDLK_ESCAPE, // BM_BUTTON_BACK, -1, // BM_BUTTON_SELECT,
SDLK_LEFT, // BM_BUTTON_MENULEFT SDLK_LEFT, // BM_BUTTON_MENULEFT
SDLK_RIGHT, // BM_BUTTON_MENURIGHT SDLK_RIGHT, // BM_BUTTON_MENURIGHT
SDLK_UP, // BM_BUTTON_MENUUP SDLK_UP, // BM_BUTTON_MENUUP
SDLK_DOWN, // BM_BUTTON_MENUDOWN SDLK_DOWN, // BM_BUTTON_MENUDOWN
}, },
{ // PLAYER_2 { // PLAYER_2
-1, // BM_BUTTON_LEFTWHITE, -1, // BM_BUTTON_KEY1,
-1, // BM_BUTTON_LEFTBLACK, -1, // BM_BUTTON_KEY2,
-1, // BM_BUTTON_CENTERWHITE, -1, // BM_BUTTON_KEY3,
-1, // BM_BUTTON_RIGHTBLACK, -1, // BM_BUTTON_KEY4,
-1, // BM_BUTTON_RIGHTWHITE, -1, // BM_BUTTON_KEY5,
-1, // BM_BUTTON_SCRATCH, -1, // BM_BUTTON_KEY6,
-1, // BM_BUTTON_KEY7,
-1, // BM_BUTTON_SCRATCHUP,
-1, // BM_BUTTON_SCRATCHDOWN,
-1, // BM_BUTTON_START, -1, // BM_BUTTON_START,
-1, // BM_BUTTON_BACK, -1, // BM_BUTTON_SELECT,
-1, // BM_BUTTON_MENULEFT -1, // BM_BUTTON_MENULEFT
-1, // BM_BUTTON_MENURIGHT -1, // BM_BUTTON_MENURIGHT
-1, // BM_BUTTON_MENUUP -1, // BM_BUTTON_MENUUP
@@ -1156,20 +1169,20 @@ StyleDef g_StyleDefs[NUM_STYLES] =
6, // m_iColsPerPlayer 6, // m_iColsPerPlayer
{ // m_ColumnInfo[NUM_PLAYERS][MAX_COLS_PER_PLAYER]; { // m_ColumnInfo[NUM_PLAYERS][MAX_COLS_PER_PLAYER];
{ // PLAYER_1 { // PLAYER_1
{ TRACK_1, GAME_CONTROLLER_1, BM_BUTTON_LEFTWHITE, -BM_COL_SPACING*2.5f }, { TRACK_1, GAME_CONTROLLER_1, BM_BUTTON_KEY1, -BM_COL_SPACING*2.5f },
{ TRACK_2, GAME_CONTROLLER_1, BM_BUTTON_LEFTBLACK, -BM_COL_SPACING*1.5f }, { TRACK_2, GAME_CONTROLLER_1, BM_BUTTON_KEY2, -BM_COL_SPACING*1.5f },
{ TRACK_3, GAME_CONTROLLER_1, BM_BUTTON_CENTERWHITE, -BM_COL_SPACING*0.5f }, { TRACK_3, GAME_CONTROLLER_1, BM_BUTTON_KEY3, -BM_COL_SPACING*0.5f },
{ TRACK_4, GAME_CONTROLLER_1, BM_BUTTON_RIGHTBLACK, +BM_COL_SPACING*0.5f }, { TRACK_4, GAME_CONTROLLER_1, BM_BUTTON_KEY4, +BM_COL_SPACING*0.5f },
{ TRACK_5, GAME_CONTROLLER_1, BM_BUTTON_RIGHTWHITE, +BM_COL_SPACING*1.5f }, { TRACK_5, GAME_CONTROLLER_1, BM_BUTTON_KEY5, +BM_COL_SPACING*1.5f },
{ TRACK_6, GAME_CONTROLLER_1, BM_BUTTON_SCRATCH, +BM_COL_SPACING*3.0f }, { TRACK_6, GAME_CONTROLLER_1, BM_BUTTON_SCRATCHUP,+BM_COL_SPACING*3.0f },
}, },
{ // PLAYER_2 { // PLAYER_2
{ TRACK_1, GAME_CONTROLLER_2, BM_BUTTON_LEFTWHITE, -BM_COL_SPACING*2.5f }, { TRACK_1, GAME_CONTROLLER_2, BM_BUTTON_KEY1, -BM_COL_SPACING*2.5f },
{ TRACK_2, GAME_CONTROLLER_2, BM_BUTTON_LEFTBLACK, -BM_COL_SPACING*1.5f }, { TRACK_2, GAME_CONTROLLER_2, BM_BUTTON_KEY2, -BM_COL_SPACING*1.5f },
{ TRACK_3, GAME_CONTROLLER_2, BM_BUTTON_CENTERWHITE, -BM_COL_SPACING*0.5f }, { TRACK_3, GAME_CONTROLLER_2, BM_BUTTON_KEY3, -BM_COL_SPACING*0.5f },
{ TRACK_4, GAME_CONTROLLER_2, BM_BUTTON_RIGHTBLACK, +BM_COL_SPACING*0.5f }, { TRACK_4, GAME_CONTROLLER_2, BM_BUTTON_KEY4, +BM_COL_SPACING*0.5f },
{ TRACK_5, GAME_CONTROLLER_2, BM_BUTTON_RIGHTWHITE, +BM_COL_SPACING*1.5f }, { TRACK_5, GAME_CONTROLLER_2, BM_BUTTON_KEY5, +BM_COL_SPACING*1.5f },
{ TRACK_6, GAME_CONTROLLER_2, BM_BUTTON_SCRATCH, +BM_COL_SPACING*3.0f }, { TRACK_6, GAME_CONTROLLER_2, BM_BUTTON_SCRATCHUP,+BM_COL_SPACING*3.0f },
}, },
}, },
{ // m_iColumnDrawOrder[MAX_COLS_PER_PLAYER]; { // m_iColumnDrawOrder[MAX_COLS_PER_PLAYER];
@@ -1602,10 +1615,10 @@ CString GameManager::GetPathTo( const int col, CString sElementName ) // looks i
GetDirListing( ssprintf("%s%s %s*.gif", sDir.GetString(), sButtonName.GetString(), sElementName.GetString()), arrayPossibleFileNames, false, true ); GetDirListing( ssprintf("%s%s %s*.gif", sDir.GetString(), sButtonName.GetString(), sElementName.GetString()), arrayPossibleFileNames, false, true );
GetDirListing( ssprintf("%s%s %s*", sDir.GetString(), sButtonName.GetString(), sElementName.GetString()), arrayPossibleFileNames, false, true ); GetDirListing( ssprintf("%s%s %s*", sDir.GetString(), sButtonName.GetString(), sElementName.GetString()), arrayPossibleFileNames, false, true );
if( !arrayPossibleFileNames.empty() ) if( arrayPossibleFileNames.empty() )
return arrayPossibleFileNames[0]; RageException::Throw( "The NoteSkin element '%s %s' is missing from '%s'.", sButtonName.GetString(), sElementName.GetString(), sDir.GetString() );
RageException::Throw( "The NoteSkin element '%s %s' is missing from '%s'.", sButtonName.GetString(), sElementName.GetString(), sDir.GetString() ); return DerefRedir(arrayPossibleFileNames[0]);
} }
void GameManager::GetEnabledGames( CArray<Game,Game>& aGamesOut ) void GameManager::GetEnabledGames( CArray<Game,Game>& aGamesOut )