added filter record (will not be used in OpenMW prior to 1.1)

actorid
Marc Zinnschlag 12 years ago
parent 66534a45da
commit 6f90e071f4

@ -39,7 +39,7 @@ add_component_dir (esm
loadclas loadclot loadcont loadcrea loadcrec loaddial loaddoor loadench loadfact loadglob loadgmst
loadinfo loadingr loadland loadlevlist loadligh loadlock loadprob loadrepa loadltex loadmgef loadmisc loadnpcc
loadnpc loadpgrd loadrace loadregn loadscpt loadskil loadsndg loadsoun loadspel loadsscr loadstat
loadweap records aipackage effectlist spelllist variant variantimp loadtes3 cellref
loadweap records aipackage effectlist spelllist variant variantimp loadtes3 cellref filter
)
add_component_dir (misc

@ -0,0 +1,20 @@
#include "filter.hpp"
#include "esmreader.hpp"
#include "esmwriter.hpp"
void ESM::Filter::load (ESMReader& esm)
{
mFilter = esm.getHNString ("FILT");
}
void ESM::Filter::save (ESMWriter& esm)
{
esm.writeHNCString ("FILT", mFilter);
}
void ESM::Filter::blank()
{
mFilter.clear();
}

@ -0,0 +1,25 @@
#ifndef COMPONENTS_ESM_FILTER_H
#define COMPONENTS_ESM_FILTER_H
#include <string>
namespace ESM
{
class ESMReader;
class ESMWriter;
struct Filter
{
std::string mId;
std::string mFilter;
void load (ESMReader& esm);
void save (ESMWriter& esm);
void blank();
///< Set record to default state (does not touch the ID).
};
}
#endif
Loading…
Cancel
Save