Skip to content
Browse files

Merge pull request #2 from DerSaidin/master

Command descriptions, some other minor cleanup.
  • Loading branch information...
2 parents 3aee786 + 8c6f328 commit 283d1d419652c7716aa6502bc1dd509129a6f748 @TheDushan committed Sep 11, 2012
View
16 src/engine/rendererGL/tr_backend.cpp
@@ -1672,7 +1672,7 @@ static void Render_lightVolume(interaction_t * ia)
vec3_t viewOrigin;
vec3_t lightOrigin;
vec4_t lightColor;
- bool shadowCompare;
+ bool shadowCompare;
GLimp_LogComment("--- Render_lightVolume_omni ---\n");
@@ -8102,7 +8102,7 @@ static void IssueEntityMultiOcclusionQueries(link_t * multiQueue, link_t * indiv
static bool EntityOcclusionResultAvailable(trRefEntity_t *entity)
{
- GLint available;
+ GLint available;
if(entity->occlusionQueryObject > 0)
{
@@ -8118,14 +8118,14 @@ static bool EntityOcclusionResultAvailable(trRefEntity_t *entity)
return available;
}
- return qtrue;
+ return true;
}
static void GetEntityOcclusionQueryResult(trRefEntity_t *entity)
{
- link_t *l, *sentinel;
- int ocSamples;
- GLint available;
+ link_t *l, *sentinel;
+ int ocSamples;
+ GLint available;
GLimp_LogComment("--- GetEntityOcclusionQueryResult ---\n");
@@ -8583,8 +8583,8 @@ static void RB_RenderDebugUtils()
vec4_t lightColor;
vec4_t quadVerts[4];
- vec3_t minSize = {-2, -2, -2};
- vec3_t maxSize = { 2, 2, 2};
+ vec3_t minSize = {-2, -2, -2};
+ vec3_t maxSize = { 2, 2, 2};
gl_genericShader->DisableAlphaTesting();
gl_genericShader->DisablePortalClipping();
View
8 src/engine/rendererGL/tr_fbo.cpp
@@ -158,7 +158,7 @@ void R_CreateFBOColorBuffer(FBO_t * fbo, int format, int index)
#if defined(USE_D3D10)
// TODO
#else
- bool absent;
+ bool absent;
if(index < 0 || index >= glConfig2.maxColorAttachments)
{
@@ -203,7 +203,7 @@ void R_CreateFBODepthBuffer(FBO_t * fbo, int format)
#if defined(USE_D3D10)
// TODO
#else
- bool absent;
+ bool absent;
if(format != GL_DEPTH_COMPONENT &&
format != GL_DEPTH_COMPONENT16_ARB && format != GL_DEPTH_COMPONENT24_ARB && format != GL_DEPTH_COMPONENT32_ARB)
@@ -238,7 +238,7 @@ void R_CreateFBOStencilBuffer(FBO_t * fbo, int format)
#if defined(USE_D3D10)
// TODO
#else
- bool absent;
+ bool absent;
if(format != GL_STENCIL_INDEX &&
//format != GL_STENCIL_INDEX_EXT &&
@@ -276,7 +276,7 @@ void R_CreateFBOPackedDepthStencilBuffer(FBO_t * fbo, int format)
#if defined(USE_D3D10)
// TODO
#else
- bool absent;
+ bool absent;
if(format != GL_DEPTH_STENCIL_EXT && format != GL_DEPTH24_STENCIL8_EXT)
{
View
2 src/engine/rendererGL/tr_flares.cpp
@@ -279,7 +279,7 @@ RB_TestFlare
void RB_TestFlare(flare_t * f)
{
float depth;
- bool visible;
+ bool visible;
float fade;
float screenZ;
View
56 src/engine/rendererGL/tr_image.cpp
@@ -3557,106 +3557,106 @@ void R_CreateBuiltinImages(void)
R_SetColorMappings
===============
*/
-void R_SetColorMappings( void )
+void R_SetColorMappings(void)
{
- int i, j;
- float g;
- int inf;
- int shift;
+ int i, j;
+ float g;
+ int inf;
+ int shift;
tr.mapOverBrightBits = r_mapOverBrightBits->integer;
// setup the overbright lighting
tr.overbrightBits = r_overBrightBits->integer;
- if ( !glConfig.deviceSupportsGamma )
+ if(!glConfig.deviceSupportsGamma)
{
- tr.overbrightBits = 0; // need hardware gamma for overbright
+ tr.overbrightBits = 0; // need hardware gamma for overbright
}
// never overbright in windowed mode
- if ( !glConfig.isFullscreen )
+ if(!glConfig.isFullscreen)
{
tr.overbrightBits = 0;
}
// allow 2 overbright bits in 24 bit, but only 1 in 16 bit
- if ( glConfig.colorBits > 16 )
+ if(glConfig.colorBits > 16)
{
- if ( tr.overbrightBits > 2 )
+ if(tr.overbrightBits > 2)
{
tr.overbrightBits = 2;
}
}
else
{
- if ( tr.overbrightBits > 1 )
+ if(tr.overbrightBits > 1)
{
tr.overbrightBits = 1;
}
}
- if ( tr.overbrightBits < 0 )
+ if(tr.overbrightBits < 0)
{
tr.overbrightBits = 0;
}
- tr.identityLight = 1.0f / ( 1 << tr.overbrightBits );
+ tr.identityLight = 1.0f / (1 << tr.overbrightBits);
- if ( r_intensity->value <= 1 )
+ if(r_intensity->value <= 1)
{
- ri.Cvar_Set( "r_intensity", "1" );
+ ri.Cvar_Set("r_intensity", "1");
}
- if ( r_gamma->value < 0.5f )
+ if(r_gamma->value < 0.5f)
{
- ri.Cvar_Set( "r_gamma", "0.5" );
+ ri.Cvar_Set("r_gamma", "0.5");
}
- else if ( r_gamma->value > 3.0f )
+ else if(r_gamma->value > 3.0f)
{
- ri.Cvar_Set( "r_gamma", "3.0" );
+ ri.Cvar_Set("r_gamma", "3.0");
}
g = r_gamma->value;
shift = tr.overbrightBits;
- for ( i = 0; i < 256; i++ )
+ for(i = 0; i < 256; i++)
{
- if ( g == 1 )
+ if(g == 1)
{
inf = i;
}
else
{
- inf = 255 * pow( i / 255.0f, 1.0f / g ) + 0.5f;
+ inf = 255 * pow(i / 255.0f, 1.0f / g) + 0.5f;
}
inf <<= shift;
- if ( inf < 0 )
+ if(inf < 0)
{
inf = 0;
}
- if ( inf > 255 )
+ if(inf > 255)
{
inf = 255;
}
- s_gammatable[ i ] = inf;
+ s_gammatable[i] = inf;
}
- for ( i = 0; i < 256; i++ )
+ for(i = 0; i < 256; i++)
{
j = i * r_intensity->value;
- if ( j > 255 )
+ if(j > 255)
{
j = 255;
}
- s_intensitytable[ i ] = j;
+ s_intensitytable[i] = j;
}
GLimp_SetGamma( s_gammatable, s_gammatable, s_gammatable );
View
26 src/engine/rendererGL/tr_init.cpp
@@ -493,9 +493,9 @@ void GL_CheckErrors_(const char *fileName, int line)
*/
typedef struct vidmode_s
{
- const char *description;
- int width, height;
- float pixelAspect; // pixel width / height
+ const char *description;
+ int width, height;
+ float pixelAspect; // pixel width / height
} vidmode_t;
static const vidmode_t r_vidModes[] =
@@ -521,9 +521,9 @@ static const vidmode_t r_vidModes[] =
{ "2048x1536", 2048, 1536, 1 },
{ "2560x1600 (16:10)", 2560, 1600, 1 },
};
-static const int s_numVidModes = ( sizeof( r_vidModes ) / sizeof( r_vidModes[ 0 ] ) );
+static const int s_numVidModes = (sizeof(r_vidModes) / sizeof(r_vidModes[0]));
-qboolean R_GetModeInfo( int *width, int *height, float *windowAspect, int mode )
+qboolean R_GetModeInfo(int *width, int *height, float *windowAspect, int mode)
{
const vidmode_t *vm;
@@ -549,11 +549,11 @@ qboolean R_GetModeInfo( int *width, int *height, float *windowAspect, int mode )
}
else
{
- vm = &r_vidModes[ mode ];
+ vm = &r_vidModes[mode];
*width = vm->width;
*height = vm->height;
- *windowAspect = ( float ) vm->width / ( vm->height * vm->pixelAspect );
+ *windowAspect = (float)vm->width / (vm->height * vm->pixelAspect);
}
return qtrue;
@@ -562,18 +562,18 @@ qboolean R_GetModeInfo( int *width, int *height, float *windowAspect, int mode )
/*
** R_ModeList_f
*/
-static void R_ModeList_f( void )
+static void R_ModeList_f(void)
{
- int i;
+ int i;
- ri.Printf( PRINT_ALL, "\n" );
+ ri.Printf(PRINT_ALL, "\n");
- for ( i = 0; i < s_numVidModes; i++ )
+ for(i = 0; i < s_numVidModes; i++)
{
- ri.Printf( PRINT_ALL, "Mode %-2d: %s\n", i, r_vidModes[ i ].description );
+ ri.Printf(PRINT_ALL, "Mode %-2d: %s\n", i, r_vidModes[i].description);
}
- ri.Printf( PRINT_ALL, "\n" );
+ ri.Printf(PRINT_ALL, "\n");
}
View
2 src/engine/rendererGL/tr_shade.cpp
@@ -3934,7 +3934,7 @@ void Tess_StageIteratorGeneric()
continue;
}
-#if 1
+#if defined(COMPAT_ET)
// Ridah, per stage fogging (detail textures)
if(tess.surfaceShader->noFog && pStage->isFogged)
{
View
113 src/engine/rendererGL/tr_shader.cpp
@@ -1063,34 +1063,35 @@ static genFunc_t NameToGenFunc(const char *funcname)
NameToStencilOp
===============
*/
-static int NameToStencilOp( char *name )
+static int NameToStencilOp(char *name)
{
- if ( !Q_stricmp( name, "keep" ) )
+ if (!Q_stricmp(name, "keep"))
{
return STO_KEEP;
}
- else if ( !Q_stricmp( name, "zero" ) )
+ else if (!Q_stricmp(name, "zero"))
{
return STO_ZERO;
}
- else if ( !Q_stricmp( name, "replace" ) )
+ else if (!Q_stricmp(name, "replace"))
{
return STO_REPLACE;
}
- else if ( !Q_stricmp( name, "invert" ) )
+ else if (!Q_stricmp(name, "invert"))
{
return STO_INVERT;
}
- else if ( !Q_stricmp( name, "incr" ) )
+ else if (!Q_stricmp(name, "incr"))
{
return STO_INCR;
}
- else if ( !Q_stricmp( name, "decr" ) )
+ else if (!Q_stricmp(name, "decr"))
{
return STO_DECR;
}
- else {
- ri.Printf( PRINT_WARNING, "WARNING: invalid stencil op name '%s' in shader '%s'\n", name, shader.name );
+ else
+ {
+ ri.Printf(PRINT_WARNING, "WARNING: invalid stencil op name '%s' in shader '%s'\n", name, shader.name);
return STO_KEEP;
}
}
@@ -1111,13 +1112,13 @@ static void ParseStencil( char **text, stencil_t *stencil )
// [mask <mask>]
token = COM_ParseExt( text, qfalse );
- if ( token[ 0 ] == 0 )
+ if (token[ 0 ] == 0)
{
ri.Printf( PRINT_WARNING, "WARNING: missing stencil ref value in shader '%s'\n", shader.name );
return;
}
- if ( !Q_stricmp( token, "mask" ) ) {
+ if (!Q_stricmp(token, "mask")) {
token = COM_ParseExt( text, qfalse );
if ( token[ 0 ] == 0 )
{
@@ -1129,23 +1130,23 @@ static void ParseStencil( char **text, stencil_t *stencil )
token = COM_ParseExt( text, qfalse );
}
- if ( token[ 0 ] == 0 )
- {
- ri.Printf( PRINT_WARNING, "WARNING: missing stencil ref value in shader '%s'\n", shader.name );
- return;
- }
+ if (token[ 0 ] == 0)
+ {
+ ri.Printf(PRINT_WARNING, "WARNING: missing stencil ref value in shader '%s'\n", shader.name);
+ return;
+ }
- if ( !Q_stricmp( token, "writeMask" ) ) {
- token = COM_ParseExt( text, qfalse );
- if ( token[ 0 ] == 0 )
- {
- ri.Printf( PRINT_WARNING, "WARNING: missing stencil writeMask value in shader '%s'\n", shader.name );
- return;
- }
- stencil->writeMask = atoi(token);
+ if (!Q_stricmp(token, "writeMask")) {
+ token = COM_ParseExt(text, qfalse);
+ if (token[ 0 ] == 0)
+ {
+ ri.Printf(PRINT_WARNING, "WARNING: missing stencil writeMask value in shader '%s'\n", shader.name);
+ return;
+ }
+ stencil->writeMask = atoi(token);
- token = COM_ParseExt( text, qfalse );
- }
+ token = Com_ParseExt( text, qfalse );
+ }
// <ref>
if ( token[ 0 ] == 0 )
@@ -1164,73 +1165,73 @@ static void ParseStencil( char **text, stencil_t *stencil )
ri.Printf( PRINT_WARNING, "WARNING: missing stencil test op in shader '%s'\n", shader.name );
return;
}
- else if ( !Q_stricmp( token, "always" ) )
+ else if (!Q_stricmp( token, "always"))
{
stencil->flags |= STF_ALWAYS;
}
- else if ( !Q_stricmp( token, "never" ) )
+ else if (!Q_stricmp( token, "never"))
{
stencil->flags |= STF_NEVER;
}
- else if ( !Q_stricmp( token, "less" ) )
+ else if (!Q_stricmp( token, "less"))
{
stencil->flags |= STF_LESS;
}
- else if ( !Q_stricmp( token, "lequal" ) )
+ else if (!Q_stricmp( token, "lequal"))
{
stencil->flags |= STF_LEQUAL;
}
- else if ( !Q_stricmp( token, "greater" ) )
+ else if (!Q_stricmp( token, "greater"))
{
stencil->flags |= STF_GREATER;
}
- else if ( !Q_stricmp( token, "gequal" ) )
+ else if (!Q_stricmp( token, "gequal"))
{
stencil->flags |= STF_GEQUAL;
}
- else if ( !Q_stricmp( token, "equal" ) )
+ else if (!Q_stricmp( token, "equal"))
{
stencil->flags |= STF_EQUAL;
}
- else if ( !Q_stricmp( token, "nequal" ) )
+ else if (!Q_stricmp( token, "nequal"))
{
stencil->flags |= STF_NEQUAL;
}
else
{
- ri.Printf( PRINT_WARNING, "WARNING: missing stencil test op in shader '%s'\n", shader.name );
+ ri.Printf(PRINT_WARNING, "WARNING: missing stencil test op in shader '%s'\n", shader.name);
return;
}
// <sfail>
token = COM_ParseExt( text, qfalse );
- if ( token[ 0 ] == 0 )
+ if (token[ 0 ] == 0)
{
- ri.Printf( PRINT_WARNING, "WARNING: missing stencil sfail op in shader '%s'\n", shader.name );
+ ri.Printf(PRINT_WARNING, "WARNING: missing stencil sfail op in shader '%s'\n", shader.name);
return;
}
- stencil->flags |= NameToStencilOp( token ) << STS_SFAIL;
+ stencil->flags |= NameToStencilOp(token) << STS_SFAIL;
// <zfail>
token = COM_ParseExt( text, qfalse );
- if ( token[ 0 ] == 0 )
+ if (token[ 0 ] == 0)
{
- ri.Printf( PRINT_WARNING, "WARNING: missing stencil zfail op in shader '%s'\n", shader.name );
+ ri.Printf(PRINT_WARNING, "WARNING: missing stencil zfail op in shader '%s'\n", shader.name);
return;
}
- stencil->flags |= NameToStencilOp( token ) << STS_ZFAIL;
+ stencil->flags |= NameToStencilOp(token) << STS_ZFAIL;
// <zpass>
token = COM_ParseExt( text, qfalse );
- if ( token[ 0 ] == 0 )
+ if (token[ 0 ] == 0)
{
- ri.Printf( PRINT_WARNING, "WARNING: missing stencil zpass op in shader '%s'\n", shader.name );
+ ri.Printf(PRINT_WARNING, "WARNING: missing stencil zpass op in shader '%s'\n", shader.name);
return;
}
- stencil->flags |= NameToStencilOp( token ) << STS_ZPASS;
+ stencil->flags |= NameToStencilOp(token) << STS_ZPASS;
}
/*
@@ -6559,7 +6560,8 @@ static void ScanAndLoadShaderFiles(void)
}
// build single large buffer
- for(i = 0; i < numShaderFiles; i++) {
+ for(i = 0; i < numShaderFiles; i++)
+ {
Com_sprintf(filename, sizeof(filename), "scripts/%s", shaderFiles[i]);
sum += ri.FS_ReadFile(filename, NULL);
}
@@ -6573,16 +6575,18 @@ static void ScanAndLoadShaderFiles(void)
for ( i = 0; i < numShaderFiles; i++ )
{
#if defined(COMPAT_Q3A) || defined(COMPAT_ET)
- Com_sprintf(filename, sizeof(filename), "scripts/%s", shaderFiles[i] );
+ Com_sprintf(filename, sizeof(filename), "scripts/%s", shaderFiles[i]);
#else
Com_sprintf(filename, sizeof(filename), "materials/%s", shaderFiles[i]);
#endif
- ri.Printf( PRINT_DEVELOPER, "...loading '%s'\n", filename );
- summand = ri.FS_ReadFile( filename, (void **)&buffers[i] );
+ ri.Printf(PRINT_DEVELOPER, "...loading '%s'\n", filename);
+ summand = ri.FS_ReadFile(filename, (void **)&buffers[i]);
- if ( !buffers[i] )
- ri.Error( ERR_DROP, "Couldn't load %s", filename );
+ if(!buffers[i])
+ {
+ ri.Error(ERR_DROP, "Couldn't load %s", filename);
+ }
p = buffers[i];
while(1) {
@@ -6712,10 +6716,11 @@ static void ScanAndLoadShaderFiles(void)
hashMem = (char*)ri.Hunk_Alloc(size * sizeof(char *), h_low);
- for (i = 0; i < MAX_SHADERTEXT_HASH; i++) {
- shaderTextHashTable[i] = (char **) hashMem;
- hashMem = ((char *) hashMem) + ((shaderTextHashTableSizes[i] + 1) * sizeof(char *));
- }
+ for(i = 0; i < MAX_SHADERTEXT_HASH; i++)
+ {
+ shaderTextHashTable[i] = (char **)hashMem;
+ hashMem = ((char *)hashMem) + ((shaderTextHashTableSizes[i] + 1) * sizeof(char *));
+ }
Com_Memset(shaderTextHashTableSizes, 0, sizeof(shaderTextHashTableSizes));
View
20 src/engine/rendererGL/tr_vbo.cpp
@@ -33,8 +33,8 @@ VBO_t *R_CreateVBO(const char *name, byte *vertexes, int vertexesSize,
// TODO
return NULL;
#else
- VBO_t *vbo;
- int glUsage;
+ VBO_t *vbo;
+ int glUsage;
switch (usage)
{
@@ -51,9 +51,9 @@ VBO_t *R_CreateVBO(const char *name, byte *vertexes, int vertexesSize,
Com_Error(ERR_FATAL, "bad vboUsage_t given: %i", usage);
}
- if ( strlen( name ) >= MAX_QPATH )
+ if(strlen(name) >= MAX_QPATH)
{
- ri.Error( ERR_DROP, "R_CreateVBO: \"%s\" is too long\n", name );
+ ri.Error(ERR_DROP, "R_CreateVBO: \"%s\" is too long\n", name);
}
// make sure the render thread is stopped
@@ -462,7 +462,7 @@ R_BindNullVBO
*/
void R_BindNullVBO(void)
{
- GLimp_LogComment( "--- R_BindNullVBO ---\n" );
+ GLimp_LogComment("--- R_BindNullVBO ---\n");
#if defined(USE_D3D10)
// TODO
@@ -516,9 +516,9 @@ void R_BindIBO(IBO_t * ibo)
R_BindNullIBO
============
*/
-void R_BindNullIBO( void )
+void R_BindNullIBO(void)
{
- GLimp_LogComment( "--- R_BindNullIBO ---\n" );
+ GLimp_LogComment("--- R_BindNullIBO ---\n");
#if defined(USE_D3D10)
// TODO
@@ -698,20 +698,20 @@ void R_ShutdownVBOs(void)
{
srfVBOMesh_t *vboSurf;
- vboSurf = ( srfVBOMesh_t * ) Com_GrowListElement( &tr.world->clusterVBOSurfaces[ j ], i );
+ vboSurf = (srfVBOMesh_t *) Com_GrowListElement(&tr.world->clusterVBOSurfaces[j], i);
ibo = vboSurf->ibo;
#if defined(USE_D3D10)
// TODO
#else
- if ( ibo->indexesVBO )
+ if(ibo->indexesVBO)
{
glDeleteBuffers( 1, &ibo->indexesVBO );
}
#endif
}
- Com_DestroyGrowList( &tr.world->clusterVBOSurfaces[ j ] );
+ Com_DestroyGrowList(&tr.world->clusterVBOSurfaces[j]);
}
}
View
334 src/engine/sys/sdl_glimp.cpp
@@ -800,11 +800,13 @@ static int GLimp_SetMode(int mode, int fullscreen, int noborder) {
ri.Printf(PRINT_ALL, "Initializing OpenGL display\n");
- if ( r_allowResize->integer ) {
+ if(r_allowResize->integer)
+ {
flags |= SDL_RESIZABLE;
}
- if ( videoInfo == NULL ) {
+ if(videoInfo == NULL)
+ {
static SDL_VideoInfo sVideoInfo;
static SDL_PixelFormat sPixelFormat;
@@ -1135,21 +1137,28 @@ static void GLimp_XreaLInitExtensions(void) {
ri.Printf(PRINT_ALL, "Initializing OpenGL extensions\n");
// GL_ARB_multitexture
- if(glConfig.driverType != GLDRV_OPENGL3) {
- if(GLEW_ARB_multitexture){
+ if(glConfig.driverType != GLDRV_OPENGL3)
+ {
+ if(GLEW_ARB_multitexture)
+ {
glGetIntegerv(GL_MAX_TEXTURE_UNITS_ARB, &glConfig.maxActiveTextures);
- if(glConfig.maxActiveTextures > 1) {
+ if(glConfig.maxActiveTextures > 1)
+ {
good = qtrue;
ri.Printf(PRINT_ALL, "...found OpenGL extension - GL_ARB_multitexture\n");
- } else {
+ }
+ else
+ {
good = qfalse;
Q_strcat( missingExts, sizeof( missingExts ), "GL_ARB_multitexture\n" );
ri.Error(ERR_FATAL, MSG_ERR_OLD_VIDEO_DRIVER "\nYour GL driver is missing support for: GL_ARB_multitexture, < 2 texture units");
}
- } else {
+ }
+ else
+ {
good = qfalse;
Q_strcat( missingExts, sizeof( missingExts ), "GL_ARB_multitexture\n" );
@@ -1159,11 +1168,14 @@ static void GLimp_XreaLInitExtensions(void) {
// GL_ARB_depth_texture
- if(GLEW_ARB_depth_texture) {
+ if(GLEW_ARB_depth_texture)
+ {
good = qtrue;
ri.Printf(PRINT_ALL, "...found OpenGL extension - GL_ARB_depth_texture\n");
- } else {
+ }
+ else
+ {
good = qfalse;
Q_strcat( missingExts, sizeof( missingExts ), "GL_ARB_depth_texture\n" );
@@ -1172,12 +1184,15 @@ static void GLimp_XreaLInitExtensions(void) {
// GL_ARB_texture_cube_map
- if(GLEW_ARB_texture_cube_map) {
+ if(GLEW_ARB_texture_cube_map)
+ {
good = qtrue;
glGetIntegerv(GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB, &glConfig2.maxCubeMapTextureSize);
ri.Printf(PRINT_ALL, "...found OpenGL extension - GL_ARB_texture_cube_map\n");
- } else {
+ }
+ else
+ {
good = qfalse;
Q_strcat( missingExts, sizeof( missingExts ), "GL_ARB_texture_cube_map\n" );
@@ -1186,23 +1201,29 @@ static void GLimp_XreaLInitExtensions(void) {
GL_CheckErrors();
// GL_ARB_vertex_program
- if(GLEW_ARB_vertex_program) {
+ if(GLEW_ARB_vertex_program)
+ {
good = qtrue;
ri.Printf(PRINT_ALL, "...found OpenGL extension - GL_ARB_vertex_program\n");
- } else {
+ }
+ else
+ {
good = qfalse;
Q_strcat( missingExts, sizeof( missingExts ), "GL_ARB_vertex_program\n" );
ri.Error(ERR_FATAL, MSG_ERR_OLD_VIDEO_DRIVER "\nYour GL driver is missing support for: GL_ARB_vertex_program");
}
// GL_ARB_vertex_buffer_object
- if(GLEW_ARB_vertex_buffer_object) {
+ if(GLEW_ARB_vertex_buffer_object)
+ {
good = qtrue;
ri.Printf(PRINT_ALL, "...found OpenGL extension - GL_ARB_vertex_buffer_object\n");
- } else {
+ }
+ else
+ {
good = qfalse;
Q_strcat( missingExts, sizeof( missingExts ), "GL_ARB_vertex_buffer_object\n" );
@@ -1212,33 +1233,43 @@ static void GLimp_XreaLInitExtensions(void) {
// GL_ARB_occlusion_query
glConfig2.occlusionQueryAvailable = qfalse;
glConfig2.occlusionQueryBits = 0;
- if(GLEW_ARB_occlusion_query) {
- if(r_ext_occlusion_query->value) {
+ if(GLEW_ARB_occlusion_query)
+ {
+ if(r_ext_occlusion_query->value)
+ {
glConfig2.occlusionQueryAvailable = qtrue;
glGetQueryivARB(GL_SAMPLES_PASSED, GL_QUERY_COUNTER_BITS, &glConfig2.occlusionQueryBits);
ri.Printf(PRINT_ALL, "...found OpenGL extension - GL_ARB_occlusion_query\n");
- } else {
+ }
+ else
+ {
ri.Printf(PRINT_ALL, "...ignoring GL_ARB_occlusion_query\n");
}
- } else {
+ }
+ else
+ {
ri.Printf(PRINT_ALL, "...GL_ARB_occlusion_query not found\n");
}
GL_CheckErrors();
// GL_ARB_shader_objects
- if(GLEW_ARB_shader_objects) {
+ if(GLEW_ARB_shader_objects)
+ {
good = qtrue;
ri.Printf(PRINT_ALL, "...found OpenGL extension - GL_ARB_shader_objects\n");
- } else {
+ }
+ else
+ {
good = qfalse;
Q_strcat( missingExts, sizeof( missingExts ), "GL_ARB_shader_objects\n" );
ri.Error(ERR_FATAL, MSG_ERR_OLD_VIDEO_DRIVER "\nYour GL driver is missing support for: GL_ARB_shader_objects");
}
// GL_ARB_vertex_shader
- if(GLEW_ARB_vertex_shader) {
+ if(GLEW_ARB_vertex_shader)
+ {
int reservedComponents;
good = qtrue;
@@ -1264,7 +1295,9 @@ static void GLimp_XreaLInitExtensions(void) {
glConfig2.vboVertexSkinningAvailable = (qboolean)(r_vboVertexSkinning->integer && ((glConfig2.maxVertexSkinningBones >= 12) ? qtrue : qfalse));
ri.Printf(PRINT_ALL, "...found OpenGL extension - GL_ARB_vertex_shader\n");
- } else {
+ }
+ else
+ {
good = qfalse;
Q_strcat( missingExts, sizeof( missingExts ), "GL_ARB_vertex_shader\n" );
@@ -1273,24 +1306,30 @@ static void GLimp_XreaLInitExtensions(void) {
GL_CheckErrors();
// GL_ARB_fragment_shader
- if(GLEW_ARB_fragment_shader){
+ if(GLEW_ARB_fragment_shader)
+ {
good = qtrue;
ri.Printf(PRINT_ALL, "...found OpenGL extension - GL_ARB_fragment_shader\n");
- } else {
+ }
+ else
+ {
good = qfalse;
Q_strcat( missingExts, sizeof( missingExts ), "GL_ARB_fragment_shader\n" );
ri.Error(ERR_FATAL, MSG_ERR_OLD_VIDEO_DRIVER "\nYour GL driver is missing support for: GL_ARB_fragment_shader");
}
// GL_ARB_shading_language_100
- if(GLEW_ARB_shading_language_100) {
+ if(GLEW_ARB_shading_language_100)
+ {
good = qtrue;
Q_strncpyz(glConfig2.shadingLanguageVersion, (char*)glGetString(GL_SHADING_LANGUAGE_VERSION_ARB), sizeof(glConfig2.shadingLanguageVersion));
ri.Printf(PRINT_ALL, "...found OpenGL extension - GL_ARB_shading_language_100\n");
- } else {
+ }
+ else
+ {
good = qfalse;
Q_strcat( missingExts, sizeof( missingExts ), "GL_ARB_shading_language_100\n" );
@@ -1300,99 +1339,142 @@ static void GLimp_XreaLInitExtensions(void) {
// GL_ARB_texture_non_power_of_two
glConfig2.textureNPOTAvailable = qfalse;
- if(GLEW_ARB_texture_non_power_of_two) {
- if(r_ext_texture_non_power_of_two->integer) {
+ if(GLEW_ARB_texture_non_power_of_two)
+ {
+ if(r_ext_texture_non_power_of_two->integer)
+ {
glConfig2.textureNPOTAvailable = qtrue;
ri.Printf(PRINT_ALL, "...found OpenGL extension - GL_ARB_texture_non_power_of_two\n");
- } else {
+ }
+ else
+ {
ri.Printf(PRINT_ALL, "...ignoring GL_ARB_texture_non_power_of_two\n");
}
- } else {
+ }
+ else
+ {
ri.Printf(PRINT_ALL, "...GL_ARB_texture_non_power_of_two not found\n");
}
// GL_ARB_draw_buffers
glConfig2.drawBuffersAvailable = qfalse;
- if(GLEW_ARB_draw_buffers) {
+ if(GLEW_ARB_draw_buffers)
+ {
glGetIntegerv(GL_MAX_DRAW_BUFFERS_ARB, &glConfig2.maxDrawBuffers);
- if(r_ext_draw_buffers->integer) {
+ if(r_ext_draw_buffers->integer)
+ {
glConfig2.drawBuffersAvailable = qtrue;
ri.Printf(PRINT_ALL, "...found OpenGL extension - GL_ARB_draw_buffers\n");
- } else {
+ }
+ else
+ {
ri.Printf(PRINT_ALL, "...ignoring GL_ARB_draw_buffers\n");
}
- } else {
+ }
+ else
+ {
ri.Printf(PRINT_ALL, "...GL_ARB_draw_buffers not found\n");
}
// GL_ARB_half_float_pixel
glConfig2.textureHalfFloatAvailable = qfalse;
- if(GLEW_ARB_half_float_pixel) {
- if(r_ext_half_float_pixel->integer) {
+ if(GLEW_ARB_half_float_pixel)
+ {
+ if(r_ext_half_float_pixel->integer)
+ {
glConfig2.textureHalfFloatAvailable = qtrue;
ri.Printf(PRINT_ALL, "...found OpenGL extension - GL_ARB_half_float_pixel\n");
- } else {
+ }
+ else
+ {
ri.Printf(PRINT_ALL, "...ignoring GL_ARB_half_float_pixel\n");
}
- } else {
+ }
+ else
+ {
ri.Printf(PRINT_ALL, "...GL_ARB_half_float_pixel not found\n");
}
// GL_ARB_texture_float
glConfig2.textureFloatAvailable = qfalse;
- if(GLEW_ARB_texture_float) {
- if(r_ext_texture_float->integer) {
+ if(GLEW_ARB_texture_float)
+ {
+ if(r_ext_texture_float->integer)
+ {
glConfig2.textureFloatAvailable = qtrue;
ri.Printf(PRINT_ALL, "...found OpenGL extension - GL_ARB_texture_float\n");
- } else {
+ }
+ else
+ {
ri.Printf(PRINT_ALL, "...ignoring GL_ARB_texture_float\n");
}
- } else {
+ }
+ else
+ {
ri.Printf(PRINT_ALL, "...GL_ARB_texture_float not found\n");
}
// GL_ARB_texture_compression
glConfig.textureCompression = TC_NONE;
- if(GLEW_ARB_texture_compression) {
- if(r_ext_compressed_textures->integer) {
+ if(GLEW_ARB_texture_compression)
+ {
+ if(r_ext_compressed_textures->integer)
+ {
glConfig2.ARBTextureCompressionAvailable = qtrue;
ri.Printf(PRINT_ALL, "...found OpenGL extension - GL_ARB_texture_compression\n");
- } else {
+ }
+ else
+ {
ri.Printf(PRINT_ALL, "...ignoring GL_ARB_texture_compression\n");
}
- } else {
+ }
+ else
+ {
ri.Printf(PRINT_ALL, "...GL_ARB_texture_compression not found\n");
}
// GL_ARB_vertex_array_object
glConfig2.vertexArrayObjectAvailable = qfalse;
- if(GLEW_ARB_vertex_array_object) {
- if(r_ext_vertex_array_object->integer) {
+ if(GLEW_ARB_vertex_array_object)
+ {
+ if(r_ext_vertex_array_object->integer)
+ {
glConfig2.vertexArrayObjectAvailable = qtrue;
ri.Printf(PRINT_ALL, "...found OpenGL extension - GL_ARB_vertex_array_object\n");
- } else {
+ }
+ else
+ {
ri.Printf(PRINT_ALL, "...ignoring GL_ARB_vertex_array_object\n");
}
- } else {
+ }
+ else
+ {
ri.Printf(PRINT_ALL, "...GL_ARB_vertex_array_object not found\n");
}
// GL_EXT_texture_compression_s3tc
- if(GLEW_EXT_texture_compression_s3tc) {
- if(r_ext_compressed_textures->integer) {
+ if(GLEW_EXT_texture_compression_s3tc)
+ {
+ if(r_ext_compressed_textures->integer)
+ {
glConfig.textureCompression = TC_S3TC;
ri.Printf(PRINT_ALL, "...found OpenGL extension - GL_EXT_texture_compression_s3tc\n");
- } else {
+ }
+ else
+ {
ri.Printf(PRINT_ALL, "...ignoring GL_EXT_texture_compression_s3tc\n");
}
- } else {
+ }
+ else
+ {
ri.Printf(PRINT_ALL, "...GL_EXT_texture_compression_s3tc not found\n");
}
// GL_EXT_texture3D
glConfig2.texture3DAvailable = qfalse;
- if(GLEW_EXT_texture3D) {
+ if(GLEW_EXT_texture3D)
+ {
//if(r_ext_texture3d->value)
{
glConfig2.texture3DAvailable = qtrue;
@@ -1404,101 +1486,145 @@ static void GLimp_XreaLInitExtensions(void) {
ri.Printf(PRINT_ALL, "...ignoring GL_EXT_texture3D\n");
}
*/
- } else {
+ }
+ else
+ {
ri.Printf(PRINT_ALL, "...GL_EXT_texture3D not found\n");
}
// GL_EXT_stencil_wrap
glConfig2.stencilWrapAvailable = qfalse;
- if(GLEW_EXT_stencil_wrap) {
- if(r_ext_stencil_wrap->value) {
+ if(GLEW_EXT_stencil_wrap)
+ {
+ if(r_ext_stencil_wrap->value)
+ {
glConfig2.stencilWrapAvailable = qtrue;
ri.Printf(PRINT_ALL, "...found OpenGL extension - GL_EXT_stencil_wrap\n");
- } else {
+ }
+ else
+ {
ri.Printf(PRINT_ALL, "...ignoring GL_EXT_stencil_wrap\n");
}
- } else {
+ }
+ else
+ {
ri.Printf(PRINT_ALL, "...GL_EXT_stencil_wrap not found\n");
}
// GL_EXT_texture_filter_anisotropic
glConfig2.textureAnisotropyAvailable = qfalse;
- if(GLEW_EXT_texture_filter_anisotropic) {
+ if(GLEW_EXT_texture_filter_anisotropic)
+ {
glGetFloatv(GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT, &glConfig2.maxTextureAnisotropy);
- if(r_ext_texture_filter_anisotropic->value) {
+ if(r_ext_texture_filter_anisotropic->value)
+ {
glConfig2.textureAnisotropyAvailable = qtrue;
ri.Printf(PRINT_ALL, "...found OpenGL extension - GL_EXT_texture_filter_anisotropic\n");
- } else {
+ }
+ else
+ {
ri.Printf(PRINT_ALL, "...ignoring GL_EXT_texture_filter_anisotropic\n");
}
- } else {
+ }
+ else
+ {
ri.Printf(PRINT_ALL, "...GL_EXT_texture_filter_anisotropic not found\n");
}
GL_CheckErrors();
// GL_EXT_stencil_two_side
- if(GLEW_EXT_stencil_two_side) {
- if(r_ext_stencil_two_side->value) {
+ if(GLEW_EXT_stencil_two_side)
+ {
+ if(r_ext_stencil_two_side->value)
+ {
ri.Printf(PRINT_ALL, "...found OpenGL extension - GL_EXT_stencil_two_side\n");
- } else {
+ }
+ else
+ {
ri.Printf(PRINT_ALL, "...ignoring GL_EXT_stencil_two_side\n");
}
- } else {
+ }
+ else
+ {
ri.Printf(PRINT_ALL, "...GL_EXT_stencil_two_side not found\n");
}
// GL_EXT_depth_bounds_test
- if(GLEW_EXT_depth_bounds_test) {
- if(r_ext_depth_bounds_test->value) {
+ if(GLEW_EXT_depth_bounds_test)
+ {
+ if(r_ext_depth_bounds_test->value)
+ {
ri.Printf(PRINT_ALL, "...found OpenGL extension - GL_EXT_depth_bounds_test\n");
- } else {
+ }
+ else
+ {
ri.Printf(PRINT_ALL, "...ignoring GL_EXT_depth_bounds_test\n");
}
- } else {
+ }
+ else
+ {
ri.Printf(PRINT_ALL, "...GL_EXT_depth_bounds_test not found\n");
}
// GL_EXT_framebuffer_object
glConfig2.framebufferObjectAvailable = qfalse;
- if(GLEW_EXT_framebuffer_object) {
+ if(GLEW_EXT_framebuffer_object)
+ {
glGetIntegerv(GL_MAX_RENDERBUFFER_SIZE_EXT, &glConfig2.maxRenderbufferSize);
glGetIntegerv(GL_MAX_COLOR_ATTACHMENTS_EXT, &glConfig2.maxColorAttachments);
- if(r_ext_framebuffer_object->value) {
+ if(r_ext_framebuffer_object->value)
+ {
glConfig2.framebufferObjectAvailable = qtrue;
ri.Printf(PRINT_ALL, "...found OpenGL extension - GL_EXT_framebuffer_object\n");
- } else {
+ }
+ else
+ {
ri.Printf(PRINT_ALL, "...ignoring GL_EXT_framebuffer_object\n");
}
- } else {
+ }
+ else
+ {
ri.Printf(PRINT_ALL, "...GL_EXT_framebuffer_object not found\n");
}
GL_CheckErrors();
// GL_EXT_packed_depth_stencil
glConfig2.framebufferPackedDepthStencilAvailable = qfalse;
- if(GLEW_EXT_packed_depth_stencil && glConfig.driverType != GLDRV_MESA) {
- if(r_ext_packed_depth_stencil->integer) {
+ if(GLEW_EXT_packed_depth_stencil && glConfig.driverType != GLDRV_MESA)
+ {
+ if(r_ext_packed_depth_stencil->integer)
+ {
glConfig2.framebufferPackedDepthStencilAvailable = qtrue;
ri.Printf(PRINT_ALL, "...found OpenGL extension - GL_EXT_packed_depth_stencil\n");
- } else {
+ }
+ else
+ {
ri.Printf(PRINT_ALL, "...ignoring GL_EXT_packed_depth_stencil\n");
}
- } else {
+ }
+ else
+ {
ri.Printf(PRINT_ALL, "...GL_EXT_packed_depth_stencil not found\n");
}
// GL_EXT_framebuffer_blit
glConfig2.framebufferBlitAvailable = qfalse;
- if(GLEW_EXT_framebuffer_blit) {
- if(r_ext_framebuffer_blit->integer) {
+ if(GLEW_EXT_framebuffer_blit)
+ {
+ if(r_ext_framebuffer_blit->integer)
+ {
glConfig2.framebufferBlitAvailable = qtrue;
ri.Printf(PRINT_ALL, "...found OpenGL extension - GL_EXT_framebuffer_blit\n");
- } else {
+ }
+ else
+ {
ri.Printf(PRINT_ALL, "...ignoring GL_EXT_framebuffer_blit\n");
}
- } else {
+ }
+ else
+ {
ri.Printf(PRINT_ALL, "...GL_EXT_framebuffer_blit not found\n");
}
@@ -1524,33 +1650,48 @@ static void GLimp_XreaLInitExtensions(void) {
*/
// GL_ATI_separate_stencil
- if(GLEW_ATI_separate_stencil) {
- if(r_ext_separate_stencil->value) {
+ if(GLEW_ATI_separate_stencil)
+ {
+ if(r_ext_separate_stencil->value)
+ {
ri.Printf(PRINT_ALL, "...found OpenGL extension - GL_ATI_separate_stencil\n");
- } else {
+ }
+ else
+ {
ri.Printf(PRINT_ALL, "...ignoring GL_ATI_separate_stencil\n");
}
- } else {
+ }
+ else
+ {
ri.Printf(PRINT_ALL, "...GL_ATI_separate_stencil not found\n");
}
// GL_SGIS_generate_mipmap
glConfig2.generateMipmapAvailable = qfalse;
- if(GLEW_SGIS_generate_mipmap) {
- if(r_ext_generate_mipmap->value) {
+ if(GLEW_SGIS_generate_mipmap)
+ {
+ if(r_ext_generate_mipmap->value)
+ {
glConfig2.generateMipmapAvailable = qtrue;
ri.Printf(PRINT_ALL, "...found OpenGL extension - GL_SGIS_generate_mipmap\n");
- } else {
+ }
+ else
+ {
ri.Printf(PRINT_ALL, "...ignoring GL_SGIS_generate_mipmap\n");
}
- } else {
+ }
+ else
+ {
ri.Printf(PRINT_ALL, "...GL_SGIS_generate_mipmap not found\n");
}
// GL_GREMEDY_string_marker
- if(GLEW_GREMEDY_string_marker) {
+ if(GLEW_GREMEDY_string_marker)
+ {
ri.Printf(PRINT_ALL, "...found OpenGL extension - GL_GREMEDY_string_marker\n");
- } else {
+ }
+ else
+ {
ri.Printf(PRINT_ALL, "...GL_GREMEDY_string_marker not found\n");
}
}
@@ -1754,7 +1895,8 @@ qboolean GLimp_Init(void)
#endif
// Create the window and set up the context
- if(GLimp_StartDriverAndSetMode(r_mode->integer, r_fullscreen->integer, qfalse)) {
+ if(GLimp_StartDriverAndSetMode(r_mode->integer, r_fullscreen->integer, qfalse))
+ {
goto success;
}
View
129 src/gamelogic/base/src/cgame/cg_consolecmds.cpp
@@ -148,32 +148,33 @@ static void CG_TellAttacker_f( void )
static struct
{
char *cmd;
+ char *desc;
void (*function)( void );
void ( *completer )( void );
} commands[ ] =
{
- { "testgun", CG_TestGun_f, NULL },
- { "testmodel", CG_TestModel_f, NULL },
- { "nextframe", CG_TestModelNextFrame_f, NULL },
- { "prevframe", CG_TestModelPrevFrame_f, NULL },
- { "nextskin", CG_TestModelNextSkin_f, NULL },
- { "prevskin", CG_TestModelPrevSkin_f, NULL },
- { "viewpos", CG_Viewpos_f, NULL },
- { "+scores", CG_ScoresDown_f, NULL },
- { "-scores", CG_ScoresUp_f, NULL },
- { "+zoom", CG_ZoomDown_f, NULL },
- { "-zoom", CG_ZoomUp_f, NULL },
- { "sizeup", CG_SizeUp_f, NULL },
- { "sizedown", CG_SizeDown_f, NULL },
- { "weapnext", CG_NextWeapon_f, NULL },
- { "weapprev", CG_PrevWeapon_f, NULL },
- { "weapon", CG_Weapon_f, NULL },
- { "tell_target", CG_TellTarget_f, NULL },
- { "tell_attacker", CG_TellAttacker_f, NULL },
- { "testPS", CG_TestPS_f, NULL },
- { "destroyTestPS", CG_DestroyTestPS_f, NULL },
- { "testTS", CG_TestTS_f, NULL },
- { "destroyTestTS", CG_DestroyTestTS_f, NULL },
+ { "testgun", "^1Developer first person weapon test", CG_TestGun_f, NULL },
+ { "testmodel", "^1Developer world model test", CG_TestModel_f, NULL },
+ { "nextframe", "^1Developer animation step", CG_TestModelNextFrame_f, NULL },
+ { "prevframe", "^1Developer animation step", CG_TestModelPrevFrame_f, NULL },
+ { "nextskin", "^1Developer player skin change", CG_TestModelNextSkin_f, NULL },
+ { "prevskin", "^1Developer player skin change", CG_TestModelPrevSkin_f, NULL },
+ { "viewpos", "^1Print client view position", CG_Viewpos_f, NULL },
+ { "+scores", "^1Show scores", CG_ScoresDown_f, NULL },
+ { "-scores", "^1Hide scores", CG_ScoresUp_f, NULL },
+ { "+zoom", "^1Zoom compass in", CG_ZoomDown_f, NULL },
+ { "-zoom", "^1Zoom compass out", CG_ZoomUp_f, NULL },
+ { "sizeup", "^1Reduce screen boarder", CG_SizeUp_f, NULL },
+ { "sizedown", "^1Increase screen boarder", CG_SizeDown_f, NULL },
+ { "weapnext", "^1Select next weapon", CG_NextWeapon_f, NULL },
+ { "weapprev", "^1Select previous weapon", CG_PrevWeapon_f, NULL },
+ { "weapon", "^1Select weapon", CG_Weapon_f, NULL },
+ { "tell_target", "Chat to target", CG_TellTarget_f, NULL },
+ { "tell_attacker", "Chat to last attacker", CG_TellAttacker_f, NULL },
+ { "testPS", "", CG_TestPS_f, NULL },
+ { "destroyTestPS", "", CG_DestroyTestPS_f, NULL },
+ { "testTS", "", CG_TestTS_f, NULL },
+ { "destroyTestTS", "", CG_DestroyTestTS_f, NULL },
};
@@ -227,53 +228,53 @@ void CG_InitConsoleCommands( void )
int i;
for( i = 0 ; i < sizeof( commands ) / sizeof( commands[ 0 ] ) ; i++ )
- trap_AddCommand( commands[ i ].cmd );
+ trap_AddCommand( commands[ i ].cmd, commands[ i ].desc );
//
// the game server will interpret these commands, which will be automatically
// forwarded to the server after they are not recognized locally
//
- trap_AddCommand( "kill" );
- trap_AddCommand( "say" );
- trap_AddCommand( "say_team" );
- trap_AddCommand( "tell" );
- trap_AddCommand( "vsay" );
- trap_AddCommand( "vsay_team" );
- trap_AddCommand( "vtell" );
- trap_AddCommand( "vtaunt" );
- trap_AddCommand( "vosay" );
- trap_AddCommand( "vosay_team" );
- trap_AddCommand( "votell" );
- trap_AddCommand( "give" );
- trap_AddCommand( "god" );
- trap_AddCommand( "notarget" );
- trap_AddCommand( "noclip" );
- trap_AddCommand( "team" );
- trap_AddCommand( "follow" );
- trap_AddCommand( "addbot" );
- trap_AddCommand( "setviewpos" );
- trap_AddCommand( "callvote" );
- trap_AddCommand( "vote" );
- trap_AddCommand( "callteamvote" );
- trap_AddCommand( "teamvote" );
- trap_AddCommand( "stats" );
- trap_AddCommand( "teamtask" );
- trap_AddCommand( "class" );
- trap_AddCommand( "build" );
- trap_AddCommand( "buy" );
- trap_AddCommand( "sell" );
- trap_AddCommand( "reload" );
- trap_AddCommand( "itemact" );
- trap_AddCommand( "itemdeact" );
- trap_AddCommand( "itemtoggle" );
- trap_AddCommand( "destroy" );
- trap_AddCommand( "deconstruct" );
- trap_AddCommand( "menu" );
- trap_AddCommand( "ui_menu" );
- trap_AddCommand( "mapRotation" );
- trap_AddCommand( "stopMapRotation" );
- trap_AddCommand( "alienWin" );
- trap_AddCommand( "humanWin" );
+ trap_AddCommand( "kill", "^1Commit suicide" );
+ trap_AddCommand( "say", "^1Chat to all" );
+ trap_AddCommand( "say_team", "^1Chat to team" );
+ trap_AddCommand( "tell", "^1Chat to target" );
+ trap_AddCommand( "vsay", "^1Voice chat to all" );
+ trap_AddCommand( "vsay_team", "^1Voice chat to team" );
+ trap_AddCommand( "vtell", "^1Voice chat to target" );
+ trap_AddCommand( "vtaunt", "" );
+ trap_AddCommand( "vosay", "" );
+ trap_AddCommand( "vosay_team", "" );
+ trap_AddCommand( "votell", "" );
+ trap_AddCommand( "give", "^1Cheat to be given items and health" );
+ trap_AddCommand( "god", "^!Cheat to enable god mode" );
+ trap_AddCommand( "notarget", "" );
+ trap_AddCommand( "noclip", "^1Cheat to clip through walls" );
+ trap_AddCommand( "team", "^1Change team" );
+ trap_AddCommand( "follow", "^1Spectate a client" );
+ trap_AddCommand( "addbot", "^1Add a bot" );
+ trap_AddCommand( "setviewpos", "" );
+ trap_AddCommand( "callvote", "^1Call a vote" );
+ trap_AddCommand( "vote", "^1Cast your vote" );
+ trap_AddCommand( "callteamvote", "^1Call a vote within team" );
+ trap_AddCommand( "teamvote", "^1Cast your vote within team" );
+ trap_AddCommand( "stats", "" );
+ trap_AddCommand( "teamtask", "" );
+ trap_AddCommand( "class", "^1Change class" );
+ trap_AddCommand( "build", "" );
+ trap_AddCommand( "buy", "^1An ancient relic" );
+ trap_AddCommand( "sell", "^1An ancient relic" );
+ trap_AddCommand( "reload", "^1Reload current weapon" );
+ trap_AddCommand( "itemact", "" );
+ trap_AddCommand( "itemdeact", "" );
+ trap_AddCommand( "itemtoggle", "" );
+ trap_AddCommand( "destroy", "" );
+ trap_AddCommand( "deconstruct" ,"" );
+ trap_AddCommand( "menu" ,"" );
+ trap_AddCommand( "ui_menu", "" );
+ trap_AddCommand( "mapRotation", "" );
+ trap_AddCommand( "stopMapRotation", "" );
+ trap_AddCommand( "alienWin", "" );
+ trap_AddCommand( "humanWin", "" );
}
/*
View
287 src/gamelogic/etmain/src/cgame/cg_consolecmds.c
@@ -1155,104 +1155,105 @@ static void CG_CPM_f(void)
typedef struct
{
char *cmd;
+ char *desc;
void (*function) (void);
} consoleCommand_t;
static consoleCommand_t commands[] = {
-// { "obj", CG_Obj_f },
-// { "setspawnpt", CG_Obj_f },
- {"testgun", CG_TestGun_f},
- {"testmodel", CG_TestModel_f},
- {"nextframe", CG_TestModelNextFrame_f},
- {"prevframe", CG_TestModelPrevFrame_f},
- {"nextskin", CG_TestModelNextSkin_f},
- {"prevskin", CG_TestModelPrevSkin_f},
- {"viewpos", CG_Viewpos_f},
- {"+scores", CG_ScoresDown_f},
- {"-scores", CG_ScoresUp_f},
- {"zoomin", CG_ZoomIn_f},
- {"zoomout", CG_ZoomOut_f},
- {"weaplastused", CG_LastWeaponUsed_f},
- {"weapnextinbank", CG_NextWeaponInBank_f},
- {"weapprevinbank", CG_PrevWeaponInBank_f},
- {"weapnext", CG_NextWeapon_f},
- {"weapprev", CG_PrevWeapon_f},
- {"weapalt", CG_AltWeapon_f},
- {"weapon", CG_Weapon_f},
- {"weaponbank", CG_WeaponBank_f},
- {"tell_target", CG_TellTarget_f},
- {"tell_attacker", CG_TellAttacker_f},
- {"tcmd", CG_TargetCommand_f},
- {"fade", CG_Fade_f}, // duffy
- {"loadhud", CG_LoadHud_f},
- {"loadweapons", CG_LoadWeapons_f},
-
- {"mp_QuickMessage", CG_QuickMessage_f},
- {"mp_fireteammsg", CG_QuickFireteams_f},
- {"mp_fireteamadmin", CG_QuickFireteamAdmin_f},
- {"wm_sayPlayerClass", CG_SayPlayerClass_f},
- {"wm_ftsayPlayerClass", CG_FTSayPlayerClass_f},
-
-
- {"VoiceChat", CG_VoiceChat_f},
- {"VoiceTeamChat", CG_TeamVoiceChat_f},
+// { "obj", "", CG_Obj_f },
+// { "setspawnpt", "^1Change spawn point", CG_Obj_f },
+ {"testgun", "^1Developer: first person weapon test", CG_TestGun_f},
+ {"testmodel", "^1Developer: world model test", CG_TestModel_f},
+ {"nextframe", "^1Developer: animation step", CG_TestModelNextFrame_f},
+ {"prevframe", "^1Developer: animation step", CG_TestModelPrevFrame_f},
+ {"nextskin", "^1Developer: player skin change", CG_TestModelNextSkin_f},
+ {"prevskin", "^1Developer: player skin change", CG_TestModelPrevSkin_f},
+ {"viewpos", "^Show client view position", CG_Viewpos_f},
+ {"+scores", "^1Show scores", CG_ScoresDown_f},
+ {"-scores", "^1Hide scores", CG_ScoresUp_f},
+ {"zoomin", "^1Zoom compass in", CG_ZoomIn_f},
+ {"zoomout", "^1Zoom compass out", CG_ZoomOut_f},
+ {"weaplastused", "^1Select recent weapon", CG_LastWeaponUsed_f},
+ {"weapnextinbank", "^1Select next weapon", CG_NextWeaponInBank_f},
+ {"weapprevinbank", "^1Select previous weapon", CG_PrevWeaponInBank_f},
+ {"weapnext", "^1Select next weapon", CG_NextWeapon_f},
+ {"weapprev", "^1Select previous weapon", CG_PrevWeapon_f},
+ {"weapalt", "^1Alternate attack or function", CG_AltWeapon_f},
+ {"weapon", "^1Select weapon", CG_Weapon_f},
+ {"weaponbank", "^1Select weapon", CG_WeaponBank_f},
+ {"tell_target", "^1Chat to target", CG_TellTarget_f},
+ {"tell_attacker", "^1Chat to last attacker", CG_TellAttacker_f},
+ {"tcmd", "", CG_TargetCommand_f},
+ {"fade", "", CG_Fade_f}, // duffy
+ {"loadhud", "", CG_LoadHud_f},
+ {"loadweapons", "", CG_LoadWeapons_f},
+
+ {"mp_QuickMessage", "^1Voice chat menu to all", CG_QuickMessage_f},
+ {"mp_fireteammsg", "^1Voice chat menu for fireteam", CG_QuickFireteams_f},
+ {"mp_fireteamadmin", "^1Fireteam admin menu", CG_QuickFireteamAdmin_f},
+ {"wm_sayPlayerClass", "^1Voice chat current class to team", CG_SayPlayerClass_f},
+ {"wm_ftsayPlayerClass", "^1Voice chat current class to fireteam", CG_FTSayPlayerClass_f},
+
+
+ {"VoiceChat", "^1Voice chat to all", CG_VoiceChat_f},
+ {"VoiceTeamChat", "^1Voice chat to team", CG_TeamVoiceChat_f},
// ydnar: say, teamsay, etc
- {"messageMode", CG_MessageMode_f},
- {"messageMode2", CG_MessageMode_f},
- {"messageMode3", CG_MessageMode_f},
- {"messageSend", CG_MessageSend_f},
+ {"messageMode", "^1Chat dialoge to all", CG_MessageMode_f},
+ {"messageMode2", "^1Chat dialoge to team", CG_MessageMode_f},
+ {"messageMode3", "^1Chat dialoge to fireteam", CG_MessageMode_f},
+ {"messageSend", "^1", CG_MessageSend_f},
- {"SetWeaponCrosshair", CG_SetWeaponCrosshair_f},
+ {"SetWeaponCrosshair", "^1", CG_SetWeaponCrosshair_f},
// -NERVE - SMF
- {"VoiceFireTeamChat", CG_BuddyVoiceChat_f},
+ {"VoiceFireTeamChat", "^1", CG_BuddyVoiceChat_f},
- {"openlimbomenu", CG_LimboMenu_f},
+ {"openlimbomenu", "^1", CG_LimboMenu_f},
- {"+stats", CG_StatsDown_f},
- {"-stats", CG_StatsUp_f},
- {"+topshots", CG_topshotsDown_f},
- {"-topshots", CG_topshotsUp_f},
+ {"+stats", "^1Show weapon statistics", CG_StatsDown_f},
+ {"-stats", "^1Hide weapon statistics", CG_StatsUp_f},
+ {"+topshots", "^1", CG_topshotsDown_f},
+ {"-topshots", "^1", CG_topshotsUp_f},
// OSP
- {"autoRecord", CG_autoRecord_f},
- {"autoScreenshot", CG_autoScreenShot_f},
- {"currentTime", CG_currentTime_f},
- {"keyoff", CG_keyOff_f},
- {"keyon", CG_keyOn_f},
+ {"autoRecord", "^1Start recording a demo", CG_autoRecord_f},
+ {"autoScreenshot", "^1Take a screenshot", CG_autoScreenShot_f},
+ {"currentTime", "^1", CG_currentTime_f},
+ {"keyoff", "^1", CG_keyOff_f},
+ {"keyon", "^1", CG_keyOn_f},
#ifdef MV_SUPPORT
- {"mvactivate", CG_mvToggleAll_f},
- {"mvdel", CG_mvDelete_f},
- {"mvhide", CG_mvHideView_f},
- {"mvnew", CG_mvNew_f},
- {"mvshow", CG_mvShowView_f},
- {"mvswap", CG_mvSwapViews_f},
- {"mvtoggle", CG_mvToggleView_f},
- {"spechelp", CG_toggleSpecHelp_f},
+ {"mvactivate", "^1Toggle multiview mode", CG_mvToggleAll_f},
+ {"mvdel", "^1Multiview", CG_mvDelete_f},
+ {"mvhide", "^1Multiview", CG_mvHideView_f},
+ {"mvnew", "^1Multiview", CG_mvNew_f},
+ {"mvshow", "^1Multiview", CG_mvShowView_f},
+ {"mvswap", "^1Multiview", CG_mvSwapViews_f},
+ {"mvtoggle", "^1Multiview", CG_mvToggleView_f},
+ {"spechelp", "^1Toggle spectator button list", CG_toggleSpecHelp_f},
#endif
- {"statsdump", CG_dumpStats_f},
- {"+vstr", CG_vstrDown_f},
- {"-vstr", CG_vstrUp_f},
+ {"statsdump", "^1", CG_dumpStats_f},
+ {"+vstr", "^1", CG_vstrDown_f},
+ {"-vstr", "^1", CG_vstrUp_f},
// OSP
- {"selectbuddy", CG_SelectBuddy_f},
+ {"selectbuddy", "^1", CG_SelectBuddy_f},
- {"MapZoomIn", CG_AutomapZoomIn_f},
- {"MapZoomOut", CG_AutomapZoomOut_f},
- {"+mapexpand", CG_AutomapExpandDown_f},
- {"-mapexpand", CG_AutomapExpandUp_f},
+ {"MapZoomIn", "^1Zoom in compass", CG_AutomapZoomIn_f},
+ {"MapZoomOut", "^1Zoom out compass", CG_AutomapZoomOut_f},
+ {"+mapexpand", "^1", CG_AutomapExpandDown_f},
+ {"-mapexpand", "^1", CG_AutomapExpandUp_f},
- {"generateTracemap", CG_GenerateTracemap},
+ {"generateTracemap", "^1Developer: render command for BSP", CG_GenerateTracemap},
// xkan, 11/27/2002, toggle automap on/off
- {"ToggleAutoMap", CG_ToggleAutomap_f},
-
- {"editSpeakers", CG_EditSpeakers_f},
- {"dumpSpeaker", CG_DumpSpeaker_f},
- {"modifySpeaker", CG_ModifySpeaker_f},
- {"undoSpeaker", CG_UndoSpeaker_f},
- {"cpm", CG_CPM_f},
- {"forcetapout", CG_ForceTapOut_f},
+ {"ToggleAutoMap", "^1", CG_ToggleAutomap_f},
+
+ {"editSpeakers", "^1", CG_EditSpeakers_f},
+ {"dumpSpeaker", "^1", CG_DumpSpeaker_f},
+ {"modifySpeaker", "^1", CG_ModifySpeaker_f},
+ {"undoSpeaker", "^1", CG_UndoSpeaker_f},
+ {"cpm", "^1", CG_CPM_f},
+ {"forcetapout", "^1Ensure you are gibbed and ready to spawn", CG_ForceTapOut_f},
};
@@ -1304,81 +1305,81 @@ void CG_InitConsoleCommands(void)
for(i = 0; i < sizeof(commands) / sizeof(commands[0]); i++)
{
- trap_AddCommand(commands[i].cmd);
+ trap_AddCommand(commands[i].cmd, commands[i].desc);
}
//
// the game server will interpret these commands, which will be automatically
// forwarded to the server after they are not recognized locally
//
- trap_AddCommand("kill");
- trap_AddCommand("say");
+ trap_AddCommand("kill", "^1Commit suicide");
+ trap_AddCommand("say", "^1Chat message to all");
// trap_AddCommand("say_limbo"); // NERVE - SMF CHRUKER: b011 - Doesn't exist
// trap_AddCommand("tell"); // CHRUKER: b011 - Doesn't exist
- trap_AddCommand("listbotgoals");
- trap_AddCommand("give");
- trap_AddCommand("god");
- trap_AddCommand("notarget");
- trap_AddCommand("noclip");
- trap_AddCommand("team");
- trap_AddCommand("follow");
-// trap_AddCommand("addbot"); // CHRUKER: b011 - Not activated
- trap_AddCommand("setviewpos");
- trap_AddCommand("callvote");
- trap_AddCommand("vote");
+ trap_AddCommand("listbotgoals", "");
+ trap_AddCommand("give", "^1Cheat to be given items and health");
+ trap_AddCommand("god", "^!Cheat to enable god mode");
+ trap_AddCommand("notarget", "");
+ trap_AddCommand("noclip", "^1Cheat to clip through walls");
+ trap_AddCommand("team", "^1Change team");
+ trap_AddCommand("follow", "^1Spectate a client");
+// trap_AddCommand("addbot", "^1Add a bot"); // CHRUKER: b011 - Not activated
+ trap_AddCommand("setviewpos", "");
+ trap_AddCommand("callvote", "^1Call a vote");
+ trap_AddCommand("vote", "^1Cast your vote");
// Rafael
- trap_AddCommand("nofatigue");
+ trap_AddCommand("nofatigue", "^1Cheat for infinite sprint");
// NERVE - SMF
- trap_AddCommand("follownext");
- trap_AddCommand("followprev");
+ trap_AddCommand("follownext", "^1Spectate next player");
+ trap_AddCommand("followprev", "^1Spectate previous player");
- trap_AddCommand("start_match");
- trap_AddCommand("reset_match");
- trap_AddCommand("swap_teams");
+ trap_AddCommand("start_match", "^1Referee: Start the match");
+ trap_AddCommand("reset_match", "^1Referee: Restart the match");
+ trap_AddCommand("swap_teams", "^1Referee: Swap teams");
// -NERVE - SMF
// OSP
- trap_AddCommand("?");
- trap_AddCommand("bottomshots");
- trap_AddCommand("commands");
- trap_AddCommand("lock");
+ trap_AddCommand("?", "^1???");
+ trap_AddCommand("bottomshots", "^1Show worst accuracy");
+ trap_AddCommand("commands", "^1");
+ trap_AddCommand("lock", "^1Team: Prevent players from changing to your team");
#ifdef MV_SUPPORT
- trap_AddCommand("mvadd");
- trap_AddCommand("mvaxis");
- trap_AddCommand("mvallies");
- trap_AddCommand("mvall");
- trap_AddCommand("mvnone");
+ trap_AddCommand("mvadd", "^1Multiview");
+ trap_AddCommand("mvaxis", "^1Multiview axis players");
+ trap_AddCommand("mvallies", "^1Multiview allied players");
+ trap_AddCommand("mvall", "^1Multiview all players");
+ trap_AddCommand("mvnone", "^1Multiview");
#endif
- trap_AddCommand("notready");
- trap_AddCommand("pause");
- trap_AddCommand("players");
- trap_AddCommand("readyteam");
- trap_AddCommand("ready");
- trap_AddCommand("ref");
- trap_AddCommand("say_teamnl");
- trap_AddCommand("say_team");
- trap_AddCommand("scores");
- trap_AddCommand("specinvite");
- trap_AddCommand("speclock");
- trap_AddCommand("specunlock");
- trap_AddCommand("statsall");
- trap_AddCommand("statsdump");
- trap_AddCommand("timein");
- trap_AddCommand("timeout");
- trap_AddCommand("topshots");
- trap_AddCommand("unlock");
- trap_AddCommand("unpause");
- trap_AddCommand("unready");
- trap_AddCommand("weaponstats");
+ trap_AddCommand("notready", "^1Declare yourself unready");
+ trap_AddCommand("pause", "^1Team: Pause game");
+ trap_AddCommand("players", "^1List players");
+ trap_AddCommand("readyteam", "Declare team ready");
+ trap_AddCommand("ready", "^1Declare yourself ready");
+ trap_AddCommand("ref", "^1Referee: Authorize, command list");
+ trap_AddCommand("say_teamnl", "");
+ trap_AddCommand("say_team", "^1Chat to team");
+ trap_AddCommand("scores", "^1List player scores");
+ trap_AddCommand("specinvite", "^1Team: Allow a spectator to your team viewpoints");
+ trap_AddCommand("speclock", "^1Team: Block spectators from your team viewpoints");
+ trap_AddCommand("specunlock", "^1Team: Allow any spectators to view your team viewpoints");
+ trap_AddCommand("statsall", "^1Show gamplay stats for all players");
+ trap_AddCommand("statsdump", "^1Dump gameplay stats for all players");
+ trap_AddCommand("timein", "^1Team: Unpause game");
+ trap_AddCommand("timeout", "^1Team: Pause game");
+ trap_AddCommand("topshots", "^1Shows best accuracy");
+ trap_AddCommand("unlock", "^1Team: Allow players to change to your team");
+ trap_AddCommand("unpause", "^1Team: Unpause game");
+ trap_AddCommand("unready", "^1Declare yourself unready");
+ trap_AddCommand("weaponstats", "^1Show your per weapon stats in console");
// OSP
- trap_AddCommand("fireteam");
-// trap_AddCommand("buddylist"); // CHRUKER: b011 - Doesn't exist
- trap_AddCommand("showstats");
+ trap_AddCommand("fireteam", "^1");
+// trap_AddCommand("buddylist", "^1"); // CHRUKER: b011 - Doesn't exist
+ trap_AddCommand("showstats", "^1");
- trap_AddCommand("ignore");
- trap_AddCommand("unignore");
+ trap_AddCommand("ignore", "^1Ignore chats from a player/team/all");
+ trap_AddCommand("unignore", "^1Unignore chats");
// trap_AddCommand("addtt"); // CHRUKER: b011 - Doesn't exist
// trap_AddCommand("selectbuddy"); // CHRUKER: b011 - Duplicate of an existing client side command
@@ -1387,20 +1388,20 @@ void CG_InitConsoleCommands(void)
// trap_AddCommand("loadgame"); // CHRUKER: b011 - Only available with savegame support
// trap_AddCommand("savegame"); // CHRUKER: b011 - Only available with savegame support
- trap_AddCommand("campaign");
- trap_AddCommand("listcampaigns");
+ trap_AddCommand("campaign", "^1Start a campaign");
+ trap_AddCommand("listcampaigns", "^1List available campaigns");
// trap_AddCommand("setweapons"); // CHRUKER: b011 - Doesn't exist
// trap_AddCommand("setclass"); // CHRUKER: b011 - Doesn't exist
- trap_AddCommand("lua_status");
+ trap_AddCommand("lua_status", "^1Display lua modules");
// CHRUKER: b011 - Missing commands
- trap_AddCommand ("imready");
- trap_AddCommand ("say_buddy");
- trap_AddCommand ("setspawnpt");
- trap_AddCommand ("vsay");
- trap_AddCommand ("vsay_buddy");
- trap_AddCommand ("vsay_team");
- trap_AddCommand ("where");
+ trap_AddCommand ("imready", "^1");
+ trap_AddCommand ("say_buddy", "^1Chat to fireteam");
+ trap_AddCommand ("setspawnpt", "^1Set spawn point");
+ trap_AddCommand ("vsay", "^1Voice chat message to all");
+ trap_AddCommand ("vsay_buddy", "^1Voice chat message to fireteam");
+ trap_AddCommand ("vsay_team", "^1Voice chat message to team");
+ trap_AddCommand ("where", "^1");
}
View
4 src/gamelogic/etmain/src/ui/ui_main.c
@@ -9346,8 +9346,8 @@ void _UI_Init(qboolean inGameLoad)
Q_strncpyz(translated_yes, DC->translateString("Yes"), sizeof(translated_yes));
Q_strncpyz(translated_no, DC->translateString("NO"), sizeof(translated_no));
- trap_AddCommand("campaign");
- trap_AddCommand("listcampaigns");
+ trap_AddCommand("campaign", "^1");
+ trap_AddCommand("listcampaigns", "^1");
}

0 comments on commit 283d1d4

Please sign in to comment.
Something went wrong with that request. Please try again.