ESSImport: document targeted scripts (not implemented yet)

openmw-35
scrawl 10 years ago
parent 9d3f0b2ed5
commit 315f9a98ad

@ -10,7 +10,7 @@ namespace ESSImport
void convertSCPT(const SCPT &scpt, ESM::GlobalScript &out) void convertSCPT(const SCPT &scpt, ESM::GlobalScript &out)
{ {
out.mId = Misc::StringUtils::lowerCase(scpt.mSCHD.mName.toString()); out.mId = Misc::StringUtils::lowerCase(scpt.mSCHD.mName.toString());
out.mRunning = scpt.mHasRNAM; out.mRunning = scpt.mRunning;
convertSCRI(scpt.mSCRI, out.mLocals); convertSCRI(scpt.mSCRI, out.mLocals);
} }

@ -13,14 +13,14 @@ namespace ESSImport
mSCRI.load(esm); mSCRI.load(esm);
mRNAM = -1; mRefNum = -1;
if (esm.isNextSub("RNAM")) if (esm.isNextSub("RNAM"))
{ {
mHasRNAM = true; mRunning = true;
esm.getHT(mRNAM); esm.getHT(mRefNum);
} }
else else
mHasRNAM = false; mRunning = false;
} }
} }

@ -14,7 +14,6 @@ namespace ESSImport
{ {
// A running global script // A running global script
// TODO: test how targeted scripts are saved
struct SCPT struct SCPT
{ {
ESM::Script::SCHD mSCHD; ESM::Script::SCHD mSCHD;
@ -22,8 +21,8 @@ namespace ESSImport
// values of local variables // values of local variables
SCRI mSCRI; SCRI mSCRI;
bool mHasRNAM; bool mRunning;
int mRNAM; // unknown, seems to be -1 for some scripts, some huge integer for others int mRefNum; // Targeted reference, -1: no reference
void load(ESM::ESMReader& esm); void load(ESM::ESMReader& esm);
}; };

Loading…
Cancel
Save