Store the NIF index in the Record object

actorid
Chris Robinson 12 years ago
parent ecdd89a4f3
commit 660d73fd88

@ -39,9 +39,8 @@
//#include <boost/mutex.hpp>
//#include <boost/thread/locks.hpp>
using namespace std;
using namespace Nif;
using namespace Misc;
namespace Nif
{
class NIFFile::LoadedCache
{
@ -311,6 +310,7 @@ void NIFFile::parse()
assert(r != NULL);
assert(r->recType != RC_MISSING);
r->recName = rec;
r->recIndex = i;
records[i] = r;
r->read(this);
@ -329,9 +329,6 @@ void NIFFile::parse()
tree, but for the moment we ignore it.
*/
// TODO: Set up kf file here first, if applicable. It needs its own
// code to link it up with the main NIF structure.
// Once parsing is done, do post-processing.
for(int i=0; i<recNum; i++)
records[i]->post(this);
@ -375,3 +372,5 @@ Ogre::Matrix4 Node::getWorldTransform() const
return parent->getWorldTransform() * getLocalTransform();
return getLocalTransform();
}
}

@ -91,8 +91,9 @@ struct Record
// Record type and type name
int recType;
std::string recName;
size_t recIndex;
Record() : recType(RC_MISSING) {}
Record() : recType(RC_MISSING), recIndex(~(size_t)0) {}
/// Parses the record from file
virtual void read(NIFFile *nif) = 0;

Loading…
Cancel
Save