mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-02-04 03:40:14 +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 #6592: Missing support for NiTriShape particle emitters
|
||||||
Feature #6600: Support NiSortAdjustNode
|
Feature #6600: Support NiSortAdjustNode
|
||||||
Feature #6684: Support NiFltAnimationNode
|
Feature #6684: Support NiFltAnimationNode
|
||||||
|
Feature #6699: Ignored flag
|
||||||
Task #6201: Remove the "Note: No relevant classes found. No output generated" warnings
|
Task #6201: Remove the "Note: No relevant classes found. No output generated" warnings
|
||||||
Task #6264: Remove the old classes in animation.cpp
|
Task #6264: Remove the old classes in animation.cpp
|
||||||
Task #6553: Simplify interpreter instruction registration
|
Task #6553: Simplify interpreter instruction registration
|
||||||
|
@ -11,6 +11,7 @@ EsmLoader::EsmLoader(MWWorld::ESMStore& store, std::vector<ESM::ESMReader>& read
|
|||||||
: mEsm(readers)
|
: mEsm(readers)
|
||||||
, mStore(store)
|
, mStore(store)
|
||||||
, mEncoder(encoder)
|
, 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.open(filepath.string());
|
||||||
lEsm.resolveParentFileIndices(mEsm);
|
lEsm.resolveParentFileIndices(mEsm);
|
||||||
mEsm[index] = std::move(lEsm);
|
mEsm[index] = std::move(lEsm);
|
||||||
mStore.load(mEsm[index], listener);
|
mStore.load(mEsm[index], listener, mDialogue);
|
||||||
}
|
}
|
||||||
|
|
||||||
} /* namespace MWWorld */
|
} /* namespace MWWorld */
|
||||||
|
@ -13,6 +13,7 @@ namespace ToUTF8
|
|||||||
namespace ESM
|
namespace ESM
|
||||||
{
|
{
|
||||||
class ESMReader;
|
class ESMReader;
|
||||||
|
struct Dialogue;
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace MWWorld
|
namespace MWWorld
|
||||||
@ -31,6 +32,7 @@ struct EsmLoader : public ContentLoader
|
|||||||
std::vector<ESM::ESMReader>& mEsm;
|
std::vector<ESM::ESMReader>& mEsm;
|
||||||
MWWorld::ESMStore& mStore;
|
MWWorld::ESMStore& mStore;
|
||||||
ToUTF8::Utf8Encoder* mEncoder;
|
ToUTF8::Utf8Encoder* mEncoder;
|
||||||
|
ESM::Dialogue* mDialogue;
|
||||||
};
|
};
|
||||||
|
|
||||||
} /* namespace MWWorld */
|
} /* namespace MWWorld */
|
||||||
|
@ -143,12 +143,10 @@ static bool isCacheableRecord(int id)
|
|||||||
return false;
|
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);
|
listener->setProgressRange(1000);
|
||||||
|
|
||||||
ESM::Dialogue *dialogue = nullptr;
|
|
||||||
|
|
||||||
// Land texture loading needs to use a separate internal store for each plugin.
|
// 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
|
// 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.
|
// 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::NAME n = esm.getRecName();
|
||||||
esm.getRecHeader();
|
esm.getRecHeader();
|
||||||
|
if (esm.getRecordFlags() & ESM::FLAG_Ignored)
|
||||||
|
{
|
||||||
|
esm.skipRecord();
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
// Look up the record type.
|
// Look up the record type.
|
||||||
std::map<int, StoreBase *>::iterator it = mStores.find(n.toInt());
|
std::map<int, StoreBase *>::iterator it = mStores.find(n.toInt());
|
||||||
|
@ -196,7 +196,7 @@ namespace MWWorld
|
|||||||
/// Validate entries in store after loading a save
|
/// Validate entries in store after loading a save
|
||||||
void validateDynamic();
|
void validateDynamic();
|
||||||
|
|
||||||
void load(ESM::ESMReader &esm, Loading::Listener* listener);
|
void load(ESM::ESMReader &esm, Loading::Listener* listener, ESM::Dialogue*& dialogue);
|
||||||
|
|
||||||
template <class T>
|
template <class T>
|
||||||
const Store<T> &get() const {
|
const Store<T> &get() const {
|
||||||
|
@ -19,7 +19,10 @@ enum Version
|
|||||||
|
|
||||||
enum RecordFlag
|
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_Persistent = 0x00000400,
|
||||||
|
FLAG_Ignored = 0x00001000,
|
||||||
FLAG_Blocked = 0x00002000
|
FLAG_Blocked = 0x00002000
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user