Add collect items with sword

This commit is contained in:
scawful
2023-08-30 23:11:24 -04:00
parent e5b5a5a8f8
commit 1e481abc1e
3 changed files with 172 additions and 125 deletions

View File

@@ -57,6 +57,7 @@ LinkItem_SecretsBook:
JSL $099F91 ; at least execute original code
RTL
}
pushpc
; =============================================================================

77
Items/sword_collect.asm Normal file
View File

@@ -0,0 +1,77 @@
; Collect items with sword
org $86F725
JSL collectSword
pullpc
collectSword:
{
ADC #$00
STA $09
LDA $79
BEQ $01
RTL
LDA $0E20, x
SEC
SBC #$D8
BCS $01
RTL
LDA $0E20, x
SEC
SBC #$E7
BCC $01
RTL
PHY
LDY $3C
BPL $02
PLY
RTL
LDA $F571, y
BEQ $02
PLY
RTL
PHX
LDA $2F
ASL A
ASL A
ASL A
CLC
ADC $3C
TAX
INX
LDY #$00
LDA $45
CLC
ADC $F46D, x
BPL $01
DEY
CLC
ADC $22
STA $00
TYA
ADC $23
STA $08
LDY #$00
LDA $44
CLC
ADC $F4EF, x
BPL $01
DEY
CLC
ADC $20
STA $01
TYA
ADC $21
STA $09
LDA $F4AE, x
STA $02
LDA $F530, x
STA $03
PLX
PLY
RTL
}

View File

