From 315f9a98adeccffed2c9aed0e1c6622928976039 Mon Sep 17 00:00:00 2001 From: scrawl Date: Sun, 25 Jan 2015 01:53:59 +0100 Subject: [PATCH] ESSImport: document targeted scripts (not implemented yet) --- apps/essimporter/convertscpt.cpp | 2 +- apps/essimporter/importscpt.cpp | 8 ++++---- apps/essimporter/importscpt.hpp | 5 ++--- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/apps/essimporter/convertscpt.cpp b/apps/essimporter/convertscpt.cpp index be1d03736..ca81ebbbf 100644 --- a/apps/essimporter/convertscpt.cpp +++ b/apps/essimporter/convertscpt.cpp @@ -10,7 +10,7 @@ namespace ESSImport void convertSCPT(const SCPT &scpt, ESM::GlobalScript &out) { out.mId = Misc::StringUtils::lowerCase(scpt.mSCHD.mName.toString()); - out.mRunning = scpt.mHasRNAM; + out.mRunning = scpt.mRunning; convertSCRI(scpt.mSCRI, out.mLocals); } diff --git a/apps/essimporter/importscpt.cpp b/apps/essimporter/importscpt.cpp index 8c9d00879..652383cda 100644 --- a/apps/essimporter/importscpt.cpp +++ b/apps/essimporter/importscpt.cpp @@ -13,14 +13,14 @@ namespace ESSImport mSCRI.load(esm); - mRNAM = -1; + mRefNum = -1; if (esm.isNextSub("RNAM")) { - mHasRNAM = true; - esm.getHT(mRNAM); + mRunning = true; + esm.getHT(mRefNum); } else - mHasRNAM = false; + mRunning = false; } } diff --git a/apps/essimporter/importscpt.hpp b/apps/essimporter/importscpt.hpp index 955139606..ce54c3a73 100644 --- a/apps/essimporter/importscpt.hpp +++ b/apps/essimporter/importscpt.hpp @@ -14,7 +14,6 @@ namespace ESSImport { // A running global script - // TODO: test how targeted scripts are saved struct SCPT { ESM::Script::SCHD mSCHD; @@ -22,8 +21,8 @@ namespace ESSImport // values of local variables SCRI mSCRI; - bool mHasRNAM; - int mRNAM; // unknown, seems to be -1 for some scripts, some huge integer for others + bool mRunning; + int mRefNum; // Targeted reference, -1: no reference void load(ESM::ESMReader& esm); };