|
|
|
@ -177,23 +177,31 @@ struct KeyListT {
|
|
|
|
|
|
|
|
|
|
KeyT<T> key;
|
|
|
|
|
NIFStream &nifReference = *nif;
|
|
|
|
|
for(size_t i = 0;i < count;i++)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
if(mInterpolationType == sLinearInterpolation)
|
|
|
|
|
{
|
|
|
|
|
for(size_t i = 0;i < count;i++)
|
|
|
|
|
{
|
|
|
|
|
readTimeAndValue(nifReference, key);
|
|
|
|
|
mKeys.push_back(key);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else if(mInterpolationType == sQuadraticInterpolation)
|
|
|
|
|
{
|
|
|
|
|
for(size_t i = 0;i < count;i++)
|
|
|
|
|
{
|
|
|
|
|
readQuadratic(nifReference, key);
|
|
|
|
|
mKeys.push_back(key);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else if(mInterpolationType == sTBCInterpolation)
|
|
|
|
|
{
|
|
|
|
|
for(size_t i = 0;i < count;i++)
|
|
|
|
|
{
|
|
|
|
|
readTBC(nifReference, key);
|
|
|
|
|
mKeys.push_back(key);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
//XYZ keys aren't actually read here.
|
|
|
|
|
//data.hpp sees that the last type read was sXYZInterpolation and:
|
|
|
|
|
// Eats a floating point number, then
|
|
|
|
@ -213,7 +221,6 @@ struct KeyListT {
|
|
|
|
|
else
|
|
|
|
|
nif->file->fail("Unhandled interpolation type: "+Ogre::StringConverter::toString(mInterpolationType));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
static void readTimeAndValue(NIFStream &nif, KeyT<T> &key)
|
|
|
|
|