You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
openmw-tes3mp/components/esm/journalentry.cpp

40 lines
965 B
C++

#include "journalentry.hpp"
#include "esmreader.hpp"
#include "esmwriter.hpp"
void ESM::JournalEntry::load (ESMReader &esm)
{
esm.getHNOT (mType, "JETY");
mTopic = esm.getHNString ("YETO");
mInfo = esm.getHNString ("YEIN");
mText = esm.getHNString ("TEXT");
if (mType==Type_Journal)
{
esm.getHNT (mDay, "JEDA");
esm.getHNT (mMonth, "JEMO");
esm.getHNT (mDayOfMonth, "JEDM");
}
else if (mType==Type_Topic)
mActorName = esm.getHNOString("ACT_");
}
void ESM::JournalEntry::save (ESMWriter &esm) const
{
esm.writeHNT ("JETY", mType);
esm.writeHNString ("YETO", mTopic);
esm.writeHNString ("YEIN", mInfo);
esm.writeHNString ("TEXT", mText);
if (mType==Type_Journal)
{
esm.writeHNT ("JEDA", mDay);
esm.writeHNT ("JEMO", mMonth);
esm.writeHNT ("JEDM", mDayOfMonth);
}
else if (mType==Type_Topic)
esm.writeHNString ("ACT_", mActorName);
}