Rename battle files and split move effects Part 1

1.asm, 4.asm, and 4_2.asm
This commit is contained in:
xCrystal 2015-04-01 11:23:27 +02:00
parent 9d93b5b630
commit e74dce24b4
14 changed files with 510 additions and 507 deletions

View file

@ -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