hushed unitialized warning on end in cl_particles.c when using MSVC
authorlordhavoc <lordhavoc@d7cf8633-e32d-0410-b094-e92efae38249>
Wed, 16 Jan 2002 19:08:04 +0000 (19:08 +0000)
committerlordhavoc <lordhavoc@d7cf8633-e32d-0410-b094-e92efae38249>
Wed, 16 Jan 2002 19:08:04 +0000 (19:08 +0000)
fixed direct use of glActiveTextureARB/glClientActiveTextureARB
type cast parameters to glDepthMask

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@1348 d7cf8633-e32d-0410-b094-e92efae38249

buildnumber.c
cl_particles.c
gl_backend.c
model_shared.c

index b20af01c8f24fafdb65a51003a80c2705d028b26..dd8368b94d8b9ebd8c9fb9acb1d7f1b4e15683e7 100644 (file)
@@ -1,4 +1,4 @@
 
-#define BUILDNUMBER 606
+#define BUILDNUMBER 609
 
 int buildnumber = BUILDNUMBER;
index 3313af09cf7f0f697742d2a84a7d28a968be4736..6ef9c92456d95f3a573d6a86719052e3f122f101 100644 (file)
@@ -320,6 +320,7 @@ void CL_ParticleExplosion (vec3_t org, int smoke)
        vec3_t v, end, ang;
        byte noise1[32*32], noise2[32*32];
 
+       VectorClear(end); // hush MSVC
        if (cl_particles.integer && cl_particles_explosions.integer)
        {
                i = Mod_PointInLeaf(org, cl.worldmodel)->contents;
index adb0fccff77576fa33ad5eb398498134718afcca..83b026990499ee3dbacc4a7c0fe7fc5eb605810e 100644 (file)
@@ -316,8 +316,8 @@ CHECKGLERROR
        blend = 0;
        glDisable(GL_BLEND);
 CHECKGLERROR
-       depthmask = 1;
-       glDepthMask(depthmask);
+       depthmask = true;
+       glDepthMask((GLuint) depthmask);
 CHECKGLERROR
 
 CHECKGLERROR
@@ -342,7 +342,7 @@ CHECKGLERROR
        {
                for (i = 0;i < backendunits;i++)
                {
-                       glActiveTextureARB(GL_TEXTURE0_ARB + (unit = i));
+                       qglActiveTexture(GL_TEXTURE0_ARB + (unit = i));
 CHECKGLERROR
                        glBindTexture(GL_TEXTURE_2D, (texture[i] = 0));
 CHECKGLERROR
@@ -391,7 +391,7 @@ CHECKGLERROR
 CHECKGLERROR
                        }
 
-                       glClientActiveTextureARB(GL_TEXTURE0_ARB + (clientunit = i));
+                       qglClientActiveTexture(GL_TEXTURE0_ARB + (clientunit = i));
 CHECKGLERROR
                        glTexCoordPointer(2, GL_FLOAT, sizeof(buf_texcoord_t), buf_texcoord[i]);
 CHECKGLERROR
@@ -431,7 +431,7 @@ CHECKGLERROR
                                {
                                        if (unit != i)
                                        {
-                                               glActiveTextureARB(GL_TEXTURE0_ARB + (unit = i));
+                                               qglActiveTexture(GL_TEXTURE0_ARB + (unit = i));
 CHECKGLERROR
                                        }
                                        if (texture[i] == 0)
@@ -443,7 +443,7 @@ CHECKGLERROR
                                                // compiled_vertex_array
                                                if (clientunit != i)
                                                {
-                                                       glClientActiveTextureARB(GL_TEXTURE0_ARB + (clientunit = i));
+                                                       qglClientActiveTexture(GL_TEXTURE0_ARB + (clientunit = i));
 CHECKGLERROR
                                                }
                                                glEnableClientState(GL_TEXTURE_COORD_ARRAY);
@@ -460,7 +460,7 @@ CHECKGLERROR
                                                // compiled_vertex_array
                                                if (clientunit != i)
                                                {
-                                                       glClientActiveTextureARB(GL_TEXTURE0_ARB + (clientunit = i));
+                                                       qglClientActiveTexture(GL_TEXTURE0_ARB + (clientunit = i));
 CHECKGLERROR
                                                }
                                                glDisableClientState(GL_TEXTURE_COORD_ARRAY);
@@ -471,7 +471,7 @@ CHECKGLERROR
                                {
                                        if (unit != i)
                                        {
-                                               glActiveTextureARB(GL_TEXTURE0_ARB + (unit = i));
+                                               qglActiveTexture(GL_TEXTURE0_ARB + (unit = i));
 CHECKGLERROR
                                        }
                                        glTexEnvf(GL_TEXTURE_ENV, GL_RGB_SCALE_ARB, (texturergbscale[i] = mesh->texturergbscale[i]));
@@ -482,7 +482,7 @@ CHECKGLERROR
                        }
 //                     if (unit != topunit)
 //                     {
-//                             glActiveTextureARB(GL_TEXTURE0_ARB + (unit = topunit));
+//                             qglActiveTexture(GL_TEXTURE0_ARB + (unit = topunit));
 //CHECKGLERROR
 //                     }
                }
@@ -548,7 +548,7 @@ CHECKGLERROR
                if (depthmask != mesh->depthmask)
                {
                        depthmask = mesh->depthmask;
-                       glDepthMask(depthmask);
+                       glDepthMask((GLuint) depthmask);
 CHECKGLERROR
                }
 
@@ -594,7 +594,7 @@ CHECKGLERROR
        {
                for (i = backendunits - 1;i >= 0;i--)
                {
-                       glActiveTextureARB(GL_TEXTURE0_ARB + (unit = i));
+                       qglActiveTexture(GL_TEXTURE0_ARB + (unit = i));
 CHECKGLERROR
                        glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
 CHECKGLERROR
@@ -616,7 +616,7 @@ CHECKGLERROR
                        glBindTexture(GL_TEXTURE_2D, 0);
 CHECKGLERROR
 
-                       glClientActiveTextureARB(GL_TEXTURE0_ARB + (clientunit = i));
+                       qglClientActiveTexture(GL_TEXTURE0_ARB + (clientunit = i));
 CHECKGLERROR
                        glDisableClientState(GL_TEXTURE_COORD_ARRAY);
 CHECKGLERROR
@@ -638,7 +638,7 @@ CHECKGLERROR
 
        glDisable(GL_BLEND);
 CHECKGLERROR
-       glDepthMask(1);
+       glDepthMask(true);
 CHECKGLERROR
        glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
 CHECKGLERROR
index d892a36d3b5aeac9dc9640e41a196677e99af3bc..866bc9486c14ab345cd49fa50c7bf3c23057e600 100644 (file)
@@ -28,9 +28,9 @@ model_t       *loadmodel;
 
 // LordHavoc: increased from 512 to 2048
 #define        MAX_MOD_KNOWN   2048
-model_t        mod_known[MAX_MOD_KNOWN];
+static model_t mod_known[MAX_MOD_KNOWN];
 
-void mod_start()
+static void mod_start(void)
 {
        int i;
        for (i = 0;i < MAX_MOD_KNOWN;i++)
@@ -38,7 +38,7 @@ void mod_start()
                        Mod_UnloadModel(&mod_known[i]);
 }
 
-void mod_shutdown()
+static void mod_shutdown(void)
 {
        int i;
        for (i = 0;i < MAX_MOD_KNOWN;i++)
@@ -46,7 +46,7 @@ void mod_shutdown()
                        Mod_UnloadModel(&mod_known[i]);
 }
 
-void mod_newmap()
+static void mod_newmap(void)
 {
 }