]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - r_explosion.c
two-layer sky rendering now uses GL_ARB_texture_env_combine if available to render...
[xonotic/darkplaces.git] / r_explosion.c
index 0350ac724b70a1b742a4ed097a5749acdf813394..db67b390a9ae634dae1b98242ce3c987759a0496 100644 (file)
@@ -52,8 +52,8 @@ explosion_t explosion[128];
 rtexture_t     *explosiontexture;
 rtexture_t     *explosiontexturefog;
 
-cvar_t r_explosionclip = {"r_explosionclip", "0", true};
-cvar_t r_drawexplosions = {"r_drawexplosions", "1"};
+cvar_t r_explosionclip = {CVAR_SAVE, "r_explosionclip", "1"};
+cvar_t r_drawexplosions = {0, "r_drawexplosions", "1"};
 
 int R_ExplosionVert(int column, int row)
 {
@@ -72,7 +72,7 @@ int R_ExplosionVert(int column, int row)
        return i;
 }
 
-void r_explosion_start()
+void r_explosion_start(void)
 {
        int x, y;
        byte noise1[128][128], noise2[128][128], data[128][128][4];
@@ -101,16 +101,16 @@ void r_explosion_start()
        explosiontexturefog = R_LoadTexture ("explosiontexturefog", 128, 128, &data[0][0][0], TEXF_MIPMAP | TEXF_ALPHA | TEXF_RGBA | TEXF_PRECACHE);
 }
 
-void r_explosion_shutdown()
+void r_explosion_shutdown(void)
 {
 }
 
-void r_explosion_newmap()
+void r_explosion_newmap(void)
 {
        memset(explosion, 0, sizeof(explosion));
 }
 
-void R_Explosion_Init()
+void R_Explosion_Init(void)
 {
        int i, x, y;
        i = 0;
@@ -184,8 +184,8 @@ void R_DrawExplosion(explosion_t *e)
        glColor4f(1,1,1,e->alpha);
        glDisable(GL_TEXTURE_2D);
 //     glBindTexture(GL_TEXTURE_2D, explosiontexture);
-       glVertexPointer(3, GL_FLOAT, 0, (float *) &e->vert[0][0]);
-//     glTexCoordPointer(2, GL_FLOAT, 0, (float *) &explosiontexcoords[0][0]);
+       glVertexPointer(3, GL_FLOAT, sizeof(float[3]), (float *) &e->vert[0][0]);
+//     glTexCoordPointer(2, GL_FLOAT, sizeof(float[2]), (float *) &explosiontexcoords[0][0]);
        glEnableClientState(GL_VERTEX_ARRAY);
 //     glEnableClientState(GL_TEXTURE_COORD_ARRAY);
        glDrawElements(GL_TRIANGLES, EXPLOSIONTRIS, GL_UNSIGNED_INT, indexlist);
@@ -240,7 +240,7 @@ void R_MoveExplosion(explosion_t *e, float frametime)
        }
 }
 
-void R_MoveExplosions()
+void R_MoveExplosions(void)
 {
        int i;
        float frametime;
@@ -259,7 +259,7 @@ void R_MoveExplosions()
        }
 }
 
-void R_DrawExplosions()
+void R_DrawExplosions(void)
 {
        int i;
        if (!r_drawexplosions.value)