Rename some console commands to be more consistent with each other

git-svn-id: https://svn.eduke32.com/eduke32@832 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
terminx 2008-07-02 04:56:42 +00:00
parent 7c6881717d
commit 4c8538e0f7
5 changed files with 56 additions and 57 deletions

View file

@ -174,10 +174,10 @@ static int osdcmd_vars(const osdfuncparm_t *parm)
{
int showval = (parm->numparms < 1);
if (!Bstrcasecmp(parm->name, "screencaptureformat"))
if (!Bstrcasecmp(parm->name, "r_captureformat"))
{
const char *fmts[] = {"TGA", "PCX"};
if (showval) { OSD_Printf("captureformat is %s\n", fmts[captureformat]); }
if (showval) { OSD_Printf("r_captureformat is %s\n", fmts[captureformat]); }
else
{
int j;
@ -189,14 +189,14 @@ static int osdcmd_vars(const osdfuncparm_t *parm)
return OSDCMD_OK;
}
#ifdef SUPERBUILD
else if (!Bstrcasecmp(parm->name, "novoxmips"))
else if (!Bstrcasecmp(parm->name, "r_novoxmips"))
{
if (showval) { OSD_Printf("novoxmips is %d\n", novoxmips); }
if (showval) { OSD_Printf("r_novoxmips is %d\n", novoxmips); }
else { novoxmips = (atoi(parm->parms[0]) != 0); }
}
else if (!Bstrcasecmp(parm->name, "usevoxels"))
else if (!Bstrcasecmp(parm->name, "r_voxels"))
{
if (showval) { OSD_Printf("usevoxels is %d\n", usevoxels); }
if (showval) { OSD_Printf("r_voxels is %d\n", usevoxels); }
else { usevoxels = (atoi(parm->parms[0]) != 0); }
}
#endif
@ -218,10 +218,10 @@ int baselayer_init(void)
,
osdfunc_setrendermode);
#endif
OSD_RegisterFunction("screencaptureformat","screencaptureformat: sets the output format for screenshots (TGA or PCX)",osdcmd_vars);
OSD_RegisterFunction("r_captureformat","screencaptureformat: sets the output format for screenshots (TGA or PCX)",osdcmd_vars);
#ifdef SUPERBUILD
OSD_RegisterFunction("novoxmips","novoxmips: turn off/on the use of mipmaps when rendering 8-bit voxels",osdcmd_vars);
OSD_RegisterFunction("usevoxels","usevoxels: enable/disable automatic sprite->voxel rendering",osdcmd_vars);
OSD_RegisterFunction("r_novoxmips","novoxmips: turn off/on the use of mipmaps when rendering 8-bit voxels",osdcmd_vars);
OSD_RegisterFunction("r_voxels","usevoxels: enable/disable automatic sprite->voxel rendering",osdcmd_vars);
#endif
#if defined(POLYMOST) && defined(USE_OPENGL)
#ifdef DEBUGGINGAIDS

View file

@ -5671,40 +5671,40 @@ static int osdcmd_polymostvars(const osdfuncparm_t *parm)
int showval = (parm->numparms < 1), val = 0;
if (!showval) val = atoi(parm->parms[0]);
if (!Bstrcasecmp(parm->name, "usemodels"))
if (!Bstrcasecmp(parm->name, "r_models"))
{
if (showval) { OSD_Printf("usemodels is %d\n", usemodels); }
if (showval) { OSD_Printf("r_models is %d\n", usemodels); }
else usemodels = (val != 0);
return OSDCMD_OK;
}
else if (!Bstrcasecmp(parm->name, "usehightile"))
else if (!Bstrcasecmp(parm->name, "r_hightile"))
{
if (showval) { OSD_Printf("usehightile is %d\n", usehightile); }
if (showval) { OSD_Printf("r_hightile is %d\n", usehightile); }
else usehightile = (val != 0);
return OSDCMD_OK;
}
#ifdef USE_OPENGL
else if (!Bstrcasecmp(parm->name, "glusetexcompr"))
else if (!Bstrcasecmp(parm->name, "r_usetexcompr"))
{
if (showval) { OSD_Printf("glusetexcompr is %d\n", glusetexcompr); }
if (showval) { OSD_Printf("r_usetexcompr is %d\n", glusetexcompr); }
else glusetexcompr = (val != 0);
return OSDCMD_OK;
}
else if (!Bstrcasecmp(parm->name, "glredbluemode"))
else if (!Bstrcasecmp(parm->name, "r_redbluemode"))
{
if (showval) { OSD_Printf("glredbluemode is %d\n", glredbluemode); }
if (showval) { OSD_Printf("r_redbluemode is %d\n", glredbluemode); }
else glredbluemode = (val != 0);
return OSDCMD_OK;
}
else if (!Bstrcasecmp(parm->name, "gltexturemaxsize"))
else if (!Bstrcasecmp(parm->name, "r_texturemaxsize"))
{
if (showval) { OSD_Printf("gltexturemaxsize is %d\n", gltexmaxsize); }
if (showval) { OSD_Printf("r_texturemaxsize is %d\n", gltexmaxsize); }
else gltexmaxsize = val;
return OSDCMD_OK;
}
else if (!Bstrcasecmp(parm->name, "gltexturemiplevel"))
else if (!Bstrcasecmp(parm->name, "r_texturemiplevel"))
{
if (showval) { OSD_Printf("gltexturemiplevel is %d\n", gltexmiplevel); }
if (showval) { OSD_Printf("r_texturemiplevel is %d\n", gltexmiplevel); }
else gltexmiplevel = val;
return OSDCMD_OK;
}
@ -5822,33 +5822,33 @@ static int osdcmd_polymostvars(const osdfuncparm_t *parm)
else r_parallaxskypanning = (val != 0);
return OSDCMD_OK;
}
else if (!Bstrcasecmp(parm->name, "glpolygonmode"))
else if (!Bstrcasecmp(parm->name, "r_polygonmode"))
{
if (showval) { OSD_Printf("glpolygonmode is %d\n", glpolygonmode); }
if (showval) { OSD_Printf("r_polygonmode is %d\n", glpolygonmode); }
else glpolygonmode = val;
return OSDCMD_OK;
}
else if (!Bstrcasecmp(parm->name, "glusetexcache"))
else if (!Bstrcasecmp(parm->name, "r_usetexcache"))
{
if (showval) { OSD_Printf("glusetexcache is %d\n", glusetexcache); }
if (showval) { OSD_Printf("r_usetexcache is %d\n", glusetexcache); }
else glusetexcache = (val != 0);
return OSDCMD_OK;
}
else if (!Bstrcasecmp(parm->name, "glusetexcachecompression"))
else if (!Bstrcasecmp(parm->name, "r_usetexcachecompression"))
{
if (showval) { OSD_Printf("glusetexcachecompression is %d\n", glusetexcachecompression); }
if (showval) { OSD_Printf("r_usetexcachecompression is %d\n", glusetexcachecompression); }
else glusetexcachecompression = (val != 0);
return OSDCMD_OK;
}
else if (!Bstrcasecmp(parm->name, "glmultisample"))
else if (!Bstrcasecmp(parm->name, "r_multisample"))
{
if (showval) { OSD_Printf("glmultisample is %d\n", glmultisample); }
if (showval) { OSD_Printf("r_multisample is %d\n", glmultisample); }
else glmultisample = max(0,val);
return OSDCMD_OK;
}
else if (!Bstrcasecmp(parm->name, "glnvmultisamplehint"))
else if (!Bstrcasecmp(parm->name, "r_nvmultisamplehint"))
{
if (showval) { OSD_Printf("glnvmultisamplehint is %d\n", glnvmultisamplehint); }
if (showval) { OSD_Printf("r_nvmultisamplehint is %d\n", glnvmultisamplehint); }
else glnvmultisamplehint = (val != 0);
return OSDCMD_OK;
}
@ -5899,17 +5899,17 @@ static int dumptexturedefs(const osdfuncparm_t *parm)
void polymost_initosdfuncs(void)
{
#ifdef USE_OPENGL
OSD_RegisterFunction("glusetexcompr","glusetexcompr: enable/disable OpenGL texture compression",osdcmd_polymostvars);
OSD_RegisterFunction("glredbluemode","glredbluemode: enable/disable experimental OpenGL red-blue glasses mode",osdcmd_polymostvars);
OSD_RegisterFunction("gltexturemode", "gltexturemode: changes the texture filtering settings", gltexturemode);
OSD_RegisterFunction("gltextureanisotropy", "gltextureanisotropy: changes the OpenGL texture anisotropy setting", gltextureanisotropy);
OSD_RegisterFunction("gltexturemaxsize","gltexturemaxsize: changes the maximum OpenGL texture size limit",osdcmd_polymostvars);
OSD_RegisterFunction("gltexturemiplevel","gltexturemiplevel: changes the highest OpenGL mipmap level used",osdcmd_polymostvars);
OSD_RegisterFunction("glpolygonmode","glpolygonmode: debugging feature",osdcmd_polymostvars); //FUK
OSD_RegisterFunction("glusetexcache","glusetexcache: enable/disable OpenGL compressed texture cache",osdcmd_polymostvars);
OSD_RegisterFunction("glusetexcachecompression","usetexcachecompression: enable/disable compression of files in the OpenGL compressed texture cache",osdcmd_polymostvars);
OSD_RegisterFunction("glmultisample","glmultisample: sets the number of samples used for antialiasing (0 = off)",osdcmd_polymostvars);
OSD_RegisterFunction("glnvmultisamplehint","glnvmultisamplehint: enable/disable Nvidia multisampling hinting",osdcmd_polymostvars);
OSD_RegisterFunction("r_usetexcompr","r_usetexcompr: enable/disable OpenGL texture compression",osdcmd_polymostvars);
OSD_RegisterFunction("r_redbluemode","r_redbluemode: enable/disable experimental OpenGL red-blue glasses mode",osdcmd_polymostvars);
OSD_RegisterFunction("r_texturemode", "r_texturemode: changes the texture filtering settings", gltexturemode);
OSD_RegisterFunction("r_textureanisotropy", "r_textureanisotropy: changes the OpenGL texture anisotropy setting", gltextureanisotropy);
OSD_RegisterFunction("r_texturemaxsize","r_texturemaxsize: changes the maximum OpenGL texture size limit",osdcmd_polymostvars);
OSD_RegisterFunction("r_texturemiplevel","r_texturemiplevel: changes the highest OpenGL mipmap level used",osdcmd_polymostvars);
OSD_RegisterFunction("r_polygonmode","r_polygonmode: debugging feature",osdcmd_polymostvars); //FUK
OSD_RegisterFunction("r_usetexcache","r_usetexcache: enable/disable OpenGL compressed texture cache",osdcmd_polymostvars);
OSD_RegisterFunction("r_usetexcachecompression","usetexcachecompression: enable/disable compression of files in the OpenGL compressed texture cache",osdcmd_polymostvars);
OSD_RegisterFunction("r_multisample","r_multisample: sets the number of samples used for antialiasing (0 = off)",osdcmd_polymostvars);
OSD_RegisterFunction("r_nvmultisamplehint","r_nvmultisamplehint: enable/disable Nvidia multisampling hinting",osdcmd_polymostvars);
OSD_RegisterFunction("r_shadescale","r_shadescale: multiplier for lighting",osdcmd_polymostvars);
OSD_RegisterFunction("r_depthpeeling","r_depthpeeling: enable/disable order-independant transparency",osdcmd_polymostvars);
OSD_RegisterFunction("r_peelscount","r_peelscount: sets the number of depth layers for depth peeling",osdcmd_polymostvars);
@ -5923,8 +5923,8 @@ void polymost_initosdfuncs(void)
OSD_RegisterFunction("r_parallaxskyclamping","r_parallaxskyclamping: enable/disable parallaxed floor/ceiling sky texture clamping",osdcmd_polymostvars);
OSD_RegisterFunction("r_parallaxskypanning","r_parallaxskypanning: enable/disable parallaxed floor/ceiling panning when drawing a parallaxed sky",osdcmd_polymostvars);
#endif
OSD_RegisterFunction("usemodels","usemodels: enable/disable model rendering in >8-bit mode",osdcmd_polymostvars);
OSD_RegisterFunction("usehightile","usehightile: enable/disable hightile texture rendering in >8-bit mode",osdcmd_polymostvars);
OSD_RegisterFunction("r_models","r_models: enable/disable model rendering in >8-bit mode",osdcmd_polymostvars);
OSD_RegisterFunction("r_hightile","r_hightile: enable/disable hightile texture rendering in >8-bit mode",osdcmd_polymostvars);
//OSD_RegisterFunction("dumptexturedefs","dumptexturedefs: dumps all texture definitions in the new style",dumptexturedefs);
}

