]> de.git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
Various graphical tweaks (mainly particle related), some code removed.
authorlordhavoc <lordhavoc@d7cf8633-e32d-0410-b094-e92efae38249>
Wed, 6 Sep 2000 22:11:33 +0000 (22:11 +0000)
committerlordhavoc <lordhavoc@d7cf8633-e32d-0410-b094-e92efae38249>
Wed, 6 Sep 2000 22:11:33 +0000 (22:11 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@24 d7cf8633-e32d-0410-b094-e92efae38249

19 files changed:
cl_parse.c
cl_tent.c
console.c
gl_draw.c
gl_rmain.c
gl_rmisc.c
gl_rsurf.c
gl_screen.c
glquake.h
host.c
r_light.c
r_part.c
render.h
sbar.c
sbar.h
vid.h
vid_glx.c
vid_wgl.c
view.c

index da4055899cd667f324edaf2018c6208b56bcbd50..38acf24afae175e06fe0bb8197ba97d6659904c4 100644 (file)
@@ -103,7 +103,7 @@ entity_t    *CL_EntityNum (int num)
                        Host_Error ("CL_EntityNum: %i is an invalid number",num);
                while (cl.num_entities<=num)
                {
                        Host_Error ("CL_EntityNum: %i is an invalid number",num);
                while (cl.num_entities<=num)
                {
-                       cl_entities[cl.num_entities].colormap = vid.colormap;
+                       cl_entities[cl.num_entities].colormap = 0; //vid.colormap;
                        cl.num_entities++;
                }
        }
                        cl.num_entities++;
                }
        }
@@ -513,7 +513,7 @@ void CL_ParseUpdate (int bits)
                else
                        forcelink = true;       // hack to make null model players work
                if (num > 0 && num <= cl.maxclients)
                else
                        forcelink = true;       // hack to make null model players work
                if (num > 0 && num <= cl.maxclients)
-                       R_TranslatePlayerSkin (num - 1);
+                       R_TranslatePlayerSkin(num - 1);
        }
 
        ent->frame = ((bits & U_FRAME) ? MSG_ReadByte() : (baseline->frame & 0xFF));
        }
 
        ent->frame = ((bits & U_FRAME) ? MSG_ReadByte() : (baseline->frame & 0xFF));
@@ -521,12 +521,12 @@ void CL_ParseUpdate (int bits)
        i = bits & U_COLORMAP ? MSG_ReadByte() : baseline->colormap;
        ent->deltabaseline.colormap = i;
        if (!i)
        i = bits & U_COLORMAP ? MSG_ReadByte() : baseline->colormap;
        ent->deltabaseline.colormap = i;
        if (!i)
-               ent->colormap = vid.colormap;
+               ent->colormap = 0; //vid.colormap;
        else
        {
                if (i > cl.maxclients)
                        Host_Error ("i >= cl.maxclients");
        else
        {
                if (i > cl.maxclients)
                        Host_Error ("i >= cl.maxclients");
-               ent->colormap = vid.colormap; // cl.scores[i-1].translations;
+               ent->colormap = i; //vid.colormap; // cl.scores[i-1].translations;
        }
 
        skin = bits & U_SKIN ? MSG_ReadByte() : baseline->skin;
        }
 
        skin = bits & U_SKIN ? MSG_ReadByte() : baseline->skin;
@@ -534,7 +534,7 @@ void CL_ParseUpdate (int bits)
        {
                ent->skinnum = skin;
                if (num > 0 && num <= cl.maxclients)
        {
                ent->skinnum = skin;
                if (num > 0 && num <= cl.maxclients)
-                       R_TranslatePlayerSkin (num - 1);
+                       R_TranslatePlayerSkin(num - 1);
        }
        ent->deltabaseline.skin = skin;
 
        }
        ent->deltabaseline.skin = skin;
 
@@ -765,7 +765,7 @@ void CL_ParseStatic (void)
 // copy it to the current state
        ent->model = cl.model_precache[ent->baseline.modelindex];
        ent->frame = ent->baseline.frame;
 // copy it to the current state
        ent->model = cl.model_precache[ent->baseline.modelindex];
        ent->frame = ent->baseline.frame;
-       ent->colormap = vid.colormap;
+       ent->colormap = 0; //vid.colormap;
        ent->skinnum = ent->baseline.skin;
        ent->effects = ent->baseline.effects;
        ent->alpha = 1;
        ent->skinnum = ent->baseline.skin;
        ent->effects = ent->baseline.effects;
        ent->alpha = 1;
@@ -959,7 +959,7 @@ void CL_ParseServerMessage (void)
                        if (i >= cl.maxclients)
                                Host_Error ("CL_ParseServerMessage: svc_updatecolors > MAX_SCOREBOARD");
                        cl.scores[i].colors = MSG_ReadByte ();
                        if (i >= cl.maxclients)
                                Host_Error ("CL_ParseServerMessage: svc_updatecolors > MAX_SCOREBOARD");
                        cl.scores[i].colors = MSG_ReadByte ();
-                       R_TranslatePlayerSkin (i);
+                       R_TranslatePlayerSkin(i);
                        break;
                        
                case svc_particle:
                        break;
                        
                case svc_particle:
index bc9f87d7d81d38cacf197181f9897e188203bfd5..42ed0795c5b3c78979f8f03e92980705d6a3ece0 100644 (file)
--- a/cl_tent.c
+++ b/cl_tent.c
@@ -338,7 +338,7 @@ void CL_ParseTEnt (void)
                pos[0] = MSG_ReadCoord ();
                pos[1] = MSG_ReadCoord ();
                pos[2] = MSG_ReadCoord ();
                pos[0] = MSG_ReadCoord ();
                pos[1] = MSG_ReadCoord ();
                pos[2] = MSG_ReadCoord ();
-//             R_ParticleExplosion (pos, false);
+               R_ParticleExplosion (pos, false);
                dl = CL_AllocDlight (0);
                VectorCopy (pos, dl->origin);
                dl->radius = 350;
                dl = CL_AllocDlight (0);
                VectorCopy (pos, dl->origin);
                dl->radius = 350;
@@ -352,7 +352,7 @@ void CL_ParseTEnt (void)
                pos[0] = MSG_ReadCoord ();
                pos[1] = MSG_ReadCoord ();
                pos[2] = MSG_ReadCoord ();
                pos[0] = MSG_ReadCoord ();
                pos[1] = MSG_ReadCoord ();
                pos[2] = MSG_ReadCoord ();
-//             R_ParticleExplosion (pos, false);
+               R_ParticleExplosion (pos, false);
                dl = CL_AllocDlight (0);
                VectorCopy (pos, dl->origin);
                dl->radius = 600;
                dl = CL_AllocDlight (0);
                VectorCopy (pos, dl->origin);
                dl->radius = 600;
@@ -382,7 +382,7 @@ void CL_ParseTEnt (void)
                pos[0] = MSG_ReadCoord ();
                pos[1] = MSG_ReadCoord ();
                pos[2] = MSG_ReadCoord ();
                pos[0] = MSG_ReadCoord ();
                pos[1] = MSG_ReadCoord ();
                pos[2] = MSG_ReadCoord ();
-//             R_ParticleExplosion (pos, false);
+               R_ParticleExplosion (pos, false);
                dl = CL_AllocDlight (0);
                VectorCopy (pos, dl->origin);
                dl->radius = 350;
                dl = CL_AllocDlight (0);
                VectorCopy (pos, dl->origin);
                dl->radius = 350;
@@ -396,7 +396,7 @@ void CL_ParseTEnt (void)
                pos[0] = MSG_ReadCoord ();
                pos[1] = MSG_ReadCoord ();
                pos[2] = MSG_ReadCoord ();
                pos[0] = MSG_ReadCoord ();
                pos[1] = MSG_ReadCoord ();
                pos[2] = MSG_ReadCoord ();
-//             R_ParticleExplosion (pos, false);
+               R_ParticleExplosion (pos, false);
                dl = CL_AllocDlight (0);
                VectorCopy (pos, dl->origin);
                dl->radius = 350;
                dl = CL_AllocDlight (0);
                VectorCopy (pos, dl->origin);
                dl->radius = 350;
