diff options
author | xCrystal <rgr.crystal@gmail.com> | 2015-04-01 11:23:27 +0200 |
---|---|---|
committer | xCrystal <rgr.crystal@gmail.com> | 2015-04-01 17:05:10 +0200 |
commit | e74dce24b4bbb0d0d23a1724932b289050b66d4a (patch) | |
tree | ac695b04a00f7af920e1e84b88adbcb0fce84842 /engine/menu/status_screen.asm | |
parent | 9d93b5b630eaabd57f213c9dc5761223ff7445ec (diff) |
Rename battle files and split move effects Part 1
1.asm, 4.asm, and 4_2.asm
Diffstat (limited to 'engine/menu/status_screen.asm')
-rwxr-xr-x | engine/menu/status_screen.asm | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/engine/menu/status_screen.asm b/engine/menu/status_screen.asm index f95a0710..b5254694 100755 --- a/engine/menu/status_screen.asm +++ b/engine/menu/status_screen.asm @@ -1,3 +1,67 @@ +DrawHP: ; 128ef (4:68ef) +; Draws the HP bar in the stats screen + call GetPredefRegisters + ld a, $1 + jr DrawHP_ + +DrawHP2: ; 128f6 (4:68f6) +; Draws the HP bar in the party screen + call GetPredefRegisters + ld a, $2 + +DrawHP_: ; 128fb (4:68fb) + ld [wHPBarType], a + push hl + ld a, [wLoadedMonHP] + ld b, a + ld a, [wLoadedMonHP + 1] + ld c, a + or b + jr nz, .nonzeroHP + xor a + ld c, a + ld e, a + ld a, $6 + ld d, a + jp .drawHPBarAndPrintFraction +.nonzeroHP + ld a, [wLoadedMonMaxHP] + ld d, a + ld a, [wLoadedMonMaxHP + 1] + ld e, a + predef HPBarLength + ld a, $6 + ld d, a + ld c, a +.drawHPBarAndPrintFraction + pop hl + push de + push hl + push hl + call DrawHPBar + pop hl + ld a, [hFlags_0xFFF6] + bit 0, a + jr z, .printFractionBelowBar + ld bc, $9 ; right of bar + jr .printFraction +.printFractionBelowBar + ld bc, SCREEN_WIDTH + 1 ; below bar +.printFraction + add hl, bc + ld de, wLoadedMonHP + ld bc, $203 + call PrintNumber + ld a, "/" + ld [hli], a + ld de, wLoadedMonMaxHP + ld bc, $203 + call PrintNumber + pop hl + pop de + ret + + ; Predef 0x37 StatusScreen: ; 12953 (4:6953) call LoadMonData |