fix more warnings
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 31 Jan 2010 23:27:11 +0000 (23:27 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 31 Jan 2010 23:27:11 +0000 (23:27 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@9906 d7cf8633-e32d-0410-b094-e92efae38249

r_explosion.c
r_shadow.c
snd_mix.c
sv_main.c
sv_phys.c
svbsp.c
svvm_cmds.c

index ecb83f1..031d664 100644 (file)
@@ -50,7 +50,7 @@ explosion_t;
 static explosion_t explosion[MAX_EXPLOSIONS];
 
 static rtexture_t      *explosiontexture;
-static rtexture_t      *explosiontexturefog;
+//static rtexture_t    *explosiontexturefog;
 
 static rtexturepool_t  *explosiontexturepool;
 #endif
@@ -59,14 +59,14 @@ cvar_t r_explosionclip = {CVAR_SAVE, "r_explosionclip", "1", "enables collision
 #ifdef MAX_EXPLOSIONS
 static cvar_t r_drawexplosions = {0, "r_drawexplosions", "1", "enables rendering of explosion shells (see also cl_particles_explosions_shell)"};
 
-extern qboolean r_loadfog;
+//extern qboolean r_loadfog;
 static void r_explosion_start(void)
 {
        int x, y;
        static unsigned char noise1[128][128], noise2[128][128], noise3[128][128], data[128][128][4];
        explosiontexturepool = R_AllocTexturePool();
        explosiontexture = NULL;
-       explosiontexturefog = NULL;
+       //explosiontexturefog = NULL;
        fractalnoise(&noise1[0][0], 128, 32);
        fractalnoise(&noise2[0][0], 128, 4);
        fractalnoise(&noise3[0][0], 128, 4);
@@ -87,13 +87,13 @@ static void r_explosion_start(void)
                }
        }
        explosiontexture = R_LoadTexture2D(explosiontexturepool, "explosiontexture", 128, 128, &data[0][0][0], TEXTYPE_BGRA, TEXF_MIPMAP | TEXF_ALPHA | TEXF_FORCELINEAR, NULL);
-       if (r_loadfog)
-       {
-               for (y = 0;y < 128;y++)
-                       for (x = 0;x < 128;x++)
-                               data[y][x][0] = data[y][x][1] = data[y][x][2] = 255;
-               explosiontexturefog = R_LoadTexture2D(explosiontexturepool, "explosiontexture_fog", 128, 128, &data[0][0][0], TEXTYPE_BGRA, TEXF_MIPMAP | TEXF_ALPHA | TEXF_FORCELINEAR, NULL);
-       }
+//     if (r_loadfog)
+//     {
+//             for (y = 0;y < 128;y++)
+//                     for (x = 0;x < 128;x++)
+//                             data[y][x][0] = data[y][x][1] = data[y][x][2] = 255;
+//             explosiontexturefog = R_LoadTexture2D(explosiontexturepool, "explosiontexture_fog", 128, 128, &data[0][0][0], TEXTYPE_BGRA, TEXF_MIPMAP | TEXF_ALPHA | TEXF_FORCELINEAR, NULL);
+//     }
        // note that explosions survive the restart
 }
 
index 9e84a43..25f422f 100644 (file)
@@ -3414,7 +3414,10 @@ void R_Shadow_PrepareLight(rtlight_t *rtlight)
        float f;
        int numleafs, numsurfaces;
        int *leaflist, *surfacelist;
-       unsigned char *leafpvs, *shadowtrispvs, *lighttrispvs, *surfacesides;
+       unsigned char *leafpvs;
+       unsigned char *shadowtrispvs;
+       unsigned char *lighttrispvs;
+       //unsigned char *surfacesides;
        int numlightentities;
        int numlightentities_noselfshadow;
        int numshadowentities;
@@ -3478,7 +3481,7 @@ void R_Shadow_PrepareLight(rtlight_t *rtlight)
                leafpvs = rtlight->static_leafpvs;
                numsurfaces = rtlight->static_numsurfaces;
                surfacelist = rtlight->static_surfacelist;
-               surfacesides = NULL;
+               //surfacesides = NULL;
                shadowtrispvs = rtlight->static_shadowtrispvs;
                lighttrispvs = rtlight->static_lighttrispvs;
        }
@@ -3491,7 +3494,7 @@ void R_Shadow_PrepareLight(rtlight_t *rtlight)
                leaflist = r_shadow_buffer_leaflist;
                leafpvs = r_shadow_buffer_leafpvs;
                surfacelist = r_shadow_buffer_surfacelist;
-               surfacesides = r_shadow_buffer_surfacesides;
+               //surfacesides = r_shadow_buffer_surfacesides;
                shadowtrispvs = r_shadow_buffer_shadowtrispvs;
                lighttrispvs = r_shadow_buffer_lighttrispvs;
                // if the reduced leaf bounds are offscreen, skip it
@@ -3506,7 +3509,7 @@ void R_Shadow_PrepareLight(rtlight_t *rtlight)
                leafpvs = NULL;
                numsurfaces = 0;
                surfacelist = NULL;
-               surfacesides = NULL;
+               //surfacesides = NULL;
                shadowtrispvs = NULL;
                lighttrispvs = NULL;
        }
