You've already forked pokecrystal-board
mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2025-09-08 08:13:02 -07:00
Clean up bugs commented in the source code (#912)
Co-authored-by: Rangi <remy.oukaour+rangi42@gmail.com>
This commit is contained in:
@@ -179,16 +179,12 @@ LongAnim_UpdateVariables:
|
||||
ld c, a
|
||||
ld a, [hli]
|
||||
ld b, a
|
||||
; This routine is buggy. The result from ComputeHPBarPixels is stored
|
||||
; in e. However, the pop de opcode deletes this result before it is even
|
||||
; used. The game then proceeds as though it never deleted that output.
|
||||
; To fix, uncomment the line below.
|
||||
; BUG: HP bar animation is slow for high HP (see docs/bugs_and_glitches.md)
|
||||
call ComputeHPBarPixels
|
||||
; ld a, e
|
||||
pop bc
|
||||
pop de
|
||||
pop hl
|
||||
ld a, e ; Comment or delete this line to fix the above bug.
|
||||
ld a, e
|
||||
ld hl, wCurHPBarPixels
|
||||
cp [hl]
|
||||
jr z, .loop
|
||||
@@ -373,17 +369,14 @@ ShortHPBar_CalcPixelFrame:
|
||||
call AddNTimes
|
||||
|
||||
ld b, 0
|
||||
; This routine is buggy. If [wCurHPAnimMaxHP] * [wCurHPBarPixels] is
|
||||
; divisible by HP_BAR_LENGTH_PX, the loop runs one extra time.
|
||||
; To fix, uncomment the line below.
|
||||
.loop
|
||||
; BUG: HP bar animation off-by-one error for low HP (see docs/bugs_and_glitches.md)
|
||||
ld a, l
|
||||
sub HP_BAR_LENGTH_PX
|
||||
ld l, a
|
||||
ld a, h
|
||||
sbc $0
|
||||
ld h, a
|
||||
; jr z, .done
|
||||
jr c, .done
|
||||
inc b
|
||||
jr .loop
|
||||
|
||||
Reference in New Issue
Block a user