mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-02-03 17:54:06 +00:00
Implement ignored records
This commit is contained in:
parent
65a6993b17
commit
61ea678a96
@ -145,6 +145,7 @@
|
||||
Feature #6592: Missing support for NiTriShape particle emitters
|
||||
Feature #6600: Support NiSortAdjustNode
|
||||
Feature #6684: Support NiFltAnimationNode
|
||||
Feature #6699: Ignored flag
|
||||
Task #6201: Remove the "Note: No relevant classes found. No output generated" warnings
|
||||
Task #6264: Remove the old classes in animation.cpp
|
||||
Task #6553: Simplify interpreter instruction registration
|
||||
|
@ -11,6 +11,7 @@ EsmLoader::EsmLoader(MWWorld::ESMStore& store, std::vector<ESM::ESMReader>& read
|
||||
: mEsm(readers)
|
||||
, mStore(store)
|
||||
, mEncoder(encoder)
|
||||
, mDialogue(nullptr) // A content file containing INFO records without a DIAL record appends them to the previous file's dialogue
|
||||
{
|
||||
}
|
||||
|
||||
@ -22,7 +23,7 @@ void EsmLoader::load(const boost::filesystem::path& filepath, int& index, Loadin
|
||||
lEsm.open(filepath.string());
|
||||
lEsm.resolveParentFileIndices(mEsm);
|
||||
mEsm[index] = std::move(lEsm);
|
||||
mStore.load(mEsm[index], listener);
|
||||
mStore.load(mEsm[index], listener, mDialogue);
|
||||
}
|
||||
|
||||
} /* namespace MWWorld */
|
||||
|
@ -13,6 +13,7 @@ namespace ToUTF8
|
||||
namespace ESM
|
||||
{
|
||||
class ESMReader;
|
||||
struct Dialogue;
|
||||
}
|
||||
|
||||
namespace MWWorld
|
||||
@ -31,6 +32,7 @@ struct EsmLoader : public ContentLoader
|
||||
std::vector<ESM::ESMReader>& mEsm;
|
||||
MWWorld::ESMStore& mStore;
|
||||
ToUTF8::Utf8Encoder* mEncoder;
|
||||
ESM::Dialogue* mDialogue;
|
||||
};
|
||||
|
||||
} /* namespace MWWorld */
|
||||
|
@ -143,12 +143,10 @@ static bool isCacheableRecord(int id)
|
||||
return false;
|
||||
}
|
||||
|
||||
void ESMStore::load(ESM::ESMReader &esm, Loading::Listener* listener)
|
||||
void ESMStore::load(ESM::ESMReader &esm, Loading::Listener* listener, ESM::Dialogue*& dialogue)
|
||||
{
|
||||
listener->setProgressRange(1000);
|
||||
|
||||
ESM::Dialogue *dialogue = nullptr;
|
||||
|
||||
// Land texture loading needs to use a separate internal store for each plugin.
|
||||
// We set the number of plugins here so we can properly verify if valid plugin
|
||||
// indices are being passed to the LandTexture Store retrieval methods.
|
||||
@ -159,6 +157,11 @@ void ESMStore::load(ESM::ESMReader &esm, Loading::Listener* listener)
|
||||
{
|
||||
ESM::NAME n = esm.getRecName();
|
||||
esm.getRecHeader();
|
||||
if (esm.getRecordFlags() & ESM::FLAG_Ignored)
|
||||
{
|
||||
esm.skipRecord();
|
||||
continue;
|
||||
}
|
||||
|
||||
// Look up the record type.
|
||||
std::map<int, StoreBase *>::iterator it = mStores.find(n.toInt());
|
||||
|
@ -196,7 +196,7 @@ namespace MWWorld
|
||||
/// Validate entries in store after loading a save
|
||||
void validateDynamic();
|
||||
|
||||
void load(ESM::ESMReader &esm, Loading::Listener* listener);
|
||||
void load(ESM::ESMReader &esm, Loading::Listener* listener, ESM::Dialogue*& dialogue);
|
||||
|
||||
template <class T>
|
||||
const Store<T> &get() const {
|
||||
|
@ -19,7 +19,10 @@ enum Version
|
||||
|
||||
enum RecordFlag
|
||||
{
|
||||
// This flag exists, but is not used to determine if a record has been deleted while loading
|
||||
FLAG_Deleted = 0x00000020,
|
||||
FLAG_Persistent = 0x00000400,
|
||||
FLAG_Ignored = 0x00001000,
|
||||
FLAG_Blocked = 0x00002000
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user