mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2024-11-16 11:27:33 -08:00
129 lines
2.9 KiB
NASM
129 lines
2.9 KiB
NASM
INCLUDE "gfx/font.asm"
|
|
|
|
_LoadStandardFont::
|
|
ld de, Font
|
|
ld hl, vTiles1
|
|
lb bc, BANK(Font), 112 ; "A" to "9"
|
|
ldh a, [rLCDC]
|
|
bit rLCDC_ENABLE, a
|
|
jp z, Copy1bpp
|
|
|
|
ld de, Font
|
|
ld hl, vTiles1
|
|
lb bc, BANK(Font), 32 ; "A" to...
|
|
call Get1bppViaHDMA
|
|
ld de, Font + 32 * LEN_1BPP_TILE
|
|
ld hl, vTiles1 tile $20
|
|
lb bc, BANK(Font), 32
|
|
call Get1bppViaHDMA
|
|
ld de, Font + 64 * LEN_1BPP_TILE
|
|
ld hl, vTiles1 tile $40
|
|
lb bc, BANK(Font), 32
|
|
call Get1bppViaHDMA
|
|
ld de, Font + 96 * LEN_1BPP_TILE
|
|
ld hl, vTiles1 tile $60
|
|
lb bc, BANK(Font), 16 ; ..."9"
|
|
call Get1bppViaHDMA
|
|
ret
|
|
|
|
_LoadFontsBattleExtra::
|
|
ld de, FontBattleExtra
|
|
ld hl, vTiles2 tile $60
|
|
lb bc, BANK(FontBattleExtra), 25
|
|
call Get2bppViaHDMA
|
|
jr _LoadFrame
|
|
|
|
_LoadFrame::
|
|
ld a, [wTextboxFrame]
|
|
maskbits NUM_FRAMES
|
|
ld bc, TEXTBOX_FRAME_TILES * LEN_1BPP_TILE
|
|
ld hl, Frames
|
|
call AddNTimes
|
|
ld d, h
|
|
ld e, l
|
|
ld hl, vTiles0 tile "┌" ; $f0
|
|
lb bc, BANK(Frames), TEXTBOX_FRAME_TILES ; "┌" to "┘"
|
|
call Get1bppViaHDMA
|
|
ld hl, vTiles2 tile " " ; $7f
|
|
ld de, TextboxSpaceGFX
|
|
lb bc, BANK(TextboxSpaceGFX), 1
|
|
call Get1bppViaHDMA
|
|
ret
|
|
|
|
LoadBattleFontsHPBar:
|
|
ld de, FontBattleExtra
|
|
ld hl, vTiles2 tile $60
|
|
lb bc, BANK(FontBattleExtra), 12
|
|
call Get2bppViaHDMA
|
|
ld hl, vTiles2 tile $70
|
|
ld de, FontBattleExtra + 16 tiles ; "<DO>"
|
|
lb bc, BANK(FontBattleExtra), 3 ; "<DO>" to "『"
|
|
call Get2bppViaHDMA
|
|
call _LoadFrame
|
|
|
|
LoadHPBar:
|
|
ld de, EnemyHPBarBorderGFX
|
|
ld hl, vTiles2 tile $6c
|
|
lb bc, BANK(EnemyHPBarBorderGFX), 4
|
|
call Get1bppViaHDMA
|
|
ld de, HPExpBarBorderGFX
|
|
ld hl, vTiles2 tile $73
|
|
lb bc, BANK(HPExpBarBorderGFX), 6
|
|
call Get1bppViaHDMA
|
|
ld de, ExpBarGFX
|
|
ld hl, vTiles2 tile $55
|
|
lb bc, BANK(ExpBarGFX), 9
|
|
call Get2bppViaHDMA
|
|
ret
|
|
|
|
StatsScreen_LoadFont:
|
|
call _LoadFontsBattleExtra
|
|
ld de, EnemyHPBarBorderGFX
|
|
ld hl, vTiles2 tile $6c
|
|
lb bc, BANK(EnemyHPBarBorderGFX), 4
|
|
call Get1bppViaHDMA
|
|
ld de, HPExpBarBorderGFX
|
|
ld hl, vTiles2 tile $78
|
|
lb bc, BANK(HPExpBarBorderGFX), 1
|
|
call Get1bppViaHDMA
|
|
ld de, HPExpBarBorderGFX + 3 * LEN_1BPP_TILE
|
|
ld hl, vTiles2 tile $76
|
|
lb bc, BANK(HPExpBarBorderGFX), 2
|
|
call Get1bppViaHDMA
|
|
ld de, ExpBarGFX
|
|
ld hl, vTiles2 tile $55
|
|
lb bc, BANK(ExpBarGFX), 8
|
|
call Get2bppViaHDMA
|
|
LoadStatsScreenPageTilesGFX:
|
|
ld de, StatsScreenPageTilesGFX
|
|
ld hl, vTiles2 tile $31
|
|
lb bc, BANK(StatsScreenPageTilesGFX), 17
|
|
call Get2bppViaHDMA
|
|
ret
|
|
|
|
LoadInversedFont::
|
|
ld de, FontInversed
|
|
ld hl, vTiles1
|
|
lb bc, BANK(FontInversed), 112 ; "A" to "9"
|
|
ldh a, [rLCDC]
|
|
bit rLCDC_ENABLE, a
|
|
jp z, Copy1bpp
|
|
|
|
ld de, FontInversed
|
|
ld hl, vTiles1
|
|
lb bc, BANK(FontInversed), 32 ; "A" to...
|
|
call Get1bppViaHDMA
|
|
ld de, FontInversed + 32 * LEN_1BPP_TILE
|
|
ld hl, vTiles1 tile $20
|
|
lb bc, BANK(FontInversed), 32
|
|
call Get1bppViaHDMA
|
|
ld de, FontInversed + 64 * LEN_1BPP_TILE
|
|
ld hl, vTiles1 tile $40
|
|
lb bc, BANK(FontInversed), 32
|
|
call Get1bppViaHDMA
|
|
ld de, FontInversed + 96 * LEN_1BPP_TILE
|
|
ld hl, vTiles1 tile $60
|
|
lb bc, BANK(FontInversed), 16 ; ..."9"
|
|
call Get1bppViaHDMA
|
|
ret
|