1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-26 18:35:20 +00:00
OpenMW/apps/openmw/mwworld/esmloader.cpp
elsid c4cd2f36c3
Move convertMagicEffects into separate file
As completely unrelated to EsmLoader.
2021-11-29 22:45:35 +01:00

29 lines
655 B
C++

#include "esmloader.hpp"
#include "esmstore.hpp"
#include <components/esm/esmreader.hpp>
namespace MWWorld
{
EsmLoader::EsmLoader(MWWorld::ESMStore& store, std::vector<ESM::ESMReader>& readers,
ToUTF8::Utf8Encoder* encoder)
: mEsm(readers)
, mStore(store)
, mEncoder(encoder)
{
}
void EsmLoader::load(const boost::filesystem::path& filepath, int& index, Loading::Listener* listener)
{
ESM::ESMReader lEsm;
lEsm.setEncoder(mEncoder);
lEsm.setIndex(index);
lEsm.open(filepath.string());
lEsm.resolveParentFileIndices(mEsm);
mEsm[index] = lEsm;
mStore.load(mEsm[index], listener);
}
} /* namespace MWWorld */