Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 21 additions & 1 deletion code/mm.ld
Original file line number Diff line number Diff line change
Expand Up @@ -712,7 +712,27 @@ SECTIONS{
*(.patch_DisableExistingTrigger)
}

.patch_SwapStoredTradeItems 0x5A6b44 : {
.patch_FixOcarinaGearScreenDefault 0x5A5D74 : {
*(.patch_FixOcarinaGearScreenDefault)
}

.patch_FixOcarinaGearScreenDeku 0x5A5DA0 : {
*(.patch_FixOcarinaGearScreenDeku)
}

.patch_FixOcarinaGearScreenGoron 0x5A5DF0 : {
*(.patch_FixOcarinaGearScreenGoron)
}

.patch_FixOcarinaGearScreenZora 0x5A5E40 : {
*(.patch_FixOcarinaGearScreenZora)
}

.patch_FixOcarinaGearScreenZoraTwo 0x5A5E54 : {
*(.patch_FixOcarinaGearScreenZoraTwo)
}

.patch_SwapStoredTradeItems 0x5A6B44 : {
*(.patch_SwapStoredTradeItems)
}

Expand Down
35 changes: 35 additions & 0 deletions code/source/asm/ocarina_hooks.s
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,41 @@ ocarinaAnimationPatchFive:
cmp r0,#0x2
bx lr

.global hook_FixOcarinaGearScreenDefault
hook_FixOcarinaGearScreenDefault:
push {r1-r12, lr}
bl CheckIfOcarinaIsInInventory
pop {r1-r12, lr}
bx lr

.global hook_FixOcarinaGearScreenDeku
hook_FixOcarinaGearScreenDeku:
push {r1-r12, lr}
bl CheckIfOcarinaIsInInventory
pop {r1-r12, lr}
bx lr

.global hook_FixOcarinaGearScreenGoron
hook_FixOcarinaGearScreenGoron:
push {r1-r12, lr}
bl CheckIfOcarinaIsInInventory
pop {r1-r12, lr}
bx lr

.global hook_FixOcarinaGearScreenZora
hook_FixOcarinaGearScreenZora:
push {r1-r12, lr}
bl CheckIfOcarinaIsInInventory
pop {r1-r12, lr}
bx lr

.global hook_FixOcarinaGearScreenZoraTwo
hook_FixOcarinaGearScreenZoraTwo:
push {r1-r12, lr}
bl ZoraMaskCheck
pop {r1-r12, lr}
bx lr

.global hook_HandleOcarina
hook_HandleOcarina:
push {r0-r12, lr}
Expand Down
25 changes: 25 additions & 0 deletions code/source/asm/ocarina_patches.s
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,31 @@ patch_UpdateOcarinaVisibility:
patch_DmSktOcarinaAnimationPatchFive:
bl hook_DmSktOcarinaAnimationPatchFive

.section .patch_FixOcarinaGearScreenDefault
.global patch_FixOcarinaGearScreenDefault
patch_FixOcarinaGearScreenDefault:
bl hook_FixOcarinaGearScreenDefault

.section .patch_FixOcarinaGearScreenDeku
.global patch_FixOcarinaGearScreenDeku
patch_FixOcarinaGearScreenDeku:
bl hook_FixOcarinaGearScreenDeku

.section .patch_FixOcarinaGearScreenGoron
.global patch_FixOcarinaGearScreenGoron
patch_FixOcarinaGearScreenGoron:
bl hook_FixOcarinaGearScreenGoron

.section .patch_FixOcarinaGearScreenZora
.global patch_FixOcarinaGearScreenZora
patch_FixOcarinaGearScreenZora:
bl hook_FixOcarinaGearScreenZora

.section .patch_FixOcarinaGearScreenZoraTwo
.global patch_FixOcarinaGearScreenZoraTwo
patch_FixOcarinaGearScreenZoraTwo:
bl hook_FixOcarinaGearScreenZoraTwo

@ Adjusts ocarina songs to be in-line with restoration
.section .patch_HandleOcarinaHooks
.global patch_HandleOcarinaHooks
Expand Down