From 229679c350effcc83aa6b4d1d419fef7697fb3af Mon Sep 17 00:00:00 2001 From: Kemal Fadillah Date: Mon, 23 Aug 2021 00:50:03 -0700 Subject: [PATCH] feat(patches): Adds some basic patches --- cameraUpdate.hks | 5 +++++ changeSeed.s | 8 ++++++++ changeTable.hks | 5 +++++ fixLanceStaminaDrain.hks | 4 ++++ normaliseCameraSpeed.s | 15 +++++++++++++++ 5 files changed, 37 insertions(+) create mode 100644 cameraUpdate.hks create mode 100644 changeSeed.s create mode 100644 changeTable.hks create mode 100644 fixLanceStaminaDrain.hks create mode 100644 normaliseCameraSpeed.s diff --git a/cameraUpdate.hks b/cameraUpdate.hks new file mode 100644 index 0000000..ab111ca --- /dev/null +++ b/cameraUpdate.hks @@ -0,0 +1,5 @@ +UpdateCamera: + type: branch + link: true + func: NormaliseCameraSpeed + addr: 0x00267230 diff --git a/changeSeed.s b/changeSeed.s new file mode 100644 index 0000000..2fa2b59 --- /dev/null +++ b/changeSeed.s @@ -0,0 +1,8 @@ +.text +.align 4 + +.global ChangeSeed +ChangeSeed: + ldrh r2, [r2] + add r2, #0x2 + bx lr diff --git a/changeTable.hks b/changeTable.hks new file mode 100644 index 0000000..4a62bf1 --- /dev/null +++ b/changeTable.hks @@ -0,0 +1,5 @@ +LoadSeed: + type: branch + link: true + func: ChangeSeed + addr: 0x002C0278 diff --git a/fixLanceStaminaDrain.hks b/fixLanceStaminaDrain.hks new file mode 100644 index 0000000..ad3c161 --- /dev/null +++ b/fixLanceStaminaDrain.hks @@ -0,0 +1,4 @@ +DashAttackParam: + type: patch + data: 0x0 + addr: 0x008B9AC8 diff --git a/normaliseCameraSpeed.s b/normaliseCameraSpeed.s new file mode 100644 index 0000000..4366290 --- /dev/null +++ b/normaliseCameraSpeed.s @@ -0,0 +1,15 @@ +.text +.align 4 + +.global NormaliseCameraSpeed +NormaliseCameraSpeed: + fmuls s0, s1, s3 + ldr r0, =0x8119d90 + ldr r0, [r0] + ldr r0, [r0,#0x14] + fmsr s4, r0 + mov r0, #0x40000000 + fmsr s5, r0 + fdivs s4, s4, s5 + fmuls s0, s0, s4 + bx lr