@@ -19,7 +19,7 @@
; 25 - N/A
; 26 - N/A
; 27 - N/A
; 28 -
; 28 - Spike Subtype
; 29 - New Sprite Jump Table
; 2A - Jump Feather
; 2B - Book of Secrets
@@ -45,9 +45,6 @@
;
; Used Free RAM:
; $B6 - Cutscene State
; $02B2 - Mask Form
; (0 = Human, 1 = Deku, 2 = Zora, 3 = Wolf, 4 = Bunny, 5 = Minish)
; $0AAB - Diving Flag
;
; =============================================================================
@@ -61,6 +58,46 @@ namespace Oracle
incsrc "Util/functions.asm"
incsrc "Util/music_macros.asm"
; ---------------------------------------------------------
; Overworld
print " -- Overworld -- "
print ""
incsrc "Overworld/pit_damage.asm"
print "End of Overworld/pit_damage.asm ", pc
incsrc "Overworld/master_sword.asm"
print "End of master_sword.asm ", pc
print ""
; ---------------------------------------------------------
; Dungeon
print " -- Dungeon -- "
print ""
incsrc "Dungeons/keyblock.asm"
print "End of Dungeons/keyblock.asm ", pc
; incsrc "Dungeons/entrances.asm"
; print "End of Dungeons/entrances.asm ", pc
incsrc "Dungeons/mothula.asm"
print "End of Dungeons/mothula.asm ", pc
; incsrc "Dungeons/spike_subtype.asm"
incsrc "Dungeons/enemy_damage.asm"
print "End of Dungeons/enemy_damage.asm ", pc
incsrc "Dungeons/together_warp_tag.asm"
print "End of together_warp_tag.asm ", pc
print ""
; ---------------------------------------------------------
; Music
@@ -83,86 +120,6 @@ namespace Oracle
print ""
; ---------------------------------------------------------
; Sprites
print " -- Sprites -- "
print ""
incsrc "Sprites/farore.asm"
print "End of farore.asm ", pc
incsrc "Sprites/Kydrog/kydrog.asm"
print "End of kydrog.asm ", pc
incsrc "Sprites/Kydrog/kydrog_boss.asm"
print "End of kydrog_boss.asm ", pc
incsrc "Sprites/maku_tree.asm"
print "End of maku_tree.asm ", pc
incsrc "Sprites/mask_salesman.asm"
print "End of mask_salesman.asm ", pc
incsrc "Sprites/deku_scrub.asm"
print "End of deku_scrub.asm ", pc
incsrc "Sprites/anti_kirby.asm"
print "End of anti_kirby.asm ", pc
print ""
; ---------------------------------------------------------
; Transformation Masks
print " -- Masks -- "
print ""
incsrc "Masks/mask_routines.asm"
incsrc "Masks/bunny_hood.asm"
print "End of Masks/bunny_hood.asm ", pc
incsrc "Masks/minish_form.asm"
print "End of Masks/minish_form.asm ", pc
incsrc "Masks/deku_mask.asm"
print "End of Masks/deku_mask.asm ", pc
incsrc "Masks/zora_mask.asm"
print "End of Masks/zora_mask.asm ", pc
incsrc "Masks/wolf_mask.asm"
print "End of Masks/wolf_mask.asm ", pc
warnpc $07FFFF
print ""
; ---------------------------------------------------------
; Items
print " -- Items -- "
print ""
incsrc "Items/bottle_net.asm"
print "End of Items/bottle_net.asm ", pc
incsrc "Items/jump_feather.asm"
print "End of Items/jump_feather.asm ", pc
incsrc "Items/ice_rod.asm"
print "End of Items/ice_rod.asm ", pc
incsrc "Items/book_of_secrets.asm"
print "End of Items/book_of_secrets.asm ", pc
incsrc "Items/ocarina.asm"
print "End of Items/ocarina.asm ", pc
print ""
; ---------------------------------------------------------
; Events
@@ -180,7 +137,6 @@ namespace Oracle
print ""
; ---------------------------------------------------------
; Graphics
@@ -195,35 +151,53 @@ namespace Oracle
print ""
; ---------------------------------------------------------
; Dungeon
print " -- Dungeon -- "
; ---------------------------------------------------------
; Sprites
print " -- Sprites -- "
print ""
incsrc "Dungeons/keyblock.asm"
print "End of Dungeons/keyblock.asm ", pc
incsrc "Dungeons/entrances.asm"
print "End of Dungeons/entrances.asm ", pc
incsrc "Dungeons/mothula.asm"
print "End of Dungeons/mothula.asm ", pc
incsrc "Dungeons/together_warp_tag.asm"
print "End of together_warp_tag.asm ", pc
incsrc "Sprites/sprites.asm"
print ""
; ---------------------------------------------------------
; Overworld
; Transformation Masks
incsrc "Overworld/pit_damage.asm"
print "End of Overworld/pit_damage.asm ", pc
print " -- Masks -- "
print ""
incsrc "Dungeons/master_sword.asm"
print "End of master_sword.asm ", pc
incsrc "Masks/all_masks.asm"
print ""
; ---------------------------------------------------------
; Items
print " -- Items -- "
print ""
incsrc "Items/bottle_net.asm"
print "End of Items/bottle_net.asm ", pc
incsrc "Items/ocarina.asm"
print "End of Items/ocarina.asm ", pc
incsrc "Items/jump_feather.asm"
print "End of Items/jump_feather.asm ", pc
incsrc "Items/ice_rod.asm"
print "End of Items/ice_rod.asm ", pc
incsrc "Items/book_of_secrets.asm"
print "End of Items/book_of_secrets.asm ", pc
incsrc "Items/sword_collect.asm"
print "End of Items/sword_collect.asm ", pc
print ""
; ---------------------------------------------------------
; Custom Menu and HUD
@@ -239,13 +213,8 @@ namespace Oracle
; ---------------------------------------------------------
; incsrc "Util/all_items.asm"
print "End of Util/all_items.asm ", pc
; Overworld area which has holes that hurt
; You can change the area to which holes will hurt the player!
; currently it only allows you to choose one area
; 396DB, should be a 05 - Change to another area hex number
incsrc "Util/all_items.asm"
; print "End of Util/all_items.asm ", pc
print ""
print "Finished applying patches"