mirror of
https://github.com/OpenMW/openmw.git
synced 2025-03-31 09:06:40 +00:00
Read NiTextureTransformController
This commit is contained in:
parent
d8f50553af
commit
65fe89d8af
4 changed files with 31 additions and 0 deletions
|
@ -422,6 +422,22 @@ 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);
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
#define OPENMW_COMPONENTS_NIF_CONTROLLER_HPP
|
||||
|
||||
#include "base.hpp"
|
||||
#include "property.hpp"
|
||||
|
||||
namespace Nif
|
||||
{
|
||||
|
@ -288,6 +289,17 @@ 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;
|
||||
|
|
|
@ -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…
Reference in a new issue