1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-07 12:54:00 +00:00

Store the NIF index in the Record object

This commit is contained in:
Chris Robinson 2013-01-13 06:56:58 -08:00
parent ecdd89a4f3
commit 660d73fd88
2 changed files with 7 additions and 7 deletions

View File

@ -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();
}
}

View File

@ -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;