CommonLibVR
Loading...
Searching...
No Matches
BGSMaterialType.h
Go to the documentation of this file.
1#pragma once
2
4#include "RE/F/FormTypes.h"
5#include "RE/M/MaterialIDs.h"
6#include "RE/N/NiColor.h"
7#include "RE/T/TESForm.h"
8
9namespace RE
10{
11 class BGSMaterialType : public TESForm
12 {
13 public:
14 inline static constexpr auto RTTI = RTTI_BGSMaterialType;
15 inline static constexpr auto VTABLE = VTABLE_BGSMaterialType;
16 inline static constexpr auto FORMTYPE = FormType::MaterialType;
17
18 enum class FLAG
19 {
20 kNone = 0,
21 kStairs = 1 << 0,
22 kArrowsStick = 1 << 1
23 };
24
26 {
27 enum RecordFlag : std::uint32_t
28 {
29 kDeleted = 1 << 5,
30 kIgnored = 1 << 12
31 };
32 };
33
34 ~BGSMaterialType() override; // 00
35
36 // override (TESForm)
37 void ClearData() override; // 04
38 bool Load(TESFile* a_mod) override; // 06
39 void InitItemImpl() override; // 13
40
42 {
43 using func_t = decltype(&BGSMaterialType::GetMaterialType);
44 static REL::Relocation<func_t> func{ RELOCATION_ID(20529, 20968) };
45 return func(a_materialID);
46 }
47
48 // members
52 NiColor materialColor; // 34 - CNAM
53 float buoyancy; // 40 - BNAM
56 private:
58 };
59 static_assert(sizeof(BGSMaterialType) == 0x50);
60}
#define KEEP_FOR_RE()
Definition PCH.h:517
#define RELOCATION_ID(SE, AE)
Definition PCH.h:506
Definition Relocation.h:210
Definition EnumSet.h:9
Definition BGSImpactDataSet.h:13
Definition BGSMaterialType.h:12
static constexpr auto VTABLE
Definition BGSMaterialType.h:15
float buoyancy
Definition BGSMaterialType.h:53
void ClearData() override
void InitItemImpl() override
BGSMaterialType * parentType
Definition BGSMaterialType.h:49
bool Load(TESFile *a_mod) override
NiColor materialColor
Definition BGSMaterialType.h:52
MATERIAL_ID materialID
Definition BGSMaterialType.h:51
static BGSMaterialType * GetMaterialType(MATERIAL_ID a_materialID)
Definition BGSMaterialType.h:41
FLAG
Definition BGSMaterialType.h:19
static constexpr auto FORMTYPE
Definition BGSMaterialType.h:16
static constexpr auto RTTI
Definition BGSMaterialType.h:14
REX::EnumSet< FLAG, std::uint32_t > flags
Definition BGSMaterialType.h:54
BSFixedString materialName
Definition BGSMaterialType.h:50
~BGSMaterialType() override
BGSImpactDataSet * havokImpactDataSet
Definition BGSMaterialType.h:55
Definition NiColor.h:11
Definition TESFile.h:17
Definition TESForm.h:40
Definition AbsorbEffect.h:6
constexpr std::array< REL::ID, 1 > VTABLE_BGSMaterialType
Definition Offsets_VTABLE.h:8649
MATERIAL_ID
Definition MaterialIDs.h:6
constexpr REL::ID RTTI_BGSMaterialType(static_cast< std::uint64_t >(513988))
Definition BGSMaterialType.h:26
RecordFlag
Definition BGSMaterialType.h:28
@ kDeleted
Definition BGSMaterialType.h:29
@ kIgnored
Definition BGSMaterialType.h:30