pokecrystal-board/engine/gfx/load_font.asm
mid-kid baa0dc5a96 Organize the engine/ directory
This is an informed attempt at reorganizing the engine/ directory by
creating categorized subdirectories, in order to make it easier to
navigate and find things.

The directories created are as follows:
* engine/game: Contains all "minigames", things like the unown puzzle
and slot machine.
* engine/gfx: Contains all handling of graphics. From loading palettes
to playing animations.
* engine/link: Contains all multiplayer functionality.
* engine/menu: Contains all generic/misc. menus and menu code.
Other, more specialized menus are in their own subdirectories (pokedex,
pokegear, party menu, etc).
* engine/overworld: Contains all handling of the overworld. From loading
and connecting maps to wild encounters and the scripting engine.
* engine/pokegear: In the same vein as engine/pokedex, except it could
use some more splitting up.
* engine/pokemon: Contains everything related to manipulating pokemon
data. From the pokemon storage system to evolution and mail.
* engine/printer: Contains everything related to printing things as well
as the printer communication.
* engine/title: Contains intro sequences, title screens and credits.
2018-03-13 13:21:40 +01:00

157 lines
3.3 KiB
NASM

INCLUDE "gfx/font.asm"
; This and the following two functions are unreferenced.
; Debug, perhaps?
Unreferenced_fb434:
db 0
Unreferenced_Functionfb435: ; 4b435
ld a, [Unreferenced_fb434]
and a
jp nz, Get1bpp_2
jp Get1bpp
; fb43f
Unreferenced_Functionfb43f: ; fb43f
ld a, [Unreferenced_fb434]
and a
jp nz, Get2bpp_2
jp Get2bpp
; End unreferenced block
; fb449
_LoadStandardFont:: ; fb449
ld de, Font
ld hl, vTiles1
lb bc, BANK(Font), 128 ; "A" to "9"
ld a, [rLCDC]
bit rLCDC_ENABLE, a
jp z, Copy1bpp
ld de, Font
ld hl, vTiles1
lb bc, BANK(Font), 32 ; "A" to "]"
call Get1bpp_2
ld de, Font + 32 * LEN_1BPP_TILE
ld hl, vTiles1 tile $20
lb bc, BANK(Font), 32 ; "a" to $bf
call Get1bpp_2
ld de, Font + 64 * LEN_1BPP_TILE
ld hl, vTiles1 tile $40
lb bc, BANK(Font), 32 ; "Ä" to "←"
call Get1bpp_2
ld de, Font + 96 * LEN_1BPP_TILE
ld hl, vTiles1 tile $60
lb bc, BANK(Font), 32 ; "'" to "9"
call Get1bpp_2
ret
; fb48a
_LoadFontsExtra1:: ; fb48a
ld de, FontsExtra_SolidBlackGFX
ld hl, vTiles2 tile "■" ; $60
lb bc, BANK(FontsExtra_SolidBlackGFX), 1
call Get1bpp_2
ld de, PokegearPhoneIconGFX
ld hl, vTiles2 tile "☎" ; $62
lb bc, BANK(PokegearPhoneIconGFX), 1
call Get2bpp_2
ld de, FontExtra + 3 tiles ; "<BOLD_D>"
ld hl, vTiles2 tile "<BOLD_D>"
lb bc, BANK(FontExtra), 22 ; "<BOLD_D>" to "ぉ"
call Get2bpp_2
jr LoadFrame
; fb4b0
_LoadFontsExtra2:: ; fb4b0
ld de, FontsExtra2_UpArrowGFX
ld hl, vTiles2 tile "▲" ; $61
ld b, BANK(FontsExtra2_UpArrowGFX)
ld c, 1
call Get2bpp_2
ret
; fb4be
_LoadFontsBattleExtra:: ; fb4be
ld de, FontBattleExtra
ld hl, vTiles2 tile $60
lb bc, BANK(FontBattleExtra), 25
call Get2bpp_2
jr LoadFrame
; fb4cc
LoadFrame: ; fb4cc
ld a, [wTextBoxFrame]
maskbits NUM_FRAMES
ld bc, 6 * LEN_1BPP_TILE
ld hl, Frames
call AddNTimes
ld d, h
ld e, l
ld hl, vTiles2 tile "┌" ; $79
lb bc, BANK(Frames), 6 ; "┌" to "┘"
call Get1bpp_2
ld hl, vTiles2 tile " " ; $7f
ld de, TextBoxSpaceGFX
lb bc, BANK(TextBoxSpaceGFX), 1
call Get1bpp_2
ret
; fb4f2
LoadBattleFontsHPBar: ; fb4f2
ld de, FontBattleExtra
ld hl, vTiles2 tile $60
lb bc, BANK(FontBattleExtra), 12
call Get2bpp_2
ld hl, vTiles2 tile $70
ld de, FontBattleExtra + 16 tiles ; "<DO>"
lb bc, BANK(FontBattleExtra), 3 ; "<DO>" to "『"
call Get2bpp_2
call LoadFrame
LoadHPBar: ; fb50d
ld de, EnemyHPBarBorderGFX
ld hl, vTiles2 tile $6c
lb bc, BANK(EnemyHPBarBorderGFX), 4
call Get1bpp_2
ld de, HPExpBarBorderGFX
ld hl, vTiles2 tile $73
lb bc, BANK(HPExpBarBorderGFX), 6
call Get1bpp_2
ld de, ExpBarGFX
ld hl, vTiles2 tile $55
lb bc, BANK(ExpBarGFX), 9
call Get2bpp_2
ld de, MobilePhoneTilesGFX + 7 tiles ; mobile phone icon
ld hl, vTiles2 tile $5e
lb bc, BANK(MobilePhoneTilesGFX), 2
call Get2bpp_2
ret
; fb53e
StatsScreen_LoadFont: ; fb53e
call _LoadFontsBattleExtra
ld de, EnemyHPBarBorderGFX
ld hl, vTiles2 tile $6c
lb bc, BANK(EnemyHPBarBorderGFX), 4
call Get1bpp_2
ld de, HPExpBarBorderGFX
ld hl, vTiles2 tile $78
lb bc, BANK(HPExpBarBorderGFX), 1
call Get1bpp_2
ld de, HPExpBarBorderGFX + 3 * LEN_1BPP_TILE
ld hl, vTiles2 tile $76
lb bc, BANK(HPExpBarBorderGFX), 2
call Get1bpp_2
ld de, ExpBarGFX
ld hl, vTiles2 tile $55
lb bc, BANK(ExpBarGFX), 8
call Get2bpp_2
LoadStatsScreenPageTilesGFX: ; fb571
ld de, StatsScreenPageTilesGFX
ld hl, vTiles2 tile $31
lb bc, BANK(StatsScreenPageTilesGFX), 17
call Get2bpp_2
ret
; fb57e