diff --git a/src/game.c b/src/game.c index b41f220..285f199 100644 --- a/src/game.c +++ b/src/game.c @@ -221,7 +221,7 @@ game_loop () timediff = timeloop1 - timestamp; // only for debugging needed while (timeloop1 - timestamp >= 0 && timeloop1 - timestamp < 20) { - s_delay (timeloop1 - timestamp - 1); + s_delay (20 - (timeloop1 - timestamp) - 1); timeloop1 = SDL_GetTicks (); } diff --git a/src/sysfunc.c b/src/sysfunc.c index 2f8f057..eb1c6a4 100644 --- a/src/sysfunc.c +++ b/src/sysfunc.c @@ -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.. like d_delay */ @@ -21,6 +21,7 @@ s_delay (int ms) select (1, &selectset, NULL, NULL, &tval); }; + int s_random (int maxnr) {