From 6ac0c2f56910c1fbd305d95250162815e77de398 Mon Sep 17 00:00:00 2001 From: "alexey.lysiuk" Date: Mon, 23 Apr 2018 18:42:59 +0300 Subject: [PATCH 1/8] Excluded unused .cpp file from compilation --- src/CMakeLists.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 087794b09..41f9f03cc 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -919,7 +919,6 @@ set (PCH_SOURCES i_time.cpp info.cpp keysections.cpp - lumpconfigfile.cpp m_alloc.cpp m_argv.cpp m_bbox.cpp From c264ff05da4ac654013a785de4661c94c070a3c4 Mon Sep 17 00:00:00 2001 From: "alexey.lysiuk" Date: Mon, 23 Apr 2018 18:46:18 +0300 Subject: [PATCH 2/8] All platform-specific headers are referenced by generated projects This was already the case on Windows anyway --- src/CMakeLists.txt | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 41f9f03cc..79c4856fa 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -637,19 +637,7 @@ add_definitions(-DADLMIDI_DISABLE_MUS_SUPPORT -DADLMIDI_DISABLE_XMI_SUPPORT -DAD # Project files should be aware of the header files. We can GLOB these since # there's generally a new cpp for every header so this file will get changed -if( WIN32 ) - set( EXTRA_HEADER_DIRS win32/*.h ) -elseif( APPLE ) - if( OSX_COCOA_BACKEND ) - set( EXTRA_HEADER_DIRS posix/*.h posix/cocoa/*.h ) - else() - set( EXTRA_HEADER_DIRS posix/*.h posix/sdl/*.h ) - endif() -else() - set( EXTRA_HEADER_DIRS posix/*.h posix/sdl/*.h ) -endif() file( GLOB HEADER_FILES - ${EXTRA_HEADER_DIRS} fragglescript/*.h g_shared/*.h g_statusbar/*.h @@ -663,6 +651,7 @@ file( GLOB HEADER_FILES posix/*.h posix/cocoa/*.h posix/sdl/*.h + win32/*.h r_data/*.h r_data/models/*.h rapidjson/*.h From 45625399dca3084795e6044792011b50ce65c559 Mon Sep 17 00:00:00 2001 From: Magnus Norddahl Date: Mon, 23 Apr 2018 23:09:11 +0200 Subject: [PATCH 3/8] - fix softpoly line portals --- src/polyrenderer/poly_renderer.cpp | 1 - src/polyrenderer/scene/poly_cull.cpp | 102 +++++++++---------- src/polyrenderer/scene/poly_cull.h | 16 ++- src/polyrenderer/scene/poly_decal.cpp | 7 +- src/polyrenderer/scene/poly_decal.h | 4 +- src/polyrenderer/scene/poly_model.cpp | 10 +- src/polyrenderer/scene/poly_model.h | 7 +- src/polyrenderer/scene/poly_particle.cpp | 3 +- src/polyrenderer/scene/poly_particle.h | 6 +- src/polyrenderer/scene/poly_plane.cpp | 28 +++-- src/polyrenderer/scene/poly_plane.h | 16 +-- src/polyrenderer/scene/poly_playersprite.cpp | 2 +- src/polyrenderer/scene/poly_portal.cpp | 24 ++--- src/polyrenderer/scene/poly_portal.h | 2 - src/polyrenderer/scene/poly_scene.cpp | 19 ++-- src/polyrenderer/scene/poly_scene.h | 3 +- src/polyrenderer/scene/poly_sprite.cpp | 5 +- src/polyrenderer/scene/poly_sprite.h | 8 +- src/polyrenderer/scene/poly_wall.cpp | 27 ++--- src/polyrenderer/scene/poly_wall.h | 10 +- src/polyrenderer/scene/poly_wallsprite.cpp | 3 +- src/polyrenderer/scene/poly_wallsprite.h | 2 +- 22 files changed, 134 insertions(+), 171 deletions(-) diff --git a/src/polyrenderer/poly_renderer.cpp b/src/polyrenderer/poly_renderer.cpp index b34925d81..6fee5d841 100644 --- a/src/polyrenderer/poly_renderer.cpp +++ b/src/polyrenderer/poly_renderer.cpp @@ -161,7 +161,6 @@ void PolyRenderer::RenderActorView(AActor *actor, bool dontmaplines) PolyPortalViewpoint mainViewpoint = SetupPerspectiveMatrix(); mainViewpoint.StencilValue = GetNextStencilValue(); - mainViewpoint.PortalPlane = PolyClipPlane(0.0f, 0.0f, 0.0f, 1.0f); Scene.CurrentViewpoint = &mainViewpoint; Scene.Render(&mainViewpoint); PlayerSprites.Render(Threads.MainThread()); diff --git a/src/polyrenderer/scene/poly_cull.cpp b/src/polyrenderer/scene/poly_cull.cpp index 77e1c068f..4bda49b7c 100644 --- a/src/polyrenderer/scene/poly_cull.cpp +++ b/src/polyrenderer/scene/poly_cull.cpp @@ -28,11 +28,8 @@ #include "poly_cull.h" #include "polyrenderer/poly_renderer.h" -void PolyCull::CullScene(const PolyClipPlane &portalClipPlane, sector_t *portalEnter) +void PolyCull::CullScene(sector_t *portalSector, line_t *portalLine) { - ClearSolidSegments(); - MarkViewFrustum(); - for (uint32_t sub : PvsSubsectors) SubsectorDepths[sub] = 0xffffffff; SubsectorDepths.resize(level.subsectors.Size(), 0xffffffff); @@ -48,8 +45,34 @@ void PolyCull::CullScene(const PolyClipPlane &portalClipPlane, sector_t *portalE PvsLineStart.clear(); PvsLineVisible.resize(level.segs.Size()); - PortalClipPlane = portalClipPlane; - PortalEnter = portalEnter; + PortalSector = portalSector; + PortalLine = portalLine; + + SolidSegments.clear(); + + if (portalLine) + { + DVector3 viewpos = PolyRenderer::Instance()->Viewpoint.Pos; + DVector2 pt1 = portalLine->v1->fPos() - viewpos; + DVector2 pt2 = portalLine->v2->fPos() - viewpos; + if (pt1.Y * (pt1.X - pt2.X) + pt1.X * (pt2.Y - pt1.Y) >= 0) + { + angle_t angle1 = PointToPseudoAngle(portalLine->v1->fX(), portalLine->v1->fY()); + angle_t angle2 = PointToPseudoAngle(portalLine->v2->fX(), portalLine->v2->fY()); + MarkSegmentCulled(angle1, angle2); + } + else + { + angle_t angle2 = PointToPseudoAngle(portalLine->v1->fX(), portalLine->v1->fY()); + angle_t angle1 = PointToPseudoAngle(portalLine->v2->fX(), portalLine->v2->fY()); + MarkSegmentCulled(angle1, angle2); + } + InvertSegments(); + } + else + { + MarkViewFrustum(); + } // Cull front to back FirstSkyHeight = true; @@ -89,27 +112,13 @@ void PolyCull::CullNode(void *node) void PolyCull::CullSubsector(subsector_t *sub) { // Ignore everything in front of the portal - if (PortalEnter) + if (PortalSector) { - if (sub->sector != PortalEnter) + if (sub->sector != PortalSector) return; - PortalEnter = nullptr; + PortalSector = nullptr; } - // Check if subsector is clipped entirely by the portal clip plane - bool visible = false; - for (uint32_t i = 0; i < sub->numlines; i++) - { - seg_t *line = &sub->firstline[i]; - if (PortalClipPlane.A * line->v1->fX() + PortalClipPlane.B * line->v1->fY() + PortalClipPlane.D > 0.0) - { - visible = true; - break; - } - } - if (!visible) - return; - // Update sky heights for the scene if (!FirstSkyHeight) { @@ -145,16 +154,16 @@ void PolyCull::CullSubsector(subsector_t *sub) continue; } - // Skip line if entirely behind portal clipping plane - if ((PortalClipPlane.A * line->v1->fX() + PortalClipPlane.B * line->v1->fY() + PortalClipPlane.D <= 0.0) && - (PortalClipPlane.A * line->v2->fX() + PortalClipPlane.B * line->v2->fY() + PortalClipPlane.D <= 0.0)) + // Do not draw the portal line + if (line->linedef == PortalLine) { PvsLineVisible[NextPvsLineStart++] = false; continue; } - angle_t angle1, angle2; - bool lineVisible = GetAnglesForLine(line->v1->fX(), line->v1->fY(), line->v2->fX(), line->v2->fY(), angle1, angle2); + angle_t angle2 = PointToPseudoAngle(line->v1->fX(), line->v1->fY()); + angle_t angle1 = PointToPseudoAngle(line->v2->fX(), line->v2->fY()); + bool lineVisible = !IsSegmentCulled(angle1, angle2); if (lineVisible && line->backsector == nullptr) { MarkSegmentCulled(angle1, angle2); @@ -173,26 +182,6 @@ void PolyCull::CullSubsector(subsector_t *sub) SubsectorDepths[sub->Index()] = subsectorDepth; } -void PolyCull::ClearSolidSegments() -{ - SolidSegments.clear(); -} - -void PolyCull::InvertSegments() -{ - TempInvertSolidSegments.swap(SolidSegments); - ClearSolidSegments(); - angle_t cur = 0; - for (const auto &segment : TempInvertSolidSegments) - { - if (cur < segment.Start) - MarkSegmentCulled(cur, segment.Start - 1); - cur = segment.End + 1; - } - if (cur < ANGLE_MAX) - MarkSegmentCulled(cur, ANGLE_MAX); -} - bool PolyCull::IsSegmentCulled(angle_t startAngle, angle_t endAngle) const { if (startAngle > endAngle) @@ -305,11 +294,20 @@ bool PolyCull::CheckBBox(float *bspcoord) return !IsSegmentCulled(angle2, angle1); } -bool PolyCull::GetAnglesForLine(double x1, double y1, double x2, double y2, angle_t &angle1, angle_t &angle2) const +void PolyCull::InvertSegments() { - angle2 = PointToPseudoAngle(x1, y1); - angle1 = PointToPseudoAngle(x2, y2); - return !IsSegmentCulled(angle1, angle2); + TempInvertSolidSegments.swap(SolidSegments); + SolidSegments.clear(); + angle_t cur = 0; + for (const auto &segment : TempInvertSolidSegments) + { + if (cur < segment.Start) + MarkSegmentCulled(cur, segment.Start - 1); + if (segment.End == ANGLE_MAX) + return; + cur = segment.End + 1; + } + MarkSegmentCulled(cur, ANGLE_MAX); } void PolyCull::MarkViewFrustum() diff --git a/src/polyrenderer/scene/poly_cull.h b/src/polyrenderer/scene/poly_cull.h index 62e533e2f..53b14c9cc 100644 --- a/src/polyrenderer/scene/poly_cull.h +++ b/src/polyrenderer/scene/poly_cull.h @@ -29,7 +29,7 @@ class PolyCull { public: - void CullScene(const PolyClipPlane &portalClipPlane, sector_t *portalEnter); + void CullScene(sector_t *portalSector, line_t *portalLine); bool IsLineSegVisible(uint32_t subsectorDepth, uint32_t lineIndex) { @@ -53,13 +53,11 @@ private: angle_t Start, End; }; - void ClearSolidSegments(); void MarkViewFrustum(); - - bool GetAnglesForLine(double x1, double y1, double x2, double y2, angle_t &angle1, angle_t &angle2) const; - bool IsSegmentCulled(angle_t angle1, angle_t angle2) const; void InvertSegments(); + bool IsSegmentCulled(angle_t angle1, angle_t angle2) const; + void CullNode(void *node); void CullSubsector(subsector_t *sub); int PointOnSide(const DVector2 &pos, const node_t *node); @@ -70,15 +68,13 @@ private: void MarkSegmentCulled(angle_t angle1, angle_t angle2); - FString lastLevelName; - std::vector SolidSegments; std::vector TempInvertSolidSegments; - const int SolidCullScale = 3000; + std::vector PortalVisibility; bool FirstSkyHeight = true; - PolyClipPlane PortalClipPlane; - sector_t *PortalEnter = nullptr; + sector_t *PortalSector = nullptr; + line_t *PortalLine = nullptr; std::vector PvsLineStart; std::vector PvsLineVisible; diff --git a/src/polyrenderer/scene/poly_decal.cpp b/src/polyrenderer/scene/poly_decal.cpp index d98e6a477..16754727b 100644 --- a/src/polyrenderer/scene/poly_decal.cpp +++ b/src/polyrenderer/scene/poly_decal.cpp @@ -32,7 +32,7 @@ #include "a_sharedglobal.h" #include "swrenderer/scene/r_scene.h" -void RenderPolyDecal::RenderWallDecals(PolyRenderThread *thread, const PolyClipPlane &clipPlane, const seg_t *line, uint32_t stencilValue) +void RenderPolyDecal::RenderWallDecals(PolyRenderThread *thread, const seg_t *line, uint32_t stencilValue) { if (line->linedef == nullptr && line->sidedef == nullptr) return; @@ -40,11 +40,11 @@ void RenderPolyDecal::RenderWallDecals(PolyRenderThread *thread, const PolyClipP for (DBaseDecal *decal = line->sidedef->AttachedDecals; decal != nullptr; decal = decal->WallNext) { RenderPolyDecal render; - render.Render(thread, clipPlane, decal, line, stencilValue); + render.Render(thread, decal, line, stencilValue); } } -void RenderPolyDecal::Render(PolyRenderThread *thread, const PolyClipPlane &clipPlane, DBaseDecal *decal, const seg_t *line, uint32_t stencilValue) +void RenderPolyDecal::Render(PolyRenderThread *thread, DBaseDecal *decal, const seg_t *line, uint32_t stencilValue) { if (decal->RenderFlags & RF_INVISIBLE || !viewactive || !decal->PicNum.isValid()) return; @@ -188,7 +188,6 @@ void RenderPolyDecal::Render(PolyRenderThread *thread, const PolyClipPlane &clip args.SetColor(0xff000000 | decal->AlphaColor, decal->AlphaColor >> 24); args.SetStyle(decal->RenderStyle, decal->Alpha, decal->AlphaColor, decal->Translation, tex, false); args.SetStencilTestValue(stencilValue); - args.SetClipPlane(0, clipPlane); args.SetDepthTest(true); args.SetWriteStencil(false); args.SetWriteDepth(false); diff --git a/src/polyrenderer/scene/poly_decal.h b/src/polyrenderer/scene/poly_decal.h index 17207b569..5ca597109 100644 --- a/src/polyrenderer/scene/poly_decal.h +++ b/src/polyrenderer/scene/poly_decal.h @@ -27,10 +27,10 @@ class RenderPolyDecal { public: - static void RenderWallDecals(PolyRenderThread *thread, const PolyClipPlane &clipPlane, const seg_t *line, uint32_t stencilValue); + static void RenderWallDecals(PolyRenderThread *thread, const seg_t *line, uint32_t stencilValue); private: - void Render(PolyRenderThread *thread, const PolyClipPlane &clipPlane, DBaseDecal *decal, const seg_t *line, uint32_t stencilValue); + void Render(PolyRenderThread *thread, DBaseDecal *decal, const seg_t *line, uint32_t stencilValue); void GetDecalSectors(DBaseDecal *decal, const seg_t *line, sector_t **front, sector_t **back); double GetDecalZ(DBaseDecal *decal, const seg_t *line, sector_t *front, sector_t *back); diff --git a/src/polyrenderer/scene/poly_model.cpp b/src/polyrenderer/scene/poly_model.cpp index 28d2f0e19..40c72d034 100644 --- a/src/polyrenderer/scene/poly_model.cpp +++ b/src/polyrenderer/scene/poly_model.cpp @@ -36,21 +36,21 @@ void gl_FlushModels(); bool polymodelsInUse; -void PolyRenderModel(PolyRenderThread *thread, const Mat4f &worldToClip, const PolyClipPlane &clipPlane, uint32_t stencilValue, float x, float y, float z, FSpriteModelFrame *smf, AActor *actor) +void PolyRenderModel(PolyRenderThread *thread, const Mat4f &worldToClip, uint32_t stencilValue, float x, float y, float z, FSpriteModelFrame *smf, AActor *actor) { - PolyModelRenderer renderer(thread, worldToClip, clipPlane, stencilValue); + PolyModelRenderer renderer(thread, worldToClip, stencilValue); renderer.RenderModel(x, y, z, smf, actor); } -void PolyRenderHUDModel(PolyRenderThread *thread, const Mat4f &worldToClip, const PolyClipPlane &clipPlane, uint32_t stencilValue, DPSprite *psp, float ofsx, float ofsy) +void PolyRenderHUDModel(PolyRenderThread *thread, const Mat4f &worldToClip, uint32_t stencilValue, DPSprite *psp, float ofsx, float ofsy) { - PolyModelRenderer renderer(thread, worldToClip, clipPlane, stencilValue); + PolyModelRenderer renderer(thread, worldToClip, stencilValue); renderer.RenderHUDModel(psp, ofsx, ofsy); } ///////////////////////////////////////////////////////////////////////////// -PolyModelRenderer::PolyModelRenderer(PolyRenderThread *thread, const Mat4f &worldToClip, const PolyClipPlane &clipPlane, uint32_t stencilValue) : Thread(thread), WorldToClip(worldToClip), ClipPlane(clipPlane), StencilValue(stencilValue) +PolyModelRenderer::PolyModelRenderer(PolyRenderThread *thread, const Mat4f &worldToClip, uint32_t stencilValue) : Thread(thread), WorldToClip(worldToClip), StencilValue(stencilValue) { if (!polymodelsInUse) { diff --git a/src/polyrenderer/scene/poly_model.h b/src/polyrenderer/scene/poly_model.h index 6ce9665fb..f5a9bd779 100644 --- a/src/polyrenderer/scene/poly_model.h +++ b/src/polyrenderer/scene/poly_model.h @@ -26,13 +26,13 @@ #include "r_data/matrix.h" #include "r_data/models/models.h" -void PolyRenderModel(PolyRenderThread *thread, const Mat4f &worldToClip, const PolyClipPlane &clipPlane, uint32_t stencilValue, float x, float y, float z, FSpriteModelFrame *smf, AActor *actor); -void PolyRenderHUDModel(PolyRenderThread *thread, const Mat4f &worldToClip, const PolyClipPlane &clipPlane, uint32_t stencilValue, DPSprite *psp, float ofsx, float ofsy); +void PolyRenderModel(PolyRenderThread *thread, const Mat4f &worldToClip, uint32_t stencilValue, float x, float y, float z, FSpriteModelFrame *smf, AActor *actor); +void PolyRenderHUDModel(PolyRenderThread *thread, const Mat4f &worldToClip, uint32_t stencilValue, DPSprite *psp, float ofsx, float ofsy); class PolyModelRenderer : public FModelRenderer { public: - PolyModelRenderer(PolyRenderThread *thread, const Mat4f &worldToClip, const PolyClipPlane &clipPlane, uint32_t stencilValue); + PolyModelRenderer(PolyRenderThread *thread, const Mat4f &worldToClip, uint32_t stencilValue); void BeginDrawModel(AActor *actor, FSpriteModelFrame *smf, const VSMatrix &objectToWorldMatrix) override; void EndDrawModel(AActor *actor, FSpriteModelFrame *smf) override; @@ -52,7 +52,6 @@ public: PolyRenderThread *Thread = nullptr; const Mat4f &WorldToClip; - const PolyClipPlane &ClipPlane; uint32_t StencilValue = 0; AActor *ModelActor = nullptr; diff --git a/src/polyrenderer/scene/poly_particle.cpp b/src/polyrenderer/scene/poly_particle.cpp index 0e62a2008..763343eb2 100644 --- a/src/polyrenderer/scene/poly_particle.cpp +++ b/src/polyrenderer/scene/poly_particle.cpp @@ -32,7 +32,7 @@ EXTERN_CVAR(Int, gl_particles_style) -void RenderPolyParticle::Render(PolyRenderThread *thread, const PolyClipPlane &clipPlane, particle_t *particle, subsector_t *sub, uint32_t stencilValue) +void RenderPolyParticle::Render(PolyRenderThread *thread, particle_t *particle, subsector_t *sub, uint32_t stencilValue) { double timefrac = r_viewpoint.TicFrac; if (paused || bglobal.freeze || (level.flags2 & LEVEL2_FROZEN)) @@ -85,7 +85,6 @@ void RenderPolyParticle::Render(PolyRenderThread *thread, const PolyClipPlane &c args.SetStencilTestValue(stencilValue); args.SetWriteStencil(false); args.SetWriteDepth(false); - args.SetClipPlane(0, clipPlane); args.SetTexture(GetParticleTexture(), ParticleTextureSize, ParticleTextureSize); args.DrawArray(thread->DrawQueue, vertices, 4, PolyDrawMode::TriangleFan); } diff --git a/src/polyrenderer/scene/poly_particle.h b/src/polyrenderer/scene/poly_particle.h index de0171b11..5d6b46a97 100644 --- a/src/polyrenderer/scene/poly_particle.h +++ b/src/polyrenderer/scene/poly_particle.h @@ -28,7 +28,7 @@ class RenderPolyParticle { public: - void Render(PolyRenderThread *thread, const PolyClipPlane &clipPlane, particle_t *particle, subsector_t *sub, uint32_t stencilValue); + void Render(PolyRenderThread *thread, particle_t *particle, subsector_t *sub, uint32_t stencilValue); private: static uint8_t *GetParticleTexture(); @@ -45,10 +45,10 @@ class PolyTranslucentParticle : public PolyTranslucentObject public: PolyTranslucentParticle(particle_t *particle, subsector_t *sub, uint32_t subsectorDepth, uint32_t stencilValue) : PolyTranslucentObject(subsectorDepth, 0.0), particle(particle), sub(sub), StencilValue(stencilValue) { } - void Render(PolyRenderThread *thread, const PolyClipPlane &portalPlane) override + void Render(PolyRenderThread *thread) override { RenderPolyParticle spr; - spr.Render(thread, portalPlane, particle, sub, StencilValue + 1); + spr.Render(thread, particle, sub, StencilValue + 1); } particle_t *particle = nullptr; diff --git a/src/polyrenderer/scene/poly_plane.cpp b/src/polyrenderer/scene/poly_plane.cpp index a3aca5a8d..54a0ac894 100644 --- a/src/polyrenderer/scene/poly_plane.cpp +++ b/src/polyrenderer/scene/poly_plane.cpp @@ -36,30 +36,30 @@ EXTERN_CVAR(Int, r_3dfloors) -void RenderPolyPlane::RenderPlanes(PolyRenderThread *thread, const PolyClipPlane &clipPlane, const PolyTransferHeights &fakeflat, uint32_t stencilValue, double skyCeilingHeight, double skyFloorHeight, std::vector> §orPortals, size_t sectorPortalsStart) +void RenderPolyPlane::RenderPlanes(PolyRenderThread *thread, const PolyTransferHeights &fakeflat, uint32_t stencilValue, double skyCeilingHeight, double skyFloorHeight, std::vector> §orPortals, size_t sectorPortalsStart) { if (fakeflat.FrontSector->CenterFloor() == fakeflat.FrontSector->CenterCeiling()) return; RenderPolyPlane plane; - plane.Render(thread, clipPlane, fakeflat, stencilValue, true, skyCeilingHeight, sectorPortals, sectorPortalsStart); - plane.Render(thread, clipPlane, fakeflat, stencilValue, false, skyFloorHeight, sectorPortals, sectorPortalsStart); + plane.Render(thread, fakeflat, stencilValue, true, skyCeilingHeight, sectorPortals, sectorPortalsStart); + plane.Render(thread, fakeflat, stencilValue, false, skyFloorHeight, sectorPortals, sectorPortalsStart); } -void RenderPolyPlane::Render(PolyRenderThread *thread, const PolyClipPlane &clipPlane, const PolyTransferHeights &fakeflat, uint32_t stencilValue, bool ceiling, double skyHeight, std::vector> §orPortals, size_t sectorPortalsStart) +void RenderPolyPlane::Render(PolyRenderThread *thread, const PolyTransferHeights &fakeflat, uint32_t stencilValue, bool ceiling, double skyHeight, std::vector> §orPortals, size_t sectorPortalsStart) { FSectorPortal *portal = fakeflat.FrontSector->ValidatePortal(ceiling ? sector_t::ceiling : sector_t::floor); if (!portal || (portal->mFlags & PORTSF_INSKYBOX) == PORTSF_INSKYBOX) // Do not recurse into portals we already recursed into { - RenderNormal(thread, clipPlane, fakeflat, stencilValue, ceiling, skyHeight); + RenderNormal(thread, fakeflat, stencilValue, ceiling, skyHeight); } else { - RenderPortal(thread, clipPlane, fakeflat, stencilValue, ceiling, skyHeight, portal, sectorPortals, sectorPortalsStart); + RenderPortal(thread, fakeflat, stencilValue, ceiling, skyHeight, portal, sectorPortals, sectorPortalsStart); } } -void RenderPolyPlane::RenderNormal(PolyRenderThread *thread, const PolyClipPlane &clipPlane, const PolyTransferHeights &fakeflat, uint32_t stencilValue, bool ceiling, double skyHeight) +void RenderPolyPlane::RenderNormal(PolyRenderThread *thread, const PolyTransferHeights &fakeflat, uint32_t stencilValue, bool ceiling, double skyHeight) { const auto &viewpoint = PolyRenderer::Instance()->Viewpoint; @@ -78,7 +78,6 @@ void RenderPolyPlane::RenderNormal(PolyRenderThread *thread, const PolyClipPlane SetDynLights(thread, args, fakeflat.Subsector, ceiling); args.SetStencilTestValue(stencilValue); args.SetWriteStencil(true, stencilValue + 1); - args.SetClipPlane(0, clipPlane); args.SetTexture(tex, DefaultRenderStyle()); args.SetStyle(TriBlendMode::TextureOpaque); args.DrawArray(thread->DrawQueue, vertices, fakeflat.Subsector->numlines, PolyDrawMode::TriangleFan); @@ -89,7 +88,6 @@ void RenderPolyPlane::RenderNormal(PolyRenderThread *thread, const PolyClipPlane PolyDrawArgs args; args.SetStencilTestValue(stencilValue); - args.SetClipPlane(0, clipPlane); args.SetWriteStencil(true, 255); args.SetWriteColor(false); args.SetWriteDepth(false); @@ -99,7 +97,7 @@ void RenderPolyPlane::RenderNormal(PolyRenderThread *thread, const PolyClipPlane } } -void RenderPolyPlane::RenderPortal(PolyRenderThread *thread, const PolyClipPlane &clipPlane, const PolyTransferHeights &fakeflat, uint32_t stencilValue, bool ceiling, double skyHeight, FSectorPortal *portal, std::vector> §orPortals, size_t sectorPortalsStart) +void RenderPolyPlane::RenderPortal(PolyRenderThread *thread, const PolyTransferHeights &fakeflat, uint32_t stencilValue, bool ceiling, double skyHeight, FSectorPortal *portal, std::vector> §orPortals, size_t sectorPortalsStart) { const auto &viewpoint = PolyRenderer::Instance()->Viewpoint; @@ -156,7 +154,6 @@ void RenderPolyPlane::RenderPortal(PolyRenderThread *thread, const PolyClipPlane PolyDrawArgs args; args.SetStencilTestValue(stencilValue); - args.SetClipPlane(0, clipPlane); args.SetWriteStencil(true, polyportal->StencilValue); args.SetWriteColor(false); args.SetWriteDepth(false); @@ -413,7 +410,7 @@ PolyPlaneUVTransform::PolyPlaneUVTransform(const FTransform &transform, FTexture ///////////////////////////////////////////////////////////////////////////// -void Render3DFloorPlane::RenderPlanes(PolyRenderThread *thread, const PolyClipPlane &clipPlane, subsector_t *sub, uint32_t stencilValue, uint32_t subsectorDepth, std::vector &translucentObjects) +void Render3DFloorPlane::RenderPlanes(PolyRenderThread *thread, subsector_t *sub, uint32_t stencilValue, uint32_t subsectorDepth, std::vector &translucentObjects) { if (!r_3dfloors || sub->sector->CenterFloor() == sub->sector->CenterCeiling()) return; @@ -457,7 +454,7 @@ void Render3DFloorPlane::RenderPlanes(PolyRenderThread *thread, const PolyClipPl } if (!plane.Masked) - plane.Render(thread, clipPlane); + plane.Render(thread); else translucentObjects.push_back(thread->FrameMemory->NewObject(plane, subsectorDepth)); } @@ -497,14 +494,14 @@ void Render3DFloorPlane::RenderPlanes(PolyRenderThread *thread, const PolyClipPl } if (!plane.Masked) - plane.Render(thread, clipPlane); + plane.Render(thread); else translucentObjects.push_back(thread->FrameMemory->NewObject(plane, subsectorDepth)); } } } -void Render3DFloorPlane::Render(PolyRenderThread *thread, const PolyClipPlane &clipPlane) +void Render3DFloorPlane::Render(PolyRenderThread *thread) { FTextureID picnum = ceiling ? *fakeFloor->bottom.texture : *fakeFloor->top.texture; FTexture *tex = TexMan(picnum); @@ -562,6 +559,5 @@ void Render3DFloorPlane::Render(PolyRenderThread *thread, const PolyClipPlane &c args.SetStencilTestValue(stencilValue); args.SetWriteStencil(true, stencilValue + 1); args.SetTexture(tex, DefaultRenderStyle()); - args.SetClipPlane(0, clipPlane); args.DrawArray(thread->DrawQueue, vertices, sub->numlines, PolyDrawMode::TriangleFan); } diff --git a/src/polyrenderer/scene/poly_plane.h b/src/polyrenderer/scene/poly_plane.h index e5d0c9806..96c115c19 100644 --- a/src/polyrenderer/scene/poly_plane.h +++ b/src/polyrenderer/scene/poly_plane.h @@ -57,13 +57,13 @@ private: class RenderPolyPlane { public: - static void RenderPlanes(PolyRenderThread *thread, const PolyClipPlane &clipPlane, const PolyTransferHeights &fakeflat, uint32_t stencilValue, double skyCeilingHeight, double skyFloorHeight, std::vector> §orPortals, size_t sectorPortalsStart); + static void RenderPlanes(PolyRenderThread *thread, const PolyTransferHeights &fakeflat, uint32_t stencilValue, double skyCeilingHeight, double skyFloorHeight, std::vector> §orPortals, size_t sectorPortalsStart); private: - void Render(PolyRenderThread *thread, const PolyClipPlane &clipPlane, const PolyTransferHeights &fakeflat, uint32_t stencilValue, bool ceiling, double skyHeight, std::vector> §orPortals, size_t sectorPortalsStart); + void Render(PolyRenderThread *thread, const PolyTransferHeights &fakeflat, uint32_t stencilValue, bool ceiling, double skyHeight, std::vector> §orPortals, size_t sectorPortalsStart); - void RenderPortal(PolyRenderThread *thread, const PolyClipPlane &clipPlane, const PolyTransferHeights &fakeflat, uint32_t stencilValue, bool ceiling, double skyHeight, FSectorPortal *portal, std::vector> §orPortals, size_t sectorPortalsStart); - void RenderNormal(PolyRenderThread *thread, const PolyClipPlane &clipPlane, const PolyTransferHeights &fakeflat, uint32_t stencilValue, bool ceiling, double skyHeight); + void RenderPortal(PolyRenderThread *thread, const PolyTransferHeights &fakeflat, uint32_t stencilValue, bool ceiling, double skyHeight, FSectorPortal *portal, std::vector> §orPortals, size_t sectorPortalsStart); + void RenderNormal(PolyRenderThread *thread, const PolyTransferHeights &fakeflat, uint32_t stencilValue, bool ceiling, double skyHeight); void RenderSkyWalls(PolyRenderThread *thread, PolyDrawArgs &args, subsector_t *sub, PolyDrawSectorPortal *polyportal, bool ceiling, double skyHeight); @@ -79,9 +79,9 @@ private: class Render3DFloorPlane { public: - static void RenderPlanes(PolyRenderThread *thread, const PolyClipPlane &clipPlane, subsector_t *sub, uint32_t stencilValue, uint32_t subsectorDepth, std::vector &translucentObjects); + static void RenderPlanes(PolyRenderThread *thread, subsector_t *sub, uint32_t stencilValue, uint32_t subsectorDepth, std::vector &translucentObjects); - void Render(PolyRenderThread *thread, const PolyClipPlane &clipPlane); + void Render(PolyRenderThread *thread); subsector_t *sub = nullptr; uint32_t stencilValue = 0; @@ -97,9 +97,9 @@ class PolyTranslucent3DFloorPlane : public PolyTranslucentObject public: PolyTranslucent3DFloorPlane(Render3DFloorPlane plane, uint32_t subsectorDepth) : PolyTranslucentObject(subsectorDepth, 1e7), plane(plane) { } - void Render(PolyRenderThread *thread, const PolyClipPlane &portalPlane) override + void Render(PolyRenderThread *thread) override { - plane.Render(thread, portalPlane); + plane.Render(thread); } Render3DFloorPlane plane; diff --git a/src/polyrenderer/scene/poly_playersprite.cpp b/src/polyrenderer/scene/poly_playersprite.cpp index abcb86175..c7d75ef33 100644 --- a/src/polyrenderer/scene/poly_playersprite.cpp +++ b/src/polyrenderer/scene/poly_playersprite.cpp @@ -255,7 +255,7 @@ void RenderPolyPlayerSprites::RenderSprite(PolyRenderThread *thread, DPSprite *p if (renderHUDModel) { - PolyRenderHUDModel(thread, PolyRenderer::Instance()->Scene.CurrentViewpoint->WorldToClip, PolyClipPlane(), 1, pspr, (float)sx, (float)sy); + PolyRenderHUDModel(thread, PolyRenderer::Instance()->Scene.CurrentViewpoint->WorldToClip, 1, pspr, (float)sx, (float)sy); return; } diff --git a/src/polyrenderer/scene/poly_portal.cpp b/src/polyrenderer/scene/poly_portal.cpp index 20c6833bd..93fe10053 100644 --- a/src/polyrenderer/scene/poly_portal.cpp +++ b/src/polyrenderer/scene/poly_portal.cpp @@ -44,11 +44,15 @@ void PolyDrawSectorPortal::Render(int portalDepth) if (Portal->mType == PORTS_HORIZON || Portal->mType == PORTS_PLANE) return; + /*angle_t angle1 = PolyCull::PointToPseudoAngle(v1->fX(), v1->fY()); + angle_t angle2 = PolyCull::PointToPseudoAngle(v2->fX(), v2->fY()); + Segments.clear(); + Segments.push_back({ angle1, angle2 });*/ + SaveGlobals(); PortalViewpoint = PolyRenderer::Instance()->SetupPerspectiveMatrix(); PortalViewpoint.StencilValue = StencilValue; - PortalViewpoint.PortalPlane = PolyClipPlane(0.0f, 0.0f, 0.0f, 1.0f); PortalViewpoint.PortalDepth = portalDepth; PortalViewpoint.PortalEnterSector = Portal->mDestination; @@ -134,28 +138,12 @@ void PolyDrawLinePortal::Render(int portalDepth) DVector2 pt1 = clipLine->v1->fPos() - PolyRenderer::Instance()->Viewpoint.Pos; DVector2 pt2 = clipLine->v2->fPos() - PolyRenderer::Instance()->Viewpoint.Pos; bool backfacing = (pt1.Y * (pt1.X - pt2.X) + pt1.X * (pt2.Y - pt1.Y) >= 0); - vertex_t *v1 = backfacing ? clipLine->v1 : clipLine->v2; - vertex_t *v2 = backfacing ? clipLine->v2 : clipLine->v1; - - // Calculate plane clipping - DVector2 planePos = v1->fPos(); - DVector2 planeNormal = (v2->fPos() - v1->fPos()).Rotated90CW(); - planeNormal.MakeUnit(); - double planeD = -(planeNormal | (planePos + planeNormal * 0.001)); - PolyClipPlane portalPlane((float)planeNormal.X, (float)planeNormal.Y, (float)0.0f, (float)planeD); - - // Cull everything outside the portal line - // To do: this doesn't work for some strange reason.. - /*angle_t angle1 = PolyCull::PointToPseudoAngle(v1->fX(), v1->fY()); - angle_t angle2 = PolyCull::PointToPseudoAngle(v2->fX(), v2->fY()); - Segments.clear(); - Segments.push_back({ angle1, angle2 });*/ PortalViewpoint = PolyRenderer::Instance()->SetupPerspectiveMatrix(Mirror); PortalViewpoint.StencilValue = StencilValue; - PortalViewpoint.PortalPlane = portalPlane; PortalViewpoint.PortalDepth = portalDepth; PortalViewpoint.PortalEnterLine = clipLine; + PortalViewpoint.PortalEnterSector = backfacing ? clipLine->frontsector : clipLine->backsector; PolyRenderer::Instance()->Scene.Render(&PortalViewpoint); diff --git a/src/polyrenderer/scene/poly_portal.h b/src/polyrenderer/scene/poly_portal.h index d9ad8f1ec..2c37266f6 100644 --- a/src/polyrenderer/scene/poly_portal.h +++ b/src/polyrenderer/scene/poly_portal.h @@ -48,7 +48,6 @@ public: FSectorPortal *Portal = nullptr; uint32_t StencilValue = 0; std::vector Shape; - //std::vector Segments; private: void SaveGlobals(); @@ -73,7 +72,6 @@ public: line_t *Mirror = nullptr; uint32_t StencilValue = 0; std::vector Shape; - //std::vector Segments; private: void SaveGlobals(); diff --git a/src/polyrenderer/scene/poly_scene.cpp b/src/polyrenderer/scene/poly_scene.cpp index 63c2b5637..100ca1324 100644 --- a/src/polyrenderer/scene/poly_scene.cpp +++ b/src/polyrenderer/scene/poly_scene.cpp @@ -59,7 +59,7 @@ void RenderPolyScene::Render(PolyPortalViewpoint *viewpoint) CurrentViewpoint->LinePortalsStart = thread->LinePortals.size(); PolyCullCycles.Clock(); - Cull.CullScene(CurrentViewpoint->PortalPlane, CurrentViewpoint->PortalEnterSector); + Cull.CullScene(CurrentViewpoint->PortalEnterSector, CurrentViewpoint->PortalEnterLine); PolyCullCycles.Unclock(); RenderSectors(); @@ -158,15 +158,15 @@ void RenderPolyScene::RenderSubsector(PolyRenderThread *thread, subsector_t *sub RenderPolyNode(thread, &sub->BSP->Nodes.Last(), subsectorDepth, frontsector); } - Render3DFloorPlane::RenderPlanes(thread, CurrentViewpoint->PortalPlane, sub, CurrentViewpoint->StencilValue, subsectorDepth, thread->TranslucentObjects); - RenderPolyPlane::RenderPlanes(thread, CurrentViewpoint->PortalPlane, sub, CurrentViewpoint->StencilValue, Cull.MaxCeilingHeight, Cull.MinFloorHeight, thread->SectorPortals, CurrentViewpoint->SectorPortalsStart); + Render3DFloorPlane::RenderPlanes(thread, sub, CurrentViewpoint->StencilValue, subsectorDepth, thread->TranslucentObjects); + RenderPolyPlane::RenderPlanes(thread, sub, CurrentViewpoint->StencilValue, Cull.MaxCeilingHeight, Cull.MinFloorHeight, thread->SectorPortals, CurrentViewpoint->SectorPortalsStart); } else { PolyTransferHeights fakeflat(sub); - Render3DFloorPlane::RenderPlanes(thread, CurrentViewpoint->PortalPlane, sub, CurrentViewpoint->StencilValue, subsectorDepth, thread->TranslucentObjects); - RenderPolyPlane::RenderPlanes(thread, CurrentViewpoint->PortalPlane, fakeflat, CurrentViewpoint->StencilValue, Cull.MaxCeilingHeight, Cull.MinFloorHeight, thread->SectorPortals, CurrentViewpoint->SectorPortalsStart); + Render3DFloorPlane::RenderPlanes(thread, sub, CurrentViewpoint->StencilValue, subsectorDepth, thread->TranslucentObjects); + RenderPolyPlane::RenderPlanes(thread, fakeflat, CurrentViewpoint->StencilValue, Cull.MaxCeilingHeight, Cull.MinFloorHeight, thread->SectorPortals, CurrentViewpoint->SectorPortalsStart); for (uint32_t i = 0; i < sub->numlines; i++) { @@ -237,7 +237,7 @@ void RenderPolyScene::RenderPolySubsector(PolyRenderThread *thread, subsector_t sub->flags |= SSECF_DRAWN; } - RenderPolyWall::RenderLine(thread, CurrentViewpoint->PortalPlane, line, frontsector, subsectorDepth, CurrentViewpoint->StencilValue, thread->TranslucentObjects, thread->LinePortals, CurrentViewpoint->LinePortalsStart, CurrentViewpoint->PortalEnterLine); + RenderPolyWall::RenderLine(thread, line, frontsector, subsectorDepth, CurrentViewpoint->StencilValue, thread->TranslucentObjects, thread->LinePortals, CurrentViewpoint->LinePortalsStart, CurrentViewpoint->PortalEnterLine); } } } @@ -311,12 +311,12 @@ void RenderPolyScene::RenderLine(PolyRenderThread *thread, subsector_t *sub, seg for (unsigned int i = 0; i < line->backsector->e->XFloor.ffloors.Size(); i++) { F3DFloor *fakeFloor = line->backsector->e->XFloor.ffloors[i]; - RenderPolyWall::Render3DFloorLine(thread, CurrentViewpoint->PortalPlane, line, frontsector, subsectorDepth, CurrentViewpoint->StencilValue, fakeFloor, thread->TranslucentObjects); + RenderPolyWall::Render3DFloorLine(thread, line, frontsector, subsectorDepth, CurrentViewpoint->StencilValue, fakeFloor, thread->TranslucentObjects); } } // Render wall, and update culling info if its an occlusion blocker - RenderPolyWall::RenderLine(thread, CurrentViewpoint->PortalPlane, line, frontsector, subsectorDepth, CurrentViewpoint->StencilValue, thread->TranslucentObjects, thread->LinePortals, CurrentViewpoint->LinePortalsStart, CurrentViewpoint->PortalEnterLine); + RenderPolyWall::RenderLine(thread, line, frontsector, subsectorDepth, CurrentViewpoint->StencilValue, thread->TranslucentObjects, thread->LinePortals, CurrentViewpoint->LinePortalsStart, CurrentViewpoint->PortalEnterLine); } void RenderPolyScene::RenderPortals() @@ -339,7 +339,6 @@ void RenderPolyScene::RenderPortals() PolyTriangleDrawer::SetTransform(thread->DrawQueue, transform); PolyDrawArgs args; - args.SetClipPlane(0, CurrentViewpoint->PortalPlane); args.SetWriteColor(!enterPortals); args.SetDepthTest(false); @@ -394,7 +393,7 @@ void RenderPolyScene::RenderTranslucent() for (size_t i = CurrentViewpoint->ObjectsEnd; i > CurrentViewpoint->ObjectsStart; i--) { PolyTranslucentObject *obj = objects[i - 1]; - obj->Render(thread, CurrentViewpoint->PortalPlane); + obj->Render(thread); obj->~PolyTranslucentObject(); } diff --git a/src/polyrenderer/scene/poly_scene.h b/src/polyrenderer/scene/poly_scene.h index f0927db90..26241a027 100644 --- a/src/polyrenderer/scene/poly_scene.h +++ b/src/polyrenderer/scene/poly_scene.h @@ -40,7 +40,7 @@ public: PolyTranslucentObject(uint32_t subsectorDepth = 0, double distanceSquared = 0.0) : subsectorDepth(subsectorDepth), DistanceSquared(distanceSquared) { } virtual ~PolyTranslucentObject() { } - virtual void Render(PolyRenderThread *thread, const PolyClipPlane &portalPlane) = 0; + virtual void Render(PolyRenderThread *thread) = 0; bool operator<(const PolyTranslucentObject &other) const { @@ -60,7 +60,6 @@ class PolyPortalViewpoint public: Mat4f WorldToView; Mat4f WorldToClip; - PolyClipPlane PortalPlane; uint32_t StencilValue = 0; int PortalDepth = 0; bool Mirror = false; diff --git a/src/polyrenderer/scene/poly_sprite.cpp b/src/polyrenderer/scene/poly_sprite.cpp index fdbb2fa92..c5c487c9a 100644 --- a/src/polyrenderer/scene/poly_sprite.cpp +++ b/src/polyrenderer/scene/poly_sprite.cpp @@ -72,7 +72,7 @@ bool RenderPolySprite::GetLine(AActor *thing, DVector2 &left, DVector2 &right) return true; } -void RenderPolySprite::Render(PolyRenderThread *thread, const PolyClipPlane &clipPlane, AActor *thing, subsector_t *sub, uint32_t stencilValue, float t1, float t2) +void RenderPolySprite::Render(PolyRenderThread *thread, AActor *thing, subsector_t *sub, uint32_t stencilValue, float t1, float t2) { if (r_models) { @@ -83,7 +83,7 @@ void RenderPolySprite::Render(PolyRenderThread *thread, const PolyClipPlane &cli { const auto &viewpoint = PolyRenderer::Instance()->Viewpoint; DVector3 pos = thing->InterpolatedPosition(viewpoint.TicFrac); - PolyRenderModel(thread, PolyRenderer::Instance()->Scene.CurrentViewpoint->WorldToClip, clipPlane, stencilValue, (float)pos.X, (float)pos.Y, (float)pos.Z, modelframe, thing); + PolyRenderModel(thread, PolyRenderer::Instance()->Scene.CurrentViewpoint->WorldToClip, stencilValue, (float)pos.X, (float)pos.Y, (float)pos.Z, modelframe, thing); return; } } @@ -161,7 +161,6 @@ void RenderPolySprite::Render(PolyRenderThread *thread, const PolyClipPlane &cli SetDynlight(thing, args); args.SetLight(GetColorTable(sub->sector->Colormap, sub->sector->SpecialColors[sector_t::sprites], true), lightlevel, PolyRenderer::Instance()->Light.SpriteGlobVis(foggy), fullbrightSprite); args.SetStencilTestValue(stencilValue); - args.SetClipPlane(0, clipPlane); if ((thing->renderflags & RF_ZDOOMTRANS) && r_UseVanillaTransparency) args.SetStyle(LegacyRenderStyles[STYLE_Normal], 1.0f, thing->fillcolor, thing->Translation, tex, fullbrightSprite); else diff --git a/src/polyrenderer/scene/poly_sprite.h b/src/polyrenderer/scene/poly_sprite.h index ba4738c73..d036176d3 100644 --- a/src/polyrenderer/scene/poly_sprite.h +++ b/src/polyrenderer/scene/poly_sprite.h @@ -27,7 +27,7 @@ class RenderPolySprite { public: - void Render(PolyRenderThread *thread, const PolyClipPlane &clipPlane, AActor *thing, subsector_t *sub, uint32_t stencilValue, float t1, float t2); + void Render(PolyRenderThread *thread, AActor *thing, subsector_t *sub, uint32_t stencilValue, float t1, float t2); static bool GetLine(AActor *thing, DVector2 &left, DVector2 &right); static bool IsThingCulled(AActor *thing); @@ -45,17 +45,17 @@ class PolyTranslucentThing : public PolyTranslucentObject public: PolyTranslucentThing(AActor *thing, subsector_t *sub, uint32_t subsectorDepth, double dist, float t1, float t2, uint32_t stencilValue) : PolyTranslucentObject(subsectorDepth, dist), thing(thing), sub(sub), SpriteLeft(t1), SpriteRight(t2), StencilValue(stencilValue) { } - void Render(PolyRenderThread *thread, const PolyClipPlane &portalPlane) override + void Render(PolyRenderThread *thread) override { if ((thing->renderflags & RF_SPRITETYPEMASK) == RF_WALLSPRITE) { RenderPolyWallSprite wallspr; - wallspr.Render(thread, portalPlane, thing, sub, StencilValue + 1); + wallspr.Render(thread, thing, sub, StencilValue + 1); } else { RenderPolySprite spr; - spr.Render(thread, portalPlane, thing, sub, StencilValue + 1, SpriteLeft, SpriteRight); + spr.Render(thread, thing, sub, StencilValue + 1, SpriteLeft, SpriteRight); } } diff --git a/src/polyrenderer/scene/poly_wall.cpp b/src/polyrenderer/scene/poly_wall.cpp index 0a219b7d5..2fd7bed17 100644 --- a/src/polyrenderer/scene/poly_wall.cpp +++ b/src/polyrenderer/scene/poly_wall.cpp @@ -40,7 +40,7 @@ EXTERN_CVAR(Bool, r_drawmirrors) EXTERN_CVAR(Bool, r_fogboundary) -bool RenderPolyWall::RenderLine(PolyRenderThread *thread, const PolyClipPlane &clipPlane, seg_t *line, sector_t *frontsector, uint32_t subsectorDepth, uint32_t stencilValue, std::vector &translucentWallsOutput, std::vector> &linePortals, size_t linePortalsStart, line_t *portalEnterLine) +bool RenderPolyWall::RenderLine(PolyRenderThread *thread, seg_t *line, sector_t *frontsector, uint32_t subsectorDepth, uint32_t stencilValue, std::vector &translucentWallsOutput, std::vector> &linePortals, size_t linePortalsStart, line_t *portalEnterLine) { double frontceilz1 = frontsector->ceilingplane.ZatPoint(line->v1); double frontfloorz1 = frontsector->floorplane.ZatPoint(line->v1); @@ -52,9 +52,7 @@ bool RenderPolyWall::RenderLine(PolyRenderThread *thread, const PolyClipPlane &c PolyDrawLinePortal *polyportal = nullptr; if (line->backsector == nullptr && line->linedef && line->sidedef == line->linedef->sidedef[0] && (line->linedef->special == Line_Mirror && r_drawmirrors)) { - if (portalEnterLine == line->linedef || - (line->linedef->v1->fX() * clipPlane.A + line->linedef->v1->fY() * clipPlane.B + clipPlane.D <= 0.0f) || - (line->linedef->v2->fX() * clipPlane.A + line->linedef->v2->fY() * clipPlane.B + clipPlane.D <= 0.0f)) + if (portalEnterLine == line->linedef) { return false; } @@ -64,9 +62,7 @@ bool RenderPolyWall::RenderLine(PolyRenderThread *thread, const PolyClipPlane &c } else if (line->linedef && line->linedef->isVisualPortal()) { - if (portalEnterLine == line->linedef || - (line->linedef->v1->fX() * clipPlane.A + line->linedef->v1->fY() * clipPlane.B + clipPlane.D <= 0.0f) || - (line->linedef->v2->fX() * clipPlane.A + line->linedef->v2->fY() * clipPlane.B + clipPlane.D <= 0.0f)) + if (portalEnterLine == line->linedef) { return false; } @@ -108,7 +104,7 @@ bool RenderPolyWall::RenderLine(PolyRenderThread *thread, const PolyClipPlane &c wall.Wallpart = side_t::mid; wall.Texture = GetTexture(wall.Line, wall.Side, side_t::mid); wall.Polyportal = polyportal; - wall.Render(thread, clipPlane); + wall.Render(thread); return true; } } @@ -145,7 +141,7 @@ bool RenderPolyWall::RenderLine(PolyRenderThread *thread, const PolyClipPlane &c wall.BottomTexZ = MIN(MIN(backceilz1, frontceilz1), MIN(backceilz2, frontceilz2)); wall.Wallpart = side_t::top; wall.Texture = GetTexture(wall.Line, wall.Side, side_t::top); - wall.Render(thread, clipPlane); + wall.Render(thread); } if ((bottomfloorz1 < bottomceilz1 || bottomfloorz2 < bottomceilz2) && line->sidedef && !bothSkyFloor) @@ -157,7 +153,7 @@ bool RenderPolyWall::RenderLine(PolyRenderThread *thread, const PolyClipPlane &c wall.UnpeggedCeil2 = topceilz2; wall.Wallpart = side_t::bottom; wall.Texture = GetTexture(wall.Line, wall.Side, side_t::bottom); - wall.Render(thread, clipPlane); + wall.Render(thread); } if (line->sidedef) @@ -179,7 +175,7 @@ bool RenderPolyWall::RenderLine(PolyRenderThread *thread, const PolyClipPlane &c if (polyportal) { wall.Polyportal = polyportal; - wall.Render(thread, clipPlane); + wall.Render(thread); } } } @@ -193,7 +189,7 @@ bool RenderPolyWall::IsFogBoundary(sector_t *front, sector_t *back) (front->GetTexture(sector_t::ceiling) != skyflatnum || back->GetTexture(sector_t::ceiling) != skyflatnum); } -void RenderPolyWall::Render3DFloorLine(PolyRenderThread *thread, const PolyClipPlane &clipPlane, seg_t *line, sector_t *frontsector, uint32_t subsectorDepth, uint32_t stencilValue, F3DFloor *fakeFloor, std::vector &translucentWallsOutput) +void RenderPolyWall::Render3DFloorLine(PolyRenderThread *thread, seg_t *line, sector_t *frontsector, uint32_t subsectorDepth, uint32_t stencilValue, F3DFloor *fakeFloor, std::vector &translucentWallsOutput) { if (!(fakeFloor->flags & FF_EXISTS)) return; if (!(fakeFloor->flags & FF_RENDERPLANES)) return; @@ -243,7 +239,7 @@ void RenderPolyWall::Render3DFloorLine(PolyRenderThread *thread, const PolyClipP wall.Texture = GetTexture(wall.Line, wall.Side, side_t::mid); if (!wall.Masked) - wall.Render(thread, clipPlane); + wall.Render(thread); else translucentWallsOutput.push_back(thread->FrameMemory->NewObject(wall)); } @@ -258,7 +254,7 @@ void RenderPolyWall::SetCoords(const DVector2 &v1, const DVector2 &v2, double ce this->floor2 = floor2; } -void RenderPolyWall::Render(PolyRenderThread *thread, const PolyClipPlane &clipPlane) +void RenderPolyWall::Render(PolyRenderThread *thread) { bool foggy = false; if (!Texture && !Polyportal && !FogBoundary) @@ -324,7 +320,6 @@ void RenderPolyWall::Render(PolyRenderThread *thread, const PolyClipPlane &clipP args.SetLight(Colormap, GetLightLevel(), PolyRenderer::Instance()->Light.WallGlobVis(foggy), false); if (Texture && !Polyportal) args.SetTexture(Texture, DefaultRenderStyle()); - args.SetClipPlane(0, clipPlane); SetDynLights(thread, args); @@ -369,7 +364,7 @@ void RenderPolyWall::Render(PolyRenderThread *thread, const PolyClipPlane &clipP DrawStripes(thread, args, vertices); } - RenderPolyDecal::RenderWallDecals(thread, clipPlane, LineSeg, StencilValue + 1); + RenderPolyDecal::RenderWallDecals(thread, LineSeg, StencilValue + 1); } void RenderPolyWall::SetDynLights(PolyRenderThread *thread, PolyDrawArgs &args) diff --git a/src/polyrenderer/scene/poly_wall.h b/src/polyrenderer/scene/poly_wall.h index c74156890..4bd5d6617 100644 --- a/src/polyrenderer/scene/poly_wall.h +++ b/src/polyrenderer/scene/poly_wall.h @@ -31,11 +31,11 @@ class PolyCull; class RenderPolyWall { public: - static bool RenderLine(PolyRenderThread *thread, const PolyClipPlane &clipPlane, seg_t *line, sector_t *frontsector, uint32_t subsectorDepth, uint32_t stencilValue, std::vector &translucentWallsOutput, std::vector> &linePortals, size_t linePortalsStart, line_t *portalEnterLine); - static void Render3DFloorLine(PolyRenderThread *thread, const PolyClipPlane &clipPlane, seg_t *line, sector_t *frontsector, uint32_t subsectorDepth, uint32_t stencilValue, F3DFloor *fakeFloor, std::vector &translucentWallsOutput); + static bool RenderLine(PolyRenderThread *thread, seg_t *line, sector_t *frontsector, uint32_t subsectorDepth, uint32_t stencilValue, std::vector &translucentWallsOutput, std::vector> &linePortals, size_t linePortalsStart, line_t *portalEnterLine); + static void Render3DFloorLine(PolyRenderThread *thread, seg_t *line, sector_t *frontsector, uint32_t subsectorDepth, uint32_t stencilValue, F3DFloor *fakeFloor, std::vector &translucentWallsOutput); void SetCoords(const DVector2 &v1, const DVector2 &v2, double ceil1, double floor1, double ceil2, double floor2); - void Render(PolyRenderThread *thread, const PolyClipPlane &clipPlane); + void Render(PolyRenderThread *thread); DVector2 v1; DVector2 v2; @@ -101,9 +101,9 @@ class PolyTranslucentWall : public PolyTranslucentObject public: PolyTranslucentWall(RenderPolyWall wall) : PolyTranslucentObject(wall.SubsectorDepth, 1e6), wall(wall) { } - void Render(PolyRenderThread *thread, const PolyClipPlane &portalPlane) override + void Render(PolyRenderThread *thread) override { - wall.Render(thread, portalPlane); + wall.Render(thread); } RenderPolyWall wall; diff --git a/src/polyrenderer/scene/poly_wallsprite.cpp b/src/polyrenderer/scene/poly_wallsprite.cpp index f46ce331a..cf4b3ae16 100644 --- a/src/polyrenderer/scene/poly_wallsprite.cpp +++ b/src/polyrenderer/scene/poly_wallsprite.cpp @@ -30,7 +30,7 @@ #include "polyrenderer/scene/poly_light.h" #include "polyrenderer/poly_renderthread.h" -void RenderPolyWallSprite::Render(PolyRenderThread *thread, const PolyClipPlane &clipPlane, AActor *thing, subsector_t *sub, uint32_t stencilValue) +void RenderPolyWallSprite::Render(PolyRenderThread *thread, AActor *thing, subsector_t *sub, uint32_t stencilValue) { if (RenderPolySprite::IsThingCulled(thing)) return; @@ -104,7 +104,6 @@ void RenderPolyWallSprite::Render(PolyRenderThread *thread, const PolyClipPlane args.SetLight(GetColorTable(sub->sector->Colormap, sub->sector->SpecialColors[sector_t::sprites], true), lightlevel, PolyRenderer::Instance()->Light.WallGlobVis(foggy), fullbrightSprite); args.SetStencilTestValue(stencilValue); args.SetTexture(tex, thing->RenderStyle); - args.SetClipPlane(0, clipPlane); args.SetDepthTest(true); args.SetWriteDepth(false); args.SetWriteStencil(false); diff --git a/src/polyrenderer/scene/poly_wallsprite.h b/src/polyrenderer/scene/poly_wallsprite.h index aa3461ccd..d50223f11 100644 --- a/src/polyrenderer/scene/poly_wallsprite.h +++ b/src/polyrenderer/scene/poly_wallsprite.h @@ -27,5 +27,5 @@ class RenderPolyWallSprite { public: - void Render(PolyRenderThread *thread, const PolyClipPlane &clipPlane, AActor *thing, subsector_t *sub, uint32_t stencilValue); + void Render(PolyRenderThread *thread, AActor *thing, subsector_t *sub, uint32_t stencilValue); }; From a803b3d393e9973c8d7a44bb3f0a02d0336d4fef Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Tue, 24 Apr 2018 10:30:26 +0200 Subject: [PATCH 4/8] Split FDrawInfo in two Done so that the entire gl_renderhacks.cpp file can be moved out of the GL folder. Not cleaned up yet --- src/gl/renderer/gl_renderer.h | 10 +- src/gl/scene/gl_drawinfo.cpp | 12 +++ src/gl/scene/gl_drawinfo.h | 173 ++++++++++++++++++-------------- src/gl/scene/gl_renderhacks.cpp | 96 +++++++++--------- src/gl/scene/gl_scene.cpp | 4 +- 5 files changed, 157 insertions(+), 138 deletions(-) diff --git a/src/gl/renderer/gl_renderer.h b/src/gl/renderer/gl_renderer.h index fa87ada0a..c65314a61 100644 --- a/src/gl/renderer/gl_renderer.h +++ b/src/gl/renderer/gl_renderer.h @@ -234,13 +234,7 @@ public: static float GetZFar() { return 65536.f; } }; -enum area_t -{ - area_normal, - area_below, - area_above, - area_default -}; +enum area_t : int; // Global functions. Make them members of GLRenderer later? @@ -257,4 +251,4 @@ struct TexFilter_s extern FGLRenderer *GLRenderer; -#endif \ No newline at end of file +#endif diff --git a/src/gl/scene/gl_drawinfo.cpp b/src/gl/scene/gl_drawinfo.cpp index d87166361..9ea7aae9a 100644 --- a/src/gl/scene/gl_drawinfo.cpp +++ b/src/gl/scene/gl_drawinfo.cpp @@ -1307,3 +1307,15 @@ void FDrawInfo::FloodLowerGap(seg_t * seg) // Step3: Delete the stencil ClearFloodStencil(&ws); } + +// This was temporarily moved out of gl_renderhacks.cpp so that the dependency on GLWall could be eliminated until things have progressed a bit. +void FDrawInfo::ProcessLowerMinisegs(TArray &lowersegs) +{ + for(unsigned int j=0;jSubsector->render_sector, seg->PartnerSeg->Subsector->render_sector); + rendered_lines++; + } +} diff --git a/src/gl/scene/gl_drawinfo.h b/src/gl/scene/gl_drawinfo.h index 0a1ebf35f..fbb2f796f 100644 --- a/src/gl/scene/gl_drawinfo.h +++ b/src/gl/scene/gl_drawinfo.h @@ -18,10 +18,10 @@ enum DrawListType GLDL_MASKEDFLATS, GLDL_MASKEDWALLSOFS, GLDL_MODELS, - + GLDL_TRANSLUCENT, GLDL_TRANSLUCENTBORDER, - + GLDL_TYPES, }; @@ -31,16 +31,16 @@ enum DLDrawListType // These are organized so that the various multipass rendering modes have to be set as few times as possible GLLDL_WALLS_PLAIN, // dynamic lights on normal walls GLLDL_WALLS_MASKED, // dynamic lights on masked midtextures - + GLLDL_FLATS_PLAIN, // dynamic lights on normal flats GLLDL_FLATS_MASKED, // dynamic lights on masked flats - + GLLDL_WALLS_FOG, // lights on fogged walls GLLDL_WALLS_FOGMASKED, // lights on fogged masked midtextures - + GLLDL_FLATS_FOG, // lights on fogged walls GLLDL_FLATS_FOGMASKED, // lights on fogged masked midtextures - + GLLDL_TYPES, }; @@ -52,7 +52,7 @@ enum Drawpasses GLPASS_PLAIN, // Main pass without dynamic lights GLPASS_DECALS, // Draws a decal GLPASS_TRANSLUCENT, // Draws translucent objects - + // these are only used with texture based dynamic lights GLPASS_BASE, // untextured base for dynamic lights GLPASS_BASE_MASKED, // same but with active texture @@ -60,7 +60,7 @@ enum Drawpasses GLPASS_TEXONLY, // finishing texture pass GLPASS_LIGHTTEX_ADDITIVE, // lighttexture pass (additive) GLPASS_LIGHTTEX_FOGGY, // lighttexture pass on foggy surfaces (forces all lights to be additive) - + }; //========================================================================== @@ -76,7 +76,7 @@ struct GLDrawItem { GLDrawItemType rendertype; int index; - + GLDrawItem(GLDrawItemType _rendertype,int _index) : rendertype(_rendertype),index(_index) {} }; @@ -88,8 +88,8 @@ struct SortNode SortNode * left; // left side of this node SortNode * equal; // equal to this node SortNode * right; // right side of this node - - + + void UnlinkFromChain(); void Link(SortNode * hook); void AddToEqual(SortNode * newnode); @@ -105,14 +105,14 @@ struct SortNode struct GLDrawList { -//private: + //private: TArray walls; TArray flats; TArray sprites; TArray drawitems; int SortNodeStart; SortNode * sorted; - + public: GLDrawList() { @@ -120,25 +120,25 @@ public: SortNodeStart=-1; sorted=NULL; } - + ~GLDrawList() { Reset(); } - + unsigned int Size() { return drawitems.Size(); } - + GLWall *NewWall(); GLFlat *NewFlat(); GLSprite *NewSprite(); void Reset(); void SortWalls(); void SortFlats(); - - + + void MakeSortList(); SortNode * FindSortPlane(SortNode * head); SortNode * FindSortWall(SortNode * head); @@ -174,18 +174,23 @@ struct gl_subsectorrendernode subsector_t * sub; }; - -struct FDrawInfo +enum area_t : int { + area_normal, + area_below, + area_above, + area_default +}; + +struct HWDrawInfo +{ + virtual ~HWDrawInfo() {} + struct wallseg { float x1, y1, z1, x2, y2, z2; }; - - bool temporary; - - - + struct MissingTextureInfo { seg_t * seg; @@ -193,93 +198,107 @@ struct FDrawInfo float Planez; float Planezfront; }; - + struct MissingSegInfo { seg_t * seg; - int MTI_Index; // tells us which MissingTextureInfo represents this seg. + int MTI_Index; // tells us which MissingTextureInfo represents this seg. }; - + struct SubsectorHackInfo { subsector_t * sub; uint8_t flags; }; - - GLSceneDrawer *mDrawer; - + + TArray MissingUpperTextures; + TArray MissingLowerTextures; + + TArray MissingUpperSegs; + TArray MissingLowerSegs; + + TArray SubsectorHacks; + + TArray otherfloorplanes; + TArray otherceilingplanes; + + TArray CeilingStacks; + TArray FloorStacks; + + TArray HandledSubsectors; + TArray sectorrenderflags; TArray ss_renderflags; TArray no_renderflags; - - TArray MissingUpperTextures; - TArray MissingLowerTextures; - - TArray MissingUpperSegs; - TArray MissingLowerSegs; - - TArray SubsectorHacks; - - TArray otherfloorplanes; - TArray otherceilingplanes; - - TArray CeilingStacks; - TArray FloorStacks; - - TArray HandledSubsectors; - - FDrawInfo * next; - GLDrawList drawlists[GLDL_TYPES]; - GLDrawList *dldrawlists = NULL; // only gets allocated when needed. - - FDrawInfo(); - ~FDrawInfo(); + + void ClearBuffers(); - - void AddWall(GLWall *wall); - bool PutWallCompat(GLWall *wall, int passflag); // Legacy GL only. - - bool DoOneSectorUpper(subsector_t * subsec, float planez); - bool DoOneSectorLower(subsector_t * subsec, float planez); - bool DoFakeBridge(subsector_t * subsec, float planez); - bool DoFakeCeilingBridge(subsector_t * subsec, float planez); - + + bool DoOneSectorUpper(subsector_t * subsec, float planez, area_t in_area); + bool DoOneSectorLower(subsector_t * subsec, float planez, area_t in_area); + bool DoFakeBridge(subsector_t * subsec, float planez, area_t in_area); + bool DoFakeCeilingBridge(subsector_t * subsec, float planez, area_t in_area); + bool CheckAnchorFloor(subsector_t * sub); bool CollectSubsectorsFloor(subsector_t * sub, sector_t * anchor); bool CheckAnchorCeiling(subsector_t * sub); bool CollectSubsectorsCeiling(subsector_t * sub, sector_t * anchor); - void CollectSectorStacksCeiling(subsector_t * sub, sector_t * anchor); - void CollectSectorStacksFloor(subsector_t * sub, sector_t * anchor); - + void CollectSectorStacksCeiling(subsector_t * sub, sector_t * anchor, area_t in_area); + void CollectSectorStacksFloor(subsector_t * sub, sector_t * anchor, area_t in_area); + void AddUpperMissingTexture(side_t * side, subsector_t *sub, float backheight); void AddLowerMissingTexture(side_t * side, subsector_t *sub, float backheight); - void HandleMissingTextures(); + void HandleMissingTextures(area_t in_area); void DrawUnhandledMissingTextures(); void AddHackedSubsector(subsector_t * sub); void HandleHackedSubsectors(); void AddFloorStack(sector_t * sec); void AddCeilingStack(sector_t * sec); - void ProcessSectorStacks(); - + void ProcessSectorStacks(area_t in_area); + void AddOtherFloorPlane(int sector, gl_subsectorrendernode * node); void AddOtherCeilingPlane(int sector, gl_subsectorrendernode * node); + + virtual void FloodUpperGap(seg_t * seg) = 0; + virtual void FloodLowerGap(seg_t * seg) = 0; + virtual void ProcessLowerMinisegs(TArray &lowersegs) = 0; + +}; +struct FDrawInfo : public HWDrawInfo +{ + + GLSceneDrawer *mDrawer; + + + FDrawInfo * next; + GLDrawList drawlists[GLDL_TYPES]; + GLDrawList *dldrawlists = NULL; // only gets allocated when needed. + + FDrawInfo(); + ~FDrawInfo(); + + void AddWall(GLWall *wall); + bool PutWallCompat(GLWall *wall, int passflag); // Legacy GL only. + + void StartScene(); void SetupFloodStencil(wallseg * ws); void ClearFloodStencil(wallseg * ws); void DrawFloodedPlane(wallseg * ws, float planez, sector_t * sec, bool ceiling); - void FloodUpperGap(seg_t * seg); - void FloodLowerGap(seg_t * seg); - + void FloodUpperGap(seg_t * seg) override; + void FloodLowerGap(seg_t * seg) override; + void ProcessLowerMinisegs(TArray &lowersegs) override; + static void StartDrawInfo(GLSceneDrawer *drawer); static void EndDrawInfo(); - + gl_subsectorrendernode * GetOtherFloorPlanes(unsigned int sector) { if (sector mList; - + public: - + FDrawInfo *GetNew(); void Release(FDrawInfo *); }; @@ -303,4 +322,4 @@ extern FDrawInfo * gl_drawinfo; void gl_SetPlaneTextureRotation(const GLSectorPlane * secplane, FMaterial * gltexture); void gl_SetRenderStyle(FRenderStyle style, bool drawopaque, bool allowcolorblending); -#endif \ No newline at end of file +#endif diff --git a/src/gl/scene/gl_renderhacks.cpp b/src/gl/scene/gl_renderhacks.cpp index fff839c5e..9c1b1eb17 100644 --- a/src/gl/scene/gl_renderhacks.cpp +++ b/src/gl/scene/gl_renderhacks.cpp @@ -55,7 +55,7 @@ static subsector_t * viewsubsector; static TArray lowersegs; -void FDrawInfo::ClearBuffers() +void HWDrawInfo::ClearBuffers() { for(unsigned int i=0;i< otherfloorplanes.Size();i++) { @@ -98,7 +98,7 @@ void FDrawInfo::ClearBuffers() // //========================================================================== -void FDrawInfo::AddOtherFloorPlane(int sector, gl_subsectorrendernode * node) +void HWDrawInfo::AddOtherFloorPlane(int sector, gl_subsectorrendernode * node) { int oldcnt = otherfloorplanes.Size(); @@ -111,7 +111,7 @@ void FDrawInfo::AddOtherFloorPlane(int sector, gl_subsectorrendernode * node) otherfloorplanes[sector] = node; } -void FDrawInfo::AddOtherCeilingPlane(int sector, gl_subsectorrendernode * node) +void HWDrawInfo::AddOtherCeilingPlane(int sector, gl_subsectorrendernode * node) { int oldcnt = otherceilingplanes.Size(); @@ -130,7 +130,7 @@ void FDrawInfo::AddOtherCeilingPlane(int sector, gl_subsectorrendernode * node) // Collects all sectors that might need a fake ceiling // //========================================================================== -void FDrawInfo::AddUpperMissingTexture(side_t * side, subsector_t *sub, float Backheight) +void HWDrawInfo::AddUpperMissingTexture(side_t * side, subsector_t *sub, float Backheight) { if (!side->segs[0]->backsector) return; @@ -186,7 +186,7 @@ void FDrawInfo::AddUpperMissingTexture(side_t * side, subsector_t *sub, float Ba // Collects all sectors that might need a fake floor // //========================================================================== -void FDrawInfo::AddLowerMissingTexture(side_t * side, subsector_t *sub, float Backheight) +void HWDrawInfo::AddLowerMissingTexture(side_t * side, subsector_t *sub, float Backheight) { sector_t *backsec = side->segs[0]->backsector; if (!backsec) return; @@ -259,7 +259,7 @@ void FDrawInfo::AddLowerMissingTexture(side_t * side, subsector_t *sub, float Ba // // //========================================================================== -bool FDrawInfo::DoOneSectorUpper(subsector_t * subsec, float Planez) +bool HWDrawInfo::DoOneSectorUpper(subsector_t * subsec, float Planez, area_t in_area) { // Is there a one-sided wall in this sector? // Do this first to avoid unnecessary recursion @@ -283,7 +283,7 @@ bool FDrawInfo::DoOneSectorUpper(subsector_t * subsec, float Planez) // Note: if this is a real line between sectors // we can be sure that render_sector is the real sector! - sector_t * sec = gl_FakeFlat(seg->backsector, &fakesec, mDrawer->in_area, true); + sector_t * sec = gl_FakeFlat(seg->backsector, &fakesec, in_area, true); // Don't bother with slopes if (sec->ceilingplane.isSlope()) return false; @@ -304,7 +304,7 @@ bool FDrawInfo::DoOneSectorUpper(subsector_t * subsec, float Planez) else return false; } } - if (!DoOneSectorUpper(backsub, Planez)) return false; + if (!DoOneSectorUpper(backsub, Planez, in_area)) return false; } // all checked ok. This subsector is part of the current fake plane @@ -317,7 +317,7 @@ bool FDrawInfo::DoOneSectorUpper(subsector_t * subsec, float Planez) // // //========================================================================== -bool FDrawInfo::DoOneSectorLower(subsector_t * subsec, float Planez) +bool HWDrawInfo::DoOneSectorLower(subsector_t * subsec, float Planez, area_t in_area) { // Is there a one-sided wall in this subsector? // Do this first to avoid unnecessary recursion @@ -341,7 +341,7 @@ bool FDrawInfo::DoOneSectorLower(subsector_t * subsec, float Planez) // Note: if this is a real line between sectors // we can be sure that render_sector is the real sector! - sector_t * sec = gl_FakeFlat(seg->backsector, &fakesec, mDrawer->in_area, true); + sector_t * sec = gl_FakeFlat(seg->backsector, &fakesec, in_area, true); // Don't bother with slopes if (sec->floorplane.isSlope()) return false; @@ -362,7 +362,7 @@ bool FDrawInfo::DoOneSectorLower(subsector_t * subsec, float Planez) else return false; } } - if (!DoOneSectorLower(backsub, Planez)) return false; + if (!DoOneSectorLower(backsub, Planez, in_area)) return false; } // all checked ok. This sector is part of the current fake plane @@ -376,7 +376,7 @@ bool FDrawInfo::DoOneSectorLower(subsector_t * subsec, float Planez) // // //========================================================================== -bool FDrawInfo::DoFakeBridge(subsector_t * subsec, float Planez) +bool HWDrawInfo::DoFakeBridge(subsector_t * subsec, float Planez, area_t in_area) { // Is there a one-sided wall in this sector? // Do this first to avoid unnecessary recursion @@ -400,7 +400,7 @@ bool FDrawInfo::DoFakeBridge(subsector_t * subsec, float Planez) // Note: if this is a real line between sectors // we can be sure that render_sector is the real sector! - sector_t * sec = gl_FakeFlat(seg->backsector, &fakesec, mDrawer->in_area, true); + sector_t * sec = gl_FakeFlat(seg->backsector, &fakesec, in_area, true); // Don't bother with slopes if (sec->floorplane.isSlope()) return false; @@ -416,7 +416,7 @@ bool FDrawInfo::DoFakeBridge(subsector_t * subsec, float Planez) // No texture checks though! if (sec->GetPlaneTexZ(sector_t::floor) == Planez) continue; } - if (!DoFakeBridge(backsub, Planez)) return false; + if (!DoFakeBridge(backsub, Planez, in_area)) return false; } // all checked ok. This sector is part of the current fake plane @@ -429,7 +429,7 @@ bool FDrawInfo::DoFakeBridge(subsector_t * subsec, float Planez) // // //========================================================================== -bool FDrawInfo::DoFakeCeilingBridge(subsector_t * subsec, float Planez) +bool HWDrawInfo::DoFakeCeilingBridge(subsector_t * subsec, float Planez, area_t in_area) { // Is there a one-sided wall in this sector? // Do this first to avoid unnecessary recursion @@ -453,7 +453,7 @@ bool FDrawInfo::DoFakeCeilingBridge(subsector_t * subsec, float Planez) // Note: if this is a real line between sectors // we can be sure that render_sector is the real sector! - sector_t * sec = gl_FakeFlat(seg->backsector, &fakesec, mDrawer->in_area, true); + sector_t * sec = gl_FakeFlat(seg->backsector, &fakesec, in_area, true); // Don't bother with slopes if (sec->ceilingplane.isSlope()) return false; @@ -469,7 +469,7 @@ bool FDrawInfo::DoFakeCeilingBridge(subsector_t * subsec, float Planez) // No texture checks though! if (sec->GetPlaneTexZ(sector_t::ceiling) == Planez) continue; } - if (!DoFakeCeilingBridge(backsub, Planez)) return false; + if (!DoFakeCeilingBridge(backsub, Planez, in_area)) return false; } // all checked ok. This sector is part of the current fake plane @@ -483,7 +483,7 @@ bool FDrawInfo::DoFakeCeilingBridge(subsector_t * subsec, float Planez) // Draws the fake planes // //========================================================================== -void FDrawInfo::HandleMissingTextures() +void HWDrawInfo::HandleMissingTextures(area_t in_area) { sector_t fake; totalms.Clock(); @@ -501,7 +501,7 @@ void FDrawInfo::HandleMissingTextures() // close the hole only if all neighboring sectors are an exact height match // Otherwise just fill in the missing textures. MissingUpperTextures[i].sub->validcount = validcount; - if (DoOneSectorUpper(MissingUpperTextures[i].sub, MissingUpperTextures[i].Planez)) + if (DoOneSectorUpper(MissingUpperTextures[i].sub, MissingUpperTextures[i].Planez, in_area)) { sector_t * sec = MissingUpperTextures[i].seg->backsector; // The mere fact that this seg has been added to the list means that the back sector @@ -542,11 +542,11 @@ void FDrawInfo::HandleMissingTextures() { // It isn't a hole. Now check whether it might be a fake bridge - sector_t * fakesector = gl_FakeFlat(MissingUpperTextures[i].seg->frontsector, &fake, mDrawer->in_area, false); + sector_t * fakesector = gl_FakeFlat(MissingUpperTextures[i].seg->frontsector, &fake, in_area, false); float planez = (float)fakesector->GetPlaneTexZ(sector_t::ceiling); backsub->validcount = validcount; - if (DoFakeCeilingBridge(backsub, planez)) + if (DoFakeCeilingBridge(backsub, planez, in_area)) { // The mere fact that this seg has been added to the list means that the back sector // will be rendered so we can safely assume that it is already in the render list @@ -573,7 +573,7 @@ void FDrawInfo::HandleMissingTextures() // close the hole only if all neighboring sectors are an exact height match // Otherwise just fill in the missing textures. MissingLowerTextures[i].sub->validcount = validcount; - if (DoOneSectorLower(MissingLowerTextures[i].sub, MissingLowerTextures[i].Planez)) + if (DoOneSectorLower(MissingLowerTextures[i].sub, MissingLowerTextures[i].Planez, in_area)) { sector_t * sec = MissingLowerTextures[i].seg->backsector; // The mere fact that this seg has been added to the list means that the back sector @@ -613,11 +613,11 @@ void FDrawInfo::HandleMissingTextures() { // It isn't a hole. Now check whether it might be a fake bridge - sector_t * fakesector = gl_FakeFlat(MissingLowerTextures[i].seg->frontsector, &fake, mDrawer->in_area, false); + sector_t * fakesector = gl_FakeFlat(MissingLowerTextures[i].seg->frontsector, &fake, in_area, false); float planez = (float)fakesector->GetPlaneTexZ(sector_t::floor); backsub->validcount = validcount; - if (DoFakeBridge(backsub, planez)) + if (DoFakeBridge(backsub, planez, in_area)) { // The mere fact that this seg has been added to the list means that the back sector // will be rendered so we can safely assume that it is already in the render list @@ -645,7 +645,7 @@ void FDrawInfo::HandleMissingTextures() // //========================================================================== -void FDrawInfo::DrawUnhandledMissingTextures() +void HWDrawInfo::DrawUnhandledMissingTextures() { validcount++; for (int i = MissingUpperSegs.Size() - 1; i >= 0; i--) @@ -714,7 +714,7 @@ ADD_STAT(missingtextures) // //========================================================================== -void FDrawInfo::AddHackedSubsector(subsector_t * sub) +void HWDrawInfo::AddHackedSubsector(subsector_t * sub) { if (!(level.maptype == MAPTYPE_HEXEN)) { @@ -729,7 +729,7 @@ void FDrawInfo::AddHackedSubsector(subsector_t * sub) // //========================================================================== -bool FDrawInfo::CheckAnchorFloor(subsector_t * sub) +bool HWDrawInfo::CheckAnchorFloor(subsector_t * sub) { // This subsector has a one sided wall and can be used. if (sub->hacked==3) return true; @@ -768,7 +768,7 @@ bool FDrawInfo::CheckAnchorFloor(subsector_t * sub) // //========================================================================== -bool FDrawInfo::CollectSubsectorsFloor(subsector_t * sub, sector_t * anchor) +bool HWDrawInfo::CollectSubsectorsFloor(subsector_t * sub, sector_t * anchor) { // mark it checked @@ -832,7 +832,7 @@ bool FDrawInfo::CollectSubsectorsFloor(subsector_t * sub, sector_t * anchor) // //========================================================================== -bool FDrawInfo::CheckAnchorCeiling(subsector_t * sub) +bool HWDrawInfo::CheckAnchorCeiling(subsector_t * sub) { // This subsector has a one sided wall and can be used. if (sub->hacked==3) return true; @@ -871,7 +871,7 @@ bool FDrawInfo::CheckAnchorCeiling(subsector_t * sub) // //========================================================================== -bool FDrawInfo::CollectSubsectorsCeiling(subsector_t * sub, sector_t * anchor) +bool HWDrawInfo::CollectSubsectorsCeiling(subsector_t * sub, sector_t * anchor) { // mark it checked sub->validcount=validcount; @@ -931,7 +931,7 @@ bool FDrawInfo::CollectSubsectorsCeiling(subsector_t * sub, sector_t * anchor) // //========================================================================== -void FDrawInfo::HandleHackedSubsectors() +void HWDrawInfo::HandleHackedSubsectors() { lowershcount=uppershcount=0; totalssms.Reset(); @@ -959,13 +959,7 @@ void FDrawInfo::HandleHackedSubsectors() node->sub = HandledSubsectors[j]; AddOtherFloorPlane(sub->render_sector->sectornum, node); } - if (inview) for(unsigned int j=0;jSubsector->render_sector, seg->PartnerSeg->Subsector->render_sector); - rendered_lines++; - } + if (inview) ProcessLowerMinisegs(lowersegs); lowershcount+=HandledSubsectors.Size(); } } @@ -1014,12 +1008,12 @@ ADD_STAT(sectorhacks) // //========================================================================== -void FDrawInfo::AddFloorStack(sector_t * sec) +void HWDrawInfo::AddFloorStack(sector_t * sec) { FloorStacks.Push(sec); } -void FDrawInfo::AddCeilingStack(sector_t * sec) +void HWDrawInfo::AddCeilingStack(sector_t * sec) { CeilingStacks.Push(sec); } @@ -1030,7 +1024,7 @@ void FDrawInfo::AddCeilingStack(sector_t * sec) // //========================================================================== -void FDrawInfo::CollectSectorStacksCeiling(subsector_t * sub, sector_t * anchor) +void HWDrawInfo::CollectSectorStacksCeiling(subsector_t * sub, sector_t * anchor, area_t in_area) { // mark it checked sub->validcount=validcount; @@ -1042,7 +1036,7 @@ void FDrawInfo::CollectSectorStacksCeiling(subsector_t * sub, sector_t * anchor) if (sub->numlines>2 && !(ss_renderflags[sub->Index()]&SSRF_PROCESSED)) return; // Must be the exact same visplane - sector_t * me = gl_FakeFlat(sub->render_sector, &fakesec, mDrawer->in_area, false); + sector_t * me = gl_FakeFlat(sub->render_sector, &fakesec, in_area, false); if (me->GetTexture(sector_t::ceiling) != anchor->GetTexture(sector_t::ceiling) || me->ceilingplane != anchor->ceilingplane || me->GetCeilingLight() != anchor->GetCeilingLight() || @@ -1063,7 +1057,7 @@ void FDrawInfo::CollectSectorStacksCeiling(subsector_t * sub, sector_t * anchor) { subsector_t * backsub = seg->PartnerSeg->Subsector; - if (backsub->validcount!=validcount) CollectSectorStacksCeiling (backsub, anchor); + if (backsub->validcount!=validcount) CollectSectorStacksCeiling (backsub, anchor, in_area); } } } @@ -1074,7 +1068,7 @@ void FDrawInfo::CollectSectorStacksCeiling(subsector_t * sub, sector_t * anchor) // //========================================================================== -void FDrawInfo::CollectSectorStacksFloor(subsector_t * sub, sector_t * anchor) +void HWDrawInfo::CollectSectorStacksFloor(subsector_t * sub, sector_t * anchor, area_t in_area) { // mark it checked sub->validcount=validcount; @@ -1086,7 +1080,7 @@ void FDrawInfo::CollectSectorStacksFloor(subsector_t * sub, sector_t * anchor) if (sub->numlines>2 && !(ss_renderflags[sub->Index()]&SSRF_PROCESSED)) return; // Must be the exact same visplane - sector_t * me = gl_FakeFlat(sub->render_sector, &fakesec, mDrawer->in_area, false); + sector_t * me = gl_FakeFlat(sub->render_sector, &fakesec, in_area, false); if (me->GetTexture(sector_t::floor) != anchor->GetTexture(sector_t::floor) || me->floorplane != anchor->floorplane || me->GetFloorLight() != anchor->GetFloorLight() || @@ -1107,7 +1101,7 @@ void FDrawInfo::CollectSectorStacksFloor(subsector_t * sub, sector_t * anchor) { subsector_t * backsub = seg->PartnerSeg->Subsector; - if (backsub->validcount!=validcount) CollectSectorStacksFloor (backsub, anchor); + if (backsub->validcount!=validcount) CollectSectorStacksFloor (backsub, anchor, in_area); } } } @@ -1118,14 +1112,14 @@ void FDrawInfo::CollectSectorStacksFloor(subsector_t * sub, sector_t * anchor) // //========================================================================== -void FDrawInfo::ProcessSectorStacks() +void HWDrawInfo::ProcessSectorStacks(area_t in_area) { unsigned int i; validcount++; for (i=0;iin_area, false); + sector_t *sec = gl_FakeFlat(CeilingStacks[i], &fakesec, in_area, false); auto portal = sec->GetPortalGroup(sector_t::ceiling); if (portal != NULL) for(int k=0;ksubsectorcount;k++) { @@ -1140,7 +1134,7 @@ void FDrawInfo::ProcessSectorStacks() { subsector_t * backsub = seg->PartnerSeg->Subsector; - if (backsub->validcount!=validcount) CollectSectorStacksCeiling (backsub, sec); + if (backsub->validcount!=validcount) CollectSectorStacksCeiling (backsub, sec, in_area); } } for(unsigned int j=0;jin_area, false); + sector_t *sec = gl_FakeFlat(FloorStacks[i], &fakesec, in_area, false); auto portal = sec->GetPortalGroup(sector_t::floor); if (portal != NULL) for(int k=0;ksubsectorcount;k++) { @@ -1184,7 +1178,7 @@ void FDrawInfo::ProcessSectorStacks() { subsector_t * backsub = seg->PartnerSeg->Subsector; - if (backsub->validcount!=validcount) CollectSectorStacksFloor (backsub, sec); + if (backsub->validcount!=validcount) CollectSectorStacksFloor (backsub, sec, in_area); } } diff --git a/src/gl/scene/gl_scene.cpp b/src/gl/scene/gl_scene.cpp index 1b1f1d28b..3e9083037 100644 --- a/src/gl/scene/gl_scene.cpp +++ b/src/gl/scene/gl_scene.cpp @@ -269,9 +269,9 @@ void GLSceneDrawer::CreateScene() // These cannot be multithreaded when the time comes because all these depend // on the global 'validcount' variable. - gl_drawinfo->HandleMissingTextures(); // Missing upper/lower textures + gl_drawinfo->HandleMissingTextures(in_area); // Missing upper/lower textures gl_drawinfo->HandleHackedSubsectors(); // open sector hacks for deep water - gl_drawinfo->ProcessSectorStacks(); // merge visplanes of sector stacks + gl_drawinfo->ProcessSectorStacks(in_area); // merge visplanes of sector stacks GLRenderer->mVBO->Unmap(); ProcessAll.Unclock(); From dbb1492bf97d3f6fd87312c8895b168c3ffb6069 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Tue, 24 Apr 2018 11:52:15 +0200 Subject: [PATCH 5/8] Fully separated HWDrawInfo from GL dependencies. This also required temoporarily moving one small function because in the current state this cannot be done in the API independent part. --- src/gl/renderer/gl_renderer.h | 11 --- src/gl/scene/gl_drawinfo.cpp | 7 ++ src/gl/scene/gl_drawinfo.h | 108 ++-------------------------- src/gl/scene/gl_renderhacks.cpp | 13 ++-- src/gl/scene/hw_drawinfo.h | 121 ++++++++++++++++++++++++++++++++ 5 files changed, 138 insertions(+), 122 deletions(-) create mode 100644 src/gl/scene/hw_drawinfo.h diff --git a/src/gl/renderer/gl_renderer.h b/src/gl/renderer/gl_renderer.h index c65314a61..4ce050d05 100644 --- a/src/gl/renderer/gl_renderer.h +++ b/src/gl/renderer/gl_renderer.h @@ -57,17 +57,6 @@ inline float RAD2DEG(float deg) return deg * float(180. / M_PI); } -enum SectorRenderFlags -{ - // This is used to avoid creating too many drawinfos - SSRF_RENDERFLOOR = 1, - SSRF_RENDERCEILING = 2, - SSRF_RENDER3DPLANES = 4, - SSRF_RENDERALL = 7, - SSRF_PROCESSED = 8, - SSRF_SEEN = 16, -}; - struct GL_IRECT { int left,top; diff --git a/src/gl/scene/gl_drawinfo.cpp b/src/gl/scene/gl_drawinfo.cpp index 9ea7aae9a..2385730e8 100644 --- a/src/gl/scene/gl_drawinfo.cpp +++ b/src/gl/scene/gl_drawinfo.cpp @@ -1319,3 +1319,10 @@ void FDrawInfo::ProcessLowerMinisegs(TArray &lowersegs) rendered_lines++; } } + +// Same here for the dependency on the portal. +void FDrawInfo::AddSubsectorToPortal(FSectorPortalGroup *portal, subsector_t *sub) +{ + portal->GetRenderState()->AddSubsector(sub); +} + diff --git a/src/gl/scene/gl_drawinfo.h b/src/gl/scene/gl_drawinfo.h index fbb2f796f..5643fc90c 100644 --- a/src/gl/scene/gl_drawinfo.h +++ b/src/gl/scene/gl_drawinfo.h @@ -2,6 +2,7 @@ #define __GL_DRAWINFO_H #include "gl/scene/gl_wall.h" +#include "hw_drawinfo.h" enum GLDrawItemType { @@ -163,108 +164,6 @@ public: } ; -//========================================================================== -// -// these are used to link faked planes due to missing textures to a sector -// -//========================================================================== -struct gl_subsectorrendernode -{ - gl_subsectorrendernode * next; - subsector_t * sub; -}; - -enum area_t : int -{ - area_normal, - area_below, - area_above, - area_default -}; - -struct HWDrawInfo -{ - virtual ~HWDrawInfo() {} - - struct wallseg - { - float x1, y1, z1, x2, y2, z2; - }; - - struct MissingTextureInfo - { - seg_t * seg; - subsector_t * sub; - float Planez; - float Planezfront; - }; - - struct MissingSegInfo - { - seg_t * seg; - int MTI_Index; // tells us which MissingTextureInfo represents this seg. - }; - - struct SubsectorHackInfo - { - subsector_t * sub; - uint8_t flags; - }; - - TArray MissingUpperTextures; - TArray MissingLowerTextures; - - TArray MissingUpperSegs; - TArray MissingLowerSegs; - - TArray SubsectorHacks; - - TArray otherfloorplanes; - TArray otherceilingplanes; - - TArray CeilingStacks; - TArray FloorStacks; - - TArray HandledSubsectors; - - TArray sectorrenderflags; - TArray ss_renderflags; - TArray no_renderflags; - - - void ClearBuffers(); - - bool DoOneSectorUpper(subsector_t * subsec, float planez, area_t in_area); - bool DoOneSectorLower(subsector_t * subsec, float planez, area_t in_area); - bool DoFakeBridge(subsector_t * subsec, float planez, area_t in_area); - bool DoFakeCeilingBridge(subsector_t * subsec, float planez, area_t in_area); - - bool CheckAnchorFloor(subsector_t * sub); - bool CollectSubsectorsFloor(subsector_t * sub, sector_t * anchor); - bool CheckAnchorCeiling(subsector_t * sub); - bool CollectSubsectorsCeiling(subsector_t * sub, sector_t * anchor); - void CollectSectorStacksCeiling(subsector_t * sub, sector_t * anchor, area_t in_area); - void CollectSectorStacksFloor(subsector_t * sub, sector_t * anchor, area_t in_area); - - void AddUpperMissingTexture(side_t * side, subsector_t *sub, float backheight); - void AddLowerMissingTexture(side_t * side, subsector_t *sub, float backheight); - void HandleMissingTextures(area_t in_area); - void DrawUnhandledMissingTextures(); - void AddHackedSubsector(subsector_t * sub); - void HandleHackedSubsectors(); - void AddFloorStack(sector_t * sec); - void AddCeilingStack(sector_t * sec); - void ProcessSectorStacks(area_t in_area); - - void AddOtherFloorPlane(int sector, gl_subsectorrendernode * node); - void AddOtherCeilingPlane(int sector, gl_subsectorrendernode * node); - - virtual void FloodUpperGap(seg_t * seg) = 0; - virtual void FloodLowerGap(seg_t * seg) = 0; - virtual void ProcessLowerMinisegs(TArray &lowersegs) = 0; - -}; - struct FDrawInfo : public HWDrawInfo { @@ -288,8 +187,11 @@ struct FDrawInfo : public HWDrawInfo void DrawFloodedPlane(wallseg * ws, float planez, sector_t * sec, bool ceiling); void FloodUpperGap(seg_t * seg) override; void FloodLowerGap(seg_t * seg) override; - void ProcessLowerMinisegs(TArray &lowersegs) override; + // These two may be moved to the API independent part of the renderer later. + void ProcessLowerMinisegs(TArray &lowersegs) override; + void AddSubsectorToPortal(FSectorPortalGroup *portal, subsector_t *sub) override; + static void StartDrawInfo(GLSceneDrawer *drawer); static void EndDrawInfo(); diff --git a/src/gl/scene/gl_renderhacks.cpp b/src/gl/scene/gl_renderhacks.cpp index 9c1b1eb17..ad35195cd 100644 --- a/src/gl/scene/gl_renderhacks.cpp +++ b/src/gl/scene/gl_renderhacks.cpp @@ -27,17 +27,15 @@ #include "a_sharedglobal.h" #include "r_utility.h" -#include "r_defs.h" #include "r_sky.h" #include "g_level.h" #include "g_levellocals.h" -#include "gl/renderer/gl_renderer.h" -#include "gl/scene/gl_drawinfo.h" -#include "gl/scene/gl_portal.h" -#include "gl/scene/gl_scenedrawer.h" +#include "hw_drawinfo.h" #include "gl/utility/gl_clock.h" +sector_t * gl_FakeFlat(sector_t * sec, sector_t * dest, area_t in_area, bool back); + // This is for debugging maps. @@ -1147,7 +1145,7 @@ void HWDrawInfo::ProcessSectorStacks(area_t in_area) BuildPortalCoverage(&sub->portalcoverage[sector_t::ceiling], sub, portal->mDisplacement); } - portal->GetRenderState()->AddSubsector(sub); + AddSubsectorToPortal(portal, sub); if (sec->GetAlpha(sector_t::ceiling) != 0 && sec->GetTexture(sector_t::ceiling) != skyflatnum) { @@ -1192,8 +1190,7 @@ void HWDrawInfo::ProcessSectorStacks(area_t in_area) BuildPortalCoverage(&sub->portalcoverage[sector_t::floor], sub, portal->mDisplacement); } - GLSectorStackPortal *glportal = portal->GetRenderState(); - glportal->AddSubsector(sub); + AddSubsectorToPortal(portal, sub); if (sec->GetAlpha(sector_t::floor) != 0 && sec->GetTexture(sector_t::floor) != skyflatnum) { diff --git a/src/gl/scene/hw_drawinfo.h b/src/gl/scene/hw_drawinfo.h new file mode 100644 index 000000000..2bf3c0639 --- /dev/null +++ b/src/gl/scene/hw_drawinfo.h @@ -0,0 +1,121 @@ +#pragma once + +#include "r_defs.h" + +struct FSectorPortalGroup; + +//========================================================================== +// +// these are used to link faked planes due to missing textures to a sector +// +//========================================================================== +struct gl_subsectorrendernode +{ + gl_subsectorrendernode * next; + subsector_t * sub; +}; + +enum area_t : int +{ + area_normal, + area_below, + area_above, + area_default +}; + +enum SectorRenderFlags +{ + // This is used to merge several subsectors into a single draw item + SSRF_RENDERFLOOR = 1, + SSRF_RENDERCEILING = 2, + SSRF_RENDER3DPLANES = 4, + SSRF_RENDERALL = 7, + SSRF_PROCESSED = 8, + SSRF_SEEN = 16, +}; + + +struct HWDrawInfo +{ + virtual ~HWDrawInfo() {} + + struct wallseg + { + float x1, y1, z1, x2, y2, z2; + }; + + struct MissingTextureInfo + { + seg_t * seg; + subsector_t * sub; + float Planez; + float Planezfront; + }; + + struct MissingSegInfo + { + seg_t * seg; + int MTI_Index; // tells us which MissingTextureInfo represents this seg. + }; + + struct SubsectorHackInfo + { + subsector_t * sub; + uint8_t flags; + }; + + TArray MissingUpperTextures; + TArray MissingLowerTextures; + + TArray MissingUpperSegs; + TArray MissingLowerSegs; + + TArray SubsectorHacks; + + TArray otherfloorplanes; + TArray otherceilingplanes; + + TArray CeilingStacks; + TArray FloorStacks; + + TArray HandledSubsectors; + + TArray sectorrenderflags; + TArray ss_renderflags; + TArray no_renderflags; + + + void ClearBuffers(); + + bool DoOneSectorUpper(subsector_t * subsec, float planez, area_t in_area); + bool DoOneSectorLower(subsector_t * subsec, float planez, area_t in_area); + bool DoFakeBridge(subsector_t * subsec, float planez, area_t in_area); + bool DoFakeCeilingBridge(subsector_t * subsec, float planez, area_t in_area); + + bool CheckAnchorFloor(subsector_t * sub); + bool CollectSubsectorsFloor(subsector_t * sub, sector_t * anchor); + bool CheckAnchorCeiling(subsector_t * sub); + bool CollectSubsectorsCeiling(subsector_t * sub, sector_t * anchor); + void CollectSectorStacksCeiling(subsector_t * sub, sector_t * anchor, area_t in_area); + void CollectSectorStacksFloor(subsector_t * sub, sector_t * anchor, area_t in_area); + + void AddUpperMissingTexture(side_t * side, subsector_t *sub, float backheight); + void AddLowerMissingTexture(side_t * side, subsector_t *sub, float backheight); + void HandleMissingTextures(area_t in_area); + void DrawUnhandledMissingTextures(); + void AddHackedSubsector(subsector_t * sub); + void HandleHackedSubsectors(); + void AddFloorStack(sector_t * sec); + void AddCeilingStack(sector_t * sec); + void ProcessSectorStacks(area_t in_area); + + void AddOtherFloorPlane(int sector, gl_subsectorrendernode * node); + void AddOtherCeilingPlane(int sector, gl_subsectorrendernode * node); + + virtual void FloodUpperGap(seg_t * seg) = 0; + virtual void FloodLowerGap(seg_t * seg) = 0; + virtual void ProcessLowerMinisegs(TArray &lowersegs) = 0; + virtual void AddSubsectorToPortal(FSectorPortalGroup *portal, subsector_t *sub) = 0; + +}; + From 1c58093fc8ea75500c9f4e31a3fb417d7ecc28ac Mon Sep 17 00:00:00 2001 From: Kevin Caccamo Date: Sun, 22 Apr 2018 23:14:07 -0400 Subject: [PATCH 6/8] Add info about UseSpecial flag feature conflict above Actor.Used --- wadsrc/static/zscript/actor.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/wadsrc/static/zscript/actor.txt b/wadsrc/static/zscript/actor.txt index bec97eda3..61afdef0d 100644 --- a/wadsrc/static/zscript/actor.txt +++ b/wadsrc/static/zscript/actor.txt @@ -453,7 +453,9 @@ class Actor : Thinker native return -1; } - // Called when the player presses 'use' and an actor is found + // Called when the player presses 'use' and an actor is found, except if the + // UseSpecial flag is set. Use level.ExecuteSpecial to call action specials + // instead. virtual bool Used(Actor user) { return false; From e55b52f356a457529696f990f2e9d8448ab9f0ac Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Tue, 24 Apr 2018 11:58:04 +0200 Subject: [PATCH 7/8] Moving the files to hwrenderer/ --- src/CMakeLists.txt | 2 +- src/gl/scene/gl_drawinfo.h | 2 +- src/{gl => hwrenderer}/scene/hw_drawinfo.h | 0 .../gl_renderhacks.cpp => hwrenderer/scene/hw_renderhacks.cpp} | 2 +- 4 files changed, 3 insertions(+), 3 deletions(-) rename src/{gl => hwrenderer}/scene/hw_drawinfo.h (100%) rename src/{gl/scene/gl_renderhacks.cpp => hwrenderer/scene/hw_renderhacks.cpp} (99%) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 79c4856fa..07749530d 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -822,7 +822,6 @@ set( FASTMATH_SOURCES gl/scene/gl_walls.cpp gl/scene/gl_sprite.cpp gl/scene/gl_skydome.cpp - gl/scene/gl_renderhacks.cpp gl/scene/gl_weapon.cpp gl/scene/gl_scene.cpp gl/scene/gl_swscene.cpp @@ -834,6 +833,7 @@ set( FASTMATH_SOURCES gl_load/gl_load.c gl/models/gl_models.cpp hwrenderer/dynlights/hw_dynlightdata.cpp + hwrenderer/scene/hw_renderhacks.cpp r_data/models/models.cpp r_data/matrix.cpp sound/adlmidi/adldata.cpp diff --git a/src/gl/scene/gl_drawinfo.h b/src/gl/scene/gl_drawinfo.h index 5643fc90c..61297124a 100644 --- a/src/gl/scene/gl_drawinfo.h +++ b/src/gl/scene/gl_drawinfo.h @@ -2,7 +2,7 @@ #define __GL_DRAWINFO_H #include "gl/scene/gl_wall.h" -#include "hw_drawinfo.h" +#include "hwrenderer/scene/hw_drawinfo.h" enum GLDrawItemType { diff --git a/src/gl/scene/hw_drawinfo.h b/src/hwrenderer/scene/hw_drawinfo.h similarity index 100% rename from src/gl/scene/hw_drawinfo.h rename to src/hwrenderer/scene/hw_drawinfo.h diff --git a/src/gl/scene/gl_renderhacks.cpp b/src/hwrenderer/scene/hw_renderhacks.cpp similarity index 99% rename from src/gl/scene/gl_renderhacks.cpp rename to src/hwrenderer/scene/hw_renderhacks.cpp index ad35195cd..2ae37e37b 100644 --- a/src/gl/scene/gl_renderhacks.cpp +++ b/src/hwrenderer/scene/hw_renderhacks.cpp @@ -31,7 +31,7 @@ #include "g_level.h" #include "g_levellocals.h" -#include "hw_drawinfo.h" +#include "hwrenderer/scene/hw_drawinfo.h" #include "gl/utility/gl_clock.h" sector_t * gl_FakeFlat(sector_t * sec, sector_t * dest, area_t in_area, bool back); From 2ae8d394418519b6c40bc117e08342039c77577a Mon Sep 17 00:00:00 2001 From: "alexey.lysiuk" Date: Tue, 24 Apr 2018 14:30:35 +0300 Subject: [PATCH 8/8] Removed all superfluous #include's Automatically optimized by CLion IDE with manual corrections --- src/actorptrselect.cpp | 1 - src/am_map.cpp | 13 ------------- src/b_bot.cpp | 1 - src/b_func.cpp | 6 ------ src/b_game.cpp | 5 ----- src/b_move.cpp | 5 ----- src/b_think.cpp | 5 ----- src/bbannouncer.cpp | 4 ---- src/c_bind.cpp | 6 ------ src/c_cmds.cpp | 5 ----- src/c_console.cpp | 9 --------- src/c_cvars.cpp | 7 ------- src/c_dispatch.cpp | 2 -- src/c_expr.cpp | 1 - src/colormatcher.cpp | 1 - src/compatibility.cpp | 4 ---- src/ct_chat.cpp | 5 ----- src/d_dehacked.cpp | 11 ----------- src/d_iwad.cpp | 3 --- src/d_main.cpp | 15 --------------- src/d_net.cpp | 9 --------- src/d_netinfo.cpp | 9 --------- src/d_protocol.cpp | 2 -- src/decallib.cpp | 4 ---- src/dobject.cpp | 6 ------ src/dobjgc.cpp | 5 ----- src/dobjtype.cpp | 4 ---- src/doomstat.cpp | 2 -- src/dsectoreffect.cpp | 2 -- src/dthinker.cpp | 3 --- src/edata.cpp | 3 --- src/events.cpp | 1 - src/f_wipe.cpp | 4 ---- src/files.cpp | 2 -- src/fragglescript/t_cmd.cpp | 1 - src/fragglescript/t_func.cpp | 11 ----------- src/fragglescript/t_load.cpp | 3 --- src/fragglescript/t_parse.cpp | 3 --- src/fragglescript/t_prepro.cpp | 1 - src/fragglescript/t_script.cpp | 4 ---- src/g_doomedmap.cpp | 5 ----- src/g_game.cpp | 17 ----------------- src/g_hub.cpp | 3 --- src/g_inventory/a_keys.cpp | 4 ---- src/g_inventory/a_pickups.cpp | 7 ------- src/g_inventory/a_weapons.cpp | 7 ------- src/g_level.cpp | 13 ------------- src/g_mapinfo.cpp | 4 ---- src/g_shared/a_action.cpp | 5 ----- src/g_shared/a_decals.cpp | 5 ----- src/g_shared/a_flashfader.cpp | 1 - src/g_shared/a_lightning.cpp | 1 - src/g_shared/a_morph.cpp | 5 ----- src/g_shared/a_quake.cpp | 4 ---- src/g_shared/a_specialspot.cpp | 3 --- src/g_shared/hudmessages.cpp | 1 - src/g_shared/shared_hud.cpp | 2 -- src/g_skill.cpp | 3 --- src/g_statusbar/sbar_mugshot.cpp | 3 --- src/g_statusbar/sbarinfo.cpp | 11 ----------- src/g_statusbar/shared_sbar.cpp | 6 ------ src/gameconfigfile.cpp | 4 ---- src/gi.cpp | 3 --- src/gl/compatibility/gl_20.cpp | 7 ------- src/gl/compatibility/gl_swshader20.cpp | 5 ----- src/gl/data/gl_vertexbuffer.cpp | 3 --- src/gl/dynlights/gl_lightbuffer.cpp | 1 - src/gl/dynlights/gl_shadowmap.cpp | 3 --- src/gl/models/gl_models.cpp | 7 ------- src/gl/renderer/gl_lightdata.cpp | 3 --- src/gl/renderer/gl_postprocess.cpp | 14 -------------- src/gl/renderer/gl_postprocessstate.cpp | 3 --- src/gl/renderer/gl_quaddrawer.cpp | 2 -- src/gl/renderer/gl_renderbuffers.cpp | 6 ------ src/gl/renderer/gl_renderer.cpp | 10 ---------- src/gl/renderer/gl_renderstate.cpp | 3 --- src/gl/scene/gl_bsp.cpp | 6 ------ src/gl/scene/gl_decal.cpp | 3 --- src/gl/scene/gl_drawinfo.cpp | 7 ------- src/gl/scene/gl_flats.cpp | 6 ------ src/gl/scene/gl_portal.cpp | 9 --------- src/gl/scene/gl_scene.cpp | 10 ---------- src/gl/scene/gl_sky.cpp | 2 -- src/gl/scene/gl_skydome.cpp | 3 --- src/gl/scene/gl_sprite.cpp | 7 ------- src/gl/scene/gl_spritelight.cpp | 4 ---- src/gl/scene/gl_swscene.cpp | 4 ---- src/gl/scene/gl_vertex.cpp | 4 ---- src/gl/scene/gl_walls.cpp | 5 ----- src/gl/scene/gl_walls_draw.cpp | 4 ---- src/gl/scene/gl_weapon.cpp | 3 --- src/gl/shaders/gl_ambientshader.cpp | 4 ---- src/gl/shaders/gl_ambientshader.h | 4 +++- src/gl/shaders/gl_bloomshader.cpp | 5 ----- src/gl/shaders/gl_blurshader.cpp | 5 ----- src/gl/shaders/gl_colormapshader.cpp | 5 ----- src/gl/shaders/gl_lensshader.cpp | 5 ----- src/gl/shaders/gl_postprocessshader.cpp | 5 ----- src/gl/shaders/gl_present3dRowshader.cpp | 6 ------ src/gl/shaders/gl_presentshader.cpp | 5 ----- src/gl/shaders/gl_shader.cpp | 7 ------- src/gl/shaders/gl_shaderprogram.cpp | 4 ---- src/gl/shaders/gl_shadowmapshader.cpp | 6 ------ src/gl/shaders/gl_tonemapshader.cpp | 4 ---- src/gl/stereo3d/gl_anaglyph.cpp | 1 - src/gl/stereo3d/gl_interleaved3d.cpp | 2 -- src/gl/stereo3d/gl_quadstereo.cpp | 1 - src/gl/stereo3d/gl_sidebyside3d.cpp | 1 - src/gl/stereo3d/gl_stereo3d.cpp | 3 --- src/gl/stereo3d/gl_stereo_cvars.cpp | 1 - src/gl/stereo3d/gl_stereo_leftright.cpp | 1 - src/gl/system/gl_debug.cpp | 5 ----- src/gl/system/gl_framebuffer.cpp | 9 --------- src/gl/system/gl_interface.cpp | 4 ---- src/gl/system/gl_menu.cpp | 4 ---- src/gl/system/gl_wipe.cpp | 4 ---- src/gl/textures/gl_hwtexture.cpp | 3 --- src/gl/textures/gl_material.cpp | 11 ----------- src/gl/textures/gl_samplers.cpp | 2 -- src/gl/textures/gl_texture.cpp | 5 ----- src/hu_scores.cpp | 2 -- src/hwrenderer/data/flatvertices.cpp | 1 - src/hwrenderer/scene/hw_renderhacks.cpp | 1 - src/i_net.cpp | 6 ------ src/i_time.cpp | 1 - src/info.cpp | 7 ------- src/intermission/intermission.cpp | 3 --- src/intermission/intermission_parse.cpp | 1 - src/keysections.cpp | 2 -- src/m_argv.cpp | 2 -- src/m_cheat.cpp | 12 ------------ src/m_misc.cpp | 14 -------------- src/m_png.cpp | 3 --- src/m_random.cpp | 3 --- src/memarena.cpp | 2 -- src/menu/joystickmenu.cpp | 16 ---------------- src/menu/loadsavemenu.cpp | 7 ------- src/menu/menu.cpp | 6 ------ src/menu/menudef.cpp | 11 ----------- src/menu/messagebox.cpp | 4 ---- src/menu/optionmenu.cpp | 13 ------------- src/menu/playermenu.cpp | 9 --------- src/menu/videomenu.cpp | 18 ------------------ src/nodebuild.cpp | 8 -------- src/nodebuild_extract.cpp | 1 - src/nodebuild_utility.cpp | 5 ----- src/p_3dfloors.cpp | 3 --- src/p_acs.cpp | 15 --------------- src/p_actionfunctions.cpp | 15 --------------- src/p_ceiling.cpp | 2 -- src/p_conversation.cpp | 7 ------- src/p_doors.cpp | 4 ---- src/p_effect.cpp | 8 -------- src/p_enemy.cpp | 10 ---------- src/p_glnodes.cpp | 8 -------- src/p_interaction.cpp | 5 ----- src/p_lights.cpp | 2 -- src/p_lnspec.cpp | 7 ------- src/p_map.cpp | 9 --------- src/p_maputl.cpp | 3 --- src/p_mobj.cpp | 11 ----------- src/p_plats.cpp | 2 -- src/p_pspr.cpp | 1 - src/p_pusher.cpp | 1 - src/p_saveg.cpp | 8 -------- src/p_secnodes.cpp | 3 --- src/p_sectors.cpp | 1 - src/p_setup.cpp | 15 --------------- src/p_sight.cpp | 7 ------- src/p_spec.cpp | 18 ------------------ src/p_states.cpp | 3 --- src/p_switch.cpp | 5 ----- src/p_teleport.cpp | 2 -- src/p_terrain.cpp | 2 -- src/p_things.cpp | 8 -------- src/p_tick.cpp | 4 ---- src/p_trace.cpp | 2 -- src/p_udmf.cpp | 3 --- src/p_usdf.cpp | 3 --- src/p_user.cpp | 10 ---------- src/p_xlat.cpp | 6 ------ src/po_man.cpp | 6 ------ src/portal.cpp | 3 --- src/posix/cocoa/i_joystick.cpp | 2 -- src/posix/cocoa/i_main.mm | 3 --- src/posix/cocoa/i_system.mm | 2 -- src/posix/cocoa/i_video.mm | 10 ---------- src/posix/cocoa/st_console.mm | 1 - src/posix/cocoa/st_start.mm | 1 - src/posix/i_steam.cpp | 1 - src/posix/osx/iwadpicker_cocoa.mm | 1 - src/posix/sdl/crashcatcher.c | 3 --- src/posix/sdl/critsec.cpp | 1 - src/posix/sdl/hardware.cpp | 8 -------- src/posix/sdl/i_input.cpp | 6 ------ src/posix/sdl/i_main.cpp | 5 ----- src/posix/sdl/i_system.cpp | 18 ------------------ src/posix/sdl/sdlglvideo.cpp | 5 ----- src/posix/sdl/st_start.cpp | 1 - src/r_data/colormaps.cpp | 11 ----------- src/r_data/gldefs.cpp | 6 ------ src/r_data/matrix.cpp | 4 ---- src/r_data/models/models.cpp | 1 - src/r_data/models/models_md2.cpp | 3 --- src/r_data/models/models_md3.cpp | 2 -- src/r_data/models/models_voxel.cpp | 7 ------- src/r_data/portalgroups.cpp | 7 ------- src/r_data/r_interpolate.cpp | 1 - src/r_data/r_translate.cpp | 5 ----- src/r_data/renderinfo.cpp | 6 ------ src/r_data/sprites.cpp | 4 ---- src/r_data/voxels.cpp | 16 ---------------- src/r_sky.cpp | 1 - src/r_utility.cpp | 6 ------ src/resourcefiles/file_7z.cpp | 3 --- src/resourcefiles/file_directory.cpp | 1 - src/resourcefiles/file_grp.cpp | 2 -- src/resourcefiles/file_lump.cpp | 1 - src/resourcefiles/file_pak.cpp | 2 -- src/resourcefiles/file_rff.cpp | 2 -- src/resourcefiles/file_wad.cpp | 3 --- src/resourcefiles/file_zip.cpp | 1 - src/resourcefiles/resourcefile.cpp | 2 -- src/s_advsound.cpp | 8 -------- src/s_environment.cpp | 2 -- src/s_sndseq.cpp | 3 --- src/s_sound.cpp | 6 ------ src/sc_man.cpp | 1 - src/scripting/backend/codegen.cpp | 9 --------- src/scripting/backend/vmbuilder.cpp | 4 ---- src/scripting/decorate/olddecorations.cpp | 7 ------- src/scripting/decorate/thingdef_exp.cpp | 7 ------- src/scripting/decorate/thingdef_parse.cpp | 7 ------- src/scripting/decorate/thingdef_states.cpp | 12 ------------ src/scripting/symbols.cpp | 1 - src/scripting/thingdef.cpp | 13 ------------- src/scripting/thingdef_data.cpp | 8 -------- src/scripting/thingdef_properties.cpp | 17 ----------------- src/scripting/vm/vmexec.cpp | 4 ---- src/scripting/zscript/ast.cpp | 2 -- src/scripting/zscript/zcc_compile.cpp | 9 --------- src/scripting/zscript/zcc_parser.cpp | 4 ---- src/serializer.cpp | 7 ------- src/sound/i_music.cpp | 16 ---------------- src/sound/i_sound.cpp | 15 --------------- src/sound/i_soundfont.cpp | 2 -- .../mididevices/music_adlmidi_mididevice.cpp | 6 ------ .../music_fluidsynth_mididevice.cpp | 5 ----- src/sound/mididevices/music_opl_mididevice.cpp | 3 --- .../mididevices/music_opldumper_mididevice.cpp | 4 ---- .../mididevices/music_opnmidi_mididevice.cpp | 5 ----- .../mididevices/music_softsynth_mididevice.cpp | 4 ---- .../mididevices/music_timidity_mididevice.cpp | 4 ---- .../music_timiditypp_mididevice.cpp | 6 ------ .../music_wavewriter_mididevice.cpp | 6 ------ .../mididevices/music_wildmidi_mididevice.cpp | 5 ----- src/sound/midisources/midisource.cpp | 1 - src/sound/midisources/midisource_hmi.cpp | 4 ---- src/sound/midisources/midisource_mus.cpp | 4 ---- src/sound/midisources/midisource_smf.cpp | 4 ---- src/sound/midisources/midisource_xmi.cpp | 4 ---- src/sound/mpg123_decoder.cpp | 1 - src/sound/music_midi_base.cpp | 7 ------- src/sound/musicformats/music_cd.cpp | 1 - src/sound/musicformats/music_dumb.cpp | 7 ------- src/sound/musicformats/music_gme.cpp | 3 --- src/sound/musicformats/music_libsndfile.cpp | 2 -- src/sound/musicformats/music_midistream.cpp | 2 -- src/sound/musicformats/music_opl.cpp | 1 - src/sound/oalsound.cpp | 7 ------- src/sound/oplsynth/OPL3.cpp | 1 - src/sound/oplsynth/dosbox/opl.cpp | 1 - src/sound/oplsynth/fmopl.cpp | 1 - src/sound/oplsynth/musicblock.cpp | 2 -- src/sound/oplsynth/opl_mus_player.cpp | 3 --- src/sound/sndfile_decoder.cpp | 2 -- src/sound/timidity/common.cpp | 6 ------ src/sound/timidity/instrum.cpp | 2 -- src/sound/timidity/instrum_dls.cpp | 1 - src/sound/timidity/instrum_font.cpp | 5 ----- src/sound/timidity/instrum_sf2.cpp | 1 - src/sound/timidity/mix.cpp | 2 -- src/sound/timidity/playmidi.cpp | 1 - src/sound/timidity/resample.cpp | 1 - src/sound/timiditypp/common.cpp | 3 --- src/sound/timiditypp/configfile.cpp | 6 ------ src/sound/timiditypp/filter.cpp | 2 -- src/sound/timiditypp/instrum.cpp | 1 - src/sound/timiditypp/quantity.cpp | 1 - src/sound/timiditypp/readmidic.cpp | 2 -- src/sound/timiditypp/recache.cpp | 1 - src/sound/timiditypp/resample.cpp | 2 -- src/sound/timiditypp/reverb.cpp | 2 -- src/sound/timiditypp/sbkconv.cpp | 2 -- src/sound/timiditypp/sfitem.cpp | 3 --- src/sound/timiditypp/sndfont.cpp | 3 --- src/sound/timiditypp/tables.cpp | 1 - src/sound/wildmidi/file_io.cpp | 1 - src/sound/wildmidi/wildmidi_lib.cpp | 7 ------- src/statistics.cpp | 15 --------------- src/stats.cpp | 4 ---- src/stringtable.cpp | 3 --- src/strnatcmp.c | 2 -- src/textures/anim_switches.cpp | 3 --- src/textures/animations.cpp | 3 --- src/textures/bitmap.cpp | 2 -- src/textures/formats/automaptexture.cpp | 1 - src/textures/formats/backdroptexture.cpp | 10 ---------- src/textures/formats/brightmaptexture.cpp | 7 ------- src/textures/formats/buildtexture.cpp | 2 -- src/textures/formats/canvastexture.cpp | 3 --- src/textures/formats/ddstexture.cpp | 2 -- src/textures/formats/flattexture.cpp | 1 - src/textures/formats/imgztexture.cpp | 3 --- src/textures/formats/jpegtexture.cpp | 1 - src/textures/formats/multipatchtexture.cpp | 3 --- src/textures/formats/patchtexture.cpp | 3 --- src/textures/formats/pcxtexture.cpp | 3 --- src/textures/formats/pngtexture.cpp | 2 -- src/textures/formats/rawpagetexture.cpp | 1 - src/textures/formats/shadertexture.cpp | 12 ------------ src/textures/formats/tgatexture.cpp | 2 -- src/textures/formats/warptexture.cpp | 3 --- src/textures/hires/hirestex.cpp | 5 ----- src/textures/hires/hqnx_asm/hq4x_asm.cpp | 3 --- src/textures/hires/hqresize.cpp | 1 - src/textures/skyboxtexture.cpp | 1 - src/textures/texture.cpp | 2 -- src/textures/texturemanager.cpp | 2 -- src/umapinfo.cpp | 3 --- src/v_blend.cpp | 9 --------- src/v_collection.cpp | 2 -- src/v_draw.cpp | 10 ---------- src/v_font.cpp | 7 ------- src/v_palette.cpp | 11 ----------- src/v_pfx.cpp | 1 - src/v_text.cpp | 4 ---- src/v_video.cpp | 14 -------------- src/w_wad.cpp | 6 ------ src/wi_stuff.cpp | 9 --------- src/win32/hardware.cpp | 4 ---- src/win32/i_cd.cpp | 3 --- src/win32/i_crash.cpp | 10 ---------- src/win32/i_dijoy.cpp | 7 ------- src/win32/i_input.cpp | 12 ------------ src/win32/i_keyboard.cpp | 6 ------ src/win32/i_main.cpp | 13 ------------- src/win32/i_mouse.cpp | 3 --- src/win32/i_rawps2.cpp | 11 ----------- src/win32/i_specialpaths.cpp | 1 - src/win32/i_system.cpp | 15 --------------- src/win32/i_xinput.cpp | 10 ---------- src/win32/st_start.cpp | 3 --- src/x86.cpp | 1 - src/xlat/parse_xlat.cpp | 4 ---- src/zstrformat.cpp | 4 ---- 356 files changed, 3 insertions(+), 1727 deletions(-) diff --git a/src/actorptrselect.cpp b/src/actorptrselect.cpp index 4be3330c9..da36e4494 100644 --- a/src/actorptrselect.cpp +++ b/src/actorptrselect.cpp @@ -34,7 +34,6 @@ #include "actorptrselect.h" #include "actor.h" #include "d_player.h" -#include "p_pspr.h" #include "p_local.h" //========================================================================== diff --git a/src/am_map.cpp b/src/am_map.cpp index 7e6e7546d..e11262125 100644 --- a/src/am_map.cpp +++ b/src/am_map.cpp @@ -30,14 +30,11 @@ #include "doomdef.h" #include "templates.h" #include "g_level.h" -#include "doomdef.h" #include "st_stuff.h" #include "p_local.h" #include "p_lnspec.h" #include "w_wad.h" #include "a_sharedglobal.h" -#include "statnums.h" -#include "r_data/r_translate.h" #include "d_event.h" #include "gi.h" #include "p_setup.h" @@ -50,19 +47,10 @@ #include "p_blockmap.h" #include "m_cheat.h" -#include "i_system.h" #include "c_dispatch.h" -#include "colormatcher.h" #include "d_netinf.h" -// Needs access to LFB. -#include "v_video.h" -#include "v_palette.h" - -#include "v_text.h" - // State. -#include "doomstat.h" #include "r_state.h" #include "r_utility.h" @@ -72,7 +60,6 @@ #include "am_map.h" #include "po_man.h" #include "a_keys.h" -#include "r_data/colormaps.h" #include "g_levellocals.h" #include "actorinlines.h" diff --git a/src/b_bot.cpp b/src/b_bot.cpp index d1848fc6a..24a1bfe03 100644 --- a/src/b_bot.cpp +++ b/src/b_bot.cpp @@ -40,7 +40,6 @@ #include "c_cvars.h" #include "c_dispatch.h" #include "b_bot.h" -#include "m_argv.h" #include "doomstat.h" #include "p_local.h" #include "cmdlib.h" diff --git a/src/b_func.cpp b/src/b_func.cpp index 3014e1bdd..3c6425116 100644 --- a/src/b_func.cpp +++ b/src/b_func.cpp @@ -48,12 +48,6 @@ #include "p_maputl.h" #include "b_bot.h" #include "g_game.h" -#include "m_random.h" -#include "r_sky.h" -#include "st_stuff.h" -#include "stats.h" -#include "i_system.h" -#include "s_sound.h" #include "d_event.h" #include "d_player.h" #include "p_spec.h" diff --git a/src/b_game.cpp b/src/b_game.cpp index 661d09c6e..d21c736e5 100644 --- a/src/b_game.cpp +++ b/src/b_game.cpp @@ -81,20 +81,15 @@ Everything that is changed is marked (maybe commented) with "Added by MC" #include "p_local.h" #include "b_bot.h" #include "g_game.h" -#include "m_random.h" #include "doomstat.h" #include "cmdlib.h" -#include "sc_man.h" -#include "stats.h" #include "m_misc.h" #include "sbar.h" #include "p_acs.h" #include "teaminfo.h" -#include "i_system.h" #include "d_net.h" #include "d_netinf.h" #include "d_player.h" -#include "doomerrors.h" #include "events.h" #include "vm.h" diff --git a/src/b_move.cpp b/src/b_move.cpp index 730c628b7..3d3e67ed2 100644 --- a/src/b_move.cpp +++ b/src/b_move.cpp @@ -44,11 +44,7 @@ #include "p_local.h" #include "b_bot.h" #include "g_game.h" -#include "d_protocol.h" -#include "m_random.h" -#include "i_system.h" #include "p_lnspec.h" -#include "gi.h" #include "a_keys.h" #include "d_event.h" #include "p_enemy.h" @@ -56,7 +52,6 @@ #include "p_spec.h" #include "p_checkposition.h" #include "actorinlines.h" -#include "math/cmath.h" static FRandom pr_botopendoor ("BotOpenDoor"); static FRandom pr_bottrywalk ("BotTryWalk"); diff --git a/src/b_think.cpp b/src/b_think.cpp index 696af9c15..2c41bcda3 100644 --- a/src/b_think.cpp +++ b/src/b_think.cpp @@ -47,14 +47,9 @@ #include "p_local.h" #include "b_bot.h" #include "g_game.h" -#include "m_random.h" -#include "stats.h" -#include "a_pickups.h" -#include "statnums.h" #include "d_net.h" #include "d_event.h" #include "d_player.h" -#include "vectors.h" #include "actorinlines.h" static FRandom pr_botmove ("BotMove"); diff --git a/src/bbannouncer.cpp b/src/bbannouncer.cpp index 6fbf31479..144528cd7 100644 --- a/src/bbannouncer.cpp +++ b/src/bbannouncer.cpp @@ -44,11 +44,7 @@ #include "actor.h" #include "gstrings.h" -#include "s_sound.h" -#include "m_random.h" #include "d_player.h" -#include "g_level.h" -#include "doomstat.h" #include "g_levellocals.h" // MACROS ------------------------------------------------------------------ diff --git a/src/c_bind.cpp b/src/c_bind.cpp index 62d497f80..1e4f7355d 100644 --- a/src/c_bind.cpp +++ b/src/c_bind.cpp @@ -34,14 +34,11 @@ #include "doomtype.h" #include "doomdef.h" -#include "cmdlib.h" #include "c_dispatch.h" #include "c_bind.h" #include "g_level.h" #include "hu_stuff.h" -#include "gi.h" #include "configfile.h" -#include "i_system.h" #include "d_event.h" #include "w_wad.h" #include "templates.h" @@ -49,9 +46,6 @@ #include "vm.h" #include "i_time.h" -#include -#include - const char *KeyNames[NUM_KEYS] = { // This array is dependant on the particular keyboard input diff --git a/src/c_cmds.cpp b/src/c_cmds.cpp index 8e8612dec..a143e55e0 100644 --- a/src/c_cmds.cpp +++ b/src/c_cmds.cpp @@ -35,7 +35,6 @@ #include #include #include -#include #ifdef _WIN32 #include @@ -56,11 +55,9 @@ #include "g_game.h" #include "g_level.h" #include "w_wad.h" -#include "g_level.h" #include "gi.h" #include "r_defs.h" #include "d_player.h" -#include "templates.h" #include "p_local.h" #include "r_sky.h" #include "p_setup.h" @@ -68,9 +65,7 @@ #include "d_net.h" #include "v_text.h" #include "p_lnspec.h" -#include "v_video.h" #include "r_utility.h" -#include "r_data/r_interpolate.h" #include "c_functions.h" #include "g_levellocals.h" diff --git a/src/c_console.cpp b/src/c_console.cpp index 3cddf4160..da38a25e9 100644 --- a/src/c_console.cpp +++ b/src/c_console.cpp @@ -34,10 +34,6 @@ #include "templates.h" #include "p_setup.h" -#include -#include -#include -#include #include "version.h" #include "g_game.h" @@ -49,27 +45,22 @@ #include "i_system.h" #include "i_video.h" #include "g_input.h" -#include "m_swap.h" #include "v_palette.h" #include "v_video.h" #include "v_text.h" #include "w_wad.h" #include "sbar.h" #include "s_sound.h" -#include "s_sndseq.h" #include "doomstat.h" #include "d_gui.h" -#include "v_video.h" #include "cmdlib.h" #include "d_net.h" -#include "g_level.h" #include "d_event.h" #include "d_player.h" #include "gstrings.h" #include "c_consolebuffer.h" #include "g_levellocals.h" #include "vm.h" -#include "i_time.h" FString FStringFormat(VM_ARGS); // extern from thingdef_data.cpp diff --git a/src/c_cvars.cpp b/src/c_cvars.cpp index 5f0302938..2e8e22ecc 100644 --- a/src/c_cvars.cpp +++ b/src/c_cvars.cpp @@ -33,7 +33,6 @@ */ #include -#include #include #include "cmdlib.h" @@ -42,18 +41,12 @@ #include "c_dispatch.h" #include "doomstat.h" -#include "c_cvars.h" #include "d_player.h" #include "d_netinf.h" -#include "i_system.h" -#include "v_palette.h" -#include "v_video.h" -#include "colormatcher.h" #include "menu/menu.h" #include "vm.h" -#include "v_text.h" struct FLatchedValue { diff --git a/src/c_dispatch.cpp b/src/c_dispatch.cpp index 6ebc0be99..cbca6acb8 100644 --- a/src/c_dispatch.cpp +++ b/src/c_dispatch.cpp @@ -38,7 +38,6 @@ #include #include #include -#include #include "templates.h" #include "doomtype.h" @@ -49,7 +48,6 @@ #include "doomstat.h" #include "d_player.h" #include "configfile.h" -#include "m_crc32.h" #include "v_text.h" #include "d_net.h" #include "d_main.h" diff --git a/src/c_expr.cpp b/src/c_expr.cpp index 4d1668266..0f5cb9c4f 100644 --- a/src/c_expr.cpp +++ b/src/c_expr.cpp @@ -35,7 +35,6 @@ // HEADER FILES ------------------------------------------------------------ #include -#include #include #include diff --git a/src/colormatcher.cpp b/src/colormatcher.cpp index a93192fe2..aa98e54d0 100644 --- a/src/colormatcher.cpp +++ b/src/colormatcher.cpp @@ -39,7 +39,6 @@ */ #include -#include #include "doomtype.h" #include "colormatcher.h" diff --git a/src/compatibility.cpp b/src/compatibility.cpp index 40d7bfbe2..752c91143 100644 --- a/src/compatibility.cpp +++ b/src/compatibility.cpp @@ -41,16 +41,12 @@ #include "compatibility.h" #include "sc_man.h" -#include "cmdlib.h" -#include "doomdef.h" -#include "doomdata.h" #include "doomstat.h" #include "c_dispatch.h" #include "gi.h" #include "g_level.h" #include "p_lnspec.h" #include "p_tags.h" -#include "r_state.h" #include "w_wad.h" #include "textures.h" #include "g_levellocals.h" diff --git a/src/ct_chat.cpp b/src/ct_chat.cpp index baaa34db5..85e8f0c23 100644 --- a/src/ct_chat.cpp +++ b/src/ct_chat.cpp @@ -26,20 +26,15 @@ #include "doomdef.h" #include "m_swap.h" #include "hu_stuff.h" -#include "w_wad.h" #include "s_sound.h" #include "doomstat.h" #include "st_stuff.h" #include "c_console.h" #include "c_dispatch.h" -#include "c_cvars.h" #include "d_player.h" #include "v_text.h" -#include "v_video.h" -#include "gi.h" #include "d_gui.h" #include "g_input.h" -#include "templates.h" #include "d_net.h" #include "d_event.h" #include "sbar.h" diff --git a/src/d_dehacked.cpp b/src/d_dehacked.cpp index a3e2773af..25b42632e 100644 --- a/src/d_dehacked.cpp +++ b/src/d_dehacked.cpp @@ -48,30 +48,19 @@ #include "doomstat.h" #include "info.h" #include "d_dehacked.h" -#include "s_sound.h" #include "g_level.h" #include "cmdlib.h" #include "gstrings.h" -#include "m_alloc.h" -#include "m_misc.h" #include "w_wad.h" #include "d_player.h" #include "r_state.h" -#include "gi.h" #include "c_dispatch.h" #include "decallib.h" -#include "v_palette.h" #include "a_sharedglobal.h" -#include "vectors.h" -#include "dobject.h" -#include "r_data/r_translate.h" -#include "sc_man.h" -#include "i_system.h" #include "doomerrors.h" #include "p_effect.h" #include "serializer.h" #include "thingdef.h" -#include "info.h" #include "v_text.h" #include "backend/vmbuilder.h" #include "types.h" diff --git a/src/d_iwad.cpp b/src/d_iwad.cpp index 67f15a60c..dd673ebe8 100644 --- a/src/d_iwad.cpp +++ b/src/d_iwad.cpp @@ -38,11 +38,8 @@ #include "doomstat.h" #include "i_system.h" #include "w_wad.h" -#include "w_zip.h" -#include "v_palette.h" #include "m_argv.h" #include "m_misc.h" -#include "c_cvars.h" #include "sc_man.h" #include "v_video.h" #include "gameconfigfile.h" diff --git a/src/d_main.cpp b/src/d_main.cpp index 92086e18b..d9bc89206 100644 --- a/src/d_main.cpp +++ b/src/d_main.cpp @@ -38,16 +38,13 @@ #ifdef HAVE_FPU_CONTROL #include #endif -#include #if defined(__unix__) || defined(__APPLE__) #include #endif -#include #include #include -#include #include "doomerrors.h" @@ -67,7 +64,6 @@ #include "menu/menu.h" #include "c_console.h" #include "c_dispatch.h" -#include "i_system.h" #include "i_sound.h" #include "i_video.h" #include "g_game.h" @@ -81,40 +77,29 @@ #include "d_main.h" #include "d_dehacked.h" #include "cmdlib.h" -#include "s_sound.h" -#include "m_swap.h" #include "v_text.h" #include "gi.h" -#include "b_bot.h" //Added by MC: -#include "stats.h" #include "gameconfigfile.h" #include "sbar.h" #include "decallib.h" #include "version.h" -#include "v_text.h" #include "st_start.h" -#include "templates.h" #include "teaminfo.h" #include "hardware.h" #include "sbarinfo.h" #include "d_net.h" -#include "g_level.h" #include "d_event.h" #include "d_netinf.h" -#include "v_palette.h" #include "m_cheat.h" #include "compatibility.h" #include "m_joy.h" -#include "sc_man.h" #include "po_man.h" -#include "resourcefiles/resourcefile.h" #include "r_renderer.h" #include "p_local.h" #include "autosegs.h" #include "fragglescript/t_fs.h" #include "g_levellocals.h" #include "events.h" -#include "r_utility.h" #include "vm.h" #include "types.h" #include "r_data/r_vanillatrans.h" diff --git a/src/d_net.cpp b/src/d_net.cpp index ec26da584..453a1ff32 100644 --- a/src/d_net.cpp +++ b/src/d_net.cpp @@ -30,18 +30,13 @@ #include "version.h" #include "menu/menu.h" -#include "m_random.h" -#include "i_system.h" #include "i_video.h" #include "i_net.h" #include "g_game.h" -#include "doomdef.h" -#include "doomstat.h" #include "c_console.h" #include "d_netinf.h" #include "d_net.h" #include "cmdlib.h" -#include "s_sound.h" #include "m_cheat.h" #include "p_local.h" #include "c_dispatch.h" @@ -49,19 +44,15 @@ #include "gi.h" #include "m_misc.h" #include "gameconfigfile.h" -#include "d_gui.h" -#include "templates.h" #include "p_acs.h" #include "p_trace.h" #include "a_sharedglobal.h" #include "st_start.h" #include "teaminfo.h" #include "p_conversation.h" -#include "g_level.h" #include "d_event.h" #include "m_argv.h" #include "p_lnspec.h" -#include "v_video.h" #include "p_spec.h" #include "hardware.h" #include "r_utility.h" diff --git a/src/d_netinfo.cpp b/src/d_netinfo.cpp index 2928568d0..2bc59fe71 100644 --- a/src/d_netinfo.cpp +++ b/src/d_netinfo.cpp @@ -35,26 +35,17 @@ #include #include #include -#include #include "doomtype.h" #include "doomdef.h" #include "doomstat.h" #include "d_netinf.h" #include "d_net.h" -#include "d_protocol.h" #include "d_player.h" #include "c_dispatch.h" -#include "v_palette.h" -#include "v_video.h" -#include "i_system.h" #include "r_state.h" #include "sbar.h" -#include "gi.h" -#include "m_random.h" #include "teaminfo.h" -#include "r_data/r_translate.h" -#include "templates.h" #include "cmdlib.h" #include "serializer.h" #include "vm.h" diff --git a/src/d_protocol.cpp b/src/d_protocol.cpp index 06caca46c..1a0ebcc02 100644 --- a/src/d_protocol.cpp +++ b/src/d_protocol.cpp @@ -35,7 +35,6 @@ #include "i_system.h" #include "d_protocol.h" #include "d_net.h" -#include "doomdef.h" #include "doomstat.h" #include "cmdlib.h" #include "serializer.h" @@ -408,7 +407,6 @@ int SkipTicCmd (uint8_t **stream, int count) return skip; } -#include extern short consistancy[MAXPLAYERS][BACKUPTICS]; void ReadTicCmd (uint8_t **stream, int player, int tic) { diff --git a/src/decallib.cpp b/src/decallib.cpp index 6950b1967..3b5daef5a 100644 --- a/src/decallib.cpp +++ b/src/decallib.cpp @@ -36,17 +36,13 @@ #include "sc_man.h" #include "w_wad.h" #include "v_video.h" -#include "v_palette.h" #include "cmdlib.h" #include "m_random.h" #include "weightedlist.h" #include "statnums.h" #include "templates.h" #include "a_sharedglobal.h" -#include "r_data/r_translate.h" #include "gi.h" -#include "g_level.h" -#include "colormatcher.h" #include "b_bot.h" #include "serializer.h" #include "g_levellocals.h" diff --git a/src/dobject.cpp b/src/dobject.cpp index df8bb1acb..6644c90b3 100644 --- a/src/dobject.cpp +++ b/src/dobject.cpp @@ -33,19 +33,13 @@ */ #include -#include #include "cmdlib.h" #include "actor.h" -#include "dobject.h" #include "doomstat.h" // Ideally, DObjects can be used independant of Doom. #include "d_player.h" // See p_user.cpp to find out why this doesn't work. #include "g_game.h" // Needed for bodyque. #include "c_dispatch.h" -#include "i_system.h" -#include "r_state.h" -#include "stats.h" -#include "a_sharedglobal.h" #include "dsectoreffect.h" #include "serializer.h" #include "vm.h" diff --git a/src/dobjgc.cpp b/src/dobjgc.cpp index 3631c36ed..38eed8fb4 100644 --- a/src/dobjgc.cpp +++ b/src/dobjgc.cpp @@ -63,16 +63,11 @@ #include "g_game.h" #include "a_sharedglobal.h" #include "sbar.h" -#include "stats.h" #include "c_dispatch.h" #include "s_sndseq.h" #include "r_data/r_interpolate.h" #include "doomstat.h" -#include "m_argv.h" #include "po_man.h" -#include "autosegs.h" -#include "v_video.h" -#include "textures/textures.h" #include "r_utility.h" #include "menu/menu.h" #include "intermission/intermission.h" diff --git a/src/dobjtype.cpp b/src/dobjtype.cpp index 275c3814e..1415e15d1 100644 --- a/src/dobjtype.cpp +++ b/src/dobjtype.cpp @@ -35,19 +35,15 @@ // HEADER FILES ------------------------------------------------------------ -#include #include #include "dobject.h" -#include "i_system.h" #include "serializer.h" #include "actor.h" -#include "templates.h" #include "autosegs.h" #include "v_text.h" #include "a_pickups.h" #include "d_player.h" -#include "doomerrors.h" #include "fragglescript/t_fs.h" #include "a_keys.h" #include "vm.h" diff --git a/src/doomstat.cpp b/src/doomstat.cpp index 01cfea36a..edca955e1 100644 --- a/src/doomstat.cpp +++ b/src/doomstat.cpp @@ -28,10 +28,8 @@ #include "stringtable.h" #include "doomstat.h" -#include "c_cvars.h" #include "i_system.h" #include "g_level.h" -#include "p_local.h" #include "g_levellocals.h" int SaveVersion; diff --git a/src/dsectoreffect.cpp b/src/dsectoreffect.cpp index 38fd548bd..3c33268e8 100644 --- a/src/dsectoreffect.cpp +++ b/src/dsectoreffect.cpp @@ -26,12 +26,10 @@ //----------------------------------------------------------------------------- #include "dsectoreffect.h" -#include "gi.h" #include "p_local.h" #include "g_levellocals.h" #include "p_3dmidtex.h" #include "r_data/r_interpolate.h" -#include "statnums.h" #include "serializer.h" #include "doomstat.h" #include "vm.h" diff --git a/src/dthinker.cpp b/src/dthinker.cpp index 39de2e9d6..518bc464e 100644 --- a/src/dthinker.cpp +++ b/src/dthinker.cpp @@ -35,9 +35,6 @@ #include "dthinker.h" #include "stats.h" #include "p_local.h" -#include "statnums.h" -#include "i_system.h" -#include "doomerrors.h" #include "serializer.h" #include "d_player.h" #include "vm.h" diff --git a/src/edata.cpp b/src/edata.cpp index ee5f1fe84..15f3241cf 100644 --- a/src/edata.cpp +++ b/src/edata.cpp @@ -36,7 +36,6 @@ #include "w_wad.h" #include "m_argv.h" -#include "zstring.h" #include "sc_man.h" #include "g_level.h" #include "doomdata.h" @@ -46,9 +45,7 @@ #include "p_setup.h" #include "p_tags.h" #include "p_terrain.h" -#include "v_palette.h" #include "p_acs.h" -#include "r_data/colormaps.h" #include "g_levellocals.h" diff --git a/src/events.cpp b/src/events.cpp index e9c76a7bb..c520359a5 100755 --- a/src/events.cpp +++ b/src/events.cpp @@ -35,7 +35,6 @@ #include "r_utility.h" #include "g_levellocals.h" #include "gi.h" -#include "v_text.h" #include "actor.h" #include "c_dispatch.h" #include "d_net.h" diff --git a/src/f_wipe.cpp b/src/f_wipe.cpp index f47106839..31edce0fd 100644 --- a/src/f_wipe.cpp +++ b/src/f_wipe.cpp @@ -23,14 +23,10 @@ // //----------------------------------------------------------------------------- -#include "i_video.h" #include "v_video.h" #include "m_random.h" -#include "doomdef.h" #include "f_wipe.h" -#include "c_cvars.h" #include "templates.h" -#include "v_palette.h" int wipe_CalcBurn (uint8_t *burnarray, int width, int height, int density) { diff --git a/src/files.cpp b/src/files.cpp index 93a2f4587..1e7f83bd6 100644 --- a/src/files.cpp +++ b/src/files.cpp @@ -34,9 +34,7 @@ */ #include "files.h" -#include "i_system.h" #include "templates.h" -#include "m_misc.h" diff --git a/src/fragglescript/t_cmd.cpp b/src/fragglescript/t_cmd.cpp index 0fbb5a146..3579d704a 100644 --- a/src/fragglescript/t_cmd.cpp +++ b/src/fragglescript/t_cmd.cpp @@ -27,7 +27,6 @@ #include -#include #include "p_local.h" #include "doomdef.h" #include "doomstat.h" diff --git a/src/fragglescript/t_func.cpp b/src/fragglescript/t_func.cpp index 2bda23ec8..85b6e726d 100644 --- a/src/fragglescript/t_func.cpp +++ b/src/fragglescript/t_func.cpp @@ -37,26 +37,15 @@ #include "templates.h" #include "p_local.h" #include "t_script.h" -#include "s_sound.h" -#include "p_lnspec.h" -#include "m_random.h" #include "c_console.h" #include "c_dispatch.h" #include "d_player.h" #include "w_wad.h" #include "gi.h" -#include "zstring.h" -#include "i_system.h" -#include "doomstat.h" -#include "g_level.h" -#include "v_palette.h" #include "v_font.h" -#include "r_data/colormaps.h" #include "serializer.h" -#include "p_setup.h" #include "p_spec.h" #include "r_utility.h" -#include "math/cmath.h" #include "g_levellocals.h" #include "actorinlines.h" diff --git a/src/fragglescript/t_load.cpp b/src/fragglescript/t_load.cpp index bb3e84f1d..1d13118a8 100644 --- a/src/fragglescript/t_load.cpp +++ b/src/fragglescript/t_load.cpp @@ -25,14 +25,11 @@ #include "w_wad.h" -#include "tarray.h" #include "g_level.h" -#include "sc_man.h" #include "s_sound.h" #include "r_sky.h" #include "t_script.h" #include "cmdlib.h" -#include "p_lnspec.h" #include "gi.h" #include "g_levellocals.h" #include "xlat/xlat.h" diff --git a/src/fragglescript/t_parse.cpp b/src/fragglescript/t_parse.cpp index 6b9af0773..d7747b1bc 100644 --- a/src/fragglescript/t_parse.cpp +++ b/src/fragglescript/t_parse.cpp @@ -33,10 +33,7 @@ /* includes ************************/ #include #include "t_script.h" -#include "s_sound.h" #include "v_text.h" -#include "c_cvars.h" -#include "i_system.h" CVAR(Bool, script_debug, false, 0) diff --git a/src/fragglescript/t_prepro.cpp b/src/fragglescript/t_prepro.cpp index 4b00a3177..d9d09f221 100644 --- a/src/fragglescript/t_prepro.cpp +++ b/src/fragglescript/t_prepro.cpp @@ -41,7 +41,6 @@ /* includes ************************/ #include "t_script.h" -#include "i_system.h" #include "w_wad.h" #include "serializer.h" diff --git a/src/fragglescript/t_script.cpp b/src/fragglescript/t_script.cpp index 3c62d4d3a..59a0605e5 100644 --- a/src/fragglescript/t_script.cpp +++ b/src/fragglescript/t_script.cpp @@ -33,14 +33,10 @@ // #include "t_script.h" -#include "p_lnspec.h" #include "a_keys.h" #include "d_player.h" #include "p_spec.h" #include "c_dispatch.h" -#include "i_system.h" -#include "doomerrors.h" -#include "doomstat.h" #include "serializer.h" #include "g_levellocals.h" diff --git a/src/g_doomedmap.cpp b/src/g_doomedmap.cpp index 38feaaf76..5bf2b34f6 100644 --- a/src/g_doomedmap.cpp +++ b/src/g_doomedmap.cpp @@ -36,13 +36,8 @@ #include "info.h" #include "actor.h" #include "p_lnspec.h" -#include "m_fixed.h" #include "c_dispatch.h" -#include "templates.h" -#include "cmdlib.h" -#include "g_level.h" #include "v_text.h" -#include "i_system.h" const char *SpecialMapthingNames[] = { diff --git a/src/g_game.cpp b/src/g_game.cpp index 3fdf55100..97034ada2 100644 --- a/src/g_game.cpp +++ b/src/g_game.cpp @@ -26,7 +26,6 @@ #include #include #include -#include #include #ifdef __APPLE__ #include @@ -43,9 +42,7 @@ #include "m_argv.h" #include "m_misc.h" #include "menu/menu.h" -#include "m_random.h" #include "m_crc32.h" -#include "i_system.h" #include "p_saveg.h" #include "p_tick.h" #include "d_main.h" @@ -54,24 +51,16 @@ #include "st_stuff.h" #include "am_map.h" #include "c_console.h" -#include "c_cvars.h" #include "c_bind.h" #include "c_dispatch.h" -#include "v_video.h" #include "w_wad.h" #include "p_local.h" -#include "s_sound.h" #include "gstrings.h" #include "r_sky.h" #include "g_game.h" -#include "g_level.h" -#include "b_bot.h" //Added by MC: #include "sbar.h" -#include "m_swap.h" #include "m_png.h" -#include "gi.h" #include "a_keys.h" -#include "r_data/r_translate.h" #include "cmdlib.h" #include "d_net.h" #include "d_event.h" @@ -82,18 +71,12 @@ #include "r_utility.h" #include "a_morph.h" #include "p_spec.h" -#include "r_data/colormaps.h" #include "serializer.h" -#include "w_zip.h" -#include "resourcefiles/resourcefile.h" #include "vm.h" -#include - #include "g_hub.h" #include "g_levellocals.h" #include "events.h" -#include "d_main.h" static FRandom pr_dmspawn ("DMSpawn"); diff --git a/src/g_hub.cpp b/src/g_hub.cpp index ecf3106ce..3cac5b17f 100644 --- a/src/g_hub.cpp +++ b/src/g_hub.cpp @@ -35,11 +35,8 @@ #include "doomstat.h" #include "g_hub.h" -#include "tarray.h" #include "g_level.h" #include "g_game.h" -#include "gi.h" -#include "files.h" #include "m_png.h" #include "gstrings.h" #include "wi_stuff.h" diff --git a/src/g_inventory/a_keys.cpp b/src/g_inventory/a_keys.cpp index 8b2ac54c9..c3edfd60f 100644 --- a/src/g_inventory/a_keys.cpp +++ b/src/g_inventory/a_keys.cpp @@ -37,11 +37,7 @@ #include "gstrings.h" #include "d_player.h" #include "c_console.h" -#include "s_sound.h" -#include "sc_man.h" -#include "v_palette.h" #include "w_wad.h" -#include "doomstat.h" #include "v_font.h" #include "vm.h" diff --git a/src/g_inventory/a_pickups.cpp b/src/g_inventory/a_pickups.cpp index 2ed33954b..705a2539f 100644 --- a/src/g_inventory/a_pickups.cpp +++ b/src/g_inventory/a_pickups.cpp @@ -36,28 +36,21 @@ #include #include "info.h" -#include "m_random.h" #include "p_local.h" -#include "s_sound.h" -#include "gi.h" #include "p_lnspec.h" #include "sbar.h" #include "statnums.h" #include "c_dispatch.h" #include "gstrings.h" -#include "templates.h" #include "a_morph.h" #include "a_specialspot.h" -#include "g_level.h" #include "g_game.h" #include "doomstat.h" #include "d_player.h" -#include "p_spec.h" #include "serializer.h" #include "vm.h" #include "c_functions.h" #include "g_levellocals.h" -#include "vm.h" EXTERN_CVAR(Bool, sv_unlimited_pickup) diff --git a/src/g_inventory/a_weapons.cpp b/src/g_inventory/a_weapons.cpp index e0d98529b..25c3918c4 100644 --- a/src/g_inventory/a_weapons.cpp +++ b/src/g_inventory/a_weapons.cpp @@ -38,18 +38,11 @@ #include "a_pickups.h" #include "gi.h" #include "d_player.h" -#include "s_sound.h" -#include "i_system.h" -#include "r_state.h" -#include "p_pspr.h" #include "c_dispatch.h" #include "m_misc.h" #include "gameconfigfile.h" #include "cmdlib.h" -#include "templates.h" #include "sbar.h" -#include "doomstat.h" -#include "g_level.h" #include "d_net.h" #include "serializer.h" #include "vm.h" diff --git a/src/g_level.cpp b/src/g_level.cpp index 095e8cd2c..48440baa9 100644 --- a/src/g_level.cpp +++ b/src/g_level.cpp @@ -52,7 +52,6 @@ #include "r_sky.h" #include "c_console.h" #include "intermission/intermission.h" -#include "gstrings.h" #include "v_video.h" #include "st_stuff.h" #include "hu_stuff.h" @@ -62,31 +61,22 @@ #include "v_text.h" #include "s_sndseq.h" #include "b_bot.h" -#include "sc_man.h" #include "sbar.h" #include "a_lightning.h" -#include "m_png.h" -#include "m_random.h" #include "version.h" -#include "statnums.h" #include "sbarinfo.h" -#include "r_data/r_translate.h" #include "p_lnspec.h" -#include "r_data/r_interpolate.h" #include "cmdlib.h" #include "d_net.h" #include "d_netinf.h" -#include "v_palette.h" #include "menu/menu.h" #include "a_sharedglobal.h" -#include "r_data/colormaps.h" #include "r_renderer.h" #include "r_utility.h" #include "p_spec.h" #include "serializer.h" #include "vm.h" #include "events.h" -#include "dobjgc.h" #include "i_music.h" #include "gi.h" @@ -94,11 +84,8 @@ #include "g_hub.h" #include "g_levellocals.h" #include "actorinlines.h" -#include "vm.h" #include "i_time.h" -#include - void STAT_StartNewGame(const char *lev); void STAT_ChangeLevel(const char *newl); diff --git a/src/g_mapinfo.cpp b/src/g_mapinfo.cpp index 914dad912..72fab5071 100644 --- a/src/g_mapinfo.cpp +++ b/src/g_mapinfo.cpp @@ -36,21 +36,17 @@ #include #include "templates.h" #include "g_level.h" -#include "sc_man.h" #include "w_wad.h" #include "cmdlib.h" #include "v_video.h" #include "p_lnspec.h" #include "p_setup.h" -#include "i_system.h" #include "gi.h" #include "gstrings.h" #include "p_acs.h" #include "doomstat.h" #include "d_player.h" #include "autosegs.h" -#include "version.h" -#include "v_text.h" #include "g_levellocals.h" #include "events.h" diff --git a/src/g_shared/a_action.cpp b/src/g_shared/a_action.cpp index d85792b16..f48830b35 100644 --- a/src/g_shared/a_action.cpp +++ b/src/g_shared/a_action.cpp @@ -24,16 +24,11 @@ #include "actor.h" #include "p_conversation.h" #include "p_lnspec.h" -#include "m_random.h" -#include "s_sound.h" #include "d_player.h" #include "p_local.h" #include "p_terrain.h" #include "p_enemy.h" -#include "statnums.h" -#include "templates.h" #include "serializer.h" -#include "r_data/r_translate.h" #include "vm.h" //---------------------------------------------------------------------------- diff --git a/src/g_shared/a_decals.cpp b/src/g_shared/a_decals.cpp index 29807f5b3..19216ecd2 100644 --- a/src/g_shared/a_decals.cpp +++ b/src/g_shared/a_decals.cpp @@ -36,17 +36,12 @@ #include "a_sharedglobal.h" #include "r_defs.h" #include "p_local.h" -#include "v_video.h" #include "p_trace.h" #include "decallib.h" -#include "statnums.h" #include "c_dispatch.h" #include "d_net.h" -#include "colormatcher.h" -#include "v_palette.h" #include "serializer.h" #include "doomdata.h" -#include "r_state.h" #include "g_levellocals.h" static double DecalWidth, DecalLeft, DecalRight; diff --git a/src/g_shared/a_flashfader.cpp b/src/g_shared/a_flashfader.cpp index ed0e02202..7bc774da7 100644 --- a/src/g_shared/a_flashfader.cpp +++ b/src/g_shared/a_flashfader.cpp @@ -33,7 +33,6 @@ */ #include "a_sharedglobal.h" -#include "g_level.h" #include "d_player.h" #include "serializer.h" #include "g_levellocals.h" diff --git a/src/g_shared/a_lightning.cpp b/src/g_shared/a_lightning.cpp index 625059993..76fdb5de1 100644 --- a/src/g_shared/a_lightning.cpp +++ b/src/g_shared/a_lightning.cpp @@ -25,7 +25,6 @@ #include "a_lightning.h" #include "doomstat.h" #include "p_lnspec.h" -#include "statnums.h" #include "m_random.h" #include "templates.h" #include "s_sound.h" diff --git a/src/g_shared/a_morph.cpp b/src/g_shared/a_morph.cpp index d8b4b373b..a630eff01 100644 --- a/src/g_shared/a_morph.cpp +++ b/src/g_shared/a_morph.cpp @@ -23,23 +23,18 @@ #include "info.h" #include "a_pickups.h" -#include "gstrings.h" #include "p_local.h" #include "gi.h" -#include "s_sound.h" -#include "m_random.h" #include "a_sharedglobal.h" #include "sbar.h" #include "a_morph.h" #include "doomstat.h" -#include "g_level.h" #include "serializer.h" #include "p_enemy.h" #include "d_player.h" #include "r_data/sprites.h" #include "g_levellocals.h" #include "vm.h" -#include "vm.h" static FRandom pr_morphmonst ("MorphMonster"); diff --git a/src/g_shared/a_quake.cpp b/src/g_shared/a_quake.cpp index 10010c3f9..39ffd3c79 100644 --- a/src/g_shared/a_quake.cpp +++ b/src/g_shared/a_quake.cpp @@ -27,11 +27,7 @@ #include "doomstat.h" #include "p_local.h" #include "actor.h" -#include "m_bbox.h" -#include "m_random.h" -#include "s_sound.h" #include "a_sharedglobal.h" -#include "statnums.h" #include "serializer.h" #include "d_player.h" #include "r_utility.h" diff --git a/src/g_shared/a_specialspot.cpp b/src/g_shared/a_specialspot.cpp index dc6829d2d..25cb0cd8a 100644 --- a/src/g_shared/a_specialspot.cpp +++ b/src/g_shared/a_specialspot.cpp @@ -33,10 +33,7 @@ ** */ #include "a_specialspot.h" -#include "m_random.h" #include "p_local.h" -#include "statnums.h" -#include "i_system.h" #include "doomstat.h" #include "serializer.h" #include "a_pickups.h" diff --git a/src/g_shared/hudmessages.cpp b/src/g_shared/hudmessages.cpp index 0299a0b93..14c6cd53a 100644 --- a/src/g_shared/hudmessages.cpp +++ b/src/g_shared/hudmessages.cpp @@ -38,7 +38,6 @@ #include "c_cvars.h" #include "v_video.h" #include "cmdlib.h" -#include "doomstat.h" #include "serializer.h" #include "vm.h" diff --git a/src/g_shared/shared_hud.cpp b/src/g_shared/shared_hud.cpp index da66b9205..a3b7c2a6d 100644 --- a/src/g_shared/shared_hud.cpp +++ b/src/g_shared/shared_hud.cpp @@ -40,12 +40,10 @@ #include "doomdef.h" #include "v_video.h" #include "gi.h" -#include "c_cvars.h" #include "w_wad.h" #include "a_keys.h" #include "sbar.h" #include "sc_man.h" -#include "templates.h" #include "p_local.h" #include "doomstat.h" #include "g_level.h" diff --git a/src/g_skill.cpp b/src/g_skill.cpp index 90ed9f723..287d862f7 100644 --- a/src/g_skill.cpp +++ b/src/g_skill.cpp @@ -36,12 +36,9 @@ #include #include "doomstat.h" #include "d_player.h" -#include "g_level.h" #include "g_game.h" #include "gi.h" -#include "templates.h" #include "v_font.h" -#include "m_fixed.h" #include "gstrings.h" #include "g_levellocals.h" #include "vm.h" diff --git a/src/g_statusbar/sbar_mugshot.cpp b/src/g_statusbar/sbar_mugshot.cpp index 4bec24f1b..950438f21 100644 --- a/src/g_statusbar/sbar_mugshot.cpp +++ b/src/g_statusbar/sbar_mugshot.cpp @@ -36,10 +36,7 @@ #include "r_defs.h" #include "m_random.h" #include "d_player.h" -#include "d_event.h" #include "sbar.h" -#include "sbarinfo.h" -#include "templates.h" #include "r_utility.h" #include "actorinlines.h" diff --git a/src/g_statusbar/sbarinfo.cpp b/src/g_statusbar/sbarinfo.cpp index 277684a6a..7e7ace6a3 100644 --- a/src/g_statusbar/sbarinfo.cpp +++ b/src/g_statusbar/sbarinfo.cpp @@ -38,24 +38,13 @@ #include "v_font.h" #include "v_video.h" #include "sbar.h" -#include "r_defs.h" #include "w_wad.h" -#include "m_random.h" #include "d_player.h" -#include "st_stuff.h" -#include "m_swap.h" #include "a_keys.h" -#include "templates.h" -#include "i_system.h" -#include "sbar.h" #include "sbarinfo.h" #include "gi.h" -#include "r_data/r_translate.h" -#include "g_level.h" -#include "v_palette.h" #include "p_acs.h" #include "gstrings.h" -#include "cmdlib.h" #include "g_levellocals.h" #include "vm.h" diff --git a/src/g_statusbar/shared_sbar.cpp b/src/g_statusbar/shared_sbar.cpp index 83347c2f4..511449abd 100644 --- a/src/g_statusbar/shared_sbar.cpp +++ b/src/g_statusbar/shared_sbar.cpp @@ -41,25 +41,19 @@ #include "c_dispatch.h" #include "c_console.h" #include "v_video.h" -#include "m_swap.h" #include "w_wad.h" -#include "v_text.h" #include "s_sound.h" #include "gi.h" #include "doomstat.h" #include "g_level.h" #include "d_net.h" -#include "colormatcher.h" -#include "v_palette.h" #include "d_player.h" #include "serializer.h" -#include "gstrings.h" #include "r_utility.h" #include "cmdlib.h" #include "g_levellocals.h" #include "vm.h" #include "p_acs.h" -#include "r_data/r_translate.h" #include "sbarinfo.h" #include "events.h" diff --git a/src/gameconfigfile.cpp b/src/gameconfigfile.cpp index c2655c359..acde91376 100644 --- a/src/gameconfigfile.cpp +++ b/src/gameconfigfile.cpp @@ -33,18 +33,15 @@ */ #include -#include #ifdef __APPLE__ #include #endif -#include "doomdef.h" #include "gameconfigfile.h" #include "c_cvars.h" #include "c_dispatch.h" #include "c_bind.h" -#include "gstrings.h" #include "m_argv.h" #include "cmdlib.h" #include "version.h" @@ -52,7 +49,6 @@ #include "v_font.h" #include "a_pickups.h" #include "doomstat.h" -#include "i_system.h" #include "gi.h" #include "d_main.h" diff --git a/src/gi.cpp b/src/gi.cpp index 19cfd3ee7..87c8b68cf 100644 --- a/src/gi.cpp +++ b/src/gi.cpp @@ -35,11 +35,8 @@ #include #include "info.h" #include "gi.h" -#include "m_fixed.h" -#include "v_palette.h" #include "sc_man.h" #include "w_wad.h" -#include "i_system.h" #include "v_video.h" #include "g_level.h" #include "vm.h" diff --git a/src/gl/compatibility/gl_20.cpp b/src/gl/compatibility/gl_20.cpp index 39e957877..0d1360727 100644 --- a/src/gl/compatibility/gl_20.cpp +++ b/src/gl/compatibility/gl_20.cpp @@ -30,16 +30,9 @@ #include "gl/system/gl_system.h" #include "menu/menu.h" -#include "tarray.h" -#include "doomtype.h" -#include "m_argv.h" -#include "zstring.h" -#include "i_system.h" -#include "v_text.h" #include "r_utility.h" #include "g_levellocals.h" #include "actorinlines.h" -#include "g_levellocals.h" #include "hwrenderer/dynlights/hw_dynlightdata.h" #include "gl/renderer/gl_renderer.h" diff --git a/src/gl/compatibility/gl_swshader20.cpp b/src/gl/compatibility/gl_swshader20.cpp index 17adec972..be965bee9 100644 --- a/src/gl/compatibility/gl_swshader20.cpp +++ b/src/gl/compatibility/gl_swshader20.cpp @@ -30,15 +30,10 @@ #include "gl/system/gl_system.h" #include "tarray.h" #include "doomtype.h" -#include "zstring.h" -#include "i_system.h" #include "r_utility.h" #include "w_wad.h" -#include "hwrenderer/dynlights/hw_dynlightdata.h" #include "gl/renderer/gl_renderer.h" -#include "gl/system/gl_interface.h" -#include "gl/renderer/gl_renderstate.h" class LegacyShader diff --git a/src/gl/data/gl_vertexbuffer.cpp b/src/gl/data/gl_vertexbuffer.cpp index cb6a3a748..4c5f0144a 100644 --- a/src/gl/data/gl_vertexbuffer.cpp +++ b/src/gl/data/gl_vertexbuffer.cpp @@ -29,9 +29,6 @@ #include "doomtype.h" #include "p_local.h" #include "r_state.h" -#include "m_argv.h" -#include "c_cvars.h" -#include "g_levellocals.h" #include "gl/system/gl_interface.h" #include "gl/renderer/gl_renderer.h" #include "gl/shaders/gl_shader.h" diff --git a/src/gl/dynlights/gl_lightbuffer.cpp b/src/gl/dynlights/gl_lightbuffer.cpp index 560097987..b9a477a03 100644 --- a/src/gl/dynlights/gl_lightbuffer.cpp +++ b/src/gl/dynlights/gl_lightbuffer.cpp @@ -28,7 +28,6 @@ #include "gl/system/gl_system.h" #include "gl/shaders/gl_shader.h" #include "gl/dynlights/gl_lightbuffer.h" -#include "gl/system/gl_interface.h" #include "gl/utility//gl_clock.h" #include "hwrenderer/dynlights/hw_dynlightdata.h" diff --git a/src/gl/dynlights/gl_shadowmap.cpp b/src/gl/dynlights/gl_shadowmap.cpp index 0d8f9ebbe..48847cd5c 100644 --- a/src/gl/dynlights/gl_shadowmap.cpp +++ b/src/gl/dynlights/gl_shadowmap.cpp @@ -23,7 +23,6 @@ #include "gl/system/gl_system.h" #include "gl/shaders/gl_shader.h" #include "gl/dynlights/gl_shadowmap.h" -#include "gl/system/gl_interface.h" #include "gl/system/gl_debug.h" #include "gl/system/gl_cvars.h" #include "gl/renderer/gl_renderer.h" @@ -31,8 +30,6 @@ #include "gl/renderer/gl_renderbuffers.h" #include "gl/shaders/gl_shadowmapshader.h" #include "hwrenderer/dynlights/hw_dynlightdata.h" -#include "r_state.h" -#include "g_levellocals.h" #include "stats.h" /* diff --git a/src/gl/models/gl_models.cpp b/src/gl/models/gl_models.cpp index 390664c3d..364c3abcd 100644 --- a/src/gl/models/gl_models.cpp +++ b/src/gl/models/gl_models.cpp @@ -28,20 +28,13 @@ #include "gl/system/gl_system.h" #include "w_wad.h" -#include "cmdlib.h" -#include "sc_man.h" -#include "m_crc32.h" -#include "c_console.h" #include "g_game.h" #include "doomstat.h" #include "g_level.h" #include "r_state.h" #include "d_player.h" #include "g_levellocals.h" -#include "r_utility.h" #include "i_time.h" -//#include "resources/voxels.h" -//#include "gl/gl_intern.h" #include "gl/system/gl_interface.h" #include "gl/renderer/gl_renderer.h" diff --git a/src/gl/renderer/gl_lightdata.cpp b/src/gl/renderer/gl_lightdata.cpp index 0e994abf9..cb3f3373f 100644 --- a/src/gl/renderer/gl_lightdata.cpp +++ b/src/gl/renderer/gl_lightdata.cpp @@ -33,11 +33,8 @@ #include "gl/renderer/gl_renderstate.h" #include "gl/shaders/gl_shader.h" #include "gl/scene/gl_portal.h" -#include "c_dispatch.h" #include "p_local.h" -#include "g_level.h" #include "r_sky.h" -#include "g_levellocals.h" // externally settable lighting properties static float distfogtable[2][256]; // light to fog conversion table for black fog diff --git a/src/gl/renderer/gl_postprocess.cpp b/src/gl/renderer/gl_postprocess.cpp index 72e30f27a..3a34a7cbc 100644 --- a/src/gl/renderer/gl_postprocess.cpp +++ b/src/gl/renderer/gl_postprocess.cpp @@ -28,21 +28,8 @@ #include "gl/system/gl_system.h" #include "gi.h" #include "m_png.h" -#include "m_random.h" -#include "st_stuff.h" -#include "dobject.h" -#include "doomstat.h" -#include "g_level.h" -#include "r_data/r_interpolate.h" #include "r_utility.h" #include "d_player.h" -#include "p_effect.h" -#include "sbar.h" -#include "po_man.h" -#include "r_utility.h" -#include "p_local.h" -#include "colormatcher.h" -#include "gl/system/gl_interface.h" #include "gl/system/gl_framebuffer.h" #include "gl/system/gl_cvars.h" #include "gl/system/gl_debug.h" @@ -60,7 +47,6 @@ #include "gl/shaders/gl_lensshader.h" #include "gl/shaders/gl_fxaashader.h" #include "gl/shaders/gl_presentshader.h" -#include "gl/shaders/gl_postprocessshader.h" #include "gl/shaders/gl_postprocessshaderinstance.h" #include "gl/stereo3d/gl_stereo3d.h" #include "r_videoscale.h" diff --git a/src/gl/renderer/gl_postprocessstate.cpp b/src/gl/renderer/gl_postprocessstate.cpp index 4fbe04a76..836318385 100644 --- a/src/gl/renderer/gl_postprocessstate.cpp +++ b/src/gl/renderer/gl_postprocessstate.cpp @@ -29,9 +29,6 @@ #include "gl/system/gl_system.h" #include "gl/system/gl_interface.h" #include "gl/data/gl_vertexbuffer.h" -#include "gl/system/gl_cvars.h" -#include "gl/shaders/gl_shader.h" -#include "gl/renderer/gl_renderer.h" #include "gl/renderer/gl_postprocessstate.h" //----------------------------------------------------------------------------- diff --git a/src/gl/renderer/gl_quaddrawer.cpp b/src/gl/renderer/gl_quaddrawer.cpp index 3a31fe62b..a3cc38380 100644 --- a/src/gl/renderer/gl_quaddrawer.cpp +++ b/src/gl/renderer/gl_quaddrawer.cpp @@ -23,9 +23,7 @@ #include "gl/system/gl_system.h" #include "gl/shaders/gl_shader.h" #include "gl/renderer/gl_renderer.h" -#include "gl/renderer/gl_renderstate.h" #include "gl/renderer/gl_quaddrawer.h" -#include "r_data/matrix.h" /* ** For handling of dynamically created quads when no persistently mapped diff --git a/src/gl/renderer/gl_renderbuffers.cpp b/src/gl/renderer/gl_renderbuffers.cpp index 0d594dbbb..9f4790360 100644 --- a/src/gl/renderer/gl_renderbuffers.cpp +++ b/src/gl/renderer/gl_renderbuffers.cpp @@ -26,18 +26,12 @@ */ #include "gl/system/gl_system.h" -#include "m_swap.h" #include "v_video.h" -#include "vectors.h" #include "gl/system/gl_interface.h" -#include "gl/system/gl_framebuffer.h" #include "gl/system/gl_cvars.h" #include "gl/system/gl_debug.h" #include "gl/renderer/gl_renderer.h" #include "gl/renderer/gl_renderbuffers.h" -#include "w_wad.h" -#include "i_system.h" -#include "doomerrors.h" #include CVAR(Int, gl_multisample, 1, CVAR_ARCHIVE|CVAR_GLOBALCONFIG); diff --git a/src/gl/renderer/gl_renderer.cpp b/src/gl/renderer/gl_renderer.cpp index 6f89d176f..ea647e970 100644 --- a/src/gl/renderer/gl_renderer.cpp +++ b/src/gl/renderer/gl_renderer.cpp @@ -27,13 +27,9 @@ #include "gl/system/gl_system.h" #include "files.h" -#include "m_swap.h" #include "v_video.h" -#include "r_data/r_translate.h" #include "m_png.h" -#include "m_crc32.h" #include "w_wad.h" -#include "vectors.h" #include "doomstat.h" #include "i_time.h" #include "p_effect.h" @@ -52,8 +48,6 @@ #include "gl/scene/gl_drawinfo.h" #include "gl/scene/gl_scenedrawer.h" #include "gl/scene/gl_swscene.h" -#include "gl/scene/gl_portal.h" -#include "gl/shaders/gl_shader.h" #include "gl/shaders/gl_ambientshader.h" #include "gl/shaders/gl_bloomshader.h" #include "gl/shaders/gl_blurshader.h" @@ -64,13 +58,9 @@ #include "gl/shaders/gl_presentshader.h" #include "gl/shaders/gl_present3dRowshader.h" #include "gl/shaders/gl_shadowmapshader.h" -#include "gl/shaders/gl_postprocessshader.h" #include "gl/shaders/gl_postprocessshaderinstance.h" #include "gl/stereo3d/gl_stereo3d.h" -#include "gl/textures/gl_material.h" #include "gl/textures/gl_samplers.h" -#include "gl/utility/gl_clock.h" -#include "gl/models/gl_models.h" #include "gl/dynlights/gl_lightbuffer.h" #include "r_videoscale.h" diff --git a/src/gl/renderer/gl_renderstate.cpp b/src/gl/renderer/gl_renderstate.cpp index a24210678..64556b287 100644 --- a/src/gl/renderer/gl_renderstate.cpp +++ b/src/gl/renderer/gl_renderstate.cpp @@ -33,11 +33,8 @@ #include "gl/system/gl_cvars.h" #include "gl/shaders/gl_shader.h" #include "gl/renderer/gl_renderer.h" -#include "gl/renderer/gl_renderstate.h" -#include "gl/renderer/gl_colormap.h" #include "gl/dynlights//gl_lightbuffer.h" #include "gl/renderer/gl_renderbuffers.h" -#include "g_levellocals.h" void gl_SetTextureMode(int type); diff --git a/src/gl/scene/gl_bsp.cpp b/src/gl/scene/gl_bsp.cpp index f77cfbf08..1de94c671 100644 --- a/src/gl/scene/gl_bsp.cpp +++ b/src/gl/scene/gl_bsp.cpp @@ -29,18 +29,12 @@ #include "p_local.h" #include "a_sharedglobal.h" #include "g_levellocals.h" -#include "r_sky.h" #include "p_effect.h" #include "po_man.h" -#include "doomdata.h" -#include "g_levellocals.h" #include "gl/renderer/gl_renderer.h" #include "gl/data/gl_vertexbuffer.h" #include "gl/scene/gl_scenedrawer.h" -#include "gl/scene/gl_portal.h" -#include "gl/scene/gl_wall.h" -#include "gl/utility/gl_clock.h" EXTERN_CVAR(Bool, gl_render_segs) diff --git a/src/gl/scene/gl_decal.cpp b/src/gl/scene/gl_decal.cpp index 64f91b7fe..cc4d315a2 100644 --- a/src/gl/scene/gl_decal.cpp +++ b/src/gl/scene/gl_decal.cpp @@ -38,9 +38,6 @@ #include "gl/renderer/gl_renderstate.h" #include "gl/scene/gl_drawinfo.h" #include "gl/scene/gl_scenedrawer.h" -#include "gl/shaders/gl_shader.h" -#include "gl/textures/gl_material.h" -#include "gl/utility/gl_clock.h" #include "gl/renderer/gl_quaddrawer.h" struct DecalVertex diff --git a/src/gl/scene/gl_drawinfo.cpp b/src/gl/scene/gl_drawinfo.cpp index 2385730e8..7f512ad94 100644 --- a/src/gl/scene/gl_drawinfo.cpp +++ b/src/gl/scene/gl_drawinfo.cpp @@ -30,21 +30,14 @@ #include "gl/system/gl_system.h" #include "r_sky.h" #include "r_utility.h" -#include "r_state.h" #include "doomstat.h" #include "g_levellocals.h" -#include "memarena.h" -#include "gl/system/gl_cvars.h" #include "gl/data/gl_vertexbuffer.h" #include "gl/scene/gl_drawinfo.h" #include "gl/scene/gl_portal.h" #include "gl/scene/gl_scenedrawer.h" -#include "gl/renderer/gl_lightdata.h" #include "gl/renderer/gl_renderstate.h" -#include "gl/textures/gl_material.h" -#include "gl/utility/gl_clock.h" -#include "gl/shaders/gl_shader.h" #include "gl/stereo3d/scoped_color_mask.h" #include "gl/renderer/gl_quaddrawer.h" diff --git a/src/gl/scene/gl_flats.cpp b/src/gl/scene/gl_flats.cpp index 888cc189b..34e784805 100644 --- a/src/gl/scene/gl_flats.cpp +++ b/src/gl/scene/gl_flats.cpp @@ -30,11 +30,8 @@ #include "r_defs.h" #include "r_sky.h" #include "r_utility.h" -#include "g_level.h" #include "doomstat.h" #include "d_player.h" -#include "portal.h" -#include "templates.h" #include "g_levellocals.h" #include "actorinlines.h" #include "hwrenderer/dynlights/hw_dynlightdata.h" @@ -47,10 +44,7 @@ #include "gl/data/gl_vertexbuffer.h" #include "gl/dynlights/gl_lightbuffer.h" #include "gl/scene/gl_drawinfo.h" -#include "gl/shaders/gl_shader.h" #include "gl/scene/gl_scenedrawer.h" -#include "gl/textures/gl_material.h" -#include "gl/utility/gl_clock.h" #include "gl/renderer/gl_quaddrawer.h" #ifdef _DEBUG diff --git a/src/gl/scene/gl_portal.cpp b/src/gl/scene/gl_portal.cpp index 798e9c972..7d5c4fa63 100644 --- a/src/gl/scene/gl_portal.cpp +++ b/src/gl/scene/gl_portal.cpp @@ -27,33 +27,24 @@ #include "gl/system/gl_system.h" #include "p_local.h" -#include "vectors.h" #include "c_dispatch.h" #include "doomstat.h" #include "a_sharedglobal.h" #include "r_sky.h" -#include "portal.h" #include "p_maputl.h" #include "d_player.h" #include "g_levellocals.h" -#include "actorinlines.h" #include "gl/system/gl_interface.h" -#include "gl/system/gl_framebuffer.h" -#include "gl/system/gl_cvars.h" #include "gl/renderer/gl_lightdata.h" #include "gl/renderer/gl_renderer.h" #include "gl/renderer/gl_renderstate.h" #include "gl/renderer/gl_quaddrawer.h" -#include "gl/data/gl_vertexbuffer.h" #include "gl/scene/gl_clipper.h" #include "gl/scene/gl_drawinfo.h" #include "gl/scene/gl_portal.h" #include "gl/scene/gl_scenedrawer.h" -#include "gl/shaders/gl_shader.h" #include "gl/stereo3d/scoped_color_mask.h" -#include "gl/textures/gl_material.h" -#include "gl/utility/gl_clock.h" //----------------------------------------------------------------------------- //----------------------------------------------------------------------------- diff --git a/src/gl/scene/gl_scene.cpp b/src/gl/scene/gl_scene.cpp index 3e9083037..c6e956c13 100644 --- a/src/gl/scene/gl_scene.cpp +++ b/src/gl/scene/gl_scene.cpp @@ -26,12 +26,8 @@ */ #include "gl/system/gl_system.h" -#include "i_time.h" #include "gi.h" #include "m_png.h" -#include "m_random.h" -#include "st_stuff.h" -#include "dobject.h" #include "doomstat.h" #include "g_level.h" #include "r_data/r_interpolate.h" @@ -40,11 +36,9 @@ #include "p_effect.h" #include "sbar.h" #include "po_man.h" -#include "r_utility.h" #include "p_local.h" #include "serializer.h" #include "g_levellocals.h" -#include "events.h" #include "hwrenderer/dynlights/hw_dynlightdata.h" #include "gl/dynlights/gl_lightbuffer.h" @@ -55,15 +49,11 @@ #include "gl/renderer/gl_renderstate.h" #include "gl/renderer/gl_renderbuffers.h" #include "gl/data/gl_vertexbuffer.h" -#include "gl/scene/gl_clipper.h" #include "gl/scene/gl_drawinfo.h" #include "gl/scene/gl_portal.h" #include "gl/scene/gl_scenedrawer.h" -#include "gl/shaders/gl_shader.h" #include "gl/stereo3d/gl_stereo3d.h" #include "gl/stereo3d/scoped_view_shifter.h" -#include "gl/textures/gl_material.h" -#include "gl/utility/gl_clock.h" //========================================================================== // diff --git a/src/gl/scene/gl_sky.cpp b/src/gl/scene/gl_sky.cpp index 9abd69398..c14356903 100644 --- a/src/gl/scene/gl_sky.cpp +++ b/src/gl/scene/gl_sky.cpp @@ -22,12 +22,10 @@ #include "gl/system/gl_system.h" #include "a_sharedglobal.h" -#include "g_level.h" #include "r_sky.h" #include "r_state.h" #include "r_utility.h" #include "doomdata.h" -#include "portal.h" #include "g_levellocals.h" #include "gl/renderer/gl_lightdata.h" diff --git a/src/gl/scene/gl_skydome.cpp b/src/gl/scene/gl_skydome.cpp index e40c59468..11be0365e 100644 --- a/src/gl/scene/gl_skydome.cpp +++ b/src/gl/scene/gl_skydome.cpp @@ -56,7 +56,6 @@ #include "gl/system/gl_system.h" #include "doomtype.h" #include "g_level.h" -#include "sc_man.h" #include "w_wad.h" #include "r_state.h" #include "r_utility.h" @@ -69,9 +68,7 @@ #include "gl/renderer/gl_renderstate.h" #include "gl/scene/gl_drawinfo.h" #include "gl/scene/gl_scenedrawer.h" -#include "gl/scene/gl_portal.h" #include "gl/shaders/gl_shader.h" -#include "gl/textures/gl_material.h" //----------------------------------------------------------------------------- diff --git a/src/gl/scene/gl_sprite.cpp b/src/gl/scene/gl_sprite.cpp index cc3e5be60..a73b59f9f 100644 --- a/src/gl/scene/gl_sprite.cpp +++ b/src/gl/scene/gl_sprite.cpp @@ -39,22 +39,15 @@ #include "events.h" #include "actorinlines.h" #include "r_data/r_vanillatrans.h" -#include "i_time.h" #include "gl/system/gl_interface.h" -#include "gl/system/gl_framebuffer.h" #include "gl/system/gl_cvars.h" #include "gl/renderer/gl_lightdata.h" #include "gl/renderer/gl_renderstate.h" #include "gl/renderer/gl_renderer.h" #include "gl/scene/gl_drawinfo.h" #include "gl/scene/gl_scenedrawer.h" -#include "gl/scene/gl_portal.h" #include "gl/models/gl_models.h" -#include "gl/shaders/gl_shader.h" -#include "gl/textures/gl_material.h" -#include "gl/utility/gl_clock.h" -#include "gl/data/gl_vertexbuffer.h" #include "gl/renderer/gl_quaddrawer.h" CVAR(Bool, gl_usecolorblending, true, CVAR_ARCHIVE|CVAR_GLOBALCONFIG) diff --git a/src/gl/scene/gl_spritelight.cpp b/src/gl/scene/gl_spritelight.cpp index d037cd728..af58d037e 100644 --- a/src/gl/scene/gl_spritelight.cpp +++ b/src/gl/scene/gl_spritelight.cpp @@ -29,19 +29,15 @@ #include "c_dispatch.h" #include "p_local.h" #include "p_effect.h" -#include "vectors.h" #include "g_level.h" #include "g_levellocals.h" #include "actorinlines.h" #include "hwrenderer/dynlights/hw_dynlightdata.h" -#include "gl/system/gl_cvars.h" #include "gl/renderer/gl_renderer.h" #include "gl/renderer/gl_lightdata.h" #include "gl/scene/gl_drawinfo.h" -#include "gl/scene/gl_portal.h" #include "gl/shaders/gl_shader.h" -#include "gl/textures/gl_material.h" #include "gl/dynlights/gl_lightbuffer.h" diff --git a/src/gl/scene/gl_swscene.cpp b/src/gl/scene/gl_swscene.cpp index 2015ed4d2..5a67324b1 100644 --- a/src/gl/scene/gl_swscene.cpp +++ b/src/gl/scene/gl_swscene.cpp @@ -26,13 +26,9 @@ */ #include "gl/system/gl_system.h" -#include "gl/system/gl_interface.h" #include "gl/system/gl_debug.h" #include "gl/data/gl_vertexbuffer.h" #include "gl/shaders/gl_shader.h" -#include "gl/renderer/gl_renderstate.h" -#include "v_palette.h" -#include "v_video.h" #include "gl_swscene.h" #include "w_wad.h" #include "d_player.h" diff --git a/src/gl/scene/gl_vertex.cpp b/src/gl/scene/gl_vertex.cpp index ea1fe007c..e0ca18b2b 100644 --- a/src/gl/scene/gl_vertex.cpp +++ b/src/gl/scene/gl_vertex.cpp @@ -25,12 +25,8 @@ #include "gl/system/gl_system.h" #include "gl/renderer/gl_renderer.h" -#include "gl/renderer/gl_lightdata.h" #include "gl/data/gl_vertexbuffer.h" #include "gl/scene/gl_drawinfo.h" -#include "gl/scene/gl_portal.h" -#include "gl/shaders/gl_shader.h" -#include "gl/textures/gl_material.h" EXTERN_CVAR(Bool, gl_seamless) diff --git a/src/gl/scene/gl_walls.cpp b/src/gl/scene/gl_walls.cpp index 43687f523..b89cea40e 100644 --- a/src/gl/scene/gl_walls.cpp +++ b/src/gl/scene/gl_walls.cpp @@ -24,15 +24,11 @@ #include "p_local.h" #include "p_lnspec.h" #include "a_sharedglobal.h" -#include "g_level.h" -#include "templates.h" -#include "vectors.h" #include "r_defs.h" #include "r_sky.h" #include "r_utility.h" #include "p_maputl.h" #include "doomdata.h" -#include "portal.h" #include "g_levellocals.h" #include "hwrenderer/dynlights/hw_dynlightdata.h" @@ -43,7 +39,6 @@ #include "gl/scene/gl_scenedrawer.h" #include "gl/textures/gl_material.h" #include "gl/utility/gl_clock.h" -#include "gl/shaders/gl_shader.h" void FDrawInfo::AddWall(GLWall *wall) diff --git a/src/gl/scene/gl_walls_draw.cpp b/src/gl/scene/gl_walls_draw.cpp index 05e12ed08..2f7ad330d 100644 --- a/src/gl/scene/gl_walls_draw.cpp +++ b/src/gl/scene/gl_walls_draw.cpp @@ -25,7 +25,6 @@ #include "p_lnspec.h" #include "a_sharedglobal.h" #include "g_levellocals.h" -#include "actor.h" #include "actorinlines.h" #include "hwrenderer/dynlights/hw_dynlightdata.h" @@ -39,9 +38,6 @@ #include "gl/scene/gl_drawinfo.h" #include "gl/scene/gl_portal.h" #include "gl/scene/gl_scenedrawer.h" -#include "gl/shaders/gl_shader.h" -#include "gl/textures/gl_material.h" -#include "gl/utility/gl_clock.h" #include "gl/renderer/gl_quaddrawer.h" EXTERN_CVAR(Bool, gl_seamless) diff --git a/src/gl/scene/gl_weapon.cpp b/src/gl/scene/gl_weapon.cpp index 3915c25e6..673e1fce1 100644 --- a/src/gl/scene/gl_weapon.cpp +++ b/src/gl/scene/gl_weapon.cpp @@ -31,7 +31,6 @@ #include "v_video.h" #include "doomstat.h" #include "d_player.h" -#include "g_level.h" #include "g_levellocals.h" #include "gl/system/gl_interface.h" @@ -43,8 +42,6 @@ #include "gl/scene/gl_drawinfo.h" #include "gl/scene/gl_scenedrawer.h" #include "gl/models/gl_models.h" -#include "gl/shaders/gl_shader.h" -#include "gl/textures/gl_material.h" #include "gl/renderer/gl_quaddrawer.h" #include "gl/stereo3d/gl_stereo3d.h" diff --git a/src/gl/shaders/gl_ambientshader.cpp b/src/gl/shaders/gl_ambientshader.cpp index e433ebd00..b91a6024a 100644 --- a/src/gl/shaders/gl_ambientshader.cpp +++ b/src/gl/shaders/gl_ambientshader.cpp @@ -21,11 +21,7 @@ // #include "gl/system/gl_system.h" -#include "m_swap.h" #include "v_video.h" -#include "vectors.h" -#include "gl/system/gl_interface.h" -#include "gl/system/gl_framebuffer.h" #include "gl/system/gl_cvars.h" #include "gl/shaders/gl_ambientshader.h" diff --git a/src/gl/shaders/gl_ambientshader.h b/src/gl/shaders/gl_ambientshader.h index d3310c3d6..c0f863656 100644 --- a/src/gl/shaders/gl_ambientshader.h +++ b/src/gl/shaders/gl_ambientshader.h @@ -1,6 +1,8 @@ #ifndef __GL_AMBIENTSHADER_H #define __GL_AMBIENTSHADER_H +#include + #include "gl_shaderprogram.h" class FLinearDepthShader @@ -90,4 +92,4 @@ private: bool mMultisample = false; }; -#endif \ No newline at end of file +#endif diff --git a/src/gl/shaders/gl_bloomshader.cpp b/src/gl/shaders/gl_bloomshader.cpp index 9dbc4ff6c..2623723df 100644 --- a/src/gl/shaders/gl_bloomshader.cpp +++ b/src/gl/shaders/gl_bloomshader.cpp @@ -26,12 +26,7 @@ */ #include "gl/system/gl_system.h" -#include "m_swap.h" #include "v_video.h" -#include "vectors.h" -#include "gl/system/gl_interface.h" -#include "gl/system/gl_framebuffer.h" -#include "gl/system/gl_cvars.h" #include "gl/shaders/gl_bloomshader.h" void FBloomExtractShader::Bind() diff --git a/src/gl/shaders/gl_blurshader.cpp b/src/gl/shaders/gl_blurshader.cpp index 71cf6ffa3..970b0ebf3 100644 --- a/src/gl/shaders/gl_blurshader.cpp +++ b/src/gl/shaders/gl_blurshader.cpp @@ -26,12 +26,7 @@ */ #include "gl/system/gl_system.h" -#include "m_swap.h" #include "v_video.h" -#include "vectors.h" -#include "gl/system/gl_interface.h" -#include "gl/system/gl_framebuffer.h" -#include "gl/system/gl_cvars.h" #include "gl/shaders/gl_blurshader.h" #include "gl/data/gl_vertexbuffer.h" #include "gl/renderer/gl_renderer.h" diff --git a/src/gl/shaders/gl_colormapshader.cpp b/src/gl/shaders/gl_colormapshader.cpp index 2036599e9..f02150c0a 100644 --- a/src/gl/shaders/gl_colormapshader.cpp +++ b/src/gl/shaders/gl_colormapshader.cpp @@ -26,12 +26,7 @@ */ #include "gl/system/gl_system.h" -#include "m_swap.h" #include "v_video.h" -#include "vectors.h" -#include "gl/system/gl_interface.h" -#include "gl/system/gl_framebuffer.h" -#include "gl/system/gl_cvars.h" #include "gl/shaders/gl_colormapshader.h" void FColormapShader::Bind() diff --git a/src/gl/shaders/gl_lensshader.cpp b/src/gl/shaders/gl_lensshader.cpp index a92b2dece..611d31a28 100644 --- a/src/gl/shaders/gl_lensshader.cpp +++ b/src/gl/shaders/gl_lensshader.cpp @@ -26,12 +26,7 @@ */ #include "gl/system/gl_system.h" -#include "m_swap.h" #include "v_video.h" -#include "vectors.h" -#include "gl/system/gl_interface.h" -#include "gl/system/gl_framebuffer.h" -#include "gl/system/gl_cvars.h" #include "gl/shaders/gl_lensshader.h" void FLensShader::Bind() diff --git a/src/gl/shaders/gl_postprocessshader.cpp b/src/gl/shaders/gl_postprocessshader.cpp index 1eae66ec2..a1b50f24f 100644 --- a/src/gl/shaders/gl_postprocessshader.cpp +++ b/src/gl/shaders/gl_postprocessshader.cpp @@ -21,20 +21,15 @@ // #include "gl/system/gl_system.h" -#include "m_swap.h" #include "v_video.h" -#include "vectors.h" #include "w_wad.h" #include "gl/system/gl_interface.h" -#include "gl/system/gl_framebuffer.h" #include "gl/system/gl_debug.h" -#include "gl/system/gl_cvars.h" #include "gl/renderer/gl_renderer.h" #include "gl/renderer/gl_postprocessstate.h" #include "gl/renderer/gl_renderbuffers.h" #include "gl/shaders/gl_postprocessshader.h" #include "gl/shaders/gl_postprocessshaderinstance.h" -#include "textures/textures.h" #include "textures/bitmap.h" CVAR(Bool, gl_custompost, true, 0) diff --git a/src/gl/shaders/gl_present3dRowshader.cpp b/src/gl/shaders/gl_present3dRowshader.cpp index 0b689f5e8..9162d95af 100644 --- a/src/gl/shaders/gl_present3dRowshader.cpp +++ b/src/gl/shaders/gl_present3dRowshader.cpp @@ -28,12 +28,6 @@ */ #include "gl/system/gl_system.h" -#include "m_swap.h" -#include "v_video.h" -#include "vectors.h" -#include "gl/system/gl_interface.h" -#include "gl/system/gl_framebuffer.h" -#include "gl/system/gl_cvars.h" #include "gl/shaders/gl_present3dRowshader.h" void FPresentStereoShaderBase::Init(const char * vtx_shader_name, const char * program_name) diff --git a/src/gl/shaders/gl_presentshader.cpp b/src/gl/shaders/gl_presentshader.cpp index b3044b7bc..503d75803 100644 --- a/src/gl/shaders/gl_presentshader.cpp +++ b/src/gl/shaders/gl_presentshader.cpp @@ -26,12 +26,7 @@ */ #include "gl/system/gl_system.h" -#include "m_swap.h" #include "v_video.h" -#include "vectors.h" -#include "gl/system/gl_interface.h" -#include "gl/system/gl_framebuffer.h" -#include "gl/system/gl_cvars.h" #include "gl/shaders/gl_presentshader.h" void FPresentShaderBase::Init(const char * vtx_shader_name, const char * program_name) diff --git a/src/gl/shaders/gl_shader.cpp b/src/gl/shaders/gl_shader.cpp index c174215e9..ea8003d0a 100644 --- a/src/gl/shaders/gl_shader.cpp +++ b/src/gl/shaders/gl_shader.cpp @@ -29,12 +29,8 @@ #include "gl/system/gl_system.h" #include "c_cvars.h" #include "v_video.h" -#include "name.h" #include "w_wad.h" -#include "i_system.h" #include "doomerrors.h" -#include "v_palette.h" -#include "sc_man.h" #include "cmdlib.h" #include "vm.h" #include "d_player.h" @@ -44,11 +40,8 @@ #include "r_data/matrix.h" #include "gl/renderer/gl_renderer.h" #include "gl/renderer/gl_renderstate.h" -#include "gl/system/gl_cvars.h" #include "gl/shaders/gl_shader.h" -#include "gl/shaders/gl_shaderprogram.h" #include "gl/shaders/gl_postprocessshader.h" -#include "gl/textures/gl_material.h" #include "gl/dynlights/gl_lightbuffer.h" static bool IsGlslWhitespace(char c) diff --git a/src/gl/shaders/gl_shaderprogram.cpp b/src/gl/shaders/gl_shaderprogram.cpp index 5db66840d..667f9c78f 100644 --- a/src/gl/shaders/gl_shaderprogram.cpp +++ b/src/gl/shaders/gl_shaderprogram.cpp @@ -26,16 +26,12 @@ */ #include "gl/system/gl_system.h" -#include "m_swap.h" #include "v_video.h" -#include "vectors.h" #include "gl/system/gl_interface.h" #include "gl/system/gl_cvars.h" #include "gl/system/gl_debug.h" #include "gl/shaders/gl_shaderprogram.h" #include "w_wad.h" -#include "i_system.h" -#include "doomerrors.h" FShaderProgram::FShaderProgram() { diff --git a/src/gl/shaders/gl_shadowmapshader.cpp b/src/gl/shaders/gl_shadowmapshader.cpp index 41921ef87..684d44339 100644 --- a/src/gl/shaders/gl_shadowmapshader.cpp +++ b/src/gl/shaders/gl_shadowmapshader.cpp @@ -22,12 +22,6 @@ #include "gl/system/gl_system.h" #include "files.h" -#include "m_swap.h" -#include "v_video.h" -#include "vectors.h" -#include "gl/system/gl_interface.h" -#include "gl/system/gl_framebuffer.h" -#include "gl/system/gl_cvars.h" #include "gl/shaders/gl_shadowmapshader.h" void FShadowMapShader::Bind() diff --git a/src/gl/shaders/gl_tonemapshader.cpp b/src/gl/shaders/gl_tonemapshader.cpp index eede7e915..7a50a5429 100644 --- a/src/gl/shaders/gl_tonemapshader.cpp +++ b/src/gl/shaders/gl_tonemapshader.cpp @@ -26,11 +26,7 @@ */ #include "gl/system/gl_system.h" -#include "m_swap.h" #include "v_video.h" -#include "vectors.h" -#include "gl/system/gl_interface.h" -#include "gl/system/gl_framebuffer.h" #include "gl/system/gl_cvars.h" #include "gl/shaders/gl_tonemapshader.h" diff --git a/src/gl/stereo3d/gl_anaglyph.cpp b/src/gl/stereo3d/gl_anaglyph.cpp index 0eb994baf..8aaa0e72d 100644 --- a/src/gl/stereo3d/gl_anaglyph.cpp +++ b/src/gl/stereo3d/gl_anaglyph.cpp @@ -26,7 +26,6 @@ */ #include "gl_anaglyph.h" -#include "gl/renderer/gl_renderer.h" #include "gl/renderer/gl_renderbuffers.h" namespace s3d { diff --git a/src/gl/stereo3d/gl_interleaved3d.cpp b/src/gl/stereo3d/gl_interleaved3d.cpp index bc6a7acd6..9cb9be870 100644 --- a/src/gl/stereo3d/gl_interleaved3d.cpp +++ b/src/gl/stereo3d/gl_interleaved3d.cpp @@ -34,9 +34,7 @@ */ #include "gl_interleaved3d.h" -#include "gl/renderer/gl_renderer.h" #include "gl/renderer/gl_renderbuffers.h" -#include "gl/renderer/gl_renderer.h" #include "gl/renderer/gl_postprocessstate.h" #include "gl/system/gl_framebuffer.h" #include "gl/shaders/gl_present3dRowshader.h" diff --git a/src/gl/stereo3d/gl_quadstereo.cpp b/src/gl/stereo3d/gl_quadstereo.cpp index 769f28906..545dded20 100644 --- a/src/gl/stereo3d/gl_quadstereo.cpp +++ b/src/gl/stereo3d/gl_quadstereo.cpp @@ -26,7 +26,6 @@ */ #include "gl_quadstereo.h" -#include "gl/renderer/gl_renderer.h" #include "gl/renderer/gl_renderbuffers.h" namespace s3d { diff --git a/src/gl/stereo3d/gl_sidebyside3d.cpp b/src/gl/stereo3d/gl_sidebyside3d.cpp index ecb3ec1cc..e6c25e99b 100644 --- a/src/gl/stereo3d/gl_sidebyside3d.cpp +++ b/src/gl/stereo3d/gl_sidebyside3d.cpp @@ -34,7 +34,6 @@ */ #include "gl_sidebyside3d.h" -#include "gl/renderer/gl_renderer.h" #include "gl/renderer/gl_renderbuffers.h" namespace s3d { diff --git a/src/gl/stereo3d/gl_stereo3d.cpp b/src/gl/stereo3d/gl_stereo3d.cpp index 6b1623ba6..1453394c3 100644 --- a/src/gl/stereo3d/gl_stereo3d.cpp +++ b/src/gl/stereo3d/gl_stereo3d.cpp @@ -27,9 +27,6 @@ #include "gl/system/gl_system.h" #include "gl/stereo3d/gl_stereo3d.h" -#include "gl/renderer/gl_renderer.h" -#include "vectors.h" // RAD2DEG -#include "doomtype.h" // M_PI namespace s3d { diff --git a/src/gl/stereo3d/gl_stereo_cvars.cpp b/src/gl/stereo3d/gl_stereo_cvars.cpp index e7ce699f5..fc170d324 100644 --- a/src/gl/stereo3d/gl_stereo_cvars.cpp +++ b/src/gl/stereo3d/gl_stereo_cvars.cpp @@ -31,7 +31,6 @@ #include "gl/stereo3d/gl_quadstereo.h" #include "gl/stereo3d/gl_sidebyside3d.h" #include "gl/stereo3d/gl_interleaved3d.h" -#include "gl/system/gl_cvars.h" #include "version.h" // Set up 3D-specific console variables: diff --git a/src/gl/stereo3d/gl_stereo_leftright.cpp b/src/gl/stereo3d/gl_stereo_leftright.cpp index f2b1ba3fc..b3b677fb7 100644 --- a/src/gl/stereo3d/gl_stereo_leftright.cpp +++ b/src/gl/stereo3d/gl_stereo_leftright.cpp @@ -33,7 +33,6 @@ #include "gl/renderer/gl_renderstate.h" #include "gl/renderer/gl_renderer.h" #include "gl/renderer/gl_renderbuffers.h" -#include EXTERN_CVAR(Float, vr_screendist) EXTERN_CVAR(Float, vr_hunits_per_meter) diff --git a/src/gl/system/gl_debug.cpp b/src/gl/system/gl_debug.cpp index 7aa425349..deb4cb633 100644 --- a/src/gl/system/gl_debug.cpp +++ b/src/gl/system/gl_debug.cpp @@ -27,17 +27,12 @@ #include "templates.h" #include "gl/system/gl_system.h" -#include "gl/system/gl_interface.h" #include "gl/system/gl_debug.h" #include "stats.h" #include #include #include -#ifndef _MSC_VER -#include -#endif - CUSTOM_CVAR(Int, gl_debug_level, 0, CVAR_ARCHIVE | CVAR_GLOBALCONFIG | CVAR_NOINITCALL) { if (!FGLDebug::HasDebugApi()) diff --git a/src/gl/system/gl_framebuffer.cpp b/src/gl/system/gl_framebuffer.cpp index bdebfff50..36e6343bd 100644 --- a/src/gl/system/gl_framebuffer.cpp +++ b/src/gl/system/gl_framebuffer.cpp @@ -27,23 +27,14 @@ */ #include "gl/system/gl_system.h" -#include "m_swap.h" #include "v_video.h" -#include "doomstat.h" #include "m_png.h" -#include "m_crc32.h" -#include "vectors.h" -#include "v_palette.h" #include "templates.h" -#include "textures/skyboxtexture.h" #include "gl/system/gl_interface.h" #include "gl/system/gl_framebuffer.h" #include "gl/renderer/gl_renderer.h" #include "gl/renderer/gl_renderbuffers.h" -#include "gl/renderer/gl_renderstate.h" -#include "gl/renderer/gl_lightdata.h" -#include "gl/textures/gl_hwtexture.h" #include "gl/textures/gl_samplers.h" #include "gl/utility/gl_clock.h" #include "gl/data/gl_vertexbuffer.h" diff --git a/src/gl/system/gl_interface.cpp b/src/gl/system/gl_interface.cpp index 94b28712d..ea1cb2eed 100644 --- a/src/gl/system/gl_interface.cpp +++ b/src/gl/system/gl_interface.cpp @@ -30,11 +30,7 @@ #include "tarray.h" #include "doomtype.h" #include "m_argv.h" -#include "zstring.h" #include "version.h" -#include "i_system.h" -#include "v_text.h" -#include "r_data/r_translate.h" #include "gl/system/gl_interface.h" #include "gl/system/gl_cvars.h" diff --git a/src/gl/system/gl_menu.cpp b/src/gl/system/gl_menu.cpp index 489ad4a9d..1d6a64cd0 100644 --- a/src/gl/system/gl_menu.cpp +++ b/src/gl/system/gl_menu.cpp @@ -23,12 +23,8 @@ #include "gl/system/gl_system.h" #include "c_cvars.h" -#include "c_dispatch.h" #include "v_video.h" -#include "version.h" -#include "gl/system/gl_interface.h" #include "gl/system/gl_cvars.h" -#include "gl/renderer/gl_renderer.h" #include "menu/menu.h" diff --git a/src/gl/system/gl_wipe.cpp b/src/gl/system/gl_wipe.cpp index 289a3edb7..bcd0183d8 100644 --- a/src/gl/system/gl_wipe.cpp +++ b/src/gl/system/gl_wipe.cpp @@ -30,16 +30,12 @@ #include "w_wad.h" #include "v_palette.h" #include "templates.h" -#include "vectors.h" #include "gl/system/gl_interface.h" #include "gl/renderer/gl_renderer.h" #include "gl/renderer/gl_renderstate.h" #include "gl/renderer/gl_renderbuffers.h" #include "gl/system/gl_framebuffer.h" -#include "gl/system/gl_cvars.h" -#include "gl/shaders/gl_shader.h" -#include "gl/textures/gl_material.h" #include "gl/textures/gl_samplers.h" #include "gl/data/gl_vertexbuffer.h" diff --git a/src/gl/textures/gl_hwtexture.cpp b/src/gl/textures/gl_hwtexture.cpp index 551f628f0..3881da78f 100644 --- a/src/gl/textures/gl_hwtexture.cpp +++ b/src/gl/textures/gl_hwtexture.cpp @@ -28,10 +28,7 @@ #include "gl/system/gl_system.h" #include "templates.h" -#include "m_crc32.h" #include "c_cvars.h" -#include "c_dispatch.h" -#include "v_palette.h" #include "gl/system/gl_interface.h" #include "gl/system/gl_cvars.h" diff --git a/src/gl/textures/gl_material.cpp b/src/gl/textures/gl_material.cpp index ed1c86e46..92b648c9e 100644 --- a/src/gl/textures/gl_material.cpp +++ b/src/gl/textures/gl_material.cpp @@ -24,23 +24,12 @@ #include "w_wad.h" #include "m_png.h" #include "sbar.h" -#include "gi.h" -#include "cmdlib.h" -#include "c_dispatch.h" #include "stats.h" #include "r_utility.h" -#include "templates.h" -#include "sc_man.h" -#include "r_data/renderstyle.h" -#include "colormatcher.h" #include "textures/warpbuffer.h" -#include "textures/bitmap.h" - -//#include "gl/gl_intern.h" #include "gl/system/gl_interface.h" #include "gl/system/gl_framebuffer.h" -#include "gl/renderer/gl_lightdata.h" #include "gl/renderer/gl_renderer.h" #include "gl/textures/gl_material.h" #include "gl/textures/gl_samplers.h" diff --git a/src/gl/textures/gl_samplers.cpp b/src/gl/textures/gl_samplers.cpp index ef6d9f3f4..f3169610c 100644 --- a/src/gl/textures/gl_samplers.cpp +++ b/src/gl/textures/gl_samplers.cpp @@ -21,9 +21,7 @@ // #include "gl/system/gl_system.h" -#include "templates.h" #include "c_cvars.h" -#include "c_dispatch.h" #include "gl/system/gl_interface.h" #include "gl/system/gl_cvars.h" diff --git a/src/gl/textures/gl_texture.cpp b/src/gl/textures/gl_texture.cpp index e6dafc4c5..15ba58dc0 100644 --- a/src/gl/textures/gl_texture.cpp +++ b/src/gl/textures/gl_texture.cpp @@ -27,15 +27,10 @@ #include "gl/system/gl_system.h" #include "c_cvars.h" #include "w_wad.h" -#include "templates.h" -#include "colormatcher.h" #include "r_data/r_translate.h" #include "c_dispatch.h" #include "r_state.h" #include "actor.h" -#include "cmdlib.h" -#include "v_palette.h" -#include "sc_man.h" #include "textures/skyboxtexture.h" #include "gl/system/gl_interface.h" diff --git a/src/hu_scores.cpp b/src/hu_scores.cpp index 91c3dacfc..fd4c4123b 100644 --- a/src/hu_scores.cpp +++ b/src/hu_scores.cpp @@ -36,7 +36,6 @@ // HEADER FILES ------------------------------------------------------------ #include "c_console.h" -#include "st_stuff.h" #include "teaminfo.h" #include "templates.h" #include "v_video.h" @@ -44,7 +43,6 @@ #include "g_level.h" #include "d_netinf.h" #include "v_font.h" -#include "v_palette.h" #include "d_player.h" #include "hu_stuff.h" #include "gstrings.h" diff --git a/src/hwrenderer/data/flatvertices.cpp b/src/hwrenderer/data/flatvertices.cpp index fab732d06..86bf78261 100644 --- a/src/hwrenderer/data/flatvertices.cpp +++ b/src/hwrenderer/data/flatvertices.cpp @@ -28,7 +28,6 @@ #include "doomtype.h" #include "p_local.h" #include "r_state.h" -#include "m_argv.h" #include "c_cvars.h" #include "g_levellocals.h" #include "flatvertices.h" diff --git a/src/hwrenderer/scene/hw_renderhacks.cpp b/src/hwrenderer/scene/hw_renderhacks.cpp index 2ae37e37b..6a1b5ceea 100644 --- a/src/hwrenderer/scene/hw_renderhacks.cpp +++ b/src/hwrenderer/scene/hw_renderhacks.cpp @@ -28,7 +28,6 @@ #include "a_sharedglobal.h" #include "r_utility.h" #include "r_sky.h" -#include "g_level.h" #include "g_levellocals.h" #include "hwrenderer/scene/hw_drawinfo.h" diff --git a/src/i_net.cpp b/src/i_net.cpp index 48160373c..5c74c87ae 100644 --- a/src/i_net.cpp +++ b/src/i_net.cpp @@ -34,7 +34,6 @@ #include #include -#include /* [Petteri] Use Winsock for Win32: */ #ifdef __WIN32__ @@ -56,17 +55,12 @@ #include "doomtype.h" #include "i_system.h" -#include "d_event.h" #include "d_net.h" #include "m_argv.h" -#include "m_swap.h" #include "m_crc32.h" #include "d_player.h" -#include "templates.h" -#include "c_console.h" #include "st_start.h" #include "m_misc.h" -#include "doomstat.h" #include "i_net.h" diff --git a/src/i_time.cpp b/src/i_time.cpp index 8fd058723..6bd18502e 100644 --- a/src/i_time.cpp +++ b/src/i_time.cpp @@ -35,7 +35,6 @@ #include #include -#include #include "i_time.h" #include "doomdef.h" #include "c_cvars.h" diff --git a/src/info.cpp b/src/info.cpp index 28feeb826..dd87e85f6 100644 --- a/src/info.cpp +++ b/src/info.cpp @@ -37,7 +37,6 @@ #include "doomstat.h" #include "info.h" -#include "m_fixed.h" #include "c_dispatch.h" #include "d_net.h" #include "v_text.h" @@ -45,18 +44,12 @@ #include "gi.h" #include "actor.h" #include "r_state.h" -#include "i_system.h" #include "p_local.h" -#include "templates.h" -#include "cmdlib.h" -#include "g_level.h" #include "stats.h" #include "thingdef.h" #include "d_player.h" -#include "doomerrors.h" #include "events.h" #include "types.h" -#include "vm.h" extern void LoadActors (); extern void InitBotStuff(); diff --git a/src/intermission/intermission.cpp b/src/intermission/intermission.cpp index 25750a58e..615f79fae 100644 --- a/src/intermission/intermission.cpp +++ b/src/intermission/intermission.cpp @@ -38,16 +38,13 @@ #include "w_wad.h" #include "gi.h" #include "v_video.h" -#include "v_palette.h" #include "d_main.h" #include "gstrings.h" #include "intermission/intermission.h" #include "actor.h" #include "d_player.h" #include "r_state.h" -#include "r_data/r_translate.h" #include "c_bind.h" -#include "g_level.h" #include "p_conversation.h" #include "menu/menu.h" #include "d_net.h" diff --git a/src/intermission/intermission_parse.cpp b/src/intermission/intermission_parse.cpp index c3fb7b53e..c0fa4a337 100644 --- a/src/intermission/intermission_parse.cpp +++ b/src/intermission/intermission_parse.cpp @@ -37,7 +37,6 @@ #include "intermission/intermission.h" #include "g_level.h" #include "w_wad.h" -#include "gi.h" static void ReplaceIntermission(FName intname,FIntermissionDescriptor *desc) diff --git a/src/keysections.cpp b/src/keysections.cpp index 88ca7b633..29b6b53d5 100644 --- a/src/keysections.cpp +++ b/src/keysections.cpp @@ -35,8 +35,6 @@ #include "menu/menu.h" -#include "g_level.h" -#include "d_player.h" #include "gi.h" #include "c_bind.h" #include "c_dispatch.h" diff --git a/src/m_argv.cpp b/src/m_argv.cpp index aac5771d6..0a2744e5d 100644 --- a/src/m_argv.cpp +++ b/src/m_argv.cpp @@ -34,8 +34,6 @@ #include #include "m_argv.h" -#include "cmdlib.h" -#include "i_system.h" //=========================================================================== // diff --git a/src/m_cheat.cpp b/src/m_cheat.cpp index ffba7a806..768802693 100644 --- a/src/m_cheat.cpp +++ b/src/m_cheat.cpp @@ -37,34 +37,22 @@ #include -#include #include "m_cheat.h" #include "d_player.h" -#include "doomstat.h" #include "gstrings.h" #include "p_local.h" #include "gi.h" #include "p_enemy.h" #include "sbar.h" #include "c_dispatch.h" -#include "v_video.h" -#include "w_wad.h" #include "a_keys.h" -#include "templates.h" -#include "c_console.h" -#include "r_data/r_translate.h" -#include "g_level.h" #include "d_net.h" -#include "d_dehacked.h" -#include "gi.h" #include "serializer.h" #include "r_utility.h" #include "a_morph.h" #include "g_levellocals.h" #include "vm.h" -#include "events.h" -#include "p_acs.h" // [RH] Actually handle the cheat. The cheat code in st_stuff.c now just // writes some bytes to the network data stream, and the network code diff --git a/src/m_misc.cpp b/src/m_misc.cpp index ea55a906c..e0eb5d165 100644 --- a/src/m_misc.cpp +++ b/src/m_misc.cpp @@ -28,28 +28,20 @@ #include #include -#include #include #include -#include #include #include "r_defs.h" -#include "doomtype.h" #include "version.h" #if defined(_WIN32) #include #else -#include #endif -#include - -#include "doomdef.h" - #include "m_swap.h" #include "m_argv.h" @@ -59,15 +51,9 @@ #include "c_dispatch.h" #include "c_bind.h" -#include "i_system.h" #include "i_video.h" #include "v_video.h" -#include "hu_stuff.h" - -// State. -#include "doomstat.h" - // Data. #include "m_misc.h" #include "m_png.h" diff --git a/src/m_png.cpp b/src/m_png.cpp index ac2035ee6..06cf4ce2e 100644 --- a/src/m_png.cpp +++ b/src/m_png.cpp @@ -35,7 +35,6 @@ // HEADER FILES ------------------------------------------------------------ #include -#include #include #ifdef _MSC_VER #include // for alloca() @@ -47,8 +46,6 @@ #include "r_defs.h" #include "v_video.h" #include "m_png.h" -#include "templates.h" -#include "files.h" // MACROS ------------------------------------------------------------------ diff --git a/src/m_random.cpp b/src/m_random.cpp index ecb2bfe9e..5b77bccaf 100644 --- a/src/m_random.cpp +++ b/src/m_random.cpp @@ -63,11 +63,8 @@ #include "m_random.h" #include "serializer.h" #include "b_bot.h" -#include "m_png.h" #include "m_crc32.h" -#include "i_system.h" #include "c_dispatch.h" -#include "files.h" // MACROS ------------------------------------------------------------------ diff --git a/src/memarena.cpp b/src/memarena.cpp index af59c81c7..d19521edf 100644 --- a/src/memarena.cpp +++ b/src/memarena.cpp @@ -38,10 +38,8 @@ */ #include "doomtype.h" -#include "m_alloc.h" #include "memarena.h" #include "c_dispatch.h" -#include "zstring.h" struct FMemArena::Block { diff --git a/src/menu/joystickmenu.cpp b/src/menu/joystickmenu.cpp index fb50834c0..388c012df 100644 --- a/src/menu/joystickmenu.cpp +++ b/src/menu/joystickmenu.cpp @@ -32,23 +32,7 @@ ** */ -#include - #include "menu/menu.h" -#include "c_dispatch.h" -#include "w_wad.h" -#include "sc_man.h" -#include "v_font.h" -#include "g_level.h" -#include "d_player.h" -#include "v_video.h" -#include "gi.h" -#include "i_system.h" -#include "c_bind.h" -#include "v_palette.h" -#include "d_event.h" -#include "d_gui.h" -#include "i_music.h" #include "m_joy.h" #include "vm.h" diff --git a/src/menu/loadsavemenu.cpp b/src/menu/loadsavemenu.cpp index d43a2e42c..8d49ddc2d 100644 --- a/src/menu/loadsavemenu.cpp +++ b/src/menu/loadsavemenu.cpp @@ -34,20 +34,13 @@ */ #include "menu/menu.h" -#include "i_system.h" #include "version.h" #include "g_game.h" #include "m_png.h" #include "w_wad.h" #include "v_text.h" -#include "d_event.h" #include "gstrings.h" -#include "v_palette.h" -#include "doomstat.h" -#include "gi.h" -#include "d_gui.h" #include "serializer.h" -#include "resourcefiles/resourcefile.h" #include "vm.h" // Save name length limit for old binary formats. diff --git a/src/menu/menu.cpp b/src/menu/menu.cpp index 915449e45..f95285c51 100644 --- a/src/menu/menu.cpp +++ b/src/menu/menu.cpp @@ -37,24 +37,18 @@ #include "c_dispatch.h" #include "d_gui.h" #include "d_player.h" -#include "g_level.h" #include "c_console.h" #include "c_bind.h" -#include "s_sound.h" #include "p_tick.h" #include "g_game.h" -#include "c_cvars.h" #include "d_event.h" -#include "v_video.h" #include "hu_stuff.h" #include "gi.h" -#include "v_palette.h" #include "g_input.h" #include "gameconfigfile.h" #include "gstrings.h" #include "r_utility.h" #include "menu/menu.h" -#include "textures/textures.h" #include "vm.h" #include "events.h" #include "gl/renderer/gl_renderer.h" // for menu blur diff --git a/src/menu/menudef.cpp b/src/menu/menudef.cpp index 840c0fce2..ac8d68fc6 100644 --- a/src/menu/menudef.cpp +++ b/src/menu/menudef.cpp @@ -34,20 +34,9 @@ #include #include "menu/menu.h" -#include "c_dispatch.h" #include "w_wad.h" -#include "sc_man.h" -#include "v_font.h" -#include "g_level.h" -#include "d_player.h" -#include "v_video.h" -#include "i_system.h" #include "c_bind.h" -#include "v_palette.h" -#include "d_event.h" -#include "d_gui.h" #include "i_music.h" -#include "m_joy.h" #include "gi.h" #include "i_sound.h" #include "cmdlib.h" diff --git a/src/menu/messagebox.cpp b/src/menu/messagebox.cpp index bf5f4410f..f2a2453ea 100644 --- a/src/menu/messagebox.cpp +++ b/src/menu/messagebox.cpp @@ -34,10 +34,6 @@ #include #include "menu/menu.h" -#include "d_event.h" -#include "d_gui.h" -#include "v_video.h" -#include "v_text.h" #include "d_main.h" #include "gstrings.h" #include "gi.h" diff --git a/src/menu/optionmenu.cpp b/src/menu/optionmenu.cpp index 87f0adcf1..ebe27800b 100644 --- a/src/menu/optionmenu.cpp +++ b/src/menu/optionmenu.cpp @@ -33,19 +33,6 @@ */ #include "v_video.h" -#include "v_font.h" -#include "cmdlib.h" -#include "gstrings.h" -#include "g_level.h" -#include "gi.h" -#include "v_palette.h" -#include "d_gui.h" -#include "d_event.h" -#include "c_dispatch.h" -#include "c_console.h" -#include "c_cvars.h" -#include "c_bind.h" -#include "gameconfigfile.h" #include "menu/menu.h" diff --git a/src/menu/playermenu.cpp b/src/menu/playermenu.cpp index 55f85c221..507470e57 100644 --- a/src/menu/playermenu.cpp +++ b/src/menu/playermenu.cpp @@ -34,19 +34,10 @@ */ #include "menu/menu.h" -#include "v_video.h" -#include "v_font.h" #include "gi.h" -#include "gstrings.h" -#include "d_player.h" -#include "d_event.h" -#include "d_gui.h" #include "c_dispatch.h" #include "teaminfo.h" -#include "v_palette.h" #include "r_state.h" -#include "r_data/r_translate.h" -#include "v_text.h" #include "vm.h" EXTERN_CVAR(Int, team) diff --git a/src/menu/videomenu.cpp b/src/menu/videomenu.cpp index d3ba14e92..ebd161516 100644 --- a/src/menu/videomenu.cpp +++ b/src/menu/videomenu.cpp @@ -33,28 +33,10 @@ ** */ -#include - #include "menu/menu.h" -#include "c_dispatch.h" -#include "w_wad.h" -#include "sc_man.h" -#include "v_font.h" -#include "g_level.h" -#include "d_player.h" -#include "v_video.h" -#include "gi.h" -#include "i_system.h" -#include "c_bind.h" -#include "v_palette.h" -#include "d_event.h" -#include "d_gui.h" -#include "i_music.h" -#include "m_joy.h" #include "sbar.h" #include "hardware.h" #include "vm.h" -#include "r_videoscale.h" #include "i_time.h" /*======================================= diff --git a/src/nodebuild.cpp b/src/nodebuild.cpp index 5b849687c..a352a8f0a 100644 --- a/src/nodebuild.cpp +++ b/src/nodebuild.cpp @@ -37,20 +37,12 @@ ** */ -#include -#include #include #include -#include #include #include "doomdata.h" #include "nodebuild.h" -#include "templates.h" -#include "tarray.h" -#include "m_bbox.h" -#include "c_console.h" -#include "r_state.h" const int MaxSegs = 64; const int SplitCost = 8; diff --git a/src/nodebuild_extract.cpp b/src/nodebuild_extract.cpp index 089303fbe..4d7aaf586 100644 --- a/src/nodebuild_extract.cpp +++ b/src/nodebuild_extract.cpp @@ -42,7 +42,6 @@ #include #include "nodebuild.h" -#include "templates.h" #include "g_levellocals.h" #if 0 diff --git a/src/nodebuild_utility.cpp b/src/nodebuild_utility.cpp index 9dd3c7786..a6e724ed4 100644 --- a/src/nodebuild_utility.cpp +++ b/src/nodebuild_utility.cpp @@ -42,16 +42,11 @@ #include #endif #include -#include #include "nodebuild.h" -#include "templates.h" -#include "m_bbox.h" #include "i_system.h" #include "po_man.h" -#include "r_state.h" #include "g_levellocals.h" -#include "math/cmath.h" static const int PO_LINE_START = 1; static const int PO_LINE_EXPLICIT = 5; diff --git a/src/p_3dfloors.cpp b/src/p_3dfloors.cpp index 376a1b060..4254c92d4 100644 --- a/src/p_3dfloors.cpp +++ b/src/p_3dfloors.cpp @@ -40,13 +40,10 @@ #include "p_lnspec.h" #include "p_maputl.h" #include "w_wad.h" -#include "sc_man.h" #include "g_level.h" #include "p_terrain.h" #include "d_player.h" -#include "r_utility.h" #include "p_spec.h" -#include "r_data/colormaps.h" #include "g_levellocals.h" #include "actorinlines.h" diff --git a/src/p_acs.cpp b/src/p_acs.cpp index fe96415ac..445c8125f 100644 --- a/src/p_acs.cpp +++ b/src/p_acs.cpp @@ -42,31 +42,21 @@ #include "p_local.h" #include "d_player.h" #include "p_spec.h" -#include "g_level.h" -#include "s_sound.h" #include "p_acs.h" #include "p_saveg.h" #include "p_lnspec.h" #include "p_enemy.h" -#include "m_random.h" -#include "doomstat.h" #include "c_console.h" #include "c_dispatch.h" #include "s_sndseq.h" -#include "i_system.h" #include "sbar.h" -#include "m_swap.h" #include "a_sharedglobal.h" -#include "v_video.h" #include "w_wad.h" #include "r_sky.h" #include "gstrings.h" #include "gi.h" #include "g_game.h" -#include "sc_man.h" #include "c_bind.h" -#include "info.h" -#include "r_data/r_translate.h" #include "cmdlib.h" #include "m_png.h" #include "p_setup.h" @@ -80,15 +70,10 @@ #include "r_utility.h" #include "a_morph.h" #include "i_music.h" -#include "serializer.h" #include "thingdef.h" -#include "a_pickups.h" -#include "r_data/colormaps.h" #include "g_levellocals.h" #include "actorinlines.h" -#include "stats.h" #include "types.h" -#include "vm.h" // P-codes for ACS scripts enum diff --git a/src/p_actionfunctions.cpp b/src/p_actionfunctions.cpp index 0cb4e9849..2af237b8a 100644 --- a/src/p_actionfunctions.cpp +++ b/src/p_actionfunctions.cpp @@ -41,48 +41,33 @@ #include "gi.h" #include "g_level.h" #include "actor.h" -#include "info.h" -#include "sc_man.h" -#include "tarray.h" -#include "w_wad.h" -#include "templates.h" #include "r_defs.h" #include "a_pickups.h" -#include "s_sound.h" #include "cmdlib.h" #include "p_lnspec.h" #include "p_effect.h" #include "p_enemy.h" #include "decallib.h" -#include "m_random.h" -#include "i_system.h" #include "p_local.h" #include "c_console.h" #include "doomerrors.h" #include "a_sharedglobal.h" -#include "v_video.h" #include "v_font.h" #include "doomstat.h" -#include "v_palette.h" #include "g_shared/a_specialspot.h" #include "actorptrselect.h" -#include "m_bbox.h" -#include "r_data/r_translate.h" #include "p_trace.h" #include "p_setup.h" #include "gstrings.h" #include "d_player.h" #include "p_maputl.h" #include "p_spec.h" -#include "templates.h" #include "v_text.h" #include "thingdef.h" -#include "math/cmath.h" #include "g_levellocals.h" #include "r_utility.h" #include "sbar.h" #include "actorinlines.h" -#include "vm.h" #include "types.h" AActor *SingleActorFromTID(int tid, AActor *defactor); diff --git a/src/p_ceiling.cpp b/src/p_ceiling.cpp index fb324b54a..5eb8157f5 100644 --- a/src/p_ceiling.cpp +++ b/src/p_ceiling.cpp @@ -34,11 +34,9 @@ #include "s_sndseq.h" #include "doomstat.h" #include "r_state.h" -#include "gi.h" #include "serializer.h" #include "p_spec.h" #include "g_levellocals.h" -#include "textures.h" #include "vm.h" //============================================================================ diff --git a/src/p_conversation.cpp b/src/p_conversation.cpp index 073d5ff9d..7dc829230 100644 --- a/src/p_conversation.cpp +++ b/src/p_conversation.cpp @@ -38,26 +38,19 @@ #include "p_conversation.h" #include "w_wad.h" #include "cmdlib.h" -#include "s_sound.h" #include "v_text.h" -#include "v_video.h" -#include "m_random.h" #include "gi.h" -#include "templates.h" #include "a_keys.h" #include "p_enemy.h" #include "gstrings.h" #include "sound/i_music.h" #include "p_setup.h" #include "d_net.h" -#include "g_level.h" #include "d_event.h" -#include "d_gui.h" #include "doomstat.h" #include "c_console.h" #include "sbar.h" #include "p_lnspec.h" -#include "r_utility.h" #include "p_local.h" #include "menu/menu.h" #include "g_levellocals.h" diff --git a/src/p_doors.cpp b/src/p_doors.cpp index abfe81722..be9b067af 100644 --- a/src/p_doors.cpp +++ b/src/p_doors.cpp @@ -32,12 +32,8 @@ #include "s_sndseq.h" #include "doomstat.h" #include "r_state.h" -#include "c_console.h" #include "gi.h" #include "a_keys.h" -#include "i_system.h" -#include "sc_man.h" -#include "cmdlib.h" #include "serializer.h" #include "d_player.h" #include "p_spec.h" diff --git a/src/p_effect.cpp b/src/p_effect.cpp index 7163b7548..527436b6b 100644 --- a/src/p_effect.cpp +++ b/src/p_effect.cpp @@ -37,20 +37,12 @@ #include "doomtype.h" #include "doomstat.h" #include "i_system.h" -#include "c_cvars.h" #include "actor.h" #include "m_argv.h" #include "p_effect.h" #include "p_local.h" -#include "g_level.h" -#include "v_video.h" -#include "m_random.h" #include "r_defs.h" -#include "s_sound.h" -#include "templates.h" #include "gi.h" -#include "v_palette.h" -#include "colormatcher.h" #include "d_player.h" #include "r_utility.h" #include "g_levellocals.h" diff --git a/src/p_enemy.cpp b/src/p_enemy.cpp index 86bd5c8c3..9298495eb 100644 --- a/src/p_enemy.cpp +++ b/src/p_enemy.cpp @@ -38,24 +38,14 @@ #include "p_local.h" #include "p_maputl.h" #include "d_player.h" -#include "m_bbox.h" #include "p_lnspec.h" -#include "s_sound.h" #include "g_game.h" -#include "doomstat.h" -#include "r_state.h" -#include "c_cvars.h" #include "p_enemy.h" #include "a_sharedglobal.h" -#include "d_dehacked.h" -#include "g_level.h" -#include "r_utility.h" #include "p_blockmap.h" -#include "r_data/r_translate.h" #include "teaminfo.h" #include "p_spec.h" #include "p_checkposition.h" -#include "math/cmath.h" #include "g_levellocals.h" #include "vm.h" #include "actorinlines.h" diff --git a/src/p_glnodes.cpp b/src/p_glnodes.cpp index 7d0e37339..1e7ce6505 100644 --- a/src/p_glnodes.cpp +++ b/src/p_glnodes.cpp @@ -47,26 +47,18 @@ #include #include "templates.h" -#include "m_alloc.h" #include "m_argv.h" #include "c_dispatch.h" #include "m_swap.h" -#include "g_game.h" -#include "i_system.h" #include "w_wad.h" -#include "doomdef.h" #include "p_local.h" #include "nodebuild.h" #include "doomstat.h" -#include "vectors.h" -#include "stats.h" #include "doomerrors.h" #include "p_setup.h" -#include "x86.h" #include "version.h" #include "md5.h" #include "m_misc.h" -#include "r_utility.h" #include "cmdlib.h" #include "g_levellocals.h" #include "i_time.h" diff --git a/src/p_interaction.cpp b/src/p_interaction.cpp index 4de850900..2a28c305f 100644 --- a/src/p_interaction.cpp +++ b/src/p_interaction.cpp @@ -52,13 +52,8 @@ #include "b_bot.h" //Added by MC: #include "d_player.h" -#include "a_sharedglobal.h" -#include "a_pickups.h" #include "gi.h" -#include "templates.h" #include "sbar.h" -#include "s_sound.h" -#include "g_level.h" #include "d_net.h" #include "d_netinf.h" #include "a_morph.h" diff --git a/src/p_lights.cpp b/src/p_lights.cpp index 2a52692b5..86dfbb8cb 100644 --- a/src/p_lights.cpp +++ b/src/p_lights.cpp @@ -39,8 +39,6 @@ #include "g_levellocals.h" // State. -#include "r_state.h" -#include "statnums.h" #include "serializer.h" static FRandom pr_flicker ("Flicker"); diff --git a/src/p_lnspec.cpp b/src/p_lnspec.cpp index 001b39be8..acf99d5d1 100644 --- a/src/p_lnspec.cpp +++ b/src/p_lnspec.cpp @@ -40,17 +40,11 @@ #include "p_enemy.h" #include "g_level.h" #include "v_palette.h" -#include "i_system.h" #include "a_sharedglobal.h" #include "a_lightning.h" -#include "statnums.h" -#include "s_sound.h" -#include "templates.h" #include "a_keys.h" #include "gi.h" -#include "m_random.h" #include "p_conversation.h" -#include "r_data/r_translate.h" #include "p_3dmidtex.h" #include "d_net.h" #include "d_event.h" @@ -58,7 +52,6 @@ #include "po_man.h" #include "d_player.h" #include "r_utility.h" -#include "r_data/colormaps.h" #include "fragglescript/t_fs.h" #include "p_spec.h" #include "g_levellocals.h" diff --git a/src/p_map.cpp b/src/p_map.cpp index e9ba84132..f01e55dcd 100644 --- a/src/p_map.cpp +++ b/src/p_map.cpp @@ -65,9 +65,7 @@ #include "m_bbox.h" #include "m_random.h" -#include "i_system.h" #include "c_dispatch.h" -#include "math/cmath.h" #include "doomdef.h" #include "p_local.h" @@ -85,19 +83,12 @@ #include "p_3dmidtex.h" #include "vm.h" -#include "s_sound.h" #include "decallib.h" // State. -#include "doomstat.h" -#include "r_state.h" - -#include "gi.h" #include "a_sharedglobal.h" #include "p_conversation.h" -#include "r_data/r_translate.h" -#include "g_level.h" #include "r_sky.h" #include "g_levellocals.h" #include "actorinlines.h" diff --git a/src/p_maputl.cpp b/src/p_maputl.cpp index 40af00067..c94d80073 100644 --- a/src/p_maputl.cpp +++ b/src/p_maputl.cpp @@ -77,10 +77,7 @@ #include "actorinlines.h" // State. -#include "r_state.h" -#include "templates.h" #include "po_man.h" -#include "g_levellocals.h" #include "vm.h" sector_t *P_PointInSectorBuggy(double x, double y); diff --git a/src/p_mobj.cpp b/src/p_mobj.cpp index e10a430d0..25d846e01 100644 --- a/src/p_mobj.cpp +++ b/src/p_mobj.cpp @@ -67,15 +67,10 @@ #include "p_lnspec.h" #include "p_effect.h" #include "p_terrain.h" -#include "st_stuff.h" #include "hu_stuff.h" -#include "s_sound.h" -#include "doomstat.h" #include "v_video.h" -#include "c_cvars.h" #include "c_dispatch.h" #include "b_bot.h" //Added by MC: -#include "stats.h" #include "a_sharedglobal.h" #include "gi.h" #include "sbar.h" @@ -86,15 +81,10 @@ #include "p_conversation.h" #include "g_game.h" #include "teaminfo.h" -#include "r_data/r_translate.h" #include "r_sky.h" -#include "g_level.h" #include "d_event.h" -#include "colormatcher.h" -#include "v_palette.h" #include "p_enemy.h" #include "gstrings.h" -#include "r_data/colormaps.h" #include "r_renderer.h" #include "po_man.h" #include "p_spec.h" @@ -103,7 +93,6 @@ #include "r_utility.h" #include "thingdef.h" #include "d_player.h" -#include "vm.h" #include "g_levellocals.h" #include "a_morph.h" #include "events.h" diff --git a/src/p_plats.cpp b/src/p_plats.cpp index c43a74b1e..e05363d41 100644 --- a/src/p_plats.cpp +++ b/src/p_plats.cpp @@ -28,13 +28,11 @@ #include "i_system.h" #include "m_random.h" -#include "doomdef.h" #include "p_local.h" #include "p_lnspec.h" #include "s_sndseq.h" #include "doomstat.h" #include "r_state.h" -#include "gi.h" #include "serializer.h" #include "p_spec.h" #include "g_levellocals.h" diff --git a/src/p_pspr.cpp b/src/p_pspr.cpp index c419f2228..2c0e418b3 100644 --- a/src/p_pspr.cpp +++ b/src/p_pspr.cpp @@ -35,7 +35,6 @@ #include "p_local.h" #include "s_sound.h" #include "doomstat.h" -#include "gi.h" #include "p_pspr.h" #include "templates.h" #include "g_level.h" diff --git a/src/p_pusher.cpp b/src/p_pusher.cpp index c3bfe62af..5861ad636 100644 --- a/src/p_pusher.cpp +++ b/src/p_pusher.cpp @@ -31,7 +31,6 @@ #include "p_spec.h" #include "serializer.h" #include "p_lnspec.h" -#include "c_cvars.h" #include "p_maputl.h" #include "p_local.h" #include "d_player.h" diff --git a/src/p_saveg.cpp b/src/p_saveg.cpp index 6f38e0ae8..acf0ac5f2 100644 --- a/src/p_saveg.cpp +++ b/src/p_saveg.cpp @@ -39,24 +39,16 @@ // State. #include "d_player.h" -#include "dobject.h" -#include "doomstat.h" -#include "r_state.h" -#include "m_random.h" #include "p_saveg.h" #include "s_sndseq.h" -#include "v_palette.h" #include "a_sharedglobal.h" #include "r_data/r_interpolate.h" -#include "g_level.h" #include "po_man.h" #include "p_setup.h" -#include "r_data/colormaps.h" #include "p_lnspec.h" #include "p_acs.h" #include "p_terrain.h" #include "am_map.h" -#include "r_data/r_translate.h" #include "sbar.h" #include "r_utility.h" #include "r_sky.h" diff --git a/src/p_secnodes.cpp b/src/p_secnodes.cpp index 0e62e622b..77b6c555c 100644 --- a/src/p_secnodes.cpp +++ b/src/p_secnodes.cpp @@ -25,10 +25,7 @@ //----------------------------------------------------------------------------- #include "g_levellocals.h" -#include "r_state.h" #include "p_maputl.h" -#include "p_blockmap.h" -#include "memarena.h" #include "actor.h" //============================================================================= diff --git a/src/p_sectors.cpp b/src/p_sectors.cpp index 94a1fe8a5..e0eca11db 100644 --- a/src/p_sectors.cpp +++ b/src/p_sectors.cpp @@ -68,7 +68,6 @@ #include "a_sharedglobal.h" #include "p_local.h" #include "r_sky.h" -#include "r_data/colormaps.h" #include "g_levellocals.h" #include "vm.h" diff --git a/src/p_setup.cpp b/src/p_setup.cpp index 73fbeb622..621343dec 100644 --- a/src/p_setup.cpp +++ b/src/p_setup.cpp @@ -59,7 +59,6 @@ #include -#include #ifdef _MSC_VER #include // for alloca() #endif @@ -67,27 +66,17 @@ #include "templates.h" #include "d_player.h" #include "m_argv.h" -#include "m_swap.h" -#include "m_bbox.h" #include "g_game.h" -#include "i_system.h" -#include "x86.h" #include "w_wad.h" -#include "doomdef.h" #include "p_local.h" #include "p_effect.h" #include "p_terrain.h" #include "nodebuild.h" -#include "s_sound.h" -#include "doomstat.h" #include "p_lnspec.h" -#include "v_palette.h" #include "c_console.h" -#include "c_cvars.h" #include "p_acs.h" #include "announcer.h" #include "wi_stuff.h" -#include "stats.h" #include "doomerrors.h" #include "gi.h" #include "p_conversation.h" @@ -95,20 +84,16 @@ #include "s_sndseq.h" #include "sbar.h" #include "p_setup.h" -#include "r_data/r_translate.h" #include "r_data/r_interpolate.h" #include "r_sky.h" #include "cmdlib.h" -#include "g_level.h" #include "md5.h" #include "compatibility.h" #include "po_man.h" #include "r_renderer.h" -#include "r_data/colormaps.h" #include "p_blockmap.h" #include "r_utility.h" #include "p_spec.h" -#include "p_saveg.h" #include "g_levellocals.h" #include "c_dispatch.h" #include "a_dynlight.h" diff --git a/src/p_sight.cpp b/src/p_sight.cpp index 2ba942c80..1854b743b 100644 --- a/src/p_sight.cpp +++ b/src/p_sight.cpp @@ -28,19 +28,12 @@ #include "p_maputl.h" #include "p_blockmap.h" #include "m_random.h" -#include "m_bbox.h" #include "p_lnspec.h" -#include "g_level.h" #include "po_man.h" -#include "r_utility.h" #include "b_bot.h" #include "p_spec.h" #include "vm.h" -// State. -#include "r_state.h" - -#include "stats.h" #include "g_levellocals.h" #include "actorinlines.h" diff --git a/src/p_spec.cpp b/src/p_spec.cpp index e00d8a33a..5183324f9 100644 --- a/src/p_spec.cpp +++ b/src/p_spec.cpp @@ -75,11 +75,7 @@ #include "gstrings.h" #include "events.h" -#include "i_system.h" -#include "m_argv.h" #include "m_random.h" -#include "m_bbox.h" -#include "w_wad.h" #include "p_local.h" #include "p_spec.h" @@ -91,20 +87,11 @@ #include "g_game.h" -#include "s_sound.h" -#include "sc_man.h" -#include "gi.h" -#include "statnums.h" -#include "g_level.h" -#include "v_font.h" #include "a_sharedglobal.h" -#include "serializer.h" #include "a_keys.h" #include "c_dispatch.h" #include "r_sky.h" #include "d_player.h" -#include "p_maputl.h" -#include "p_blockmap.h" #include "g_levellocals.h" #include "actorinlines.h" #ifndef NO_EDATA @@ -112,13 +99,8 @@ #endif #include "vm.h" -// State. -#include "r_state.h" - #include "c_console.h" -#include "r_data/r_interpolate.h" - static FRandom pr_playerinspecialsector ("PlayerInSpecialSector"); EXTERN_CVAR(Bool, cl_predict_specials) diff --git a/src/p_states.cpp b/src/p_states.cpp index a330bec76..8b5922470 100644 --- a/src/p_states.cpp +++ b/src/p_states.cpp @@ -34,14 +34,11 @@ ** */ #include "actor.h" -#include "templates.h" #include "cmdlib.h" -#include "i_system.h" #include "c_dispatch.h" #include "v_text.h" #include "thingdef.h" #include "r_state.h" -#include "vm.h" // stores indices for symbolic state labels for some old-style DECORATE functions. diff --git a/src/p_switch.cpp b/src/p_switch.cpp index 3563f96b8..ec1d717ec 100644 --- a/src/p_switch.cpp +++ b/src/p_switch.cpp @@ -43,9 +43,6 @@ #include "s_sound.h" #include "doomstat.h" #include "r_state.h" -#include "w_wad.h" -#include "tarray.h" -#include "cmdlib.h" #include "serializer.h" #include "p_maputl.h" #include "p_spec.h" @@ -53,8 +50,6 @@ #include "actor.h" #include "actorinlines.h" -#include "gi.h" - static FRandom pr_switchanim ("AnimSwitch"); class DActiveButton : public DThinker diff --git a/src/p_teleport.cpp b/src/p_teleport.cpp index 55b93a423..2bb71f82b 100644 --- a/src/p_teleport.cpp +++ b/src/p_teleport.cpp @@ -36,8 +36,6 @@ #include "r_state.h" #include "gi.h" #include "a_sharedglobal.h" -#include "m_random.h" -#include "i_system.h" #include "doomstat.h" #include "d_player.h" #include "p_maputl.h" diff --git a/src/p_terrain.cpp b/src/p_terrain.cpp index 8219e37a3..8459ed27a 100644 --- a/src/p_terrain.cpp +++ b/src/p_terrain.cpp @@ -43,9 +43,7 @@ #include "r_state.h" #include "w_wad.h" #include "sc_man.h" -#include "s_sound.h" #include "p_local.h" -#include "templates.h" #include "actor.h" #include "vm.h" diff --git a/src/p_things.cpp b/src/p_things.cpp index b8a0c5ffb..2f5bd5555 100644 --- a/src/p_things.cpp +++ b/src/p_things.cpp @@ -35,21 +35,13 @@ #include "doomtype.h" #include "p_local.h" #include "info.h" -#include "s_sound.h" #include "doomstat.h" -#include "m_random.h" -#include "c_console.h" #include "c_dispatch.h" #include "a_sharedglobal.h" -#include "gi.h" -#include "templates.h" -#include "g_level.h" #include "v_text.h" -#include "i_system.h" #include "d_player.h" #include "r_utility.h" #include "p_spec.h" -#include "math/cmath.h" #include "actorptrselect.h" #include "g_levellocals.h" #include "actorinlines.h" diff --git a/src/p_tick.cpp b/src/p_tick.cpp index 67bcc592d..e4cc536cf 100644 --- a/src/p_tick.cpp +++ b/src/p_tick.cpp @@ -24,18 +24,14 @@ // //----------------------------------------------------------------------------- -#include #include "p_local.h" #include "p_effect.h" #include "c_console.h" #include "b_bot.h" -#include "s_sound.h" #include "doomstat.h" #include "sbar.h" #include "r_data/r_interpolate.h" -#include "i_sound.h" #include "d_player.h" -#include "g_level.h" #include "r_utility.h" #include "p_spec.h" #include "g_levellocals.h" diff --git a/src/p_trace.cpp b/src/p_trace.cpp index fd79861ec..b60abc477 100644 --- a/src/p_trace.cpp +++ b/src/p_trace.cpp @@ -34,11 +34,9 @@ #include "p_trace.h" #include "p_local.h" -#include "i_system.h" #include "r_sky.h" #include "doomstat.h" #include "p_maputl.h" -#include "r_defs.h" #include "p_spec.h" #include "g_levellocals.h" #include "p_terrain.h" diff --git a/src/p_udmf.cpp b/src/p_udmf.cpp index bb9055486..21d541bfb 100644 --- a/src/p_udmf.cpp +++ b/src/p_udmf.cpp @@ -36,15 +36,12 @@ #include "doomstat.h" #include "p_setup.h" #include "p_lnspec.h" -#include "templates.h" #include "i_system.h" #include "gi.h" #include "r_sky.h" #include "g_level.h" -#include "v_palette.h" #include "p_udmf.h" #include "r_state.h" -#include "r_data/colormaps.h" #include "w_wad.h" #include "p_tags.h" #include "p_terrain.h" diff --git a/src/p_usdf.cpp b/src/p_usdf.cpp index 816186622..cb375816f 100644 --- a/src/p_usdf.cpp +++ b/src/p_usdf.cpp @@ -34,12 +34,9 @@ #include "p_setup.h" #include "p_lnspec.h" -#include "templates.h" -#include "i_system.h" #include "p_conversation.h" #include "p_udmf.h" #include "doomerrors.h" -#include "cmdlib.h" #include "actor.h" #include "a_pickups.h" #include "w_wad.h" diff --git a/src/p_user.cpp b/src/p_user.cpp index 6ec5b629f..cb6c370cd 100644 --- a/src/p_user.cpp +++ b/src/p_user.cpp @@ -64,28 +64,19 @@ #include "p_local.h" #include "doomstat.h" #include "s_sound.h" -#include "i_system.h" #include "gi.h" #include "m_random.h" #include "p_pspr.h" #include "p_enemy.h" -#include "s_sound.h" #include "a_sharedglobal.h" #include "a_keys.h" -#include "statnums.h" -#include "v_palette.h" -#include "v_video.h" #include "w_wad.h" #include "cmdlib.h" #include "sbar.h" #include "intermission/intermission.h" #include "c_console.h" -#include "doomdef.h" #include "c_dispatch.h" -#include "tarray.h" -#include "g_level.h" #include "d_net.h" -#include "gstrings.h" #include "serializer.h" #include "r_renderer.h" #include "d_player.h" @@ -96,7 +87,6 @@ #include "vm.h" #include "g_levellocals.h" #include "actorinlines.h" -#include "r_data/r_translate.h" #include "p_acs.h" #include "events.h" diff --git a/src/p_xlat.cpp b/src/p_xlat.cpp index 4f3b45611..315b64c3c 100644 --- a/src/p_xlat.cpp +++ b/src/p_xlat.cpp @@ -36,16 +36,10 @@ #include "g_level.h" #include "p_lnspec.h" #include "doomdata.h" -#include "m_swap.h" #include "p_spec.h" #include "p_local.h" #include "a_sharedglobal.h" -#include "gi.h" -#include "w_wad.h" -#include "sc_man.h" -#include "cmdlib.h" #include "g_levellocals.h" -#include "actorinlines.h" #include "xlat/xlat.h" // define names for the TriggerType field of the general linedefs diff --git a/src/po_man.cpp b/src/po_man.cpp index 359b887b8..76355d4db 100644 --- a/src/po_man.cpp +++ b/src/po_man.cpp @@ -24,24 +24,18 @@ #include "doomdef.h" #include "p_local.h" -#include "i_system.h" -#include "w_wad.h" -#include "m_swap.h" #include "m_bbox.h" #include "s_sndseq.h" #include "a_sharedglobal.h" #include "p_3dmidtex.h" #include "p_lnspec.h" #include "r_data/r_interpolate.h" -#include "g_level.h" #include "po_man.h" #include "p_setup.h" -#include "vectors.h" #include "serializer.h" #include "p_blockmap.h" #include "p_maputl.h" #include "r_utility.h" -#include "p_blockmap.h" #include "g_levellocals.h" #include "actorinlines.h" #include "v_text.h" diff --git a/src/portal.cpp b/src/portal.cpp index 2268f8e8e..1ac461d73 100644 --- a/src/portal.cpp +++ b/src/portal.cpp @@ -45,12 +45,9 @@ #include "p_tags.h" #include "v_text.h" #include "a_sharedglobal.h" -#include "i_system.h" #include "c_dispatch.h" #include "p_maputl.h" #include "p_spec.h" -#include "p_checkposition.h" -#include "math/cmath.h" #include "g_levellocals.h" #include "vm.h" diff --git a/src/posix/cocoa/i_joystick.cpp b/src/posix/cocoa/i_joystick.cpp index 747cc1422..a34c8b03d 100644 --- a/src/posix/cocoa/i_joystick.cpp +++ b/src/posix/cocoa/i_joystick.cpp @@ -32,10 +32,8 @@ */ #include -#include #include #include -#include #include "d_event.h" #include "doomdef.h" diff --git a/src/posix/cocoa/i_main.mm b/src/posix/cocoa/i_main.mm index d528a0f72..dbba5cea0 100644 --- a/src/posix/cocoa/i_main.mm +++ b/src/posix/cocoa/i_main.mm @@ -35,7 +35,6 @@ #include "s_sound.h" #include -#include // Avoid collision between DObject class and Objective-C #define Class ObjectClass @@ -44,10 +43,8 @@ #include "c_cvars.h" #include "cmdlib.h" #include "d_main.h" -#include "doomerrors.h" #include "i_system.h" #include "m_argv.h" -#include "s_sound.h" #include "st_console.h" #include "version.h" diff --git a/src/posix/cocoa/i_system.mm b/src/posix/cocoa/i_system.mm index c8f066be5..94a911bfa 100644 --- a/src/posix/cocoa/i_system.mm +++ b/src/posix/cocoa/i_system.mm @@ -34,8 +34,6 @@ #include "i_common.h" #include -#include -#include #include #include "d_protocol.h" diff --git a/src/posix/cocoa/i_video.mm b/src/posix/cocoa/i_video.mm index 0c37453df..0b22ee6e7 100644 --- a/src/posix/cocoa/i_video.mm +++ b/src/posix/cocoa/i_video.mm @@ -42,28 +42,18 @@ #include "c_dispatch.h" #include "doomstat.h" #include "hardware.h" -#include "i_system.h" #include "m_argv.h" #include "m_png.h" #include "r_renderer.h" #include "swrenderer/r_swrenderer.h" #include "st_console.h" -#include "stats.h" -#include "textures.h" -#include "v_palette.h" -#include "v_pfx.h" #include "v_text.h" -#include "v_video.h" #include "version.h" #include "videomodes.h" -#include "gl/system/gl_system.h" -#include "gl/data/gl_vertexbuffer.h" #include "gl/renderer/gl_renderer.h" #include "gl/system/gl_framebuffer.h" -#include "gl/system/gl_interface.h" #include "gl/textures/gl_samplers.h" -#include "gl/utility/gl_clock.h" #undef Class diff --git a/src/posix/cocoa/st_console.mm b/src/posix/cocoa/st_console.mm index dd876c378..3369da023 100644 --- a/src/posix/cocoa/st_console.mm +++ b/src/posix/cocoa/st_console.mm @@ -34,7 +34,6 @@ #include "i_common.h" #include "d_main.h" -#include "i_system.h" #include "st_console.h" #include "v_text.h" #include "version.h" diff --git a/src/posix/cocoa/st_start.mm b/src/posix/cocoa/st_start.mm index 6ce48e807..d10722ffb 100644 --- a/src/posix/cocoa/st_start.mm +++ b/src/posix/cocoa/st_start.mm @@ -38,7 +38,6 @@ #include "c_cvars.h" #include "st_console.h" #include "st_start.h" -#include "v_text.h" FStartupScreen *StartScreen; diff --git a/src/posix/i_steam.cpp b/src/posix/i_steam.cpp index f233f4ce8..4c72e06ab 100644 --- a/src/posix/i_steam.cpp +++ b/src/posix/i_steam.cpp @@ -40,7 +40,6 @@ #include "doomerrors.h" #include "d_main.h" -#include "zstring.h" #include "sc_man.h" #include "cmdlib.h" diff --git a/src/posix/osx/iwadpicker_cocoa.mm b/src/posix/osx/iwadpicker_cocoa.mm index 2792e8630..2b25f680e 100644 --- a/src/posix/osx/iwadpicker_cocoa.mm +++ b/src/posix/osx/iwadpicker_cocoa.mm @@ -48,7 +48,6 @@ #include #include -#include CVAR(String, osx_additional_parameters, "", CVAR_ARCHIVE | CVAR_NOSET | CVAR_GLOBALCONFIG); diff --git a/src/posix/sdl/crashcatcher.c b/src/posix/sdl/crashcatcher.c index 11e5d179f..be0e8f599 100644 --- a/src/posix/sdl/crashcatcher.c +++ b/src/posix/sdl/crashcatcher.c @@ -1,13 +1,10 @@ #include #include #include -#include -#include #include #include #include #include -#include #ifdef __linux__ #include diff --git a/src/posix/sdl/critsec.cpp b/src/posix/sdl/critsec.cpp index ca9a225c0..04aa4aa9d 100644 --- a/src/posix/sdl/critsec.cpp +++ b/src/posix/sdl/critsec.cpp @@ -35,7 +35,6 @@ */ #include "SDL.h" -#include "SDL_thread.h" #include "i_system.h" class FInternalCriticalSection diff --git a/src/posix/sdl/hardware.cpp b/src/posix/sdl/hardware.cpp index 0ae4d8ded..3c000cb8e 100644 --- a/src/posix/sdl/hardware.cpp +++ b/src/posix/sdl/hardware.cpp @@ -34,20 +34,12 @@ #include #include -#include -#include "version.h" #include "hardware.h" -#include "i_video.h" -#include "i_system.h" -#include "c_console.h" -#include "c_cvars.h" #include "c_dispatch.h" #include "v_text.h" #include "doomstat.h" #include "m_argv.h" -#include "gl_sysfb.h" -#include "r_renderer.h" #include "swrenderer/r_swrenderer.h" EXTERN_CVAR (Bool, ticker) diff --git a/src/posix/sdl/i_input.cpp b/src/posix/sdl/i_input.cpp index 338b343d5..1998823b6 100644 --- a/src/posix/sdl/i_input.cpp +++ b/src/posix/sdl/i_input.cpp @@ -31,23 +31,17 @@ ** */ #include -#include #include "doomtype.h" -#include "c_dispatch.h" #include "doomdef.h" #include "doomstat.h" #include "m_argv.h" -#include "i_input.h" #include "v_video.h" #include "d_main.h" #include "d_event.h" #include "d_gui.h" #include "c_console.h" -#include "c_cvars.h" -#include "i_system.h" #include "dikeys.h" -#include "templates.h" #include "s_sound.h" #include "events.h" diff --git a/src/posix/sdl/i_main.cpp b/src/posix/sdl/i_main.cpp index 95ed8322e..127198df8 100644 --- a/src/posix/sdl/i_main.cpp +++ b/src/posix/sdl/i_main.cpp @@ -36,7 +36,6 @@ #include #include -#include #include #include #include @@ -45,15 +44,11 @@ #include "doomerrors.h" #include "m_argv.h" #include "d_main.h" -#include "i_system.h" -#include "i_video.h" #include "c_console.h" -#include "errors.h" #include "version.h" #include "w_wad.h" #include "g_level.h" #include "g_levellocals.h" -#include "r_state.h" #include "cmdlib.h" #include "r_utility.h" #include "doomstat.h" diff --git a/src/posix/sdl/i_system.cpp b/src/posix/sdl/i_system.cpp index 1f41788a0..15ec90698 100644 --- a/src/posix/sdl/i_system.cpp +++ b/src/posix/sdl/i_system.cpp @@ -27,17 +27,11 @@ #include #include -#include -#include -#include -#include #include -#include #include #include "doomerrors.h" -#include #include "doomtype.h" #include "doomstat.h" @@ -46,28 +40,16 @@ #include "cmdlib.h" #include "m_argv.h" #include "m_misc.h" -#include "i_video.h" #include "i_sound.h" -#include "i_music.h" #include "x86.h" #include "d_main.h" #include "d_net.h" #include "g_game.h" -#include "i_system.h" #include "c_dispatch.h" -#include "templates.h" -#include "v_palette.h" -#include "textures.h" -#include "bitmap.h" -#include "stats.h" -#include "hardware.h" #include "gameconfigfile.h" -#include "m_fixed.h" -#include "g_level.h" - EXTERN_CVAR (String, language) extern "C" diff --git a/src/posix/sdl/sdlglvideo.cpp b/src/posix/sdl/sdlglvideo.cpp index 60152f15c..4d3b48131 100644 --- a/src/posix/sdl/sdlglvideo.cpp +++ b/src/posix/sdl/sdlglvideo.cpp @@ -35,13 +35,10 @@ #include "doomtype.h" -#include "templates.h" #include "i_system.h" #include "i_video.h" #include "m_argv.h" #include "v_video.h" -#include "v_pfx.h" -#include "stats.h" #include "version.h" #include "c_console.h" @@ -54,8 +51,6 @@ #include "gl/renderer/gl_renderer.h" #include "gl/system/gl_framebuffer.h" #include "gl/shaders/gl_shader.h" -#include "gl/textures/gl_material.h" -#include "gl/system/gl_cvars.h" // MACROS ------------------------------------------------------------------ diff --git a/src/posix/sdl/st_start.cpp b/src/posix/sdl/st_start.cpp index 060548b53..38959f542 100644 --- a/src/posix/sdl/st_start.cpp +++ b/src/posix/sdl/st_start.cpp @@ -36,7 +36,6 @@ #include #include -#include #include #include "st_start.h" diff --git a/src/r_data/colormaps.cpp b/src/r_data/colormaps.cpp index 791101dd3..d8feac7c7 100644 --- a/src/r_data/colormaps.cpp +++ b/src/r_data/colormaps.cpp @@ -40,20 +40,9 @@ #include "i_system.h" #include "w_wad.h" -#include "doomdef.h" #include "r_sky.h" -#include "c_dispatch.h" -#include "sc_man.h" -#include "v_text.h" -#include "st_start.h" -#include "doomstat.h" -#include "v_palette.h" -#include "colormatcher.h" #include "colormaps.h" -#include "v_video.h" #include "templates.h" -#include "r_utility.h" -#include "r_renderer.h" TArray fakecmaps; diff --git a/src/r_data/gldefs.cpp b/src/r_data/gldefs.cpp index c01b905d9..20d28d2cd 100644 --- a/src/r_data/gldefs.cpp +++ b/src/r_data/gldefs.cpp @@ -34,18 +34,12 @@ */ #include #include "i_system.h" -#include "doomtype.h" -#include "c_cvars.h" -#include "c_dispatch.h" -#include "m_random.h" #include "sc_man.h" #include "templates.h" #include "w_wad.h" #include "gi.h" #include "r_state.h" #include "stats.h" -#include "zstring.h" -#include "d_dehacked.h" #include "v_text.h" #include "g_levellocals.h" #include "a_dynlight.h" diff --git a/src/r_data/matrix.cpp b/src/r_data/matrix.cpp index edc26e833..6b7e64df1 100644 --- a/src/r_data/matrix.cpp +++ b/src/r_data/matrix.cpp @@ -12,10 +12,6 @@ This is a simplified version of VSMatrix that has been adjusted for GZDoom's nee #include #include -#include -#include -#include -#include "doomtype.h" #include "matrix.h" #ifdef _MSC_VER diff --git a/src/r_data/models/models.cpp b/src/r_data/models/models.cpp index b8068f2fd..65b588f24 100644 --- a/src/r_data/models/models.cpp +++ b/src/r_data/models/models.cpp @@ -38,7 +38,6 @@ #include "d_player.h" #include "g_levellocals.h" #include "r_utility.h" -#include "i_time.h" #include "r_data/models/models.h" #ifdef _MSC_VER diff --git a/src/r_data/models/models_md2.cpp b/src/r_data/models/models_md2.cpp index df187a69d..999e0cd82 100644 --- a/src/r_data/models/models_md2.cpp +++ b/src/r_data/models/models_md2.cpp @@ -27,9 +27,6 @@ **/ #include "w_wad.h" -#include "cmdlib.h" -#include "sc_man.h" -#include "m_crc32.h" #include "r_data/models/models.h" #ifdef _MSC_VER diff --git a/src/r_data/models/models_md3.cpp b/src/r_data/models/models_md3.cpp index a399ccb72..31f2c31cb 100644 --- a/src/r_data/models/models_md3.cpp +++ b/src/r_data/models/models_md3.cpp @@ -22,8 +22,6 @@ #include "w_wad.h" #include "cmdlib.h" -#include "sc_man.h" -#include "m_crc32.h" #include "r_data/models/models.h" #define MAX_QPATH 64 diff --git a/src/r_data/models/models_voxel.cpp b/src/r_data/models/models_voxel.cpp index 6b9e26d2e..3c9af2374 100644 --- a/src/r_data/models/models_voxel.cpp +++ b/src/r_data/models/models_voxel.cpp @@ -27,18 +27,11 @@ **/ #include "w_wad.h" -#include "cmdlib.h" -#include "sc_man.h" -#include "m_crc32.h" -#include "c_console.h" -#include "g_game.h" -#include "doomstat.h" #include "g_level.h" #include "colormatcher.h" #include "textures/bitmap.h" #include "g_levellocals.h" #include "models.h" -#include "v_palette.h" #ifdef _MSC_VER #pragma warning(disable:4244) // warning C4244: conversion from 'double' to 'float', possible loss of data diff --git a/src/r_data/portalgroups.cpp b/src/r_data/portalgroups.cpp index a7f1b6dae..a65f8b5e0 100644 --- a/src/r_data/portalgroups.cpp +++ b/src/r_data/portalgroups.cpp @@ -21,16 +21,9 @@ // #include "doomtype.h" -#include "colormatcher.h" -#include "i_system.h" #include "p_local.h" #include "p_lnspec.h" #include "c_dispatch.h" -#include "r_sky.h" -#include "sc_man.h" -#include "w_wad.h" -#include "gi.h" -#include "g_level.h" #include "a_sharedglobal.h" #include "g_levellocals.h" #include "r_utility.h" diff --git a/src/r_data/r_interpolate.cpp b/src/r_data/r_interpolate.cpp index 8f8fc3f80..8f73fdcac 100644 --- a/src/r_data/r_interpolate.cpp +++ b/src/r_data/r_interpolate.cpp @@ -37,7 +37,6 @@ #include "stats.h" #include "r_data/r_interpolate.h" #include "p_local.h" -#include "i_system.h" #include "po_man.h" #include "serializer.h" diff --git a/src/r_data/r_translate.cpp b/src/r_data/r_translate.cpp index 28a480b3d..eeca41864 100644 --- a/src/r_data/r_translate.cpp +++ b/src/r_data/r_translate.cpp @@ -38,14 +38,10 @@ #include "r_data/r_translate.h" #include "v_video.h" #include "g_game.h" -#include "colormatcher.h" #include "d_netinf.h" -#include "v_palette.h" #include "sc_man.h" #include "doomerrors.h" -#include "i_system.h" #include "w_wad.h" -#include "r_data/colormaps.h" #include "serializer.h" #include "d_player.h" #include "r_data/sprites.h" @@ -55,7 +51,6 @@ #include "m_crc32.h" #include "gi.h" -#include "stats.h" TAutoGrowArray translationtables[NUM_TRANSLATION_TABLES]; diff --git a/src/r_data/renderinfo.cpp b/src/r_data/renderinfo.cpp index 38e159f27..5b6cc6d13 100644 --- a/src/r_data/renderinfo.cpp +++ b/src/r_data/renderinfo.cpp @@ -28,18 +28,12 @@ #include "gl/system/gl_system.h" #include "doomtype.h" -#include "colormatcher.h" -#include "i_system.h" #include "p_local.h" #include "p_spec.h" #include "p_lnspec.h" #include "c_dispatch.h" #include "r_sky.h" -#include "sc_man.h" -#include "w_wad.h" -#include "gi.h" #include "p_setup.h" -#include "g_level.h" #include "g_levellocals.h" //========================================================================== diff --git a/src/r_data/sprites.cpp b/src/r_data/sprites.cpp index 2380e597a..ce6123c18 100644 --- a/src/r_data/sprites.cpp +++ b/src/r_data/sprites.cpp @@ -25,17 +25,13 @@ #include "w_wad.h" #include "i_system.h" #include "s_sound.h" -#include "c_console.h" #include "d_player.h" #include "d_netinf.h" #include "gi.h" -#include "colormatcher.h" #include "c_dispatch.h" -#include "r_defs.h" #include "v_text.h" #include "r_data/sprites.h" #include "r_data/voxels.h" -#include "textures/textures.h" #include "vm.h" void gl_InitModels(); diff --git a/src/r_data/voxels.cpp b/src/r_data/voxels.cpp index 2bef1a0b4..9dc0b7006 100644 --- a/src/r_data/voxels.cpp +++ b/src/r_data/voxels.cpp @@ -36,30 +36,14 @@ #include #include -#include "templates.h" -#include "doomdef.h" #include "m_swap.h" #include "m_argv.h" -#include "i_system.h" #include "w_wad.h" -#include "c_console.h" -#include "c_cvars.h" -#include "c_dispatch.h" -#include "doomstat.h" #include "v_video.h" #include "sc_man.h" #include "s_sound.h" #include "sbar.h" -#include "gi.h" -#include "r_sky.h" -#include "cmdlib.h" #include "g_level.h" -#include "d_net.h" -#include "colormatcher.h" -#include "d_netinf.h" -#include "v_palette.h" -#include "r_data/r_translate.h" -#include "r_data/colormaps.h" #include "r_data/sprites.h" #include "voxels.h" #include "info.h" diff --git a/src/r_sky.cpp b/src/r_sky.cpp index 7a45bff50..31a9ec491 100644 --- a/src/r_sky.cpp +++ b/src/r_sky.cpp @@ -37,7 +37,6 @@ #include "r_sky.h" #include "r_utility.h" #include "v_text.h" -#include "gi.h" #include "g_levellocals.h" // diff --git a/src/r_utility.cpp b/src/r_utility.cpp index abde8f8ad..05dafee9b 100644 --- a/src/r_utility.cpp +++ b/src/r_utility.cpp @@ -40,23 +40,18 @@ #include "m_bbox.h" #include "r_sky.h" #include "st_stuff.h" -#include "c_cvars.h" #include "c_dispatch.h" #include "v_video.h" #include "stats.h" #include "i_video.h" -#include "i_system.h" #include "a_sharedglobal.h" -#include "r_data/r_translate.h" #include "p_3dmidtex.h" #include "r_data/r_interpolate.h" -#include "v_palette.h" #include "po_man.h" #include "p_effect.h" #include "st_start.h" #include "v_font.h" #include "r_renderer.h" -#include "r_data/colormaps.h" #include "serializer.h" #include "r_utility.h" #include "d_player.h" @@ -64,7 +59,6 @@ #include "g_levellocals.h" #include "p_maputl.h" #include "sbar.h" -#include "math/cmath.h" #include "vm.h" #include "i_time.h" diff --git a/src/resourcefiles/file_7z.cpp b/src/resourcefiles/file_7z.cpp index 9e675682c..79ecea583 100644 --- a/src/resourcefiles/file_7z.cpp +++ b/src/resourcefiles/file_7z.cpp @@ -39,10 +39,7 @@ #include "resourcefile.h" #include "cmdlib.h" -#include "templates.h" #include "v_text.h" -#include "w_zip.h" -#include "i_system.h" #include "w_wad.h" diff --git a/src/resourcefiles/file_directory.cpp b/src/resourcefiles/file_directory.cpp index 3897e0341..03b33e400 100644 --- a/src/resourcefiles/file_directory.cpp +++ b/src/resourcefiles/file_directory.cpp @@ -43,7 +43,6 @@ #include "resourcefile.h" #include "cmdlib.h" -#include "doomerrors.h" diff --git a/src/resourcefiles/file_grp.cpp b/src/resourcefiles/file_grp.cpp index 4155e3485..c0458276a 100644 --- a/src/resourcefiles/file_grp.cpp +++ b/src/resourcefiles/file_grp.cpp @@ -34,8 +34,6 @@ */ #include "resourcefile.h" -#include "cmdlib.h" -#include "v_text.h" #include "w_wad.h" //========================================================================== diff --git a/src/resourcefiles/file_lump.cpp b/src/resourcefiles/file_lump.cpp index 244ff5c6a..d7eb68e88 100644 --- a/src/resourcefiles/file_lump.cpp +++ b/src/resourcefiles/file_lump.cpp @@ -34,7 +34,6 @@ #include "resourcefile.h" #include "cmdlib.h" -#include "v_text.h" #include "w_wad.h" //========================================================================== diff --git a/src/resourcefiles/file_pak.cpp b/src/resourcefiles/file_pak.cpp index 776138d70..c2705a97f 100644 --- a/src/resourcefiles/file_pak.cpp +++ b/src/resourcefiles/file_pak.cpp @@ -33,8 +33,6 @@ */ #include "resourcefile.h" -#include "cmdlib.h" -#include "v_text.h" #include "w_wad.h" //========================================================================== diff --git a/src/resourcefiles/file_rff.cpp b/src/resourcefiles/file_rff.cpp index 6843904c0..89ef440f3 100644 --- a/src/resourcefiles/file_rff.cpp +++ b/src/resourcefiles/file_rff.cpp @@ -34,9 +34,7 @@ */ #include "resourcefile.h" -#include "cmdlib.h" #include "templates.h" -#include "v_text.h" #include "w_wad.h" //========================================================================== diff --git a/src/resourcefiles/file_wad.cpp b/src/resourcefiles/file_wad.cpp index 2e0ebb1dc..c7a3a262f 100644 --- a/src/resourcefiles/file_wad.cpp +++ b/src/resourcefiles/file_wad.cpp @@ -34,13 +34,10 @@ */ #include "resourcefile.h" -#include "cmdlib.h" -#include "templates.h" #include "v_text.h" #include "w_wad.h" #include "gi.h" #include "i_system.h" -#include "w_zip.h" //========================================================================== // diff --git a/src/resourcefiles/file_zip.cpp b/src/resourcefiles/file_zip.cpp index b3bfa7a2d..e0cf4df91 100644 --- a/src/resourcefiles/file_zip.cpp +++ b/src/resourcefiles/file_zip.cpp @@ -40,7 +40,6 @@ #include "v_text.h" #include "w_wad.h" #include "w_zip.h" -#include "i_system.h" #include "ancientzip.h" #define BUFREADCOMMENT (0x400) diff --git a/src/resourcefiles/resourcefile.cpp b/src/resourcefiles/resourcefile.cpp index adb484d32..419bd4707 100644 --- a/src/resourcefiles/resourcefile.cpp +++ b/src/resourcefiles/resourcefile.cpp @@ -38,10 +38,8 @@ #include "resourcefile.h" #include "cmdlib.h" #include "w_wad.h" -#include "doomerrors.h" #include "gi.h" #include "doomstat.h" -#include "w_zip.h" //========================================================================== diff --git a/src/s_advsound.cpp b/src/s_advsound.cpp index 85db21c4b..9de9d7739 100644 --- a/src/s_advsound.cpp +++ b/src/s_advsound.cpp @@ -36,19 +36,11 @@ #include "templates.h" #include "actor.h" -#include "a_sharedglobal.h" -#include "s_sound.h" #include "c_dispatch.h" #include "w_wad.h" -#include "sc_man.h" -#include "g_level.h" -#include "cmdlib.h" #include "gi.h" -#include "doomstat.h" #include "i_sound.h" -#include "m_random.h" #include "d_netinf.h" -#include "i_system.h" #include "d_player.h" #include "serializer.h" #include "v_text.h" diff --git a/src/s_environment.cpp b/src/s_environment.cpp index 0618d72e3..8bd9661c7 100644 --- a/src/s_environment.cpp +++ b/src/s_environment.cpp @@ -33,7 +33,6 @@ */ #include "doomtype.h" -#include "tarray.h" #include "s_sound.h" #include "sc_man.h" #include "cmdlib.h" @@ -44,7 +43,6 @@ #include "c_cvars.h" #include "c_dispatch.h" -#include "files.h" #include "vm.h" #include "dobject.h" #include "menu/menu.h" diff --git a/src/s_sndseq.cpp b/src/s_sndseq.cpp index dea68cf02..6f99fad6e 100644 --- a/src/s_sndseq.cpp +++ b/src/s_sndseq.cpp @@ -21,7 +21,6 @@ // #include -#include #include "doomtype.h" #include "doomstat.h" @@ -30,12 +29,10 @@ #include "s_sound.h" #include "s_sndseq.h" #include "w_wad.h" -#include "i_system.h" #include "cmdlib.h" #include "p_local.h" #include "po_man.h" #include "gi.h" -#include "templates.h" #include "c_dispatch.h" #include "g_level.h" #include "serializer.h" diff --git a/src/s_sound.cpp b/src/s_sound.cpp index 69a559de3..cac01b111 100644 --- a/src/s_sound.cpp +++ b/src/s_sound.cpp @@ -58,7 +58,6 @@ #ifdef _WIN32 #include #endif -#include #include "i_system.h" #include "i_sound.h" @@ -70,7 +69,6 @@ #include "c_dispatch.h" #include "m_random.h" #include "w_wad.h" -#include "doomdef.h" #include "p_local.h" #include "doomstat.h" #include "cmdlib.h" @@ -79,13 +77,9 @@ #include "a_sharedglobal.h" #include "gstrings.h" #include "gi.h" -#include "templates.h" -#include "timidity/timidity.h" -#include "g_level.h" #include "po_man.h" #include "serializer.h" #include "d_player.h" -#include "r_state.h" #include "g_levellocals.h" #include "vm.h" diff --git a/src/sc_man.cpp b/src/sc_man.cpp index 216a5527a..3399947cf 100644 --- a/src/sc_man.cpp +++ b/src/sc_man.cpp @@ -65,7 +65,6 @@ #include "sc_man.h" #include "w_wad.h" #include "cmdlib.h" -#include "m_misc.h" #include "templates.h" #include "doomstat.h" #include "v_text.h" diff --git a/src/scripting/backend/codegen.cpp b/src/scripting/backend/codegen.cpp index 256af647a..e7180afd1 100644 --- a/src/scripting/backend/codegen.cpp +++ b/src/scripting/backend/codegen.cpp @@ -39,22 +39,13 @@ #include #include "actor.h" -#include "sc_man.h" -#include "tarray.h" -#include "templates.h" #include "cmdlib.h" -#include "i_system.h" -#include "m_random.h" #include "a_pickups.h" #include "thingdef.h" #include "p_lnspec.h" -#include "doomstat.h" #include "codegen.h" -#include "m_fixed.h" -#include "vmbuilder.h" #include "v_text.h" #include "w_wad.h" -#include "math/cmath.h" inline PClass *PObjectPointer::PointedClass() const { return static_cast(PointedType)->Descriptor; } diff --git a/src/scripting/backend/vmbuilder.cpp b/src/scripting/backend/vmbuilder.cpp index 131a2094b..1af5b46ba 100644 --- a/src/scripting/backend/vmbuilder.cpp +++ b/src/scripting/backend/vmbuilder.cpp @@ -34,11 +34,7 @@ #include "vmbuilder.h" #include "codegen.h" -#include "info.h" #include "m_argv.h" -//#include "thingdef.h" -#include "doomerrors.h" -#include "vmintern.h" struct VMRemap { diff --git a/src/scripting/decorate/olddecorations.cpp b/src/scripting/decorate/olddecorations.cpp index 7dc12d017..62a00fe57 100644 --- a/src/scripting/decorate/olddecorations.cpp +++ b/src/scripting/decorate/olddecorations.cpp @@ -35,20 +35,13 @@ // HEADER FILES ------------------------------------------------------------ #include "actor.h" -#include "info.h" -#include "sc_man.h" -#include "tarray.h" -#include "templates.h" #include "r_defs.h" #include "a_pickups.h" -#include "s_sound.h" #include "cmdlib.h" #include "p_lnspec.h" #include "decallib.h" -#include "i_system.h" #include "thingdef.h" #include "backend/codegen.h" -#include "r_data/r_translate.h" // TYPES ------------------------------------------------------------------- diff --git a/src/scripting/decorate/thingdef_exp.cpp b/src/scripting/decorate/thingdef_exp.cpp index 37d613d8a..c94b98093 100644 --- a/src/scripting/decorate/thingdef_exp.cpp +++ b/src/scripting/decorate/thingdef_exp.cpp @@ -39,16 +39,9 @@ */ #include "actor.h" -#include "sc_man.h" -#include "tarray.h" -#include "templates.h" #include "cmdlib.h" -#include "i_system.h" -#include "m_random.h" #include "a_pickups.h" #include "thingdef.h" -#include "p_lnspec.h" -#include "doomstat.h" #include "backend/codegen.h" FRandom pr_exrandom ("EX_Random"); diff --git a/src/scripting/decorate/thingdef_parse.cpp b/src/scripting/decorate/thingdef_parse.cpp index c2cc3ecbe..bad24c872 100644 --- a/src/scripting/decorate/thingdef_parse.cpp +++ b/src/scripting/decorate/thingdef_parse.cpp @@ -41,17 +41,10 @@ #include "doomtype.h" #include "actor.h" #include "a_pickups.h" -#include "sc_man.h" #include "thingdef.h" #include "a_morph.h" -#include "cmdlib.h" -#include "templates.h" -#include "v_palette.h" -#include "doomerrors.h" -#include "i_system.h" #include "backend/codegen.h" #include "w_wad.h" -#include "v_video.h" #include "v_text.h" #include "m_argv.h" diff --git a/src/scripting/decorate/thingdef_states.cpp b/src/scripting/decorate/thingdef_states.cpp index a5f48aa6c..d03069775 100644 --- a/src/scripting/decorate/thingdef_states.cpp +++ b/src/scripting/decorate/thingdef_states.cpp @@ -39,23 +39,11 @@ */ #include "a_pickups.h" -#include "info.h" -#include "sc_man.h" -#include "tarray.h" -#include "templates.h" #include "cmdlib.h" #include "p_lnspec.h" #include "p_local.h" -#include "v_palette.h" -#include "doomerrors.h" #include "thingdef.h" -#include "a_sharedglobal.h" -#include "s_sound.h" -#include "i_system.h" -#include "colormatcher.h" #include "backend/codegen.h" -#include "templates.h" -#include "backend/vmbuilder.h" //========================================================================== //*** diff --git a/src/scripting/symbols.cpp b/src/scripting/symbols.cpp index 9fcefd603..335edd552 100644 --- a/src/scripting/symbols.cpp +++ b/src/scripting/symbols.cpp @@ -35,7 +35,6 @@ #include #include "dobject.h" -#include "i_system.h" #include "templates.h" #include "serializer.h" #include "types.h" diff --git a/src/scripting/thingdef.cpp b/src/scripting/thingdef.cpp index aa8db34fd..d7869c26a 100644 --- a/src/scripting/thingdef.cpp +++ b/src/scripting/thingdef.cpp @@ -40,29 +40,16 @@ #include "gi.h" #include "actor.h" -#include "info.h" -#include "sc_man.h" -#include "tarray.h" -#include "w_wad.h" -#include "templates.h" #include "r_defs.h" #include "a_pickups.h" -#include "s_sound.h" #include "cmdlib.h" #include "p_lnspec.h" #include "decallib.h" -#include "m_random.h" -#include "i_system.h" -#include "m_argv.h" #include "p_local.h" -#include "doomerrors.h" #include "a_weapons.h" #include "p_conversation.h" #include "v_text.h" -//#include "thingdef.h" #include "backend/codegen.h" -#include "a_sharedglobal.h" -#include "backend/vmbuilder.h" #include "stats.h" // EXTERNAL FUNCTION PROTOTYPES -------------------------------------------- diff --git a/src/scripting/thingdef_data.cpp b/src/scripting/thingdef_data.cpp index 4560b282e..002c0a81a 100644 --- a/src/scripting/thingdef_data.cpp +++ b/src/scripting/thingdef_data.cpp @@ -42,26 +42,18 @@ #include "actor.h" #include "d_player.h" #include "p_effect.h" -#include "autosegs.h" -#include "p_maputl.h" #include "gi.h" #include "p_terrain.h" #include "gstrings.h" -#include "zstring.h" -#include "d_event.h" #include "g_levellocals.h" #include "p_checkposition.h" -#include "r_sky.h" #include "v_font.h" -#include "v_video.h" -#include "c_bind.h" #include "menu/menu.h" #include "teaminfo.h" #include "r_data/sprites.h" #include "serializer.h" #include "wi_stuff.h" #include "a_dynlight.h" -#include "vm.h" #include "types.h" static TArray properties; diff --git a/src/scripting/thingdef_properties.cpp b/src/scripting/thingdef_properties.cpp index 4a98b5097..e5338e37e 100644 --- a/src/scripting/thingdef_properties.cpp +++ b/src/scripting/thingdef_properties.cpp @@ -40,36 +40,19 @@ #include "gi.h" #include "d_player.h" -#include "info.h" -#include "tarray.h" #include "w_wad.h" -#include "templates.h" -#include "r_defs.h" -#include "a_pickups.h" -#include "s_sound.h" #include "cmdlib.h" #include "p_lnspec.h" #include "decallib.h" -#include "m_random.h" -#include "i_system.h" #include "p_local.h" #include "p_effect.h" -#include "v_palette.h" -#include "doomerrors.h" -#include "p_conversation.h" #include "v_text.h" #include "thingdef.h" -#include "a_sharedglobal.h" -#include "r_data/r_translate.h" #include "a_morph.h" -#include "colormatcher.h" #include "teaminfo.h" -#include "v_video.h" -#include "r_data/colormaps.h" #include "backend/vmbuilder.h" #include "a_keys.h" #include "g_levellocals.h" -#include "d_player.h" #include "types.h" //========================================================================== diff --git a/src/scripting/vm/vmexec.cpp b/src/scripting/vm/vmexec.cpp index 252371c40..f1119feee 100644 --- a/src/scripting/vm/vmexec.cpp +++ b/src/scripting/vm/vmexec.cpp @@ -34,11 +34,7 @@ #include #include #include -#include "dobject.h" -#include "xs_Float.h" #include "r_state.h" -#include "textures/textures.h" -#include "math/cmath.h" #include "stats.h" #include "vmintern.h" #include "types.h" diff --git a/src/scripting/zscript/ast.cpp b/src/scripting/zscript/ast.cpp index 463364f99..773173503 100644 --- a/src/scripting/zscript/ast.cpp +++ b/src/scripting/zscript/ast.cpp @@ -34,8 +34,6 @@ #include "dobject.h" #include "vmintern.h" #include "types.h" -#include "sc_man.h" -#include "memarena.h" #include "zcc_parser.h" #include "zcc-parse.h" diff --git a/src/scripting/zscript/zcc_compile.cpp b/src/scripting/zscript/zcc_compile.cpp index d782383e7..08131d15f 100644 --- a/src/scripting/zscript/zcc_compile.cpp +++ b/src/scripting/zscript/zcc_compile.cpp @@ -34,22 +34,13 @@ #include "a_pickups.h" #include "thingdef.h" -#include "sc_man.h" #include "c_console.h" -#include "c_dispatch.h" -#include "doomerrors.h" #include "w_wad.h" -#include "cmdlib.h" -#include "m_alloc.h" #include "zcc_parser.h" #include "zcc-parse.h" #include "zcc_compile.h" #include "v_text.h" #include "p_lnspec.h" -#include "i_system.h" -#include "gdtoa.h" -#include "backend/vmbuilder.h" -#include "types.h" FSharedStringArena VMStringConstants; bool isActor(PContainerType *type); diff --git a/src/scripting/zscript/zcc_parser.cpp b/src/scripting/zscript/zcc_parser.cpp index f067311ef..693ffcffa 100644 --- a/src/scripting/zscript/zcc_parser.cpp +++ b/src/scripting/zscript/zcc_parser.cpp @@ -33,12 +33,8 @@ #include "dobject.h" #include "sc_man.h" -#include "c_console.h" -#include "c_dispatch.h" #include "w_wad.h" #include "cmdlib.h" -#include "m_alloc.h" -#include "i_system.h" #include "m_argv.h" #include "v_text.h" #include "version.h" diff --git a/src/serializer.cpp b/src/serializer.cpp index 02219544d..aa1c9a49e 100644 --- a/src/serializer.cpp +++ b/src/serializer.cpp @@ -41,27 +41,20 @@ #include "rapidjson/rapidjson.h" #include "rapidjson/writer.h" #include "rapidjson/prettywriter.h" -#include "rapidjson/stringbuffer.h" #include "rapidjson/document.h" #include "serializer.h" -#include "r_data/colormaps.h" #include "r_data/r_interpolate.h" -#include "r_defs.h" #include "r_state.h" #include "p_lnspec.h" -#include "i_system.h" #include "w_wad.h" #include "p_terrain.h" -#include "c_dispatch.h" #include "p_setup.h" #include "p_conversation.h" #include "dsectoreffect.h" #include "d_player.h" -#include "r_data/r_interpolate.h" #include "g_shared/a_sharedglobal.h" #include "po_man.h" #include "v_font.h" -#include "w_zip.h" #include "doomerrors.h" #include "v_text.h" #include "cmdlib.h" diff --git a/src/sound/i_music.cpp b/src/sound/i_music.cpp index 273ddb115..db8030bba 100644 --- a/src/sound/i_music.cpp +++ b/src/sound/i_music.cpp @@ -35,32 +35,16 @@ #ifndef _WIN32 #include #include -#include -#include -#include -#include #include "mus2midi.h" #endif -#include -#include -#include #include #include "i_musicinterns.h" -#include "doomtype.h" #include "m_argv.h" -#include "i_music.h" #include "w_wad.h" -#include "c_console.h" #include "c_dispatch.h" -#include "i_system.h" -#include "i_sound.h" -#include "s_sound.h" -#include "m_swap.h" -#include "i_cd.h" #include "templates.h" -#include "m_misc.h" #include "stats.h" #include "timidity/timidity.h" #include "vm.h" diff --git a/src/sound/i_sound.cpp b/src/sound/i_sound.cpp index ac05783c5..1772d0c0d 100644 --- a/src/sound/i_sound.cpp +++ b/src/sound/i_sound.cpp @@ -34,33 +34,18 @@ #include #include -#include #include "doomtype.h" -#include #include "oalsound.h" #include "mpg123_decoder.h" #include "sndfile_decoder.h" -#include "m_swap.h" -#include "stats.h" -#include "files.h" -#include "c_cvars.h" #include "c_dispatch.h" -#include "i_system.h" -#include "i_sound.h" #include "i_music.h" #include "m_argv.h" -#include "m_misc.h" -#include "w_wad.h" -#include "i_video.h" -#include "s_sound.h" #include "v_text.h" -#include "gi.h" - -#include "doomdef.h" EXTERN_CVAR (Float, snd_sfxvolume) CVAR (Int, snd_samplerate, 0, CVAR_ARCHIVE|CVAR_GLOBALCONFIG) diff --git a/src/sound/i_soundfont.cpp b/src/sound/i_soundfont.cpp index 3e30af741..eb2027215 100644 --- a/src/sound/i_soundfont.cpp +++ b/src/sound/i_soundfont.cpp @@ -34,10 +34,8 @@ #include #include -#include #include "i_soundfont.h" #include "cmdlib.h" -#include "w_wad.h" #include "i_system.h" #include "gameconfigfile.h" #include "resourcefiles/resourcefile.h" diff --git a/src/sound/mididevices/music_adlmidi_mididevice.cpp b/src/sound/mididevices/music_adlmidi_mididevice.cpp index d878bfe1f..9025c4745 100644 --- a/src/sound/mididevices/music_adlmidi_mididevice.cpp +++ b/src/sound/mididevices/music_adlmidi_mididevice.cpp @@ -35,13 +35,7 @@ // HEADER FILES ------------------------------------------------------------ #include "i_musicinterns.h" -#include "templates.h" -#include "doomdef.h" -#include "m_swap.h" -#include "w_wad.h" -#include "v_text.h" #include "adlmidi/adlmidi.h" -#include enum { diff --git a/src/sound/mididevices/music_fluidsynth_mididevice.cpp b/src/sound/mididevices/music_fluidsynth_mididevice.cpp index 9e3d9d430..9112e527a 100644 --- a/src/sound/mididevices/music_fluidsynth_mididevice.cpp +++ b/src/sound/mididevices/music_fluidsynth_mididevice.cpp @@ -36,12 +36,7 @@ #include "i_musicinterns.h" #include "i_system.h" -#include "templates.h" -#include "doomdef.h" -#include "m_swap.h" -#include "w_wad.h" #include "v_text.h" -#include "version.h" #include "cmdlib.h" #include "i_soundfont.h" diff --git a/src/sound/mididevices/music_opl_mididevice.cpp b/src/sound/mididevices/music_opl_mididevice.cpp index 48aa8104f..f5a45ab23 100644 --- a/src/sound/mididevices/music_opl_mididevice.cpp +++ b/src/sound/mididevices/music_opl_mididevice.cpp @@ -36,9 +36,6 @@ // HEADER FILES ------------------------------------------------------------ #include "i_musicinterns.h" -#include "templates.h" -#include "doomdef.h" -#include "m_swap.h" #include "w_wad.h" #include "v_text.h" #include "i_system.h" diff --git a/src/sound/mididevices/music_opldumper_mididevice.cpp b/src/sound/mididevices/music_opldumper_mididevice.cpp index 3519103e8..43f421c96 100644 --- a/src/sound/mididevices/music_opldumper_mididevice.cpp +++ b/src/sound/mididevices/music_opldumper_mididevice.cpp @@ -36,11 +36,7 @@ #include "i_musicinterns.h" #include "templates.h" -#include "doomdef.h" -#include "m_swap.h" -#include "w_wad.h" #include "opl.h" -#include "files.h" // MACROS ------------------------------------------------------------------ diff --git a/src/sound/mididevices/music_opnmidi_mididevice.cpp b/src/sound/mididevices/music_opnmidi_mididevice.cpp index f083ff634..8c61ab9e7 100644 --- a/src/sound/mididevices/music_opnmidi_mididevice.cpp +++ b/src/sound/mididevices/music_opnmidi_mididevice.cpp @@ -35,14 +35,9 @@ // HEADER FILES ------------------------------------------------------------ #include "i_musicinterns.h" -#include "templates.h" -#include "doomdef.h" -#include "m_swap.h" #include "w_wad.h" -#include "v_text.h" #include "i_system.h" #include "opnmidi/opnmidi.h" -#include enum { diff --git a/src/sound/mididevices/music_softsynth_mididevice.cpp b/src/sound/mididevices/music_softsynth_mididevice.cpp index ccee4bd27..46fcb59e1 100644 --- a/src/sound/mididevices/music_softsynth_mididevice.cpp +++ b/src/sound/mididevices/music_softsynth_mididevice.cpp @@ -36,10 +36,6 @@ #include "i_musicinterns.h" #include "templates.h" -#include "doomdef.h" -#include "m_swap.h" -#include "w_wad.h" -#include "v_text.h" #include "i_system.h" // MACROS ------------------------------------------------------------------ diff --git a/src/sound/mididevices/music_timidity_mididevice.cpp b/src/sound/mididevices/music_timidity_mididevice.cpp index 9f44d9eb8..504fe8afe 100644 --- a/src/sound/mididevices/music_timidity_mididevice.cpp +++ b/src/sound/mididevices/music_timidity_mididevice.cpp @@ -35,10 +35,6 @@ // HEADER FILES ------------------------------------------------------------ #include "i_musicinterns.h" -#include "templates.h" -#include "doomdef.h" -#include "m_swap.h" -#include "w_wad.h" #include "v_text.h" #include "timidity/timidity.h" diff --git a/src/sound/mididevices/music_timiditypp_mididevice.cpp b/src/sound/mididevices/music_timiditypp_mididevice.cpp index df91d1d44..d7025dbcf 100644 --- a/src/sound/mididevices/music_timiditypp_mididevice.cpp +++ b/src/sound/mididevices/music_timiditypp_mididevice.cpp @@ -33,14 +33,8 @@ */ #include -#include #include "i_musicinterns.h" -#include "c_cvars.h" -#include "cmdlib.h" -#include "templates.h" -#include "version.h" -#include "m_misc.h" #include "v_text.h" #include "i_system.h" diff --git a/src/sound/mididevices/music_wavewriter_mididevice.cpp b/src/sound/mididevices/music_wavewriter_mididevice.cpp index 6bf585636..2fd230363 100644 --- a/src/sound/mididevices/music_wavewriter_mididevice.cpp +++ b/src/sound/mididevices/music_wavewriter_mididevice.cpp @@ -36,12 +36,6 @@ // HEADER FILES ------------------------------------------------------------ #include "i_musicinterns.h" -#include "templates.h" -#include "doomdef.h" -#include "m_swap.h" -#include "w_wad.h" -#include "v_text.h" -#include "timidity/timidity.h" #include // MACROS ------------------------------------------------------------------ diff --git a/src/sound/mididevices/music_wildmidi_mididevice.cpp b/src/sound/mididevices/music_wildmidi_mididevice.cpp index fe3571389..ccb63ebf3 100644 --- a/src/sound/mididevices/music_wildmidi_mididevice.cpp +++ b/src/sound/mididevices/music_wildmidi_mididevice.cpp @@ -35,11 +35,6 @@ // HEADER FILES ------------------------------------------------------------ #include "i_musicinterns.h" -#include "templates.h" -#include "doomdef.h" -#include "m_swap.h" -#include "w_wad.h" -#include "v_text.h" #include "i_system.h" // MACROS ------------------------------------------------------------------ diff --git a/src/sound/midisources/midisource.cpp b/src/sound/midisources/midisource.cpp index acb09fd56..a8e992141 100644 --- a/src/sound/midisources/midisource.cpp +++ b/src/sound/midisources/midisource.cpp @@ -35,7 +35,6 @@ #include "i_musicinterns.h" -#include "midisource.h" char MIDI_EventLengths[7] = { 2, 2, 2, 2, 1, 1, 2 }; diff --git a/src/sound/midisources/midisource_hmi.cpp b/src/sound/midisources/midisource_hmi.cpp index 7b9276f1f..0c555268c 100644 --- a/src/sound/midisources/midisource_hmi.cpp +++ b/src/sound/midisources/midisource_hmi.cpp @@ -36,10 +36,6 @@ #include "i_musicinterns.h" #include "templates.h" -#include "doomdef.h" -#include "m_swap.h" -#include "files.h" -#include "midisource.h" // MACROS ------------------------------------------------------------------ diff --git a/src/sound/midisources/midisource_mus.cpp b/src/sound/midisources/midisource_mus.cpp index f978b888f..b41b9a23f 100644 --- a/src/sound/midisources/midisource_mus.cpp +++ b/src/sound/midisources/midisource_mus.cpp @@ -35,10 +35,6 @@ #include "i_musicinterns.h" #include "templates.h" -#include "doomdef.h" -#include "m_swap.h" -#include "files.h" -#include "s_sound.h" // MACROS ------------------------------------------------------------------ diff --git a/src/sound/midisources/midisource_smf.cpp b/src/sound/midisources/midisource_smf.cpp index 5330d74d4..d7e8808f1 100644 --- a/src/sound/midisources/midisource_smf.cpp +++ b/src/sound/midisources/midisource_smf.cpp @@ -38,10 +38,6 @@ // HEADER FILES ------------------------------------------------------------ #include "i_musicinterns.h" -#include "templates.h" -#include "doomdef.h" -#include "m_swap.h" -#include "files.h" // MACROS ------------------------------------------------------------------ diff --git a/src/sound/midisources/midisource_xmi.cpp b/src/sound/midisources/midisource_xmi.cpp index 3fbfdeb5d..caad0897c 100644 --- a/src/sound/midisources/midisource_xmi.cpp +++ b/src/sound/midisources/midisource_xmi.cpp @@ -35,10 +35,6 @@ // HEADER FILES ------------------------------------------------------------ #include "i_musicinterns.h" -#include "templates.h" -#include "doomdef.h" -#include "m_swap.h" -#include "files.h" // MACROS ------------------------------------------------------------------ diff --git a/src/sound/mpg123_decoder.cpp b/src/sound/mpg123_decoder.cpp index 716553c52..ed13ea20d 100644 --- a/src/sound/mpg123_decoder.cpp +++ b/src/sound/mpg123_decoder.cpp @@ -32,7 +32,6 @@ */ #include "mpg123_decoder.h" -#include "files.h" #include "i_module.h" #include "cmdlib.h" diff --git a/src/sound/music_midi_base.cpp b/src/sound/music_midi_base.cpp index 90633bc53..713475a38 100644 --- a/src/sound/music_midi_base.cpp +++ b/src/sound/music_midi_base.cpp @@ -36,14 +36,7 @@ #include "i_musicinterns.h" #include "c_dispatch.h" -#include "i_music.h" -#include "i_system.h" -#include "gameconfigfile.h" -#include "cmdlib.h" -#include "m_misc.h" -#include "s_sound.h" -#include "templates.h" #include "v_text.h" #include "menu/menu.h" diff --git a/src/sound/musicformats/music_cd.cpp b/src/sound/musicformats/music_cd.cpp index 52de04a57..58f1d1685 100644 --- a/src/sound/musicformats/music_cd.cpp +++ b/src/sound/musicformats/music_cd.cpp @@ -33,7 +33,6 @@ #include "i_musicinterns.h" #include "i_cd.h" -#include "files.h" void CDSong::Play (bool looping, int subsong) { diff --git a/src/sound/musicformats/music_dumb.cpp b/src/sound/musicformats/music_dumb.cpp index 19f76cb02..99974a106 100644 --- a/src/sound/musicformats/music_dumb.cpp +++ b/src/sound/musicformats/music_dumb.cpp @@ -37,14 +37,7 @@ #include #include "i_musicinterns.h" -#include "doomtype.h" -#include "doomdef.h" -#include "m_swap.h" -#include "m_fixed.h" -#include "c_cvars.h" -#include "i_sound.h" #include "i_system.h" -#include "files.h" #undef CDECL // w32api's windef.h defines this #include "../dumb/include/dumb.h" diff --git a/src/sound/musicformats/music_gme.cpp b/src/sound/musicformats/music_gme.cpp index b0dff3da1..0c1d6d230 100644 --- a/src/sound/musicformats/music_gme.cpp +++ b/src/sound/musicformats/music_gme.cpp @@ -38,11 +38,8 @@ //#define GME_DLL #include "i_musicinterns.h" -#include "c_cvars.h" -#include "critsec.h" #include #include "v_text.h" -#include "files.h" #include "templates.h" // MACROS ------------------------------------------------------------------ diff --git a/src/sound/musicformats/music_libsndfile.cpp b/src/sound/musicformats/music_libsndfile.cpp index 61be6b56c..e4cd09a42 100644 --- a/src/sound/musicformats/music_libsndfile.cpp +++ b/src/sound/musicformats/music_libsndfile.cpp @@ -35,8 +35,6 @@ // HEADER FILES ------------------------------------------------------------ #include "i_musicinterns.h" -#include "c_cvars.h" -#include "critsec.h" #include "v_text.h" #include "templates.h" #include "m_fixed.h" diff --git a/src/sound/musicformats/music_midistream.cpp b/src/sound/musicformats/music_midistream.cpp index 650d9f87c..c52f35339 100644 --- a/src/sound/musicformats/music_midistream.cpp +++ b/src/sound/musicformats/music_midistream.cpp @@ -37,8 +37,6 @@ #include "i_musicinterns.h" #include "templates.h" -#include "doomdef.h" -#include "m_swap.h" #include "doomerrors.h" #include "v_text.h" diff --git a/src/sound/musicformats/music_opl.cpp b/src/sound/musicformats/music_opl.cpp index fe29bb145..f91b43aa6 100644 --- a/src/sound/musicformats/music_opl.cpp +++ b/src/sound/musicformats/music_opl.cpp @@ -32,7 +32,6 @@ */ #include "i_musicinterns.h" -#include "oplsynth/musicblock.h" #include "oplsynth/opl.h" static bool OPL_Active; diff --git a/src/sound/oalsound.cpp b/src/sound/oalsound.cpp index 391912162..4b494ed11 100644 --- a/src/sound/oalsound.cpp +++ b/src/sound/oalsound.cpp @@ -33,20 +33,13 @@ */ #include -#include #include #include "doomstat.h" #include "templates.h" #include "oalsound.h" -#include "c_cvars.h" #include "c_dispatch.h" -#include "i_system.h" #include "v_text.h" -#include "gi.h" -#include "actor.h" -#include "r_state.h" -#include "w_wad.h" #include "i_module.h" #include "i_music.h" #include "i_musicinterns.h" diff --git a/src/sound/oplsynth/OPL3.cpp b/src/sound/oplsynth/OPL3.cpp index fee608088..291c24542 100644 --- a/src/sound/oplsynth/OPL3.cpp +++ b/src/sound/oplsynth/OPL3.cpp @@ -44,7 +44,6 @@ */ #include -#include #include "doomtype.h" #include "opl.h" diff --git a/src/sound/oplsynth/dosbox/opl.cpp b/src/sound/oplsynth/dosbox/opl.cpp index 67fcefc0b..4209fa2fe 100644 --- a/src/sound/oplsynth/dosbox/opl.cpp +++ b/src/sound/oplsynth/dosbox/opl.cpp @@ -26,7 +26,6 @@ #include "doomtype.h" #include "../opl.h" -#include "../musicblock.h" #include #include "m_random.h" diff --git a/src/sound/oplsynth/fmopl.cpp b/src/sound/oplsynth/fmopl.cpp index d50c0f329..a37cae274 100644 --- a/src/sound/oplsynth/fmopl.cpp +++ b/src/sound/oplsynth/fmopl.cpp @@ -82,7 +82,6 @@ Revision History: #include #include #include -#include #include //#include "driver.h" /* use M.A.M.E. */ #include "opl.h" diff --git a/src/sound/oplsynth/musicblock.cpp b/src/sound/oplsynth/musicblock.cpp index daea5ea2d..32254f670 100644 --- a/src/sound/oplsynth/musicblock.cpp +++ b/src/sound/oplsynth/musicblock.cpp @@ -28,8 +28,6 @@ #include #include #include "musicblock.h" -#include "files.h" -#include "templates.h" #include "c_cvars.h" diff --git a/src/sound/oplsynth/opl_mus_player.cpp b/src/sound/oplsynth/opl_mus_player.cpp index 6cb33348e..73b2d9bc6 100644 --- a/src/sound/oplsynth/opl_mus_player.cpp +++ b/src/sound/oplsynth/opl_mus_player.cpp @@ -39,13 +39,10 @@ #include #include "opl_mus_player.h" -#include "doomtype.h" #include "opl.h" #include "w_wad.h" #include "templates.h" #include "c_cvars.h" -#include "i_system.h" -#include "stats.h" #define IMF_RATE 700.0 diff --git a/src/sound/sndfile_decoder.cpp b/src/sound/sndfile_decoder.cpp index f23ac2337..28bf11374 100644 --- a/src/sound/sndfile_decoder.cpp +++ b/src/sound/sndfile_decoder.cpp @@ -32,8 +32,6 @@ */ #include "sndfile_decoder.h" #include "templates.h" -#include "files.h" -#include "xs_Float.h" #include "i_module.h" #include "cmdlib.h" diff --git a/src/sound/timidity/common.cpp b/src/sound/timidity/common.cpp index 953678424..02d10c7e8 100644 --- a/src/sound/timidity/common.cpp +++ b/src/sound/timidity/common.cpp @@ -23,14 +23,8 @@ #include #include -#include -#include #include "timidity.h" -#include "tarray.h" #include "i_system.h" -#include "w_wad.h" -#include "files.h" -#include "cmdlib.h" namespace Timidity { diff --git a/src/sound/timidity/instrum.cpp b/src/sound/timidity/instrum.cpp index 32ccd121f..a866412e1 100644 --- a/src/sound/timidity/instrum.cpp +++ b/src/sound/timidity/instrum.cpp @@ -30,8 +30,6 @@ #include #include "timidity.h" -#include "m_swap.h" -#include "files.h" #include "templates.h" #include "gf1patch.h" #include "i_soundfont.h" diff --git a/src/sound/timidity/instrum_dls.cpp b/src/sound/timidity/instrum_dls.cpp index 4f553ff5f..bc6b5b5d2 100644 --- a/src/sound/timidity/instrum_dls.cpp +++ b/src/sound/timidity/instrum_dls.cpp @@ -27,7 +27,6 @@ #include "timidity.h" #include "doomdef.h" -#include "m_swap.h" #define __Sound_SetError(x) diff --git a/src/sound/timidity/instrum_font.cpp b/src/sound/timidity/instrum_font.cpp index 22fd5d50d..f1ceb0b1b 100644 --- a/src/sound/timidity/instrum_font.cpp +++ b/src/sound/timidity/instrum_font.cpp @@ -1,14 +1,9 @@ #include #include -#include #include -#include "doomdef.h" -#include "m_swap.h" -#include "templates.h" #include "timidity.h" #include "sf2.h" -#include "files.h" #include "i_soundfont.h" namespace Timidity diff --git a/src/sound/timidity/instrum_sf2.cpp b/src/sound/timidity/instrum_sf2.cpp index dd7f8dd61..3f50f1575 100644 --- a/src/sound/timidity/instrum_sf2.cpp +++ b/src/sound/timidity/instrum_sf2.cpp @@ -9,7 +9,6 @@ #include "templates.h" #include "timidity.h" #include "sf2.h" -#include "files.h" #include "i_soundfont.h" namespace Timidity diff --git a/src/sound/timidity/mix.cpp b/src/sound/timidity/mix.cpp index e09a15ba0..b2d23839c 100644 --- a/src/sound/timidity/mix.cpp +++ b/src/sound/timidity/mix.cpp @@ -26,8 +26,6 @@ #include #include "timidity.h" -#include "templates.h" -#include "c_cvars.h" namespace Timidity { diff --git a/src/sound/timidity/playmidi.cpp b/src/sound/timidity/playmidi.cpp index f8df539fa..835f4e306 100644 --- a/src/sound/timidity/playmidi.cpp +++ b/src/sound/timidity/playmidi.cpp @@ -27,7 +27,6 @@ #include #include "timidity.h" -#include "c_cvars.h" namespace Timidity { diff --git a/src/sound/timidity/resample.cpp b/src/sound/timidity/resample.cpp index bd45271e1..254a7d060 100644 --- a/src/sound/timidity/resample.cpp +++ b/src/sound/timidity/resample.cpp @@ -26,7 +26,6 @@ #include #include "timidity.h" -#include "c_cvars.h" namespace Timidity { diff --git a/src/sound/timiditypp/common.cpp b/src/sound/timiditypp/common.cpp index 77df91798..f6c8bbea0 100644 --- a/src/sound/timiditypp/common.cpp +++ b/src/sound/timiditypp/common.cpp @@ -23,14 +23,11 @@ #include #include -#include -#include #include #include #include "m_random.h" #include "common.h" -#include "cmdlib.h" namespace TimidityPlus { diff --git a/src/sound/timiditypp/configfile.cpp b/src/sound/timiditypp/configfile.cpp index 1344a9cd6..8f7a57509 100644 --- a/src/sound/timiditypp/configfile.cpp +++ b/src/sound/timiditypp/configfile.cpp @@ -22,17 +22,11 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #include #include -#include - -#include - #include "timidity.h" #include "common.h" #include "instrum.h" #include "quantity.h" #include "cmdlib.h" -#include "i_soundfont.h" - namespace TimidityPlus diff --git a/src/sound/timiditypp/filter.cpp b/src/sound/timiditypp/filter.cpp index 7e3cb37ea..1e82de4c5 100644 --- a/src/sound/timiditypp/filter.cpp +++ b/src/sound/timiditypp/filter.cpp @@ -34,9 +34,7 @@ #include #include -#include "timidity.h" #include "common.h" -#include "instrum.h" #include "filter.h" namespace TimidityPlus diff --git a/src/sound/timiditypp/instrum.cpp b/src/sound/timiditypp/instrum.cpp index ddd0d8fab..554f01317 100644 --- a/src/sound/timiditypp/instrum.cpp +++ b/src/sound/timiditypp/instrum.cpp @@ -36,7 +36,6 @@ #include "filter.h" #include "quantity.h" #include "freq.h" -#include "i_soundfont.h" namespace TimidityPlus { diff --git a/src/sound/timiditypp/quantity.cpp b/src/sound/timiditypp/quantity.cpp index 8cded87f0..ea814006c 100644 --- a/src/sound/timiditypp/quantity.cpp +++ b/src/sound/timiditypp/quantity.cpp @@ -29,7 +29,6 @@ #include "timidity.h" #include "common.h" #include "instrum.h" -#include "playmidi.h" #include "tables.h" #include "quantity.h" diff --git a/src/sound/timiditypp/readmidic.cpp b/src/sound/timiditypp/readmidic.cpp index 14e07a8bd..eb1caf11a 100644 --- a/src/sound/timiditypp/readmidic.cpp +++ b/src/sound/timiditypp/readmidic.cpp @@ -20,8 +20,6 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #include #include -#include -#include #include "timidity.h" #include "instrum.h" diff --git a/src/sound/timiditypp/recache.cpp b/src/sound/timiditypp/recache.cpp index dcb15ca38..28ac87676 100644 --- a/src/sound/timiditypp/recache.cpp +++ b/src/sound/timiditypp/recache.cpp @@ -32,7 +32,6 @@ #include "instrum.h" #include "playmidi.h" #include "tables.h" -#include "mblock.h" #include "recache.h" #include "resample.h" diff --git a/src/sound/timiditypp/resample.cpp b/src/sound/timiditypp/resample.cpp index 90824ed55..3c6f96867 100644 --- a/src/sound/timiditypp/resample.cpp +++ b/src/sound/timiditypp/resample.cpp @@ -24,8 +24,6 @@ #include #include -#include - #include "timidity.h" #include "common.h" #include "instrum.h" diff --git a/src/sound/timiditypp/reverb.cpp b/src/sound/timiditypp/reverb.cpp index ae7401143..69b6f2959 100644 --- a/src/sound/timiditypp/reverb.cpp +++ b/src/sound/timiditypp/reverb.cpp @@ -35,8 +35,6 @@ #include "common.h" #include "reverb.h" #include "optcode.h" -#include -#include namespace TimidityPlus { diff --git a/src/sound/timiditypp/sbkconv.cpp b/src/sound/timiditypp/sbkconv.cpp index e2a81bcec..1b93a431e 100644 --- a/src/sound/timiditypp/sbkconv.cpp +++ b/src/sound/timiditypp/sbkconv.cpp @@ -40,9 +40,7 @@ #include #include -#include "timidity.h" #include "common.h" -#include "sffile.h" #include "sfitem.h" diff --git a/src/sound/timiditypp/sfitem.cpp b/src/sound/timiditypp/sfitem.cpp index fc7d55e69..1e2e5cbfd 100644 --- a/src/sound/timiditypp/sfitem.cpp +++ b/src/sound/timiditypp/sfitem.cpp @@ -23,10 +23,7 @@ * soundfont generator table definition *================================================================*/ -#include #include -#include "timidity.h" -#include "common.h" #include "sflayer.h" #include "sfitem.h" diff --git a/src/sound/timiditypp/sndfont.cpp b/src/sound/timiditypp/sndfont.cpp index b7bf00511..62ea2f6e6 100644 --- a/src/sound/timiditypp/sndfont.cpp +++ b/src/sound/timiditypp/sndfont.cpp @@ -38,9 +38,6 @@ #include "tables.h" #include "instrum.h" #include "playmidi.h" -#include "sffile.h" -#include "sflayer.h" -#include "sfitem.h" #include "filter.h" #include "freq.h" #include "resample.h" diff --git a/src/sound/timiditypp/tables.cpp b/src/sound/timiditypp/tables.cpp index 66e95a667..504579df9 100644 --- a/src/sound/timiditypp/tables.cpp +++ b/src/sound/timiditypp/tables.cpp @@ -30,7 +30,6 @@ #include #include #include "timidity.h" -#include "common.h" #include "tables.h" #include "instrum.h" diff --git a/src/sound/wildmidi/file_io.cpp b/src/sound/wildmidi/file_io.cpp index b1d3d2dd5..723359856 100644 --- a/src/sound/wildmidi/file_io.cpp +++ b/src/sound/wildmidi/file_io.cpp @@ -39,7 +39,6 @@ #include "files.h" #include "wm_error.h" #include "file_io.h" -#include "cmdlib.h" #include "i_soundfont.h" std::unique_ptr wm_sfreader; diff --git a/src/sound/wildmidi/wildmidi_lib.cpp b/src/sound/wildmidi/wildmidi_lib.cpp index 8bcaa9d3d..b505d0982 100644 --- a/src/sound/wildmidi/wildmidi_lib.cpp +++ b/src/sound/wildmidi/wildmidi_lib.cpp @@ -32,16 +32,9 @@ #include #include #ifndef _WIN32 -#include #include -#include #endif -#include -#include #include -#include -#include -#include #include #include "common.h" diff --git a/src/statistics.cpp b/src/statistics.cpp index 447352f86..0a3aeadea 100644 --- a/src/statistics.cpp +++ b/src/statistics.cpp @@ -41,38 +41,23 @@ #include "g_level.h" #include "gstrings.h" #include "doomstat.h" -#include "configfile.h" #include "c_dispatch.h" -#include "c_console.h" -#include "d_gui.h" -#include "d_dehacked.h" #include "d_net.h" #include "g_game.h" #include "m_png.h" -#include "m_misc.h" #include "doomerrors.h" #include "w_wad.h" -#include "hu_stuff.h" #include "p_local.h" -#include "m_png.h" #include "p_setup.h" #include "s_sound.h" -#include "wi_stuff.h" -#include "sc_man.h" #include "cmdlib.h" #include "p_terrain.h" #include "decallib.h" -#include "autosegs.h" -#include "i_cd.h" #include "stats.h" #include "a_sharedglobal.h" -#include "v_text.h" -#include "r_sky.h" #include "p_lnspec.h" -#include "m_crc32.h" #include "serializer.h" #include "g_levellocals.h" -#include "files.h" CVAR(Int, savestatistics, 0, CVAR_ARCHIVE|CVAR_GLOBALCONFIG) CVAR(String, statfile, "zdoomstat.txt", CVAR_ARCHIVE|CVAR_GLOBALCONFIG) diff --git a/src/stats.cpp b/src/stats.cpp index d4c1d37df..82b120bb2 100644 --- a/src/stats.cpp +++ b/src/stats.cpp @@ -36,11 +36,7 @@ #include "stats.h" #include "v_video.h" #include "v_text.h" -#include "hu_stuff.h" -#include "st_stuff.h" #include "c_dispatch.h" -#include "m_swap.h" -#include "sbar.h" FStat *FStat::FirstStat; diff --git a/src/stringtable.cpp b/src/stringtable.cpp index 549af499f..fc5e7ea8a 100644 --- a/src/stringtable.cpp +++ b/src/stringtable.cpp @@ -33,11 +33,9 @@ */ #include -#include #include "stringtable.h" #include "cmdlib.h" -#include "m_swap.h" #include "w_wad.h" #include "i_system.h" #include "sc_man.h" @@ -109,7 +107,6 @@ void FStringTable::FreeNonDehackedStrings () } } -#include "doomerrors.h" void FStringTable::LoadStrings (bool enuOnly) { int lastlump, lump; diff --git a/src/strnatcmp.c b/src/strnatcmp.c index fb8636d87..58fa5571a 100644 --- a/src/strnatcmp.c +++ b/src/strnatcmp.c @@ -31,9 +31,7 @@ */ #include -#include #include -#include #include "strnatcmp.h" diff --git a/src/textures/anim_switches.cpp b/src/textures/anim_switches.cpp index ab53210fe..160316c22 100644 --- a/src/textures/anim_switches.cpp +++ b/src/textures/anim_switches.cpp @@ -34,10 +34,7 @@ #include "templates.h" #include "textures/textures.h" -#include "doomdef.h" -#include "g_game.h" #include "s_sound.h" -#include "doomstat.h" #include "r_state.h" #include "w_wad.h" #include "cmdlib.h" diff --git a/src/textures/animations.cpp b/src/textures/animations.cpp index e250e1b5c..b2c0e3e56 100644 --- a/src/textures/animations.cpp +++ b/src/textures/animations.cpp @@ -39,10 +39,7 @@ #include "m_random.h" #include "d_player.h" #include "p_spec.h" -#include "sc_man.h" -#include "templates.h" #include "w_wad.h" -#include "g_level.h" #include "serializer.h" // MACROS ------------------------------------------------------------------ diff --git a/src/textures/bitmap.cpp b/src/textures/bitmap.cpp index 33cfe2141..aee21372a 100644 --- a/src/textures/bitmap.cpp +++ b/src/textures/bitmap.cpp @@ -33,9 +33,7 @@ */ #include "bitmap.h" -#include "templates.h" #include "r_data/r_translate.h" -#include "v_palette.h" #include "r_data/colormaps.h" diff --git a/src/textures/formats/automaptexture.cpp b/src/textures/formats/automaptexture.cpp index 294548f2d..4d6ddfeaf 100644 --- a/src/textures/formats/automaptexture.cpp +++ b/src/textures/formats/automaptexture.cpp @@ -38,7 +38,6 @@ #include "doomtype.h" #include "files.h" #include "w_wad.h" -#include "v_palette.h" #include "textures/textures.h" //========================================================================== diff --git a/src/textures/formats/backdroptexture.cpp b/src/textures/formats/backdroptexture.cpp index 9d9049fae..e357c7830 100644 --- a/src/textures/formats/backdroptexture.cpp +++ b/src/textures/formats/backdroptexture.cpp @@ -36,18 +36,8 @@ #include "doomtype.h" #include "doomstat.h" #include "d_player.h" -#include "templates.h" #include "menu/menu.h" -#include "colormatcher.h" -#include "textures/textures.h" #include "w_wad.h" -#include "v_font.h" -#include "v_video.h" -#include "g_level.h" -#include "gi.h" -#include "r_defs.h" -#include "r_state.h" -#include "r_data/r_translate.h" //============================================================================= diff --git a/src/textures/formats/brightmaptexture.cpp b/src/textures/formats/brightmaptexture.cpp index feec1e422..7b3dae3a6 100644 --- a/src/textures/formats/brightmaptexture.cpp +++ b/src/textures/formats/brightmaptexture.cpp @@ -34,18 +34,11 @@ */ #include "doomtype.h" -#include "files.h" #include "w_wad.h" -#include "templates.h" #include "i_system.h" #include "r_data/r_translate.h" #include "bitmap.h" -#include "colormatcher.h" -#include "c_dispatch.h" #include "v_video.h" -#include "m_fixed.h" -#include "textures/textures.h" -#include "v_palette.h" class FBrightmapTexture : public FWorldTexture { diff --git a/src/textures/formats/buildtexture.cpp b/src/textures/formats/buildtexture.cpp index bc54a22ea..3df85f90b 100644 --- a/src/textures/formats/buildtexture.cpp +++ b/src/textures/formats/buildtexture.cpp @@ -39,12 +39,10 @@ #include "w_wad.h" #include "templates.h" #include "cmdlib.h" -#include "st_start.h" #include "colormatcher.h" #include "bitmap.h" #include "textures/textures.h" #include "r_data/sprites.h" -#include "r_data/r_translate.h" #include "resourcefiles/resourcefile.h" diff --git a/src/textures/formats/canvastexture.cpp b/src/textures/formats/canvastexture.cpp index f207593f0..2cb8b807f 100644 --- a/src/textures/formats/canvastexture.cpp +++ b/src/textures/formats/canvastexture.cpp @@ -34,10 +34,7 @@ */ #include "doomtype.h" -#include "files.h" -#include "v_palette.h" #include "v_video.h" -#include "textures/textures.h" FCanvasTexture::FCanvasTexture (const char *name, int width, int height) { diff --git a/src/textures/formats/ddstexture.cpp b/src/textures/formats/ddstexture.cpp index a7ed98547..c0988bec7 100644 --- a/src/textures/formats/ddstexture.cpp +++ b/src/textures/formats/ddstexture.cpp @@ -51,10 +51,8 @@ #include "doomtype.h" #include "files.h" #include "w_wad.h" -#include "templates.h" #include "bitmap.h" #include "v_video.h" -#include "textures/textures.h" // Since we want this to compile under Linux too, we need to define this // stuff ourselves instead of including a DirectX header. diff --git a/src/textures/formats/flattexture.cpp b/src/textures/formats/flattexture.cpp index d3506b250..1d2a47e56 100644 --- a/src/textures/formats/flattexture.cpp +++ b/src/textures/formats/flattexture.cpp @@ -36,7 +36,6 @@ #include "doomtype.h" #include "files.h" #include "w_wad.h" -#include "v_palette.h" #include "textures/textures.h" //========================================================================== diff --git a/src/textures/formats/imgztexture.cpp b/src/textures/formats/imgztexture.cpp index b2cc67baa..b01de82a6 100644 --- a/src/textures/formats/imgztexture.cpp +++ b/src/textures/formats/imgztexture.cpp @@ -36,11 +36,8 @@ #include "doomtype.h" #include "files.h" #include "w_wad.h" -#include "v_palette.h" #include "v_video.h" #include "bitmap.h" -#include "textures/textures.h" -#include "r_data/r_translate.h" bool checkIMGZPalette(FileReader &file); diff --git a/src/textures/formats/jpegtexture.cpp b/src/textures/formats/jpegtexture.cpp index 1bb05265b..f3f626622 100644 --- a/src/textures/formats/jpegtexture.cpp +++ b/src/textures/formats/jpegtexture.cpp @@ -45,7 +45,6 @@ extern "C" #include "v_text.h" #include "bitmap.h" #include "v_video.h" -#include "textures/textures.h" struct FLumpSourceMgr : public jpeg_source_mgr diff --git a/src/textures/formats/multipatchtexture.cpp b/src/textures/formats/multipatchtexture.cpp index 9cb93cfcb..adbca13aa 100644 --- a/src/textures/formats/multipatchtexture.cpp +++ b/src/textures/formats/multipatchtexture.cpp @@ -49,9 +49,6 @@ #include "v_video.h" #include "v_text.h" #include "cmdlib.h" -#include "m_fixed.h" -#include "textures/textures.h" -#include "r_data/colormaps.h" // On the Alpha, accessing the shorts directly if they aren't aligned on a // 4-byte boundary causes unaligned access warnings. Why it does this at diff --git a/src/textures/formats/patchtexture.cpp b/src/textures/formats/patchtexture.cpp index 8b9045c0e..2fe928b05 100644 --- a/src/textures/formats/patchtexture.cpp +++ b/src/textures/formats/patchtexture.cpp @@ -36,12 +36,9 @@ #include "doomtype.h" #include "files.h" #include "w_wad.h" -#include "templates.h" #include "v_palette.h" #include "v_video.h" #include "bitmap.h" -#include "textures/textures.h" -#include "r_data/r_translate.h" // posts are runs of non masked source pixels diff --git a/src/textures/formats/pcxtexture.cpp b/src/textures/formats/pcxtexture.cpp index 40c58d0c0..4f7972312 100644 --- a/src/textures/formats/pcxtexture.cpp +++ b/src/textures/formats/pcxtexture.cpp @@ -37,11 +37,8 @@ #include "doomtype.h" #include "files.h" #include "w_wad.h" -#include "templates.h" #include "bitmap.h" -#include "colormatcher.h" #include "v_video.h" -#include "textures/textures.h" //========================================================================== // diff --git a/src/textures/formats/pngtexture.cpp b/src/textures/formats/pngtexture.cpp index 71f906899..bdb232c0c 100644 --- a/src/textures/formats/pngtexture.cpp +++ b/src/textures/formats/pngtexture.cpp @@ -39,8 +39,6 @@ #include "templates.h" #include "m_png.h" #include "bitmap.h" -#include "v_palette.h" -#include "textures/textures.h" //========================================================================== // diff --git a/src/textures/formats/rawpagetexture.cpp b/src/textures/formats/rawpagetexture.cpp index 9a311b10f..d2beade83 100644 --- a/src/textures/formats/rawpagetexture.cpp +++ b/src/textures/formats/rawpagetexture.cpp @@ -36,7 +36,6 @@ #include "doomtype.h" #include "files.h" #include "w_wad.h" -#include "v_palette.h" #include "gi.h" #include "bitmap.h" #include "textures/textures.h" diff --git a/src/textures/formats/shadertexture.cpp b/src/textures/formats/shadertexture.cpp index cb42f25b8..1b1ab5c6f 100644 --- a/src/textures/formats/shadertexture.cpp +++ b/src/textures/formats/shadertexture.cpp @@ -35,21 +35,9 @@ */ #include "doomtype.h" -#include "doomstat.h" #include "d_player.h" -#include "templates.h" #include "menu/menu.h" -#include "colormatcher.h" -#include "textures/textures.h" #include "w_wad.h" -#include "v_font.h" -#include "v_video.h" -#include "g_level.h" -#include "gi.h" -#include "r_defs.h" -#include "r_state.h" -#include "r_data/r_translate.h" -#include "r_data/renderstyle.h" #include "bitmap.h" diff --git a/src/textures/formats/tgatexture.cpp b/src/textures/formats/tgatexture.cpp index 2b0aa16e6..36e0144ab 100644 --- a/src/textures/formats/tgatexture.cpp +++ b/src/textures/formats/tgatexture.cpp @@ -38,9 +38,7 @@ #include "w_wad.h" #include "templates.h" #include "bitmap.h" -#include "colormatcher.h" #include "v_video.h" -#include "textures/textures.h" //========================================================================== diff --git a/src/textures/formats/warptexture.cpp b/src/textures/formats/warptexture.cpp index d78bc5249..3a5323b3d 100644 --- a/src/textures/formats/warptexture.cpp +++ b/src/textures/formats/warptexture.cpp @@ -34,12 +34,9 @@ */ #include "doomtype.h" -#include "files.h" -#include "templates.h" #include "r_utility.h" #include "textures/textures.h" #include "warpbuffer.h" -#include "v_palette.h" #include "v_video.h" diff --git a/src/textures/hires/hirestex.cpp b/src/textures/hires/hirestex.cpp index 54d5a4c75..c5aed1624 100644 --- a/src/textures/hires/hirestex.cpp +++ b/src/textures/hires/hirestex.cpp @@ -29,12 +29,7 @@ #include "sbar.h" #include "gi.h" #include "cmdlib.h" -#include "sc_man.h" -#include "doomstat.h" -#include "d_main.h" -#include "zstring.h" #include "bitmap.h" -#include "textures.h" #ifndef _WIN32 #include diff --git a/src/textures/hires/hqnx_asm/hq4x_asm.cpp b/src/textures/hires/hqnx_asm/hq4x_asm.cpp index 34a474405..7ce8a1621 100644 --- a/src/textures/hires/hqnx_asm/hq4x_asm.cpp +++ b/src/textures/hires/hqnx_asm/hq4x_asm.cpp @@ -18,9 +18,6 @@ //Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -#include -#include -#include #include "hqnx_asm.h" namespace HQnX_asm diff --git a/src/textures/hires/hqresize.cpp b/src/textures/hires/hqresize.cpp index c2cba11ec..3061726f3 100644 --- a/src/textures/hires/hqresize.cpp +++ b/src/textures/hires/hqresize.cpp @@ -37,7 +37,6 @@ #include "gl/system/gl_system.h" #include "gl/system/gl_interface.h" #include "gl/renderer/gl_renderer.h" -#include "c_cvars.h" #include "hqnx/hqx.h" #ifdef HAVE_MMX #include "hqnx_asm/hqnx_asm.h" diff --git a/src/textures/skyboxtexture.cpp b/src/textures/skyboxtexture.cpp index 943b1f442..36581553c 100644 --- a/src/textures/skyboxtexture.cpp +++ b/src/textures/skyboxtexture.cpp @@ -21,7 +21,6 @@ // #include "doomtype.h" -#include "sc_man.h" #include "w_wad.h" #include "textures.h" #include "skyboxtexture.h" diff --git a/src/textures/texture.cpp b/src/textures/texture.cpp index bf04fa86a..1a5d92192 100644 --- a/src/textures/texture.cpp +++ b/src/textures/texture.cpp @@ -45,8 +45,6 @@ #include "c_dispatch.h" #include "v_video.h" #include "m_fixed.h" -#include "textures/textures.h" -#include "v_palette.h" FTexture *CreateBrightmapTexture(FTexture*); diff --git a/src/textures/texturemanager.cpp b/src/textures/texturemanager.cpp index c7dc35fd3..9cc70161a 100644 --- a/src/textures/texturemanager.cpp +++ b/src/textures/texturemanager.cpp @@ -48,11 +48,9 @@ #include "st_start.h" #include "cmdlib.h" #include "g_level.h" -#include "m_fixed.h" #include "v_video.h" #include "r_renderer.h" #include "r_sky.h" -#include "textures/textures.h" #include "vm.h" FTextureManager TexMan; diff --git a/src/umapinfo.cpp b/src/umapinfo.cpp index 745cdb94e..d7997a083 100644 --- a/src/umapinfo.cpp +++ b/src/umapinfo.cpp @@ -19,11 +19,8 @@ #include #include -#include -#include #include "w_wad.h" #include "g_level.h" -#include "sc_man.h" #include "r_defs.h" #include "p_setup.h" #include "gi.h" diff --git a/src/v_blend.cpp b/src/v_blend.cpp index 7ea4a4fdf..e077ef827 100644 --- a/src/v_blend.cpp +++ b/src/v_blend.cpp @@ -38,18 +38,9 @@ #include "sbar.h" #include "c_cvars.h" #include "c_dispatch.h" -#include "c_console.h" #include "v_video.h" -#include "m_swap.h" -#include "w_wad.h" -#include "v_text.h" #include "s_sound.h" #include "gi.h" -#include "doomstat.h" -#include "g_level.h" -#include "d_net.h" -#include "colormatcher.h" -#include "v_palette.h" #include "d_player.h" #include "g_levellocals.h" diff --git a/src/v_collection.cpp b/src/v_collection.cpp index 418f7e1ea..95f35097a 100644 --- a/src/v_collection.cpp +++ b/src/v_collection.cpp @@ -35,9 +35,7 @@ #include "v_collection.h" #include "v_font.h" #include "v_video.h" -#include "m_swap.h" #include "w_wad.h" -#include "textures.h" FImageCollection::FImageCollection () { diff --git a/src/v_draw.cpp b/src/v_draw.cpp index ae402e02c..693c2b868 100644 --- a/src/v_draw.cpp +++ b/src/v_draw.cpp @@ -37,26 +37,16 @@ #include "doomtype.h" #include "v_video.h" -#include "m_swap.h" #include "r_defs.h" #include "r_utility.h" #include "r_renderer.h" -#include "r_data/r_translate.h" #include "doomstat.h" -#include "v_palette.h" #include "gi.h" #include "g_level.h" -#include "st_stuff.h" #include "sbar.h" -#include "i_system.h" #include "i_video.h" -#include "templates.h" -#include "d_net.h" -#include "colormatcher.h" -#include "r_data/colormaps.h" #include "g_levellocals.h" -#include "textures.h" #include "vm.h" CUSTOM_CVAR(Int, uiscale, 0, CVAR_ARCHIVE | CVAR_NOINITCALL) diff --git a/src/v_font.cpp b/src/v_font.cpp index f352e06ac..d9e624270 100644 --- a/src/v_font.cpp +++ b/src/v_font.cpp @@ -74,10 +74,8 @@ The FON2 header is followed by variable length data: // HEADER FILES ------------------------------------------------------------ #include -#include #include #include -#include #include "templates.h" #include "doomtype.h" @@ -85,15 +83,10 @@ The FON2 header is followed by variable length data: #include "v_font.h" #include "v_video.h" #include "w_wad.h" -#include "i_system.h" #include "gi.h" #include "cmdlib.h" #include "sc_man.h" #include "hu_stuff.h" -#include "textures/textures.h" -#include "r_data/r_translate.h" -#include "colormatcher.h" -#include "v_palette.h" #include "v_text.h" #include "vm.h" diff --git a/src/v_palette.cpp b/src/v_palette.cpp index 654526a20..6d1114f91 100644 --- a/src/v_palette.cpp +++ b/src/v_palette.cpp @@ -34,31 +34,20 @@ #include "g_level.h" -#include -#include -#include -#include #ifdef _WIN32 #include #else -#include #define O_BINARY 0 #endif -#include #include "templates.h" #include "v_video.h" -#include "i_system.h" #include "w_wad.h" #include "i_video.h" #include "c_dispatch.h" #include "st_stuff.h" -#include "gi.h" #include "x86.h" -#include "colormatcher.h" -#include "v_palette.h" #include "g_levellocals.h" -#include "r_data/colormaps.h" FPalette GPalette; FColorMatcher ColorMatcher; diff --git a/src/v_pfx.cpp b/src/v_pfx.cpp index 292ede574..884a9c7a4 100644 --- a/src/v_pfx.cpp +++ b/src/v_pfx.cpp @@ -34,7 +34,6 @@ #include "doomtype.h" #include "i_system.h" -#include "v_palette.h" #include "v_pfx.h" PfxUnion GPfxPal; diff --git a/src/v_text.cpp b/src/v_text.cpp index e0553ef01..30d8972fb 100644 --- a/src/v_text.cpp +++ b/src/v_text.cpp @@ -41,12 +41,8 @@ #include "i_system.h" #include "v_video.h" -#include "hu_stuff.h" #include "w_wad.h" -#include "m_swap.h" -#include "doomstat.h" -#include "templates.h" #include "gstrings.h" #include "vm.h" diff --git a/src/v_video.cpp b/src/v_video.cpp index 49862625f..b6d8a1213 100644 --- a/src/v_video.cpp +++ b/src/v_video.cpp @@ -47,41 +47,27 @@ #include "i_video.h" #include "r_state.h" -#include "doomdef.h" -#include "doomdata.h" #include "doomstat.h" #include "c_console.h" #include "hu_stuff.h" #include "m_argv.h" -#include "m_bbox.h" -#include "m_swap.h" -#include "i_video.h" #include "v_video.h" #include "v_text.h" #include "sc_man.h" #include "w_wad.h" -#include "c_cvars.h" #include "c_dispatch.h" #include "cmdlib.h" -#include "gi.h" -#include "templates.h" #include "sbar.h" #include "hardware.h" -#include "r_data/r_translate.h" -#include "f_wipe.h" #include "m_png.h" -#include "colormatcher.h" -#include "v_palette.h" -#include "r_sky.h" #include "r_utility.h" #include "r_renderer.h" #include "menu/menu.h" -#include "r_data/voxels.h" #include "vm.h" #include "r_videoscale.h" #include "i_time.h" diff --git a/src/w_wad.cpp b/src/w_wad.cpp index 0976f5ed7..41b57811d 100644 --- a/src/w_wad.cpp +++ b/src/w_wad.cpp @@ -38,22 +38,16 @@ #include #include -#include -#include #include #include "doomtype.h" #include "m_argv.h" -#include "i_system.h" #include "cmdlib.h" #include "c_dispatch.h" #include "w_wad.h" -#include "w_zip.h" #include "m_crc32.h" #include "v_text.h" -#include "templates.h" #include "gi.h" -#include "doomerrors.h" #include "resourcefiles/resourcefile.h" #include "md5.h" #include "doomstat.h" diff --git a/src/wi_stuff.cpp b/src/wi_stuff.cpp index 1c2530646..2fba4a33d 100644 --- a/src/wi_stuff.cpp +++ b/src/wi_stuff.cpp @@ -39,27 +39,18 @@ #include "m_swap.h" #include "i_system.h" #include "w_wad.h" -#include "g_game.h" #include "g_level.h" #include "s_sound.h" #include "doomstat.h" #include "v_video.h" #include "i_video.h" #include "wi_stuff.h" -#include "c_console.h" #include "hu_stuff.h" -#include "v_palette.h" #include "s_sndseq.h" -#include "sc_man.h" #include "v_text.h" #include "gi.h" #include "d_player.h" #include "d_netinf.h" -#include "b_bot.h" -#include "textures/textures.h" -#include "r_data/r_translate.h" -#include "templates.h" -#include "gstrings.h" #include "cmdlib.h" #include "g_levellocals.h" #include "vm.h" diff --git a/src/win32/hardware.cpp b/src/win32/hardware.cpp index 4c7f43779..f79e6276c 100644 --- a/src/win32/hardware.cpp +++ b/src/win32/hardware.cpp @@ -36,10 +36,6 @@ #include #include "hardware.h" -#include "i_video.h" -#include "i_system.h" -#include "c_console.h" -#include "c_cvars.h" #include "c_dispatch.h" #include "v_text.h" #include "doomstat.h" diff --git a/src/win32/i_cd.cpp b/src/win32/i_cd.cpp index 12a673eb9..f6139e96f 100644 --- a/src/win32/i_cd.cpp +++ b/src/win32/i_cd.cpp @@ -36,14 +36,11 @@ #define WIN32_LEAN_AND_MEAN #include #include -#include #include #include "doomtype.h" #include "c_cvars.h" -#include "c_dispatch.h" #include "m_argv.h" -#include "i_system.h" #include "version.h" #include "i_cd.h" diff --git a/src/win32/i_crash.cpp b/src/win32/i_crash.cpp index ac033d921..9eeb92c3b 100644 --- a/src/win32/i_crash.cpp +++ b/src/win32/i_crash.cpp @@ -37,9 +37,7 @@ #define WIN32_LEAN_AND_MEAN #define _WIN32_WINNT 0x0501 #include -#include #include -#include #include #ifndef _M_IX86 #include @@ -55,22 +53,14 @@ #endif #include #include -#include -#include -#include #include #include -#include -#include #include "doomtype.h" #include "resource.h" #include "version.h" #include "m_swap.h" -#include -#include -#include #include #include diff --git a/src/win32/i_dijoy.cpp b/src/win32/i_dijoy.cpp index 3dc978c4a..1736aa725 100644 --- a/src/win32/i_dijoy.cpp +++ b/src/win32/i_dijoy.cpp @@ -45,14 +45,7 @@ #include #include "i_input.h" -#include "i_system.h" #include "d_event.h" -#include "d_gui.h" -#include "c_cvars.h" -#include "c_dispatch.h" -#include "doomdef.h" -#include "doomstat.h" -#include "hardware.h" #include "templates.h" #include "gameconfigfile.h" #include "cmdlib.h" diff --git a/src/win32/i_input.cpp b/src/win32/i_input.cpp index e6653f512..050e32a8b 100644 --- a/src/win32/i_input.cpp +++ b/src/win32/i_input.cpp @@ -46,16 +46,10 @@ #define INITGUID #endif #include -#include #include #include #include -#include -#include -#include -#include - #ifdef _MSC_VER #pragma warning(disable:4244) #endif @@ -78,7 +72,6 @@ #include "c_dispatch.h" -#include "doomtype.h" #include "doomdef.h" #include "doomstat.h" #include "m_argv.h" @@ -89,14 +82,9 @@ #include "d_main.h" #include "d_gui.h" #include "c_console.h" -#include "c_cvars.h" -#include "i_system.h" #include "s_sound.h" -#include "m_misc.h" #include "gameconfigfile.h" #include "hardware.h" -#include "templates.h" -#include "cmdlib.h" #include "d_event.h" #include "v_text.h" #include "version.h" diff --git a/src/win32/i_keyboard.cpp b/src/win32/i_keyboard.cpp index 056f80293..840313cea 100644 --- a/src/win32/i_keyboard.cpp +++ b/src/win32/i_keyboard.cpp @@ -40,13 +40,7 @@ #include #include "i_input.h" -#include "i_system.h" #include "d_event.h" -#include "d_gui.h" -#include "c_cvars.h" -#include "doomdef.h" -#include "doomstat.h" -#include "hardware.h" #include "rawinput.h" // MACROS ------------------------------------------------------------------ diff --git a/src/win32/i_main.cpp b/src/win32/i_main.cpp index 90e437a14..7ade6eb7a 100644 --- a/src/win32/i_main.cpp +++ b/src/win32/i_main.cpp @@ -49,7 +49,6 @@ //#include #define NOTIFY_FOR_THIS_SESSION 0 -#include #ifdef _MSC_VER #include #include @@ -57,27 +56,17 @@ #endif #include "resource.h" -#include -#include -#include - #include "doomerrors.h" #include "hardware.h" -#include "doomtype.h" #include "m_argv.h" #include "d_main.h" #include "i_module.h" -#include "i_system.h" #include "c_console.h" #include "version.h" -#include "i_video.h" -#include "i_sound.h" #include "i_input.h" #include "w_wad.h" -#include "templates.h" #include "cmdlib.h" -#include "g_level.h" #include "doomstat.h" #include "r_utility.h" #include "g_levellocals.h" @@ -88,8 +77,6 @@ #include "optwin32.h" -#include - // MACROS ------------------------------------------------------------------ // The main window's title. diff --git a/src/win32/i_mouse.cpp b/src/win32/i_mouse.cpp index a6d606f8d..df81332e8 100644 --- a/src/win32/i_mouse.cpp +++ b/src/win32/i_mouse.cpp @@ -40,11 +40,8 @@ #include #include "i_input.h" -#include "i_system.h" #include "d_event.h" #include "d_gui.h" -#include "c_cvars.h" -#include "doomdef.h" #include "doomstat.h" #include "hardware.h" #include "rawinput.h" diff --git a/src/win32/i_rawps2.cpp b/src/win32/i_rawps2.cpp index efd9cd221..2fdfe4c21 100644 --- a/src/win32/i_rawps2.cpp +++ b/src/win32/i_rawps2.cpp @@ -36,22 +36,11 @@ #define WIN32_LEAN_AND_MEAN #define _WIN32_WINNT 0x0501 #include -#include -#include #include "i_input.h" -#include "i_system.h" #include "d_event.h" -#include "d_gui.h" -#include "c_cvars.h" -#include "c_dispatch.h" -#include "doomdef.h" -#include "doomstat.h" -#include "hardware.h" #include "templates.h" #include "gameconfigfile.h" -#include "cmdlib.h" -#include "v_text.h" #include "m_argv.h" #include "rawinput.h" diff --git a/src/win32/i_specialpaths.cpp b/src/win32/i_specialpaths.cpp index 375f301dd..ecd24efb1 100644 --- a/src/win32/i_specialpaths.cpp +++ b/src/win32/i_specialpaths.cpp @@ -41,7 +41,6 @@ #include "cmdlib.h" #include "m_misc.h" #include "version.h" // for GAMENAME -#include "i_system.h" #include "optwin32.h" diff --git a/src/win32/i_system.cpp b/src/win32/i_system.cpp index 7b79ad26f..28f2bf5ed 100644 --- a/src/win32/i_system.cpp +++ b/src/win32/i_system.cpp @@ -47,15 +47,11 @@ #include #include -#include -#include #include #include #include #include -#include -#include #define WIN32_LEAN_AND_MEAN #include @@ -65,17 +61,10 @@ #include "hardware.h" #include "doomerrors.h" -#include -#include "doomtype.h" #include "version.h" -#include "doomdef.h" -#include "cmdlib.h" -#include "m_argv.h" #include "m_misc.h" -#include "i_video.h" #include "i_sound.h" -#include "i_music.h" #include "resource.h" #include "x86.h" #include "stats.h" @@ -84,17 +73,13 @@ #include "d_net.h" #include "g_game.h" #include "i_input.h" -#include "i_system.h" #include "c_dispatch.h" #include "templates.h" #include "gameconfigfile.h" #include "v_font.h" #include "g_level.h" #include "doomstat.h" -#include "v_palette.h" -#include "stats.h" #include "textures/bitmap.h" -#include "textures/textures.h" #include "optwin32.h" diff --git a/src/win32/i_xinput.cpp b/src/win32/i_xinput.cpp index c7c104d94..50108991a 100644 --- a/src/win32/i_xinput.cpp +++ b/src/win32/i_xinput.cpp @@ -39,22 +39,12 @@ #define _WIN32_WINNT 0x0501 #include #include -#include #include #include "i_input.h" -#include "i_system.h" #include "d_event.h" -#include "d_gui.h" -#include "c_cvars.h" -#include "c_dispatch.h" -#include "doomdef.h" -#include "doomstat.h" -#include "hardware.h" #include "templates.h" #include "gameconfigfile.h" -#include "cmdlib.h" -#include "v_text.h" #include "m_argv.h" // MACROS ------------------------------------------------------------------ diff --git a/src/win32/st_start.cpp b/src/win32/st_start.cpp index 98034f002..549ccad1c 100644 --- a/src/win32/st_start.cpp +++ b/src/win32/st_start.cpp @@ -38,11 +38,9 @@ #define _WIN32_WINNT 0x0501 // required to get the MARQUEE defines #include #include -#include #include "resource.h" #include "st_start.h" -#include "resource.h" #include "templates.h" #include "i_system.h" #include "i_input.h" @@ -52,7 +50,6 @@ #include "s_sound.h" #include "m_argv.h" #include "d_main.h" -#include "v_palette.h" // MACROS ------------------------------------------------------------------ diff --git a/src/x86.cpp b/src/x86.cpp index 877bd726d..a27c6a984 100644 --- a/src/x86.cpp +++ b/src/x86.cpp @@ -53,7 +53,6 @@ void DumpCPUInfo(const CPUInfo *cpu) #ifdef _MSC_VER #include #endif -#include #include diff --git a/src/xlat/parse_xlat.cpp b/src/xlat/parse_xlat.cpp index 87e68954d..3e7f02d01 100644 --- a/src/xlat/parse_xlat.cpp +++ b/src/xlat/parse_xlat.cpp @@ -35,10 +35,6 @@ #include "doomtype.h" -#include "w_wad.h" -#include "c_console.h" -#include "info.h" -#include "gi.h" #include "parsecontext.h" #include "xlat_parser.h" #include "xlat.h" diff --git a/src/zstrformat.cpp b/src/zstrformat.cpp index aae653efe..2bec17803 100644 --- a/src/zstrformat.cpp +++ b/src/zstrformat.cpp @@ -85,15 +85,11 @@ #include #include #include -#include -#include #include #include "zstring.h" #include "gdtoa.h" -#include - /* * MAXEXPDIG is the maximum number of decimal digits needed to store a