From 9995dff943592d85b2d3b9e2bbeaa75a74807dfd Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Thu, 12 Jul 2012 14:33:50 -0700 Subject: [PATCH] Use a key list for NiColorData --- components/nif/data.hpp | 12 ++---------- components/nif/nif_file.hpp | 2 ++ 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/components/nif/data.hpp b/components/nif/data.hpp index 552e53b68..b7e2f172f 100644 --- a/components/nif/data.hpp +++ b/components/nif/data.hpp @@ -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); } }; diff --git a/components/nif/nif_file.hpp b/components/nif/nif_file.hpp index fa152f14d..c33790742 100644 --- a/components/nif/nif_file.hpp +++ b/components/nif/nif_file.hpp @@ -223,6 +223,7 @@ struct KeyT { }; typedef KeyT FloatKey; typedef KeyT Vector3Key; +typedef KeyT Vector4Key; typedef KeyT QuaternionKey; template @@ -281,6 +282,7 @@ struct KeyListT { }; typedef KeyListT FloatKeyList; typedef KeyListT Vector3KeyList; +typedef KeyListT Vector4KeyList; typedef KeyListT QuaternionKeyList; } // Namespace