CommonLibVR
BGSDebris.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "RE/B/BGSPreloadable.h"
4 #include "RE/B/BSTArray.h"
5 #include "RE/B/BSTList.h"
6 #include "RE/F/FormTypes.h"
7 #include "RE/I/ID.h"
8 #include "RE/T/TESForm.h"
9 
10 namespace RE
11 {
13  {
14  public:
16  BGSDebrisData(const char* a_fileName);
17 
18  ~BGSDebrisData() = default;
19 
20  enum class BGSDebrisDataFlags
21  {
22  kNone = 0,
23  kCollisionData = 1 << 0
24  };
25 
27 
28  // members
29  std::int8_t percentage; // 00 - DATA~
31  std::uint16_t pad02; // 02
32  std::uint32_t pad04; // 04
33  const char* fileName; // 08
36  };
37  static_assert(sizeof(BGSDebrisData) == 0x40);
38 
39  class BGSDebris :
40  public TESForm, // 00
41  public BGSPreloadable // 20
42  {
43  public:
44  inline static constexpr auto RTTI = RTTI_BGSDebris;
45  inline static constexpr auto VTABLE = VTABLE_BGSDebris;
46  inline static constexpr auto FORMTYPE = FormType::Debris;
47 
48  struct RecordFlags
49  {
50  enum RecordFlag : std::uint32_t
51  {
52  kDeleted = 1 << 5,
53  kIgnored = 1 << 12
54  };
55  };
56 
57  ~BGSDebris() override; // 00
58 
59  // override (TESForm)
60  void InitializeData() override; // 04 - { return; }
61  void ClearData() override; // 05
62  bool Load(TESFile* a_mod) override; // 06
63 
64  // members
66  private:
67  KEEP_FOR_RE()
68  };
69  static_assert(sizeof(BGSDebris) == 0x38);
70 }
#define KEEP_FOR_RE()
Definition: PCH.h:713
Definition: BGSDebris.h:42
void ClearData() override
void InitializeData() override
BSSimpleList< BGSDebrisData * > data
Definition: BGSDebris.h:65
~BGSDebris() override
bool Load(TESFile *a_mod) override
static constexpr auto RTTI
Definition: BGSDebris.h:44
static constexpr auto VTABLE
Definition: BGSDebris.h:45
static constexpr auto FORMTYPE
Definition: BGSDebris.h:46
Definition: BGSPreloadable.h:8
Definition: BSTList.h:10
Definition: BSTArray.h:378
Definition: TESFile.h:17
Definition: TESForm.h:40
Definition: AbsorbEffect.h:6
constexpr REL::ID RTTI_BGSDebris(static_cast< std::uint64_t >(513930))
constexpr std::array< REL::ID, 2 > VTABLE_BGSDebris
Definition: Offsets_VTABLE.h:8601
Definition: BGSDebris.h:13
BGSDebrisDataFlags
Definition: BGSDebris.h:21
std::uint32_t pad04
Definition: BGSDebris.h:32
BGSDebrisData(const char *a_fileName)
~BGSDebrisData()=default
stl::enumeration< BGSDebrisDataFlags, std::uint8_t > flags
Definition: BGSDebris.h:30
std::uint16_t pad02
Definition: BGSDebris.h:31
BSTArray< std::uint32_t > addons
Definition: BGSDebris.h:35
std::int8_t percentage
Definition: BGSDebris.h:29
BSTArray< BSResource::ID > textureIDs
Definition: BGSDebris.h:34
const char * fileName
Definition: BGSDebris.h:33
Definition: BGSDebris.h:49
RecordFlag
Definition: BGSDebris.h:51
@ kIgnored
Definition: BGSDebris.h:53
@ kDeleted
Definition: BGSDebris.h:52