'---- GENERAL FONTS ROUTINES ----

'---- KROME 64x64 FONT ----

'-- INIT KROME FONT --
SUB INIT_FONT_K

 PAGE WRITE 2: CLS: LOAD PNG "./ASSETS/nuskool_krome.png"
 SIZT=0: TCOL=1: TROW=1: TMAX=10: TSPD=9: FL=0: TNUM=0
 FOR T=1 TO TMAX: TXT$(T)="": NEXT T

END SUB


'-- WRITE AND MOVE TEXT - KROME FONT --

SUB MOVE_KROME

 TSCR=TSCR+TSPD-FL/10
 IF TSCR>54 THEN
  TSCR=TSCR-54
  TCOL=TCOL+1
  TNUM=TNUM+1
  IF TCOL > LEN(TXT$(TROW)) THEN
   TCOL=1: TROW=TROW+1
   IF TROW>TMAX THEN TROW=1
  ENDIF
 ENDIF

END SUB


'-- PRINT KROME FONT --

SUB PRINTK(X,Y,TXT$,TP)

 LOCAL T,XX,YY

 FOR T=1 TO LEN(TXT$)    
  XX=(PEEK(VAR TXT$,T)-33)  
  YY=INT(XX/10)  
  XX=XX*64-YY*640
  YY=YY*55
  BLIT XX,YY,X+T*52,Y,64,55,2,TP
 NEXT T

END SUB



