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,909 changes: 955 additions & 954 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,446 changes: 724 additions & 722 deletions ASM/build/c_symbols.txt

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions ASM/ootSymbols.ld
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ Flags_UnsetTempClear = 0x800206C8;
Flags_GetCollectible = 0x800206E8;
Flags_SetCollectible = 0x8002071C;
Actor_SetColorFilter = 0x80027090;
Actor_Kill = 0x80020eb4;
CutsceneFlags_Get = 0x8005991C;
z64_Gfx_SetupDL_42Opa = 0x8007E868;
Audio_StopCurrentMusic = 0x800C7684;
Expand Down
89 changes: 35 additions & 54 deletions ASM/src/bigocto.asm
Original file line number Diff line number Diff line change
@@ -1,66 +1,47 @@
drop_ruto:
addiu sp, sp, -0x30
sw ra, 0x14(sp)
sw t0, 0x18(sp)
sw t1, 0x1C(sp)
sw t2, 0x20(sp)
sw t3, 0x24(sp)
sw t4, 0x28(sp)
sw t5, 0x2C(sp)
JabuObjects_DropRutoBigOcto:
la t0, SAVE_CONTEXT
lh t1, 0x0F20(t0) ;infTable+0x28
andi t1, t1, 0x0040 ;big octo visited bit
beqz t1, @@return ;return if flag is not set
lh t0, 0x0F20(t0) ; infTable+0x28
andi t0, t0, 0x0040 ; Big Octo visited bit
beqz t0, @@return ; return if flag is not set
li t2, 0xA1 ; Ruto actor ID (fill delay slot)

la t0, PLAYER_ACTOR
lw t1, 0x039C(t0) ;held actor
beqz t1, @@return ;return if held actor is null
li t2, 0xA1 ;ruto ID
lh t3, 0x00(t1) ;held actor ID
bne t2, t3, @@return ;return if ruto isnt the held actor
li t4, 0xFFFFF7FF ;held actor state flag bitmask
lw t5, 0x066C(t0) ;state flags 1
lw t1, 0x039C(t0) ; held actor
beqz t1, @@return ; return if held actor is null
li t4, 0xFFFFF7FF ; held actor state flag bitmask (fill delay slot)

lh t3, (t1) ; held actor ID
bne t2, t3, @@return ; return if Ruto isn't the held actor
lw t5, 0x066C(t0) ; player stateFlags1
and t5, t4, t5
sw t5, 0x066C(t0) ;unset held actor state flag
sw r0, 0x039C(t0) ;null held actor
sw r0, 0x011C(t0) ;null link attachedB
sw r0, 0x0118(t1) ;null ruto attachedA
sw t5, 0x066C(t0) ; unset held actor state flag
sw r0, 0x039C(t0) ; null held actor
sw r0, 0x011C(t0) ; null player child
sw r0, 0x0118(t1) ; null Ruto parent
@@return:
sw t5, 0x2C(sp)
sw t4, 0x28(sp)
sw t3, 0x24(sp)
sw t2, 0x20(sp)
sw t1, 0x1C(sp)
sw t0, 0x18(sp)
sw ra, 0x14(sp)
lh t6, 0x1C(s0) ;displaced
jr ra
addiu sp, sp, 0x30
addiu a0, a0, -29472 ; displaced

check_kill_demoeffect:
addiu sp, sp, -0x30
sw ra, 0x14(sp)
sw t0, 0x18(sp)
sw t1, 0x1C(sp)
sw t2, 0x20(sp)
lh t0, 0xA4(a1) ;current scene
li t1, 0x02 ;jabu
DemoEffect_KillAfterBigOcto:
addiu sp, sp, -24
lh v0, 0x1C(s0) ; displaced
lh t0, 0xA4(a1) ; current scene
li t1, 0x2 ; Jabu scene ID
bne t0, t1, @@return
li t2, 0x06 ;room 6
lb t0, 0x03(a0) ;current room
bne t0, t2, @@return ;return if not jabu room 6
li t2, 0x6 ; room 6
lb t0, 0x3(a0) ; current room
bne t0, t2, @@return ; return if not Jabu room 6
nop

