From a587bf29ae4f8d4de5f3ff3e5d5b19a83502a51d Mon Sep 17 00:00:00 2001 From: Kara Alexandra Date: Fri, 1 Sep 2023 16:55:45 -0500 Subject: [PATCH] Add toggle of bugnet-on-B --- inventory.asm | 7 +++++++ special_weapons.asm | 3 ++- sram.asm | 6 +++--- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/inventory.asm b/inventory.asm index e21f548..27139cb 100644 --- a/inventory.asm +++ b/inventory.asm @@ -84,6 +84,11 @@ RTL STA.l FluteEquipment ; store set item LDA.b #$20 : STA.w SFX3 ; menu select sound BRA .captured + + CMP.b #$0E : BNE + ; bugnet + LDA.l SpecialWeapons : CMP.b #$08 : BNE .error + LDA.l InventoryTracking+1 : EOR.b #$80 : STA.l InventoryTracking+1 + LDA.b #$20 : STA.w SFX3 ; menu select sound + BRA .captured + CMP.b #$10 : BNE .error : JSL.l ProcessBottleMenu : BRA .captured : + CLC @@ -392,6 +397,8 @@ AddYMarker: LDA.l InventoryTracking : BIT.w #$04 : BEQ .drawNormal ; make sure we have shovel AND.w #$03 : BNE .drawYBubble ; make sure we have one of the flutes BRA .drawNormal + + CMP.w #$000E : BNE + ; bugnet + LDA.l SpecialWeapons : AND.w #$00FF : CMP.w #$0008 : BEQ .drawYBubble : BRA .drawNormal + CMP.w #$10 : BEQ .drawJarMarker .drawNormal diff --git a/special_weapons.asm b/special_weapons.asm index c2687dd..07b20eb 100644 --- a/special_weapons.asm +++ b/special_weapons.asm @@ -466,7 +466,7 @@ CheckDetonateBomb: .next_ancilla DEX BPL .check_ancilla - BRA .done + JMP .done .not_bomb_mode LDA.l SpecialWeapons : CMP.b #$06 : BEQ .release_bee CMP.b #$07 : BEQ .hammer @@ -480,6 +480,7 @@ CheckDetonateBomb: RTL .net LDA.l BugNetEquipment : BEQ .done + LDA.l InventoryTracking+1 : BIT.b #$80 : BNE .done LDA.b $3A : ORA.b #$40 : STA.b $3A LDA.b #$07 : STA.w $0304 JSL Link_UseBugNetLong diff --git a/sram.asm b/sram.asm index a48c22c..24d304f 100644 --- a/sram.asm +++ b/sram.asm @@ -172,12 +172,12 @@ CurrentGenericKeys: skip 1 ; Generic small keys ;================================================================================ ; Tracking & Indicators ($7EF38C - $7EF3F0) ;-------------------------------------------------------------------------------- -InventoryTracking: skip 2 ; - - - - - - o q b r m p n s k f (bitfield) +InventoryTracking: skip 2 ; 2 - - - - - o q b r m p n s k f (bitfield) ; b = Blue Boomerang | r = Red Boomerang | m = Mushroom Current ; p = Magic Powder | n = Mushroom Past | s = Shovel ; k = Inactive Flute | f = Active Flute | o = Any bomb acquired - ; q = Quickswap locked -BowTracking: skip 1 ; b s p f - - - - - - - - - - - - (bitfield) + ; q = Quickswap locked | 2 = Item on B +BowTracking: skip 1 ; b s p f - - - - (bitfield) ; b = Any Bow | s = Silver Arrows Upgrade | p = Second Progressive Bow ; f = First progressive bow ; The front end writes two distinct progressive bow items. p