diff --git a/patches/ips/disable_major_glitches.ips b/patches/ips/disable_major_glitches.ips new file mode 100644 index 000000000..b8ee4068c Binary files /dev/null and b/patches/ips/disable_major_glitches.ips differ diff --git a/patches/ips/vanilla_bugfixes.ips b/patches/ips/vanilla_bugfixes.ips index 60cad8d5a..f6320ce4a 100644 Binary files a/patches/ips/vanilla_bugfixes.ips and b/patches/ips/vanilla_bugfixes.ips differ diff --git a/patches/src/disable_major_glitches.asm b/patches/src/disable_major_glitches.asm new file mode 100644 index 000000000..428151d0f --- /dev/null +++ b/patches/src/disable_major_glitches.asm @@ -0,0 +1,20 @@ +arch snes.cpu +lorom + +; This patch is a consolidation of the major glitches that were previously included in the vanilla_bugfixes.asm file. +; They are relocated here to make it easier to disable them while still keeping the other quality of life features. + + +;;; disable GT code +;org $aac91c +; bra $3f + +; the original patch only changed the conditional branch to a forced branch. +; we can skip loading the joypad input and meaningless comparission entirely. + +org $aac917 + rtl + +;;; disable spacetime beam select in pause menu +org $82b174 + ldx #$0001 \ No newline at end of file diff --git a/patches/src/vanilla_bugfixes.asm b/patches/src/vanilla_bugfixes.asm index c52864151..5192eb031 100644 --- a/patches/src/vanilla_bugfixes.asm +++ b/patches/src/vanilla_bugfixes.asm @@ -39,15 +39,7 @@ assert pc() <= $84871B ; just to make sure the next instruction isn't overwritte org $91b629 db $01 -;;; disable GT code -org $aac91c - bra $3f - ;;; Pause menu fixes : - -;;; disable spacetime beam select in pause menu -org $82b174 - ldx #$0001 ;;; fix screw attack select in pause menu org $82b4c4 cpx #$000c diff --git a/rust/data/presets/full-settings/Community Race Season 4.json b/rust/data/presets/full-settings/Community Race Season 4.json index 3d09ae3be..523578b58 100644 --- a/rust/data/presets/full-settings/Community Race Season 4.json +++ b/rust/data/presets/full-settings/Community Race Season 4.json @@ -4578,6 +4578,7 @@ "ultra_low_qol": false, "disable_spikesuit": false, "disable_bluesuit": false, + "enable_major_glitches": false, "race_mode": true, "random_seed": null }, diff --git a/rust/data/presets/full-settings/Default.json b/rust/data/presets/full-settings/Default.json index 29d014421..0e3b7e347 100644 --- a/rust/data/presets/full-settings/Default.json +++ b/rust/data/presets/full-settings/Default.json @@ -4578,6 +4578,7 @@ "energy_free_shinesparks": false, "disable_spikesuit": false, "disable_bluesuit": false, + "enable_major_glitches": false, "ultra_low_qol": false, "race_mode": false, "random_seed": null diff --git a/rust/maprando-web/templates/generate/game_variations.html b/rust/maprando-web/templates/generate/game_variations.html index 722947e34..002b95b83 100644 --- a/rust/maprando-web/templates/generate/game_variations.html +++ b/rust/maprando-web/templates/generate/game_variations.html @@ -1,4 +1,4 @@ -
+
{% include "help/variations/walljump.html" %} @@ -10,7 +10,7 @@
-
+
{% include "help/variations/area_assignment.html" %} @@ -30,7 +30,7 @@
-
+
{% include "help/variations/door_locks_size.html" %} @@ -42,7 +42,7 @@
-
+
{% include "help/variations/map_station_reveal.html" %} @@ -54,7 +54,7 @@
-
+
{% include "help/variations/energy_free_shinesparks.html" %} @@ -67,7 +67,7 @@
-
+
{% include "help/variations/disable_spikesuit.html" %} @@ -79,7 +79,7 @@
-
+
{% include "help/variations/disable_bluesuit.html" %} @@ -91,7 +91,19 @@
-
+
+
+ {% include "help/variations/enable_glitches.html" %} + +
+
+ + + + +
+
+
{% include "help/variations/ultra_low_qol.html" %} @@ -103,7 +115,7 @@
-
+
{% include "help/race.html" %} diff --git a/rust/maprando-web/templates/generate/help/variations/enable_glitches.html b/rust/maprando-web/templates/generate/help/variations/enable_glitches.html new file mode 100644 index 000000000..045045756 --- /dev/null +++ b/rust/maprando-web/templates/generate/help/variations/enable_glitches.html @@ -0,0 +1,33 @@ + + + + \ No newline at end of file diff --git a/rust/maprando-web/templates/generate/main.html b/rust/maprando-web/templates/generate/main.html index b71364fa7..d1dbb5805 100644 --- a/rust/maprando-web/templates/generate/main.html +++ b/rust/maprando-web/templates/generate/main.html @@ -264,7 +264,7 @@

