You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

26 lines
473 B

INCLUDE "font.inc"
INCLUDE "game.inc"
INCLUDE "hardware.inc"
SECTION "Font Data", ROM0
fontTiles:: FONT_TILE_DATA
fontTilesEnd::
SECTION "Font Code", ROM0
Font_Init::
; copy font to tile VRAM. font data must be doubled to render correctly
ld hl, _VRAM + TILE_INDEX_FONT * TILE_SIZE
ld de, fontTiles
ld bc, fontTilesEnd - fontTiles
.loop:
ld a, [de]
ld [hli], a
ld [hli], a
inc de
dec bc
ld a, b
or c
jr nz, .loop
ret