summaryrefslogtreecommitdiff
path: root/engine/anim_hp_bar.asm
diff options
context:
space:
mode:
Diffstat (limited to 'engine/anim_hp_bar.asm')
-rwxr-xr-xengine/anim_hp_bar.asm6
1 files changed, 5 insertions, 1 deletions
diff --git a/engine/anim_hp_bar.asm b/engine/anim_hp_bar.asm
index 6272ff7ea..78062b547 100755
--- a/engine/anim_hp_bar.asm
+++ b/engine/anim_hp_bar.asm
@@ -293,7 +293,7 @@ HPBarAnim_PaletteUpdate: ; d7b4
call SetHPPal
ld a, [wCurHPAnimPal]
ld c, a
- callba ApplyHPBarPals
+ farcall ApplyHPBarPals
ret
; d7c9
@@ -382,7 +382,10 @@ ShortHPBar_CalcPixelFrame: ; d839
and a
jr z, .return_zero
call AddNTimes
+
ld b, 0
+; This routine is buggy. If [wCurHPAnimMaxHP] * [wCurHPBarPixels] is divisible
+; by 48, the loop runs one extra time. To fix, uncomment the line below.
.loop
ld a, l
sub 6 * 8
@@ -390,6 +393,7 @@ ShortHPBar_CalcPixelFrame: ; d839
ld a, h
sbc $0
ld h, a
+ ; jr z, .done
jr c, .done
inc b
jr .loop