diff options
author | Astatin <[email protected]> | 2024-10-31 15:04:01 +0900 |
---|---|---|
committer | Astatin <[email protected]> | 2024-10-31 15:04:01 +0900 |
commit | a69ff95615b9ef4ed1ef2e0dbe42bf64b36e25b0 (patch) | |
tree | 805f8f0ab1274df6d89fcf8ea1f46643b47e941a /tiles.gbasm | |
parent | e4507824c03030e7f1f11483f400335ae668424a (diff) |
Add font and Print_str routine
Diffstat (limited to 'tiles.gbasm')
-rw-r--r-- | tiles.gbasm | 30 |
1 files changed, 8 insertions, 22 deletions
diff --git a/tiles.gbasm b/tiles.gbasm index 48c5f91..1d8c03a 100644 --- a/tiles.gbasm +++ b/tiles.gbasm @@ -1,21 +1,3 @@ -Number_Font_Data: - .DB $00, $38, $4c, $c6, $c6, $64, $38, $00 ; 0 - .DB $00, $18, $38, $18, $18, $18, $7e, $00 ; 1 - .DB $00, $7c, $c6, $0e, $7c, $e0, $fe, $00 ; 2 - .DB $00, $7e, $0c, $38, $06, $c6, $7c, $00 ; 3 - .DB $00, $1c, $3c, $6c, $cc, $fe, $0c, $00 ; 4 - .DB $00, $fc, $80, $fc, $06, $c6, $7c, $00 ; 5 - .DB $00, $7c, $c0, $fc, $c6, $c6, $7c, $00 ; 6 - .DB $00, $fe, $c6, $0c, $18, $30, $30, $00 ; 7 - .DB $00, $7c, $c6, $7c, $c6, $c6, $7c, $00 ; 8 - .DB $00, $7c, $c6, $c6, $7e, $06, $7c, $00 ; 9 - .DB $00, $3c, $46, $46, $7e, $46, $46, $00 ; A - .DB $00, $7c, $46, $7c, $46, $46, $7c, $00 ; B - .DB $00, $3c, $62, $60, $60, $62, $3c, $00 ; C - .DB $00, $7c, $62, $62, $62, $62, $7c, $00 ; D - .DB $00, $7e, $60, $7c, $60, $60, $7e, $00 ; E - .DB $00, $7e, $60, $7c, $60, $60, $60, $00 ; F - Load_Tile: LD HL, $8020 LD DE, =OBJ_Tile_Image_Data @@ -30,15 +12,19 @@ Load_Tile: Load_Number_Font: ; Load number font into the tilemap at tiles 0x10-0x1f - LD HL, $9100 - LD DE, =Number_Font_Data - LD B, $80 + LD HL, $8800 + LD DE, =Font_Data + LD BC, $0158 Load_Number_Font.loop: LD A, (DE) LD (HL+), A LD (HL+), A INC DE - DEC B + DEC BC + XOR A + CP B + JR NZ, =Load_Number_Font.loop + CP C JR NZ, =Load_Number_Font.loop RET |