mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-26 09:35:28 +00:00
Read NiLightColorController and NiPathInterpolator
This commit is contained in:
parent
2d9c700530
commit
e2efc9dd2f
@ -583,6 +583,23 @@ namespace Nif
|
||||
nif->read(mFloatsExtraDataIndex);
|
||||
}
|
||||
|
||||
void NiPathInterpolator::read(NIFStream* nif)
|
||||
{
|
||||
nif->read(mFlags);
|
||||
nif->read(mBankDirection);
|
||||
nif->read(mMaxBankAngle);
|
||||
nif->read(mSmoothing);
|
||||
nif->read(mFollowAxis);
|
||||
mPathData.read(nif);
|
||||
mPercentData.read(nif);
|
||||
}
|
||||
|
||||
void NiPathInterpolator::post(Reader& nif)
|
||||
{
|
||||
mPathData.post(nif);
|
||||
mPercentData.post(nif);
|
||||
}
|
||||
|
||||
void NiBlendInterpolator::read(NIFStream* nif)
|
||||
{
|
||||
if (nif->getVersion() >= NIFStream::generateVersion(10, 1, 0, 112))
|
||||
|
@ -404,6 +404,21 @@ namespace Nif
|
||||
using NiTransformInterpolator = TypedNiInterpolator<NiQuatTransform, NiKeyframeDataPtr>;
|
||||
using NiColorInterpolator = TypedNiInterpolator<osg::Vec4f, NiColorDataPtr>;
|
||||
|
||||
struct NiPathInterpolator : public NiInterpolator
|
||||
{
|
||||
// Uses the same flags as NiPathController
|
||||
uint16_t mFlags;
|
||||
int32_t mBankDirection;
|
||||
float mMaxBankAngle;
|
||||
float mSmoothing;
|
||||
uint16_t mFollowAxis;
|
||||
NiPosDataPtr mPathData;
|
||||
NiFloatDataPtr mPercentData;
|
||||
|
||||
void read(NIFStream* nif) override;
|
||||
void post(Reader& nif) override;
|
||||
};
|
||||
|
||||
// Abstract
|
||||
struct NiBlendInterpolator : public NiInterpolator
|
||||
{
|
||||
|
@ -108,6 +108,8 @@ namespace Nif
|
||||
{ "NiGeomMorpherController", &construct<NiGeomMorpherController, RC_NiGeomMorpherController> },
|
||||
{ "NiKeyframeController", &construct<NiKeyframeController, RC_NiKeyframeController> },
|
||||
{ "NiLookAtController", &construct<NiLookAtController, RC_NiLookAtController> },
|
||||
// FIXME: NiLightColorController should have its own struct
|
||||
{ "NiLightColorController", &construct<NiMaterialColorController, RC_NiLightColorController> },
|
||||
{ "NiMaterialColorController", &construct<NiMaterialColorController, RC_NiMaterialColorController> },
|
||||
{ "NiPathController", &construct<NiPathController, RC_NiPathController> },
|
||||
{ "NiRollController", &construct<NiRollController, RC_NiRollController> },
|
||||
@ -162,6 +164,7 @@ namespace Nif
|
||||
{ "NiBoolTimelineInterpolator", &construct<NiBoolInterpolator, RC_NiBoolTimelineInterpolator> },
|
||||
{ "NiColorInterpolator", &construct<NiColorInterpolator, RC_NiColorInterpolator> },
|
||||
{ "NiFloatInterpolator", &construct<NiFloatInterpolator, RC_NiFloatInterpolator> },
|
||||
{ "NiPathInterpolator", &construct<NiPathInterpolator, RC_NiPathInterpolator> },
|
||||
{ "NiPoint3Interpolator", &construct<NiPoint3Interpolator, RC_NiPoint3Interpolator> },
|
||||
{ "NiTransformInterpolator", &construct<NiTransformInterpolator, RC_NiTransformInterpolator> },
|
||||
|
||||
|
@ -151,6 +151,7 @@ namespace Nif
|
||||
RC_NiKeyframeController,
|
||||
RC_NiKeyframeData,
|
||||
RC_NiLight,
|
||||
RC_NiLightColorController,
|
||||
RC_NiLightDimmerController,
|
||||
RC_NiLines,
|
||||
RC_NiLinesData,
|
||||
@ -169,6 +170,7 @@ namespace Nif
|
||||
RC_NiParticlesData,
|
||||
RC_NiParticleSystemController,
|
||||
RC_NiPathController,
|
||||
RC_NiPathInterpolator,
|
||||
RC_NiPixelData,
|
||||
RC_NiPlanarCollider,
|
||||
RC_NiPoint3Interpolator,
|
||||
|
Loading…
x
Reference in New Issue
Block a user