- Cleaned up some copyright statements

- Removed unused cull argument from some functions
This commit is contained in:
Magnus Norddahl 2017-09-02 17:14:02 +02:00
parent 0f0cf7261e
commit 23aebaecc6
32 changed files with 39 additions and 40 deletions

View File

@ -1,5 +1,5 @@
/* /*
** Triangle drawers ** Polygon Doom software renderer
** Copyright (c) 2016 Magnus Norddahl ** Copyright (c) 2016 Magnus Norddahl
** **
** This software is provided 'as-is', without any express or implied ** This software is provided 'as-is', without any express or implied

View File

@ -1,5 +1,5 @@
/* /*
** Frame buffers ** Polygon Doom software renderer
** Copyright (c) 2016 Magnus Norddahl ** Copyright (c) 2016 Magnus Norddahl
** **
** This software is provided 'as-is', without any express or implied ** This software is provided 'as-is', without any express or implied

View File

@ -1,5 +1,5 @@
/* /*
** Triangle drawers ** Polygon Doom software renderer
** Copyright (c) 2016 Magnus Norddahl ** Copyright (c) 2016 Magnus Norddahl
** **
** This software is provided 'as-is', without any express or implied ** This software is provided 'as-is', without any express or implied

View File

@ -1,5 +1,5 @@
/* /*
** Triangle drawers ** Polygon Doom software renderer
** Copyright (c) 2016 Magnus Norddahl ** Copyright (c) 2016 Magnus Norddahl
** **
** This software is provided 'as-is', without any express or implied ** This software is provided 'as-is', without any express or implied

View File

@ -1,5 +1,5 @@
/* /*
** Projected triangle drawer ** Polygon Doom software renderer
** Copyright (c) 2016 Magnus Norddahl ** Copyright (c) 2016 Magnus Norddahl
** **
** This software is provided 'as-is', without any express or implied ** This software is provided 'as-is', without any express or implied

View File

@ -1,5 +1,5 @@
/* /*
** Projected triangle drawer ** Polygon Doom software renderer
** Copyright (c) 2016 Magnus Norddahl ** Copyright (c) 2016 Magnus Norddahl
** **
** This software is provided 'as-is', without any express or implied ** This software is provided 'as-is', without any express or implied

View File

@ -1,5 +1,5 @@
/* /*
** Projected triangle drawer ** Polygon Doom software renderer
** Copyright (c) 2016 Magnus Norddahl ** Copyright (c) 2016 Magnus Norddahl
** **
** This software is provided 'as-is', without any express or implied ** This software is provided 'as-is', without any express or implied

View File

@ -1,5 +1,5 @@
/* /*
** Triangle drawers ** Polygon Doom software renderer
** Copyright (c) 2016 Magnus Norddahl ** Copyright (c) 2016 Magnus Norddahl
** **
** This software is provided 'as-is', without any express or implied ** This software is provided 'as-is', without any express or implied

View File

@ -1,5 +1,5 @@
/* /*
** Triangle drawers ** Polygon Doom software renderer
** Copyright (c) 2016 Magnus Norddahl ** Copyright (c) 2016 Magnus Norddahl
** **
** This software is provided 'as-is', without any express or implied ** This software is provided 'as-is', without any express or implied

View File

@ -1,5 +1,5 @@
/* /*
** Triangle drawers ** Polygon Doom software renderer
** Copyright (c) 2016 Magnus Norddahl ** Copyright (c) 2016 Magnus Norddahl
** **
** This software is provided 'as-is', without any express or implied ** This software is provided 'as-is', without any express or implied

View File

@ -1,5 +1,5 @@
/* /*
** Projected triangle drawer ** Polygon Doom software renderer
** Copyright (c) 2016 Magnus Norddahl ** Copyright (c) 2016 Magnus Norddahl
** **
** This software is provided 'as-is', without any express or implied ** This software is provided 'as-is', without any express or implied

View File

@ -1,5 +1,5 @@
/* /*
** Triangle drawers ** Polygon Doom software renderer
** Copyright (c) 2016 Magnus Norddahl ** Copyright (c) 2016 Magnus Norddahl
** **
** This software is provided 'as-is', without any express or implied ** This software is provided 'as-is', without any express or implied

View File

@ -1,5 +1,5 @@
/* /*
** Triangle drawers ** Polygon Doom software renderer
** Copyright (c) 2016 Magnus Norddahl ** Copyright (c) 2016 Magnus Norddahl
** **
** This software is provided 'as-is', without any express or implied ** This software is provided 'as-is', without any express or implied

View File

@ -1,5 +1,5 @@
/* /*
** Potential visible set (PVS) handling ** Polygon Doom software renderer
** Copyright (c) 2016 Magnus Norddahl ** Copyright (c) 2016 Magnus Norddahl
** **
** This software is provided 'as-is', without any express or implied ** This software is provided 'as-is', without any express or implied

View File

@ -1,5 +1,5 @@
/* /*
** Potential visible set (PVS) handling ** Polygon Doom software renderer
** Copyright (c) 2016 Magnus Norddahl ** Copyright (c) 2016 Magnus Norddahl
** **
** This software is provided 'as-is', without any express or implied ** This software is provided 'as-is', without any express or implied

View File

@ -1,5 +1,5 @@
/* /*
** Handling drawing a decal ** Polygon Doom software renderer
** Copyright (c) 2016 Magnus Norddahl ** Copyright (c) 2016 Magnus Norddahl
** **
** This software is provided 'as-is', without any express or implied ** This software is provided 'as-is', without any express or implied

View File

@ -1,5 +1,5 @@
/* /*
** Handling drawing a decal ** Polygon Doom software renderer
** Copyright (c) 2016 Magnus Norddahl ** Copyright (c) 2016 Magnus Norddahl
** **
** This software is provided 'as-is', without any express or implied ** This software is provided 'as-is', without any express or implied

View File

@ -1,5 +1,5 @@
/* /*
** Light calculations ** Polygon Doom software renderer
** Copyright (c) 2016 Magnus Norddahl ** Copyright (c) 2016 Magnus Norddahl
** **
** This software is provided 'as-is', without any express or implied ** This software is provided 'as-is', without any express or implied

View File

@ -1,5 +1,5 @@
/* /*
** Light calculations ** Polygon Doom software renderer
** Copyright (c) 2016 Magnus Norddahl ** Copyright (c) 2016 Magnus Norddahl
** **
** This software is provided 'as-is', without any express or implied ** This software is provided 'as-is', without any express or implied

View File

@ -1,5 +1,5 @@
/* /*
** Particle drawing ** Polygon Doom software renderer
** Copyright (c) 2016 Magnus Norddahl ** Copyright (c) 2016 Magnus Norddahl
** **
** This software is provided 'as-is', without any express or implied ** This software is provided 'as-is', without any express or implied

View File

@ -1,5 +1,5 @@
/* /*
** Handling drawing a particle ** Polygon Doom software renderer
** Copyright (c) 2016 Magnus Norddahl ** Copyright (c) 2016 Magnus Norddahl
** **
** This software is provided 'as-is', without any express or implied ** This software is provided 'as-is', without any express or implied

View File

@ -1,5 +1,5 @@
/* /*
** Handling drawing a plane (ceiling, floor) ** Polygon Doom software renderer
** Copyright (c) 2016 Magnus Norddahl ** Copyright (c) 2016 Magnus Norddahl
** **
** This software is provided 'as-is', without any express or implied ** This software is provided 'as-is', without any express or implied
@ -34,17 +34,17 @@
EXTERN_CVAR(Int, r_3dfloors) EXTERN_CVAR(Int, r_3dfloors)
void RenderPolyPlane::RenderPlanes(const TriMatrix &worldToClip, const PolyClipPlane &clipPlane, PolyCull &cull, subsector_t *sub, uint32_t stencilValue, double skyCeilingHeight, double skyFloorHeight, std::vector<std::unique_ptr<PolyDrawSectorPortal>> &sectorPortals) void RenderPolyPlane::RenderPlanes(const TriMatrix &worldToClip, const PolyClipPlane &clipPlane, subsector_t *sub, uint32_t stencilValue, double skyCeilingHeight, double skyFloorHeight, std::vector<std::unique_ptr<PolyDrawSectorPortal>> &sectorPortals)
{ {
if (sub->sector->CenterFloor() == sub->sector->CenterCeiling()) if (sub->sector->CenterFloor() == sub->sector->CenterCeiling())
return; return;
RenderPolyPlane plane; RenderPolyPlane plane;
plane.Render(worldToClip, clipPlane, cull, sub, stencilValue, true, skyCeilingHeight, sectorPortals); plane.Render(worldToClip, clipPlane, sub, stencilValue, true, skyCeilingHeight, sectorPortals);
plane.Render(worldToClip, clipPlane, cull, sub, stencilValue, false, skyFloorHeight, sectorPortals); plane.Render(worldToClip, clipPlane, sub, stencilValue, false, skyFloorHeight, sectorPortals);
} }
void RenderPolyPlane::Render(const TriMatrix &worldToClip, const PolyClipPlane &clipPlane, PolyCull &cull, subsector_t *sub, uint32_t stencilValue, bool ceiling, double skyHeight, std::vector<std::unique_ptr<PolyDrawSectorPortal>> &sectorPortals) void RenderPolyPlane::Render(const TriMatrix &worldToClip, const PolyClipPlane &clipPlane, subsector_t *sub, uint32_t stencilValue, bool ceiling, double skyHeight, std::vector<std::unique_ptr<PolyDrawSectorPortal>> &sectorPortals)
{ {
const auto &viewpoint = PolyRenderer::Instance()->Viewpoint; const auto &viewpoint = PolyRenderer::Instance()->Viewpoint;

View File

@ -1,5 +1,5 @@
/* /*
** Handling drawing a plane (ceiling, floor) ** Polygon Doom software renderer
** Copyright (c) 2016 Magnus Norddahl ** Copyright (c) 2016 Magnus Norddahl
** **
** This software is provided 'as-is', without any express or implied ** This software is provided 'as-is', without any express or implied
@ -25,7 +25,6 @@
#include "polyrenderer/drawers/poly_triangle.h" #include "polyrenderer/drawers/poly_triangle.h"
class PolyDrawSectorPortal; class PolyDrawSectorPortal;
class PolyCull;
class PolyPlaneUVTransform class PolyPlaneUVTransform
{ {
@ -48,10 +47,10 @@ private:
class RenderPolyPlane class RenderPolyPlane
{ {
public: public:
static void RenderPlanes(const TriMatrix &worldToClip, const PolyClipPlane &clipPlane, PolyCull &cull, subsector_t *sub, uint32_t stencilValue, double skyCeilingHeight, double skyFloorHeight, std::vector<std::unique_ptr<PolyDrawSectorPortal>> &sectorPortals); static void RenderPlanes(const TriMatrix &worldToClip, const PolyClipPlane &clipPlane, subsector_t *sub, uint32_t stencilValue, double skyCeilingHeight, double skyFloorHeight, std::vector<std::unique_ptr<PolyDrawSectorPortal>> &sectorPortals);
private: private:
void Render(const TriMatrix &worldToClip, const PolyClipPlane &clipPlane, PolyCull &cull, subsector_t *sub, uint32_t stencilValue, bool ceiling, double skyHeight, std::vector<std::unique_ptr<PolyDrawSectorPortal>> &sectorPortals); void Render(const TriMatrix &worldToClip, const PolyClipPlane &clipPlane, subsector_t *sub, uint32_t stencilValue, bool ceiling, double skyHeight, std::vector<std::unique_ptr<PolyDrawSectorPortal>> &sectorPortals);
void RenderSkyWalls(PolyDrawArgs &args, subsector_t *sub, sector_t *frontsector, FSectorPortal *portal, PolyDrawSectorPortal *polyportal, bool ceiling, double skyHeight, const PolyPlaneUVTransform &transform); void RenderSkyWalls(PolyDrawArgs &args, subsector_t *sub, sector_t *frontsector, FSectorPortal *portal, PolyDrawSectorPortal *polyportal, bool ceiling, double skyHeight, const PolyPlaneUVTransform &transform);
}; };

View File

@ -1,5 +1,5 @@
/* /*
** Handling drawing a player sprite ** Polygon Doom software renderer
** Copyright (c) 2016 Magnus Norddahl ** Copyright (c) 2016 Magnus Norddahl
** **
** This software is provided 'as-is', without any express or implied ** This software is provided 'as-is', without any express or implied

View File

@ -1,5 +1,5 @@
/* /*
** Handling drawing a player sprite ** Polygon Doom software renderer
** Copyright (c) 2016 Magnus Norddahl ** Copyright (c) 2016 Magnus Norddahl
** **
** This software is provided 'as-is', without any express or implied ** This software is provided 'as-is', without any express or implied

View File

@ -130,12 +130,12 @@ void RenderPolyScene::RenderSubsector(subsector_t *sub, uint32_t subsectorDepth)
} }
Render3DFloorPlane::RenderPlanes(WorldToClip, PortalPlane, sub, StencilValue, subsectorDepth, TranslucentObjects); Render3DFloorPlane::RenderPlanes(WorldToClip, PortalPlane, sub, StencilValue, subsectorDepth, TranslucentObjects);
RenderPolyPlane::RenderPlanes(WorldToClip, PortalPlane, Cull, sub, StencilValue, Cull.MaxCeilingHeight, Cull.MinFloorHeight, SectorPortals); RenderPolyPlane::RenderPlanes(WorldToClip, PortalPlane, sub, StencilValue, Cull.MaxCeilingHeight, Cull.MinFloorHeight, SectorPortals);
} }
else else
{ {
Render3DFloorPlane::RenderPlanes(WorldToClip, PortalPlane, sub, StencilValue, subsectorDepth, TranslucentObjects); Render3DFloorPlane::RenderPlanes(WorldToClip, PortalPlane, sub, StencilValue, subsectorDepth, TranslucentObjects);
RenderPolyPlane::RenderPlanes(WorldToClip, PortalPlane, Cull, sub, StencilValue, Cull.MaxCeilingHeight, Cull.MinFloorHeight, SectorPortals); RenderPolyPlane::RenderPlanes(WorldToClip, PortalPlane, sub, StencilValue, Cull.MaxCeilingHeight, Cull.MinFloorHeight, SectorPortals);
for (uint32_t i = 0; i < sub->numlines; i++) for (uint32_t i = 0; i < sub->numlines; i++)
{ {

View File

@ -1,5 +1,5 @@
/* /*
** Handling drawing a sprite ** Polygon Doom software renderer
** Copyright (c) 2016 Magnus Norddahl ** Copyright (c) 2016 Magnus Norddahl
** **
** This software is provided 'as-is', without any express or implied ** This software is provided 'as-is', without any express or implied

View File

@ -1,5 +1,5 @@
/* /*
** Handling drawing a sprite ** Polygon Doom software renderer
** Copyright (c) 2016 Magnus Norddahl ** Copyright (c) 2016 Magnus Norddahl
** **
** This software is provided 'as-is', without any express or implied ** This software is provided 'as-is', without any express or implied

View File

@ -1,5 +1,5 @@
/* /*
** Handling drawing a wall ** Polygon Doom software renderer
** Copyright (c) 2016 Magnus Norddahl ** Copyright (c) 2016 Magnus Norddahl
** **
** This software is provided 'as-is', without any express or implied ** This software is provided 'as-is', without any express or implied

View File

@ -1,5 +1,5 @@
/* /*
** Handling drawing a wall ** Polygon Doom software renderer
** Copyright (c) 2016 Magnus Norddahl ** Copyright (c) 2016 Magnus Norddahl
** **
** This software is provided 'as-is', without any express or implied ** This software is provided 'as-is', without any express or implied

View File

@ -1,5 +1,5 @@
/* /*
** Handling drawing a sprite ** Polygon Doom software renderer
** Copyright (c) 2016 Magnus Norddahl ** Copyright (c) 2016 Magnus Norddahl
** **
** This software is provided 'as-is', without any express or implied ** This software is provided 'as-is', without any express or implied

View File

@ -1,5 +1,5 @@
/* /*
** Handling drawing a wall sprite ** Polygon Doom software renderer
** Copyright (c) 2016 Magnus Norddahl ** Copyright (c) 2016 Magnus Norddahl
** **
** This software is provided 'as-is', without any express or implied ** This software is provided 'as-is', without any express or implied