diff options
author | luckytyphlosion <alan.rj.huang@gmail.com> | 2015-08-30 17:55:02 -0400 |
---|---|---|
committer | luckytyphlosion <alan.rj.huang@gmail.com> | 2015-08-30 17:55:02 -0400 |
commit | d2ed7674f499b1fd6c4059da40b8b42c6bf96995 (patch) | |
tree | f581489b522fc647477d7b36dee072d553c44fd1 /engine/hp_bar.asm | |
parent | 3394d8320f35f524231aa13bd9cae34e22246a6d (diff) | |
parent | 1a987d1e1ab96ca9553d4253c72858057332a03a (diff) |
Merge branch 'master' of https://github.com/iimarckus/pokered
Doesn't build.
Diffstat (limited to 'engine/hp_bar.asm')
-rwxr-xr-x | engine/hp_bar.asm | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/engine/hp_bar.asm b/engine/hp_bar.asm index 333b0b90..792661ab 100755 --- a/engine/hp_bar.asm +++ b/engine/hp_bar.asm @@ -143,7 +143,7 @@ UpdateHPBar_AnimateHPBar: ; fab1 (3:7ab1) push de ld d, $6 call DrawHPBar - ld c, $2 + ld c, 2 call DelayFrames pop de ld a, [wHPBarDelta] ; +1 or -1 @@ -205,33 +205,34 @@ UpdateHPBar_PrintHPNumber: ; faf5 (3:7af5) push de ld a, [wHPBarType] and a - jr z, .asm_fb2d + jr z, .done ; don't print number in enemy HUD +; convert from little-endian to big-endian for PrintNumber ld a, [wHPBarOldHP] - ld [wcef1], a - ld a, [wHPBarOldHP+1] - ld [wcef0], a + ld [wHPBarTempHP + 1], a + ld a, [wHPBarOldHP + 1] + ld [wHPBarTempHP], a push hl ld a, [hFlags_0xFFF6] bit 0, a jr z, .asm_fb15 ld de, $9 - jr .asm_fb18 + jr .next .asm_fb15 ld de, $15 -.asm_fb18 +.next add hl, de push hl - ld a, $7f + ld a, " " ld [hli], a ld [hli], a ld [hli], a pop hl - ld de, wcef0 - ld bc, $203 + ld de, wHPBarTempHP + lb bc, 2, 3 call PrintNumber call DelayFrame pop hl -.asm_fb2d +.done pop de pop af ret |