Color bombs in the HUD according to bomb level in bomb-only mode

This commit is contained in:
2021-07-15 16:45:37 -07:00
parent 59affe8b93
commit 6da1227578
3 changed files with 30 additions and 0 deletions

View File

@@ -8,6 +8,9 @@ SEP #$30
LDA !INFINITE_BOMBS : BNE .infinite_bombs
.finite_bombs
LDA.l SpecialBombs : BEQ .normal
LDA.l !BOMB_LEVEL : BEQ .no_bombs
.normal
LDA.l $7EF343 ; bombs
JSR HudHexToDec2Digit ;requires 8 bit registers!
REP #$20
@@ -15,6 +18,12 @@ SEP #$30
LDX.b $07 : TXA : ORA.w #$2400 : STA !BOMBCOUNT_DRAW_ADDRESS+2 ; Draw bombs 1 digit
BRA +
.no_bombs
REP #$20
LDA.w #$207F : STA !BOMBCOUNT_DRAW_ADDRESS
STA !BOMBCOUNT_DRAW_ADDRESS+2
BRA +
.infinite_bombs
REP #$20
LDA.w #$2431 : STA !BOMBCOUNT_DRAW_ADDRESS ; infinity (left half)