mirror of
https://github.com/jmarshall23/Hellfire.git
synced 2026-08-12 07:50:53 +02:00
Lots of feature upgrades.
This commit is contained in:
+17
@@ -703,3 +703,20 @@ BOOL nthread_run_gameloop(BOOL bReloop) {
|
||||
|
||||
return (lDelta >= 0);
|
||||
}
|
||||
|
||||
|
||||
//******************************************************************
|
||||
//******************************************************************
|
||||
int nthread_get_render_interp()
|
||||
{
|
||||
long lFrameMs = 1000 / GAME_FRAMES_PER_SECOND;
|
||||
long lUntilNextFrame = sglGameClock - (long)GetTickCount();
|
||||
long lElapsed = lFrameMs - lUntilNextFrame;
|
||||
|
||||
if (lElapsed <= 0)
|
||||
return 0;
|
||||
if (lElapsed >= lFrameMs)
|
||||
return 256;
|
||||
|
||||
return (int)((lElapsed * 256) / lFrameMs);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user