From cbd539eb3d34b6be3df54ea414b77130cc225b3c Mon Sep 17 00:00:00 2001 From: JosJuice Date: Sat, 12 Sep 2015 22:45:06 +0200 Subject: [PATCH] Use official names for GameCube controller sticks Main Stick is changed to Control Stick and C-Stick is changed to C Stick. A new ui_name variable is added to ControlGroup so that the UI strings in DolphinWX can be updated without breaking backwards compatibility with config INIs and other things that use names as IDs. --- Data/Sys/GameSettings/GAFE01.ini | 8 ++++---- Data/Sys/GameSettings/GALE01r0.ini | 4 ++-- Data/Sys/GameSettings/GALE01r1.ini | 4 ++-- Data/Sys/GameSettings/GALE01r2.ini | 16 +++++++-------- Data/Sys/GameSettings/GALP01.ini | 2 +- Data/Sys/GameSettings/GAUE08.ini | 16 +++++++-------- .../app/src/main/res/values-ja/strings.xml | 20 +++++++++---------- .../app/src/main/res/values/strings.xml | 8 ++++---- Source/Core/Core/HW/GCPadEmu.cpp | 12 +++++------ Source/Core/DolphinWX/InputConfigDiag.cpp | 2 +- Source/Core/InputCommon/ControllerEmu.cpp | 6 +++++- Source/Core/InputCommon/ControllerEmu.h | 7 ++++++- 12 files changed, 57 insertions(+), 48 deletions(-) diff --git a/Data/Sys/GameSettings/GAFE01.ini b/Data/Sys/GameSettings/GAFE01.ini index 069b9b3e83..4a89878d74 100644 --- a/Data/Sys/GameSettings/GAFE01.ini +++ b/Data/Sys/GameSettings/GAFE01.ini @@ -167,7 +167,7 @@ $NES Balloon Fight - P2 Infinite Lives (donny2112) $NES Clu Clu Land - P1 Infinite Lives (donny2112) 01527EEE 08000000 01659020 00000009 -$NES Clu Clu Land - Max out Clock (C-stick Right) (donny2112) +$NES Clu Clu Land - Max out Clock (C Stick Right) (donny2112) 01523F59 08000000 BD2F5408 00010000 03658FCE 00000999 @@ -175,7 +175,7 @@ BD2F5408 00010000 $NES Clu Clu Land D - P1 Infinite Lives (donny2112) 01527EEE 08000000 01659020 00000009 -$NES Clu Clu Land D - Max out Clock (C-stick Right) (donny2112) +$NES Clu Clu Land D - Max out Clock (C Stick Right) (donny2112) 01526C12 08000000 BD2F5408 00010000 03658FC6 00000999 @@ -183,7 +183,7 @@ BD2F5408 00010000 $NES Donkey Kong - P1 Infinite Lives (donny2112) 01523F81 08000000 01658FF5 00000009 -$NES Donkey Kong - Jump to get Hammer (Hold A+C-stick Right) (donny2112) +$NES Donkey Kong - Jump to get Hammer (Hold A + C Stick Right) (donny2112) 015246D9 08000000 BD2F5408 00810000 01659040 00000001 @@ -237,7 +237,7 @@ $NES Legend of Zelda - Have Magical Shield (donny2112) $NES Legend of Zelda - Max Hearts/Invincibility (donny2112) 01521605 08000000 0165960F 000000FF -$NES Legend of Zelda - Freeze Enemies (C-stick Left) (donny2112) +$NES Legend of Zelda - Freeze Enemies (C Stick Left) (donny2112) 01527C62 08000000 BD2F5408 00020000 0165960C 00000001 diff --git a/Data/Sys/GameSettings/GALE01r0.ini b/Data/Sys/GameSettings/GALE01r0.ini index 68c453a52e..154cbe80a3 100644 --- a/Data/Sys/GameSettings/GALE01r0.ini +++ b/Data/Sys/GameSettings/GALE01r0.ini @@ -319,10 +319,10 @@ C225910C 00000025 C022C9E8 00000000 # Gameplay Codes -$Normal C-Stick Functionality in Singleplayer Modes [Zauron] +$Normal C Stick Functionality in Singleplayer Modes [Zauron] 0416AB64 60000000 -$Normal C-Stick Functionality in Develop Mode [Magus, Achilles] +$Normal C Stick Functionality in Develop Mode [Magus, Achilles] *Does not work with Nana 0406AD38 38000000 04030024 38000000 diff --git a/Data/Sys/GameSettings/GALE01r1.ini b/Data/Sys/GameSettings/GALE01r1.ini index 723d0eaed3..356d94b040 100644 --- a/Data/Sys/GameSettings/GALE01r1.ini +++ b/Data/Sys/GameSettings/GALE01r1.ini @@ -40,10 +40,10 @@ $Spoof Controller Plugins (P4) [Achilles] 04375F24 38000001 # Gameplay Codes -$Normal C-Stick Functionality in Singleplayer Modes [Zauron, Standardtoaster] +$Normal C Stick Functionality in Singleplayer Modes [Zauron, Standardtoaster] 0416B18C 60000000 -$Normal C-Stick Functionality in Develop Mode [Magus, Achilles] +$Normal C Stick Functionality in Develop Mode [Magus, Achilles] *Does not work with Nana 0406AE48 38000000 040300A4 38000000 diff --git a/Data/Sys/GameSettings/GALE01r2.ini b/Data/Sys/GameSettings/GALE01r2.ini index 8c8bedab9f..f2ea4743e3 100644 --- a/Data/Sys/GameSettings/GALE01r2.ini +++ b/Data/Sys/GameSettings/GALE01r2.ini @@ -20,7 +20,7 @@ $Boot to Character Select [Dan Salvato] $Debug Menu 0422D638 38000006 -$C-Stick in Single Player [Zauron] +$C Stick in Single Player [Zauron] 0416B480 60000000 $Disable Peach's Castle Bullets [Zauron] @@ -144,11 +144,11 @@ $True Special Message Delete [JMC47] [Gecko] # General Codes $Netplay Community Settings -*Boot to CSS, unlock everything, 4 stock 8 min friendly fire on, trophy messages off, -*L+R+A+Start during stage load returns to CSS, name tags don't reset on close or exit, -*L-cancel % on results screen, normal c-stick functionality in 1P modes, -*Stage striking, A+B salty runback, unrestricted pause camera, c-stick pause camera translation, -*Normal c-stick functionality in develop mode, debug menu access and set to English, +*Boot to CSS, unlock everything, 4 stock 8 minute friendly fire on, trophy messages off, +*L+R+A+Start during stage load returns to CSS, name tags don't reset on close or exit, +*L-cancel % on results screen, normal C Stick functionality in 1P modes, +*Stage striking, A+B salty runback, unrestricted pause camera, C Stick pause camera translation, +*Normal C Stick functionality in develop mode, debug menu access and set to English, *Universal debug menu control, leaving debug menu loads CSS, 20XXTE neutral spawns 0445BF28 FFFFFFFF 0445BF2C FFFFFFFF @@ -543,10 +543,10 @@ C223C5A0 0000000F 60000000 00000000 # Gameplay Codes -$Normal C-Stick Functionality in Singleplayer Modes [Zauron] +$Normal C Stick Functionality in Singleplayer Modes [Zauron] 0416B480 60000000 -$Normal C-Stick Functionality in Develop Mode [Magus, Achilles] +$Normal C Stick Functionality in Develop Mode [Magus, Achilles] *Does not work with Nana 0406AE90 38000000 040300A4 38000000 diff --git a/Data/Sys/GameSettings/GALP01.ini b/Data/Sys/GameSettings/GALP01.ini index 2a877ee231..d0116b449a 100644 --- a/Data/Sys/GameSettings/GALP01.ini +++ b/Data/Sys/GameSettings/GALP01.ini @@ -222,7 +222,7 @@ C225AEF4 00000025 C022CA40 00000000 # Gameplay Codes -$Normal C-Stick Functionality in Singleplayer Modes [Zauron] +$Normal C Stick Functionality in Singleplayer Modes [Zauron] 0416BE50 60000000 $Skip Result Screen & KO Star Count Equals Placement [Sham Rock] diff --git a/Data/Sys/GameSettings/GAUE08.ini b/Data/Sys/GameSettings/GAUE08.ini index 4e0bed3aad..caaf608444 100644 --- a/Data/Sys/GameSettings/GAUE08.ini +++ b/Data/Sys/GameSettings/GAUE08.ini @@ -31,28 +31,28 @@ $No 4th+ Places $No Top Speed/No Shifting Needed 3A1EA826 00000020 04205CC0 00000000 -$C-Stick Sends Car 1 Back To Start +$C Stick Sends Car 1 Back To Start 3A1EA826 00000080 00206704 00000000 -$C-Stick Sends Car 2 Back To Start +$C Stick Sends Car 2 Back To Start 3A1EA826 00000080 00207264 00000000 -$C-Stick Sends Car 3 Back To Start +$C Stick Sends Car 3 Back To Start 3A1EA826 00000080 00207DC4 00000000 -$C-Stick Sends Car 4 Back To Start +$C Stick Sends Car 4 Back To Start 3A1EA826 00000080 00208924 00000000 -$C-Stick Sends Car 5 Back To Start +$C Stick Sends Car 5 Back To Start 3A1EA826 00000080 00209484 00000000 -$C-Stick Sends Car 6 Back To Start +$C Stick Sends Car 6 Back To Start 3A1EA826 00000080 00209FE4 00000000 -$C-Stick Sends Car 7 Back To Start +$C Stick Sends Car 7 Back To Start 3A1EA826 00000080 0020AB44 00000000 -$C-Stick Sends All Car Back To Start +$C Stick Sends All Cars Back To Start 7A1EA826 00000080 00000000 80206704 00000000 00070B60 diff --git a/Source/Android/app/src/main/res/values-ja/strings.xml b/Source/Android/app/src/main/res/values-ja/strings.xml index 59e72d1819..10efaf6a2e 100644 --- a/Source/Android/app/src/main/res/values-ja/strings.xml +++ b/Source/Android/app/src/main/res/values-ja/strings.xml @@ -94,20 +94,20 @@ Xボタン Yボタン Zボタン - D-Pad: ↑ - D-Pad: ↓ - D-Pad: ← - D-Pad: → + 十字キー: ↑ + 十字キー: ↓ + 十字キー: ← + 十字キー: → コントロールスティック: ↑ コントロールスティック: ↓ コントロールスティック: ← コントロールスティック: → - C-スティック: ↑ - C-スティック: ↓ - C-スティック: ← - C-スティック: → - 左のトリガー - 右のトリガー + Cスティック: ↑ + Cスティック: ↓ + Cスティック: ← + Cスティック: → + Lトリガー + Rトリガー ボタン1 ボタン2 diff --git a/Source/Android/app/src/main/res/values/strings.xml b/Source/Android/app/src/main/res/values/strings.xml index 284615b63d..a6f004d4d3 100644 --- a/Source/Android/app/src/main/res/values/strings.xml +++ b/Source/Android/app/src/main/res/values/strings.xml @@ -100,10 +100,10 @@ D-Pad Down D-Pad Left D-Pad Right - Main Stick Up - Main Stick Down - Main Stick Left - Main Stick Right + Control Stick Up + Control Stick Down + Control Stick Left + Control Stick Right C Stick Up C Stick Down C Stick Left diff --git a/Source/Core/Core/HW/GCPadEmu.cpp b/Source/Core/Core/HW/GCPadEmu.cpp index ff760c1310..ae1b993510 100644 --- a/Source/Core/Core/HW/GCPadEmu.cpp +++ b/Source/Core/Core/HW/GCPadEmu.cpp @@ -60,8 +60,8 @@ GCPad::GCPad(const unsigned int index) : m_index(index) m_buttons->controls.emplace_back(new ControlGroup::Input(named_buttons[i])); // sticks - groups.emplace_back(m_main_stick = new AnalogStick(_trans("Main Stick"), DEFAULT_PAD_STICK_RADIUS)); - groups.emplace_back(m_c_stick = new AnalogStick(_trans("C-Stick"), DEFAULT_PAD_STICK_RADIUS)); + groups.emplace_back(m_main_stick = new AnalogStick("Main Stick", _trans("Control Stick"), DEFAULT_PAD_STICK_RADIUS)); + groups.emplace_back(m_c_stick = new AnalogStick("C-Stick", _trans("C Stick"), DEFAULT_PAD_STICK_RADIUS)); // triggers groups.emplace_back(m_triggers = new MixedTriggers(_trans("Triggers"))); @@ -151,7 +151,7 @@ void GCPad::LoadDefaults(const ControllerInterface& ciface) set_control(m_dpad, 2, "F"); // Left set_control(m_dpad, 3, "H"); // Right - // C-Stick + // C Stick set_control(m_c_stick, 0, "I"); // Up set_control(m_c_stick, 1, "K"); // Down set_control(m_c_stick, 2, "J"); // Left @@ -159,7 +159,7 @@ void GCPad::LoadDefaults(const ControllerInterface& ciface) #ifdef _WIN32 set_control(m_c_stick, 4, "LCONTROL"); // Modifier - // Main Stick + // Control Stick set_control(m_main_stick, 0, "UP"); // Up set_control(m_main_stick, 1, "DOWN"); // Down set_control(m_main_stick, 2, "LEFT"); // Left @@ -169,7 +169,7 @@ void GCPad::LoadDefaults(const ControllerInterface& ciface) #elif __APPLE__ set_control(m_c_stick, 4, "Left Control"); // Modifier - // Main Stick + // Control Stick set_control(m_main_stick, 0, "Up Arrow"); // Up set_control(m_main_stick, 1, "Down Arrow"); // Down set_control(m_main_stick, 2, "Left Arrow"); // Left @@ -180,7 +180,7 @@ void GCPad::LoadDefaults(const ControllerInterface& ciface) set_control(m_c_stick, 4, "Control_L"); // Modifier - // Main Stick + // Control Stick set_control(m_main_stick, 0, "Up"); // Up set_control(m_main_stick, 1, "Down"); // Down set_control(m_main_stick, 2, "Left"); // Left diff --git a/Source/Core/DolphinWX/InputConfigDiag.cpp b/Source/Core/DolphinWX/InputConfigDiag.cpp index 4101dcdbf5..b42e944512 100644 --- a/Source/Core/DolphinWX/InputConfigDiag.cpp +++ b/Source/Core/DolphinWX/InputConfigDiag.cpp @@ -946,7 +946,7 @@ ControlGroupsSizer::ControlGroupsSizer(ControllerEmu* const controller, wxWindow { ControlGroupBox* control_group_box = new ControlGroupBox(group.get(), parent, eventsink); wxStaticBoxSizer *control_group = - new wxStaticBoxSizer(wxVERTICAL, parent, wxGetTranslation(StrToWxStr(group->name))); + new wxStaticBoxSizer(wxVERTICAL, parent, wxGetTranslation(StrToWxStr(group->ui_name))); control_group->Add(control_group_box); const size_t grp_size = group->controls.size() + group->settings.size(); diff --git a/Source/Core/InputCommon/ControllerEmu.cpp b/Source/Core/InputCommon/ControllerEmu.cpp index f1d33c65c3..a95da19100 100644 --- a/Source/Core/InputCommon/ControllerEmu.cpp +++ b/Source/Core/InputCommon/ControllerEmu.cpp @@ -143,7 +143,11 @@ void ControllerEmu::SaveConfig(IniFile::Section *sec, const std::string& base) } ControllerEmu::AnalogStick::AnalogStick(const char* const _name, ControlState default_radius) - : ControlGroup(_name, GROUP_TYPE_STICK) + : AnalogStick(_name, _name, GROUP_TYPE_STICK) +{} + +ControllerEmu::AnalogStick::AnalogStick(const char* const _name, const char* const _ui_name, ControlState default_radius) + : ControlGroup(_name, _ui_name, GROUP_TYPE_STICK) { for (auto& named_direction : named_directions) controls.emplace_back(new Input(named_direction)); diff --git a/Source/Core/InputCommon/ControllerEmu.h b/Source/Core/InputCommon/ControllerEmu.h index a7ee642252..db6e23f636 100644 --- a/Source/Core/InputCommon/ControllerEmu.h +++ b/Source/Core/InputCommon/ControllerEmu.h @@ -145,13 +145,17 @@ public: } }; - ControlGroup(const std::string& _name, const unsigned int _type = GROUP_TYPE_OTHER) : name(_name), type(_type) {} + ControlGroup(const std::string& _name, const unsigned int _type = GROUP_TYPE_OTHER) + : name(_name), ui_name(_name), type(_type) {} + ControlGroup(const std::string& _name, const std::string& _ui_name, const unsigned int _type = GROUP_TYPE_OTHER) + : name(_name), ui_name(_ui_name), type(_type) {} virtual ~ControlGroup() {} virtual void LoadConfig(IniFile::Section *sec, const std::string& defdev = "", const std::string& base = "" ); virtual void SaveConfig(IniFile::Section *sec, const std::string& defdev = "", const std::string& base = "" ); const std::string name; + const std::string ui_name; const unsigned int type; std::vector> controls; @@ -164,6 +168,7 @@ public: public: // The GameCube controller and Wiimote attachments have a different default radius AnalogStick(const char* const _name, ControlState default_radius); + AnalogStick(const char* const _name, const char* const _ui_name, ControlState default_radius); void GetState(ControlState* const x, ControlState* const y) {