From 2b2e3f17acff4e4a66df70cbfe66cd09ad6a84bf Mon Sep 17 00:00:00 2001 From: Crementif <26669564+Crementif@users.noreply.github.com> Date: Tue, 18 Apr 2023 03:15:12 +0200 Subject: [PATCH] [BotW] Fix mastercycle charged boost in FPS++ Previously it wasn't possible to rev your mastercycle to get a charged speed boost. Should be fixed now! --- .../Mods/FPS++/patch_Cutscene.asm | 4 ++-- .../Mods/FPS++/patch_GameSpeed.asm | 6 +++--- .../Mods/FPS++/patch_MastercycleSpeed.asm | 17 +++++++++++++++++ 3 files changed, 22 insertions(+), 5 deletions(-) create mode 100644 src/BreathOfTheWild/Mods/FPS++/patch_MastercycleSpeed.asm diff --git a/src/BreathOfTheWild/Mods/FPS++/patch_Cutscene.asm b/src/BreathOfTheWild/Mods/FPS++/patch_Cutscene.asm index 788ee733..51e51355 100644 --- a/src/BreathOfTheWild/Mods/FPS++/patch_Cutscene.asm +++ b/src/BreathOfTheWild/Mods/FPS++/patch_Cutscene.asm @@ -183,8 +183,8 @@ fmuls f12, f7, f12 ; Subtract the time that it took for the actual frame to render and make sure that it's not negative (which means a frame already took longer to render then the FPS limit) fsubs f12, f12, f10 -lis r12, const_0.0@ha -lfs f7, const_0.0@l(r12) +lis r11, const_0.0@ha +lfs f7, const_0.0@l(r11) fcmpu cr0, f7, f12 ble .+0x8 fmr f12, f7 diff --git a/src/BreathOfTheWild/Mods/FPS++/patch_GameSpeed.asm b/src/BreathOfTheWild/Mods/FPS++/patch_GameSpeed.asm index 0d649159..539ca750 100644 --- a/src/BreathOfTheWild/Mods/FPS++/patch_GameSpeed.asm +++ b/src/BreathOfTheWild/Mods/FPS++/patch_GameSpeed.asm @@ -11,13 +11,13 @@ const_0.0: const_0.5: .float 0.5 const_1: -.float 1 +.float 1.0 const_1.5: .float 1.5 const_30: -.float 30 +.float 30.0 const_60: -.float 60 +.float 60.0 timerTickSpeed: busSpeed: diff --git a/src/BreathOfTheWild/Mods/FPS++/patch_MastercycleSpeed.asm b/src/BreathOfTheWild/Mods/FPS++/patch_MastercycleSpeed.asm new file mode 100644 index 00000000..f23c6593 --- /dev/null +++ b/src/BreathOfTheWild/Mods/FPS++/patch_MastercycleSpeed.asm @@ -0,0 +1,17 @@ +[BotW_MastercycleSpeed_V208] +moduleMatches = 0x6267BFD0 + +.origin = codecave + +0x100136B4 = originalMotorcycleBoostSpeed: + + +_changeMotorcycleBoostSpeed: +lfs f0, originalMotorcycleBoostSpeed@l(r9) +lis r9, averageFPS1@ha +lfs f8, averageFPS1@l(r9) +fdivs f0, f0, f8 +blr + + +0x0209FFC0 = bla _changeMotorcycleBoostSpeed \ No newline at end of file