move most of the files from esm to esm3, keep common code in esm; this is make space for a future with esm4

esm typo

esm typo
This commit is contained in:
Bret Curtis 2022-01-22 15:58:41 +01:00 committed by Bret Curtis
parent c263bbf0f6
commit d1fb854521
448 changed files with 686 additions and 683 deletions

View file

@ -0,0 +1,30 @@
#include "effectlist.hpp"
#include "esmreader.hpp"
#include "esmwriter.hpp"
namespace ESM {
void EffectList::load(ESMReader &esm)
{
mList.clear();
while (esm.isNextSub("ENAM")) {
add(esm);
}
}
void EffectList::add(ESMReader &esm)
{
ENAMstruct s;
esm.getHT(s, 24);
mList.push_back(s);
}
void EffectList::save(ESMWriter &esm) const
{
for (std::vector<ENAMstruct>::const_iterator it = mList.begin(); it != mList.end(); ++it) {
esm.writeHNT<ENAMstruct>("ENAM", *it, 24);
}
}
} // end namespace