CommonLibVR
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 VTABLE = VTABLE_BGSHeadPart;
21  inline static constexpr auto FORMTYPE = FormType::HeadPart;
22 
23  enum class Flag // DATA
24  {
25  kNone = 0,
26  kPlayable = 1 << 0,
27  kMale = 1 << 1,
28  kFemale = 1 << 2,
29  kIsExtraPart = 1 << 3,
30  kUseSolidTint = 1 << 4
31  };
32 
33  enum class HeadPartType // PNAM
34  {
35  kMisc = 0x0,
36  kFace = 0x1,
37  kEyes = 0x2,
38  kHair = 0x3,
39  kFacialHair = 0x4,
40  kScar = 0x5,
41  kEyebrows = 0x6,
42 
43  kTotal
44  };
45 
46  struct MorphIndices
47  {
48  enum MorphIndex : std::uint32_t
49  {
53 
54  kTotal
55  };
56  };
58 
59  struct RecordFlags
60  {
61  enum RecordFlag : std::uint32_t
62  {
63  kNonPlayable = 1 << 2,
64  kDeleted = 1 << 5,
65  kIgnored = 1 << 12
66  };
67  };
68 
69  ~BGSHeadPart() override; // 00
70 
71  // override (TESForm)
72  void InitializeData() override; // 04
73  void ClearData() override; // 05
74  bool Load(TESFile* a_mod) override; // 06
75  void InitItemImpl() override; // 13
76  const char* GetFormEditorID() const override; // 32 - { return formEditorID.c_str(); }
77  bool SetFormEditorID(const char* a_str) override; // 33 - { formEditorID = a_str; return true; }
78 
79  bool IsExtraPart();
80 
81  // members
83  std::uint8_t pad069; // 069
84  std::uint16_t pad06A; // 06A
87  BGSTextureSet* textureSet; // 088 - TNAM
89  BGSColorForm* color; // 108 - CNAM
90  BGSListForm* validRaces; // 110 - RNAM
91  BSFixedString formEditorID; // 118 - EDID
92  private:
93  KEEP_FOR_RE()
94  };
95  static_assert(sizeof(BGSHeadPart) == 0x120);
96 }
#define KEEP_FOR_RE()
Definition: PCH.h:713
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:88
stl::enumeration< HeadPartType, std::uint32_t > type
Definition: BGSHeadPart.h:85
std::uint16_t pad06A
Definition: BGSHeadPart.h:84
BGSColorForm * color
Definition: BGSHeadPart.h:89
void InitializeData() override
static constexpr auto VTABLE
Definition: BGSHeadPart.h:20
stl::enumeration< Flag, std::uint8_t > flags
Definition: BGSHeadPart.h:82
BSFixedString formEditorID
Definition: BGSHeadPart.h:91
bool Load(TESFile *a_mod) override
std::uint8_t pad069
Definition: BGSHeadPart.h:83
HeadPartType
Definition: BGSHeadPart.h:34
BSTArray< BGSHeadPart * > extraParts
Definition: BGSHeadPart.h:86
void InitItemImpl() override
BGSListForm * validRaces
Definition: BGSHeadPart.h:90
bool SetFormEditorID(const char *a_str) override
const char * GetFormEditorID() const override
BGSTextureSet * textureSet
Definition: BGSHeadPart.h:87
static constexpr auto FORMTYPE
Definition: BGSHeadPart.h:21
void ClearData() override
Flag
Definition: BGSHeadPart.h:24
Definition: BGSListForm.h:11
Definition: BGSTextureSet.h:16
Definition: BSTArray.h:378
Definition: TESFile.h:17
Definition: TESForm.h:40
Definition: TESFullName.h:9
Definition: TESModelTextureSwap.h:10
Definition: TESModelTri.h:8
Definition: AbsorbEffect.h:6
constexpr std::array< REL::ID, 3 > VTABLE_BGSHeadPart
Definition: Offsets_VTABLE.h:8630
constexpr REL::ID RTTI_BGSHeadPart(static_cast< std::uint64_t >(514004))
Definition: BGSHeadPart.h:47
MorphIndex
Definition: BGSHeadPart.h:49
@ kChargenMorph
Definition: BGSHeadPart.h:52
@ kDefaultMorph
Definition: BGSHeadPart.h:51
@ kRaceMorph
Definition: BGSHeadPart.h:50
@ kTotal
Definition: BGSHeadPart.h:54
Definition: BGSHeadPart.h:60
RecordFlag
Definition: BGSHeadPart.h:62
@ kIgnored
Definition: BGSHeadPart.h:65
@ kNonPlayable
Definition: BGSHeadPart.h:63
@ kDeleted
Definition: BGSHeadPart.h:64