From 1de277460d73c565de79d2fe93ee037c3341ffe6 Mon Sep 17 00:00:00 2001 From: Bradley Bell Date: Thu, 20 May 2004 07:25:22 +0000 Subject: [PATCH] add -renderstats command-line arg to activate RENDERSTATS (d1x r1.36, r1.15, r1.33) --- ChangeLog | 3 +++ arch/ogl/ogl.c | 3 +-- include/gr.h | 4 +++- main/inferno.c | 8 +++++++- 4 files changed, 14 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9dffd4c7..7d30cf4d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2004-05-20 Matthew Mueller + * arch/ogl/ogl.c, include/gr.h, main/inferno.c: add -renderstats + command-line arg to activate RENDERSTATS (d1x r1.36, r1.15, r1.33) + * arch/ogl/ogl.c: fix last commit (d1x r1.35) * arch/ogl/ogl.c: add RENDERSTATS counter for number of textures diff --git a/arch/ogl/ogl.c b/arch/ogl/ogl.c index 86e8518b..86cbb379 100644 --- a/arch/ogl/ogl.c +++ b/arch/ogl/ogl.c @@ -1,4 +1,4 @@ -/* $Id: ogl.c,v 1.23 2004-05-20 07:16:53 btb Exp $ */ +/* $Id: ogl.c,v 1.24 2004-05-20 07:25:11 btb Exp $ */ /* * * Graphics support functions for OpenGL. @@ -72,7 +72,6 @@ int last_width=-1,last_height=-1; int GL_TEXTURE_2D_enabled=-1; int GL_texclamp_enabled=-1; -extern int gr_renderstats; extern int gr_badtexture; int r_texcount = 0, r_cachedtexcount = 0; int ogl_alttexmerge=1;//merge textures by just printing the seperate textures? diff --git a/include/gr.h b/include/gr.h index 8aa3c806..c30e28bb 100644 --- a/include/gr.h +++ b/include/gr.h @@ -1,4 +1,4 @@ -/* $Id: gr.h,v 1.24 2004-05-15 16:25:35 schaffner Exp $ */ +/* $Id: gr.h,v 1.25 2004-05-20 07:25:14 btb Exp $ */ /* THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX SOFTWARE CORPORATION ("PARALLAX"). PARALLAX, IN DISTRIBUTING THE CODE TO @@ -550,6 +550,8 @@ extern unsigned char Test_bitmap_data[64*64]; //shortcut to look at current font #define grd_curfont grd_curcanv->cv_font +extern int gr_renderstats; + extern unsigned int FixDivide( unsigned int x, unsigned int y ); extern void gr_show_canvas( grs_canvas *canv ); diff --git a/main/inferno.c b/main/inferno.c index 4262b4a5..d2daff9b 100644 --- a/main/inferno.c +++ b/main/inferno.c @@ -1,4 +1,4 @@ -/* $Id: inferno.c,v 1.76 2004-05-20 05:16:21 btb Exp $ */ +/* $Id: inferno.c,v 1.77 2004-05-20 07:25:22 btb Exp $ */ /* THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX SOFTWARE CORPORATION ("PARALLAX"). PARALLAX, IN DISTRIBUTING THE CODE TO @@ -913,6 +913,9 @@ 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"); +#ifdef OGL // currently only does anything on ogl build, so don't advertise othewise. + printf(" -renderstats %s\n", "Enable renderstats info by default"); +#endif printf( " -maxfps %s\n", "Set maximum framerate (1-100)"); printf( " -notitles %s\n", "Do not show titlescreens on startup"); printf( " -hogdir %s\n", "set shared data directory to "); @@ -1260,6 +1263,9 @@ int main(int argc, char *argv[]) } //end addition - Victor Rachels + if (FindArg("-renderstats")) + gr_renderstats = 1; + if ( FindArg( "-autodemo" )) Auto_demo = 1; -- 2.39.2