@@ -410,7 +410,7 @@ void CL_ParseTEnt (void)
                pos[0] = MSG_ReadCoord ();
                pos[1] = MSG_ReadCoord ();
                pos[2] = MSG_ReadCoord ();
                pos[0] = MSG_ReadCoord ();
                pos[1] = MSG_ReadCoord ();
                pos[2] = MSG_ReadCoord ();
-//             R_BlobExplosion (pos);
+               R_BlobExplosion (pos);
 
                S_StartSound (-1, 0, cl_sfx_r_exp3, pos, 1, 1);
                dl = CL_AllocDlight (0);
 
                S_StartSound (-1, 0, cl_sfx_r_exp3, pos, 1, 1);
                dl = CL_AllocDlight (0);
@@ -501,7 +501,8 @@ entity_t *CL_NewTempEntity (void)
        cl_visedicts[cl_numvisedicts] = ent;
        cl_numvisedicts++;
 
        cl_visedicts[cl_numvisedicts] = ent;
        cl_numvisedicts++;
 
-       ent->colormap = vid.colormap;
+//     ent->colormap = vid.colormap;
+       ent->colormap = 0;
        ent->scale = 1;
        ent->alpha = 1;
        ent->colormod[0] = ent->colormod[1] = ent->colormod[2] = 1;
        ent->scale = 1;
        ent->alpha = 1;
        ent->colormod[0] = ent->colormod[1] = ent->colormod[2] = 1;
index a1346332b023ffe9322c2a080092898954968d40..c3ce5a1b2eb4fe736d4626dbd763f5d4ff5271f3 100644 (file)
--- a/console.c
+++ b/console.c
@@ -571,9 +571,9 @@ void Con_DrawNotify (void)
                
                // LordHavoc: speedup, and other improvements
                if (team_message)
                
                // LordHavoc: speedup, and other improvements
                if (team_message)
-                       sprintf(temptext, "say:%s%c", chat_buffer, (int) 10+((int)(realtime*con_cursorspeed)&1));
-               else
                        sprintf(temptext, "say_team:%s%c", chat_buffer, (int) 10+((int)(realtime*con_cursorspeed)&1));
                        sprintf(temptext, "say_team:%s%c", chat_buffer, (int) 10+((int)(realtime*con_cursorspeed)&1));
+               else
+                       sprintf(temptext, "say:%s%c", chat_buffer, (int) 10+((int)(realtime*con_cursorspeed)&1));
                while (strlen(temptext) >= con_linewidth)
                {
                        Draw_String (8, v, temptext, con_linewidth);
                while (strlen(temptext) >= con_linewidth)
                {
                        Draw_String (8, v, temptext, con_linewidth);
index 88e68abde7d33bd8440e0d65e515950d8f4db930..2e6772f7fa75304cecafe434e7699ba3f24d36be 100644 (file)
--- a/gl_draw.c
+++ b/gl_draw.c
@@ -48,7 +48,7 @@ typedef struct
 byte           conback_buffer[sizeof(qpic_t) + sizeof(glpic_t)];
 qpic_t         *conback = (qpic_t *)&conback_buffer;
 
 byte           conback_buffer[sizeof(qpic_t) + sizeof(glpic_t)];
 qpic_t         *conback = (qpic_t *)&conback_buffer;
 
-int            gl_filter_min = GL_LINEAR_MIPMAP_NEAREST;
+int            gl_filter_min = GL_LINEAR_MIPMAP_LINEAR; //NEAREST;
 int            gl_filter_max = GL_LINEAR;
 
 
 int            gl_filter_max = GL_LINEAR;
 
 
index d48dec0a4561f7acf6574bf6b8f4e8c88a10437a..63e16255782e65a2ff819d9f1e6c436b72605396 100644 (file)
@@ -75,9 +75,9 @@ cvar_t        r_speeds = {"r_speeds","0"};
 cvar_t r_speeds2 = {"r_speeds2","0"};
 cvar_t r_fullbright = {"r_fullbright","0"};
 //cvar_t       r_lightmap = {"r_lightmap","0"};
 cvar_t r_speeds2 = {"r_speeds2","0"};
 cvar_t r_fullbright = {"r_fullbright","0"};
 //cvar_t       r_lightmap = {"r_lightmap","0"};
-//cvar_t       r_shadows = {"r_shadows","0"};
+cvar_t r_shadows = {"r_shadows","0"};
 cvar_t r_wateralpha = {"r_wateralpha","1"};
 cvar_t r_wateralpha = {"r_wateralpha","1"};
-//cvar_t       r_dynamic = {"r_dynamic","1"};
+cvar_t r_dynamic = {"r_dynamic","1"};
 cvar_t r_novis = {"r_novis","0"};
 cvar_t r_waterripple = {"r_waterripple","0"};
 cvar_t r_fullbrights = {"r_fullbrights", "1"};
 cvar_t r_novis = {"r_novis","0"};
 cvar_t r_waterripple = {"r_waterripple","0"};
 cvar_t r_fullbrights = {"r_fullbrights", "1"};
@@ -804,8 +804,7 @@ void R_DrawAliasFrame (aliashdr_t *paliashdr)
                glColor3f (1,1,1);
        }
 
                glColor3f (1,1,1);
        }
 
-       /*
-       if (r_shadows.value && !(currententity->effects & EF_ADDITIVE) && currententity != &cl.viewent)
+       if (!fogenabled && r_shadows.value && !(currententity->effects & EF_ADDITIVE) && currententity != &cl.viewent)
        {
                // flatten it to make a shadow
                float *av = aliasvert + 2, l = lightspot[2] + 0.125;
        {
                // flatten it to make a shadow
                float *av = aliasvert + 2, l = lightspot[2] + 0.125;
@@ -839,7 +838,6 @@ void R_DrawAliasFrame (aliashdr_t *paliashdr)
                glEnable (GL_TEXTURE_2D);
                glColor3f (1,1,1);
        }
                glEnable (GL_TEXTURE_2D);
                glColor3f (1,1,1);
        }
-       */
 
        glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
        glEnable (GL_BLEND);
 
        glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
        glEnable (GL_BLEND);
@@ -1020,8 +1018,7 @@ void R_DrawQ2AliasFrame (md2mem_t *pheader)
                glColor3f (1,1,1);
        }
 
                glColor3f (1,1,1);
        }
 
-       /*
-       if (r_shadows.value && !(currententity->effects & EF_ADDITIVE) && currententity != &cl.viewent)
+       if (!fogenabled && r_shadows.value && !(currententity->effects & EF_ADDITIVE) && currententity != &cl.viewent)
        {
                int i;
                float *av = aliasvert + 2, l = lightspot[2] + 0.125;
        {
                int i;
                float *av = aliasvert + 2, l = lightspot[2] + 0.125;
@@ -1086,7 +1083,6 @@ void R_DrawQ2AliasFrame (md2mem_t *pheader)
                glEnable (GL_TEXTURE_2D);
                glColor3f (1,1,1);
        }
                glEnable (GL_TEXTURE_2D);
                glColor3f (1,1,1);
        }
-       */
 
        glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
        glEnable (GL_BLEND);
 
        glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
        glEnable (GL_BLEND);
@@ -1181,11 +1177,11 @@ void R_DrawAliasModel (entity_t *e, int cull)
 
        // we can't dynamically colormap textures, so they are cached
        // seperately for the players.  Heads are just uncolored.
 
        // we can't dynamically colormap textures, so they are cached
        // seperately for the players.  Heads are just uncolored.
-       if (currententity->colormap != vid.colormap/* && !gl_nocolors.value*/)
+       if (currententity->colormap != 0 /*vid.colormap*/ /* && !gl_nocolors.value*/)
        {
                i = currententity - cl_entities;
                if (i >= 1 && i<=cl.maxclients /* && !strcmp (currententity->model->name, "progs/player.mdl") */)
        {
                i = currententity - cl_entities;
                if (i >= 1 && i<=cl.maxclients /* && !strcmp (currententity->model->name, "progs/player.mdl") */)
-                   glBindTexture(GL_TEXTURE_2D, playertextures - 1 + i);
+                       glBindTexture(GL_TEXTURE_2D, playertextures - 1 + i);
        }
 
 //     if (gl_affinemodels.value)
        }
 
 //     if (gl_affinemodels.value)
