CLightParameters: Make EWorldLightingOptions an enum class
Avoids polluting the global namespace.
This commit is contained in:
parent
cec88d182b
commit
2c274897c9
|
@ -4,12 +4,12 @@
|
|||
#include "Core/Resource/Area/CGameArea.h"
|
||||
#include "Core/Resource/Script/Property/Properties.h"
|
||||
|
||||
enum EWorldLightingOptions
|
||||
enum class EWorldLightingOptions
|
||||
{
|
||||
eUnknown1 = 0,
|
||||
eNormalLighting = 1,
|
||||
eUnknown2 = 2,
|
||||
eDisableWorldLighting = 3
|
||||
Unknown1,
|
||||
NormalLighting,
|
||||
Unknown2,
|
||||
DisableWorldLighting,
|
||||
};
|
||||
|
||||
class CLightParameters
|
||||
|
@ -42,7 +42,7 @@ public:
|
|||
|
||||
EWorldLightingOptions WorldLightingOptions() const
|
||||
{
|
||||
return mWorldLightingOptions.IsValid() ? mWorldLightingOptions.Get() : eNormalLighting;
|
||||
return mWorldLightingOptions.IsValid() ? mWorldLightingOptions.Get() : EWorldLightingOptions::NormalLighting;
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -171,9 +171,9 @@ void CScriptNode::Draw(FRenderOptions Options, int /*ComponentIndex*/, ERenderCo
|
|||
// Draw model
|
||||
if (UsesModel())
|
||||
{
|
||||
EWorldLightingOptions LightingOptions = (mpLightParameters ? mpLightParameters->WorldLightingOptions() : eNormalLighting);
|
||||
const auto LightingOptions = (mpLightParameters ? mpLightParameters->WorldLightingOptions() : EWorldLightingOptions::NormalLighting);
|
||||
|
||||
if (CGraphics::sLightMode == CGraphics::ELightingMode::World && LightingOptions == eDisableWorldLighting)
|
||||
if (CGraphics::sLightMode == CGraphics::ELightingMode::World && LightingOptions == EWorldLightingOptions::DisableWorldLighting)
|
||||
{
|
||||
CGraphics::sNumLights = 0;
|
||||
CGraphics::sVertexBlock.COLOR0_Amb = CColor::skTransparentBlack;
|
||||
|
|
Loading…
Reference in New Issue