From 3be9deb070d2389626dc840efc90b1175e21e108 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Mon, 11 Nov 2019 23:24:31 +0100 Subject: [PATCH] - removed the different shadeDiv for Ion Fury. This isn't necessary and was apparently caused by a bug that got fixed in the mean time. --- source/common/gamecontrol.cpp | 10 ---------- source/glbackend/glbackend.h | 5 +---- 2 files changed, 1 insertion(+), 14 deletions(-) diff --git a/source/common/gamecontrol.cpp b/source/common/gamecontrol.cpp index c8d654fc0..ad0b368f4 100644 --- a/source/common/gamecontrol.cpp +++ b/source/common/gamecontrol.cpp @@ -30,7 +30,6 @@ InputState inputState; void SetClipshapes(); int ShowStartupWindow(TArray &); void InitFileSystem(TArray&); -int globalShadeDiv; bool gHaveNetworking; @@ -206,27 +205,18 @@ void CheckFrontend(int flags) if (flags & GAMEFLAG_BLOOD) { gi = Blood::CreateInterface(); - globalShadeDiv = 62; } else if (flags & GAMEFLAG_RR) { gi = Redneck::CreateInterface(); - globalShadeDiv = 30; - } - else if (flags & GAMEFLAG_FURY) - { - gi = Duke::CreateInterface(); - globalShadeDiv = 26; // This is different from all other games which need a value two less than the amount of shades. } else if (flags & GAMEFLAG_SW) { gi = ShadowWarrior::CreateInterface(); - globalShadeDiv = 30; } else { gi = Duke::CreateInterface(); - globalShadeDiv = 30; } } diff --git a/source/glbackend/glbackend.h b/source/glbackend/glbackend.h index a0b68d374..b5d125fdd 100644 --- a/source/glbackend/glbackend.h +++ b/source/glbackend/glbackend.h @@ -320,11 +320,8 @@ public: { renderState.Shade = shade; renderState.NumShades = numshades; - } + renderState.ShadeDiv = 1.f / (numshades-2); - void SetShadeDiv(int value) - { - renderState.ShadeDiv = 1.f / value; // There's 3 values here: Blood uses 62 with numShades = 64, Ion Fury uses 30 with NumShades = 32, the other games use 26 with NumShades = 32. } void SetVisibility(float visibility, float fviewingrange)