Skip to content
Draft
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
1,508 changes: 755 additions & 753 deletions ASM/build/asm_symbols.txt

Large diffs are not rendered by default.

Binary file modified ASM/build/bundle.o
Binary file not shown.
1,445 changes: 723 additions & 722 deletions ASM/build/c_symbols.txt

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions ASM/src/build.asm
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ RANDO_CONTEXT:
.include "bg_gate_shutter.asm"
.include "big_poe.asm"
.include "player_ladder_cutscene.asm"
.include "play_clearcamera.asm"

.align 0x10
.importobj "../build/bundle.o"
Expand Down
1 change: 1 addition & 0 deletions ASM/src/hacks.asm
Original file line number Diff line number Diff line change
Expand Up @@ -4162,3 +4162,4 @@ DemoEffect_DrawJewel_AfterHook:
.include "hacks/ovl_en_okarina_tag.asm"
.include "hacks/sound.asm"
.include "hacks/z_player.asm"
.include "hacks/z_play.asm"
22 changes: 22 additions & 0 deletions ASM/src/hacks/z_play.asm
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
.headersize (0x80114dd0 - 0x00b8ad30)

;================================================================================
; Fixes crashing when too many subcameras spawn, because the main camera pointer
; gets set to NULL (Spirit Temple mirror room etc)
;================================================================================
; Replaces sll a1,a1,0x10
; sra a1,a1,0x10
; sw ra,20(sp)
; move a2,a0
; li at,-1
; bne a1,at,8009d248 (branch if camId not -1/NONE)
; sll v0,a1,0x10

.org 0x8009d238 ; in Play_ClearCamera
sw ra,20(sp)
jal Play_ClearCameraAvoidMain
move a2,a0 ; displaced
beq t0,at,0x8009d274 ; camId MAIN, skip to end function
nop
beq t0,at,0x8009d248 ; not MAIN/NONE, remove pointer
nop
17 changes: 17 additions & 0 deletions ASM/src/play_clearcamera.asm
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
Play_ClearCameraAvoidMain: ; camId a1 (-1 = NONE, 0 = MAIN)
sll a1,a1,0x10 ; displaced
sra a1,a1,0x10 ; displaced
li at,-1 ; displaced
li t0,0 ; return value because v0 is in use

beq a1,at,@@Return ; If camId = NONE, just continue as usual
sll v0,a1,0x10 ; displaced
li at,1 ; for beq in caller
beqzl a1,@@Return ; If camId = MAIN, skip to end and don't set pointer null
li t0,1
li at,2 ; for beq in caller
b @@Return ; If not MAIN/NONE, remove pointer
li t0,2
@@Return:
jr ra
nop
2 changes: 1 addition & 1 deletion data/generated/patch_symbols.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading