diff options
author | YamaArashi <shadow962@live.com> | 2016-06-11 17:30:20 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-06-11 17:30:20 -0700 |
commit | 7e12ca56a8d04d33f3945bb5b981c311fcdd44ef (patch) | |
tree | 8a61aee33d6b47e960dc71dbb89c096622bbdc95 /engine/hp_bar.asm | |
parent | d8dae96f35222ababb9688ce2aed3292515f8ca2 (diff) | |
parent | 7f34e28f242ee4d0caba0bd96b040811dcb86c50 (diff) |
Merge pull request #133 from YamaArashi/master
Remove address comments
Diffstat (limited to 'engine/hp_bar.asm')
-rwxr-xr-x | engine/hp_bar.asm | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/engine/hp_bar.asm b/engine/hp_bar.asm index 792661ab..3fa01208 100755 --- a/engine/hp_bar.asm +++ b/engine/hp_bar.asm @@ -1,9 +1,9 @@ -HPBarLength: ; f9dc (3:79dc) +HPBarLength: call GetPredefRegisters ; calculates bc * 48 / de, the number of pixels the HP bar has ; the result is always at least 1 -GetHPBarLength: ; f9df (3:79df) +GetHPBarLength: push hl xor a ld hl, H_MULTIPLICAND @@ -45,7 +45,7 @@ GetHPBarLength: ; f9df (3:79df) ret ; predef $48 -UpdateHPBar: ; fa1d (3:7a1d) +UpdateHPBar: UpdateHPBar2: push hl ld hl, wHPBarOldHP @@ -136,7 +136,7 @@ UpdateHPBar2: ; animates the HP bar going up or down for (a) ticks (two waiting frames each) ; stops prematurely if bar is filled up ; e: current health (in pixels) to start with -UpdateHPBar_AnimateHPBar: ; fab1 (3:7ab1) +UpdateHPBar_AnimateHPBar: push hl .barAnimationLoop push af @@ -162,7 +162,7 @@ UpdateHPBar_AnimateHPBar: ; fab1 (3:7ab1) ret ; compares old HP and new HP and sets c and z flags accordingly -UpdateHPBar_CompareNewHPToOldHP: ; fad1 (3:7ad1) +UpdateHPBar_CompareNewHPToOldHP: ld a, d sub b ret nz @@ -171,7 +171,7 @@ UpdateHPBar_CompareNewHPToOldHP: ; fad1 (3:7ad1) ret ; calcs HP difference between bc and de (into de) -UpdateHPBar_CalcHPDifference: ; fad7 (3:7ad7) +UpdateHPBar_CalcHPDifference: ld a, d sub b jr c, .oldHPGreater @@ -200,7 +200,7 @@ UpdateHPBar_CalcHPDifference: ; fad7 (3:7ad7) ld de, $0 ret -UpdateHPBar_PrintHPNumber: ; faf5 (3:7af5) +UpdateHPBar_PrintHPNumber: push af push de ld a, [wHPBarType] @@ -240,7 +240,7 @@ UpdateHPBar_PrintHPNumber: ; faf5 (3:7af5) ; calcs number of HP bar pixels for old and new HP value ; d: new pixels ; e: old pixels -UpdateHPBar_CalcOldNewHPBarPixels: ; fb30 (3:7b30) +UpdateHPBar_CalcOldNewHPBarPixels: push hl ld hl, wHPBarMaxHP ld a, [hli] ; max HP into de |