quote:
1) what is the difference between int x; and static int x; ?
Putting 'static' in front of a local variable means that that variable won't lose its value after the function call. So it's almost like a global variable, it just doesn't have global scope.
quote:
2) what is a DWORD ?
A Double-Word. This is a 32-bit unsigned integer (it's a typedef for unsigned long).
quote:
3) the fps we return (return fps), how can i use it in a printf?
I thought this was going to be in OpenGL? You can't use printf here.
For the most accurate results, you can use a performance timer (look up QueryPerformanceFrequency and QueryPerformanceTimer on MSDN). QueryPerformanceFrequency will return zero if no high-res performance timer exists, so you can set it up to use timeGetTime (or some other timing function) on machines that don't have a higher resolution timer.
One last thing, are you sure you're ready to be making games right now? You don't seem to fully understand the language, maybe you should brush up on things first before starting into game development.
Edited by - Midnight Coder on December 31, 2001 1:42:12 PM