From f609727647f1e887283c47bb69eea28787a18d11 Mon Sep 17 00:00:00 2001 From: Kara Alexandra Date: Sun, 1 Feb 2026 21:33:44 -0600 Subject: [PATCH] Start link with home-pikit telling him to bring shields --- hooks.asm | 10 ++++++ initsramtable.asm | 6 ++-- pikit.asm | 82 ++++++++++++++++++++++++++++++++++++++++++----- 3 files changed, 87 insertions(+), 11 deletions(-) diff --git a/hooks.asm b/hooks.asm index e811a7f..a723fb9 100755 --- a/hooks.asm +++ b/hooks.asm @@ -2848,3 +2848,13 @@ JML PikitSteal org $9E8CF2 JSL PikitDigest NOP #2 + +org $879A52 +JSL LinkSnoring + +org $879AAD +JSL LinkAwaken + +org $879A31 +JSL TuckLink +NOP #2 diff --git a/initsramtable.asm b/initsramtable.asm index 75bd7eb..a0316b6 100644 --- a/initsramtable.asm +++ b/initsramtable.asm @@ -118,10 +118,10 @@ skip 34 ; InitFluteBitfield: db $00 ; InitSpecialWeaponLevel: db $00 ; InitItemOnB: db $00 ; -InitProgressIndicator: db $02 ; PC 0x1833C5 - Set to $80 for instant post-aga with standard -InitProgressFlags: db $14 ; PC 0x1833C6 - Set to $00 for standard +InitProgressIndicator: db $00 ; PC 0x1833C5 - Set to $80 for instant post-aga with standard +InitProgressFlags: db $04 ; PC 0x1833C6 - Set to $00 for standard InitMapIcons: skip 1 ; PC 0x1833C7 -InitStartingEntrance: db $01 ; PC 0x1833C8 - Set to $00 for standard +InitStartingEntrance: db $00 ; PC 0x1833C8 - Set to $00 for standard InitNpcFlagsVanilla: skip 1 ; PC 0x1833C9 InitCurrentWorld: skip 1 ; PC 0x1833CA skip 1 ; PC 0x1833CB diff --git a/pikit.asm b/pikit.asm index 9e41cec..e858e38 100644 --- a/pikit.asm +++ b/pikit.asm @@ -1,17 +1,78 @@ pushpc -org $89EB7A -db $AA ; replace uncle with pikit +org $89EB78 +db $18, $1A, $AA ; replace uncle with pikit org $80DCCE db $1B ; load sprite sheet for pikit in link's house +org $80FC74 +NOP #2 ; do not load rain-state sprites + org $8A8029 -db $C8, $B6, $22 ; 0x022: Rail ↔ | { 31, 0B } | Size: 01 -db $C8, $CA, $22 ; 0x022: Rail ↔ | { 31, 0B } | Size: 01 -db $C8, $B6, $69 ; 0x069: Rail ↕ | { 3A, 0B } | Size: 01 -db $DC, $B6, $69 ; 0x069: Rail ↕ | { 3A, 0B } | Size: 01 +; move table slightly to center under pikit +db $C9, $C0, $DD +db $D0, $B8, $3C pullpc +TuckLink: + ; what we wrote over + STZ.w $037C + STZ.w $037D + + LDA.b #$40 : STA.w $0FC2 + LDA.b #$09 : STA.w $0FC3 + + LDA.b #$5A : STA.w $0FC4 + LDA.b #$21 : STA.w $0FC5 + + RTL + +LinkSnoring: + LDA.l ProgressIndicator + BNE + + + LDA.b #$02 + STA.l ProgressIndicator + LDA.b #$1D + LDY.b #$00 + JSL Sprite_ShowMessageUnconditional + BRA ++ + ++ + LDA.b FrameCounter + AND.b #$03 + BNE ++ + + LDA.b $9C + CMP.b #$20 + BEQ .lightened + + DEC.b $9C + DEC.b $9D + +++ + ; what we wrote over + LDA.b FrameCounter + AND.b #$1F + RTL + +.lightened + INC.w $037C + INC.w $037D + RTL + +LinkAwaken: + ; what we wrote over + LDA.b #$06 + STA.b LinkState + + LDA.l ProgressFlags + ORA.b #$10 + STA.l ProgressFlags + LDA.b #$01 + STA.l StartingEntrance + RTL + BigChest_ShieldCheck: JSL ShieldCheck BCC .no_open @@ -53,10 +114,15 @@ ShieldCheck: RTL .already_have_shield - SEP #$20 + SEP #$30 LDA.b #$3C STA.w $012E - REP #$20 + + LDA.b #$98 + LDY.b #$01 + JSL Sprite_ShowMessageUnconditional + + REP #$30 PLX CLC