Skip to content

Commit

Permalink
Merge branch 'Dev' into dev-fenhl
Browse files Browse the repository at this point in the history
# Conflicts:
#	ASM/build/asm_symbols.txt
#	data/generated/patch_symbols.json
#	data/generated/rom_patch.txt
#	data/generated/symbols.json
  • Loading branch information
fenhl committed Feb 3, 2025
2 parents 546d09d + b1160a3 commit 1e5fdfe
Show file tree
Hide file tree
Showing 9 changed files with 38,419 additions and 38,384 deletions.
1,741 changes: 871 additions & 870 deletions ASM/build/asm_symbols.txt

Large diffs are not rendered by default.

11 changes: 1 addition & 10 deletions ASM/src/hacks.asm
Original file line number Diff line number Diff line change
Expand Up @@ -2609,16 +2609,6 @@ skip_bombchu_bowling_prize_switch:
;==================================================================================================
; Trade Quest Shuffle Flag Hooks
;==================================================================================================
; Control if Fado (blonde Kokiri girl) can spawn in Lost Woods
.orga 0xE538C4
or t3, $zero, $ra
jal check_fado_spawn_flags
.orga 0xE538D4
or $ra, $zero, t3
; Fix Fado's text id when trading in the odd potion out of order
.orga 0xE535E4
sh t2, 0x010E(s0)

; Control if Grog can spawn in Lost Woods
.orga 0xE20BC8
jal check_grog_spawn_flags
Expand Down Expand Up @@ -4229,6 +4219,7 @@ DemoEffect_DrawJewel_AfterHook:
.include "hacks/ovl_bg_haka_tubo.asm"
.include "hacks/ovl_bg_spot18_basket.asm"
.include "hacks/ovl_en_dns.asm"
.include "hacks/ovl_en_ko.asm"
.include "hacks/ovl_en_kz.asm"
.include "hacks/ovl_obj_mure3.asm"
.include "hacks/z_parameter.asm"
Expand Down
18 changes: 18 additions & 0 deletions ASM/src/hacks/ovl_en_ko.asm
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
.headersize (0x80AD1C20 - 0xE51A60)

; Control if Fado (blonde Kokiri girl) can spawn in Lost Woods
.org 0x80AD3A84 ; Fado branch at end of EnKo_CanSpawn (called by EnKo_Init), override to always true
addiu t5, $zero, 0x0031
.org 0x80AD3EB0 ; end of EnKo_Init, controls Fado spawn
jal check_fado_spawn_flags
sw t8, 0x0180(s0)
lw $ra, 0x001C($sp)
lw s0, 0x0018($sp)
jr $ra
addiu $sp, $sp, 0x0020

; Fix Fado's text id when trading in the odd potion out of order
.org 0x80AD37A4 ; vrom 0xE535E4
sh t2, 0x010E(s0)

.headersize 0
35 changes: 25 additions & 10 deletions ASM/src/trade_quests.asm
Original file line number Diff line number Diff line change
Expand Up @@ -7,25 +7,40 @@ check_fado_spawn_flags:
addiu sp, sp, -0x18
sw ra, 0x14(sp)

; displaced code
lbu t5, 0x0074(t4)
addiu $at, $zero, 0x0031
; Only change behavior for Fado actor
; Vanilla EnKo_CanSpawn behavior checks if
; the scene is Lost Woods and does not
; check the EnKo type. No reason not to be
; more specific since we have the option.
lh t0, 0x1C(s0) ; s0 = EnKo* this pointer, 0x1C = Actor.params
andi t1, t0, 0xFF ; filter actor params to those used for ENKO_TYPE macro
li $at, 0xC ; 0xC = ENKO_TYPE_CHILD_FADO
bne t1, $at, @@return_fado
nop
la t0, GLOBAL_CONTEXT
lh t1, 0xA4(t0) ; play->sceneId
li $at, 0x5B ; 0x5B = Lost Woods scene ID
bne t1, $at, @@return_fado
nop

; Spawns if Odd Potion owned but not turned in
jal SaveFile_TradeItemIsOwned
ori a0, $zero, 0x31
beqz v0, @@return_fado
ori t5, $zero, 0x0000 ; don't spawn
beqz v0, @@kill_fado
nop

jal SaveFile_TradeItemIsTraded
ori a0, $zero, 0x31
bnez v0, @@return_fado
ori t5, $zero, 0x0000 ; don't spawn
ori t5, $zero, 0x0031 ; spawn
bnez v0, @@kill_fado
nop
b @@return_fado
nop

@@kill_fado: ; you monster D:
; Actor_Kill
jal 0x80020EB4
or a0, s0, $zero
@@return_fado:
; reset v1 in case it was modified
or v1, $zero, $zero
lw ra, 0x14(sp)
jr ra
addiu sp, sp, 0x18
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,7 @@ issue. You should always Hard Reset to avoid this issue entirely.
* Scarecrow's song is now in logic without ocarina buttons if `Free Scarecrow's Song` is on.
* Fix a crash that could occur when doing certain sequences of actions in the treasure box shop with shuffled keys.
* Fix the items in the “Haunted Wasteland Checks” Dual hint being listed reverse.
* Fix a crash that could occur on Wii VC when entering the Skull Kid room in Lost Woods as adult.

#### New Speedups
* The first text box from each carpenter in the Thieves' Hideout is skipped.
Expand Down
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

0 comments on commit 1e5fdfe

Please sign in to comment.