made the sector's color_* properties work in the software renderer.
With no 3D floors this appears to be ok, but there are so many places where colormaps are being set in the software renderer that I cannot guarantee that I got all of them correct. This will need some testing.
This commit is contained in:
parent
921bc763fb
commit
76d3ae5ba2
14 changed files with 59 additions and 40 deletions
|
|
@ -345,7 +345,7 @@ void RenderPolyPlane::Render(const TriMatrix &worldToClip, const Vec4f &clipPlan
|
|||
args.ccw = ccw;
|
||||
args.stenciltestvalue = stencilValue;
|
||||
args.stencilwritevalue = stencilValue + 1;
|
||||
args.SetColormap(GetColorTable(frontsector->Colormap));
|
||||
args.SetColormap(GetColorTable(frontsector->Colormap, frontsector->SpecialColors[ceiling]));
|
||||
args.SetClipPlane(clipPlane.x, clipPlane.y, clipPlane.z, clipPlane.w);
|
||||
|
||||
if (!isSky)
|
||||
|
|
|
|||
|
|
@ -215,7 +215,7 @@ void RenderPolyPlayerSprites::RenderSprite(DPSprite *sprite, AActor *owner, floa
|
|||
|
||||
bool noaccel = false;
|
||||
|
||||
FDynamicColormap *basecolormap = GetColorTable(viewpoint.sector->Colormap);
|
||||
FDynamicColormap *basecolormap = GetColorTable(viewpoint.sector->Colormap, viewpoint.sector->SpecialColors[sector_t::sprites]);
|
||||
FDynamicColormap *colormap_to_use = basecolormap;
|
||||
|
||||
int ColormapNum = 0;
|
||||
|
|
|
|||
|
|
@ -162,7 +162,7 @@ void RenderPolySprite::Render(const TriMatrix &worldToClip, const Vec4f &clipPla
|
|||
args.stenciltestvalue = stencilValue;
|
||||
args.stencilwritevalue = stencilValue;
|
||||
args.SetTexture(tex, thing->Translation);
|
||||
args.SetColormap(GetColorTable(sub->sector->Colormap));
|
||||
args.SetColormap(GetColorTable(sub->sector->Colormap, sub->sector->SpecialColors[sector_t::sprites]));
|
||||
args.SetClipPlane(clipPlane.x, clipPlane.y, clipPlane.z, clipPlane.w);
|
||||
|
||||
TriBlendMode blendmode;
|
||||
|
|
|
|||
|
|
@ -73,7 +73,7 @@ bool RenderPolyWall::RenderLine(const TriMatrix &worldToClip, const Vec4f &clipP
|
|||
wall.LineSeg = line;
|
||||
wall.Line = line->linedef;
|
||||
wall.Side = line->sidedef;
|
||||
wall.Colormap = GetColorTable(frontsector->Colormap);
|
||||
wall.Colormap = GetColorTable(frontsector->Colormap, frontsector->SpecialColors[sector_t::walltop]);
|
||||
wall.Masked = false;
|
||||
wall.SubsectorDepth = subsectorDepth;
|
||||
wall.StencilValue = stencilValue;
|
||||
|
|
@ -175,7 +175,7 @@ void RenderPolyWall::Render3DFloorLine(const TriMatrix &worldToClip, const Vec4f
|
|||
wall.LineSeg = line;
|
||||
wall.Line = fakeFloor->master;
|
||||
wall.Side = fakeFloor->master->sidedef[0];
|
||||
wall.Colormap = GetColorTable(frontsector->Colormap);
|
||||
wall.Colormap = GetColorTable(frontsector->Colormap, frontsector->SpecialColors[sector_t::walltop]);
|
||||
wall.Masked = false;
|
||||
wall.SubsectorDepth = subsectorDepth;
|
||||
wall.StencilValue = stencilValue;
|
||||
|
|
@ -262,7 +262,7 @@ void RenderPolyWall::Render(const TriMatrix &worldToClip, const Vec4f &clipPlane
|
|||
args.stencilwritevalue = StencilValue + 1;
|
||||
if (tex)
|
||||
args.SetTexture(tex);
|
||||
args.SetColormap(GetColorTable(Line->frontsector->Colormap));
|
||||
args.SetColormap(GetColorTable(Line->frontsector->Colormap, Line->frontsector->SpecialColors[sector_t::walltop]));
|
||||
args.SetClipPlane(clipPlane.x, clipPlane.y, clipPlane.z, clipPlane.w);
|
||||
|
||||
//if (Side && Side->lighthead)
|
||||
|
|
|
|||
|
|
@ -123,7 +123,7 @@ void RenderPolyWallSprite::Render(const TriMatrix &worldToClip, const Vec4f &cli
|
|||
args.stenciltestvalue = stencilValue;
|
||||
args.stencilwritevalue = stencilValue;
|
||||
args.SetTexture(tex);
|
||||
args.SetColormap(GetColorTable(sub->sector->Colormap));
|
||||
args.SetColormap(GetColorTable(sub->sector->Colormap, sub->sector->SpecialColors[sector_t::sprites]));
|
||||
args.SetClipPlane(clipPlane.x, clipPlane.y, clipPlane.z, clipPlane.w);
|
||||
args.subsectorTest = true;
|
||||
args.writeSubsector = false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue