From 2fd46174126c2b21ab0296bc860b389dcfc14b31 Mon Sep 17 00:00:00 2001 From: helixhorned Date: Sun, 30 Mar 2014 20:36:00 +0000 Subject: [PATCH] Add a second DNCOORDS/cl_showcoords mode, showing some renderer settings. Also, extend the documentation for r_usenewshading a little. Specifically, note when the different modes were introduced. BUILD_LUNATIC. git-svn-id: https://svn.eduke32.com/eduke32@4410 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/eduke32/build/src/polymost.c | 7 ++++++- polymer/eduke32/source/game.c | 31 +++++++++++++++++++++++++++- polymer/eduke32/source/osdcmds.c | 8 ++++++- 3 files changed, 43 insertions(+), 3 deletions(-) diff --git a/polymer/eduke32/build/src/polymost.c b/polymer/eduke32/build/src/polymost.c index f4dcb60e4..b576db505 100644 --- a/polymer/eduke32/build/src/polymost.c +++ b/polymer/eduke32/build/src/polymost.c @@ -5158,7 +5158,12 @@ void polymost_initosdfuncs(void) { "r_texturemaxsize","changes the maximum OpenGL texture size limit",(void *) &gltexmaxsize, CVAR_INT | CVAR_NOSAVE, 0, 4096 }, { "r_texturemiplevel","changes the highest OpenGL mipmap level used",(void *) &gltexmiplevel, CVAR_INT, 0, 6 }, { "r_texturemode", "changes the texture filtering settings", (void *) &gltexfiltermode, CVAR_INT|CVAR_FUNCPTR, 0, 5 }, - { "r_usenewshading", "visibility code: 0: Polymost, 2: Classic", (void *) &r_usenewshading, CVAR_INT, 0, 3 }, + + { "r_usenewshading", + "visibility/fog code: 0: orig. Polymost 1: 07/2011 2: linear 12/2012 3: no neg. start 03/2014", + (void *) &r_usenewshading, CVAR_INT, 0, 3 + }, + { "r_usetileshades", "enable/disable Polymost tile shade textures", (void *) &r_usetileshades, CVAR_INT | CVAR_INVALIDATEART, 0, 2 }, { "r_vbocount","sets the number of Vertex Buffer Objects to use when drawing models",(void *) &r_vbocount, CVAR_INT, 1, 256 }, { "r_vbos"," enable/disable using Vertex Buffer Objects when drawing models",(void *) &r_vbos, CVAR_BOOL, 0, 1 }, diff --git a/polymer/eduke32/source/game.c b/polymer/eduke32/source/game.c index 5079e3f29..e7d99103c 100644 --- a/polymer/eduke32/source/game.c +++ b/polymer/eduke32/source/game.c @@ -2494,6 +2494,11 @@ static struct { } g_spriteStat; #endif +#define printcoordsline(fmt, ...) do { \ + Bsprintf(tempbuf, fmt, ## __VA_ARGS__); \ + printext256(20, y+=9, 31, -1, tempbuf, 0); \ +} while (0) + static void G_PrintCoords(int32_t snum) { const int32_t x = 250; @@ -2551,6 +2556,26 @@ static void G_PrintCoords(int32_t snum) printext256(x,y+72,31,-1,tempbuf,0); Bsprintf(tempbuf, "MOVEACTORS [ms]= %.3e", g_moveActorsTime); printext256(x,y+81,31,-1,tempbuf,0); + +#ifdef USE_OPENGL + if (ud.coords == 2) + { + y=16; + + printcoordsline("rendmode = %d", getrendermode()); + printcoordsline("r_ambientlight = %.03f", r_ambientlight); + + if (rendmode >= 3) + { + if (rendmode==3) + printcoordsline("r_usenewshading = %d", r_usenewshading); + else + printcoordsline("r_pr_artmapping = %d", pr_artmapping); + + printcoordsline("r_usetileshades = %d", r_usetileshades); + } + } +#endif } @@ -8322,7 +8347,11 @@ FOUNDCHEAT: return; case CHEAT_COORDS: - ud.coords = 1-ud.coords; +#ifdef USE_OPENGL + if (++ud.coords >= 3) ud.coords = 0; +#else + if (++ud.coords >= 2) ud.coords = 0; +#endif end_cheat(); return; diff --git a/polymer/eduke32/source/osdcmds.c b/polymer/eduke32/source/osdcmds.c index be44a8142..b9844bef0 100644 --- a/polymer/eduke32/source/osdcmds.c +++ b/polymer/eduke32/source/osdcmds.c @@ -1477,7 +1477,13 @@ int32_t registerosdcommands(void) { "cl_runmode", "enable/disable modernized run key operation", (void *)&ud.runkey_mode, CVAR_BOOL, 0, 1 }, - { "cl_showcoords", "show your position in the game world", (void *)&ud.coords, CVAR_BOOL, 0, 1 }, + { "cl_showcoords", "show your position in the game world", (void *)&ud.coords, CVAR_INT, 0, +#ifdef USE_OPENGL + 2 +#else + 1 +#endif + }, { "cl_viewbob", "enable/disable player head bobbing", (void *)&ud.viewbob, CVAR_BOOL, 0, 1 },