Merge remote-tracking branch 'baserom/master' into MergeDecompression

# Conflicts:
#	goalitem.asm
#	inventory.asm
#	invertedmaps.asm
#	newhud.asm
#	pendantcrystalhud.asm

Also some bugfixes here and there
This commit is contained in:
aerinon
2023-08-24 16:16:31 -06:00
22 changed files with 955 additions and 809 deletions

View File

@@ -296,7 +296,9 @@ ItemBehavior:
RTS
.silversbow
LDA.l BowTracking : ORA.b #$80 : STA.l BowTracking
LDA.l SilverArrowsUseRestriction : BNE +
LDA.l BowTracking : ORA.b #$40 : STA.l BowTracking
LDA.b #03 : STA.l BowEquipment ; set bow to silver
+
LDA.b #$01 : STA.l BowEquipment
@@ -338,22 +340,36 @@ ItemBehavior:
JMP.w .increment_map
.bow_and_arrows
LDA.l BowTracking : BIT.b #$40 : BEQ +
LDA.l SilverArrowsUseRestriction : BNE +
LDA.b #03 : STA.l BowEquipment ; set bow to silver
LDA.b #$80 : ORA.l BowTracking : STA.l BowTracking
LDA.l BowTracking : BIT.b #$40 : BEQ .no_silvers
LDA.l SilverArrowsUseRestriction : BNE .no_silvers
LDA.l CurrentArrows : BEQ +
LDA.b #04 : STA.l BowEquipment
BRA .store_bow
+
LDA.b #$03
BRA .store_bow
.no_silvers
LDA.l CurrentArrows : BEQ +
LDA.b #02
BRA .store_bow
+
LDA.b #$01
.store_bow
STA.l BowEquipment
RTS
.silver_bow
LDA.b #$40 : ORA.l BowTracking : STA.l BowTracking
LDA.b #$80 : ORA.l BowTracking : STA.l BowTracking
LDA.l SilverArrowsUseRestriction : BNE .noequip
LDA.l SilverArrowsAutoEquip : AND.b #$01 : BEQ .noequip
LDA.l ArrowsFiller : BNE + ; check arrows
LDA.b #$03 : BRA ++ ; bow without arrow
+
LDA.b #$04 ; bow with arrow
++
STA.l BowEquipment
LDA.b #$40 : ORA.l BowTracking : STA.l BowTracking
LDA.l SilverArrowsAutoEquip : AND.b #$01 : BEQ .noequip
LDA.l CurrentArrows : BNE + ; check arrows
LDA.b #$03 : BRA ++ ; bow without arrow
+
LDA.b #$04 ; bow with arrow
++
STA.l BowEquipment
.noequip
RTS
@@ -421,13 +437,13 @@ ItemBehavior:
RTS
.silver_arrows
LDA.l BowTracking : ORA.b #$40 : STA.l BowTracking
LDA.l SilverArrowsUseRestriction : BNE ++
LDA.l SilverArrowsAutoEquip : AND.b #$01 : BEQ ++
LDA.l BowEquipment : BEQ ++ : CMP.b #$03 : !BGE +
!ADD.b #$02 : STA.l BowEquipment ; switch to silver bow
+
++
LDA.l BowTracking : ORA.b #$40 : STA.l BowTracking
LDA.l SilverArrowsAutoEquip : AND.b #$01 : BEQ ++
LDA.l BowEquipment : BEQ ++ : CMP.b #$03 : !BGE +
!ADD.b #$02 : STA.l BowEquipment ; switch to silver bow
+
++
LDA.l ArrowMode : BEQ +
LDA.b #$01 : STA.l ArrowsFiller
+
@@ -547,18 +563,23 @@ ItemBehavior:
LSR
AND.w #$000F : TAX
ASL : CMP.w DungeonID : BEQ .same_dungeon
LSR : TAX
LDA.l DungeonKeys,X : INC : STA.l DungeonKeys,X
RTS
.same_dungeon
SEP #$20
LDA.l CurrentSmallKeys : INC : STA.l CurrentSmallKeys
LSR : TAX
LDA.l DungeonKeys,X : INC : STA.l DungeonKeys,X ; Update menu key count too
LDA.l DungeonKeys,X : INC : STA.l DungeonKeys,X
RTS
.same_dungeon_hc
SEP #$20
LDA.l CurrentSmallKeys : INC : STA.l CurrentSmallKeys
LDA.l SewerKeys : INC
STA.l SewerKeys : STA.l HyruleCastleKeys
RTS
.hc_smallkey
LDA.w DungeonID : CMP.b #$03 : BCC .same_dungeon
LDA.w DungeonID : CMP.b #$03 : BCC .same_dungeon_hc
LDA.l HyruleCastleKeys : INC : STA.l HyruleCastleKeys
LDA.l SewerKeys : INC : STA.l SewerKeys
RTS
@@ -839,10 +860,10 @@ HandleBowTracking:
CMP.b #$65 : BEQ .prog_two
RTS
.prog_one
LDA.b #$80
LDA.b #$90
BRA .done
.prog_two
LDA.b #$20
LDA.b #$A0
.done
ORA.l BowTracking : STA.l BowTracking
LDA.w ItemReceiptID