View file

@ -10574,7 +10574,7 @@ void app_main(int argc,const char **argv)
GAME_onshowosd
);
OSD_SetParameters(0,10, 0,12, 4,12);
OSD_SetVersionString(HEAD2,0,10);
OSD_SetVersionString(HEAD2,0,0);
registerosdcommands();
if (setgamemode(ud.config.ScreenMode,ud.config.ScreenWidth,ud.config.ScreenHeight,ud.config.ScreenBPP) < 0)

View file

@ -30,7 +30,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#define ALC_NO_PROTOTYPES
#include <AL/al.h>
#include <AL/alc.h>
#include <vorbis/vorbisfile.h>
#include "openal.h"
// #include "_multivc.h"

View file

@ -645,18 +645,19 @@ cvarmappings cvar[] =
{ "cl_messagetime", "cl_messagetime: length of time to display multiplayer chat messages\n", (void*)&ud.msgdisptime, CVAR_INT, 0, 0, 3600 },
{ "cl_mousebias", "cl_mousebias: emulates the original mouse code's weighting of input towards whichever axis is moving the most at any given time\n", (void*)&ud.config.MouseBias, CVAR_INT, 0, 0, 32 },
{ "cl_mousefilter", "cl_mousefilter: amount of mouse movement to filter out\n", (void*)&ud.config.MouseFilter, CVAR_INT, 0, 0, 512 },
{ "cl_showcoords", "cl_showcoords: show your position in the game world", (void*)&ud.coords, CVAR_BOOL, 0, 0, 1 },
{ "cl_showfps", "cl_showfps: show the frame rate counter", (void*)&ud.tickrate, CVAR_BOOL, 0, 0, 1 },
{ "cl_smoothinput", "cl_smoothinput: enable/disable input smoothing\n", (void*)&ud.config.SmoothInput, CVAR_BOOL, 0, 0, 1 },
{ "cl_viewbob", "cl_viewbob: enable/disable player head bobbing\n", (void*)&ud.viewbob, CVAR_BOOL, 0, 0, 1 },
{ "cl_weaponsway", "cl_weaponsway: enable/disable player weapon swaying\n", (void*)&ud.weaponsway, CVAR_BOOL, 0, 0, 1 },
{ "cl_weaponswitch", "cl_weaponswitch: enable/disable auto weapon switching", (void*)&ud.weaponswitch, CVAR_INT|CVAR_MULTI, 0, 0, 3 },
{ "cl_angleinterpolation", "cl_angleinterpolation: enable/disable angle interpolation", (void*)&ud.angleinterpolation, CVAR_INT, 0, 0, 256 },
{ "in_mousebias", "in_mousebias: emulates the original mouse code's weighting of input towards whichever axis is moving the most at any given time\n", (void*)&ud.config.MouseBias, CVAR_INT, 0, 0, 32 },
{ "in_mousefilter", "in_mousefilter: amount of mouse movement to filter out\n", (void*)&ud.config.MouseFilter, CVAR_INT, 0, 0, 512 },
{ "in_smoothinput", "in_smoothinput: enable/disable input smoothing\n", (void*)&ud.config.SmoothInput, CVAR_BOOL, 0, 0, 1 },
#if defined(POLYMOST) && defined(USE_OPENGL)
{ "r_anamorphic", "r_anamorphic: enable/disable widescreen mode", (void*)&glwidescreen, CVAR_BOOL, 0, 0, 1 },
{ "r_projectionhack", "r_projectionhack: enable/disable projection hack", (void*)&glprojectionhacks, CVAR_BOOL, 0, 0, 1 },
@ -866,11 +867,11 @@ void onvideomodechange(int newmode)
static int osdcmd_usemousejoy(const osdfuncparm_t *parm)
{
int showval = (parm->numparms < 1);
if (!Bstrcasecmp(parm->name, "usemouse"))
if (!Bstrcasecmp(parm->name, "in_mouse"))
{
if (showval)
{
OSD_Printf("usemouse is %d\n", ud.config.UseMouse);
OSD_Printf("in_mouse is %d\n", ud.config.UseMouse);
}
else
{
@ -879,11 +880,11 @@ static int osdcmd_usemousejoy(const osdfuncparm_t *parm)
}
return OSDCMD_OK;
}
else if (!Bstrcasecmp(parm->name, "usejoystick"))
else if (!Bstrcasecmp(parm->name, "in_joystick"))
{
if (showval)
{
OSD_Printf("usejoystick is %d\n", ud.config.UseJoystick);
OSD_Printf("in_joystick is %d\n", ud.config.UseJoystick);
}
else
{
@ -1103,6 +1104,8 @@ int registerosdcommands(void)
OSD_RegisterFunction("give","give <all|health|weapons|ammo|armor|keys|inventory>: gives requested item", osdcmd_give);
OSD_RegisterFunction("god","god: toggles god mode", osdcmd_god);
OSD_RegisterFunction("in_joystick","in_joystick: enables input from the joystick if it is present",osdcmd_usemousejoy);
OSD_RegisterFunction("in_mouse","in_mouse: enables input from the mouse if it is present",osdcmd_usemousejoy);
OSD_RegisterFunction("initgroupfile","initgroupfile <path>: adds a grp file into the game filesystem", osdcmd_initgroupfile);
OSD_RegisterFunction("name","name: change your multiplayer nickname", osdcmd_name);
@ -1125,9 +1128,6 @@ int registerosdcommands(void)
OSD_RegisterFunction("unbind","unbind <key>: unbinds a key.", osdcmd_unbind);
OSD_RegisterFunction("unbindall","unbindall: unbinds all keys.", osdcmd_unbindall);
OSD_RegisterFunction("usejoystick","usejoystick: enables input from the joystick if it is present",osdcmd_usemousejoy);
OSD_RegisterFunction("usemouse","usemouse: enables input from the mouse if it is present",osdcmd_usemousejoy);
OSD_RegisterFunction("vidmode","vidmode [xdim ydim] [bpp] [fullscreen]: immediately change the video mode",osdcmd_vidmode);
//baselayer_onvideomodechange = onvideomodechange;