From 711866d9b320afda7bce5b6b7f3fcbb8fe75ab79 Mon Sep 17 00:00:00 2001 From: Kevin Cathcart Date: Thu, 15 Feb 2018 11:41:16 -0500 Subject: [PATCH] Update HUD arrow drawing code Draw arrows (in normal spot) in retro hud only if you have arrows and draw the specific type you have --- newitems.asm | 28 +++++++++++++++++++--------- 1 file changed, 19 insertions(+), 9 deletions(-) diff --git a/newitems.asm b/newitems.asm index 9661545..2285ce1 100755 --- a/newitems.asm +++ b/newitems.asm @@ -857,21 +857,31 @@ RTL DrawHUDArrows: LDA.l ArrowMode : BEQ .normal .rupee_arrows - LDA.b #$7F : STA $7EC720 ; draw no arrows - LDA.b #$24 : STA $7EC721 - LDA.b #$7F : STA $7EC722 - LDA.b #$24 : STA $7EC723 - LDA.b #$86 : STA $7EC714 ; draw silver arrow marker - LDA.b #$24 : STA $7EC715 - LDA.b #$87 : STA $7EC716 - LDA.b #$24 : STA $7EC717 + LDA $7EF377 : BEQ .none ; assuming silvers will increment this. if we go with something else, reorder these checks + LDA $7EF340 : BNE + + LDA !INVENTORY_SWAP_2 : AND.b #$40 : BNE .silver + BRA .wooden + + CMP.b #03 : !BGE .silver + + .wooden + LDA.b #$A7 : STA $7EC720 ; draw wooden arrow marker + LDA.b #$20 : STA $7EC721 + LDA.b #$A9 : STA $7EC722 + LDA.b #$20 : STA $7EC723 RTL - .normal + .normal ; in normal arrow mode this function is only ever called for silvers + .silver LDA.b #$86 : STA $7EC720 ; draw silver arrow marker LDA.b #$24 : STA $7EC721 LDA.b #$87 : STA $7EC722 LDA.b #$24 : STA $7EC723 +RTL + .none + LDA.b #$7F : STA $7EC720 ; draw no arrow marker + LDA.b #$24 : STA $7EC721 + LDA.b #$7F : STA $7EC722 + LDA.b #$24 : STA $7EC723 RTL ;-------------------------------------------------------------------------------- !RNG_ITEM = "$7EF450"