index 39cc5bbb60948e8fe47c1cb219a5d3091d0004a4..ceb79089998ed44b0a5f949b85b03170223374a6 100644 (file)
@@ -142,9 +142,9 @@ void R_Init (void)
 //     Cvar_RegisterVariable (&r_lightmap);
        Cvar_RegisterVariable (&r_drawentities);
        Cvar_RegisterVariable (&r_drawviewmodel);
 //     Cvar_RegisterVariable (&r_lightmap);
        Cvar_RegisterVariable (&r_drawentities);
        Cvar_RegisterVariable (&r_drawviewmodel);
-//     Cvar_RegisterVariable (&r_shadows);
+       Cvar_RegisterVariable (&r_shadows);
        Cvar_RegisterVariable (&r_wateralpha);
        Cvar_RegisterVariable (&r_wateralpha);
-//     Cvar_RegisterVariable (&r_dynamic);
+       Cvar_RegisterVariable (&r_dynamic);
        Cvar_RegisterVariable (&r_novis);
        Cvar_RegisterVariable (&r_speeds);
        Cvar_RegisterVariable (&r_waterripple); // LordHavoc: added waterripple
        Cvar_RegisterVariable (&r_novis);
        Cvar_RegisterVariable (&r_speeds);
        Cvar_RegisterVariable (&r_waterripple); // LordHavoc: added waterripple
index 060a0ef72e69eaca9b4eae6ac75e68a8e78e0b1f..55ab1875b8b1e9657dc8672aae3dc3e6283dfb92 100644 (file)
@@ -510,8 +510,8 @@ void DrawTextureChains (void)
                                if (currentwallpoly < MAX_WALLPOLYS && currentwallvert < MAX_WALLVERTS && (currentwallvert + s->polys->numverts) <= MAX_WALLVERTS)
                                {
                                        // check for lightmap modification
                                if (currentwallpoly < MAX_WALLPOLYS && currentwallvert < MAX_WALLVERTS && (currentwallvert + s->polys->numverts) <= MAX_WALLVERTS)
                                {
                                        // check for lightmap modification
-//                                     if (r_dynamic.value)
-//                                     {
+                                       if (r_dynamic.value)
+                                       {
                                                if (s->dlightframe == r_framecount || s->cached_dlight || lighthalf != s->cached_lighthalf) // dynamic this frame or previously, or lighthalf changed
                                                        R_UpdateLightmap(s, s->lightmaptexturenum);
                                                else
                                                if (s->dlightframe == r_framecount || s->cached_dlight || lighthalf != s->cached_lighthalf) // dynamic this frame or previously, or lighthalf changed
                                                        R_UpdateLightmap(s, s->lightmaptexturenum);
                                                else
@@ -521,7 +521,7 @@ void DrawTextureChains (void)
                                                                        R_UpdateLightmap(s, s->lightmaptexturenum);
                                                                        break;
                                                                }
                                                                        R_UpdateLightmap(s, s->lightmaptexturenum);
                                                                        break;
                                                                }
-//                                     }
+                                       }
                                        wallpoly[currentwallpoly].texnum = (unsigned short) t->gl_texturenum;
                                        wallpoly[currentwallpoly].lighttexnum = (unsigned short) lightmap_textures + s->lightmaptexturenum;
                                        wallpoly[currentwallpoly].glowtexnum = (unsigned short) t->gl_glowtexturenum;
                                        wallpoly[currentwallpoly].texnum = (unsigned short) t->gl_texturenum;
                                        wallpoly[currentwallpoly].lighttexnum = (unsigned short) lightmap_textures + s->lightmaptexturenum;
                                        wallpoly[currentwallpoly].glowtexnum = (unsigned short) t->gl_glowtexturenum;
@@ -561,7 +561,7 @@ void DrawTextureChains (void)
                        light = false;
                        if (s->flags & SURF_DRAWFULLBRIGHT)
                                r = g = b = lighthalf ? 128 : 255;
                        light = false;
                        if (s->flags & SURF_DRAWFULLBRIGHT)
                                r = g = b = lighthalf ? 128 : 255;
-                       else if (s->dlightframe == r_dlightframecount/* && r_dynamicwater.value*/)
+                       else if (s->dlightframe == r_dlightframecount && r_dynamic.value)
                                light = true;
                        else
                                r = g = b = lighthalf ? 64 : 128;
                                light = true;
                        else
                                r = g = b = lighthalf ? 64 : 128;
@@ -865,7 +865,7 @@ e->angles[0] = -e->angles[0];       // stupid quake bug
                                                b = 255.0f * currententity->colormod[2];
                                        }
                                }
                                                b = 255.0f * currententity->colormod[2];
                                        }
                                }
