utilities: Rewrite prog bow narrow sprite overflow to check sram

This uses Bonta's method which is more efficient and reliable when it
comes to bow state and potential mixture of progressive,
none-progressive, and silver arrows upgrade.
This commit is contained in:
cassidy
2021-09-08 01:00:55 -04:00
parent c37dcec6ea
commit aca809862d

View File

@@ -328,17 +328,10 @@ IsNarrowSprite:
JSL.l GetRNGItemSingle : JMP .continue JSL.l GetRNGItemSingle : JMP .continue
++ CMP.b #$63 : BNE ++ ; RNG Item (Multi) ++ CMP.b #$63 : BNE ++ ; RNG Item (Multi)
JSL.l GetRNGItemMulti JSL.l GetRNGItemMulti
++ CMP.b #$64 : BEQ .progressivebow ; Progressive Bow ++ CMP.b #$64 : BEQ + ; Progressive Bow
CMP.b #$65 : BNE .continue ; Progressive Bow (alt) CMP.b #$65 : BNE .continue ; Progressive Bow (alt)
.progressivebow + : LDA $7EF340 : INC : LSR
LDA $7EF38E : BIT #$A0 : BEQ .continue ; No Progressive Bows CMP.l ProgressiveBowLimit : !BLT +
LDX.b #$0 ; Bow counter
CMP #$80 : BEQ + ; We have only one of two
CMP #$20 : BEQ + ; progressive bows
INX
+
INX
TXA : CMP.l ProgressiveBowLimit : !BLT .continue
LDA.l ProgressiveBowReplacement LDA.l ProgressiveBowReplacement
JSL.l IsNarrowSprite JSL.l IsNarrowSprite
JMP .done JMP .done