diff options
author | Rangi <remy.oukaour+rangi42@gmail.com> | 2020-07-06 19:03:05 -0400 |
---|---|---|
committer | Rangi <remy.oukaour+rangi42@gmail.com> | 2020-07-06 19:03:05 -0400 |
commit | 772fcc7588a4e1fbe146a02b429cf64282c81dcb (patch) | |
tree | f491fa1d38e37ab10534b3f18422e0149ad0deca /engine/gfx/hp_bar.asm | |
parent | c480632d5494d04f7f5f0298a31877a2293b564e (diff) |
Specify the ldh instruction, don't turn ld into ldh
Diffstat (limited to 'engine/gfx/hp_bar.asm')
-rwxr-xr-x | engine/gfx/hp_bar.asm | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/engine/gfx/hp_bar.asm b/engine/gfx/hp_bar.asm index 4b91da58..b7bd97f2 100755 --- a/engine/gfx/hp_bar.asm +++ b/engine/gfx/hp_bar.asm @@ -21,22 +21,22 @@ GetHPBarLength: rr e srl d rr e - ld a, [hMultiplicand+1] + ldh a, [hMultiplicand+1] ld b, a - ld a, [hMultiplicand+2] + ldh a, [hMultiplicand+2] srl b ; divide multiplication result as well rr a srl b rr a - ld [hMultiplicand+2], a + ldh [hMultiplicand+2], a ld a, b - ld [hMultiplicand+1], a + ldh [hMultiplicand+1], a .maxHPSmaller256 ld a, e - ld [hDivisor], a + ldh [hDivisor], a ld b, $4 call Divide - ld a, [hMultiplicand+2] + ldh a, [hMultiplicand+2] ld e, a ; e = bc * 48 / de (num of pixels of HP bar) pop hl and a @@ -213,7 +213,7 @@ UpdateHPBar_PrintHPNumber: ld a, [wHPBarOldHP + 1] ld [wHPBarTempHP], a push hl - ld a, [hFlagsFFF6] + ldh a, [hFlagsFFF6] bit 0, a jr z, .asm_fb15 ld de, $9 |