-                               else if (s->dlightframe == r_dlightframecount/* && r_dynamicwater.value*/)
+                               else if (s->dlightframe == r_dlightframecount && r_dynamic.value)
                                        light = true;
                                else
                                {
                                        light = true;
                                else
                                {
@@ -963,8 +963,8 @@ e->angles[0] = -e->angles[0];       // stupid quake bug
                        else
                        {
                                // check for lightmap modification
                        else
                        {
                                // check for lightmap modification
-//                             if (r_dynamic.value)
-//                             {
+                               if (r_dynamic.value)
+                               {
                                        if (s->dlightframe == r_framecount || s->cached_dlight || lighthalf != s->cached_lighthalf) // dynamic this frame or previously, or lighthalf changed
                                                R_UpdateLightmap(s, s->lightmaptexturenum);
                                        else
                                        if (s->dlightframe == r_framecount || s->cached_dlight || lighthalf != s->cached_lighthalf) // dynamic this frame or previously, or lighthalf changed
                                                R_UpdateLightmap(s, s->lightmaptexturenum);
                                        else
@@ -974,7 +974,7 @@ e->angles[0] = -e->angles[0];       // stupid quake bug
                                                                R_UpdateLightmap(s, s->lightmaptexturenum);
                                                                break;
                                                        }
                                                                R_UpdateLightmap(s, s->lightmaptexturenum);
                                                                break;
                                                        }
-//                             }
+                               }
                                if (currentwallpoly < MAX_WALLPOLYS && (currentwallvert + s->polys->numverts) <= MAX_WALLVERTS)
                                {
                                        wallpoly[currentwallpoly].texnum = (unsigned short) t->gl_texturenum;
                                if (currentwallpoly < MAX_WALLPOLYS && (currentwallvert + s->polys->numverts) <= MAX_WALLVERTS)
                                {
                                        wallpoly[currentwallpoly].texnum = (unsigned short) t->gl_texturenum;
index 2a0bfa531316d6aae5022557505ba967586e8472..717a04fde41716e18ee81f39017f205512a1b472 100644 (file)
@@ -88,7 +88,6 @@ cvar_t                scr_showram = {"showram","1"};
 cvar_t         scr_showturtle = {"showturtle","0"};
 cvar_t         scr_showpause = {"showpause","1"};
 cvar_t         scr_printspeed = {"scr_printspeed","8"};
 cvar_t         scr_showturtle = {"showturtle","0"};
 cvar_t         scr_showpause = {"showpause","1"};
 cvar_t         scr_printspeed = {"scr_printspeed","8"};
-cvar_t         gl_triplebuffer = {"gl_triplebuffer", "1", true };
 cvar_t         showfps = {"showfps", "0", true};
 
 extern cvar_t  crosshair;
 cvar_t         showfps = {"showfps", "0", true};
 
 extern cvar_t  crosshair;
@@ -108,8 +107,6 @@ extern int                     sb_lines;
 
 extern viddef_t        vid;                            // global video state
 
 
 extern viddef_t        vid;                            // global video state
 
-vrect_t                scr_vrect;
-
 qboolean       scr_disabled_for_loading;
 qboolean       scr_drawloading;
 float          scr_disabled_time;
 qboolean       scr_disabled_for_loading;
 qboolean       scr_drawloading;
 float          scr_disabled_time;
@@ -340,8 +337,6 @@ static void SCR_CalcRefdef (void)
 
        r_refdef.fov_x = scr_fov.value;
        r_refdef.fov_y = CalcFov (r_refdef.fov_x, r_refdef.vrect.width, r_refdef.vrect.height);
 
        r_refdef.fov_x = scr_fov.value;
        r_refdef.fov_y = CalcFov (r_refdef.fov_x, r_refdef.vrect.width, r_refdef.vrect.height);
-
-       scr_vrect = r_refdef.vrect;
 }
 
 
 }
 
 
@@ -390,7 +385,6 @@ void SCR_Init (void)
        Cvar_RegisterVariable (&scr_showpause);
        Cvar_RegisterVariable (&scr_centertime);
        Cvar_RegisterVariable (&scr_printspeed);
        Cvar_RegisterVariable (&scr_showpause);
        Cvar_RegisterVariable (&scr_centertime);
        Cvar_RegisterVariable (&scr_printspeed);
-       Cvar_RegisterVariable (&gl_triplebuffer);
        Cvar_RegisterVariable (&showfps);
 
 //
        Cvar_RegisterVariable (&showfps);
 
 //
@@ -422,7 +416,7 @@ void SCR_DrawRam (void)
        if (!r_cache_thrash)
                return;
 
        if (!r_cache_thrash)
                return;
 
-       Draw_Pic (scr_vrect.x+32, scr_vrect.y, scr_ram);
+       Draw_Pic (32, 0, scr_ram);
 }
 
 /*
 }
 
 /*
@@ -447,7 +441,7 @@ void SCR_DrawTurtle (void)
        if (count < 3)
                return;
 
        if (count < 3)
                return;
 
-       Draw_Pic (scr_vrect.x, scr_vrect.y, scr_turtle);
+       Draw_Pic (0, 0, scr_turtle);
 }
 
 /*
 }
 
 /*
@@ -462,7 +456,7 @@ void SCR_DrawNet (void)
        if (cls.demoplayback)
                return;
 
        if (cls.demoplayback)
                return;
 
-       Draw_Pic (scr_vrect.x+64, scr_vrect.y, scr_net);
+       Draw_Pic (64, 0, scr_net);
 }
 
 /*
 }
 
 /*
@@ -547,18 +541,6 @@ void SCR_SetUpToDrawConsole (void)
                if (scr_conlines < scr_con_current)
                        scr_con_current = scr_conlines;
        }
                if (scr_conlines < scr_con_current)
                        scr_con_current = scr_conlines;
        }
-
-       /*
-       if (clearconsole++ < vid.numpages)
-       {
-               Sbar_Changed ();
-       }
-       else if (clearnotify++ < vid.numpages)
-       {
-       }
-       else
-               con_notifylines = 0;
-       */
 }
        
 /*
 }
        
 /*
@@ -879,8 +861,6 @@ void SCR_UpdateScreen (void)
        if (!gl_arrays)
                gl_vertexarrays.value = 0;
 
        if (!gl_arrays)
                gl_vertexarrays.value = 0;
 
-       vid.numpages = 2 + gl_triplebuffer.value;
-
        scr_copytop = 0;
        scr_copyeverything = 0;
 
        scr_copytop = 0;
        scr_copyeverything = 0;
 
@@ -955,7 +935,7 @@ void SCR_UpdateScreen (void)
        else
        {
                if (crosshair.value)
        else
        {
                if (crosshair.value)
-                       Draw_Character (scr_vrect.x + scr_vrect.width/2, scr_vrect.y + scr_vrect.height/2, '+');
+                       Draw_Character (r_refdef.vrect.x + r_refdef.vrect.width/2, r_refdef.vrect.y + r_refdef.vrect.height/2, '+');
                
                SCR_DrawRam ();
                SCR_DrawNet ();
                
                SCR_DrawRam ();
                SCR_DrawNet ();
index 8bb15400015f61dc9ff1f6d4779561356a6378e5..4852986b3f6753d8bf4b423e0e658fe3af0efc6d 100644 (file)
--- a/glquake.h
+++ b/glquake.h
@@ -102,7 +102,7 @@ typedef struct
 
 // LordHavoc: added dust, smoke, snow, bloodcloud, and many others
 typedef enum {
 
 // LordHavoc: added dust, smoke, snow, bloodcloud, and many others
 typedef enum {
-       pt_static, pt_grav, pt_slowgrav, pt_fire, pt_explode, pt_explode2, pt_blob, pt_blob2, pt_dust, pt_smoke, pt_snow, pt_bulletpuff, pt_bloodcloud, pt_fadespark, pt_fadespark2, pt_fallfadespark, pt_fallfadespark2, pt_bubble
+       pt_static, pt_grav, pt_slowgrav, pt_fire, pt_explode, pt_explode2, pt_blob, pt_blob2, pt_dust, pt_smoke, pt_snow, pt_bulletpuff, pt_bloodcloud, pt_fadespark, pt_fadespark2, pt_fallfadespark, pt_fallfadespark2, pt_bubble, pt_fade
 } ptype_t;
 
 // !!! if this is changed, it must be changed in d_ifacea.h too !!!
 } ptype_t;
 
 // !!! if this is changed, it must be changed in d_ifacea.h too !!!
@@ -120,7 +120,6 @@ typedef struct particle_s
        // LordHavoc: added for improved particle effects
        float           scale;
        short           texnum;
        // LordHavoc: added for improved particle effects
        float           scale;
        short           texnum;
-       short           contents; // if non-zero, particles will die outside of this content type
        float           alpha; // 0-255
        float           time2; // used for various things (snow fluttering, for example)
        vec3_t          vel2; // used for snow fluttering (base velocity, wind for instance)
        float           alpha; // 0-255
        float           time2; // used for various things (snow fluttering, for example)
        vec3_t          vel2; // used for snow fluttering (base velocity, wind for instance)
@@ -172,9 +171,9 @@ extern      cvar_t  r_speeds;
 //extern       cvar_t  r_waterwarp;
 extern cvar_t  r_fullbright;
 //extern       cvar_t  r_lightmap;
 //extern       cvar_t  r_waterwarp;
 extern cvar_t  r_fullbright;
 //extern       cvar_t  r_lightmap;
-//extern       cvar_t  r_shadows;
+extern cvar_t  r_shadows;
 extern cvar_t  r_wateralpha;
 extern cvar_t  r_wateralpha;
-//extern       cvar_t  r_dynamic;
+extern cvar_t  r_dynamic;
 extern cvar_t  r_novis;
 extern cvar_t  r_waterripple;
 
 extern cvar_t  r_novis;
 extern cvar_t  r_waterripple;
 
diff --git a/host.c b/host.c
index a1fc8a578a3c4aa2323c80f58bba0c39c98ee895..72457eee96462ebb69ef4ffde01369e904853f60 100644 (file)
--- a/host.c
+++ b/host.c
@@ -51,7 +51,7 @@ client_t      *host_client;                   // current client
 jmp_buf        host_abortserver;
 
 byte           *host_basepal;
 jmp_buf        host_abortserver;
 
 byte           *host_basepal;
-byte           *host_colormap;
+//byte         *host_colormap;
 
 cvar_t host_framerate = {"host_framerate","0"};        // set for slow motion
 cvar_t host_speeds = {"host_speeds","0"};                      // set for running times
 
 cvar_t host_framerate = {"host_framerate","0"};        // set for slow motion
 cvar_t host_speeds = {"host_speeds","0"};                      // set for running times
@@ -901,9 +901,9 @@ void Host_Init (quakeparms_t *parms)
                host_basepal = (byte *)COM_LoadHunkFile ("gfx/palette.lmp", false);
                if (!host_basepal)
                        Sys_Error ("Couldn't load gfx/palette.lmp");
                host_basepal = (byte *)COM_LoadHunkFile ("gfx/palette.lmp", false);
                if (!host_basepal)
                        Sys_Error ("Couldn't load gfx/palette.lmp");
-               host_colormap = (byte *)COM_LoadHunkFile ("gfx/colormap.lmp", false);
-               if (!host_colormap)
-                       Sys_Error ("Couldn't load gfx/colormap.lmp");
+//             host_colormap = (byte *)COM_LoadHunkFile ("gfx/colormap.lmp", false);
+//             if (!host_colormap)
+//                     Sys_Error ("Couldn't load gfx/colormap.lmp");
 
 #ifndef _WIN32 // on non win32, mouse comes before video for security reasons
                IN_Init ();
 
 #ifndef _WIN32 // on non win32, mouse comes before video for security reasons
                IN_Init ();
index ab541e66fe199607dcc5cfc0f49d8b796e91fcd5..2246670c925c0e50bd71066620dbc44473fc09e8 100644 (file)
--- a/r_light.c
+++ b/r_light.c
@@ -178,8 +178,8 @@ void R_PushDlights (void)
 
        r_dlightframecount = r_framecount + 1;  // because the count hasn't advanced yet for this frame
 
 
        r_dlightframecount = r_framecount + 1;  // because the count hasn't advanced yet for this frame
 
-//     if (gl_flashblend.value || !r_dynamic.value)
-//             return;
+       if (/*gl_flashblend.value ||*/ !r_dynamic.value)
+               return;
 
        l = cl_dlights;
 
 
        l = cl_dlights;
 
