A dungeon delver roguelike using Pathfinder 2nd edition rules
at gb 29 lines 623 B view raw
1SECTION "Text", ROM0 2 3textFontTileData: INCBIN "src/generated/backgrounds/text-font.2bpp" 4textFontTileDataEnd: 5 6LoadTextFontIntoVRAM:: 7 ; Copy the tile data 8 ld de, textFontTileData 9 ld hl, $9000 10 ld bc, textFontTileDataEnd - textFontTileData 11 jp CopyDEIntoMemoryAtHL 12 ret 13 14DrawTextTilesLoop:: 15 ; Check for the end of string character 255 16 ld a, [hl] 17 cp 255 18 ret z 19 20 ; Write the current character (in hl) to the address 21 ; on the tilemap (in de) 22 ld a, [hl] 23 ld [de], a 24 25 inc hl 26 inc de 27 28 ; move to the next character and next background tile 29 jp DrawTextTilesLoop