2012-09-23 18:11:08 +00:00
|
|
|
#ifndef OPENMW_ESM_GMST_H
|
|
|
|
#define OPENMW_ESM_GMST_H
|
2010-02-22 20:00:38 +00:00
|
|
|
|
2012-09-17 07:37:50 +00:00
|
|
|
#include <string>
|
|
|
|
|
2013-03-04 12:59:06 +00:00
|
|
|
#include "variant.hpp"
|
2010-02-22 20:00:38 +00:00
|
|
|
|
2022-06-04 14:07:59 +00:00
|
|
|
#include "components/esm/defs.hpp"
|
|
|
|
|
2011-04-08 13:58:21 +00:00
|
|
|
namespace ESM
|
|
|
|
{
|
2012-09-30 20:51:54 +00:00
|
|
|
|
2022-09-22 18:26:05 +00:00
|
|
|
class ESMReader;
|
|
|
|
class ESMWriter;
|
2012-09-30 20:51:54 +00:00
|
|
|
|
2022-09-22 18:26:05 +00:00
|
|
|
/*
|
|
|
|
* Game setting
|
|
|
|
*
|
|
|
|
*/
|
2010-02-22 20:00:38 +00:00
|
|
|
|
2022-09-22 18:26:05 +00:00
|
|
|
struct GameSetting
|
|
|
|
{
|
|
|
|
constexpr static RecNameInts sRecordId = REC_GMST;
|
2022-06-04 14:07:59 +00:00
|
|
|
|
2022-09-22 18:26:05 +00:00
|
|
|
/// Return a string descriptor for this record type. Currently used for debugging / error logs only.
|
|
|
|
static std::string_view getRecordType() { return "GameSetting"; }
|
2013-09-24 11:17:28 +00:00
|
|
|
|
2022-09-22 18:26:05 +00:00
|
|
|
unsigned int mRecordFlags;
|
|
|
|
std::string mId;
|
2013-03-05 07:02:27 +00:00
|
|
|
|
2022-09-22 18:26:05 +00:00
|
|
|
Variant mValue;
|
2011-04-08 13:58:21 +00:00
|
|
|
|
2022-09-22 18:26:05 +00:00
|
|
|
void load(ESMReader& esm, bool& isDeleted);
|
2013-02-08 08:58:19 +00:00
|
|
|
|
2022-09-22 18:26:05 +00:00
|
|
|
void save(ESMWriter& esm, bool isDeleted = false) const;
|
2013-02-08 08:58:19 +00:00
|
|
|
|
2022-09-22 18:26:05 +00:00
|
|
|
void blank();
|
|
|
|
///< Set record to default state (does not touch the ID).
|
|
|
|
};
|
2013-02-08 08:58:19 +00:00
|
|
|
|
2022-09-22 18:26:05 +00:00
|
|
|
bool operator==(const GameSetting& left, const GameSetting& right);
|
2010-02-22 20:00:38 +00:00
|
|
|
}
|
|
|
|
#endif
|