1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-29 09:32:45 +00:00
OpenMW/components/esm3/loadbody.hpp

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

74 lines
1.6 KiB
C++
Raw Normal View History

2012-09-23 22:11:08 +04:00
#ifndef OPENMW_ESM_BODY_H
#define OPENMW_ESM_BODY_H
2022-06-04 16:07:59 +02:00
#include "components/esm/defs.hpp"
2022-09-22 21:26:05 +03:00
#include <string>
namespace ESM
{
2010-02-19 14:23:22 +01:00
2022-09-22 21:26:05 +03:00
class ESMReader;
class ESMWriter;
2012-10-01 00:51:54 +04:00
2022-09-22 21:26:05 +03:00
struct BodyPart
{
constexpr static RecNameInts sRecordId = REC_BODY;
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 "BodyPart"; }
2022-09-22 21:26:05 +03:00
enum MeshPart
{
MP_Head = 0,
MP_Hair = 1,
MP_Neck = 2,
MP_Chest = 3,
MP_Groin = 4,
MP_Hand = 5,
MP_Wrist = 6,
MP_Forearm = 7,
MP_Upperarm = 8,
MP_Foot = 9,
MP_Ankle = 10,
MP_Knee = 11,
MP_Upperleg = 12,
MP_Clavicle = 13,
MP_Tail = 14,
2022-09-22 21:26:05 +03:00
MP_Count = 15
};
2022-09-22 21:26:05 +03:00
enum Flags
{
BPF_Female = 1,
BPF_NotPlayable = 2
};
2022-09-22 21:26:05 +03:00
enum MeshType
{
MT_Skin = 0,
MT_Clothing = 1,
MT_Armor = 2
};
2022-09-22 21:26:05 +03:00
struct BYDTstruct
{
unsigned char mPart; // mesh part
unsigned char mVampire; // boolean
unsigned char mFlags;
unsigned char mType; // mesh type
};
2022-09-22 21:26:05 +03:00
BYDTstruct mData;
unsigned int mRecordFlags;
std::string mId, mModel, mRace;
2022-09-22 21:26:05 +03:00
void load(ESMReader& esm, bool& isDeleted);
void save(ESMWriter& esm, bool isDeleted = false) const;
2014-07-01 12:37:22 +02:00
2022-09-22 21:26:05 +03:00
void blank();
///< Set record to default state (does not touch the ID).
};
2010-02-19 14:23:22 +01:00
}
#endif