Allow toggling strafe/bugnet-on-B

This commit is contained in:
2023-09-01 19:25:40 -05:00
parent 13ccba90c3
commit ed85faaab5
3 changed files with 34 additions and 2 deletions

View File

@@ -2932,6 +2932,10 @@ org $0DE4BF ; equipment.asm@1247 (LDA $7EF343 : AND.w #$00FF : BEQ .gotNoBombs :
JSL DrawBombInMenu
BRA + : NOP #13 : +
;--------------------------------------------------------------------------------
org $0DE5A0 ; bank_0D@15415 (LDA $7EF34D : AND.w #$00FF : STA.b $02 : ...)
JSL DrawBugNetInMenu
BRA + : NOP #8 : +
;--------------------------------------------------------------------------------
org $0DFB6A ; headsup_display@727 (CPX #$0004 : BNE .bombsNotEquipped : LDA #$0001)
JSL DrawBombInYBox
BRA + : NOP #2 : +
@@ -2948,7 +2952,7 @@ org $089EF8 ; ancilla_bomb@1438 (LDA.w #$04 : STA $0B)
JSL SetBombSpriteColor
;--------------------------------------------------------------------------------
; bomb icons with numbers
org $0DFC51 ; is this being used? I hope not! let's find out if anything breaks!
org $0DFC51 ; we freed this up earlier in hooks; probably shouldn't use it but *shrug*
db $F5, $20, $F5, $20, $F5, $20, $F5, $20
db $B2, $3C, $B3, $3C, $C2, $3C, $17, $3C
db $B2, $2C, $B3, $2C, $C2, $2C, $18, $2C
@@ -2957,13 +2961,23 @@ db $B2, $28, $B3, $28, $C2, $28, $1A, $28
db $B2, $28, $B3, $28, $C2, $28, $1B, $28
; bomb icons without numbers
org $0DFC81
; $0DFC81
db $F5, $20, $F5, $20, $F5, $20, $F5, $20
db $B2, $3C, $B3, $3C, $C2, $3C, $C2, $7C
db $B2, $2C, $B3, $2C, $C2, $2C, $C2, $6C
db $B2, $24, $B3, $24, $C2, $24, $C2, $64
db $B2, $28, $B3, $28, $C2, $28, $C2, $68
db $B2, $28, $B3, $28, $C2, $28, $C2, $68
; bugnet icon with B
; $0DFCB1
db $40, $3C, $41, $3C, $82, $2C, $83, $3C
warnpc $0DFC51+197 ; we only filled in 197 NOPs so don't overwrite past that
;--------------------------------------------------------------------------------
org $0DF759
; db $40, $3C, $41, $3C, $42, $28, $3E, $1C
;--------------------------------------------------------------------------------
org $079CE6 ; Bank07.asm@4632 (LDA #$80 : TSB $3A)
JSL CheckDetonateBomb

View File

@@ -33,6 +33,7 @@ QuickSwap:
CPX.b #$01 : BEQ + ; bow
CPX.b #$05 : BEQ + ; powder
CPX.b #$0D : BEQ + ; flute
CPX.b #$0E : BEQ + ; bug net
CPX.b #$10 : BEQ + ; bottle
BRA .store
+ STX $0202 : JSL ProcessMenuButtons_y_pressed

View File

@@ -378,6 +378,23 @@ DrawBombInMenu:
.done
RTL
;--------------------------------------------------------------------------------
DrawBugNetInMenu:
LDA.l BugNetEquipment : AND.w #$00FF : BEQ .noNet
LDA.l SpecialWeapons : AND.w #$00FF : CMP.w #$0008 : BNE .normal
LDA.l InventoryTracking : AND.w #$8000 : BNE .normal
LDA.w #$0000 : STA $02
LDA.w #$FCB1 : STA $04
BRA .done
.normal
LDA.w #$0001 : STA $02
LDA.w #$F751 : STA $04
BRA .done
.noNet
LDA.w #$0000 : STA $02
LDA.w #$F751 : STA $04
.done
RTL
;--------------------------------------------------------------------------------
DrawSwordInMenu:
LDA SpecialWeapons : AND.w #$00FF : CMP.w #$0001 : BEQ .specialSword
CMP.w #$0003 : BEQ .specialSword