From d61c82bfdcfb65f32f6e3a81eb7df57b5a734ac0 Mon Sep 17 00:00:00 2001 From: Myramong Date: Mon, 10 Sep 2018 09:15:32 -0300 Subject: [PATCH] Draw bomb/arrow count to hud a little faster. --- hooks.asm | 16 +++++----- pendantcrystalhud.asm | 73 ++++++++++++++++++------------------------- 2 files changed, 39 insertions(+), 50 deletions(-) diff --git a/hooks.asm b/hooks.asm index 8f7f5b8..012104b 100755 --- a/hooks.asm +++ b/hooks.asm @@ -1188,17 +1188,17 @@ org $0DFC77 ; <- 6FC77 - yes these are both the correct address - kkat JSL.l OnDrawHud BRA $27 -org $0DFCB8 ; <- 6FCB8 -JSL.l DrawBombTens ; nudge bomb 10s digit right -org $0DFCC4 ; <- 6FCC4 -JSL.l DrawBombOnes ; nudge bomb 1s digit right +org $0DFCAE ; <- 6FCAE +JSL.l DrawBombCount ; nudge bomb digits right +BRA + +NOP #$14 : + ; #20 -org $0DFCDC ; <- 6FCDC -JSL.l DrawArrowTens +org $0DFCD2 ; <- 6FCD2 +JSL.l DrawArrowCount +BRA + +NOP #$14 : + ; #20 -org $0DFCE8 ; <- 6FCE8 -JSL.l DrawArrowOnes ;org $0DFD0A ; <- 6FD0A - headsup_display.asm : 900 ;STA $7EC766 ; nudge key digit right diff --git a/pendantcrystalhud.asm b/pendantcrystalhud.asm index fe27f5c..88d2d84 100644 --- a/pendantcrystalhud.asm +++ b/pendantcrystalhud.asm @@ -242,53 +242,42 @@ RTL ;$388 = Turtle Rock ;$389 = Ganon's Tower ;-------------------------------------------------------------------------------- -!INFINITE_ARROWS = "$7F50C8" -DrawArrowTens: - PHA : LDA.l ArrowMode : AND.w #$00FF : BNE + - LDA !INFINITE_ARROWS : AND.w #$00FF : BEQ .finite - .infinite - PLA : LDA.w #$2431 : STA $7EC760 : RTL - .finite - PLA : STA $7EC760 : RTL - + - PLA -RTL -;-------------------------------------------------------------------------------- -DrawArrowOnes: - PHA : LDA.l ArrowMode : AND.w #$00FF : BNE + - LDA !INFINITE_ARROWS : AND.w #$00FF : BEQ .finite - .infinite - PLA : LDA.w #$2432 : STA $7EC762 : RTL - .finite - PLA : STA $7EC762 : RTL - + - PLA -RTL -;-------------------------------------------------------------------------------- -;-------------------------------------------------------------------------------- !INFINITE_BOMBS = "$7F50C9" -DrawBombTens: - PHA ;;; LDA.l ArrowMode : AND.w #$00FF : BNE + - LDA !INFINITE_BOMBS : AND.w #$00FF : BEQ .finite - .infinite - PLA : LDA.w #$2431 : STA $7EC75A : RTL - .finite - PLA : STA $7EC75A : RTL - + - PLA +DrawBombCount: + LDA !INFINITE_BOMBS : BNE .infinite + .finite + REP #$30 + ; $04 & $05 are set by the game's own HexToDecimal code, immediately before this + LDA.b $04 : AND #$00FF : ORA #$2400 : STA $7EC75A ; Draw bombs 10 digit + LDA.b $05 : AND #$00FF : ORA #$2400 : STA $7EC75C ; Draw bombs 1 digit + RTL + + .infinite + REP #$30 + LDA.w #$2431 : STA $7EC75A ; infinity symbol (left half) + INC A : STA $7EC75C ; infinity symbol (right half) RTL -;-------------------------------------------------------------------------------- -DrawBombOnes: - PHA ;;; LDA.l ArrowMode : AND.w #$00FF : BNE + - LDA !INFINITE_BOMBS : AND.w #$00FF : BEQ .finite - .infinite - PLA : LDA.w #$2432 : STA $7EC75C : RTL + +!INFINITE_ARROWS = "$7F50C8" +DrawArrowCount: + LDA.l ArrowMode : BNE + + LDA !INFINITE_ARROWS : BNE .infinite .finite - PLA : STA $7EC75C : RTL + ; $04 & $05 are set by the game's own HexToDecimal code, immediately before this + REP #$30 + LDA.b $04 : AND #$00FF : ORA #$2400 : STA $7EC760 ; Draw arrows 10 digit + LDA.b $05 : AND #$00FF : ORA #$2400 : STA $7EC762 ; Draw arrows 1 digit + RTL + + .infinite + REP #$30 + LDA.w #$2431 : STA $7EC760 ; infinity symbol (left half) + INC A : STA $7EC762 ; infinity symbol (right half) + RTL + - PLA + REP #$30 RTL -;-------------------------------------------------------------------------------- + DrawBootsInMenuLocation: LDA.l HUDDungeonItems : BNE + LDA.w #$1608 : STA $00