Add and implement all remaining axis inversion settings (#41)

* Add and implement all remaining axis inversion settings

* Improve third person inversion description, move enum

* Fix X axis inversion with analog camera

* formatting

* Remove boot map patch + fix newlines

* invert vanilla camera properly

* Fix comment

* add more comments

* fix demos and add wrapper functions

* rename analog camera mode to third person camera mode

* Fix first person Y inversion for demos (oops)

* Change phrasing

* reorder options
This commit is contained in:
Reonu
2026-01-04 23:07:29 +00:00
committed by GitHub
parent a0152024b2
commit c5ecd25a20
6 changed files with 298 additions and 34 deletions
+45 -28
View File
@@ -36,22 +36,6 @@ static void add_general_options(recomp::config::Config &config) {
note_saving_mode_options,
banjo::NoteSavingMode::On
);
static EnumOptionVector camera_invert_mode_options = {
{banjo::CameraInvertMode::InvertNone, "InvertNone", "None"},
{banjo::CameraInvertMode::InvertX, "InvertX", "Invert X"},
{banjo::CameraInvertMode::InvertY, "InvertY", "Invert Y"},
{banjo::CameraInvertMode::InvertBoth, "InvertBoth", "Invert Both"}
};
config.add_enum_option(
banjo::configkeys::general::camera_invert_mode,
"Aiming Camera Inverting",
// TODO: Update for banjo
"Inverts the camera controls. <recomp-color primary>Invert Y</recomp-color> is the default and matches the original game.",
camera_invert_mode_options,
banjo::CameraInvertMode::InvertY
);
static EnumOptionVector analog_cam_mode_options = {
{banjo::AnalogCamMode::Off, "Off", "Off"},
{banjo::AnalogCamMode::On, "On", "On"},
@@ -59,23 +43,48 @@ static void add_general_options(recomp::config::Config &config) {
config.add_enum_option(
banjo::configkeys::general::analog_cam_mode,
"Analog Camera",
// TODO: Update for banjo
"Enables the analog camera.",
analog_cam_mode_options,
banjo::AnalogCamMode::Off
);
static EnumOptionVector camera_invert_mode_options = {
{banjo::CameraInvertMode::InvertNone, "InvertNone", "None"},
{banjo::CameraInvertMode::InvertX, "InvertX", "Invert X"},
{banjo::CameraInvertMode::InvertY, "InvertY", "Invert Y"},
{banjo::CameraInvertMode::InvertBoth, "InvertBoth", "Invert Both"}
};
config.add_enum_option(
banjo::configkeys::general::analog_camera_invert_mode,
"Analog Camera Inverting",
// TODO: Update for banjo
"Inverts the camera controls for the analog camera if it's enabled. <recomp-color primary>None</recomp-color> is the default.",
banjo::configkeys::general::third_person_camera_invert_mode,
"Invert Camera",
"Inverts the camera controls for the third person camera if it's enabled. <recomp-color primary>Invert X</recomp-color> is the default and matches the original game.<br /><br />If analog camera is off, only the <recomp-color primary>Invert X</recomp-color> setting will take effect.",
camera_invert_mode_options,
banjo::CameraInvertMode::InvertNone
banjo::CameraInvertMode::InvertX
);
config.add_option_disable_dependency(
banjo::configkeys::general::analog_camera_invert_mode,
banjo::configkeys::general::analog_cam_mode,
banjo::AnalogCamMode::Off
static EnumOptionVector first_person_invert_mode_options = {
{banjo::CameraInvertMode::InvertNone, "InvertNone", "None"},
{banjo::CameraInvertMode::InvertX, "InvertX", "Invert X"},
{banjo::CameraInvertMode::InvertY, "InvertY", "Invert Y"},
{banjo::CameraInvertMode::InvertBoth, "InvertBoth", "Invert Both"}
};
config.add_enum_option(
banjo::configkeys::general::first_person_invert_mode,
"Invert First Person View",
"Inverts the camera controls in first person view. <recomp-color primary>Invert Y</recomp-color> is the default and matches the original game.",
first_person_invert_mode_options,
banjo::CameraInvertMode::InvertY
);
static EnumOptionVector flying_and_swimming_invert_options = {
{banjo::CameraInvertMode::InvertNone, "InvertNone", "None"},
{banjo::CameraInvertMode::InvertX, "InvertX", "Invert X"},
{banjo::CameraInvertMode::InvertY, "InvertY", "Invert Y"},
{banjo::CameraInvertMode::InvertBoth, "InvertBoth", "Invert Both"}
};
config.add_enum_option(
banjo::configkeys::general::flying_and_swimming_invert_mode,
"Invert Flying & Swimming",
"Inverts the controls for swimming and flying. <recomp-color primary>Invert Y</recomp-color> is the default and matches the original game.",
flying_and_swimming_invert_options,
banjo::CameraInvertMode::InvertY
);
}
@@ -92,8 +101,16 @@ banjo::CameraInvertMode banjo::get_camera_invert_mode() {
return get_general_config_enum_value<banjo::CameraInvertMode>(banjo::configkeys::general::camera_invert_mode);
}
banjo::CameraInvertMode banjo::get_analog_camera_invert_mode() {
return get_general_config_enum_value<banjo::CameraInvertMode>(banjo::configkeys::general::analog_camera_invert_mode);
banjo::CameraInvertMode banjo::get_third_person_camera_mode() {
return get_general_config_enum_value<banjo::CameraInvertMode>(banjo::configkeys::general::third_person_camera_invert_mode);
}
banjo::CameraInvertMode banjo::get_flying_and_swimming_invert_mode() {
return get_general_config_enum_value<banjo::CameraInvertMode>(banjo::configkeys::general::flying_and_swimming_invert_mode);
}
banjo::CameraInvertMode banjo::get_first_person_invert_mode() {
return get_general_config_enum_value<banjo::CameraInvertMode>(banjo::configkeys::general::first_person_invert_mode);
}
banjo::AnalogCamMode banjo::get_analog_cam_mode() {