Home
Products
Community
Manuals
Contact
Login or Signup

Image Fonts < 10?

BlitzPlus Forums/BlitzPlus Programming/Image Fonts < 10?

Jono(Posted 1+ years ago) #1
Hello, I've managed to load from 0 to 9 as images into memory using LoadAnimFont, and as you can see from the source code I'm outputting them ok, as Units and Tens but when it comes to Units on it's own and no Tens. Then it seems the Units go's into the Tens. Urm, i'm sure you'll see what I mean from the code:

AppTitle "BreakIn! (beta)"

Local ScreenWidth = 180
Local ScreenHeight = 182
Graphics ScreenWidth,ScreenHeight,32,2

Local Score = 0
Local ScoreUnits
Local ScoreTens

ImageFont = LoadAnimImage("ImageFont.bmp",15,15,0,10)

SetBuffer BackBuffer()

While Not KeyDown(1)

Cls

; Display Current Score
For A = 0 To 9
If ScoreUnits = A Then DrawImage ImageFont,15,0,A
Next

For A = 0 To 9
If ScoreTens = A Then DrawImage ImageFont,0,0,A
Next

Flip

If KeyDown (28) Then Score = Score + 1

;Calculate Current Score
SScore$ = Str Score
ScoreTens = Mid$(SScore$,1,1)
ScoreUnits = Mid$(SScore$,2,1)

Wend
End

Thank you all in advance.


darklordz(Posted 1+ years ago) #2
check this thread
http://www.blitzbasic.com/Community/posts.php?topic=28429