added -fps option
This commit is contained in:
parent
ac69329c2b
commit
b421863cec
|
@ -1,3 +1,7 @@
|
|||
2003-03-12 Bradley Bell <bradleyb@smeagol>
|
||||
|
||||
* main/game.c, main/game.h, main/inferno.c: added -maxfps option
|
||||
|
||||
2003-03-12 Bradley Bell <btb@icculus.org>
|
||||
|
||||
* arch/linux/alsadigi.c, arch/linux/findfile.c,
|
||||
|
|
12
main/game.c
12
main/game.c
|
@ -1,4 +1,4 @@
|
|||
/* $Id: game.c,v 1.18 2003-02-28 12:08:34 btb Exp $ */
|
||||
/* $Id: game.c,v 1.19 2003-03-13 07:16:46 btb Exp $ */
|
||||
/*
|
||||
THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX
|
||||
SOFTWARE CORPORATION ("PARALLAX"). PARALLAX, IN DISTRIBUTING THE CODE TO
|
||||
|
@ -17,7 +17,7 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED.
|
|||
#endif
|
||||
|
||||
#ifdef RCS
|
||||
char game_rcsid[] = "$Id: game.c,v 1.18 2003-02-28 12:08:34 btb Exp $";
|
||||
char game_rcsid[] = "$Id: game.c,v 1.19 2003-03-13 07:16:46 btb Exp $";
|
||||
#endif
|
||||
|
||||
#ifdef WINDOWS
|
||||
|
@ -1193,7 +1193,9 @@ int Movie_fixed_frametime;
|
|||
#define Movie_fixed_frametime 0
|
||||
#endif
|
||||
|
||||
static const int max_fps = 80;
|
||||
//added on 8/18/98 by Victor Rachels to add maximum framerate
|
||||
int maxfps = 80;
|
||||
//end this section
|
||||
|
||||
void calc_frame_time()
|
||||
{
|
||||
|
@ -1209,9 +1211,9 @@ void calc_frame_time()
|
|||
do {
|
||||
timer_value = timer_get_fixed_seconds();
|
||||
FrameTime = timer_value - last_timer_value;
|
||||
if (FrameTime < f1_0/max_fps);
|
||||
if (FrameTime < f1_0/maxfps);
|
||||
timer_delay(1);
|
||||
} while (FrameTime < f1_0/max_fps);
|
||||
} while (FrameTime < f1_0/maxfps);
|
||||
|
||||
#if defined(TIMER_TEST) && !defined(NDEBUG)
|
||||
_timer_value = timer_value;
|
||||
|
|
|
@ -262,4 +262,6 @@ int gr_toggle_fullscreen_game(void);
|
|||
*/
|
||||
void flickering_light_read(flickering_light *fl, CFILE *fp);
|
||||
|
||||
extern int maxfps;
|
||||
|
||||
#endif
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: inferno.c,v 1.55 2003-02-28 09:56:10 btb Exp $ */
|
||||
/* $Id: inferno.c,v 1.56 2003-03-13 07:16:46 btb Exp $ */
|
||||
/*
|
||||
THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX
|
||||
SOFTWARE CORPORATION ("PARALLAX"). PARALLAX, IN DISTRIBUTING THE CODE TO
|
||||
|
@ -908,6 +908,7 @@ void print_commandline_help()
|
|||
printf( " D2X Options:\n\n");
|
||||
printf( " -noredundancy %s\n", "Do not send messages when picking up redundant items in multi");
|
||||
printf( " -shortpackets %s\n", "Set shortpackets to default as on");
|
||||
printf( " -maxfps <n> %s\n", "Set maximum framerate (1-100)");
|
||||
printf( " -notitles %s\n", "Do not show titlescreens on startup");
|
||||
printf( " -hogdir <dir> %s\n", "set shared data directory to <dir>");
|
||||
printf( " -ini <file> %s\n", "option file (alternate to command line), defaults to d2x.ini");
|
||||
|
@ -1254,6 +1255,14 @@ int main(int argc,char **argv)
|
|||
|
||||
//con_printf(CON_VERBOSE, "\n%s...", "Checking for Descent 2 CD-ROM");
|
||||
|
||||
//added/edited 8/18/98 by Victor Rachels to set maximum fps <= 100
|
||||
if ((t = FindArg( "-maxfps" ))) {
|
||||
t=atoi(Args[t+1]);
|
||||
if (t>0&&t<=80)
|
||||
maxfps=t;
|
||||
}
|
||||
//end addition - Victor Rachels
|
||||
|
||||
if ( FindArg( "-autodemo" ))
|
||||
Auto_demo = 1;
|
||||
|
||||
|
|
Loading…
Reference in a new issue