mirror of https://github.com/OpenMW/openmw.git
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
38 lines
855 B
C++
38 lines
855 B
C++
#include "importcellref.hpp"
|
|
|
|
#include <components/esm/esmreader.hpp>
|
|
|
|
namespace ESSImport
|
|
{
|
|
|
|
void CellRef::load(ESM::ESMReader &esm)
|
|
{
|
|
esm.getHNT(mRefNum.mIndex, "FRMR"); // TODO: adjust RefNum
|
|
|
|
// this is required since openmw supports more than 255 content files
|
|
int pluginIndex = (mRefNum.mIndex & 0xff000000) >> 24;
|
|
mRefNum.mContentFile = pluginIndex-1;
|
|
mRefNum.mIndex &= 0x00ffffff;
|
|
|
|
mIndexedRefId = esm.getHNString("NAME");
|
|
|
|
esm.getHNT(mACDT, "ACDT");
|
|
|
|
ACSC acsc;
|
|
esm.getHNOT(acsc, "ACSC");
|
|
esm.getHNOT(acsc, "ACSL");
|
|
|
|
if (esm.isNextSub("CRED"))
|
|
esm.skipHSub();
|
|
|
|
if (esm.isNextSub("ND3D"))
|
|
esm.skipHSub();
|
|
|
|
mEnabled = true;
|
|
esm.getHNOT(mEnabled, "ZNAM");
|
|
|
|
esm.getHNOT(mPos, "DATA", 24);
|
|
}
|
|
|
|
}
|