From aa115340335d64081a6c25011e91f75f45a6e902 Mon Sep 17 00:00:00 2001 From: Magnus Norddahl Date: Tue, 3 Jan 2017 18:55:12 +0100 Subject: [PATCH] Remove unused (and broken in swrenderer) back boolean from FakeFlat interface --- src/am_map.cpp | 2 +- src/gl/scene/gl_scene.cpp | 6 +++--- src/r_renderer.h | 2 +- src/swrenderer/r_swrenderer.cpp | 10 ++-------- src/swrenderer/r_swrenderer.h | 2 +- 5 files changed, 8 insertions(+), 14 deletions(-) diff --git a/src/am_map.cpp b/src/am_map.cpp index 8c250ee68..a30106d4e 100644 --- a/src/am_map.cpp +++ b/src/am_map.cpp @@ -1934,7 +1934,7 @@ void AM_drawSubsectors() points[j].Y = float(f_y + (f_h - (pt.y - m_y) * scale)); } // For lighting and texture determination - sector_t *sec = Renderer->FakeFlat(subsectors[i].render_sector, &tempsec, &floorlight, &ceilinglight, false); + sector_t *sec = Renderer->FakeFlat(subsectors[i].render_sector, &tempsec, &floorlight, &ceilinglight); // Find texture origin. originpt.x = -sec->GetXOffset(sector_t::floor); originpt.y = sec->GetYOffset(sector_t::floor); diff --git a/src/gl/scene/gl_scene.cpp b/src/gl/scene/gl_scene.cpp index bedd7a7e7..1cf464250 100644 --- a/src/gl/scene/gl_scene.cpp +++ b/src/gl/scene/gl_scene.cpp @@ -1005,7 +1005,7 @@ struct FGLInterface : public FRenderer void StartSerialize(FSerializer &arc) override; void EndSerialize(FSerializer &arc) override; void RenderTextureView (FCanvasTexture *self, AActor *viewpoint, int fov) override; - sector_t *FakeFlat(sector_t *sec, sector_t *tempsec, int *floorlightlevel, int *ceilinglightlevel, bool back) override; + sector_t *FakeFlat(sector_t *sec, sector_t *tempsec, int *floorlightlevel, int *ceilinglightlevel) override; void SetFogParams(int _fogdensity, PalEntry _outsidefogcolor, int _outsidefogdensity, int _skyfog) override; void PreprocessLevel() override; void CleanLevelData() override; @@ -1362,7 +1362,7 @@ void FGLInterface::RenderTextureView (FCanvasTexture *tex, AActor *Viewpoint, in // //========================================================================== -sector_t *FGLInterface::FakeFlat(sector_t *sec, sector_t *tempsec, int *floorlightlevel, int *ceilinglightlevel, bool back) +sector_t *FGLInterface::FakeFlat(sector_t *sec, sector_t *tempsec, int *floorlightlevel, int *ceilinglightlevel) { if (floorlightlevel != NULL) { @@ -1372,7 +1372,7 @@ sector_t *FGLInterface::FakeFlat(sector_t *sec, sector_t *tempsec, int *floorlig { *ceilinglightlevel = sec->GetCeilingLight (); } - return gl_FakeFlat(sec, tempsec, back); + return gl_FakeFlat(sec, tempsec, false); } //=========================================================================== diff --git a/src/r_renderer.h b/src/r_renderer.h index 4236993d6..0b1405895 100644 --- a/src/r_renderer.h +++ b/src/r_renderer.h @@ -60,7 +60,7 @@ struct FRenderer virtual void SetupFrame(player_t *player) {} virtual void CopyStackedViewParameters() {} virtual void RenderTextureView (FCanvasTexture *tex, AActor *viewpoint, int fov) = 0; - virtual sector_t *FakeFlat(sector_t *sec, sector_t *tempsec, int *floorlightlevel, int *ceilinglightlevel, bool back) = 0; + virtual sector_t *FakeFlat(sector_t *sec, sector_t *tempsec, int *floorlightlevel, int *ceilinglightlevel) = 0; virtual void SetFogParams(int _fogdensity, PalEntry _outsidefogcolor, int _outsidefogdensity, int _skyfog) {} virtual void PreprocessLevel() {} virtual void CleanLevelData() {} diff --git a/src/swrenderer/r_swrenderer.cpp b/src/swrenderer/r_swrenderer.cpp index c368bf3d4..c68aed77a 100644 --- a/src/swrenderer/r_swrenderer.cpp +++ b/src/swrenderer/r_swrenderer.cpp @@ -482,14 +482,8 @@ void FSoftwareRenderer::RenderTextureView (FCanvasTexture *tex, AActor *viewpoin realfixedcolormap = savecm; } -//========================================================================== -// -// -// -//========================================================================== - -sector_t *FSoftwareRenderer::FakeFlat(sector_t *sec, sector_t *tempsec, int *floorlightlevel, int *ceilinglightlevel, bool back) +sector_t *FSoftwareRenderer::FakeFlat(sector_t *sec, sector_t *tempsec, int *floorlightlevel, int *ceilinglightlevel) { - return R_FakeFlat(sec, tempsec, floorlightlevel, ceilinglightlevel, back); + return R_FakeFlat(sec, tempsec, floorlightlevel, ceilinglightlevel, nullptr, 0, 0, 0, 0); } diff --git a/src/swrenderer/r_swrenderer.h b/src/swrenderer/r_swrenderer.h index 812ec32b5..c09542959 100644 --- a/src/swrenderer/r_swrenderer.h +++ b/src/swrenderer/r_swrenderer.h @@ -42,7 +42,7 @@ struct FSoftwareRenderer : public FRenderer void SetupFrame(player_t *player) override; void CopyStackedViewParameters() override; void RenderTextureView (FCanvasTexture *tex, AActor *viewpoint, int fov) override; - sector_t *FakeFlat(sector_t *sec, sector_t *tempsec, int *floorlightlevel, int *ceilinglightlevel, bool back) override; + sector_t *FakeFlat(sector_t *sec, sector_t *tempsec, int *floorlightlevel, int *ceilinglightlevel) override; void StateChanged(AActor *actor) override {