pokecrystal-board/engine/gfx/load_font.asm

103 lines
2.3 KiB
NASM
Raw Normal View History

2018-01-15 08:06:17 -08:00
INCLUDE "gfx/font.asm"
2018-06-24 07:09:41 -07:00
_LoadStandardFont::
2018-01-15 08:06:17 -08:00
ld de, Font
ld hl, vTiles1
lb bc, BANK(Font), 112 ; "A" to "9"
ldh a, [rLCDC]
2018-01-15 08:06:17 -08:00
bit rLCDC_ENABLE, a
jp z, Copy1bpp
ld de, Font
ld hl, vTiles1
lb bc, BANK(Font), 32 ; "A" to...
call Get1bppViaHDMA
2018-01-15 08:06:17 -08:00
ld de, Font + 32 * LEN_1BPP_TILE
ld hl, vTiles1 tile $20
lb bc, BANK(Font), 32
call Get1bppViaHDMA
2018-01-15 08:06:17 -08:00
ld de, Font + 64 * LEN_1BPP_TILE
ld hl, vTiles1 tile $40
lb bc, BANK(Font), 32
call Get1bppViaHDMA
2018-01-15 08:06:17 -08:00
ld de, Font + 96 * LEN_1BPP_TILE
ld hl, vTiles1 tile $60
lb bc, BANK(Font), 16 ; ..."9"
call Get1bppViaHDMA
2018-01-15 08:06:17 -08:00
ret
2018-06-24 07:09:41 -07:00
_LoadFontsBattleExtra::
2018-01-15 08:06:17 -08:00
ld de, FontBattleExtra
ld hl, vTiles2 tile $60
lb bc, BANK(FontBattleExtra), 25
call Get2bppViaHDMA
jr _LoadFrame
2018-01-15 08:06:17 -08:00
_LoadFrame::
2019-04-08 05:15:10 -07:00
ld a, [wTextboxFrame]
2018-01-16 14:27:50 -08:00
maskbits NUM_FRAMES
2021-03-16 14:53:42 -07:00
ld bc, TEXTBOX_FRAME_TILES * LEN_1BPP_TILE
2018-01-15 08:06:17 -08:00
ld hl, Frames
call AddNTimes
ld d, h
ld e, l
ld hl, vTiles0 tile "┌" ; $f0
2021-03-16 14:53:42 -07:00
lb bc, BANK(Frames), TEXTBOX_FRAME_TILES ; "┌" to "┘"
call Get1bppViaHDMA
ld hl, vTiles2 tile " " ; $7f
2019-04-08 05:15:10 -07:00
ld de, TextboxSpaceGFX
lb bc, BANK(TextboxSpaceGFX), 1
call Get1bppViaHDMA
2018-01-15 08:06:17 -08:00
ret
2018-06-24 07:09:41 -07:00
LoadBattleFontsHPBar:
2018-01-15 08:06:17 -08:00
ld de, FontBattleExtra
ld hl, vTiles2 tile $60
lb bc, BANK(FontBattleExtra), 12
call Get2bppViaHDMA
2018-01-15 08:06:17 -08:00
ld hl, vTiles2 tile $70
2018-01-19 17:48:33 -08:00
ld de, FontBattleExtra + 16 tiles ; "<DO>"
lb bc, BANK(FontBattleExtra), 3 ; "<DO>" to "『"
call Get2bppViaHDMA
call _LoadFrame
2018-01-15 08:06:17 -08:00
2018-06-24 07:09:41 -07:00
LoadHPBar:
2018-01-15 08:06:17 -08:00
ld de, EnemyHPBarBorderGFX
ld hl, vTiles2 tile $6c
lb bc, BANK(EnemyHPBarBorderGFX), 4
call Get1bppViaHDMA
2018-01-15 08:06:17 -08:00
ld de, HPExpBarBorderGFX
ld hl, vTiles2 tile $73
lb bc, BANK(HPExpBarBorderGFX), 6
call Get1bppViaHDMA
2018-01-15 08:06:17 -08:00
ld de, ExpBarGFX
ld hl, vTiles2 tile $55
lb bc, BANK(ExpBarGFX), 9
call Get2bppViaHDMA
2018-01-15 08:06:17 -08:00
ret
2018-06-24 07:09:41 -07:00
StatsScreen_LoadFont:
2018-01-15 08:06:17 -08:00
call _LoadFontsBattleExtra
ld de, EnemyHPBarBorderGFX
ld hl, vTiles2 tile $6c
lb bc, BANK(EnemyHPBarBorderGFX), 4
call Get1bppViaHDMA
2018-01-15 08:06:17 -08:00
ld de, HPExpBarBorderGFX
ld hl, vTiles2 tile $78
lb bc, BANK(HPExpBarBorderGFX), 1
call Get1bppViaHDMA
2018-01-15 08:06:17 -08:00
ld de, HPExpBarBorderGFX + 3 * LEN_1BPP_TILE
ld hl, vTiles2 tile $76
lb bc, BANK(HPExpBarBorderGFX), 2
call Get1bppViaHDMA
2018-01-15 08:06:17 -08:00
ld de, ExpBarGFX
ld hl, vTiles2 tile $55
lb bc, BANK(ExpBarGFX), 8
call Get2bppViaHDMA
2018-06-24 07:09:41 -07:00
LoadStatsScreenPageTilesGFX:
2018-01-15 08:06:17 -08:00
ld de, StatsScreenPageTilesGFX
ld hl, vTiles2 tile $31
lb bc, BANK(StatsScreenPageTilesGFX), 17
call Get2bppViaHDMA
2018-01-15 08:06:17 -08:00
ret