2012-09-23 22:11:08 +04:00
|
|
|
#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!
2010-02-21 13:20:17 +01:00
|
|
|
|
2012-09-17 11:37:50 +04:00
|
|
|
#include <string>
|
|
|
|
|
Finished ALCH, APPA, BOOK, CLOT, CREC, ENCH, GLOB, INGR, LIGH, MISC, RACE, SKIL, SNDG, SSCR and STAT. Phew!
2010-02-21 13:20:17 +01:00
|
|
|
namespace ESM {
|
|
|
|
|
2012-10-01 00:51:54 +04:00
|
|
|
class ESMReader;
|
|
|
|
class ESMWriter;
|
|
|
|
|
Finished ALCH, APPA, BOOK, CLOT, CREC, ENCH, GLOB, INGR, LIGH, MISC, RACE, SKIL, SNDG, SSCR and STAT. Phew!
2010-02-21 13:20:17 +01:00
|
|
|
/*
|
|
|
|
* 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.
|
|
|
|
*/
|
|
|
|
|
2012-09-30 23:34:53 +04:00
|
|
|
struct Static
|
Finished ALCH, APPA, BOOK, CLOT, CREC, ENCH, GLOB, INGR, LIGH, MISC, RACE, SKIL, SNDG, SSCR and STAT. Phew!
2010-02-21 13:20:17 +01:00
|
|
|
{
|
2013-09-24 13:17:28 +02:00
|
|
|
static unsigned int sRecordId;
|
2015-06-14 02:31:00 +02:00
|
|
|
/// Return a string descriptor for this record type. Currently used for debugging / error logs only.
|
|
|
|
static std::string getRecordType() { return "Static"; }
|
2013-09-24 13:17:28 +02:00
|
|
|
|
2021-06-29 23:25:26 +10:00
|
|
|
unsigned int mRecordFlags;
|
2018-05-03 10:37:55 +04:00
|
|
|
std::string mId, mModel;
|
Finished ALCH, APPA, BOOK, CLOT, CREC, ENCH, GLOB, INGR, LIGH, MISC, RACE, SKIL, SNDG, SSCR and STAT. Phew!
2010-02-21 13:20:17 +01:00
|
|
|
|
2018-05-03 10:37:55 +04:00
|
|
|
void load(ESMReader &esm, bool &isDeleted);
|
|
|
|
void save(ESMWriter &esm, bool isDeleted = false) const;
|
2013-05-06 14:10:43 +02:00
|
|
|
|
|
|
|
void blank();
|
|
|
|
///< Set record to default state (does not touch the ID).
|
Finished ALCH, APPA, BOOK, CLOT, CREC, ENCH, GLOB, INGR, LIGH, MISC, RACE, SKIL, SNDG, SSCR and STAT. Phew!
2010-02-21 13:20:17 +01:00
|
|
|
};
|
|
|
|
}
|
|
|
|
#endif
|