@@ -4877,7 +4880,14 @@ typedef enum lighttype_e {LIGHTTYPE_MINUSX, LIGHTTYPE_RECIPX, LIGHTTYPE_RECIPXX,
 
 void R_Shadow_LoadWorldLightsFromMap_LightArghliteTyrlite(void)
 {
-       int entnum, style, islight, skin, pflags, effects, type, n;
+       int entnum;
+       int style;
+       int islight;
+       int skin;
+       int pflags;
+       //int effects;
+       int type;
+       int n;
        char *entfiledata;
        const char *data;
        float origin[3], angles[3], radius, color[3], light[4], fadescale, lightscale, originhack[3], overridecolor[3], vec[4];
@@ -4911,7 +4921,7 @@ void R_Shadow_LoadWorldLightsFromMap_LightArghliteTyrlite(void)
                style = 0;
                skin = 0;
                pflags = 0;
-               effects = 0;
+               //effects = 0;
                islight = false;
                while (1)
                {
@@ -5038,8 +5048,8 @@ void R_Shadow_LoadWorldLightsFromMap_LightArghliteTyrlite(void)
                                skin = (int)atof(value);
                        else if (!strcmp("pflags", key))
                                pflags = (int)atof(value);
-                       else if (!strcmp("effects", key))
-                               effects = (int)atof(value);
+                       //else if (!strcmp("effects", key))
+                       //      effects = (int)atof(value);
                        else if (cl.worldmodel->type == mod_brushq3)
                        {
                                if (!strcmp("scale", key))
index ec3de1b..30e5a52 100644 (file)
--- a/snd_mix.c
+++ b/snd_mix.c
@@ -467,8 +467,8 @@ void S_MixToBuffer(void *stream, unsigned int bufferframes)
                for (i = 0; i < total_channels ; i++, ch++)
                {
                        sfx_t *sfx;
-                       unsigned int ltime;
-                       unsigned int count;
+                       int ltime;
+                       int count;
 
                        sfx = ch->sfx;
                        if (sfx == NULL)
index c264371..8b192aa 100644 (file)
--- a/sv_main.c
+++ b/sv_main.c
@@ -2705,7 +2705,9 @@ int SV_ParticleEffectIndex(const char *name)
        int filepass;
        fs_offset_t filesize;
        unsigned char *filedata;
-       const char *text, *textstart, *textend;
+       const char *text;
+       const char *textstart;
+       //const char *textend;
        char argv[16][1024];
        char filename[MAX_QPATH];
        if (!sv.particleeffectnamesloaded)
@@ -2726,7 +2728,7 @@ int SV_ParticleEffectIndex(const char *name)
                        if (!filedata)
                                continue;
                        textstart = (const char *)filedata;
-                       textend = (const char *)filedata + filesize;
+                       //textend = (const char *)filedata + filesize;
                        text = textstart;
                        for (linenumber = 1;;linenumber++)
                        {
index 5c09197..13a0cc1 100644 (file)
--- a/sv_phys.c
+++ b/sv_phys.c
@@ -2142,7 +2142,13 @@ Only used by players
 */
 void SV_WalkMove (prvm_edict_t *ent)
 {
-       int clip, oldonground, originalmove_clip, originalmove_flags, originalmove_groundentity, hitsupercontentsmask, type;
+       int clip;
+       int oldonground;
+       //int originalmove_clip;
+       int originalmove_flags;
+       int originalmove_groundentity;
+       int hitsupercontentsmask;
+       int type;
        vec3_t upmove, downmove, start_origin, start_velocity, stepnormal, originalmove_origin, originalmove_velocity;
        trace_t downtrace, trace;
        qboolean applygravity;
@@ -2206,7 +2212,7 @@ void SV_WalkMove (prvm_edict_t *ent)
 
        VectorCopy(ent->fields.server->origin, originalmove_origin);
        VectorCopy(ent->fields.server->velocity, originalmove_velocity);
-       originalmove_clip = clip;
+       //originalmove_clip = clip;
        originalmove_flags = (int)ent->fields.server->flags;
        originalmove_groundentity = ent->fields.server->groundentity;
 
diff --git a/svbsp.c b/svbsp.c
index c3e6937..85b82a4 100644 (file)
--- a/svbsp.c
+++ b/svbsp.c
@@ -158,7 +158,7 @@ static void SVBSP_InsertOccluderPolygonNodes(svbsp_t *b, int *parentnodenumpoint
 {
        // now we need to create up to numpoints + 1 new nodes, forming a BSP tree
        // describing the occluder polygon's shadow volume
-       int i, j, p, basenum;
+       int i, j, p;
        svbsp_node_t *node;
 
        // points and lines are valid testers but not occluders
@@ -187,7 +187,6 @@ static void SVBSP_InsertOccluderPolygonNodes(svbsp_t *b, int *parentnodenumpoint
        // note down the first available nodenum for the *parentnodenumpointer
        // line which is done last to allow multithreaded queries during an
        // insertion
-       basenum = b->numnodes;
        for (i = 0, p = poly->numpoints - 1;i < poly->numpoints;p = i, i++)
        {
 #if 1
index 52a9bb9..e5e5210 100644 (file)
@@ -1216,7 +1216,7 @@ static void VM_SV_aim (void)
        int             i, j;
        trace_t tr;
        float   dist, bestdist;
-       float   speed;
+       //float speed;
 
        VM_SAFEPARMCOUNT(2, VM_SV_aim);
 
@@ -1237,7 +1237,7 @@ static void VM_SV_aim (void)
                VM_Warning("aim: can not use free entity\n");
                return;
        }
-       speed = PRVM_G_FLOAT(OFS_PARM1);
+       //speed = PRVM_G_FLOAT(OFS_PARM1);
 
        VectorCopy (ent->fields.server->origin, start);
        start[2] += 20;
@@ -1349,7 +1349,7 @@ sizebuf_t *WriteDest (void)
                return sv.writeentitiestoclient_msg;
        }
 
-       return NULL;
+       //return NULL;
 }
 
 static void VM_SV_WriteByte (void)