From 9886b279a3b3f41756d4f7777d76b53e84d22329 Mon Sep 17 00:00:00 2001 From: Phlex <3514085+PhlexPlexico@users.noreply.github.com> Date: Tue, 8 Sep 2026 16:50:48 -0600 Subject: [PATCH] feat: Include In-Game Option menu during save creation. --- Z3DR | 2 +- source/include/setting_descriptions.hpp | 9 +++++++- source/include/settings.hpp | 7 ++++++ source/setting_descriptions.cpp | 18 ++++++++++++++- source/settings.cpp | 29 +++++++++++++++++++++++++ 5 files changed, 62 insertions(+), 3 deletions(-) diff --git a/Z3DR b/Z3DR index 19dbafc..82c0c77 160000 --- a/Z3DR +++ b/Z3DR @@ -1 +1 @@ -Subproject commit 19dbafc96d52e0e4023caed57186969a49bcc9d9 +Subproject commit 82c0c773bcb9c69664c20cb1b8f67a1ca9902fe3 diff --git a/source/include/setting_descriptions.hpp b/source/include/setting_descriptions.hpp index 15ed4ce..63e73c4 100644 --- a/source/include/setting_descriptions.hpp +++ b/source/include/setting_descriptions.hpp @@ -242,4 +242,11 @@ extern string_view startingSwordGildedDesc; extern string_view startingShieldNoneDesc; extern string_view startingShieldHerosDesc; extern string_view startingShieldMirrorDesc; -extern string_view showPostmanItemDesc; \ No newline at end of file +extern string_view showPostmanItemDesc; + +extern string_view ingameLTargetingDesc; +extern string_view ingameFirstPersonCameraDesc; +extern string_view ingameFreeCameraDesc; +extern string_view ingameMotionControlsDesc; +extern string_view ingameSwimmingControlsDesc; +extern string_view ingameAdjustVolumeDesc; \ No newline at end of file diff --git a/source/include/settings.hpp b/source/include/settings.hpp index 6f8384b..9864a7d 100644 --- a/source/include/settings.hpp +++ b/source/include/settings.hpp @@ -570,6 +570,13 @@ namespace Settings { //Custom Buttons extern Menu customInputs; extern std::vector customButtons; + extern Option IngameLTargeting; + extern Option IngameFirstPersonCamera; + extern Option IngameFreeCamera; + extern Option IngameMotionControls; + extern Option IngameSwimmingControls; + extern Option IngameAdjustVolume; + extern Option CustomMapButton; extern Option CustomItemsButton; extern Option CustomMasksButton; diff --git a/source/setting_descriptions.cpp b/source/setting_descriptions.cpp index e9220c1..9b5813f 100644 --- a/source/setting_descriptions.cpp +++ b/source/setting_descriptions.cpp @@ -662,4 +662,20 @@ string_view startingShieldMirrorDesc = "Start with the Mirror Shield.\n" ------------------------------*/ // string_view showPostmanItemDesc = "Visually shows the reward for the \n" // "Postman's Freedom quest line \n" // - "above the Postman's head."; // \ No newline at end of file + "above the Postman's head."; // + +/*------------------------------ +| IN-GAME OPTIONS | +------------------------------*/ +string_view ingameLTargetingDesc = "Sets the L-Targeting mode on a new file.\n" // + "\"Vanilla\" is the game's default."; // +string_view ingameFirstPersonCameraDesc = "Sets the first person camera's inversion on a\n"// + "new file. \"Vanilla\" is the game's default."; // +string_view ingameFreeCameraDesc = "Sets the free camera's inversion on a new\n" // + "file. \"Vanilla\" is the game's default."; // +string_view ingameMotionControlsDesc = "Enables or disables motion controls on a new\n" // + "file. \"Vanilla\" is the game's default."; // +string_view ingameSwimmingControlsDesc = "Sets the Zora swimming control scheme on a new\n"// + "file. \"Vanilla\" is the game's default."; // +string_view ingameAdjustVolumeDesc = "Sets the overall volume on a new file.\n" // + "\"Vanilla\" is the game's default."; // diff --git a/source/settings.cpp b/source/settings.cpp index e55e283..80559b2 100644 --- a/source/settings.cpp +++ b/source/settings.cpp @@ -494,6 +494,26 @@ namespace Settings { Option BombchusInLogic = Option::U8("Bombchus In Logic", { "Off", "On" }, { bombchuInLogicDesc }); Option FastMasks = Option::Bool("Fast Mask Transform", {"No", "Yes"}, {fastMaskDesc}); Option NotebookAnimations = Option::Bool("Fast Notebook", {"No", "Yes"}, {disableBotebookAnimation}); + // In-game options written into CommonDataSub1 when a new file is created. Index 0 is + // "Vanilla" throughout, which leaves the game's own default in place -- only the Adjust + // Volume encoding (0 Lower / 1 Normal / 2 Higher) is confirmed against the save data, so the + // rest are opt-in rather than applied silently. + Option IngameLTargeting = Option::U8("L-Targeting", {"Vanilla", "Switch", "Hold"}, {ingameLTargetingDesc}); + Option IngameFirstPersonCamera = Option::U8("First Person Camera", {"Vanilla", "Normal", "Invert Y Axis", "Invert X Axis", "Invert Both"}, {ingameFirstPersonCameraDesc}); + Option IngameFreeCamera = Option::U8("Free Camera", {"Vanilla", "Normal", "Invert Y Axis", "Invert X Axis", "Invert Both"}, {ingameFreeCameraDesc}); + Option IngameMotionControls = Option::U8("Motion Controls", {"Vanilla", "On", "Off"}, {ingameMotionControlsDesc}); + Option IngameSwimmingControls = Option::U8("Swimming Controls", {"Vanilla", "Normal", "Invert Y Axis"}, {ingameSwimmingControlsDesc}); + Option IngameAdjustVolume = Option::U8("Adjust Volume", {"Vanilla", "Lower", "Normal", "Higher"}, {ingameAdjustVolumeDesc}); + + std::vector ingameOptions = { + &IngameLTargeting, + &IngameFirstPersonCamera, + &IngameFreeCamera, + &IngameMotionControls, + &IngameSwimmingControls, + &IngameAdjustVolume, + }; + std::vector comfortOptions = { &BlastMaskCooldown, @@ -707,6 +727,7 @@ namespace Settings { //Menu mainSettings = Menu::SubMenu("Main Settings", &mainSettingsOptions); Menu comfort = Menu::SubMenu("Comfort Settings", &comfortOptions); + Menu ingameOptionsMenu = Menu::SubMenu("In-Game Options", &ingameOptions); Menu restorationSettings = Menu::SubMenu("Restoration Settings", &restorationOptions); Menu cutsceneSettings = Menu::SubMenu("Cutscene Settings", &cutsceneOptions); Menu settingsPresets = Menu::SubMenu("Settings Presets", &settingsPresetItems); @@ -733,6 +754,7 @@ namespace Settings { &cutsceneSettings, &otherSettings, &customInputs, + &ingameOptionsMenu, &cosmetics, &settingsPresets, &generateRandomizer, @@ -868,6 +890,13 @@ namespace Settings { ctx.startingLightArrows = StartingLightArrows.Value(); ctx.startingLensOfTruth = StartingLensOfTruth.Value(); ctx.startingMagicBean = StartingMagicBean.Value(); + + ctx.ingameLTargeting = IngameLTargeting.Value(); + ctx.ingameFirstPersonCamera = IngameFirstPersonCamera.Value(); + ctx.ingameFreeCamera = IngameFreeCamera.Value(); + ctx.ingameMotionControls = IngameMotionControls.Value(); + ctx.ingameSwimmingControls = IngameSwimmingControls.Value(); + ctx.ingameAdjustVolume = IngameAdjustVolume.Value(); ctx.startingPowderKeg = StartingPowderKeg.Value(); ctx.startingPictographBox = StartingPictographBox.Value(); ctx.startingGreatFairySword = StartingGreatFairySword.Value();