VBGamer |
|
RE: using a bitmap to display text on a DDraw surf Jack Hoxley (0 replies, 0 views) (2000-Jun-17) It depends how good you are with DD : )
Draw a picture that has A-Z 0-9 on it (or whatever) then make it so each letter is 16 pixels wide (or the same). then; A will be 0 pixels across. Z will be 26*16 pixels across.
You'll just have to alighn the rectangle to fit what you're after.
If you're looking at passing a string and getting it to work things out; you'll need to get the ASCII character number - it's easy but I cant remember exactly how.
eg, A = 65 (I think). You then go through the string passed working out which letter it is and converting it to something you can use.
If I'm right about A being 65, just work out what letter by doing:
Letter position = ACII number - 65
that way; A will be 0. You can * this by 16 to get the Rect coords...
You following any of this?
I'll help more if it's needed. |