2013-09-29 07:11:57 +00:00
|
|
|
#ifndef ESMLOADER_HPP
|
|
|
|
#define ESMLOADER_HPP
|
|
|
|
|
2022-06-01 20:53:18 +00:00
|
|
|
#include <optional>
|
2013-09-29 07:11:57 +00:00
|
|
|
|
|
|
|
#include "contentloader.hpp"
|
|
|
|
|
|
|
|
namespace ToUTF8
|
|
|
|
{
|
|
|
|
class Utf8Encoder;
|
|
|
|
}
|
|
|
|
|
2015-01-10 00:00:52 +00:00
|
|
|
namespace ESM
|
|
|
|
{
|
2022-06-01 20:53:18 +00:00
|
|
|
class ReadersCache;
|
2022-04-16 14:28:39 +00:00
|
|
|
struct Dialogue;
|
2015-01-10 00:00:52 +00:00
|
|
|
}
|
|
|
|
|
2013-09-29 07:11:57 +00:00
|
|
|
namespace MWWorld
|
|
|
|
{
|
|
|
|
|
|
|
|
class ESMStore;
|
|
|
|
|
|
|
|
struct EsmLoader : public ContentLoader
|
|
|
|
{
|
2022-09-03 16:50:38 +00:00
|
|
|
explicit EsmLoader(MWWorld::ESMStore& store, ESM::ReadersCache& readers, ToUTF8::Utf8Encoder* encoder, std::vector<int>& esmVersions);
|
2022-06-01 20:53:18 +00:00
|
|
|
|
|
|
|
std::optional<int> getMasterFileFormat() const { return mMasterFileFormat; }
|
2013-09-29 07:11:57 +00:00
|
|
|
|
2022-06-08 21:25:50 +00:00
|
|
|
void load(const std::filesystem::path& filepath, int& index, Loading::Listener* listener) override;
|
2013-09-29 07:11:57 +00:00
|
|
|
|
|
|
|
private:
|
2022-06-01 20:53:18 +00:00
|
|
|
ESM::ReadersCache& mReaders;
|
2021-11-23 14:15:22 +00:00
|
|
|
MWWorld::ESMStore& mStore;
|
|
|
|
ToUTF8::Utf8Encoder* mEncoder;
|
2022-04-16 14:28:39 +00:00
|
|
|
ESM::Dialogue* mDialogue;
|
2022-06-01 20:53:18 +00:00
|
|
|
std::optional<int> mMasterFileFormat;
|
2022-09-03 16:50:38 +00:00
|
|
|
std::vector<int>& mESMVersions;
|
2013-09-29 07:11:57 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
} /* namespace MWWorld */
|
|
|
|
|
|
|
|
#endif // ESMLOADER_HPP
|