|
|
|
#ifndef OPENMW_ESM_STAT_H
|
|
|
|
#define OPENMW_ESM_STAT_H
|
Finished ALCH, APPA, BOOK, CLOT, CREC, ENCH, GLOB, INGR, LIGH, MISC, RACE, SKIL, SNDG, SSCR and STAT. Phew!
15 years ago
|
|
|
|
|
|
|
#include <string>
|
|
|
|
|
Finished ALCH, APPA, BOOK, CLOT, CREC, ENCH, GLOB, INGR, LIGH, MISC, RACE, SKIL, SNDG, SSCR and STAT. Phew!
15 years ago
|
|
|
namespace ESM {
|
|
|
|
|
|
|
|
class ESMReader;
|
|
|
|
class ESMWriter;
|
|
|
|
|
Finished ALCH, APPA, BOOK, CLOT, CREC, ENCH, GLOB, INGR, LIGH, MISC, RACE, SKIL, SNDG, SSCR and STAT. Phew!
15 years ago
|
|
|
/*
|
|
|
|
* Definition of static object.
|
|
|
|
*
|
|
|
|
* A stat record is basically just a reference to a nif file. Some
|
|
|
|
* esps seem to contain copies of the STAT entries from the esms, and
|
|
|
|
* the esms themselves contain several identical entries. Perhaps all
|
|
|
|
* statics referenced in a file is also put in the file? Since we are
|
|
|
|
* only reading files it doesn't much matter to us, but it would if we
|
|
|
|
* were writing our own ESM/ESPs. You can check some files later when
|
|
|
|
* you decode the CELL blocks, if you want to test this hypothesis.
|
|
|
|
*/
|
|
|
|
|
|
|
|
struct Static
|
Finished ALCH, APPA, BOOK, CLOT, CREC, ENCH, GLOB, INGR, LIGH, MISC, RACE, SKIL, SNDG, SSCR and STAT. Phew!
15 years ago
|
|
|
{
|
|
|
|
static unsigned int sRecordId;
|
|
|
|
/// Return a string descriptor for this record type. Currently used for debugging / error logs only.
|
|
|
|
static std::string getRecordType() { return "Static"; }
|
|
|
|
|
|
|
|
std::string mId, mModel;
|
Finished ALCH, APPA, BOOK, CLOT, CREC, ENCH, GLOB, INGR, LIGH, MISC, RACE, SKIL, SNDG, SSCR and STAT. Phew!
15 years ago
|
|
|
|
|
|
|
void load(ESMReader &esm, bool &isDeleted);
|
|
|
|
void save(ESMWriter &esm, bool isDeleted = false) const;
|
|
|
|
|
|
|
|
void blank();
|
|
|
|
///< Set record to default state (does not touch the ID).
|
|
|
|
|
|
|
|
Static(const std::string id, const std::string &model)
|
|
|
|
: mId(id)
|
|
|
|
, mModel(model)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
Static()
|
|
|
|
{
|
|
|
|
}
|
Finished ALCH, APPA, BOOK, CLOT, CREC, ENCH, GLOB, INGR, LIGH, MISC, RACE, SKIL, SNDG, SSCR and STAT. Phew!
15 years ago
|
|
|
};
|
|
|
|
}
|
|
|
|
#endif
|