diff --git a/hammerChargeDistance.hks b/hammerChargeDistance.hks new file mode 100644 index 0000000..ef3d187 --- /dev/null +++ b/hammerChargeDistance.hks @@ -0,0 +1,5 @@ +HammerChargeDistance: + type: branch + link: true + func: NormaliseHammerCharge + addr: 0x008b84d0 diff --git a/normaliseCameraSpeed.s b/normaliseCameraSpeed.s index 4366290..30b662a 100644 --- a/normaliseCameraSpeed.s +++ b/normaliseCameraSpeed.s @@ -4,9 +4,9 @@ .global NormaliseCameraSpeed NormaliseCameraSpeed: fmuls s0, s1, s3 - ldr r0, =0x8119d90 - ldr r0, [r0] - ldr r0, [r0,#0x14] + ldr r0, =0x8119d90 + ldr r0, [r0] + ldr r0, [r0,#0x14] fmsr s4, r0 mov r0, #0x40000000 fmsr s5, r0 diff --git a/normaliseHammerCharge.s b/normaliseHammerCharge.s new file mode 100644 index 0000000..a0d0c89 --- /dev/null +++ b/normaliseHammerCharge.s @@ -0,0 +1,20 @@ +.text +.align 4 + +.global NormaliseHammerCharge +NormaliseHammerCharge: + ldr r0, =0x8119d90 + ldr r0, [r0] + ldr r0, [r0,#0x14] + fmsr s12, r0 + mov r0, #0x40000000 + fmsr s13, r0 + fdivs s12, s12, s13 + flds s0, [sp] + fmuls s0, s0, s12 + fsts s0, [sp] + flds s0, [sp,#8] + fmuls s0, s0, s12 + fsts s0, [sp,#8] + ldr r0, [r5] + bx lr