mirror of
https://github.com/OpenMW/openmw.git
synced 2025-06-26 08:41:35 +00:00
Merge branch 'texturetransformcontroller' into 'master'
Read NiTextureTransformController See merge request OpenMW/openmw!3230
This commit is contained in:
commit
3740e74db1
4 changed files with 57 additions and 25 deletions
|
@ -422,12 +422,40 @@ namespace Nif
|
||||||
postRecordList(nif, mSources);
|
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)
|
void bhkBlendController::read(NIFStream* nif)
|
||||||
{
|
{
|
||||||
Controller::read(nif);
|
Controller::read(nif);
|
||||||
nif->getUInt(); // Zero
|
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)
|
void NiControllerManager::read(NIFStream* nif)
|
||||||
{
|
{
|
||||||
Controller::read(nif);
|
Controller::read(nif);
|
||||||
|
@ -637,16 +665,4 @@ namespace Nif
|
||||||
mScaleValue = 1.f;
|
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
|
#define OPENMW_COMPONENTS_NIF_CONTROLLER_HPP
|
||||||
|
|
||||||
#include "base.hpp"
|
#include "base.hpp"
|
||||||
|
#include "property.hpp"
|
||||||
|
|
||||||
namespace Nif
|
namespace Nif
|
||||||
{
|
{
|
||||||
|
@ -288,11 +289,36 @@ namespace Nif
|
||||||
void post(Reader& nif) override;
|
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
|
struct bhkBlendController : public Controller
|
||||||
{
|
{
|
||||||
void read(NIFStream* nif) override;
|
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
|
struct NiControllerManager : public Controller
|
||||||
{
|
{
|
||||||
bool mCumulative;
|
bool mCumulative;
|
||||||
|
@ -406,18 +432,5 @@ namespace Nif
|
||||||
void read(NIFStream* nif) override;
|
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
|
} // Namespace
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -88,6 +88,8 @@ namespace Nif
|
||||||
{ "NiBSPArrayController", &construct<NiBSPArrayController, RC_NiBSPArrayController> },
|
{ "NiBSPArrayController", &construct<NiBSPArrayController, RC_NiBSPArrayController> },
|
||||||
{ "NiParticleSystemController", &construct<NiParticleSystemController, RC_NiParticleSystemController> },
|
{ "NiParticleSystemController", &construct<NiParticleSystemController, RC_NiParticleSystemController> },
|
||||||
{ "NiFlipController", &construct<NiFlipController, RC_NiFlipController> },
|
{ "NiFlipController", &construct<NiFlipController, RC_NiFlipController> },
|
||||||
|
{ "NiTextureTransformController",
|
||||||
|
&construct<NiTextureTransformController, RC_NiTextureTransformController> },
|
||||||
{ "NiAmbientLight", &construct<NiLight, RC_NiLight> },
|
{ "NiAmbientLight", &construct<NiLight, RC_NiLight> },
|
||||||
{ "NiDirectionalLight", &construct<NiLight, RC_NiLight> },
|
{ "NiDirectionalLight", &construct<NiLight, RC_NiLight> },
|
||||||
{ "NiPointLight", &construct<NiPointLight, RC_NiLight> },
|
{ "NiPointLight", &construct<NiPointLight, RC_NiLight> },
|
||||||
|
|
|
@ -70,6 +70,7 @@ namespace Nif
|
||||||
RC_NiBSPArrayController,
|
RC_NiBSPArrayController,
|
||||||
RC_NiParticleSystemController,
|
RC_NiParticleSystemController,
|
||||||
RC_NiFlipController,
|
RC_NiFlipController,
|
||||||
|
RC_NiTextureTransformController,
|
||||||
RC_NiBSAnimationNode,
|
RC_NiBSAnimationNode,
|
||||||
RC_NiLight,
|
RC_NiLight,
|
||||||
RC_NiTextureEffect,
|
RC_NiTextureEffect,
|
||||||
|
|
Loading…
Reference in a new issue