c24b7f15cb
build / build (push) Successful in 2m14s
Add a player_controls config group that maps game actions to controller inputs, and a Controller Options menu tab to rebind them in-headset. - 45 actions: movement, click/double-click, jump, fire, and the engine's own keyboard hotkeys (posture, save/load, weapon/MFD select, etc.), sent to the engine as synthetic key events. Cheat and dead hotkeys are not exposed. - Press-to-capture rebinding with per-input exclusivity, Reset to Defaults (built-in defaults, then questshock.config.default.json), and new defaults: left stick moves/strafes, right stick turns. - Controller profiles for Touch, Vive and generic OpenXR (res/controller_profiles/), matched to the active interaction profile at runtime, with a fatal dialog if a profile's bindings are rejected at startup. - The menu's thumbstick locomotion is disabled while the Controller Options tab is open or a capture is active. A scrollable list with a tap-to-jump scroll bar handles the long action list. - Opening the menu pauses a running game and resumes it on close. - Reset Position now keeps the player's facing instead of turning the screen to the current gaze. - Play the intro video in the game's language (engine patch 23), falling back to English. - Watchdog and shared-key handling for stuck movement keys, plus key-edge logging.
43 lines
1.3 KiB
Diff
43 lines
1.3 KiB
Diff
--- a/src/GameSrc/cutsloop.c
|
|
+++ b/src/GameSrc/cutsloop.c
|
|
@@ -292,11 +292,38 @@
|
|
|
|
|
|
|
|
+#ifdef __ANDROID__
|
|
+// The intro (cutscene 0) ships in one file per language - localized
|
|
+// voice-over - each holding the same resource id (cutscene_anims[0]), so
|
|
+// opening the current language's file instead is all it takes. The death
|
|
+// and ending cutscenes only have one version.
|
|
+static char *intro_files_by_language[3] =
|
|
+{
|
|
+ "res/data/svgaintr.res", // English
|
|
+ "res/data/svfrintr.res", // French
|
|
+ "res/data/svgeintr.res" // German
|
|
+};
|
|
+
|
|
+static int open_cutscene_file(int id)
|
|
+{
|
|
+ if (id == 0 && which_lang > 0 && which_lang < 3)
|
|
+ {
|
|
+ int handle = ResOpenFile(intro_files_by_language[(int)which_lang]);
|
|
+ if (handle > 0)
|
|
+ return handle;
|
|
+ // Not installed for this language - fall back to English below.
|
|
+ }
|
|
+ return ResOpenFile(cutscene_files[id]);
|
|
+}
|
|
+#else
|
|
+#define open_cutscene_file(id) ResOpenFile(cutscene_files[id])
|
|
+#endif
|
|
+
|
|
short play_cutscene(int id, bool show_credits)
|
|
{
|
|
MacTuneKillCurrentTheme();
|
|
|
|
- cutscene_filehandle = ResOpenFile(cutscene_files[id]);
|
|
+ cutscene_filehandle = open_cutscene_file(id);
|
|
if (cutscene_filehandle <= 0) {
|
|
// If we failed to play the cutscene, go to setup / credits.
|
|
_new_mode = SETUP_LOOP;
|