1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-02-28 22:39:40 +00:00
openmw-tes3mp/apps/openmw/mwworld/esmloader.hpp
cc9cii 15d5cdf3cf Allow TES4 ESM/ESP to co-exist with TES3 ESM/ESP.
This change aims to allow TES4/TE5 content to OpenMW.  i.e. a standalone TES4 would be implemented quite differently.  That said, the key changes are:

* Use pointers rather than references for ESM readers so that they can be switched to another variant on the fly.
* Content file dependencies to be checked within each group (only 3 groups for now, TES3/TES4/TES5)
2018-10-06 20:38:53 +10:00

38 lines
787 B
C++

#ifndef ESMLOADER_HPP
#define ESMLOADER_HPP
#include <vector>
#include "contentloader.hpp"
namespace ToUTF8
{
class Utf8Encoder;
}
namespace ESM
{
class ESMReader;
}
namespace MWWorld
{
class ESMStore;
struct EsmLoader : public ContentLoader
{
EsmLoader(MWWorld::ESMStore& store, std::vector<std::vector<ESM::ESMReader*> >& readers,
ToUTF8::Utf8Encoder* encoder, Loading::Listener& listener);
void load(const boost::filesystem::path& filepath, std::vector<std::vector<std::string> >& contentFiles);
private:
std::vector<std::vector<ESM::ESMReader*> >& mEsm; // Note: the ownership of the readers is with the caller
MWWorld::ESMStore& mStore;
ToUTF8::Utf8Encoder* mEncoder;
};
} /* namespace MWWorld */
#endif // ESMLOADER_HPP