* Whitespace consistency in tr_init.c

This commit is contained in:
Tim Angus 2007-11-07 20:16:37 +00:00
parent 6f85c247e3
commit e8d3c48535

View file

@ -235,41 +235,41 @@ GL_CheckErrors
================== ==================
*/ */
void GL_CheckErrors( void ) { void GL_CheckErrors( void ) {
int err; int err;
char s[64]; char s[64];
err = qglGetError(); err = qglGetError();
if ( err == GL_NO_ERROR ) { if ( err == GL_NO_ERROR ) {
return; return;
} }
if ( r_ignoreGLErrors->integer ) { if ( r_ignoreGLErrors->integer ) {
return; return;
} }
switch( err ) { switch( err ) {
case GL_INVALID_ENUM: case GL_INVALID_ENUM:
strcpy( s, "GL_INVALID_ENUM" ); strcpy( s, "GL_INVALID_ENUM" );
break; break;
case GL_INVALID_VALUE: case GL_INVALID_VALUE:
strcpy( s, "GL_INVALID_VALUE" ); strcpy( s, "GL_INVALID_VALUE" );
break; break;
case GL_INVALID_OPERATION: case GL_INVALID_OPERATION:
strcpy( s, "GL_INVALID_OPERATION" ); strcpy( s, "GL_INVALID_OPERATION" );
break; break;
case GL_STACK_OVERFLOW: case GL_STACK_OVERFLOW:
strcpy( s, "GL_STACK_OVERFLOW" ); strcpy( s, "GL_STACK_OVERFLOW" );
break; break;
case GL_STACK_UNDERFLOW: case GL_STACK_UNDERFLOW:
strcpy( s, "GL_STACK_UNDERFLOW" ); strcpy( s, "GL_STACK_UNDERFLOW" );
break; break;
case GL_OUT_OF_MEMORY: case GL_OUT_OF_MEMORY:
strcpy( s, "GL_OUT_OF_MEMORY" ); strcpy( s, "GL_OUT_OF_MEMORY" );
break; break;
default: default:
Com_sprintf( s, sizeof(s), "%i", err); Com_sprintf( s, sizeof(s), "%i", err);
break; break;
} }
ri.Error( ERR_FATAL, "GL_CheckErrors: %s", s ); ri.Error( ERR_FATAL, "GL_CheckErrors: %s", s );
} }
@ -278,25 +278,25 @@ void GL_CheckErrors( void ) {
*/ */
typedef struct vidmode_s typedef struct vidmode_s
{ {
const char *description; const char *description;
int width, height; int width, height;
float pixelAspect; // pixel width / height float pixelAspect; // pixel width / height
} vidmode_t; } vidmode_t;
vidmode_t r_vidModes[] = vidmode_t r_vidModes[] =
{ {
{ "Mode 0: 320x240", 320, 240, 1 }, { "Mode 0: 320x240", 320, 240, 1 },
{ "Mode 1: 400x300", 400, 300, 1 }, { "Mode 1: 400x300", 400, 300, 1 },
{ "Mode 2: 512x384", 512, 384, 1 }, { "Mode 2: 512x384", 512, 384, 1 },
{ "Mode 3: 640x480", 640, 480, 1 }, { "Mode 3: 640x480", 640, 480, 1 },
{ "Mode 4: 800x600", 800, 600, 1 }, { "Mode 4: 800x600", 800, 600, 1 },
{ "Mode 5: 960x720", 960, 720, 1 }, { "Mode 5: 960x720", 960, 720, 1 },
{ "Mode 6: 1024x768", 1024, 768, 1 }, { "Mode 6: 1024x768", 1024, 768, 1 },
{ "Mode 7: 1152x864", 1152, 864, 1 }, { "Mode 7: 1152x864", 1152, 864, 1 },
{ "Mode 8: 1280x1024", 1280, 1024, 1 }, { "Mode 8: 1280x1024", 1280, 1024, 1 },
{ "Mode 9: 1600x1200", 1600, 1200, 1 }, { "Mode 9: 1600x1200", 1600, 1200, 1 },
{ "Mode 10: 2048x1536", 2048, 1536, 1 }, { "Mode 10: 2048x1536", 2048, 1536, 1 },
{ "Mode 11: 856x480 (wide)",856, 480, 1 } { "Mode 11: 856x480 (wide)",856, 480, 1 }
}; };
static int s_numVidModes = ( sizeof( r_vidModes ) / sizeof( r_vidModes[0] ) ); static int s_numVidModes = ( sizeof( r_vidModes ) / sizeof( r_vidModes[0] ) );
@ -304,8 +304,8 @@ qboolean R_GetModeInfo( int *width, int *height, float *windowAspect, int mode )
vidmode_t *vm; vidmode_t *vm;
float pixelAspect; float pixelAspect;
if ( mode < -1 ) { if ( mode < -1 ) {
return qfalse; return qfalse;
} }
if ( mode >= s_numVidModes ) { if ( mode >= s_numVidModes ) {
return qfalse; return qfalse;
@ -315,7 +315,7 @@ qboolean R_GetModeInfo( int *width, int *height, float *windowAspect, int mode )
*width = r_customwidth->integer; *width = r_customwidth->integer;
*height = r_customheight->integer; *height = r_customheight->integer;
pixelAspect = r_customPixelAspect->value; pixelAspect = r_customPixelAspect->value;
} else { } else {
vm = &r_vidModes[mode]; vm = &r_vidModes[mode];
*width = vm->width; *width = vm->width;