Color bombs in the HUD according to bomb level in bomb-only mode
This commit is contained in:
@@ -2755,6 +2755,10 @@ org $0DEE05 ; equipment.asm@2065 (LDA $7EF359 : AND.w #$00FF : CMP.w #$00FF : ..
|
||||
JSL DrawSwordInMenu
|
||||
BRA + : NOP #16 : +
|
||||
;--------------------------------------------------------------------------------
|
||||
org $0DFA92 ; headsup_display.asm@622 (PDB : LDA.w #$0149 : ...)
|
||||
JSL DrawBombOnHud
|
||||
BRA + : NOP #8 : +
|
||||
;--------------------------------------------------------------------------------
|
||||
org $0DFC51 ; is this being used? I hope not! let's find out if anything breaks!
|
||||
db $F5, $20, $F5, $20, $F5, $20, $F5, $20
|
||||
db $B2, $3C, $B3, $3C, $C2, $3C, $17, $3C
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -265,3 +265,20 @@ DrawSwordInMenu:
|
||||
LDA.w #$FC51 : STA $04
|
||||
RTL
|
||||
;--------------------------------------------------------------------------------
|
||||
BombIcon:
|
||||
dw $207F, $207F, $3C88, $3C89, $2C88, $2C89, $2488, $2489, $2888, $2889,$2888, $2889
|
||||
DrawBombOnHud:
|
||||
PHB
|
||||
LDA.w #$0149
|
||||
LDX.w #$86B0
|
||||
LDY.w #$C700
|
||||
MVN $7E, $21
|
||||
PLB
|
||||
|
||||
LDA.l SpecialBombs : AND.w #$00FF : BEQ .regularBombs
|
||||
LDA.l !BOMB_LEVEL : AND.w #$00FF : ASL #2 : TAX
|
||||
LDA.l BombIcon, X : STA.l $7EC71A
|
||||
LDA.l BombIcon+2, X : STA.l $7EC71C
|
||||
.regularBombs
|
||||
RTL
|
||||
;--------------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user