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