Other options

-
+
{% include "game_variations.html" %}
diff --git a/rust/maprando-web/templates/generate/scripts.html b/rust/maprando-web/templates/generate/scripts.html index f6c6f8b29..41d4221c9 100644 --- a/rust/maprando-web/templates/generate/scripts.html +++ b/rust/maprando-web/templates/generate/scripts.html @@ -303,6 +303,7 @@ "random_seed": tryParseInt(formData.get("random_seed")), "disable_spikesuit": formData.get("disable_spike_suit") == "true", "disable_bluesuit": formData.get("disable_blue_suit") == "true", + "enable_major_glitches": formData.get("enable_major_glitches") == "true", } }; return settings; @@ -549,6 +550,7 @@ applyRadioValue("ultraLowQoL", other.ultra_low_qol); applyRadioValue("disableSpikesuit", other.disable_spikesuit); applyRadioValue("disableBluesuit", other.disable_bluesuit); + applyRadioValue("enableMajorGlitches", other.enable_major_glitches); applyRadioValue("raceMode", other.race_mode); document.getElementById("randomSeed").value = other.random_seed; } @@ -1095,12 +1097,22 @@ } function gameVariationChanged() { - if (document.getElementById("ultraLowQoLYes").checked) { - document.getElementById("qualityOfLifeOff").checked = true; - qualityOfLifePresetChanged(); + if (!document.getElementById("enableMajorGlitchesYes").checked) + { + document.getElementById("ultraLowQoLNo").checked = true; } fullSettingsChanged(); } + +function ultraLowQoLChanged() { + if (!document.getElementById("ultraLowQoLYes").checked) { + return; + } + document.getElementById("qualityOfLifeOff").checked = true; + document.getElementById("enableMajorGlitchesYes").checked = true; + qualityOfLifePresetChanged(); +} + function initializeSpoilerToken() { if (localStorage["spoilerToken"] === undefined) { let result = ''; diff --git a/rust/maprando/src/patch.rs b/rust/maprando/src/patch.rs index 8638cf7bc..47e1246bf 100644 --- a/rust/maprando/src/patch.rs +++ b/rust/maprando/src/patch.rs @@ -485,7 +485,6 @@ impl Patcher<'_> { "fix_kraid_hud", "escape_autosave", "boss_exit", - "oob_death", "load_plms_early", "spin_lock", "fix_transition_bad_tiles", @@ -578,11 +577,18 @@ impl Patcher<'_> { } if self.settings.other_settings.disable_spikesuit { - patches.push("remove_spikesuit") + patches.push("remove_spikesuit"); } if self.settings.other_settings.disable_bluesuit { - patches.push("remove_bluesuit") + patches.push("remove_bluesuit"); + } + + if !self.settings.other_settings.enable_major_glitches + && !self.settings.other_settings.ultra_low_qol + { + patches.push("disable_major_glitches"); + patches.push("oob_death"); } if self.settings.quality_of_life_settings.respin { diff --git a/rust/maprando/src/settings.rs b/rust/maprando/src/settings.rs index a247a70c8..a1e13a820 100644 --- a/rust/maprando/src/settings.rs +++ b/rust/maprando/src/settings.rs @@ -350,6 +350,7 @@ pub struct OtherSettings { pub ultra_low_qol: bool, pub disable_spikesuit: bool, pub disable_bluesuit: bool, + pub enable_major_glitches: bool, pub race_mode: bool, pub random_seed: Option, } @@ -919,6 +920,10 @@ fn upgrade_other_settings(settings: &mut serde_json::Value) -> Result<()> { other_settings.insert("disable_bluesuit".to_string(), false.into()); } + if other_settings.get("enable_major_glitches").is_none() { + other_settings.insert("enable_major_glitches".to_string(), false.into()); + } + Ok(()) } diff --git a/rust/maprando/tests/logic_scenarios.rs b/rust/maprando/tests/logic_scenarios.rs index 4c9c491c8..d7fd57d2f 100644 --- a/rust/maprando/tests/logic_scenarios.rs +++ b/rust/maprando/tests/logic_scenarios.rs @@ -254,6 +254,7 @@ fn get_settings(scenario: &Scenario) -> Result { energy_free_shinesparks: false, disable_bluesuit: false, disable_spikesuit: false, + enable_major_glitches: false, ultra_low_qol: false, race_mode: false, random_seed: None,