forked from mirror/openmw-tes3mp
added filter record (will not be used in OpenMW prior to 1.1)
This commit is contained in:
parent
66534a45da
commit
6f90e071f4
3 changed files with 46 additions and 1 deletions
|
@ -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
|
||||
|
|
20
components/esm/filter.cpp
Normal file
20
components/esm/filter.cpp
Normal file
|
@ -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();
|
||||
}
|
25
components/esm/filter.hpp
Normal file
25
components/esm/filter.hpp
Normal file
|
@ -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…
Reference in a new issue