All palettes are gone

This commit is contained in:
cholleme 2003-11-16 22:55:48 +00:00
parent bef0f68bfb
commit ca2c4e5fc6
4 changed files with 8 additions and 105 deletions

View file

@ -280,50 +280,6 @@ void CL_PrintEntities_f (void)
}
}
/*
===============
SetPal
Debugging tool, just flashes the screen
===============
*/
void SetPal (int i)
{
#if 0
static int old;
byte pal[768];
int c;
if (i == old)
return;
old = i;
if (i==0)
VID_SetPalette (host_basepal);
else if (i==1)
{
for (c=0 ; c<768 ; c+=3)
{
pal[c] = 0;
pal[c+1] = 255;
pal[c+2] = 0;
}
VID_SetPalette (pal);
}
else
{
for (c=0 ; c<768 ; c+=3)
{
pal[c] = 0;
pal[c+1] = 0;
pal[c+2] = 255;
}
VID_SetPalette (pal);
}
#endif
}
/*
===============
CL_AllocDlight
@ -430,7 +386,6 @@ float CL_LerpPoint (void)
{
if (frac < -0.01)
{
SetPal(1);
cl.time = cl.mtime[1];
// Con_Printf ("low frac\n");
}
@ -440,15 +395,12 @@ SetPal(1);
{
if (frac > 1.01)
{
SetPal(2);
cl.time = cl.mtime[0];
// Con_Printf ("high frac\n");
}
frac = 1;
}
else
SetPal(0);
return frac;
}

View file

@ -87,7 +87,7 @@ entity_t *CL_EntityNum (int 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;
cl.num_entities++;
}
}
@ -420,7 +420,7 @@ if (bits&(1<<i))
else
i = ent->baseline.colormap;
if (!i)
ent->colormap = vid.colormap;
ent->colormap = 0;
else
{
if (i > cl.maxclients)
@ -663,56 +663,10 @@ void CL_ParseClientdata (int bits)
i = MSG_ReadByte ();
if (standard_quake)
if (cl.stats[STAT_ACTIVEWEAPON] != i)
{
if (cl.stats[STAT_ACTIVEWEAPON] != i)
{
cl.stats[STAT_ACTIVEWEAPON] = i;
Sbar_Changed ();
}
}
else
{
if (cl.stats[STAT_ACTIVEWEAPON] != (1<<i))
{
cl.stats[STAT_ACTIVEWEAPON] = (1<<i);
Sbar_Changed ();
}
}
}
/*
=====================
CL_NewTranslation
=====================
*/
void CL_NewTranslation (int slot)
{
int i, j;
int top, bottom;
byte *dest, *source;
if (slot > cl.maxclients)
Sys_Error ("CL_NewTranslation: slot > cl.maxclients");
dest = cl.scores[slot].translations;
source = vid.colormap;
memcpy (dest, vid.colormap, sizeof(cl.scores[slot].translations));
top = cl.scores[slot].colors & 0xf0;
bottom = (cl.scores[slot].colors &15)<<4;
for (i=0 ; i<VID_GRADES ; i++, dest += 256, source+=256)
{
if (top < 128) // the artists made some backwards ranges. sigh.
memcpy (dest + TOP_RANGE, source + top, 16);
else
for (j=0 ; j<16 ; j++)
dest[TOP_RANGE+j] = source[top+15-j];
if (bottom < 128)
memcpy (dest + BOTTOM_RANGE, source + bottom, 16);
else
for (j=0 ; j<16 ; j++)
dest[BOTTOM_RANGE+j] = source[bottom+15-j];
cl.stats[STAT_ACTIVEWEAPON] = i;
Sbar_Changed ();
}
}
@ -736,7 +690,7 @@ void CL_ParseStatic (void)
// 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;
ent->skinnum = ent->baseline.skin;
ent->effects = ent->baseline.effects;
VectorCopy(ent->baseline.color,ent->color);
@ -930,7 +884,6 @@ void CL_ParseServerMessage (void)
if (i >= cl.maxclients)
Host_Error ("CL_ParseServerMessage: svc_updatecolors > MAX_SCOREBOARD");
cl.scores[i].colors = MSG_ReadByte ();
CL_NewTranslation (i);
break;
case svc_particle:

View file

@ -323,7 +323,7 @@ entity_t *CL_NewTempEntity (void)
cl_visedicts[cl_numvisedicts] = ent;
cl_numvisedicts++;
ent->colormap = vid.colormap;
ent->colormap = 0;
ent->pose1 = ent->pose2 = -1;
return ent;
}

View file

@ -362,7 +362,6 @@ void CL_TimeDemo_f (void);
// cl_parse.c
//
void CL_ParseServerMessage (void);
void CL_NewTranslation (int slot);
//
// view
@ -371,7 +370,6 @@ void V_StartPitchDrift (void);
void V_StopPitchDrift (void);
void V_RenderView (void);
void V_UpdatePalette (void);
void V_Register (void);
void V_ParseDamage (void);
void V_SetContentsColor (int contents);