- For hardware 2D, apply fixed colormaps when copying to video memory instead

of doing it directly during the rendering, in order to improve visual
  fidelity for colormaps that aren't grayscale.


SVN r1866 (trunk)
This commit is contained in:
Randy Heit 2009-09-22 04:21:27 +00:00
commit d502655866
6 changed files with 37 additions and 8 deletions

View file

@ -140,6 +140,7 @@ int validcount = 1; // increment every time a check is made
FDynamicColormap*basecolormap; // [RH] colormap currently drawing with
int fixedlightlev;
lighttable_t *fixedcolormap;
FSpecialColormap *realfixedcolormap;
float WallTMapScale;
float WallTMapScale2;
@ -1158,6 +1159,7 @@ void R_SetupFrame (AActor *actor)
}
}
realfixedcolormap = NULL;
fixedcolormap = NULL;
fixedlightlev = -1;
@ -1165,7 +1167,18 @@ void R_SetupFrame (AActor *actor)
{
if (player->fixedcolormap >= 0 && player->fixedcolormap < (int)SpecialColormaps.Size())
{
fixedcolormap = SpecialColormaps[player->fixedcolormap].Colormap;
realfixedcolormap = &SpecialColormaps[player->fixedcolormap];
if (RenderTarget == screen && (DFrameBuffer *)screen->Accel2D)
{
// Render everything fullbright. The copy to video memory will
// apply the special colormap, so it won't be restricted to the
// palette.
fixedcolormap = realcolormaps;
}
else
{
fixedcolormap = SpecialColormaps[player->fixedcolormap].Colormap;
}
}
else if (player->fixedlightlevel >= 0 && player->fixedlightlevel < NUMCOLORMAPS)
{