From fb2dbe8c92d90ddb1dad025cc5a2875e59eed0b8 Mon Sep 17 00:00:00 2001 From: Chris Sarbora Date: Mon, 1 Jul 2024 01:49:29 -0500 Subject: [PATCH] Delete empty method --- Descent3/TelComAutoMap.cpp | 3 --- Descent3/render.cpp | 4 +--- Descent3/terrainrender.cpp | 6 +----- lib/renderer.h | 3 --- renderer/HardwareBaseGPU.cpp | 9 --------- renderer/HardwareOpenGL.cpp | 1 - 6 files changed, 2 insertions(+), 24 deletions(-) diff --git a/Descent3/TelComAutoMap.cpp b/Descent3/TelComAutoMap.cpp index 1e4486e0..ace706b1 100644 --- a/Descent3/TelComAutoMap.cpp +++ b/Descent3/TelComAutoMap.cpp @@ -809,9 +809,6 @@ void TCAMCallback(void) { rend_SetOverlayType(OT_NONE); rend_SetZBufferState(1); - if (AM_terrain) - rend_SetZValues(0, VisibleTerrainZ); - TCAMBuildRoomList(Viewer_object->roomnum); // Render all rooms in view for (int i = 0; i < Num_AM_rooms; i++) { diff --git a/Descent3/render.cpp b/Descent3/render.cpp index d2e471ee..4fe2b1d7 100644 --- a/Descent3/render.cpp +++ b/Descent3/render.cpp @@ -3462,12 +3462,10 @@ void RenderMine(int viewer_roomnum, int flag_automap, int called_from_terrain) { g3_SetFarClipZ(VisibleTerrainZ); if ((Terrain_sky.flags & TF_FOG) && (UseHardware || (!UseHardware && Lighting_on))) { - rend_SetZValues(0, VisibleTerrainZ); rend_SetFogState(1); rend_SetFogBorders(VisibleTerrainZ * .85, VisibleTerrainZ); rend_SetFogColor(Terrain_sky.fog_color); - } else - rend_SetZValues(0, 5000); + } } // First render mirrored rooms diff --git a/Descent3/terrainrender.cpp b/Descent3/terrainrender.cpp index 05b4d004..29c4f376 100644 --- a/Descent3/terrainrender.cpp +++ b/Descent3/terrainrender.cpp @@ -1406,15 +1406,11 @@ void RenderTerrain(uint8_t from_mine, int left, int top, int right, int bot) { #ifndef NEWEDITOR if ((Terrain_sky.flags & TF_FOG) && (UseHardware || (!UseHardware && Lighting_on))) { - rend_SetZValues(0, VisibleTerrainZ); rend_SetFogState(1); rend_SetFogBorders(VisibleTerrainZ * Terrain_sky.fog_scalar, Far_fog_border); rend_SetFogColor(Terrain_sky.fog_color); - } else -#endif - { - rend_SetZValues(0, 5000); } +#endif // And display! if (nt > 0) { diff --git a/lib/renderer.h b/lib/renderer.h index 2e372bb9..8a6e30d5 100644 --- a/lib/renderer.h +++ b/lib/renderer.h @@ -488,9 +488,6 @@ void rend_SetFiltering(int8_t state); // Sets the state of zbuffering to on or off void rend_SetZBufferState(int8_t state); -// Sets the near and far planes for z buffer -void rend_SetZValues(float nearz, float farz); - // Sets a bitmap as an overlay to rendered on top of the next texture map void rend_SetOverlayMap(int handle); diff --git a/renderer/HardwareBaseGPU.cpp b/renderer/HardwareBaseGPU.cpp index 0055c018..e54c3cdb 100644 --- a/renderer/HardwareBaseGPU.cpp +++ b/renderer/HardwareBaseGPU.cpp @@ -127,15 +127,6 @@ void rend_SetFiltering(int8_t state) { gpu_state.cur_bilinear_state = state; } -// Sets the near and far planes for z buffer -void rend_SetZValues(float nearz, float farz) { - // mprintf(0,"OPENGL:Setting depth range to %f - %f\n",nearz,farz); - - // JEFF: glDepthRange must take parameters [0,1] - // It is set in init - //@@dglDepthRange (0,farz); -} - // Sets a bitmap as a overlay map to rendered on top of the next texture map // a -1 value indicates no overlay map void rend_SetOverlayMap(int handle) { gpu_Overlay_map = handle; } diff --git a/renderer/HardwareOpenGL.cpp b/renderer/HardwareOpenGL.cpp index a67067ca..d5f5e44a 100644 --- a/renderer/HardwareOpenGL.cpp +++ b/renderer/HardwareOpenGL.cpp @@ -275,7 +275,6 @@ void opengl_SetDefaults() { rend_SetTextureType(TT_FLAT); rend_SetColorModel(CM_RGB); rend_SetZBufferState(1); - rend_SetZValues(0, 3000); rend_SetGammaValue(gpu_preferred_state.gamma); OpenGL_last_bound[0] = 9999999; OpenGL_last_bound[1] = 9999999;