From 7db8ac995293099d550a868f31c4a0b471fc4ad8 Mon Sep 17 00:00:00 2001 From: Rudolf Polzer Date: Sun, 5 Jun 2011 19:43:21 +0200 Subject: [PATCH] more warnings be gone --- tools/quake3/q3map2/facebsp.c | 4 ++++ tools/quake3/q3map2/image.c | 5 +---- tools/quake3/q3map2/light.c | 5 ----- tools/quake3/q3map2/map.c | 13 +++++-------- tools/quake3/q3map2/model.c | 2 +- 5 files changed, 11 insertions(+), 18 deletions(-) diff --git a/tools/quake3/q3map2/facebsp.c b/tools/quake3/q3map2/facebsp.c index 9291f564..f9f2f207 100644 --- a/tools/quake3/q3map2/facebsp.c +++ b/tools/quake3/q3map2/facebsp.c @@ -244,7 +244,9 @@ void BuildFaceTree_r( node_t *node, face_t *list ) winding_t *frontWinding, *backWinding; int i; int splitPlaneNum, compileFlags; +#if 0 qboolean isstruct = qfalse; +#endif /* count faces left */ @@ -282,8 +284,10 @@ void BuildFaceTree_r( node_t *node, face_t *list ) continue; } +#if 0 if(!(split->compileFlags & C_DETAIL)) isstruct = 1; +#endif /* determine which side the face falls on */ side = WindingOnPlaneSide( split->w, plane->normal, plane->dist ); diff --git a/tools/quake3/q3map2/image.c b/tools/quake3/q3map2/image.c index 929b15d9..7ce08aaa 100644 --- a/tools/quake3/q3map2/image.c +++ b/tools/quake3/q3map2/image.c @@ -127,7 +127,7 @@ static void LoadPNGBuffer( byte *buffer, int size, byte **pixels, int *width, in png_struct *png; png_info *info, *end; pngBuffer_t pb; - int bitDepth, colorType, channels; + int bitDepth, colorType; png_uint_32 w, h, i; byte **rowPointers; @@ -196,9 +196,6 @@ static void LoadPNGBuffer( byte *buffer, int size, byte **pixels, int *width, in png_get_IHDR( png, info, &w, &h, &bitDepth, &colorType, NULL, NULL, NULL ); - /* read number of channels */ - channels = png_get_channels( png, info ); - /* the following will probably bork on certain types of png images, but hey... */ /* force indexed/gray/trans chunk to rgb */ diff --git a/tools/quake3/q3map2/light.c b/tools/quake3/q3map2/light.c index 9323b8c8..5d5dfc5e 100644 --- a/tools/quake3/q3map2/light.c +++ b/tools/quake3/q3map2/light.c @@ -148,7 +148,6 @@ static void CreateSkyLights( vec3_t color, float value, int iterations, float fi int angleSteps, elevationSteps; float angle, elevation; float angleStep, elevationStep; - float step, start; sun_t sun; @@ -156,10 +155,6 @@ static void CreateSkyLights( vec3_t color, float value, int iterations, float fi if( value <= 0.0f || iterations < 2 ) return; - /* calculate some stuff */ - step = 2.0f / (iterations - 1); - start = -1.0f; - /* basic sun setup */ VectorCopy( color, sun.color ); sun.deviance = 0.0f; diff --git a/tools/quake3/q3map2/map.c b/tools/quake3/q3map2/map.c index 95bb3d1f..9534bdb3 100644 --- a/tools/quake3/q3map2/map.c +++ b/tools/quake3/q3map2/map.c @@ -490,7 +490,7 @@ void SetBrushContents( brush_t *b ) int contentFlags, compileFlags; side_t *s; int i; - qboolean mixed; + //% qboolean mixed; /* get initial compile flags from first side */ @@ -498,7 +498,7 @@ void SetBrushContents( brush_t *b ) contentFlags = s->contentFlags; compileFlags = s->compileFlags; b->contentShader = s->shaderInfo; - mixed = qfalse; + //% mixed = qfalse; /* get the content/compile flags for every side in the brush */ for( i = 1; i < b->numsides; i++, s++ ) @@ -506,8 +506,8 @@ void SetBrushContents( brush_t *b ) s = &b->sides[ i ]; if( s->shaderInfo == NULL ) continue; - if( s->contentFlags != contentFlags || s->compileFlags != compileFlags ) - mixed = qtrue; + //% if( s->contentFlags != contentFlags || s->compileFlags != compileFlags ) + //% mixed = qtrue; contentFlags |= s->contentFlags; compileFlags |= s->compileFlags; @@ -1196,9 +1196,6 @@ parses a brush out of a map file and sets it up static void ParseBrush( qboolean onlyLights, qboolean noCollapseGroups ) { - brush_t *b; - - /* parse the brush out of the map */ ParseRawBrush( onlyLights ); @@ -1241,7 +1238,7 @@ static void ParseBrush( qboolean onlyLights, qboolean noCollapseGroups ) } /* finish the brush */ - b = FinishBrush(noCollapseGroups); + FinishBrush(noCollapseGroups); } diff --git a/tools/quake3/q3map2/model.c b/tools/quake3/q3map2/model.c index c4d34d71..86a87c42 100644 --- a/tools/quake3/q3map2/model.c +++ b/tools/quake3/q3map2/model.c @@ -208,7 +208,7 @@ adds a picomodel into the bsp void InsertModel( const char *name, int skin, int frame, m4x4_t transform, remap_t *remap, shaderInfo_t *celShader, int eNum, int castShadows, int recvShadows, int spawnFlags, float lightmapScale, int lightmapSampleSize, float shadeAngle ) { - int i, j, k, s, numSurfaces; + int i, j, s, numSurfaces; m4x4_t identity, nTransform; picoModel_t *model; picoShader_t *shader; -- 2.39.2