Use a key list for NiColorData

actorid
Chris Robinson 13 years ago
parent 3f11b6b1ae
commit 9995dff943

@ -275,19 +275,11 @@ public:
class NiColorData : public Record
{
public:
struct ColorData
{
float time;
Ogre::Vector4 rgba;
};
Vector4KeyList mKeyList;
void read(NIFFile *nif)
{
int count = nif->getInt();
nif->getInt(); // always 1
// Skip the data
nif->skip(count * 5*sizeof(float));
mKeyList.read(nif);
}
};

@ -223,6 +223,7 @@ struct KeyT {
};
typedef KeyT<float> FloatKey;
typedef KeyT<Ogre::Vector3> Vector3Key;
typedef KeyT<Ogre::Vector4> Vector4Key;
typedef KeyT<Ogre::Quaternion> QuaternionKey;
template<typename T, T (NIFFile::*getValue)()>
@ -281,6 +282,7 @@ struct KeyListT {
};
typedef KeyListT<float,&NIFFile::getFloat> FloatKeyList;
typedef KeyListT<Ogre::Vector3,&NIFFile::getVector3> Vector3KeyList;
typedef KeyListT<Ogre::Vector4,&NIFFile::getVector4> Vector4KeyList;
typedef KeyListT<Ogre::Quaternion,&NIFFile::getQuaternion> QuaternionKeyList;
} // Namespace

Loading…
Cancel
Save