Skip to content

Commit b3fe6a3

Browse files
authored
Fix Tropical Jungle swing logs at HFR (#154)
1 parent 16b62a7 commit b3fe6a3

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

MarathonRecomp/patches/fps_patches.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,3 +81,8 @@ PPC_FUNC(sub_8232D770)
8181
}
8282
while (pTarzanPoint->m_Time >= deltaTime);
8383
}
84+
85+
void ObjEspSwing_DecayRateFix(PPCRegister& f0, PPCRegister& f13, PPCRegister& deltaTime)
86+
{
87+
f0.f64 = float(f13.f64 * pow(pow(f0.f64, 60.0), deltaTime.f64));
88+
}

MarathonRecompLib/config/Marathon.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -433,3 +433,9 @@ after_instruction = true
433433
name = "ObjTarzan_PatchDeltaTimeArgument"
434434
address = 0x8232D818
435435
registers = ["f3", "r4", "r1"]
436+
437+
[[midasm_hook]]
438+
name = "ObjEspSwing_DecayRateFix"
439+
address = 0x8232A4D0
440+
registers = ["f0", "f13", "f28"]
441+
jump_address = 0x8232A4D4

0 commit comments

Comments
 (0)