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)