I want to display the fps using TextOut, but my variable is an integer ans TextOut only accept String.
How can I change my int into a char[] or is there another way to show the fps without TextOut.
Lafo
Posted 11 August 1999 - 06:13 PM
I want to display the fps using TextOut, but my variable is an integer ans TextOut only accept String.
How can I change my int into a char[] or is there another way to show the fps without TextOut.
Lafo
Posted 05 August 1999 - 02:02 PM
sprintf(OhYes, "Frame Rate: %d", ItFeelsGood);
Hope that helps.
------------------
That's how you do it, but that's just the opinion of a MADMAN!!! BWAHAHAAHAHA! :D :D :D
Posted 07 August 1999 - 06:53 PM
Perhaps sounds obvious, but I've seen people caught out before... make sure that your string (OhYes in the example above) has room for the entire integer _and_ the trailing null.
The best you can hope for if you don't is a seg-fault 
White Fire
Posted 11 August 1999 - 06:13 PM
Draw a BMP full of numbers..you know..your own fonts.
Then take the FPS counter.. and run it through a loop that checks each number and blits the correct font from the bmp onto the screen..
And you dont have to deal with TextOut

-DL