Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Using DATA like arrays
#6
0,0,0,1,0,0,0
0,0,1,0,1,0,0
0,1,1,1,1,1,0
0,1,0,0,0,1,0
1,0,0,0,0,0,1
1,0,0,0,0,0,1
1,0,0,0,0,0,1
1,1,1,1,1,1,0
1,0,0,0,0,0,1
1,0,0,0,0,0,1
1,1,1,1,1,1,0
1,0,0,0,0,0,1
1,0,0,0,0,0,1
1,1,1,1,1,1,0

That would be A and B and you could figure ot the rest

Code:
'make the arrays
DIM font(25) as integer ptr  '26 letters
FOR i = 0 TO 25
   font(25) = imagecreate(7,7)
NEXT

'load the file
OPEN "font.fnt" FOR INPUT AS #1
FOR i = 0 TO 25
   For x = 0 TO 6
      For y = 0 To 6
         INPUT #1, a
         PSET font(i), (x, y), a
      Next
   Next
Next

'place an A on the screen
Screenres 640, 480, 32
PUT (10, 10), font(1), TRANS

'important! don't let the program leak memory
FOR i = 0 TO 25
   imagedestroy font(i)
NEXT

This will give you a fast font routine. I have an even faster routine somewhere, I'll look for it for you.
f you play a Microsoft CD backwards you can hear demonic voices. The scary part is that if you play it forwards it installs Windows.
Reply


Messages In This Thread
Using DATA like arrays - by axipher - 03-04-2006, 06:58 AM
Using DATA like arrays - by d.j.peters - 03-04-2006, 07:12 AM
Using DATA like arrays - by Dr_Davenstein - 03-04-2006, 11:37 PM
Using DATA like arrays - by wallace - 03-05-2006, 01:47 AM
Using DATA like arrays - by axipher - 03-05-2006, 09:56 PM
Using DATA like arrays - by wallace - 03-06-2006, 12:36 AM
Using DATA like arrays - by axipher - 03-06-2006, 12:42 AM
Using DATA like arrays - by Anonymous - 03-06-2006, 10:39 AM
Using DATA like arrays - by wallace - 03-06-2006, 08:20 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)