From aca809862d48ca42d70c51e0b83ff383116920c6 Mon Sep 17 00:00:00 2001 From: cassidy Date: Wed, 8 Sep 2021 01:00:55 -0400 Subject: [PATCH] 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. --- utilities.asm | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/utilities.asm b/utilities.asm index 6c2aae0..209cf58 100644 --- a/utilities.asm +++ b/utilities.asm @@ -328,20 +328,13 @@ IsNarrowSprite: JSL.l GetRNGItemSingle : JMP .continue ++ CMP.b #$63 : BNE ++ ; RNG Item (Multi) JSL.l GetRNGItemMulti - ++ CMP.b #$64 : BEQ .progressivebow ; Progressive Bow + ++ CMP.b #$64 : BEQ + ; Progressive Bow CMP.b #$65 : BNE .continue ; Progressive Bow (alt) - .progressivebow - LDA $7EF38E : BIT #$A0 : BEQ .continue ; No Progressive Bows - 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 - JSL.l IsNarrowSprite - JMP .done + + : LDA $7EF340 : INC : LSR + CMP.l ProgressiveBowLimit : !BLT + + LDA.l ProgressiveBowReplacement + JSL.l IsNarrowSprite + JMP .done .continue ;--------