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,546 changes: 776 additions & 770 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.

2 changes: 2 additions & 0 deletions ASM/src/build.asm
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,8 @@ RANDO_CONTEXT:
.include "player_laddercutscenefix.asm"
.include "player_bunny_hover_matrix.asm"
.include "player_hookshotcheckspawn.asm"
.include "enge1_gtgcheckpermopen.asm"
.include "gtggate_checkpermopen.asm"

.align 0x10
.importobj "../build/bundle.o"
Expand Down
47 changes: 47 additions & 0 deletions ASM/src/enge1_gtgcheckpermopen.asm
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
EnGe1_GTGCheckPermGateOpen:
addiu sp,sp,-24
sw ra,16(sp)
sw a0,20(sp) ; save EnGe1 and play
sw a1,24(sp)
move a0,a1
la a1,DUNGEONS_SHUFFLED ; Check setting and return if not set
lb a1,(a1)
beqzl a1,@@Return
li v0,0 ; Continue main function

jal Flags_GetSwitch ; Permanent open flag check
li a1,4
beqz v0,@@Return ; If not set, continue main function as usual
lw a0,20(sp)
la a1,gActorOverlayTable ; If set, set talk action function
lw a1,0x2710(a1) ; EnGe1 loaded address
addiu a1,0x071C ; EnGe1_SetNormalText address
sw a1,0x02A4(a0) ; Set as action function

@@Return:
lui t6,0x8010 ; displaced
lui t7,0x8012 ; displaced
lw t7,-22924(t7) ; displaced
lw t6,-29624(t6) ; displaced
lw ra,16(sp)
lw a0,20(sp)
lw a1,24(sp)
jr ra
addiu sp,sp,24


EnGe1_GTGSetPermGateOpen:
addiu sp,sp,-24
sw ra,16(sp)
jal Flags_SetSwitch ; Set vanilla temp flag
nop
la a1,DUNGEONS_SHUFFLED ; Check setting and return if not set
lb a1,(a1)
beqz a1,@@Return
nop
jal Flags_SetSwitch ; Set new permanent flag 4
li a1,4
@@Return:
lw ra,16(sp)
jr ra
addiu sp,sp,24
22 changes: 22 additions & 0 deletions ASM/src/gtggate_checkpermopen.asm
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
GTGGate_CheckPermOpen:
addiu sp,sp,-24
sw ra,16(sp)
lw a0,60(sp) ; play, original 36(sp) + 24 extra
jal Flags_GetSwitch ; Vanilla temp flag set check
andi a1,a1,0x3f
bnezl v0,@@Return ; If temp flag set, no need to check perm flag
nop
la a1,DUNGEONS_SHUFFLED ; Check setting and return if not set
lb a1,(a1)
beqzl a1,@@Return
nop
la a1,SAVE_CONTEXT
lw a1,4(a1) ; Age
bnezl a1,@@Return ; Don't open if child
nop
jal Flags_GetSwitch ; Permanent flag set check
li a1,4
@@Return:
lw ra,16(sp)
jr ra
addiu sp,sp,24
2 changes: 2 additions & 0 deletions ASM/src/hacks.asm
Original file line number Diff line number Diff line change
Expand Up @@ -4155,3 +4155,5 @@ DemoEffect_DrawJewel_AfterHook:
.include "hacks/sound.asm"
.include "hacks/z_player.asm"
.include "hacks/z_en_sa.asm"
.include "hacks/z_bg_spot12_saku.asm"
.include "hacks/z_en_ge1.asm"
17 changes: 17 additions & 0 deletions ASM/src/hacks/z_bg_spot12_saku.asm
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
.headersize (0x80b3d9c0 - 0x00eb90f0)

; Gerudo Fortress gate to GTG actor

;==================================================================================================
; Permanent open flag GTG gate: On gate actor init, if option is enabled, check if permanent
; GTG opened flag is set and if so, enter opened action
;==================================================================================================
; Replaces: lh a1,28(s0)
; lw a0,36(sp)
; jal Flags_GetSwitch
; andi a1,a1,0x3f
.org 0x80b3da54 ; in BgSpot12Saku_Init
jal GTGGate_CheckPermOpen
lh a1,28(s0) ; displaced
beqz v0,0x80b3da7c ; If temp/perm flags not set, run non-open action
nop
27 changes: 27 additions & 0 deletions ASM/src/hacks/z_en_ge1.asm
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
.headersize (0x80a8f100 - 0x00e11a40)

; Gerudo white clothes guards

;==================================================================================================
; Permanent open flag GTG gate: In gate guard check for card function, if option is enabled,
; if permanent GTG open flag is set, do not offer talk
;==================================================================================================
; Replaces: lui t6,0x8010
; lui t7,0x8012
; lw t7,-22924(t7)
; lw t6,-29624(t6)
.org 0x80a8fca8 ; in EnGe1_CheckForCard_GTGGuard
jal EnGe1_GTGCheckPermGateOpen
nop
bnez v0,0x80a8fcf8 ; Go to return in this function if perm flag set
nop

;==================================================================================================
; Permanent open flag GTG gate: On opening GTG gate, if option is enabled, set permanent GTG
; open scene flag (flag 4)
;==================================================================================================
; Replaces: jal Flags_SetSwitch
; lw a0,28(sp)
.org 0x80a8f9f8 ; in EnGe1_Open_GTGGuard
jal EnGe1_GTGSetPermGateOpen
lw a0,28(sp) ; displaced
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