Skip to content
This repository has been archived by the owner on Dec 19, 2022. It is now read-only.

Commit

Permalink
big improvement to colors. use standard 'palette.pal' by default.
Browse files Browse the repository at this point in the history
  • Loading branch information
qbism committed Jan 26, 2016
1 parent 5d4bc72 commit 19df1ee
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 12 deletions.
16 changes: 8 additions & 8 deletions cl_main.c
Expand Up @@ -781,7 +781,7 @@ void CL_RelinkEntities (void)
dl->radius = 200 + (rand()&31);
dl->minlight = 32;
dl->die = cl.time + 0.1;
dl->color = palmapnofb[18][21][19]; //qb: dyncol
dl->color = palmapnofb[9][9][8]; //qb: dyncol
}
if (ent->effects & EF_BRIGHTLIGHT)
{
Expand All @@ -790,15 +790,15 @@ void CL_RelinkEntities (void)
dl->origin[2] += 16;
dl->radius = 400 + (rand()&31);
dl->die = cl.time + 0.001;
dl->color = palmapnofb[25][22][18]; //qb: dyncol
dl->color = palmapnofb[13][11][9]; //qb: dyncol
}
if (ent->effects & EF_DIMLIGHT)
{
dl = CL_AllocDlight (i);
VectorCopy (ent->origin, dl->origin);
dl->radius = 200 + (rand()&31);
dl->die = cl.time + 0.001;
dl->color = palmapnofb[14][12][8]; //qb: dyncol
dl->color = palmapnofb[7][6][4]; //qb: dyncol
}

} // Manoel Kasimier
Expand All @@ -825,7 +825,7 @@ void CL_RelinkEntities (void)
dl->origin[2] += 16;
dl->radius = 100 + (rand()&31);
dl->die = cl.time + 0.05;
dl->color = palmapnofb[4][26][6]; //qb: dyncol
dl->color = palmapnofb[2][13][3]; //qb: dyncol
R_RocketTrail (oldorg, ent->origin, 3);
}
else if (ent->effects & EF_TRACER2)
Expand All @@ -835,7 +835,7 @@ void CL_RelinkEntities (void)
VectorCopy (ent->origin, dl->origin);
dl->radius = 100;
dl->die = cl.time + 0.05;
dl->color = palmapnofb[20][14][4];
dl->color = palmapnofb[10][7][2];
}
else if (ent->effects & EF_ROCKET)
{
Expand All @@ -844,7 +844,7 @@ void CL_RelinkEntities (void)
VectorCopy (ent->origin, dl->origin);
dl->radius = 150;
dl->die = cl.time + 0.01;
dl->color = palmapnofb[28][12][2];
dl->color = palmapnofb[14][6][2];
}
else if (ent->effects & EF_GRENADE)
R_RocketTrail (oldorg, ent->origin, 1);
Expand All @@ -855,7 +855,7 @@ void CL_RelinkEntities (void)
VectorCopy (ent->origin, dl->origin);
dl->radius = 150;
dl->die = cl.time + 0.01;
dl->color = palmapnofb[28][6][6];
dl->color = palmapnofb[14][3][3];
}
} // Manoel Kasimier
// Tomaz - QC Glow
Expand All @@ -867,7 +867,7 @@ void CL_RelinkEntities (void)
dl->radius = abs(ent->glow_size); // Manoel Kasimier - edited
dl->dark = (ent->glow_size < 0); // Manoel Kasimier
dl->die = cl.time + 0.001;
dl->color = palmapnofb[ent->glow_red >>2] [ent->glow_green >>2] [ent->glow_blue >>2]; //qb: dyncol
dl->color = palmapnofb[ent->glow_red >>3] [ent->glow_green >>3] [ent->glow_blue >>3]; //qb: dyncol
}

ent->forcelink = false;
Expand Down
2 changes: 1 addition & 1 deletion cl_tent.c
Expand Up @@ -200,7 +200,7 @@ void CL_ParseTEnt (void)
dl->radius = 350;
dl->die = cl.time + 0.5;
dl->decay = 300;
dl->color = palmapnofb[35][35][12]; //qb: dyncol
dl->color = palmapnofb[15][15][9]; //qb: dyncol
S_StartSound (-1, 0, cl_sfx_r_exp3, pos, 1, 1);
R_AddStain(pos, -30, 45); //qb: ftestain

Expand Down
2 changes: 1 addition & 1 deletion host.c
Expand Up @@ -68,7 +68,7 @@ byte *alphamap, *alpha50map, *additivemap, *fogmap, *fencemap; //qb: move

cvar_t r_skyalpha = {"r_skyalpha","0.1", "r_skyalpha[0.0 to 1.0] Sky layer transparency."}; //0.6 Manoel Kasimier - translucent sky

cvar_t r_palette = {"r_palette", "s8pal", "r_palette[name] Default palette.", true}; //qb: the default palette to load
cvar_t r_palette = {"r_palette", "palette", "r_palette[name] Default palette.", true}; //qb: the default palette to load

cvar_t host_framerate = {"host_framerate","0", " host_framerate[0.0 - 0.99] When non-zero, this value will override the calculated framerate."}; // set for slow motion
cvar_t host_speeds = {"host_speeds","0", "host_speeds[0/1] Toggle the display of host info."}; // set for running times
Expand Down
2 changes: 1 addition & 1 deletion model.c
Expand Up @@ -563,7 +563,7 @@ void Mod_LoadLighting (lump_t *l) //qb: colored lit load modified from Engoo
r = data[k++];
g = data[k++];
b = data[k++];
normalize = sqrt(r*r + g*g + b*b)+1.0;
normalize = sqrt(r*r + g*g + b*b)*2 +1.0; //qb: factor for overbright compensation
*out++ = BestColor(r*r/normalize, g*g/normalize, b*b/normalize,0,254);
//*outvalue++ = (r+g+b)/3;
}
Expand Down
2 changes: 1 addition & 1 deletion r_main.c
Expand Up @@ -697,7 +697,7 @@ void GrabColormap (void) //qb: fixed, was a little screwy
// note: 254 instead of 255 because 255 is the transparent color, and we
// don't want anything remapping to that
//
*colmap++ = BestColor(red,green,blue, 0, 254);
*colmap++ = BestColor(red*2, green*2, blue*2, 0, 254); //qb: compensation factor for lost overbright.
}
for ( ; c<256 ; c++)
{
Expand Down

0 comments on commit 19df1ee

Please sign in to comment.