Hello there. I'm in the process of porting all the code I'm working on for my game to use the GApi. What I'm wondering is if there's a way to get the EXACT number of millisecond ticks between calls to ProcessNextFrame(). I've noticed that within the GDTIMER struct that CGapiTimer uses there is a filed called dwTickCount. However as the GDTIMER m_timer is private I can't get to any of those values (and I don't want to change the GAPI stuff if I don't have to). The reason I need access to this is all my old animations, movement, etc was based on that tickCount. IE for movement:
For animations
So I need to know if there's a way to get access to that of if there's something within what GApi provides that I should be using (perhaps something with GDAPP_FRAMETIMEOVERFLOW? I'm new to it so forgive my noobness).
Thank you
Mike
- Code:
void update( int tickDiff)
{
double distx=VelX*(double)tickDiff;
double disty=VelY*(double)tickDiff;
}
For animations
- Code:
void animate( int tickDiff )
{
this.CurFrameTime += tickDiff;
if( this.CurFrameTime > this.FrameTime )
{
// update frame
this.CurFrameTime = this.CurFrameTime-this.FrameTime;
}
}
So I need to know if there's a way to get access to that of if there's something within what GApi provides that I should be using (perhaps something with GDAPP_FRAMETIMEOVERFLOW? I'm new to it so forgive my noobness).
Thank you
Mike