summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdrian Graber <adrian@adriangraber.com>2021-07-06 18:05:21 +0200
committerAdrian Graber <adrian@adriangraber.com>2021-07-13 00:50:49 +0200
commita99a04ed49fe5cea1eb8292d9ffeefb40d10ac82 (patch)
tree250193cb6499602010e8501b8d0f563f29e455a7
parentFix WINDOWS -> WIN32 on cmake (diff)
downloadre3-a99a04ed49fe5cea1eb8292d9ffeefb40d10ac82.tar
re3-a99a04ed49fe5cea1eb8292d9ffeefb40d10ac82.tar.gz
re3-a99a04ed49fe5cea1eb8292d9ffeefb40d10ac82.tar.bz2
re3-a99a04ed49fe5cea1eb8292d9ffeefb40d10ac82.tar.lz
re3-a99a04ed49fe5cea1eb8292d9ffeefb40d10ac82.tar.xz
re3-a99a04ed49fe5cea1eb8292d9ffeefb40d10ac82.tar.zst
re3-a99a04ed49fe5cea1eb8292d9ffeefb40d10ac82.zip
-rw-r--r--gamefiles/TEXT/american.gxtbin220642 -> 220708 bytes
-rw-r--r--gamefiles/TEXT/french.gxtbin246616 -> 246682 bytes
-rw-r--r--gamefiles/TEXT/german.gxtbin242680 -> 242746 bytes
-rw-r--r--gamefiles/TEXT/italian.gxtbin242050 -> 242116 bytes
-rwxr-xr-xgamefiles/TEXT/polish.gxtbin241682 -> 241748 bytes
-rw-r--r--gamefiles/TEXT/russian.gxtbin222468 -> 222534 bytes
-rw-r--r--gamefiles/TEXT/spanish.gxtbin235614 -> 235676 bytes
-rw-r--r--gamefiles/models/frontend_nsw.txdbin0 -> 2360104 bytes
-rw-r--r--gamefiles/models/nswbtns.txdbin0 -> 528424 bytes
-rw-r--r--src/core/ControllerConfig.cpp14
-rw-r--r--src/core/Frontend.cpp20
-rw-r--r--src/core/Frontend.h1
-rw-r--r--src/core/MenuScreensCustom.cpp4
-rw-r--r--utils/gxt/american.txt3
-rw-r--r--utils/gxt/french.txt3
-rw-r--r--utils/gxt/german.txt3
-rw-r--r--utils/gxt/italian.txt3
-rwxr-xr-xutils/gxt/polish.txt3
-rw-r--r--utils/gxt/russian.txt3
-rw-r--r--utils/gxt/spanish.txt3
20 files changed, 58 insertions, 2 deletions
diff --git a/gamefiles/TEXT/american.gxt b/gamefiles/TEXT/american.gxt
index d4034411..d7b7c956 100644
--- a/gamefiles/TEXT/american.gxt
+++ b/gamefiles/TEXT/american.gxt
Binary files differ
diff --git a/gamefiles/TEXT/french.gxt b/gamefiles/TEXT/french.gxt
index 16c7a716..3dece994 100644
--- a/gamefiles/TEXT/french.gxt
+++ b/gamefiles/TEXT/french.gxt
Binary files differ
diff --git a/gamefiles/TEXT/german.gxt b/gamefiles/TEXT/german.gxt
index c3309d61..7f25bd05 100644
--- a/gamefiles/TEXT/german.gxt
+++ b/gamefiles/TEXT/german.gxt
Binary files differ
diff --git a/gamefiles/TEXT/italian.gxt b/gamefiles/TEXT/italian.gxt
index b30b74f4..5a060a9a 100644
--- a/gamefiles/TEXT/italian.gxt
+++ b/gamefiles/TEXT/italian.gxt
Binary files differ
diff --git a/gamefiles/TEXT/polish.gxt b/gamefiles/TEXT/polish.gxt
index d771427b..782f656d 100755
--- a/gamefiles/TEXT/polish.gxt
+++ b/gamefiles/TEXT/polish.gxt
Binary files differ
diff --git a/gamefiles/TEXT/russian.gxt b/gamefiles/TEXT/russian.gxt
index 0075c691..914f5b52 100644
--- a/gamefiles/TEXT/russian.gxt
+++ b/gamefiles/TEXT/russian.gxt
Binary files differ
diff --git a/gamefiles/TEXT/spanish.gxt b/gamefiles/TEXT/spanish.gxt
index 8980eb4d..cb884689 100644
--- a/gamefiles/TEXT/spanish.gxt
+++ b/gamefiles/TEXT/spanish.gxt
Binary files differ
diff --git a/gamefiles/models/frontend_nsw.txd b/gamefiles/models/frontend_nsw.txd
new file mode 100644
index 00000000..1379a1a7
--- /dev/null
+++ b/gamefiles/models/frontend_nsw.txd
Binary files differ
diff --git a/gamefiles/models/nswbtns.txd b/gamefiles/models/nswbtns.txd
new file mode 100644
index 00000000..0b1756ee
--- /dev/null
+++ b/gamefiles/models/nswbtns.txd
Binary files differ
diff --git a/src/core/ControllerConfig.cpp b/src/core/ControllerConfig.cpp
index e72af7e4..8775792f 100644
--- a/src/core/ControllerConfig.cpp
+++ b/src/core/ControllerConfig.cpp
@@ -2644,6 +2644,14 @@ const char *PlayStationButtons[][MAX_CONTROLLERACTIONS] =
#undef PS2_CROSS
#undef PS2_SQUARE
+const char *NintendoSwitchButtons_noIcons[][MAX_CONTROLLERACTIONS] =
+ CONTROLLER_BUTTONS("Y", "A", "B", "X", "L", "ZL", "LS", "R", "ZR", "RS", "BACK");
+
+#ifdef BUTTON_ICONS
+const char *NintendoSwitchButtons[][MAX_CONTROLLERACTIONS] =
+ CONTROLLER_BUTTONS("~T~", "~O~", "~X~", "~Q~", "~K~", "~M~", "~A~", "~J~", "~V~", "~C~", "BACK");
+#endif
+
#undef CONTROLLER_BUTTONS
#undef VFB
@@ -2664,6 +2672,9 @@ void CControllerConfigManager::GetWideStringOfCommandKeys(uint16 action, wchar *
case CMenuManager::CONTROLLER_DUALSHOCK4:
Buttons = CFont::ButtonsSlot != -1 ? PlayStationButtons : PlayStationButtons_noIcons;
break;
+ case CMenuManager::CONTROLLER_NINTENDO_SWITCH:
+ Buttons = CFont::ButtonsSlot != -1 ? NintendoSwitchButtons : NintendoSwitchButtons_noIcons;
+ break;
default:
#endif
Buttons = CFont::ButtonsSlot != -1 ? XboxButtons : XboxButtons_noIcons;
@@ -2679,6 +2690,9 @@ void CControllerConfigManager::GetWideStringOfCommandKeys(uint16 action, wchar *
case CMenuManager::CONTROLLER_DUALSHOCK4:
Buttons = PlayStationButtons_noIcons;
break;
+ case CMenuManager::CONTROLLER_NINTENDO_SWITCH:
+ Buttons = NintendoSwitchButtons_noIcons;
+ break;
default:
Buttons = XboxButtons_noIcons;
break;
diff --git a/src/core/Frontend.cpp b/src/core/Frontend.cpp
index ecb893b4..0f4218a4 100644
--- a/src/core/Frontend.cpp
+++ b/src/core/Frontend.cpp
@@ -142,8 +142,12 @@ int8 CMenuManager::m_PrefsIslandLoading = ISLAND_LOADING_LOW;
#endif
#ifdef GAMEPAD_MENU
+#ifdef __SWITCH__
+int8 CMenuManager::m_PrefsControllerType = CONTROLLER_NINTENDO_SWITCH;
+#else
int8 CMenuManager::m_PrefsControllerType = CONTROLLER_XBOXONE;
#endif
+#endif
int32 CMenuManager::OS_Language = LANG_ENGLISH;
int8 CMenuManager::m_PrefsUseVibration;
@@ -3674,6 +3678,7 @@ const char* controllerTypesPaths[] = {
"MODELS/FRONTEND_DS4.TXD",
"MODELS/FRONTEND_X360.TXD",
"MODELS/FRONTEND_XONE.TXD",
+ "MODELS/FRONTEND_NSW.TXD",
};
void
@@ -3686,6 +3691,9 @@ CMenuManager::LoadController(int8 type)
case CONTROLLER_DUALSHOCK4:
CFont::LoadButtons("MODELS/PS3BTNS.TXD");
break;
+ case CONTROLLER_NINTENDO_SWITCH:
+ CFont::LoadButtons("MODELS/NSWBTNS.TXD");
+ break;
default:
CFont::LoadButtons("MODELS/X360BTNS.TXD");
break;
@@ -5928,6 +5936,18 @@ CMenuManager::PrintController(void)
TEXT_L2R2_Y += 5.0f;
TEXT_SELECT_X += 3.0f;
break;
+ case CONTROLLER_NINTENDO_SWITCH:
+ TEXT_L1_Y += 5.0f;
+ TEXT_L1_Y_VEH = TEXT_L1_Y;
+ TEXT_R1_Y += 5.0f;
+ TEXT_TRIANGLE_Y += 3.0f;
+ TEXT_CIRCLE_Y += 3.0f;
+ TEXT_CROSS_Y += 3.0f;
+ TEXT_LSTICK_Y -= 23.0f;
+ TEXT_DPAD_Y += 25.0;
+ TEXT_RSTICK_Y += 1.0f;
+ TEXT_R3_Y += 1.0f;
+ break;
};
if (m_DisplayControllerOnFoot) {
diff --git a/src/core/Frontend.h b/src/core/Frontend.h
index 32e5ef9d..6e6c40f7 100644
--- a/src/core/Frontend.h
+++ b/src/core/Frontend.h
@@ -760,6 +760,7 @@ public:
CONTROLLER_DUALSHOCK4,
CONTROLLER_XBOX360,
CONTROLLER_XBOXONE,
+ CONTROLLER_NINTENDO_SWITCH,
};
static int8 m_PrefsControllerType;
diff --git a/src/core/MenuScreensCustom.cpp b/src/core/MenuScreensCustom.cpp
index 5b0fd60c..586b51fa 100644
--- a/src/core/MenuScreensCustom.cpp
+++ b/src/core/MenuScreensCustom.cpp
@@ -388,7 +388,7 @@ void DetectJoystickGoBack() {
#endif
#ifdef GAMEPAD_MENU
-const char* controllerTypes[] = { "FEC_DS2", "FEC_DS3", "FEC_DS4", "FEC_360", "FEC_ONE" };
+const char* controllerTypes[] = { "FEC_DS2", "FEC_DS3", "FEC_DS4", "FEC_360", "FEC_ONE", "FEC_NSW" };
void ControllerTypeAfterChange(int8 before, int8 after)
{
FrontEndMenuManager.LoadController(after);
@@ -889,7 +889,7 @@ CMenuScreenCustom aScreens[MENUPAGES] = {
{ "FET_GFX", MENUPAGE_OPTIONS, MENUPAGE_OPTIONS,
new CCustomScreenLayout({MENUSPRITE_MAINMENU, 50, 0, 20, FONT_HEADING, FESCREEN_LEFT_ALIGN, true, MEDIUMTEXT_X_SCALE, MEDIUMTEXT_Y_SCALE}), GraphicsGoBack,
-#ifdef GTA_HANDHELD
+#ifndef GTA_HANDHELD
MENUACTION_SCREENRES, "FED_RES", { nil, SAVESLOT_NONE, MENUPAGE_GRAPHICS_SETTINGS },
#endif
MENUACTION_WIDESCREEN, "FED_WIS", { nil, SAVESLOT_NONE, MENUPAGE_GRAPHICS_SETTINGS },
diff --git a/utils/gxt/american.txt b/utils/gxt/american.txt
index d8f79f05..57ec4d74 100644
--- a/utils/gxt/american.txt
+++ b/utils/gxt/american.txt
@@ -8061,6 +8061,9 @@ XBOX 360 CONTROLLER
[FEC_ONE]
XBOX ONE CONTROLLER
+[FEC_NSW]
+NINTENDO SWITCH CONTROLLER
+
[FEC_TYP]
GAMEPAD TYPE
diff --git a/utils/gxt/french.txt b/utils/gxt/french.txt
index bd4acf96..bdb12c7b 100644
--- a/utils/gxt/french.txt
+++ b/utils/gxt/french.txt
@@ -8329,6 +8329,9 @@ XBOX 360 CONTROLLER
[FEC_ONE]
XBOX ONE CONTROLLER
+[FEC_NSW]
+NINTENDO SWITCH CONTROLLER
+
[FEC_TYP]
GAMEPAD TYPE
diff --git a/utils/gxt/german.txt b/utils/gxt/german.txt
index 5f5c53c4..b77cb17c 100644
--- a/utils/gxt/german.txt
+++ b/utils/gxt/german.txt
@@ -8146,6 +8146,9 @@ XBOX 360 CONTROLLER
[FEC_ONE]
XBOX ONE CONTROLLER
+[FEC_NSW]
+NINTENDO SWITCH CONTROLLER
+
[FEC_TYP]
GAMEPAD-TYP
diff --git a/utils/gxt/italian.txt b/utils/gxt/italian.txt
index 803b7fbf..9dfee85c 100644
--- a/utils/gxt/italian.txt
+++ b/utils/gxt/italian.txt
@@ -8158,6 +8158,9 @@ XBOX 360 CONTROLLER
[FEC_ONE]
XBOX ONE CONTROLLER
+[FEC_NSW]
+NINTENDO SWITCH CONTROLLER
+
[FEC_TYP]
GAMEPAD TYPE
diff --git a/utils/gxt/polish.txt b/utils/gxt/polish.txt
index 33716291..98d373ef 100755
--- a/utils/gxt/polish.txt
+++ b/utils/gxt/polish.txt
@@ -8067,6 +8067,9 @@ XBOX 360 CONTROLLER
[FEC_ONE]
XBOX ONE CONTROLLER
+[FEC_NSW]
+NINTENDO SWITCH CONTROLLER
+
[FEC_TYP]
GAMEPAD TYPE
diff --git a/utils/gxt/russian.txt b/utils/gxt/russian.txt
index 221e59f5..3b42bb21 100644
--- a/utils/gxt/russian.txt
+++ b/utils/gxt/russian.txt
@@ -8069,6 +8069,9 @@ DUALSHOCK 4
[FEC_ONE]
КОНТРОЛЛЕР XBOX ONE
+[FEC_NSW]
+КОНТРОЛЛЕР NINTENDO SWITCH
+
[FEC_TYP]
ГЕЙМПАД
diff --git a/utils/gxt/spanish.txt b/utils/gxt/spanish.txt
index 5f108d3b..2775d342 100644
--- a/utils/gxt/spanish.txt
+++ b/utils/gxt/spanish.txt
@@ -8128,6 +8128,9 @@ MANDO DE XBOX 360
[FEC_ONE]
MANDO DE XBOX ONE
+[FEC_NSW]
+MANDO DE NINTENDO SWITCH
+
[FEC_TYP]
TIPO DE MANDO