1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-04 02:41:19 +00:00
OpenMW/components/sceneutil/lightcommon.cpp

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

34 lines
1.2 KiB
C++
Raw Normal View History

#include "lightcommon.hpp"
#include <components/esm3/loadligh.hpp>
#include <components/esm4/loadligh.hpp>
#include <components/sceneutil/util.hpp>
namespace SceneUtil
{
LightCommon::LightCommon(const ESM::Light& light)
: mFlicker(light.mData.mFlags & ESM::Light::Flicker)
, mFlickerSlow(light.mData.mFlags & ESM::Light::FlickerSlow)
, mNegative(light.mData.mFlags & ESM::Light::Negative)
, mPulse(light.mData.mFlags & ESM::Light::Pulse)
, mPulseSlow(light.mData.mFlags & ESM::Light::PulseSlow)
, mOffDefault(light.mData.mFlags & ESM::Light::OffDefault)
, mColor(SceneUtil::colourFromRGB(light.mData.mColor))
, mRadius(light.mData.mRadius)
{
}
LightCommon::LightCommon(const ESM4::Light& light)
: mFlicker(light.mData.flags & ESM4::Light::Flicker)
, mFlickerSlow(light.mData.flags & ESM4::Light::FlickerSlow)
, mNegative(light.mData.flags & ESM::Light::Negative)
, mPulse(light.mData.flags & ESM4::Light::Pulse)
, mPulseSlow(light.mData.flags & ESM4::Light::PulseSlow)
, mOffDefault(light.mData.flags & ESM4::Light::OffDefault)
, mColor(SceneUtil::colourFromRGB(light.mData.colour))
, mRadius(light.mData.radius)
{
}
}