wrong calculating of s_delay in game_loop

origin
stpohle 23 years ago
parent 8b7160d213
commit b8df4ac745

@ -221,7 +221,7 @@ game_loop ()
timediff = timeloop1 - timestamp; // only for debugging needed timediff = timeloop1 - timestamp; // only for debugging needed
while (timeloop1 - timestamp >= 0 && timeloop1 - timestamp < 20) { while (timeloop1 - timestamp >= 0 && timeloop1 - timestamp < 20) {
s_delay (timeloop1 - timestamp - 1); s_delay (20 - (timeloop1 - timestamp) - 1);
timeloop1 = SDL_GetTicks (); timeloop1 = SDL_GetTicks ();
} }

@ -1,4 +1,4 @@
/* $Id: sysfunc.c,v 1.12 2003/05/07 23:57:19 stpohle Exp $ /* $Id: sysfunc.c,v 1.13 2003/05/08 00:08:18 stpohle Exp $
sysfunc.c - this file hold some routines for the system functions.. sysfunc.c - this file hold some routines for the system functions..
like d_delay like d_delay
*/ */
@ -21,6 +21,7 @@ s_delay (int ms)
select (1, &selectset, NULL, NULL, &tval); select (1, &selectset, NULL, NULL, &tval);
}; };
int int
s_random (int maxnr) s_random (int maxnr)
{ {

Loading…
Cancel
Save