hi!
heck.. if you want to see how "timing" works, check out stuff like
"Cube3D" and "Burning" they have timing loops to ensure XXX fps.
---
case nilEvent:
// make sure the active window is the form
if (WinGetActiveWindow() == (WinHandle)FrmGetActiveForm()) {
globals->timerPointA = TimGetTicks();
// do stuff
globals->timerPointB = TimGetTicks();
// calculate the delay required
globals->timerDiff =
(globals->timerPointB - globals->timerPointA);
globals->evtTimeOut =
(globals->timerDiff > globals->ticksPerFrame)
? 0
: (globals->ticksPerFrame - globals->timerDiff);
}
processed = true;
break;
---
similar stuff is available in the demo source stuff from palm
get cube3D and burning from here:
http://www.ardiri.com/index.cfm?redir=palm&cat=cube3D
http://www.ardiri.com/index.cfm?redir=palm&cat=burning
cheers
// az
[EMAIL PROTECTED]
www.ardiri.com <-- free games!
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/