- refactored FDynamicColormap out of sector_t.
This has increasingly become an obstacle with the hardware renderer, so now the values are being stored as plain data in the sector, with the software renderer getting the actual color tables when needed. While this is a bit slower than storing the pregenerated colormap, in realistic situations the added time is mostly negligible in the microseconds range.
This commit is contained in:
parent
a2fc2fb707
commit
9a24771a7d
55 changed files with 386 additions and 326 deletions
|
|
@ -1936,7 +1936,7 @@ sector_t * AM_FakeFlat(AActor *viewer, sector_t * sec, sector_t * dest)
|
|||
{
|
||||
if (in_area == -1)
|
||||
{
|
||||
dest->ColorMap = s->ColorMap;
|
||||
dest->Colormap = s->Colormap;
|
||||
if (!(s->MoreFlags & SECF_NOFAKELIGHT))
|
||||
{
|
||||
dest->lightlevel = s->lightlevel;
|
||||
|
|
@ -1956,7 +1956,7 @@ sector_t * AM_FakeFlat(AActor *viewer, sector_t * sec, sector_t * dest)
|
|||
|
||||
if (in_area == -1)
|
||||
{
|
||||
dest->ColorMap = s->ColorMap;
|
||||
dest->Colormap = s->Colormap;
|
||||
dest->SetPlaneTexZ(sector_t::floor, sec->GetPlaneTexZ(sector_t::floor));
|
||||
dest->floorplane = sec->floorplane;
|
||||
if (!(s->MoreFlags & SECF_NOFAKELIGHT))
|
||||
|
|
@ -1975,7 +1975,7 @@ sector_t * AM_FakeFlat(AActor *viewer, sector_t * sec, sector_t * dest)
|
|||
}
|
||||
else if (in_area == 1)
|
||||
{
|
||||
dest->ColorMap = s->ColorMap;
|
||||
dest->Colormap = s->Colormap;
|
||||
dest->SetPlaneTexZ(sector_t::floor, s->GetPlaneTexZ(sector_t::ceiling));
|
||||
dest->floorplane = s->ceilingplane;
|
||||
if (!(s->MoreFlags & SECF_NOFAKELIGHT))
|
||||
|
|
@ -2016,7 +2016,7 @@ void AM_drawSubsectors()
|
|||
int floorlight;
|
||||
double scalex, scaley;
|
||||
double originx, originy;
|
||||
FDynamicColormap *colormap;
|
||||
FColormap colormap;
|
||||
PalEntry flatcolor;
|
||||
mpoint_t originpt;
|
||||
|
||||
|
|
@ -2058,7 +2058,7 @@ void AM_drawSubsectors()
|
|||
originpt.y = sec->GetYOffset(sector_t::floor);
|
||||
rotation = -sec->GetAngle(sector_t::floor);
|
||||
// Coloring for the polygon
|
||||
colormap = sec->ColorMap;
|
||||
colormap = sec->Colormap;
|
||||
|
||||
FTextureID maptex = sec->GetTexture(sector_t::floor);
|
||||
flatcolor = sec->SpecialColors[sector_t::floor];
|
||||
|
|
@ -2150,14 +2150,11 @@ void AM_drawSubsectors()
|
|||
// to see it on the map), tint and desaturate it.
|
||||
if (!(subsectors[i].flags & SSECF_DRAWN))
|
||||
{
|
||||
colormap = GetSpecialLights(
|
||||
MAKERGB(
|
||||
(colormap->Color.r + 255) / 2,
|
||||
(colormap->Color.g + 200) / 2,
|
||||
(colormap->Color.b + 160) / 2),
|
||||
colormap->Fade,
|
||||
255 - (255 - colormap->Desaturate) / 4);
|
||||
floorlight = (floorlight + 200 * 15) / 16;
|
||||
colormap.LightColor = PalEntry(
|
||||
(colormap.LightColor.r + 255) / 2,
|
||||
(colormap.LightColor.g + 200) / 2,
|
||||
(colormap.LightColor.b + 160) / 2);
|
||||
colormap.Desaturation = 255 - (255 - colormap.Desaturation) / 4;
|
||||
}
|
||||
|
||||
// Draw the polygon.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue