Skip to content
Open
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,518 changes: 762 additions & 756 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,447 changes: 725 additions & 722 deletions ASM/build/c_symbols.txt

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions ASM/ootSymbols.ld
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,10 @@ Flags_SetTempClear = 0x800206AC;
Flags_UnsetTempClear = 0x800206C8;
Flags_GetCollectible = 0x800206E8;
Flags_SetCollectible = 0x8002071C;
Actor_GetScreenPos = 0x80022b14;
Actor_SetColorFilter = 0x80027090;
CutsceneFlags_Get = 0x8005991C;
Math_Vec3f_Yaw = 0x80063f00;
z64_Gfx_SetupDL_42Opa = 0x8007E868;
Audio_StopCurrentMusic = 0x800C7684;
sprintf = 0x800CE7b4;
Expand Down
1 change: 1 addition & 0 deletions ASM/src/build.asm
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ RANDO_CONTEXT:
.include "en_dns.asm"
.include "bg_gate_shutter.asm"
.include "big_poe.asm"
.include "enkz_updatetalkingyawfix.asm"
.include "player_laddercutscenefix.asm"

.align 0x10
Expand Down
57 changes: 57 additions & 0 deletions ASM/src/enkz_updatetalkingyawfix.asm
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
EnKz_UpdateTalkingYawFix:
addiu sp,sp,-24
sw ra,16(sp)
; First check if KZ is talking, if so update talkstate -> return
lw t9,80(sp) ; talkstate pointer
lh t0,0(t9) ; talkstate
lw t9,92(sp) ; updateTalkState function
beqz t0,@@CheckYaw ; if talkstate not idle, update talkstate
move a0,s1 ; play

jalr t9
move a1,s0 ; actor
lw t9,80(sp) ; talkstate pointer
sh v0,0(t9) ; save returned talkstate
b @@Return
move v0,zero ; don't continue caller function

; Else check KZ-player yaw and if OK, set attention enabled flag + run GetScreenPos
@@CheckYaw:
addiu a0,s0,8 ; actor home pos
lw t0,7236(s1) ; player address (s1 play)
jal Math_Vec3f_Yaw ; get yaw
addiu a1,t0,36 ; player world pos

mtc1 v0,$f4 ; yaw result from function
cvt.s.w $f4,$f4
lh t7,182(s0) ; actor shape rot
mtc1 t7,$f8
cvt.s.w $f8,$f8
sub.s $f0,$f4,$f8 ; yaw - shaperot y
abs.s $f0,$f0 ; absolute value of difference
lui at,0x44e3 ; 1820.0f
addiu at,0x8000
mtc1 at,$f2
c.lt.s $f2,$f0
bc1f @@SetAttention ; if yaw diff < 1820, set attention enabled flag
lw t1,4(s0) ; actor flags
li at,-2 ; else, unset attention enabled actor flag
and t1,t1,at
sw t1,4(s0)
b @@Return
move v0,zero ; don't continue caller function

@@SetAttention:
ori t1,t1,1
sw t1,4(s0) ; save set attention flag
li v0,1 ; continue caller function
addiu a3,sp,64 ; displaced, 40 + extra 24
addiu a2,sp,66 ; displaced, 42 + extra
move a1,s0 ; displaced
jal Actor_GetScreenPos
move a0,s1

@@Return:
lw ra,16(sp)
jr ra
addiu sp,sp,24
35 changes: 35 additions & 0 deletions ASM/src/hacks/ovl_en_kz.asm
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,38 @@
; sw t2, 0x180(a1)
jal kz_reset_trade_flag
sh r0, 0x1d0(a1) ; Replaced code

;================================================================================
; Prevent King Zora from stopping talking if moving out of angle when starting
;================================================================================
; Moved upstateTalkState call + yaw check function
; Replaces: move a1,s0
; addiu a2,sp,42
; jal Actor_GetScreenPos
; addiu a3,sp,40
.org 0x80ad6188 ; in EnKz_UpdateTalking
jal EnKz_UpdateTalkingYawFix
nop
beqz v0,0x80ad6254 ; don't continue function if talking
nop

; Skip previous updateTalkState call
.org 0x80ad61cc ; in EnKz_UpdateTalking
b 0x80ad61f4
nop

; Removing previous yaw check function, but
; need to retain some instructions for future calls
.org 0x80ad6284 ; in func_80A9CB18
b 0x80ad6298
nop
.skip 12
lw t0,7236(s1) ; 0x80ad6298, s1 play
sw t0,44(sp) ; player address
lui at,0x80ad ; ok to keep
move a1,s0 ; actor
addiu a2,s0,464 ; talkstate
lwc1 $f16,28936(at) ; ok to keep
.skip 12 ; passing on the stack
b 0x80ad62f8 ; continue after what previously was yaw check
lui a3,0x43aa ; 340.0f
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
Loading