mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-26 18:35:20 +00:00
Merge branch 'texturetransformcontroller' into 'master'
Read NiTextureTransformController See merge request OpenMW/openmw!3230
This commit is contained in:
commit
3740e74db1
@ -422,12 +422,40 @@ namespace Nif
|
||||
postRecordList(nif, mSources);
|
||||
}
|
||||
|
||||
void NiTextureTransformController::read(NIFStream* nif)
|
||||
{
|
||||
NiFloatInterpController::read(nif);
|
||||
mShaderMap = nif->getBoolean();
|
||||
nif->read(mTexSlot);
|
||||
nif->read(mTransformMember);
|
||||
if (nif->getVersion() <= NIFStream::generateVersion(10, 1, 0, 103))
|
||||
mData.read(nif);
|
||||
}
|
||||
|
||||
void NiTextureTransformController::post(Reader& nif)
|
||||
{
|
||||
NiFloatInterpController::post(nif);
|
||||
mData.post(nif);
|
||||
}
|
||||
|
||||
void bhkBlendController::read(NIFStream* nif)
|
||||
{
|
||||
Controller::read(nif);
|
||||
nif->getUInt(); // Zero
|
||||
}
|
||||
|
||||
void BSEffectShaderPropertyFloatController::read(NIFStream* nif)
|
||||
{
|
||||
NiFloatInterpController::read(nif);
|
||||
nif->read(mControlledVariable);
|
||||
}
|
||||
|
||||
void BSEffectShaderPropertyColorController::read(NIFStream* nif)
|
||||
{
|
||||
NiPoint3InterpController::read(nif);
|
||||
nif->read(mControlledColor);
|
||||
}
|
||||
|
||||
void NiControllerManager::read(NIFStream* nif)
|
||||
{
|
||||
Controller::read(nif);
|
||||
@ -637,16 +665,4 @@ namespace Nif
|
||||
mScaleValue = 1.f;
|
||||
}
|
||||
}
|
||||
|
||||
void BSEffectShaderPropertyFloatController::read(NIFStream* nif)
|
||||
{
|
||||
NiFloatInterpController::read(nif);
|
||||
nif->read(mControlledVariable);
|
||||
}
|
||||
|
||||
void BSEffectShaderPropertyColorController::read(NIFStream* nif)
|
||||
{
|
||||
NiPoint3InterpController::read(nif);
|
||||
nif->read(mControlledColor);
|
||||
}
|
||||
}
|
||||
|
@ -25,6 +25,7 @@
|
||||
#define OPENMW_COMPONENTS_NIF_CONTROLLER_HPP
|
||||
|
||||
#include "base.hpp"
|
||||
#include "property.hpp"
|
||||
|
||||
namespace Nif
|
||||
{
|
||||
@ -288,11 +289,36 @@ namespace Nif
|
||||
void post(Reader& nif) override;
|
||||
};
|
||||
|
||||
struct NiTextureTransformController : public NiFloatInterpController
|
||||
{
|
||||
bool mShaderMap;
|
||||
int mTexSlot; // NiTexturingProperty::TextureType
|
||||
unsigned int mTransformMember;
|
||||
NiFloatDataPtr mData;
|
||||
|
||||
void read(NIFStream* nif) override;
|
||||
void post(Reader& nif) override;
|
||||
};
|
||||
|
||||
struct bhkBlendController : public Controller
|
||||
{
|
||||
void read(NIFStream* nif) override;
|
||||
};
|
||||
|
||||
struct BSEffectShaderPropertyFloatController : public NiFloatInterpController
|
||||
{
|
||||
unsigned int mControlledVariable;
|
||||
|
||||
void read(NIFStream* nif) override;
|
||||
};
|
||||
|
||||
struct BSEffectShaderPropertyColorController : public NiPoint3InterpController
|
||||
{
|
||||
unsigned int mControlledColor;
|
||||
|
||||
void read(NIFStream* nif) override;
|
||||
};
|
||||
|
||||
struct NiControllerManager : public Controller
|
||||
{
|
||||
bool mCumulative;
|
||||
@ -406,18 +432,5 @@ namespace Nif
|
||||
void read(NIFStream* nif) override;
|
||||
};
|
||||
|
||||
struct BSEffectShaderPropertyFloatController : public NiFloatInterpController
|
||||
{
|
||||
unsigned int mControlledVariable;
|
||||
|
||||
void read(NIFStream* nif) override;
|
||||
};
|
||||
|
||||
struct BSEffectShaderPropertyColorController : public NiPoint3InterpController
|
||||
{
|
||||
unsigned int mControlledColor;
|
||||
|
||||
void read(NIFStream* nif) override;
|
||||
};
|
||||
} // Namespace
|
||||
#endif
|
||||
|
@ -88,6 +88,8 @@ namespace Nif
|
||||
{ "NiBSPArrayController", &construct<NiBSPArrayController, RC_NiBSPArrayController> },
|
||||
{ "NiParticleSystemController", &construct<NiParticleSystemController, RC_NiParticleSystemController> },
|
||||
{ "NiFlipController", &construct<NiFlipController, RC_NiFlipController> },
|
||||
{ "NiTextureTransformController",
|
||||
&construct<NiTextureTransformController, RC_NiTextureTransformController> },
|
||||
{ "NiAmbientLight", &construct<NiLight, RC_NiLight> },
|
||||
{ "NiDirectionalLight", &construct<NiLight, RC_NiLight> },
|
||||
{ "NiPointLight", &construct<NiPointLight, RC_NiLight> },
|
||||
|
@ -70,6 +70,7 @@ namespace Nif
|
||||
RC_NiBSPArrayController,
|
||||
RC_NiParticleSystemController,
|
||||
RC_NiFlipController,
|
||||
RC_NiTextureTransformController,
|
||||
RC_NiBSAnimationNode,
|
||||
RC_NiLight,
|
||||
RC_NiTextureEffect,
|
||||
|
Loading…
x
Reference in New Issue
Block a user