2018-01-15 16:06:17 +00:00
|
|
|
INCLUDE "gfx/font.asm"
|
|
|
|
|
2020-06-21 20:27:43 +00:00
|
|
|
EnableHDMAForGraphics:
|
2020-06-17 14:39:17 +00:00
|
|
|
db FALSE
|
2018-01-15 16:06:17 +00:00
|
|
|
|
2020-06-21 20:27:43 +00:00
|
|
|
Get1bppOptionalHDMA: ; unreferenced
|
|
|
|
ld a, [EnableHDMAForGraphics]
|
2018-01-15 16:06:17 +00:00
|
|
|
and a
|
2020-05-18 15:59:48 +00:00
|
|
|
jp nz, Get1bppViaHDMA
|
2018-01-15 16:06:17 +00:00
|
|
|
jp Get1bpp
|
|
|
|
|
2020-06-21 20:27:43 +00:00
|
|
|
Get2bppOptionalHDMA: ; unreferenced
|
|
|
|
ld a, [EnableHDMAForGraphics]
|
2018-01-15 16:06:17 +00:00
|
|
|
and a
|
2020-05-18 15:59:48 +00:00
|
|
|
jp nz, Get2bppViaHDMA
|
2018-01-15 16:06:17 +00:00
|
|
|
jp Get2bpp
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
_LoadStandardFont::
|
2018-01-15 16:06:17 +00:00
|
|
|
ld de, Font
|
|
|
|
ld hl, vTiles1
|
|
|
|
lb bc, BANK(Font), 128 ; "A" to "9"
|
2018-08-25 18:28:22 +00:00
|
|
|
ldh a, [rLCDC]
|
2018-01-15 16:06:17 +00:00
|
|
|
bit rLCDC_ENABLE, a
|
|
|
|
jp z, Copy1bpp
|
|
|
|
|
|
|
|
ld de, Font
|
|
|
|
ld hl, vTiles1
|
|
|
|
lb bc, BANK(Font), 32 ; "A" to "]"
|
2020-05-18 15:59:48 +00:00
|
|
|
call Get1bppViaHDMA
|
2018-01-15 16:06:17 +00:00
|
|
|
ld de, Font + 32 * LEN_1BPP_TILE
|
|
|
|
ld hl, vTiles1 tile $20
|
|
|
|
lb bc, BANK(Font), 32 ; "a" to $bf
|
2020-05-18 15:59:48 +00:00
|
|
|
call Get1bppViaHDMA
|
2018-01-15 16:06:17 +00:00
|
|
|
ld de, Font + 64 * LEN_1BPP_TILE
|
|
|
|
ld hl, vTiles1 tile $40
|
|
|
|
lb bc, BANK(Font), 32 ; "Ä" to "←"
|
2020-05-18 15:59:48 +00:00
|
|
|
call Get1bppViaHDMA
|
2018-01-15 16:06:17 +00:00
|
|
|
ld de, Font + 96 * LEN_1BPP_TILE
|
|
|
|
ld hl, vTiles1 tile $60
|
|
|
|
lb bc, BANK(Font), 32 ; "'" to "9"
|
2020-05-18 15:59:48 +00:00
|
|
|
call Get1bppViaHDMA
|
2018-01-15 16:06:17 +00:00
|
|
|
ret
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
_LoadFontsExtra1::
|
2018-01-15 16:06:17 +00:00
|
|
|
ld de, FontsExtra_SolidBlackGFX
|
2018-01-19 07:30:19 +00:00
|
|
|
ld hl, vTiles2 tile "■" ; $60
|
2018-01-15 16:06:17 +00:00
|
|
|
lb bc, BANK(FontsExtra_SolidBlackGFX), 1
|
2020-05-18 15:59:48 +00:00
|
|
|
call Get1bppViaHDMA
|
2018-01-15 16:06:17 +00:00
|
|
|
ld de, PokegearPhoneIconGFX
|
2018-01-19 07:30:19 +00:00
|
|
|
ld hl, vTiles2 tile "☎" ; $62
|
2018-01-15 16:06:17 +00:00
|
|
|
lb bc, BANK(PokegearPhoneIconGFX), 1
|
2020-05-18 15:59:48 +00:00
|
|
|
call Get2bppViaHDMA
|
2018-01-20 01:48:33 +00:00
|
|
|
ld de, FontExtra + 3 tiles ; "<BOLD_D>"
|
2018-01-15 16:06:17 +00:00
|
|
|
ld hl, vTiles2 tile "<BOLD_D>"
|
|
|
|
lb bc, BANK(FontExtra), 22 ; "<BOLD_D>" to "ぉ"
|
2020-05-18 15:59:48 +00:00
|
|
|
call Get2bppViaHDMA
|
2018-01-15 16:06:17 +00:00
|
|
|
jr LoadFrame
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
_LoadFontsExtra2::
|
2018-01-15 16:06:17 +00:00
|
|
|
ld de, FontsExtra2_UpArrowGFX
|
|
|
|
ld hl, vTiles2 tile "▲" ; $61
|
|
|
|
ld b, BANK(FontsExtra2_UpArrowGFX)
|
|
|
|
ld c, 1
|
2020-05-18 15:59:48 +00:00
|
|
|
call Get2bppViaHDMA
|
2018-01-15 16:06:17 +00:00
|
|
|
ret
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
_LoadFontsBattleExtra::
|
2018-01-15 16:06:17 +00:00
|
|
|
ld de, FontBattleExtra
|
|
|
|
ld hl, vTiles2 tile $60
|
|
|
|
lb bc, BANK(FontBattleExtra), 25
|
2020-05-18 15:59:48 +00:00
|
|
|
call Get2bppViaHDMA
|
2018-01-15 16:06:17 +00:00
|
|
|
jr LoadFrame
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
LoadFrame:
|
2019-04-08 12:15:10 +00:00
|
|
|
ld a, [wTextboxFrame]
|
2018-01-16 22:27:50 +00:00
|
|
|
maskbits NUM_FRAMES
|
2021-03-16 21:53:42 +00:00
|
|
|
ld bc, TEXTBOX_FRAME_TILES * LEN_1BPP_TILE
|
2018-01-15 16:06:17 +00:00
|
|
|
ld hl, Frames
|
|
|
|
call AddNTimes
|
|
|
|
ld d, h
|
|
|
|
ld e, l
|
|
|
|
ld hl, vTiles2 tile "┌" ; $79
|
2021-03-16 21:53:42 +00:00
|
|
|
lb bc, BANK(Frames), TEXTBOX_FRAME_TILES ; "┌" to "┘"
|
2020-05-18 15:59:48 +00:00
|
|
|
call Get1bppViaHDMA
|
2018-01-15 16:06:17 +00:00
|
|
|
ld hl, vTiles2 tile " " ; $7f
|
2019-04-08 12:15:10 +00:00
|
|
|
ld de, TextboxSpaceGFX
|
|
|
|
lb bc, BANK(TextboxSpaceGFX), 1
|
2020-05-18 15:59:48 +00:00
|
|
|
call Get1bppViaHDMA
|
2018-01-15 16:06:17 +00:00
|
|
|
ret
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
LoadBattleFontsHPBar:
|
2018-01-15 16:06:17 +00:00
|
|
|
ld de, FontBattleExtra
|
|
|
|
ld hl, vTiles2 tile $60
|
|
|
|
lb bc, BANK(FontBattleExtra), 12
|
2020-05-18 15:59:48 +00:00
|
|
|
call Get2bppViaHDMA
|
2018-01-15 16:06:17 +00:00
|
|
|
ld hl, vTiles2 tile $70
|
2018-01-20 01:48:33 +00:00
|
|
|
ld de, FontBattleExtra + 16 tiles ; "<DO>"
|
|
|
|
lb bc, BANK(FontBattleExtra), 3 ; "<DO>" to "『"
|
2020-05-18 15:59:48 +00:00
|
|
|
call Get2bppViaHDMA
|
2018-01-15 16:06:17 +00:00
|
|
|
call LoadFrame
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
LoadHPBar:
|
2018-01-15 16:06:17 +00:00
|
|
|
ld de, EnemyHPBarBorderGFX
|
|
|
|
ld hl, vTiles2 tile $6c
|
|
|
|
lb bc, BANK(EnemyHPBarBorderGFX), 4
|
2020-05-18 15:59:48 +00:00
|
|
|
call Get1bppViaHDMA
|
2018-01-15 16:06:17 +00:00
|
|
|
ld de, HPExpBarBorderGFX
|
|
|
|
ld hl, vTiles2 tile $73
|
|
|
|
lb bc, BANK(HPExpBarBorderGFX), 6
|
2020-05-18 15:59:48 +00:00
|
|
|
call Get1bppViaHDMA
|
2018-01-15 16:06:17 +00:00
|
|
|
ld de, ExpBarGFX
|
|
|
|
ld hl, vTiles2 tile $55
|
|
|
|
lb bc, BANK(ExpBarGFX), 9
|
2020-05-18 15:59:48 +00:00
|
|
|
call Get2bppViaHDMA
|
2018-01-20 01:48:33 +00:00
|
|
|
ld de, MobilePhoneTilesGFX + 7 tiles ; mobile phone icon
|
2018-01-15 16:06:17 +00:00
|
|
|
ld hl, vTiles2 tile $5e
|
|
|
|
lb bc, BANK(MobilePhoneTilesGFX), 2
|
2020-05-18 15:59:48 +00:00
|
|
|
call Get2bppViaHDMA
|
2018-01-15 16:06:17 +00:00
|
|
|
ret
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
StatsScreen_LoadFont:
|
2018-01-15 16:06:17 +00:00
|
|
|
call _LoadFontsBattleExtra
|
|
|
|
ld de, EnemyHPBarBorderGFX
|
|
|
|
ld hl, vTiles2 tile $6c
|
|
|
|
lb bc, BANK(EnemyHPBarBorderGFX), 4
|
2020-05-18 15:59:48 +00:00
|
|
|
call Get1bppViaHDMA
|
2018-01-15 16:06:17 +00:00
|
|
|
ld de, HPExpBarBorderGFX
|
|
|
|
ld hl, vTiles2 tile $78
|
|
|
|
lb bc, BANK(HPExpBarBorderGFX), 1
|
2020-05-18 15:59:48 +00:00
|
|
|
call Get1bppViaHDMA
|
2018-01-15 16:06:17 +00:00
|
|
|
ld de, HPExpBarBorderGFX + 3 * LEN_1BPP_TILE
|
|
|
|
ld hl, vTiles2 tile $76
|
|
|
|
lb bc, BANK(HPExpBarBorderGFX), 2
|
2020-05-18 15:59:48 +00:00
|
|
|
call Get1bppViaHDMA
|
2018-01-15 16:06:17 +00:00
|
|
|
ld de, ExpBarGFX
|
|
|
|
ld hl, vTiles2 tile $55
|
|
|
|
lb bc, BANK(ExpBarGFX), 8
|
2020-05-18 15:59:48 +00:00
|
|
|
call Get2bppViaHDMA
|
2018-06-24 14:09:41 +00:00
|
|
|
LoadStatsScreenPageTilesGFX:
|
2018-01-15 16:06:17 +00:00
|
|
|
ld de, StatsScreenPageTilesGFX
|
|
|
|
ld hl, vTiles2 tile $31
|
|
|
|
lb bc, BANK(StatsScreenPageTilesGFX), 17
|
2020-05-18 15:59:48 +00:00
|
|
|
call Get2bppViaHDMA
|
2018-01-15 16:06:17 +00:00
|
|
|
ret
|