mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-02-26 15:39:51 +00:00
Add BSEffectShaderPropertyFloatController record reading
This commit is contained in:
parent
7ea2ea96b6
commit
ed532b5aca
@ -637,4 +637,10 @@ namespace Nif
|
|||||||
mScaleValue = 1.f;
|
mScaleValue = 1.f;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void BSEffectShaderPropertyFloatController::read(NIFStream* nif)
|
||||||
|
{
|
||||||
|
NiFloatInterpController::read(nif);
|
||||||
|
nif->read(mControlledVariable);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -406,5 +406,11 @@ namespace Nif
|
|||||||
void read(NIFStream* nif) override;
|
void read(NIFStream* nif) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct BSEffectShaderPropertyFloatController : public NiFloatInterpController
|
||||||
|
{
|
||||||
|
unsigned int mControlledVariable;
|
||||||
|
|
||||||
|
void read(NIFStream* nif) override;
|
||||||
|
};
|
||||||
} // Namespace
|
} // Namespace
|
||||||
#endif
|
#endif
|
||||||
|
@ -5,7 +5,6 @@
|
|||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <array>
|
#include <array>
|
||||||
#include <components/nif/node.hpp>
|
|
||||||
#include <limits>
|
#include <limits>
|
||||||
#include <map>
|
#include <map>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
@ -17,6 +16,7 @@
|
|||||||
#include "effect.hpp"
|
#include "effect.hpp"
|
||||||
#include "exception.hpp"
|
#include "exception.hpp"
|
||||||
#include "extra.hpp"
|
#include "extra.hpp"
|
||||||
|
#include "node.hpp"
|
||||||
#include "physics.hpp"
|
#include "physics.hpp"
|
||||||
#include "property.hpp"
|
#include "property.hpp"
|
||||||
|
|
||||||
@ -198,6 +198,8 @@ namespace Nif
|
|||||||
{ "BSMultiBoundSphere", &construct<BSMultiBoundSphere, RC_BSMultiBoundSphere> },
|
{ "BSMultiBoundSphere", &construct<BSMultiBoundSphere, RC_BSMultiBoundSphere> },
|
||||||
{ "BSInvMarker", &construct<BSInvMarker, RC_BSInvMarker> },
|
{ "BSInvMarker", &construct<BSInvMarker, RC_BSInvMarker> },
|
||||||
{ "BSTriShape", &construct<BSTriShape, RC_BSTriShape> },
|
{ "BSTriShape", &construct<BSTriShape, RC_BSTriShape> },
|
||||||
|
{ "BSEffectShaderPropertyFloatController",
|
||||||
|
&construct<BSEffectShaderPropertyFloatController, RC_BSEffectShaderPropertyFloatController> },
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -327,8 +327,8 @@ namespace Nif
|
|||||||
mHavokMaterial.read(nif);
|
mHavokMaterial.read(nif);
|
||||||
mRadius = nif->getFloat();
|
mRadius = nif->getFloat();
|
||||||
nif->skip(8); // Unused
|
nif->skip(8); // Unused
|
||||||
std::vector<float> mat;
|
std::array<float, 16> mat;
|
||||||
nif->getFloats(mat, 16);
|
nif->readArray(mat);
|
||||||
mTransform.set(mat.data());
|
mTransform.set(mat.data());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -444,8 +444,8 @@ namespace Nif
|
|||||||
{
|
{
|
||||||
bhkWorldObject::read(nif);
|
bhkWorldObject::read(nif);
|
||||||
nif->skip(8); // Unused
|
nif->skip(8); // Unused
|
||||||
std::vector<float> mat;
|
std::array<float, 16> mat;
|
||||||
nif->readVector(mat, 16);
|
nif->readArray(mat);
|
||||||
mTransform.set(mat.data());
|
mTransform.set(mat.data());
|
||||||
}
|
}
|
||||||
} // Namespace
|
} // Namespace
|
||||||
|
@ -165,6 +165,7 @@ namespace Nif
|
|||||||
RC_BSMultiBoundSphere,
|
RC_BSMultiBoundSphere,
|
||||||
RC_BSInvMarker,
|
RC_BSInvMarker,
|
||||||
RC_BSTriShape,
|
RC_BSTriShape,
|
||||||
|
RC_BSEffectShaderPropertyFloatController,
|
||||||
};
|
};
|
||||||
|
|
||||||
/// Base class for all records
|
/// Base class for all records
|
||||||
|
Loading…
x
Reference in New Issue
Block a user