CommonLibSSE (Parapets fork)
BGSHeadPart.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "RE/B/BSFixedString.h"
4 #include "RE/B/BSTArray.h"
5 #include "RE/F/FormTypes.h"
6 #include "RE/T/TESForm.h"
7 #include "RE/T/TESFullName.h"
9 #include "RE/T/TESModelTri.h"
10 
11 namespace RE
12 {
13  class BGSHeadPart :
14  public TESForm, // 000
15  public TESFullName, // 020
16  public TESModelTextureSwap // 030
17  {
18  public:
19  inline static constexpr auto RTTI = RTTI_BGSHeadPart;
20  inline static constexpr auto FORMTYPE = FormType::HeadPart;
21 
22  enum class Flag // DATA
23  {
24  kNone = 0,
25  kPlayable = 1 << 0,
26  kMale = 1 << 1,
27  kFemale = 1 << 2,
28  kIsExtraPart = 1 << 3,
29  kUseSolidTint = 1 << 4
30  };
31 
32  enum class HeadPartType // PNAM
33  {
34  kMisc = 0x0,
35  kFace = 0x1,
36  kEyes = 0x2,
37  kHair = 0x3,
38  kFacialHair = 0x4,
39  kScar = 0x5,
40  kEyebrows = 0x6,
41 
42  kTotal
43  };
44 
45  struct MorphIndices
46  {
47  enum MorphIndex : std::uint32_t
48  {
52 
53  kTotal
54  };
55  };
57 
58  struct RecordFlags
59  {
60  enum RecordFlag : std::uint32_t
61  {
62  kNonPlayable = 1 << 2,
63  kDeleted = 1 << 5,
64  kIgnored = 1 << 12
65  };
66  };
67 
68  ~BGSHeadPart() override; // 00
69 
70  // override (TESForm)
71  void InitializeData() override; // 04
72  void ClearData() override; // 05
73  bool Load(TESFile* a_mod) override; // 06
74  void InitItemImpl() override; // 13
75  const char* GetFormEditorID() const override; // 32 - { return formEditorID.c_str(); }
76  bool SetFormEditorID(const char* a_str) override; // 33 - { formEditorID = a_str; return true; }
77 
78  bool IsExtraPart();
79 
80  // members
82  std::uint8_t pad069; // 069
83  std::uint16_t pad06A; // 06A
86  BGSTextureSet* textureSet; // 088 - TNAM
88  BGSColorForm* color; // 108 - CNAM
89  BGSListForm* validRaces; // 110 - RNAM
90  BSFixedString formEditorID; // 118 - EDID
91  };
92  static_assert(sizeof(BGSHeadPart) == 0x120);
93 }
Definition: BGSColorForm.h:13
Definition: BGSHeadPart.h:17
static constexpr auto RTTI
Definition: BGSHeadPart.h:19
~BGSHeadPart() override
TESModelTri morphs[MorphIndices::kTotal]
Definition: BGSHeadPart.h:87
stl::enumeration< HeadPartType, std::uint32_t > type
Definition: BGSHeadPart.h:84
std::uint16_t pad06A
Definition: BGSHeadPart.h:83
BGSColorForm * color
Definition: BGSHeadPart.h:88
void InitializeData() override
stl::enumeration< Flag, std::uint8_t > flags
Definition: BGSHeadPart.h:81
BSFixedString formEditorID
Definition: BGSHeadPart.h:90
bool Load(TESFile *a_mod) override
std::uint8_t pad069
Definition: BGSHeadPart.h:82
HeadPartType
Definition: BGSHeadPart.h:33
BSTArray< BGSHeadPart * > extraParts
Definition: BGSHeadPart.h:85
void InitItemImpl() override
BGSListForm * validRaces
Definition: BGSHeadPart.h:89
bool SetFormEditorID(const char *a_str) override
const char * GetFormEditorID() const override
BGSTextureSet * textureSet
Definition: BGSHeadPart.h:86
static constexpr auto FORMTYPE
Definition: BGSHeadPart.h:20
void ClearData() override
Flag
Definition: BGSHeadPart.h:23
Definition: BGSListForm.h:10
Definition: BGSTextureSet.h:16
Definition: BSTArray.h:377
Definition: TESFile.h:14
Definition: TESForm.h:34
Definition: TESFullName.h:9
Definition: TESModelTextureSwap.h:10
Definition: TESModelTri.h:8
Definition: AbsorbEffect.h:6
constexpr REL::ID RTTI_BGSHeadPart
Definition: Offsets_RTTI.h:1307
Definition: BGSHeadPart.h:46
MorphIndex
Definition: BGSHeadPart.h:48
@ kChargenMorph
Definition: BGSHeadPart.h:51
@ kDefaultMorph
Definition: BGSHeadPart.h:50
@ kRaceMorph
Definition: BGSHeadPart.h:49
@ kTotal
Definition: BGSHeadPart.h:53
Definition: BGSHeadPart.h:59
RecordFlag
Definition: BGSHeadPart.h:61
@ kIgnored
Definition: BGSHeadPart.h:64
@ kNonPlayable
Definition: BGSHeadPart.h:62
@ kDeleted
Definition: BGSHeadPart.h:63