Skip to content

Commit cd07412

Browse files
committed
Camera oscillation code
Signed-off-by: Isaac Marovitz <isaacryu@icloud.com>
1 parent 28fd65e commit cd07412

3 files changed

Lines changed: 15 additions & 0 deletions

File tree

MarathonRecomp/patches/misc_patches.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,3 +84,12 @@ void ContextualHUD_RING_1(PPCRegister& index, PPCRegister& hud)
8484
auto chr_index = PPC_LOAD_U32(hud.u32 + 0x78);
8585
index.u32 = chr_index;
8686
}
87+
88+
void PostureDisableEdgeGrabLeftover(PPCRegister& posture) {
89+
if (!Config::DisableEdgeGrabLeftover) {
90+
return;
91+
}
92+
93+
auto base = g_memory.base;
94+
*(volatile uint8_t*)(base + (posture.u32 + 0x3C0)) = 1;
95+
}

MarathonRecomp/user/config_def.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,5 +82,6 @@ CONFIG_DEFINE_HIDDEN("Codes", bool, SkipIntroLogos, false);
8282
CONFIG_DEFINE_HIDDEN("Codes", bool, UseOfficialTitleOnTitleBar, false);
8383
CONFIG_DEFINE_HIDDEN("Codes", bool, DisableLowResolutionFontOnCustomUI, false);
8484
CONFIG_DEFINE_HIDDEN("Codes", bool, RestoreHUDColors, false);
85+
CONFIG_DEFINE_HIDDEN("Codes", bool, DisableEdgeGrabLeftover, false);
8586

8687
CONFIG_DEFINE("Update", time_t, LastChecked, 0);

MarathonRecompLib/config/Marathon.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,3 +148,8 @@ registers = ["r5", "r31"]
148148
name = "ContextualHUD_RING_1"
149149
address = 0x824DEB38
150150
registers = ["r5", "r31"]
151+
152+
[[midasm_hook]]
153+
name = "PostureDisableEdgeGrabLeftover"
154+
address = 0x82200568
155+
registers = ["r31"]

0 commit comments

Comments
 (0)