1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-03 17:37:18 +00:00
OpenMW/components/esm3/quickkeys.cpp

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

31 lines
563 B
C++
Raw Normal View History

2014-05-02 10:47:28 +00:00
#include "quickkeys.hpp"
#include "esmreader.hpp"
#include "esmwriter.hpp"
namespace ESM
{
void QuickKeys::load(ESMReader& esm)
{
2014-05-12 19:04:02 +00:00
while (esm.isNextSub("TYPE"))
2014-05-02 10:47:28 +00:00
{
QuickKey key;
esm.getHT(key.mType);
2023-03-21 19:44:42 +00:00
key.mId = esm.getHNRefId("ID__");
2014-05-02 10:47:28 +00:00
mKeys.push_back(key);
}
}
void QuickKeys::save(ESMWriter& esm) const
{
2023-03-21 19:45:49 +00:00
for (const QuickKey& key : mKeys)
2014-05-02 10:47:28 +00:00
{
2023-03-21 19:45:49 +00:00
esm.writeHNT("TYPE", key.mType);
esm.writeHNRefId("ID__", key.mId);
2014-05-02 10:47:28 +00:00
}
}
}