la t0, SAVE_CONTEXT
lh t1, 0x0F20(t0) ;infTable+0x28
andi t1, t1, 0x0040 ;big octo visited bit
beqz t1, @@return ;return if flag is not set
nop
jal 0x80020EB4 ;Actor_Kill
lh t1, 0x0F20(t0) ; infTable+0x28
andi t1, t1, 0x0040 ; Big Octo visited bit
beqz t1, @@return ; return if flag is not set
sw ra, 16(sp)

jal Actor_Kill ; else, kill Demo_Effect actor
nop
lw ra, 16(sp)
@@return:
lw t2, 0x20(sp)
lw t1, 0x1C(sp)
lw t0, 0x18(sp)
lw ra, 0x14(sp)
lh v0, 0x1C(s0) ;displaced
jr ra
addiu sp, sp, 0x30
addiu sp, sp, 24
37 changes: 2 additions & 35 deletions ASM/src/hacks.asm
Original file line number Diff line number Diff line change
Expand Up @@ -3494,41 +3494,6 @@ courtyard_guards_kill:
.orga 0xD7EC70
j malon_reload

;==================================================================================================
; Clean Up Big Octo Room For Multiple Visits
;==================================================================================================
;make link drop ruto if "visited big octo" flag is set
;Replaces: lh t9, 0x1C(s0)
; lh t6, 0x1C(s0)
.orga 0xD4BCB0
jal drop_ruto
lh t9, 0x1C(s0)

;kill Demo_Effect if "visited big octo" flag is set
;Replaces: sw a1, 0x64(sp)
; lh v0, 0x1C(s0)
.orga 0xCC85B8
jal check_kill_demoeffect
sw a1, 0x64(sp)

;==================================================================================================
; Override appearance of Zoras Sapphire spiritual stone inside Jabu
;==================================================================================================
.headersize(0x8092ACC0 - 0x00CC8430)
; Increase the size of DemoEffect actor to store override
.org 0x8093019c
; Replaces: .d32 0x00000190
.d32 0x000001C0

; Hook the function DemoEffect_DrawJewel
.org 0x8092e3f8
; Replaces:
; addiu sp, sp, -0x78
; sw s3, 0x40(sp)
j DemoEffect_DrawJewel_Hook
nop
DemoEffect_DrawJewel_AfterHook:

;==================================================================================================
; Use Sticks and Masks as Adult
;==================================================================================================
Expand Down Expand Up @@ -4162,3 +4127,5 @@ DemoEffect_DrawJewel_AfterHook:
.include "hacks/ovl_en_okarina_tag.asm"
.include "hacks/sound.asm"
.include "hacks/z_player.asm"
.include "hacks/z_demo_effect.asm"
.include "hacks/z_bg_bdan_objects.asm"
12 changes: 12 additions & 0 deletions ASM/src/hacks/z_bg_bdan_objects.asm
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
.headersize (0x809bba50 - 0x00d4bbd0)

; Jabu-Jabu dungeon objects overlay

;==================================================================================================
; Make player drop Ruto when opening a door to the Big Octo room if "visited Big Octo" flag set
;==================================================================================================
; Replaces: lui a0,0x601
; addiu a0,a0,-29472
.org 0x809bbb94 ; in BgBdanObjects_Init
jal JabuObjects_DropRutoBigOcto
lui a0,0x601 ; displaced
26 changes: 26 additions & 0 deletions ASM/src/hacks/z_demo_effect.asm
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
.headersize (0x8092acc0 - 0x00cc8430)

;==================================================================================================
; Jabu: Kill Demo_Effect if "visited Big Octo" flag set (don't draw Zora's Sapphire on platform)
;==================================================================================================
; Replaces: sw a1, 0x64(sp)
; lh v0, 0x1C(s0)
.org 0x8092ae48 ; in DemoEffect_Init
jal DemoEffect_KillAfterBigOcto
sw a1, 0x64(sp) ; displaced

;==================================================================================================
; Override appearance of Zora's Sapphire spiritual stone inside Jabu
;==================================================================================================
; Increase the size of DemoEffect actor to store override
; Replaces: .d32 0x00000190
.org 0x8093019c
.d32 0x000001C0

; Hook the function DemoEffect_DrawJewel
; Replaces: addiu sp, sp, -0x78
; sw s3, 0x40(sp)
.org 0x8092e3f8
j DemoEffect_DrawJewel_Hook
nop
DemoEffect_DrawJewel_AfterHook:
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