1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-02-04 12:39:55 +00:00
OpenMW/components/esm3/loadprob.hpp

43 lines
924 B
C++
Raw Normal View History

2013-03-22 05:50:54 +01:00
#ifndef OPENMW_ESM_PROBE_H
#define OPENMW_ESM_PROBE_H
#include <string>
2022-06-04 16:07:59 +02:00
#include "components/esm/defs.hpp"
2013-03-22 05:50:54 +01:00
namespace ESM
{
2022-09-22 21:26:05 +03:00
class ESMReader;
class ESMWriter;
2013-03-22 05:50:54 +01:00
2022-09-22 21:26:05 +03:00
struct Probe
{
constexpr static RecNameInts sRecordId = REC_PROB;
2022-06-04 16:07:59 +02:00
2022-09-22 21:26:05 +03:00
/// Return a string descriptor for this record type. Currently used for debugging / error logs only.
static std::string_view getRecordType() { return "Probe"; }
2022-09-22 21:26:05 +03:00
struct Data
{
float mWeight;
int mValue;
2013-03-22 05:50:54 +01:00
2022-09-22 21:26:05 +03:00
float mQuality;
int mUses;
}; // Size = 16
2013-03-22 05:50:54 +01:00
2022-09-22 21:26:05 +03:00
Data mData;
unsigned int mRecordFlags;
std::string mId, mName, mModel, mIcon, mScript;
2013-03-22 05:50:54 +01:00
2022-09-22 21:26:05 +03:00
void load(ESMReader& esm, bool& isDeleted);
void save(ESMWriter& esm, bool isDeleted = false) const;
2022-09-22 21:26:05 +03:00
void blank();
///< Set record to default state (does not touch the ID).
};
2013-03-22 05:50:54 +01:00
}
#endif