diff --git a/stepmania/src/GameInput.h b/stepmania/src/GameInput.h index 4335e009d0..63c1ac3904 100644 --- a/stepmania/src/GameInput.h +++ b/stepmania/src/GameInput.h @@ -35,6 +35,7 @@ enum // DanceButtons DANCE_BUTTON_MENUUP, DANCE_BUTTON_MENUDOWN, DANCE_BUTTON_COIN, + DANCE_BUTTON_OPERATOR, NUM_DANCE_BUTTONS, // leave this at the end }; @@ -52,6 +53,7 @@ enum // PumpButtons PUMP_BUTTON_MENUUP, PUMP_BUTTON_MENUDOWN, PUMP_BUTTON_COIN, + PUMP_BUTTON_OPERATOR, NUM_PUMP_BUTTONS, // leave this at the end }; @@ -71,6 +73,7 @@ enum // EZ2Buttons EZ2_BUTTON_MENUUP, EZ2_BUTTON_MENUDOWN, EZ2_BUTTON_COIN, + EZ2_BUTTON_OPERATOR, NUM_EZ2_BUTTONS, // leave this at the end }; @@ -88,6 +91,7 @@ enum // ParaButtons PARA_BUTTON_MENUUP, PARA_BUTTON_MENUDOWN, PARA_BUTTON_COIN, + PARA_BUTTON_OPERATOR, NUM_PARA_BUTTONS, // leave this at the end }; @@ -108,6 +112,7 @@ enum // 3DDX Buttons DS3DDX_BUTTON_MENUUP, DS3DDX_BUTTON_MENUDOWN, DS3DDX_BUTTON_COIN, + DS3DDX_BUTTON_OPERATOR, NUM_DS3DDX_BUTTONS, // leave this at the end. }; @@ -131,6 +136,7 @@ enum // BM Buttons BM_BUTTON_MENUUP, BM_BUTTON_MENUDOWN, BM_BUTTON_COIN, + BM_BUTTON_OPERATOR, NUM_BM_BUTTONS, // leave this at the end. }; diff --git a/stepmania/src/GameManager.cpp b/stepmania/src/GameManager.cpp index 8906f8e39b..55312a7481 100644 --- a/stepmania/src/GameManager.cpp +++ b/stepmania/src/GameManager.cpp @@ -57,7 +57,7 @@ struct { }; // -// Important: Every game must define the buttons: "Start", "Back", "MenuLeft", and "MenuRight" +// Important: Every game must define the buttons: "Start", "Back", "MenuLeft", "Operator" and "MenuRight" // GameDef g_GameDefs[NUM_GAMES] = { @@ -80,6 +80,7 @@ GameDef g_GameDefs[NUM_GAMES] = "MenuUp", "MenuDown", "Insert Coin", + "Operator", }, { // m_szSecondaryFunction "(MenuLeft)", @@ -95,6 +96,7 @@ GameDef g_GameDefs[NUM_GAMES] = "(dedicated)", "(dedicated)", "", + "", }, { // m_DedicatedMenuButton DANCE_BUTTON_MENULEFT, // MENU_BUTTON_LEFT @@ -103,7 +105,8 @@ GameDef g_GameDefs[NUM_GAMES] = DANCE_BUTTON_MENUDOWN, // MENU_BUTTON_DOWN DANCE_BUTTON_START, // MENU_BUTTON_START DANCE_BUTTON_BACK, // MENU_BUTTON_BACK - DANCE_BUTTON_COIN,// MENU_BUTTON_COIN + DANCE_BUTTON_COIN, // MENU_BUTTON_COIN + DANCE_BUTTON_OPERATOR // MENU_BUTTON_OPERATOR }, { // m_SecondaryMenuButton DANCE_BUTTON_LEFT, // MENU_BUTTON_LEFT @@ -112,38 +115,41 @@ GameDef g_GameDefs[NUM_GAMES] = DANCE_BUTTON_DOWN, // MENU_BUTTON_DOWN DANCE_BUTTON_START, // MENU_BUTTON_START DANCE_BUTTON_BACK, // MENU_BUTTON_BACK - DANCE_BUTTON_COIN,// MENU_BUTTON_COIN + DANCE_BUTTON_COIN, // MENU_BUTTON_COIN + DANCE_BUTTON_OPERATOR, // MENU_BUTTON_OPERATOR }, { // m_iDefaultKeyboardKey { // PLAYER_1 SDLK_LEFT, // DANCE_BUTTON_LEFT, SDLK_RIGHT, // DANCE_BUTTON_RIGHT, - SDLK_UP, // DANCE_BUTTON_UP, + SDLK_UP, // DANCE_BUTTON_UP, SDLK_DOWN, // DANCE_BUTTON_DOWN, -1, //no default key // DANCE_BUTTON_UPLEFT, -1, //no default key // DANCE_BUTTON_UPRIGHT, - SDLK_RETURN, // DANCE_BUTTON_START, - SDLK_ESCAPE, // DANCE_BUTTON_BACK + SDLK_RETURN, // DANCE_BUTTON_START, + SDLK_ESCAPE, // DANCE_BUTTON_BACK -1, //no default key // DANCE_BUTTON_MENULEFT -1, //no default key // DANCE_BUTTON_MENURIGHT - SDLK_UP, // DANCE_BUTTON_MENUUP + SDLK_UP, // DANCE_BUTTON_MENUUP SDLK_DOWN, // DANCE_BUTTON_MENUDOWN SDLK_F1, // DANCE_BUTTON_COIN + SDLK_LCTRL, // DANCE_BUTTON_OPERATOR }, { // PLAYER_2 - SDLK_KP4, // DANCE_BUTTON_LEFT, - SDLK_KP6, // DANCE_BUTTON_RIGHT, - SDLK_KP8, // DANCE_BUTTON_UP, - SDLK_KP2, // DANCE_BUTTON_DOWN, - SDLK_KP7, // DANCE_BUTTON_UPLEFT, - SDLK_KP9, // DANCE_BUTTON_UPRIGHT, - SDLK_KP_ENTER, // DANCE_BUTTON_START, - SDLK_KP0, // DANCE_BUTTON_BACK + SDLK_KP4, // DANCE_BUTTON_LEFT, + SDLK_KP6, // DANCE_BUTTON_RIGHT, + SDLK_KP8, // DANCE_BUTTON_UP, + SDLK_KP2, // DANCE_BUTTON_DOWN, + SDLK_KP7, // DANCE_BUTTON_UPLEFT, + SDLK_KP9, // DANCE_BUTTON_UPRIGHT, + SDLK_KP_ENTER, // DANCE_BUTTON_START, + SDLK_KP0, // DANCE_BUTTON_BACK -1, //no default key // DANCE_BUTTON_MENULEFT -1, //no default key // DANCE_BUTTON_MENURIGHT -1, //no default key // DANCE_BUTTON_MENUUP -1, //no default key // DANCE_BUTTON_MENUDOWN SDLK_F2, // DANCE_BUTTON_COIN + SDLK_RCTRL // DANCE_BUTTON_OPERATOR }, } }, @@ -165,6 +171,7 @@ GameDef g_GameDefs[NUM_GAMES] = "MenuUp", "MenuDown", "Insert Coin", + "Operator", }, { // m_szSecondaryFunction "(MenuUp)", @@ -179,6 +186,7 @@ GameDef g_GameDefs[NUM_GAMES] = "(dedicated)", "(dedicated)", "", + "", }, { // m_DedicatedMenuButton PUMP_BUTTON_MENULEFT, // MENU_BUTTON_LEFT @@ -187,16 +195,18 @@ GameDef g_GameDefs[NUM_GAMES] = PUMP_BUTTON_MENUDOWN, // MENU_BUTTON_DOWN PUMP_BUTTON_START, // MENU_BUTTON_START PUMP_BUTTON_BACK, // MENU_BUTTON_BACK - PUMP_BUTTON_COIN,// MENU_BUTTON_COIN + PUMP_BUTTON_COIN, // MENU_BUTTON_COIN + PUMP_BUTTON_OPERATOR, // MENU_BUTTON_OPERATOR }, { // m_SecondaryMenuButton - PUMP_BUTTON_DOWNLEFT, // MENU_BUTTON_LEFT + PUMP_BUTTON_DOWNLEFT, // MENU_BUTTON_LEFT PUMP_BUTTON_DOWNRIGHT, // MENU_BUTTON_RIGHT - PUMP_BUTTON_UPLEFT, // MENU_BUTTON_UP + PUMP_BUTTON_UPLEFT, // MENU_BUTTON_UP PUMP_BUTTON_UPRIGHT, // MENU_BUTTON_DOWN PUMP_BUTTON_CENTER, // MENU_BUTTON_START PUMP_BUTTON_BACK, // MENU_BUTTON_BACK - PUMP_BUTTON_COIN,// MENU_BUTTON_COIN + PUMP_BUTTON_COIN, // MENU_BUTTON_COIN + PUMP_BUTTON_OPERATOR, // MENU_BUTTON_OPERATOR }, { // m_iDefaultKeyboardKey { // PLAYER_1 @@ -205,27 +215,29 @@ GameDef g_GameDefs[NUM_GAMES] = SDLK_s, // PUMP_BUTTON_CENTER, SDLK_z, // PUMP_BUTTON_DOWNLEFT, SDLK_c, // PUMP_BUTTON_DOWNRIGHT, - SDLK_RETURN, // PUMP_BUTTON_START, - SDLK_ESCAPE, // PUMP_BUTTON_BACK, + SDLK_RETURN, // PUMP_BUTTON_START, + SDLK_ESCAPE, // PUMP_BUTTON_BACK, SDLK_LEFT, // PUMP_BUTTON_MENULEFT SDLK_RIGHT, // PUMP_BUTTON_MENURIGHT - SDLK_UP, // PUMP_BUTTON_MENUUP + SDLK_UP, // PUMP_BUTTON_MENUUP SDLK_DOWN, // PUMP_BUTTON_MENUDOWN SDLK_F1, // PUMP_BUTTON_COIN + SDLK_LCTRL // PUMP_BUTTON_OPERATOR }, { // PLAYER_2 - SDLK_KP7, // PUMP_BUTTON_UPLEFT, - SDLK_KP9, // PUMP_BUTTON_UPRIGHT, - SDLK_KP5, // PUMP_BUTTON_CENTER, - SDLK_KP1, // PUMP_BUTTON_DOWNLEFT, - SDLK_KP3, // PUMP_BUTTON_DOWNRIGHT, - SDLK_KP_ENTER, // PUMP_BUTTON_START, - SDLK_KP0, // PUMP_BUTTON_BACK, + SDLK_KP7, // PUMP_BUTTON_UPLEFT, + SDLK_KP9, // PUMP_BUTTON_UPRIGHT, + SDLK_KP5, // PUMP_BUTTON_CENTER, + SDLK_KP1, // PUMP_BUTTON_DOWNLEFT, + SDLK_KP3, // PUMP_BUTTON_DOWNRIGHT, + SDLK_KP_ENTER, // PUMP_BUTTON_START, + SDLK_KP0, // PUMP_BUTTON_BACK, -1, //no default key // PUMP_BUTTON_MENULEFT -1, //no default key // PUMP_BUTTON_MENURIGHT -1, //no default key // PUMP_BUTTON_MENUUP -1, //no default key // PUMP_BUTTON_MENUDOWN SDLK_F2, // PUMP_BUTTON_COIN + SDLK_RCTRL, // PUMP_BUTTON_OPERATOR }, } }, @@ -249,6 +261,7 @@ GameDef g_GameDefs[NUM_GAMES] = "MenuUp", "MenuDown", "Insert Coin", + "Operator", }, { // m_szSecondaryFunction "(MenuUp)", @@ -265,6 +278,7 @@ GameDef g_GameDefs[NUM_GAMES] = "(dedicated)", "(dedicated)", "", + "", }, { // m_DedicatedMenuButton EZ2_BUTTON_MENULEFT, // MENU_BUTTON_LEFT @@ -273,7 +287,8 @@ GameDef g_GameDefs[NUM_GAMES] = EZ2_BUTTON_MENUDOWN, // MENU_BUTTON_DOWN EZ2_BUTTON_START, // MENU_BUTTON_START EZ2_BUTTON_BACK, // MENU_BUTTON_BACK - EZ2_BUTTON_COIN, // MENU_BUTTON_COIN + EZ2_BUTTON_COIN, // MENU_BUTTON_COIN + EZ2_BUTTON_OPERATOR, // MENU_BUTTON_OPERATOR }, { // m_SecondaryMenuButton EZ2_BUTTON_HANDUPLEFT, // MENU_BUTTON_LEFT @@ -282,7 +297,8 @@ GameDef g_GameDefs[NUM_GAMES] = EZ2_BUTTON_FOOTUPRIGHT, // MENU_BUTTON_DOWN EZ2_BUTTON_FOOTDOWN, // MENU_BUTTON_START EZ2_BUTTON_BACK, // MENU_BUTTON_BACK - EZ2_BUTTON_COIN, // MENU_BUTTON_COIN + EZ2_BUTTON_COIN, // MENU_BUTTON_COIN + EZ2_BUTTON_OPERATOR, // MENU_BUTTON_OPERATOR }, { // m_iDefaultKeyboardKey { // PLAYER_1 @@ -293,13 +309,14 @@ GameDef g_GameDefs[NUM_GAMES] = SDLK_v, // EZ2_BUTTON_HANDUPRIGHT, SDLK_s, // EZ2_BUTTON_HANDLRLEFT, SDLK_f, // EZ2_BUTTON_HANDLRRIGHT, - SDLK_RETURN, // EZ2_BUTTON_START, - SDLK_ESCAPE, // EZ2_BUTTON_BACK, + SDLK_RETURN, // EZ2_BUTTON_START, + SDLK_ESCAPE, // EZ2_BUTTON_BACK, SDLK_LEFT, // EZ2_BUTTON_MENULEFT SDLK_RIGHT, // EZ2_BUTTON_MENURIGHT - SDLK_UP, // EZ2_BUTTON_MENUUP + SDLK_UP, // EZ2_BUTTON_MENUUP SDLK_DOWN, // EZ2_BUTTON_MENUDOWN SDLK_F1, // EZ2_BUTTON_COIN + SDLK_LCTRL, // EZ2_BUTTON_OPERATOR }, { // PLAYER_2 -1, // EZ2_BUTTON_FOOTUPLEFT, @@ -316,6 +333,7 @@ GameDef g_GameDefs[NUM_GAMES] = -1, //no default key // EZ2_BUTTON_MENUUP -1, //no default key // EZ2_BUTTON_MENUDOWN SDLK_F2, // EZ2_BUTTON_COIN + SDLK_RCTRL, // EZ2_BUTTON_OPERATOR }, }, }, @@ -337,6 +355,7 @@ GameDef g_GameDefs[NUM_GAMES] = "MenuUp", "MenuDown", "Insert Coin", + "Operator", }, { // m_szSecondaryFunction "(MenuLeft)", @@ -351,53 +370,58 @@ GameDef g_GameDefs[NUM_GAMES] = "(dedicated)", "(dedicated)", "", + "", }, { // m_DedicatedMenuButton PARA_BUTTON_MENULEFT, // MENU_BUTTON_LEFT PARA_BUTTON_MENURIGHT, // MENU_BUTTON_RIGHT - PARA_BUTTON_MENUUP, // MENU_BUTTON_UP + PARA_BUTTON_MENUUP, // MENU_BUTTON_UP PARA_BUTTON_MENUDOWN, // MENU_BUTTON_DOWN PARA_BUTTON_START, // MENU_BUTTON_START PARA_BUTTON_BACK, // MENU_BUTTON_BACK - PARA_BUTTON_COIN,// MENU_BUTTON_COIN + PARA_BUTTON_COIN, // MENU_BUTTON_COIN + PARA_BUTTON_OPERATOR, // MENU_BUTTON_OPERATOR }, { // m_SecondaryMenuButton PARA_BUTTON_LEFT, // MENU_BUTTON_LEFT PARA_BUTTON_RIGHT, // MENU_BUTTON_RIGHT - PARA_BUTTON_UPRIGHT, // MENU_BUTTON_UP + PARA_BUTTON_UPRIGHT, // MENU_BUTTON_UP PARA_BUTTON_UPLEFT, // MENU_BUTTON_DOWN PARA_BUTTON_START, // MENU_BUTTON_START PARA_BUTTON_BACK, // MENU_BUTTON_BACK - PARA_BUTTON_COIN,// MENU_BUTTON_COIN + PARA_BUTTON_COIN, // MENU_BUTTON_COIN + PARA_BUTTON_OPERATOR, // MENU_BUTTON_OPERATOR }, { // m_iDefaultKeyboardKey { // PLAYER_1 - SDLK_z, // PARA_BUTTON_LEFT, - SDLK_x, // PARA_BUTTON_UPLEFT, - SDLK_c, // PARA_BUTTON_UP, - SDLK_v, // PARA_BUTTON_UPRIGHT, - SDLK_b, // PARA_BUTTON_RIGHT, - SDLK_RETURN, // PARA_BUTTON_START, - SDLK_ESCAPE, // PARA_BUTTON_BACK - SDLK_LEFT, //no default key // PARA_BUTTON_MENULEFT + SDLK_z, // PARA_BUTTON_LEFT, + SDLK_x, // PARA_BUTTON_UPLEFT, + SDLK_c, // PARA_BUTTON_UP, + SDLK_v, // PARA_BUTTON_UPRIGHT, + SDLK_b, // PARA_BUTTON_RIGHT, + SDLK_RETURN, // PARA_BUTTON_START, + SDLK_ESCAPE, // PARA_BUTTON_BACK + SDLK_LEFT, //no default key // PARA_BUTTON_MENULEFT SDLK_RIGHT, //no default key // PARA_BUTTON_MENURIGHT - SDLK_UP, // PARA_BUTTON_MENUUP - SDLK_DOWN, // PARA_BUTTON_MENUDOWN - SDLK_F1, // PARA_BUTTON_COIN + SDLK_UP, // PARA_BUTTON_MENUUP + SDLK_DOWN, // PARA_BUTTON_MENUDOWN + SDLK_F1, // PARA_BUTTON_COIN + SDLK_LCTRL, // PARA_BUTTON_OPERATOR }, { // PLAYER_2 - -1, // PARA_BUTTON_LEFT, - -1, // PARA_BUTTON_UPLEFT, - -1, // PARA_BUTTON_UP, - -1, // PARA_BUTTON_UPRIGHT, - -1, // PARA_BUTTON_RIGHT, - -1, // PARA_BUTTON_START, - -1, // PARA_BUTTON_BACK + -1, // PARA_BUTTON_LEFT, + -1, // PARA_BUTTON_UPLEFT, + -1, // PARA_BUTTON_UP, + -1, // PARA_BUTTON_UPRIGHT, + -1, // PARA_BUTTON_RIGHT, + -1, // PARA_BUTTON_START, + -1, // PARA_BUTTON_BACK -1, //no default key // PARA_BUTTON_MENULEFT -1, //no default key // PARA_BUTTON_MENURIGHT - -1, // PARA_BUTTON_MENUUP - -1, - -1, // PARA_BUTTON_COIN + -1, // PARA_BUTTON_MENUUP + -1, + -1, // PARA_BUTTON_COIN + SDLK_RCTRL, // PARA_BUTTON_OPERATOR }, } }, @@ -422,6 +446,7 @@ GameDef g_GameDefs[NUM_GAMES] = "MenuUp", "MenuDown", "Insert Coin", + "Operator", }, { // m_szSecondaryFunction "(MenuLeft)", @@ -439,59 +464,64 @@ GameDef g_GameDefs[NUM_GAMES] = "(dedicated)", "(dedicated)", "", + "", }, { // m_DedicatedMenuButton - DS3DDX_BUTTON_MENULEFT, // MENU_BUTTON_LEFT + DS3DDX_BUTTON_MENULEFT, // MENU_BUTTON_LEFT DS3DDX_BUTTON_MENURIGHT, // MENU_BUTTON_RIGHT - DS3DDX_BUTTON_MENUUP, // MENU_BUTTON_UP - DS3DDX_BUTTON_MENUDOWN, // MENU_BUTTON_DOWN + DS3DDX_BUTTON_MENUUP, // MENU_BUTTON_UP + DS3DDX_BUTTON_MENUDOWN, // MENU_BUTTON_DOWN DS3DDX_BUTTON_START, // MENU_BUTTON_START - DS3DDX_BUTTON_BACK, // MENU_BUTTON_BACK - DS3DDX_BUTTON_COIN,// MENU_BUTTON_COIN + DS3DDX_BUTTON_BACK, // MENU_BUTTON_BACK + DS3DDX_BUTTON_COIN, // MENU_BUTTON_COIN + DS3DDX_BUTTON_OPERATOR, // MENU_BUTTON_OPERATOR }, { // m_SecondaryMenuButton DS3DDX_BUTTON_HANDLEFT, // MENU_BUTTON_LEFT - DS3DDX_BUTTON_HANDRIGHT, // MENU_BUTTON_RIGHT - DS3DDX_BUTTON_HANDUP, // MENU_BUTTON_UP + DS3DDX_BUTTON_HANDRIGHT, // MENU_BUTTON_RIGHT + DS3DDX_BUTTON_HANDUP, // MENU_BUTTON_UP DS3DDX_BUTTON_HANDDOWN, // MENU_BUTTON_DOWN DS3DDX_BUTTON_START, // MENU_BUTTON_START - DS3DDX_BUTTON_BACK, // MENU_BUTTON_BACK - DS3DDX_BUTTON_COIN,// MENU_BUTTON_COIN + DS3DDX_BUTTON_BACK, // MENU_BUTTON_BACK + DS3DDX_BUTTON_COIN, // MENU_BUTTON_COIN + DS3DDX_BUTTON_OPERATOR, // MENU_BUTTON_OPERATOR }, { // m_iDefaultKeyboardKey { // PLAYER_1 - SDLK_a, // DS3DDX_BUTTON_HANDLEFT, - SDLK_z, // DS3DDX_BUTTON_FOOTDOWNLEFT, - SDLK_q, // DS3DDX_BUTTON_FOOTUPLEFT, - SDLK_w, // DS3DDX_BUTTON_HANDUP, - SDLK_x, // DS3DDX_BUTTON_HANDDOWN, - SDLK_e, // DS3DDX_BUTTON_FOOTUPRIGHT, - SDLK_c, // DS3DDX_BUTTON_FOOTDOWNRIGHT, - SDLK_d, // DS3DDX_BUTTON_HANDRIGHT, - SDLK_RETURN, // DS3DDX_BUTTON_START, - SDLK_ESCAPE, // DS3DDX_BUTTON_BACK - SDLK_LEFT, //no default key // DS3DDX_BUTTON_MENULEFT + SDLK_a, // DS3DDX_BUTTON_HANDLEFT, + SDLK_z, // DS3DDX_BUTTON_FOOTDOWNLEFT, + SDLK_q, // DS3DDX_BUTTON_FOOTUPLEFT, + SDLK_w, // DS3DDX_BUTTON_HANDUP, + SDLK_x, // DS3DDX_BUTTON_HANDDOWN, + SDLK_e, // DS3DDX_BUTTON_FOOTUPRIGHT, + SDLK_c, // DS3DDX_BUTTON_FOOTDOWNRIGHT, + SDLK_d, // DS3DDX_BUTTON_HANDRIGHT, + SDLK_RETURN, // DS3DDX_BUTTON_START, + SDLK_ESCAPE, // DS3DDX_BUTTON_BACK + SDLK_LEFT, //no default key // DS3DDX_BUTTON_MENULEFT SDLK_RIGHT, //no default key // DS3DDX_BUTTON_MENURIGHT - SDLK_UP, // DS3DDX_BUTTON_MENUUP - SDLK_DOWN, // DS3DDX_BUTTON_MENUDOWN - SDLK_F1, // DS3DDX_BUTTON_COIN + SDLK_UP, // DS3DDX_BUTTON_MENUUP + SDLK_DOWN, // DS3DDX_BUTTON_MENUDOWN + SDLK_F1, // DS3DDX_BUTTON_COIN + SDLK_LCTRL, // DS3DDX_BUTTON_OPERATOR }, { // PLAYER_2 - -1, // DS3DDX_BUTTON_HANDLEFT, - -1, // DS3DDX_BUTTON_FOOTDOWNLEFT, - -1, // DS3DDX_BUTTON_FOOTUPLEFT, - -1, // DS3DDX_BUTTON_HANDUP, - -1, // DS3DDX_BUTTON_HANDDOWN, - -1, // DS3DDX_BUTTON_FOOTUPRIGHT, - -1, // DS3DDX_BUTTON_FOOTDOWNRIGHT, - -1, // DS3DDX_BUTTON_HANDRIGHT, - -1, // DS3DDX_BUTTON_START, - -1, // DS3DDX_BUTTON_BACK + -1, // DS3DDX_BUTTON_HANDLEFT, + -1, // DS3DDX_BUTTON_FOOTDOWNLEFT, + -1, // DS3DDX_BUTTON_FOOTUPLEFT, + -1, // DS3DDX_BUTTON_HANDUP, + -1, // DS3DDX_BUTTON_HANDDOWN, + -1, // DS3DDX_BUTTON_FOOTUPRIGHT, + -1, // DS3DDX_BUTTON_FOOTDOWNRIGHT, + -1, // DS3DDX_BUTTON_HANDRIGHT, + -1, // DS3DDX_BUTTON_START, + -1, // DS3DDX_BUTTON_BACK -1, //no default key // DS3DDX_BUTTON_MENULEFT -1, //no default key // DS3DDX_BUTTON_MENURIGHT - -1, // DS3DDX_BUTTON_MENUUP - -1, // DS3DDX_BUTTON_MENUDOWN - -1, // DS3DDX_BUTTON_COIN + -1, // DS3DDX_BUTTON_MENUUP + -1, // DS3DDX_BUTTON_MENUDOWN + -1, // DS3DDX_BUTTON_COIN + SDLK_RCTRL, // DS3DDX_BUTTON_OPERATOR }, } }, @@ -517,6 +547,7 @@ GameDef g_GameDefs[NUM_GAMES] = "MenuUp", "MenuDown", "Insert Coin", + "Operator", }, { // m_szSecondaryFunction "(MenuLeft)", @@ -536,6 +567,7 @@ GameDef g_GameDefs[NUM_GAMES] = "(dedicated)", "(dedicated)", "", + "", }, { // m_DedicatedMenuButton BM_BUTTON_MENULEFT, // MENU_BUTTON_LEFT @@ -544,7 +576,8 @@ GameDef g_GameDefs[NUM_GAMES] = BM_BUTTON_MENUDOWN, // MENU_BUTTON_DOWN BM_BUTTON_START, // MENU_BUTTON_START BM_BUTTON_SELECT, // MENU_BUTTON_BACK - BM_BUTTON_COIN,// MENU_BUTTON_COIN + BM_BUTTON_COIN, // MENU_BUTTON_COIN + BM_BUTTON_OPERATOR, // MENU_BUTTON_OPERATOR }, { // m_SecondaryMenuButton BM_BUTTON_KEY1, // MENU_BUTTON_LEFT @@ -553,7 +586,8 @@ GameDef g_GameDefs[NUM_GAMES] = BM_BUTTON_SCRATCHDOWN, // MENU_BUTTON_DOWN BM_BUTTON_START, // MENU_BUTTON_START BM_BUTTON_SELECT, // MENU_BUTTON_BACK - BM_BUTTON_COIN,// MENU_BUTTON_COIN + BM_BUTTON_COIN, // MENU_BUTTON_COIN + BM_BUTTON_OPERATOR, // MENU_BUTTON_OPERATOR }, { // m_iDefaultKeyboardKey { // PLAYER_1 @@ -573,6 +607,7 @@ GameDef g_GameDefs[NUM_GAMES] = SDLK_UP, // BM_BUTTON_MENUUP SDLK_DOWN, // BM_BUTTON_MENUDOWN SDLK_F1, // BM_BUTTON_COIN + SDLK_LCTRL, // BM_BUTTON_OPERATOR }, { // PLAYER_2 -1, // BM_BUTTON_KEY1, @@ -591,6 +626,7 @@ GameDef g_GameDefs[NUM_GAMES] = -1, // BM_BUTTON_MENUUP -1, // BM_BUTTON_MENUDOWN -1, // BM_BUTTON_COIN + SDLK_RCTRL, // BM_BUTTON_OPERATOR }, } }, diff --git a/stepmania/src/MenuInput.h b/stepmania/src/MenuInput.h index ec2ff21041..5599788a2b 100644 --- a/stepmania/src/MenuInput.h +++ b/stepmania/src/MenuInput.h @@ -23,6 +23,7 @@ enum MenuButton MENU_BUTTON_START, MENU_BUTTON_BACK, MENU_BUTTON_COIN, + MENU_BUTTON_OPERATOR, NUM_MENU_BUTTONS, // leave this at the end MENU_BUTTON_INVALID }; diff --git a/stepmania/src/ScreenAttract.cpp b/stepmania/src/ScreenAttract.cpp index 35f1f78758..d2e902855b 100644 --- a/stepmania/src/ScreenAttract.cpp +++ b/stepmania/src/ScreenAttract.cpp @@ -25,7 +25,7 @@ #include "ThemeManager.h" #include "SDL_Utils.h" #include "RageSoundManager.h" - +#include "RageMovieTexture.h" #define SECONDS_TO_SHOW THEME->GetMetricF(m_sMetricName,"SecondsToShow") #define NEXT_SCREEN THEME->GetMetric(m_sMetricName,"NextScreen") @@ -33,6 +33,18 @@ ScreenAttract::ScreenAttract( CString sMetricName, CString sElementName ) { + /* This has replaced the above, because ScreenIntroMovie should not be + exited until the movie is done. This saves the hassle of having to + always update the metrics.ini file to reflect the movie's time. + + XXX UPDATE: Until we have a way to determine a movie's length.. the fadeout + time will have to be manually set in the metrics file -- Miryokuteki + + if( m_sMetricName == "ScreenIntroMovie" ) + { + SECONDS_TO_SHOW = THEME->GetMetricF(m_sMetricName,"SecondsToShow"); + }*/ + LOG->Trace( "ScreenAttract::ScreenAttract(%s, %s)", sMetricName.c_str(), sElementName.c_str() ); GAMESTATE->Reset(); @@ -76,7 +88,10 @@ void ScreenAttract::Input( const DeviceInput& DeviceI, const InputEventType type if( DeviceI.device == DEVICE_KEYBOARD && DeviceI.button == SDLK_F3 ) { (int&)PREFSMAN->m_CoinMode = (PREFSMAN->m_CoinMode+1) % PrefsManager::NUM_COIN_MODES; - ResetGame(); + /*ResetGame(); + This causes problems on ScreenIntroMovie, which results in the + movie being restarted and/or becoming out-of-synch -- Miryokuteki */ + CString sMessage = "Coin Mode: "; switch( PREFSMAN->m_CoinMode ) { @@ -84,6 +99,7 @@ void ScreenAttract::Input( const DeviceInput& DeviceI, const InputEventType type case PrefsManager::COIN_PAY: sMessage += "PAY"; break; case PrefsManager::COIN_FREE: sMessage += "FREE"; break; } + SCREENMAN->RefreshCreditsMessages(); SCREENMAN->SystemMessage( sMessage ); return; } @@ -97,7 +113,8 @@ void ScreenAttract::Input( const DeviceInput& DeviceI, const InputEventType type this->SendScreenMessage( SM_BeginFadingOut, 0 ); break; case MENU_BUTTON_COIN: - Screen::MenuCoin( MenuI.player ); // increment coins, play sound + /* Credit already taken care of.. go forth -- Miryokuteki */ + //Screen::MenuCoin( MenuI.player ); // increment coins, play sound SOUNDMAN->StopMusic(); ::Sleep( 800 ); // do a little pause, like the arcade does SCREENMAN->SetNewScreen( "ScreenTitleMenu" ); @@ -131,6 +148,16 @@ void ScreenAttract::Input( const DeviceInput& DeviceI, const InputEventType type void ScreenAttract::Update( float fDelta ) { Screen::Update(fDelta); + + + /* See the above comment block -- Miryokuteki + if( m_sMetricName == "ScreenIntroMovie" ) + { + if( RageMovieTexture::IsFinishedPlaying() == true ) + { + this->SendScreenMessage( SM_BeginFadingOut,0 ); + } + } */ } void ScreenAttract::HandleScreenMessage( const ScreenMessage SM ) diff --git a/stepmania/src/ScreenDemonstration.cpp b/stepmania/src/ScreenDemonstration.cpp index a43e0a92e6..6774d5ef8d 100644 --- a/stepmania/src/ScreenDemonstration.cpp +++ b/stepmania/src/ScreenDemonstration.cpp @@ -184,7 +184,10 @@ void ScreenDemonstration::Input( const DeviceInput& DeviceI, const InputEventTyp if( DeviceI.device == DEVICE_KEYBOARD && DeviceI.button == SDLK_F3 ) { (int&)PREFSMAN->m_CoinMode = (PREFSMAN->m_CoinMode+1) % PrefsManager::NUM_COIN_MODES; - ResetGame(); + /*ResetGame(); + This causes problems on ScreenIntroMovie, which results in the + movie being restarted and/or becoming out-of-synch -- Miryokuteki */ + CString sMessage = "Coin Mode: "; switch( PREFSMAN->m_CoinMode ) { @@ -192,6 +195,7 @@ void ScreenDemonstration::Input( const DeviceInput& DeviceI, const InputEventTyp case PrefsManager::COIN_PAY: sMessage += "PAY"; break; case PrefsManager::COIN_FREE: sMessage += "FREE"; break; } + SCREENMAN->RefreshCreditsMessages(); SCREENMAN->SystemMessage( sMessage ); return; } diff --git a/stepmania/src/ScreenJukebox.cpp b/stepmania/src/ScreenJukebox.cpp index 243cbfbc77..2a4f4a9029 100644 --- a/stepmania/src/ScreenJukebox.cpp +++ b/stepmania/src/ScreenJukebox.cpp @@ -166,7 +166,10 @@ void ScreenJukebox::Input( const DeviceInput& DeviceI, const InputEventType type if( DeviceI.device == DEVICE_KEYBOARD && DeviceI.button == SDLK_F3 ) { (int&)PREFSMAN->m_CoinMode = (PREFSMAN->m_CoinMode+1) % PrefsManager::NUM_COIN_MODES; - ResetGame(); + /*ResetGame(); + You only changed the coin mode.. as with the arcade versions, + the machine should not reset. -- Miryokuteki */ + CString sMessage = "Coin Mode: "; switch( PREFSMAN->m_CoinMode ) { @@ -174,6 +177,7 @@ void ScreenJukebox::Input( const DeviceInput& DeviceI, const InputEventType type case PrefsManager::COIN_PAY: sMessage += "PAY"; break; case PrefsManager::COIN_FREE: sMessage += "FREE"; break; } + SCREENMAN->RefreshCreditsMessages(); SCREENMAN->SystemMessage( sMessage ); return; } diff --git a/stepmania/src/ScreenLogo.h b/stepmania/src/ScreenLogo.h index 5ada4fc294..37395965d7 100644 --- a/stepmania/src/ScreenLogo.h +++ b/stepmania/src/ScreenLogo.h @@ -21,6 +21,7 @@ public: protected: Sprite m_sprLogo; + BitmapText m_textVersion; BitmapText m_textSongs; }; diff --git a/stepmania/src/ScreenManager.cpp b/stepmania/src/ScreenManager.cpp index 5bfa7bdfea..7e7b3215e7 100644 --- a/stepmania/src/ScreenManager.cpp +++ b/stepmania/src/ScreenManager.cpp @@ -328,7 +328,8 @@ void ScreenManager::SetNewScreen( CString sClassName ) SetNewScreen( pNewScreen ); - // If this is a system menu, don't let the global operator key touch it! -- Miryokuteki + /* If this is a system menu, don't let the operator key touch it! + However, if you add an options screen, please include it here -- Miryokuteki */ if( sClassName == "ScreenOptionsMenu" || sClassName == "ScreenMachineOptions" || sClassName == "ScreenOptions" || sClassName == "ScreenInputOptions" || sClassName == "ScreenGraphicOptions" || sClassName == "ScreenGameplayOptions" || @@ -399,8 +400,6 @@ void ScreenManager::RefreshCreditsMessages() m_textCreditInfo[p].SetDiffuse( CREDITS_COLOR ); m_textCreditInfo[p].SetShadowLength( CREDITS_SHADOW_LENGTH ); - LOG->Trace("Actual coins: %d",GAMESTATE->m_iCoins); - switch( PREFSMAN->m_CoinMode ) { case PrefsManager::COIN_HOME: diff --git a/stepmania/src/ScreenMapControllers.cpp b/stepmania/src/ScreenMapControllers.cpp index 9a7497325b..6725498042 100644 --- a/stepmania/src/ScreenMapControllers.cpp +++ b/stepmania/src/ScreenMapControllers.cpp @@ -53,6 +53,7 @@ ScreenMapControllers::ScreenMapControllers() m_textName[b].LoadFromFont( THEME->GetPathTo("Fonts","Header2") ); m_textName[b].SetXY( CENTER_X, LINE_START_Y + b*LINE_GAP_Y-6 ); + m_textName[b].SetText( sName ); m_textName[b].SetZoom( 0.7f ); m_textName[b].SetShadowLength( 2 ); diff --git a/stepmania/src/ScreenTitleMenu.cpp b/stepmania/src/ScreenTitleMenu.cpp index 7603d217d7..8db730f639 100644 --- a/stepmania/src/ScreenTitleMenu.cpp +++ b/stepmania/src/ScreenTitleMenu.cpp @@ -52,6 +52,7 @@ const ScreenMessage SM_ScrollJointPremium = ScreenMessage(SM_User+14); ScreenTitleMenu::ScreenTitleMenu() { LOG->Trace( "ScreenTitleMenu::ScreenTitleMenu()" ); + if( PREFSMAN->m_bJointPremium ) { m_sprJointPremiumMsg.Load( THEME->GetPathTo("Graphics","joint premium scroll message") ); @@ -117,9 +118,9 @@ ScreenTitleMenu::ScreenTitleMenu() SOUNDMAN->PlayMusic( THEME->GetPathTo("Sounds","title menu music") ); this->SendScreenMessage( SM_PlayComment, SECONDS_BETWEEN_COMMENTS); - this->SendScreenMessage( SM_ScrollJointPremium, 1); this->MoveToTail( &(ScreenAttract::m_Fade) ); // put it in the back so it covers up the stuff we just added + this->SendScreenMessage( SM_ScrollJointPremium, 1); } ScreenTitleMenu::~ScreenTitleMenu() @@ -137,9 +138,17 @@ void ScreenTitleMenu::Input( const DeviceInput& DeviceI, const InputEventType ty if( DeviceI.device == DEVICE_KEYBOARD && DeviceI.button == SDLK_F3 ) { - /* Coin mode changed.. since this effects how this screen appears, the screen - is reloaded */ + /* Coin mode changed.. since this effects how this screen appears, JUST the + screen is just reloaded, not a reset as was before -- Miryokuteki */ (int&)PREFSMAN->m_CoinMode = (PREFSMAN->m_CoinMode+1) % PrefsManager::NUM_COIN_MODES; + CString sMessage = "Coin Mode: "; + switch( PREFSMAN->m_CoinMode ) + { + case PrefsManager::COIN_HOME: sMessage += "HOME"; break; + case PrefsManager::COIN_PAY: sMessage += "PAY"; break; + case PrefsManager::COIN_FREE: sMessage += "FREE"; break; + } + SCREENMAN->SystemMessage( sMessage ); SCREENMAN->RefreshCreditsMessages(); SCREENMAN->SetNewScreen("ScreenTitleMenu"); return; diff --git a/stepmania/src/ScreenTitleMenu.h b/stepmania/src/ScreenTitleMenu.h index b44f096df4..480a12fb8e 100644 --- a/stepmania/src/ScreenTitleMenu.h +++ b/stepmania/src/ScreenTitleMenu.h @@ -70,13 +70,13 @@ private: BitmapText m_textHelp; BitmapText m_textChoice[NUM_CHOICES]; + Sprite m_sprJointPremiumMsg; + RandomSample m_soundAttract; RandomSample m_soundChange; RandomSample m_soundSelect; RandomSample m_soundInvalid; - Sprite m_sprJointPremiumMsg; - RageTimer TimeToDemonstration; RageTimer TimeToJPScroll; }; diff --git a/stepmania/src/StepMania.cpp b/stepmania/src/StepMania.cpp index 5a9766bfce..a7d032329f 100644 --- a/stepmania/src/StepMania.cpp +++ b/stepmania/src/StepMania.cpp @@ -404,43 +404,60 @@ static void HandleInputEvents(float fDeltaTime) if( DeviceI.device == DEVICE_KEYBOARD && DeviceI.button == SDLK_NUMLOCK && type != IET_FIRST_PRESS ) continue; // skip - - - /* Global operator key.. like arcade, allows quick immediate access - to the adminstrative options panel. A global boolean has been - added to not allow this to function on system option screens, - or in the step editor. This will save the hassle of an "accidental - keystroke, and your edit is gone". -- Miryokuteki - */ - if( DeviceI.device == DEVICE_KEYBOARD && DeviceI.button == SDLK_SCROLLOCK ) - { - if( type != IET_FIRST_PRESS ) continue; - if( GAMESTATE->m_bIsOnSystemMenu ) continue; - SCREENMAN->SystemMessage("OPERATOR"); - SCREENMAN->SetNewScreen("ScreenOptionsMenu"); - continue; - } + + - // Global credit key.. accepts a credit anywhere, like the arcade -- Mirykouteki - if( DeviceI.device == DEVICE_KEYBOARD && DeviceI.button == SDLK_F1 && type == IET_FIRST_PRESS ) + /* Begin Global Key Support.. Any of these keys are configurable thru the normal + key/joy configuration screens */ + + if( type == IET_FIRST_PRESS ) // This only takes effect if the key is pressed once. { - switch( PREFSMAN->m_CoinMode ) + MenuInput MenuII; /* These are temporary holders to turn the device */ + GameInput GameII; /* input into a menu button for certain keys */ + INPUTMAPPER->DeviceToGame(DeviceI,GameII); + INPUTMAPPER->GameToMenu(GameII,MenuII); + + switch( MenuII.button ) { - case PrefsManager::COIN_FREE: - case PrefsManager::COIN_HOME: - case PrefsManager::COIN_PAY: - GAMESTATE->m_iCoins++; - SCREENMAN->RefreshCreditsMessages(); - SOUNDMAN->PlayOnce( THEME->GetPathTo("Sounds","insert coin") ); - break; - default: - ASSERT(0); + case MENU_BUTTON_OPERATOR: + /* Global operator key.. like arcade, allows quick immediate access + to the adminstrative options panel. A global boolean has been + added to not allow this to function on system option screens, + or in the step editor. This will save the hassle of an "accidental + keystroke, and your edit is gone". -- Miryokuteki + */ + if( !GAMESTATE->m_bIsOnSystemMenu ) + { + SCREENMAN->SystemMessage("OPERATOR"); + SCREENMAN->SetNewScreen("ScreenOptionsMenu"); + //continue; + return; + } + + + + + /* Global credit.. accepts anywhere, like the arcade -- Mirykouteki */ + case MENU_BUTTON_COIN: + switch( PREFSMAN->m_CoinMode ) + { + case PrefsManager::COIN_FREE: //fall thru + case PrefsManager::COIN_HOME: //fall thru + case PrefsManager::COIN_PAY: + GAMESTATE->m_iCoins++; + SCREENMAN->RefreshCreditsMessages(); + SOUNDMAN->PlayOnce( THEME->GetPathTo("Sounds","insert coin") ); + //continue; + break; + default: + ASSERT(0); + } } - /* Fall through, so screens will receive MenuCoin. */ - } - - + }/* end GKSD */ + + + if(DeviceI == DeviceInput(DEVICE_KEYBOARD, SDLK_F4)) { if(type != IET_FIRST_PRESS) continue; @@ -505,7 +522,7 @@ static void HandleInputEvents(float fDeltaTime) INPUTMAPPER->GameToMenu( GameI, MenuI ); INPUTMAPPER->GameToStyle( GameI, StyleI ); } - + SCREENMAN->Input( DeviceI, type, GameI, MenuI, StyleI ); } } @@ -583,5 +600,4 @@ static void GameLoop() else ::Sleep( 2 ); // give more time to other processes and threads, but not so much that we skip sound } -} - +} \ No newline at end of file diff --git a/stepmania/src/StepMania.dsp b/stepmania/src/StepMania.dsp index a9d886c93a..40afd6346a 100644 --- a/stepmania/src/StepMania.dsp +++ b/stepmania/src/StepMania.dsp @@ -57,10 +57,10 @@ LINK32=link.exe # SUBTRACT LINK32 /verbose /pdb:none # Begin Special Build Tool IntDir=.\../Release6 -TargetDir=\Program Files\GNU\WinCvs 1.2\stepmania +TargetDir=\stepmania TargetName=StepMania SOURCE="$(InputPath)" -PreLink_Cmds=disasm\verinc cl /Zl /nologo /c verstub.cpp /Fo$(IntDir)\ +PreLink_Cmds=disasm\verinc cl /Zl /nologo /c verstub.cpp /Fo$(IntDir)\ PostBuild_Cmds=disasm\mapconv $(IntDir)\$(TargetName).map $(TargetDir)\StepMania.vdi ia32.vdi # End Special Build Tool @@ -92,10 +92,10 @@ LINK32=link.exe # SUBTRACT LINK32 /verbose /profile /pdb:none /incremental:no /nodefaultlib # Begin Special Build Tool IntDir=.\../Debug6 -TargetDir=\Program Files\GNU\WinCvs 1.2\stepmania +TargetDir=\stepmania TargetName=StepMania-debug SOURCE="$(InputPath)" -PreLink_Cmds=disasm\verinc cl /Zl /nologo /c verstub.cpp /Fo$(IntDir)\ +PreLink_Cmds=disasm\verinc cl /Zl /nologo /c verstub.cpp /Fo$(IntDir)\ PostBuild_Cmds=disasm\mapconv $(IntDir)\$(TargetName).map $(TargetDir)\StepMania.vdi ia32.vdi # End Special Build Tool @@ -1537,6 +1537,10 @@ SOURCE=.\ScreenInstructions.h # End Source File # Begin Source File +SOURCE=.\ScreenIntroMovie.h +# End Source File +# Begin Source File + SOURCE=.\ScreenJukebox.cpp # End Source File # Begin Source File diff --git a/stepmania/src/StepMania.h b/stepmania/src/StepMania.h index 0b15d97c99..bb5c2ce556 100644 --- a/stepmania/src/StepMania.h +++ b/stepmania/src/StepMania.h @@ -11,7 +11,6 @@ ----------------------------------------------------------------------------- */ - void ApplyGraphicOptions(); void ExitGame(); void ResetGame();