1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-21 13:23:53 +00:00
openmw/components/esm3/loadbook.hpp

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

42 lines
993 B
C++
Raw Normal View History

2012-09-23 18:11:08 +00:00
#ifndef OPENMW_ESM_BOOK_H
#define OPENMW_ESM_BOOK_H
2022-06-04 14:07:59 +00:00
#include "components/esm/defs.hpp"
2012-09-30 20:51:54 +00:00
#include <string>
namespace ESM
{
/*
* Books, magic scrolls, notes and so on
*/
2012-09-30 20:51:54 +00:00
class ESMReader;
class ESMWriter;
struct Book
{
2022-06-04 14:34:23 +00:00
constexpr static RecNameInts sRecordId = REC_BOOK;
2022-06-04 14:07:59 +00:00
/// Return a string descriptor for this record type. Currently used for debugging / error logs only.
static std::string_view getRecordType() { return "Book"; }
struct BKDTstruct
{
2012-09-17 07:37:50 +00:00
float mWeight;
2017-02-12 12:52:36 +00:00
int mValue, mIsScroll, mSkillId, mEnchant;
};
2012-09-17 07:37:50 +00:00
BKDTstruct mData;
std::string mName, mModel, mIcon, mScript, mEnchant, mText;
unsigned int mRecordFlags;
2012-09-30 20:23:49 +00:00
std::string mId;
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).
};
}
#endif