CommonLibSSE NG
BSDynamicTriShape.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "RE/B/BSTriShape.h"
4 
5 namespace RE
6 {
8  {
9  public:
11  {
12 #define RUNTIME_DATA_CONTENT \
13  void* dynamicData; /* 00 */ \
14  BSSpinLock lock; /* 08 */ \
15  std::uint32_t dataSize; /* 10 */ \
16  std::uint32_t frameCount; /* 14 */ \
17  std::uint32_t unk178; /* 18 */ \
18  std::uint32_t unk17C; /* 1C */
19 
21  };
22  static_assert(sizeof(DYNAMIC_TRISHAPE_RUNTIME_DATA) == 0x20);
23 
24  // override (BSTriShape)
25  const NiRTTI* GetRTTI() const override; // 02
27  NiObject* CreateClone(NiCloningProcess& a_cloning) override; // 17
28  void LoadBinary(NiStream& a_stream) override; // 18
29  void LinkObject(NiStream& a_stream) override; // 19 - { BSTriShape::LinkObject(a_stream); }
30  bool RegisterStreamables(NiStream& a_stream) override; // 1A - { return BSTriShape::RegisterStreamables(a_stream); }
31  void SaveBinary(NiStream& a_stream) override; // 1B
32  bool IsEqual(NiObject* a_object) override; // 1C
33 
35  {
36  return REL::RelocateMember<DYNAMIC_TRISHAPE_RUNTIME_DATA>(this, 0x160, 0x1A8);
37  }
38 
39  [[nodiscard]] inline const DYNAMIC_TRISHAPE_RUNTIME_DATA& GetDynamicTrishapeRuntimeData() const noexcept
40  {
41  return REL::RelocateMember<DYNAMIC_TRISHAPE_RUNTIME_DATA>(this, 0x160, 0x1A8);
42  }
43 
45  {
46  using func_t = decltype(&BSDynamicTriShape::ctor);
47  REL::Relocation<func_t> func{ RELOCATION_ID(69564, 70948) };
48  return func(this);
49  }
50 
51 #ifndef SKYRIM_CROSS_VR
52  RUNTIME_DATA_CONTENT; // 160, 1A8
53 #endif
54  };
55 #ifndef ENABLE_SKYRIM_VR
56  static_assert(sizeof(BSDynamicTriShape) == 0x180);
57 #elif !defined(ENABLE_SKYRIM_AE) && !defined(ENABLE_SKYRIM_SE)
58  static_assert(sizeof(BSDynamicTriShape) == 0x1C8);
59 #endif
60 }
61 #undef RUNTIME_DATA_CONTENT
#define RELOCATION_ID(a_se, a_ae)
Definition: PCH.h:724
Definition: Relocation.h:204
Definition: BSDynamicTriShape.h:8
const NiRTTI * GetRTTI() const override
RUNTIME_DATA_CONTENT
Definition: BSDynamicTriShape.h:52
bool IsEqual(NiObject *a_object) override
BSDynamicTriShape * ctor()
Definition: BSDynamicTriShape.h:44
const DYNAMIC_TRISHAPE_RUNTIME_DATA & GetDynamicTrishapeRuntimeData() const noexcept
Definition: BSDynamicTriShape.h:39
DYNAMIC_TRISHAPE_RUNTIME_DATA & GetDynamicTrishapeRuntimeData() noexcept
Definition: BSDynamicTriShape.h:34
void SaveBinary(NiStream &a_stream) override
BSDynamicTriShape * AsDynamicTriShape() override
NiObject * CreateClone(NiCloningProcess &a_cloning) override
void LinkObject(NiStream &a_stream) override
bool RegisterStreamables(NiStream &a_stream) override
void LoadBinary(NiStream &a_stream) override
Definition: BSTriShape.h:8
Definition: NiCloningProcess.h:10
Definition: NiObject.h:37
Definition: NiRTTI.h:6
Definition: NiStream.h:29
Definition: AbsorbEffect.h:6