@@ -314,7 +314,7 @@ void R_DynamicLightPoint(vec3_t color, vec3_t org, int *dlightbits)
        vec3_t  dist;
        float   brightness, r, f;
 
        vec3_t  dist;
        float   brightness, r, f;
 
-       if (/*gl_flashblend.value || !r_dynamic.value || */(!dlightbits[0] && !dlightbits[1] && !dlightbits[2] && !dlightbits[3] && !dlightbits[4] && !dlightbits[5] && !dlightbits[6] && !dlightbits[7]))
+       if (/*gl_flashblend.value ||*/ !r_dynamic.value || (!dlightbits[0] && !dlightbits[1] && !dlightbits[2] && !dlightbits[3] && !dlightbits[4] && !dlightbits[5] && !dlightbits[6] && !dlightbits[7]))
                return;
 
        for (i=0 ; i<MAX_DLIGHTS ; i++)
                return;
 
        for (i=0 ; i<MAX_DLIGHTS ; i++)
@@ -343,8 +343,8 @@ void R_DynamicLightPointNoMask(vec3_t color, vec3_t org)
        vec3_t  dist;
        float   brightness, r, f;
 
        vec3_t  dist;
        float   brightness, r, f;
 
-//     if (gl_flashblend.value || !r_dynamic.value)
-//             return;
+       if (/*gl_flashblend.value ||*/ !r_dynamic.value)
+               return;
 
        for (i=0 ; i<MAX_DLIGHTS ; i++)
        {
 
        for (i=0 ; i<MAX_DLIGHTS ; i++)
        {
index 1f517d7a925495a953e9ca5d3ac7d038daf3aa66..ab082e1060fa0f6ee915aed2a0aaae2dd9615d3a 100644 (file)
--- a/r_part.c
+++ b/r_part.c
@@ -342,7 +342,6 @@ avelocities[0][i] = (rand()&255) * 0.01;
                p->next = active_particles;
                active_particles = p;
 
                p->next = active_particles;
                active_particles = p;
 
-               p->contents = 0;
                p->texnum = flareparticletexture;
                p->scale = 2;
                p->alpha = 255;
                p->texnum = flareparticletexture;
                p->scale = 2;
                p->alpha = 255;
@@ -412,7 +411,6 @@ void R_ReadPointFile_f (void)
                p->next = active_particles;
                active_particles = p;
                
                p->next = active_particles;
                active_particles = p;
                
-               p->contents = 0;
                p->texnum = particletexture;
                p->scale = 2;
                p->alpha = 255;
                p->texnum = particletexture;
                p->scale = 2;
                p->alpha = 255;
@@ -460,14 +458,13 @@ R_ParticleExplosion
 
 ===============
 */
 
 ===============
 */
-/*
 void R_ParticleExplosion (vec3_t org, int smoke)
 {
        int                     i, j;
        particle_t      *p;
        if (!r_particles.value) return; // LordHavoc: particles are optional
        
 void R_ParticleExplosion (vec3_t org, int smoke)
 {
        int                     i, j;
        particle_t      *p;
        if (!r_particles.value) return; // LordHavoc: particles are optional
        
-       for (i=0 ; i<2048 ; i++)
+       for (i=0 ; i<1024 ; i++)
        {
                if (!free_particles)
                        return;
        {
                if (!free_particles)
                        return;
@@ -476,13 +473,12 @@ void R_ParticleExplosion (vec3_t org, int smoke)
                p->next = active_particles;
                active_particles = p;
 
                p->next = active_particles;
                active_particles = p;
 
-               p->contents = 0;
-               p->texnum = flareparticletexture;
-               p->scale = lhrandom(2,5);
+               p->texnum = smokeparticletexture[rand()&7];
+               p->scale = lhrandom(1,3);
                p->alpha = rand()&255;
                p->die = cl.time + 5;
                p->color = ramp1[0];
                p->alpha = rand()&255;
                p->die = cl.time + 5;
                p->color = ramp1[0];
-               p->ramp = rand()&3;
+               p->ramp = lhrandom(0, 4);
 //             if (i & 1)
 //                     p->type = pt_explode;
 //             else
 //             if (i & 1)
 //                     p->type = pt_explode;
 //             else
@@ -492,9 +488,9 @@ void R_ParticleExplosion (vec3_t org, int smoke)
                for (j=0 ; j<3 ; j++)
                {
                        p->org[j] = org[j] + ((rand()&15)-8);
                for (j=0 ; j<3 ; j++)
                {
                        p->org[j] = org[j] + ((rand()&15)-8);
-                       p->vel[j] = (rand()&511)-256;
+                       p->vel[j] = lhrandom(-192, 192);
                }
                }
-               p->vel[j] += 200;
+               p->vel[2] += 160;
        }
 
        if (smoke)
        }
 
        if (smoke)
@@ -508,7 +504,6 @@ void R_ParticleExplosion (vec3_t org, int smoke)
                        p->next = active_particles;
                        active_particles = p;
 
                        p->next = active_particles;
                        active_particles = p;
 
-                       p->contents = 0;
                        p->texnum = smokeparticletexture[rand()&7];
                        p->scale = 12;
                        p->alpha = 80;
                        p->texnum = smokeparticletexture[rand()&7];
                        p->scale = 12;
                        p->alpha = 80;
@@ -523,7 +518,6 @@ void R_ParticleExplosion (vec3_t org, int smoke)
                }
        }
 }
                }
        }
 }
-*/
 
 /*
 ===============
 
 /*
 ===============
@@ -531,7 +525,6 @@ R_ParticleExplosion2
 
 ===============
 */
 
 ===============
 */
-/*
 void R_ParticleExplosion2 (vec3_t org, int colorStart, int colorLength)
 {
        int                     i, j;
 void R_ParticleExplosion2 (vec3_t org, int colorStart, int colorLength)
 {
        int                     i, j;
@@ -548,9 +541,8 @@ void R_ParticleExplosion2 (vec3_t org, int colorStart, int colorLength)
                p->next = active_particles;
                active_particles = p;
 
                p->next = active_particles;
                active_particles = p;
 
-               p->contents = 0;
-               p->texnum = flareparticletexture;
-               p->scale = 4;
+               p->texnum = smokeparticletexture[rand()&7];
+               p->scale = 1.5;
                p->alpha = 255;
                p->die = cl.time + 0.3;
                p->color = colorStart + (colorMod % colorLength);
                p->alpha = 255;
                p->die = cl.time + 0.3;
                p->color = colorStart + (colorMod % colorLength);
@@ -560,11 +552,10 @@ void R_ParticleExplosion2 (vec3_t org, int colorStart, int colorLength)
                for (j=0 ; j<3 ; j++)
                {
                        p->org[j] = org[j] + ((rand()&15)-8);
                for (j=0 ; j<3 ; j++)
                {
                        p->org[j] = org[j] + ((rand()&15)-8);
-                       p->vel[j] = (rand()%512)-256;
+                       p->vel[j] = lhrandom(-128, 128);
                }
        }
 }
                }
        }
 }
-*/
 
 /*
 ===============
 
 /*
 ===============
@@ -572,7 +563,6 @@ R_BlobExplosion
 
 ===============
 */
 
 ===============
 */
-/*
 void R_BlobExplosion (vec3_t org)
 {
        int                     i, j;
 void R_BlobExplosion (vec3_t org)
 {
        int                     i, j;
@@ -588,9 +578,8 @@ void R_BlobExplosion (vec3_t org)
                p->next = active_particles;
                active_particles = p;
 
                p->next = active_particles;
                active_particles = p;
 
-               p->contents = 0;
-               p->texnum = flareparticletexture;
-               p->scale = 4;
+               p->texnum = smokeparticletexture[rand()&7];
+               p->scale = 2;
                p->alpha = 255;
                p->die = cl.time + 1 + (rand()&8)*0.05;
 
                p->alpha = 255;
                p->die = cl.time + 1 + (rand()&8)*0.05;
 
@@ -601,7 +590,7 @@ void R_BlobExplosion (vec3_t org)
                        for (j=0 ; j<3 ; j++)
                        {
                                p->org[j] = org[j] + ((rand()%32)-16);
                        for (j=0 ; j<3 ; j++)
                        {
                                p->org[j] = org[j] + ((rand()%32)-16);
-                               p->vel[j] = (rand()%512)-256;
+                               p->vel[j] = lhrandom(-128, 128);
                        }
                }
                else
                        }
                }
                else
@@ -611,12 +600,13 @@ void R_BlobExplosion (vec3_t org)
                        for (j=0 ; j<3 ; j++)
                        {
                                p->org[j] = org[j] + ((rand()%32)-16);
                        for (j=0 ; j<3 ; j++)
                        {
                                p->org[j] = org[j] + ((rand()%32)-16);
-                               p->vel[j] = (rand()%512)-256;
+                               p->vel[j] = lhrandom(-128, 128);
                        }
                }
                        }
                }
+               p->vel[0] *= 0.25;
+               p->vel[1] *= 0.25;
        }
 }
        }
 }
-*/
 
 /*
 ===============
 
 /*
 ===============
@@ -626,11 +616,16 @@ R_RunParticleEffect
 */
 void R_RunParticleEffect (vec3_t org, vec3_t dir, int color, int count)
 {
 */
 void R_RunParticleEffect (vec3_t org, vec3_t dir, int color, int count)
 {
-       int                     i, j;
+       int                     j;
        particle_t      *p;
        if (!r_particles.value) return; // LordHavoc: particles are optional
        
        particle_t      *p;
        if (!r_particles.value) return; // LordHavoc: particles are optional
        
-       for (i=0 ; i<count ; i++)
+       if (count == 1024)
+       {
+               R_ParticleExplosion(org, false);
+               return;
+       }
+       while (count)
        {
                if (!free_particles)
                        return;
        {
                if (!free_particles)
                        return;
@@ -638,48 +633,26 @@ void R_RunParticleEffect (vec3_t org, vec3_t dir, int color, int count)
                free_particles = p->next;
                p->next = active_particles;
                active_particles = p;
                free_particles = p->next;
                p->next = active_particles;
                active_particles = p;
-
-               p->contents = 0;
-               if (count == 1024)
-               {       // rocket explosion
-                       p->texnum = flareparticletexture;
-                       p->scale = 4;
-                       p->alpha = 255;
-                       p->die = cl.time + 5;
-                       p->color = ramp1[0];
-                       p->ramp = rand()&3;
-                       if (i & 1)
-                       {
-                               p->type = pt_explode;
-                               for (j=0 ; j<3 ; j++)
-                               {
-                                       p->org[j] = org[j] + ((rand()%32)-16);
-                                       p->vel[j] = (rand()%512)-256;
-                               }
-                       }
-                       else
-                       {
-                               p->type = pt_explode2;
-                               for (j=0 ; j<3 ; j++)
-                               {
-                                       p->org[j] = org[j] + ((rand()%32)-16);
-                                       p->vel[j] = (rand()%512)-256;
-                               }
-                       }
+               if (count & 3)
+               {
+                       p->alpha = (count & 3) * 16 + (rand()&15);
+                       count &= ~3;
                }
                else
                {
                }
                else
                {
-                       p->texnum = flareparticletexture;
-                       p->scale = 4;
-                       p->alpha = 255;
-                       p->die = cl.time + 0.1*(rand()%5);
-                       p->color = (color&~7) + (rand()&7);
-                       p->type = pt_static; //slowgrav;
-                       for (j=0 ; j<3 ; j++)
-                       {
-                               p->org[j] = org[j] + ((rand()&15)-8);
-                               p->vel[j] = dir[j]*15;// + (rand()%300)-150;
-                       }
+                       p->alpha = 64;
+                       count -= 4;
+               }
+
+               p->texnum = particletexture;
+               p->scale = 6;
+               p->die = cl.time + 1; //lhrandom(0.1, 0.5);
+               p->color = (color&~7) + (rand()&7);
+               p->type = pt_fade; //static; //slowgrav;
+               for (j=0 ; j<3 ; j++)
+               {
+                       p->org[j] = org[j] + ((rand()&15)-8);
+                       p->vel[j] = dir[j]*15;// + (rand()%300)-150;
                }
        }
 }
                }
        }
 }
@@ -703,7 +676,6 @@ void R_SparkShower (vec3_t org, vec3_t dir, int count, int type)
        free_particles = p->next;
        p->next = active_particles;
        active_particles = p;
        free_particles = p->next;
        p->next = active_particles;
        active_particles = p;
-       p->contents = 0;
        if (type == 0) // sparks
        {
                p->texnum = smokeparticletexture[rand()&7];
        if (type == 0) // sparks
        {
                p->texnum = smokeparticletexture[rand()&7];
@@ -717,7 +689,7 @@ void R_SparkShower (vec3_t org, vec3_t dir, int count, int type)
        }
        else // blood
        {
        }
        else // blood
        {
-               p->texnum = bloodcloudparticletexture;
+               p->texnum = smokeparticletexture[rand()&7];
                p->scale = 12;
                p->alpha = 128;
                p->color = (rand()&3)+68;
                p->scale = 12;
                p->alpha = 128;
                p->color = (rand()&3)+68;
@@ -736,7 +708,6 @@ void R_SparkShower (vec3_t org, vec3_t dir, int count, int type)
                p->next = active_particles;
                active_particles = p;
 
                p->next = active_particles;
                active_particles = p;
 
-               p->contents = 0;
                p->texnum = flareparticletexture;
                p->scale = 2;
                p->alpha = 255;
                p->texnum = flareparticletexture;
                p->scale = 2;
                p->alpha = 255;
@@ -795,7 +766,6 @@ void R_BloodShower (vec3_t mins, vec3_t maxs, float velspeed, int count)
                p->next = active_particles;
                active_particles = p;
 
                p->next = active_particles;
                active_particles = p;
 
-               p->contents = 0;
                p->texnum = bloodcloudparticletexture;
                p->scale = 12;
                p->alpha = 96 + (rand()&63);
                p->texnum = bloodcloudparticletexture;
                p->scale = 12;
                p->alpha = 96 + (rand()&63);
@@ -833,7 +803,6 @@ void R_ParticleCube (vec3_t mins, vec3_t maxs, vec3_t dir, int count, int colorb
                p->next = active_particles;
                active_particles = p;
 
                p->next = active_particles;
                active_particles = p;
 
-               p->contents = 0;
                p->texnum = flareparticletexture;
                p->scale = 6;
                p->alpha = 255;
                p->texnum = flareparticletexture;
                p->scale = 6;
                p->alpha = 255;
@@ -898,7 +867,6 @@ void R_ParticleRain (vec3_t mins, vec3_t maxs, vec3_t dir, int count, int colorb
                org[1] = diff[1] * (float) (rand()&1023) * (1.0 / 1024.0) + mins[1];
                org[2] = z;
 
                org[1] = diff[1] * (float) (rand()&1023) * (1.0 / 1024.0) + mins[1];
                org[2] = z;
 
-               p->contents = 0;
                p->scale = 1.5;
                p->alpha = 255;
                p->die = t;
                p->scale = 1.5;
                p->alpha = 255;
                p->die = t;
@@ -945,7 +913,6 @@ void R_LavaSplash (vec3_t org)
                                p->next = active_particles;
                                active_particles = p;
                
                                p->next = active_particles;
                                active_particles = p;
                
-                               p->contents = 0;
                                p->texnum = flareparticletexture;
                                p->scale = 10;
                                p->alpha = 128;
                                p->texnum = flareparticletexture;
                                p->scale = 10;
                                p->alpha = 128;
@@ -1025,7 +992,6 @@ void R_TeleportSplash (vec3_t org)
                                p->next = active_particles;
                                active_particles = p;
                
                                p->next = active_particles;
                                active_particles = p;
                
-                               p->contents = 0;
                                p->texnum = flareparticletexture;
                                p->scale = 4;
                                p->alpha = lhrandom(32,256);
                                p->texnum = flareparticletexture;
                                p->scale = 4;
                                p->alpha = lhrandom(32,256);
@@ -1082,7 +1048,6 @@ void R_RocketTrail (vec3_t start, vec3_t end, int type, entity_t *ent)
                p->next = active_particles;
                active_particles = p;
                
                p->next = active_particles;
                active_particles = p;
                
-               p->contents = 0;
                p->vel[0] = p->vel[1] = p->vel[2] = 0;
                p->die = cl.time + 2;
 
                p->vel[0] = p->vel[1] = p->vel[2] = 0;
                p->die = cl.time + 2;
 
@@ -1093,7 +1058,6 @@ void R_RocketTrail (vec3_t start, vec3_t end, int type, entity_t *ent)
                                if (bubbles)
                                {
                                        dec = 0.005f;
                                if (bubbles)
                                {
                                        dec = 0.005f;
-                                       p->contents = contents;
                                        p->texnum = bubbleparticletexture;
                                        p->scale = lhrandom(1,2);
                                        p->alpha = 255;
                                        p->texnum = bubbleparticletexture;
                                        p->scale = lhrandom(1,2);
                                        p->alpha = 255;
@@ -1136,9 +1100,9 @@ void R_RocketTrail (vec3_t start, vec3_t end, int type, entity_t *ent)
                                */
 
                        case 2: // blood
                                */
 
                        case 2: // blood
-                               dec = 0.03f;
-                               p->texnum = bloodcloudparticletexture;
-                               p->scale = lhrandom(8, 12);
+                               dec = 0.025f;
+                               p->texnum = smokeparticletexture[rand()&7];
+                               p->scale = lhrandom(6, 8);
                                p->alpha = 255;
                                p->color = (rand()&3)+68;
                                p->type = pt_bloodcloud;
                                p->alpha = 255;
                                p->color = (rand()&3)+68;
                                p->type = pt_bloodcloud;
@@ -1179,10 +1143,10 @@ void R_RocketTrail (vec3_t start, vec3_t end, int type, entity_t *ent)
                                break;
 
                        case 4: // slight blood
                                break;
 
                        case 4: // slight blood
-                               dec = 0.03f; // sparse trail
-                               p->texnum = bloodcloudparticletexture;
-                               p->scale = lhrandom(8,12);
-                               p->alpha = 255;
+                               dec = 0.025f; // sparse trail
+                               p->texnum = smokeparticletexture[rand()&7];
+                               p->scale = lhrandom(6, 8);
+                               p->alpha = 192;
                                p->color = (rand()&3)+68;
                                p->type = pt_fadespark2;
                                p->die = cl.time + 2;
                                p->color = (rand()&3)+68;
                                p->type = pt_fadespark2;
                                p->die = cl.time + 2;
@@ -1195,8 +1159,8 @@ void R_RocketTrail (vec3_t start, vec3_t end, int type, entity_t *ent)
 
                        case 6: // voor trail
                                dec = 0.05f; // sparse trail
 
                        case 6: // voor trail
                                dec = 0.05f; // sparse trail
-                               p->texnum = flareparticletexture;
-                               p->scale = lhrandom(4, 8);
+                               p->texnum = smokeparticletexture[rand()&7];
+                               p->scale = lhrandom(3, 5);
                                p->alpha = 255;
                                p->color = 9*16 + 8 + (rand()&3);
                                p->type = pt_fadespark2;
                                p->alpha = 255;
                                p->color = 9*16 + 8 + (rand()&3);
                                p->type = pt_fadespark2;
@@ -1250,7 +1214,6 @@ void R_RocketTrail2 (vec3_t start, vec3_t end, int color, entity_t *ent)
                
                VectorCopy (vec3_origin, p->vel);
 
                
                VectorCopy (vec3_origin, p->vel);
 
-               p->contents = 0;
                p->texnum = flareparticletexture;
                p->scale = 8;
                p->alpha = 192;
                p->texnum = flareparticletexture;
                p->scale = 8;
                p->alpha = 192;
@@ -1333,12 +1296,6 @@ void R_DrawParticles (void)
                if (!p)
                        break;
 
                if (!p)
                        break;
 
-               a = Mod_PointInLeaf(p->org, cl.worldmodel)->contents;
-               if (a == CONTENTS_SOLID || (p->contents && p->contents != a))
-               {
-                       p->die = -1;
-                       continue;
-               }
                VectorSubtract(p->org, r_refdef.vieworg, v);
                if (DotProduct(v, v) >= 256.0f)
                {
                VectorSubtract(p->org, r_refdef.vieworg, v);
                if (DotProduct(v, v) >= 256.0f)
                {
@@ -1409,8 +1366,9 @@ void R_DrawParticles (void)
                                p->color = ramp2[(int)p->ramp];
 //                     p->vel[2] -= grav1; // LordHavoc: apply full gravity to explosion sparks
                        for (i=0 ; i<3 ; i++)
                                p->color = ramp2[(int)p->ramp];
 //                     p->vel[2] -= grav1; // LordHavoc: apply full gravity to explosion sparks
                        for (i=0 ; i<3 ; i++)
-                               p->vel[i] -= p->vel[i]*frametime;
-//                     p->vel[2] -= grav;
+//                             p->vel[i] -= p->vel[i]*frametime;
+                               p->vel[i] *= dvel;
+////                   p->vel[2] -= grav;
                        break;
 
                case pt_blob:
                        break;
 
                case pt_blob:
@@ -1466,8 +1424,8 @@ void R_DrawParticles (void)
                                p->die = -1;
                        break;
                case pt_bloodcloud:
                                p->die = -1;
                        break;
                case pt_bloodcloud:
-                       p->scale -= frametime * 24;
-                       p->alpha -= frametime * 128;
+                       p->scale += frametime * 4;
+                       p->alpha -= frametime * 64;
                        p->vel[2] -= grav;
                        if (p->alpha < 1 || p->scale < 1)
                                p->die = -1;
                        p->vel[2] -= grav;
                        if (p->alpha < 1 || p->scale < 1)
                                p->die = -1;
@@ -1496,7 +1454,14 @@ void R_DrawParticles (void)
                        if (p->alpha < 1)
                                p->die = -1;
                        break;
                        if (p->alpha < 1)
                                p->die = -1;
                        break;
+               case pt_fade:
+                       p->alpha -= frametime * 512;
+                       if (p->alpha < 1)
+                               p->die = -1;
+                       break;
                case pt_bubble:
                case pt_bubble:
+                       if (Mod_PointInLeaf(p->org, cl.worldmodel)->contents == CONTENTS_EMPTY)
+                               p->die = -1;
                        p->vel[2] += grav1 * 2;
                        if (p->vel[2] >= 200)
                                p->vel[2] = lhrandom(130, 200);
                        p->vel[2] += grav1 * 2;
                        if (p->vel[2] >= 200)
                                p->vel[2] = lhrandom(130, 200);
index 78289b5e137395a6d8ff3078789806efb4c3a0f2..5f5d224ab574a18b2c32a969953b9d42d2f93c81 100644 (file)
--- a/render.h
+++ b/render.h
@@ -68,7 +68,8 @@ typedef struct entity_s
        struct efrag_s                  *efrag;                 // linked list of efrags
        int                                             frame;
        float                                   syncbase;               // for client-side animations
        struct efrag_s                  *efrag;                 // linked list of efrags
        int                                             frame;
        float                                   syncbase;               // for client-side animations
-       byte                                    *colormap;
+//     byte                                    *colormap;
+       int                                             colormap;
        int                                             effects;                // light, particals, etc
        int                                             skinnum;                // for Alias models
        int                                             visframe;               // last frame this entity was
        int                                             effects;                // light, particals, etc
        int                                             skinnum;                // for Alias models
        int                                             visframe;               // last frame this entity was
diff --git a/sbar.c b/sbar.c
index 9fe505a21c2d9483dbb9649f70170a8330022774..66c1af202216c4bfa39d57b242bdea932d22ad79 100644 (file)
--- a/sbar.c
+++ b/sbar.c
@@ -22,8 +22,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 #include "quakedef.h"
 
 
 #include "quakedef.h"
 
 
-//int                  sb_updates;             // if >= vid.numpages, no update needed
-
 #define STAT_MINUS             10      // num frame for '-' stats digit
 qpic_t         *sb_nums[2][11];
 qpic_t         *sb_colon, *sb_slash;
 #define STAT_MINUS             10      // num frame for '-' stats digit
 qpic_t         *sb_nums[2][11];
 qpic_t         *sb_colon, *sb_slash;
@@ -928,10 +926,6 @@ void Sbar_Draw (void)
        if (scr_con_current == vid.height)
                return;         // console is full screen
 
        if (scr_con_current == vid.height)
                return;         // console is full screen
 
-       // LordHavoc: always redraw
-       //if (sb_updates >= vid.numpages)
-       //      return;
-
        scr_copyeverything = 1;
 
 //     sb_updates++;
        scr_copyeverything = 1;
 
 //     sb_updates++;
@@ -1127,7 +1121,7 @@ void Sbar_DeathmatchOverlay (void)
                fph = total ? (int) ((float) s->frags * 3600.0 / total) : 0;
                if (fph < -999) fph = -999;
                if (fph > 9999) fph = 9999;
                fph = total ? (int) ((float) s->frags * 3600.0 / total) : 0;
                if (fph < -999) fph = -999;
                if (fph > 9999) fph = 9999;
-               
+
                // put it together
                sprintf (num, "%c %4i:%4i  %3i:%i%i %s", k == cl.viewentity - 1 ? 12 : ' ', (int) s->frags, fph, minutes, tens, units, s->name);
                Draw_String(x - 8, y, num, 0);
                // put it together
                sprintf (num, "%c %4i:%4i  %3i:%i%i %s", k == cl.viewentity - 1 ? 12 : ' ', (int) s->frags, fph, minutes, tens, units, s->name);
                Draw_String(x - 8, y, num, 0);
diff --git a/sbar.h b/sbar.h
index 286b3b6a7a59cfcf51221c1df35a55b9b611237f..9e881c84ee2c42e75854c27b6ebf817babc9d423 100644 (file)
--- a/sbar.h
+++ b/sbar.h
@@ -18,9 +18,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 
 */
 
 
 */
 
-// the status bar is only redrawn if something has changed, but if anything
-// does, the entire thing will be redrawn for the next vid.numpages frames.
-
 #define        SBAR_HEIGHT             24
 
 extern int                     sb_lines;                       // scan lines to draw
 #define        SBAR_HEIGHT             24
 
 extern int                     sb_lines;                       // scan lines to draw
diff --git a/vid.h b/vid.h
index 56be2668bd9de91a085e29d3ca0269331a61c9b9..1ba61753c9556cc74b4e634705f6758970b7155b 100644 (file)
--- a/vid.h
+++ b/vid.h
@@ -33,22 +33,12 @@ typedef struct vrect_s
 
 typedef struct
 {
 
 typedef struct
 {
-       pixel_t                 *buffer;                // invisible buffer
-       pixel_t                 *colormap;              // 256 * VID_GRADES size
-       unsigned short  *colormap16;    // 256 * VID_GRADES size
-       int                             fullbright;             // index of first fullbright color
        unsigned                width;          
        unsigned                height;
        float                   aspect;         // width / height -- < 0 is taller than wide
        unsigned                width;          
        unsigned                height;
        float                   aspect;         // width / height -- < 0 is taller than wide
-       int                             numpages;
        int                             recalc_refdef;  // if true, recalc vid-based stuff
        int                             recalc_refdef;  // if true, recalc vid-based stuff
-       pixel_t                 *conbuffer;
        unsigned                conwidth;
        unsigned                conheight;
        unsigned                conwidth;
        unsigned                conheight;
-       int                             maxwarpwidth;
-       int                             maxwarpheight;
-       pixel_t                 *direct;                // direct drawing to framebuffer, if not
-                                                                       //  NULL
 } viddef_t;
 
 extern viddef_t        vid;                            // global video state
 } viddef_t;
 
 extern viddef_t        vid;                            // global video state
index 14f9c268eb75b0e1f55cefd5af1ea06883246cc9..99ec8842ad780c7fb50fb8e855a9dc8490e156db 100644 (file)
--- a/vid_glx.c
+++ b/vid_glx.c
@@ -735,11 +735,6 @@ void VID_Init(unsigned char *palette)
        Cvar_RegisterVariable (&in_dgamouse);
        Cvar_RegisterVariable (&m_filter);
        
        Cvar_RegisterVariable (&in_dgamouse);
        Cvar_RegisterVariable (&m_filter);
        
-       vid.maxwarpwidth = WARP_WIDTH;
-       vid.maxwarpheight = WARP_HEIGHT;
-       vid.colormap = host_colormap;
-       vid.fullbright = 256 - LittleLong (*((int *)vid.colormap + 2048));
-
 // interpret command-line params
 
 // set vid parameters
 // interpret command-line params
 
 // set vid parameters
@@ -877,7 +872,6 @@ void VID_Init(unsigned char *palette)
        vid.height = vid.conheight;
 
        vid.aspect = ((float)vid.height / (float)vid.width) * (320.0 / 240.0);
        vid.height = vid.conheight;
 
        vid.aspect = ((float)vid.height / (float)vid.width) * (320.0 / 240.0);
-       vid.numpages = 2;
 
        InitSig(); // trap evil signals
 
 
        InitSig(); // trap evil signals
 
index 298d4ade93e0a8448ad03ee09b89923e459077e9..5767ca2b037b9f8ba8449eee4507ac5e910461d7 100644 (file)
--- a/vid_wgl.c
+++ b/vid_wgl.c
@@ -237,8 +237,6 @@ qboolean VID_SetWindowedMode (int modenum)
        vid.width = vid.conwidth;
        vid.height = vid.conheight;
 
        vid.width = vid.conwidth;
        vid.height = vid.conheight;
 
-       vid.numpages = 2;
-
        mainwindow = dibwindow;
 
        SendMessage (mainwindow, WM_SETICON, (WPARAM)TRUE, (LPARAM)hIcon);
        mainwindow = dibwindow;
 
        SendMessage (mainwindow, WM_SETICON, (WPARAM)TRUE, (LPARAM)hIcon);
@@ -329,8 +327,6 @@ qboolean VID_SetFullDIBMode (int modenum)
        vid.width = vid.conwidth;
        vid.height = vid.conheight;
 
        vid.width = vid.conwidth;
        vid.height = vid.conheight;
 
-       vid.numpages = 2;
-
 // needed because we're not getting WM_MOVE messages fullscreen on NT
        window_x = 0;
        window_y = 0;
 // needed because we're not getting WM_MOVE messages fullscreen on NT
        window_x = 0;
        window_y = 0;
@@ -1650,11 +1646,6 @@ void     VID_Init (unsigned char *palette)
        if (vid.conheight < 200)
                vid.conheight = 200;
 
        if (vid.conheight < 200)
                vid.conheight = 200;
 
-       vid.maxwarpwidth = WARP_WIDTH;
-       vid.maxwarpheight = WARP_HEIGHT;
-       vid.colormap = host_colormap;
-       vid.fullbright = 256 - LittleLong (*((int *)vid.colormap + 2048));
-
        DestroyWindow (hwnd_dialog);
 
        VID_SetPalette (palette);
        DestroyWindow (hwnd_dialog);
 
        VID_SetPalette (palette);
diff --git a/view.c b/view.c
index 7f35721656ef0cc47f9ec1572de652d9527e86e1..7d907cd20c732d66d059634c5d13e7a3a46d7c8e 100644 (file)
--- a/view.c
+++ b/view.c
@@ -792,7 +792,7 @@ void V_CalcRefdef (void)
 
        view->model = cl.model_precache[cl.stats[STAT_WEAPON]];
        view->frame = cl.stats[STAT_WEAPONFRAME];
 
        view->model = cl.model_precache[cl.stats[STAT_WEAPON]];
        view->frame = cl.stats[STAT_WEAPONFRAME];
-       view->colormap = vid.colormap;
+       view->colormap = 0; //vid.colormap;
 
 // set up the refresh position
        VectorAdd (r_refdef.viewangles, cl.punchangle, r_refdef.viewangles);
 
 // set up the refresh position
        VectorAdd (r_refdef.viewangles, cl.punchangle, r_refdef.viewangles);
@@ -830,8 +830,6 @@ The player's clipping box goes from (-16 -16 -24) to (16 16 32) from
 the entity origin, so any view position inside that will be valid
 ==================
 */
 the entity origin, so any view position inside that will be valid
 ==================
 */
-extern vrect_t scr_vrect;
-
 void V_RenderView (void)
 {
        if (con_forcedup)
 void V_RenderView (void)
 {
        if (con_forcedup)