CommonLibSSE NG
BSFadeNode.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "RE/N/NiNode.h"
4 
5 namespace RE
6 {
7  class BSLeafAnimNode;
8  class BSTreeNode;
9 
10  class BSFadeNode : public NiNode
11  {
12  public:
13  inline static constexpr auto RTTI = RTTI_BSFadeNode;
14  inline static auto Ni_RTTI = NiRTTI_BSFadeNode;
15 
16  struct RUNTIME_DATA
17  {
18 #define RUNTIME_DATA_CONTENT \
19  float unk128; /* 00 */ \
20  float unk12C; /* 04 */ \
21  float currentFade; /* 08 */ \
22  std::uint32_t unk134; /* 0C */ \
23  std::uint32_t unk138; /* 10 */ \
24  std::uint32_t unk13C; /* 14 */ \
25  float unk140; /* 18 */ \
26  std::uint32_t unk144; /* 1C */ \
27  std::uint32_t unk148; /* 20 */ \
28  float unk14C; /* 24 */ \
29  std::uint16_t unk150; /* 28 */ \
30  std::uint8_t unk152; /* 2A */ \
31  std::uint8_t unk153; /* 2B */ \
32  std::uint8_t unk154; /* 2C */ \
33  std::uint8_t unk155; /* 2D */ \
34  std::uint16_t unk156; /* 2E */
35 
37  };
38  static_assert(sizeof(RUNTIME_DATA) == 0x30);
39 
40  ~BSFadeNode() override; // 00
41 
42  // override (NiNode)
43  const NiRTTI* GetRTTI() const override; // 02
44  BSFadeNode* AsFadeNode() override; // 05 - { return this; }
45  NiObject* CreateClone(NiCloningProcess& a_cloning) override; // 17
46  void LoadBinary(NiStream& a_stream) override; // 18
47  void LinkObject(NiStream& a_stream) override; // 19
48  bool RegisterStreamables(NiStream& a_stream) override; // 1A
49  void SaveBinary(NiStream& a_stream) override; // 1B
50  bool IsEqual(NiObject* a_object) override; // 1C
51 #ifndef SKYRIM_CROSS_VR
52  // The following are virtual functions past the point where VR compatibility breaks.
53  void UpdateSelectedDownwardPass(NiUpdateData& a_data, std::uint32_t a_arg2) override; // 2D
54  void OnVisible(NiCullingProcess& a_process) override; // 34
55 #endif
56 
57  // add
58  SKYRIM_REL_VR_VIRTUAL BSTreeNode* AsTreeNode(); // 3E - { return 0; }
59  SKYRIM_REL_VR_VIRTUAL BSLeafAnimNode* AsLeafAnimNode(); // 3F - { return 0; }
60 
61  [[nodiscard]] inline RUNTIME_DATA& GetRuntimeData() noexcept
62  {
63  return REL::RelocateMember<RUNTIME_DATA>(this, 0x128, 0x150);
64  }
65 
66  [[nodiscard]] inline const RUNTIME_DATA& GetRuntimeData() const noexcept
67  {
68  return REL::RelocateMember<RUNTIME_DATA>(this, 0x128, 0x150);
69  }
70 
71  // members
72 #ifndef SKYRIM_CROSS_VR
73  RUNTIME_DATA_CONTENT // 128, 150
74 #endif
75  };
76 #ifndef ENABLE_SKYRIM_VR
77  static_assert(sizeof(BSFadeNode) == 0x158);
78 #elif !defined(ENABLE_SKYRIM_AE) && !defined(ENABLE_SKYRIM_SE)
79  static_assert(sizeof(BSFadeNode) == 0x180);
80 #endif
81 }
82 #undef RUNTIME_DATA_CONTENT
#define RUNTIME_DATA_CONTENT
Definition: BSFadeNode.h:18
#define SKYRIM_REL_VR_VIRTUAL
Definition: Common.h:94
Definition: BSFadeNode.h:11
~BSFadeNode() override
BSFadeNode * AsFadeNode() override
RUNTIME_DATA & GetRuntimeData() noexcept
Definition: BSFadeNode.h:61
bool IsEqual(NiObject *a_object) override
bool RegisterStreamables(NiStream &a_stream) override
NiObject * CreateClone(NiCloningProcess &a_cloning) override
SKYRIM_REL_VR_VIRTUAL BSLeafAnimNode * AsLeafAnimNode()
const NiRTTI * GetRTTI() const override
void SaveBinary(NiStream &a_stream) override
void OnVisible(NiCullingProcess &a_process) override
const RUNTIME_DATA & GetRuntimeData() const noexcept
Definition: BSFadeNode.h:66
static auto Ni_RTTI
Definition: BSFadeNode.h:14
void LinkObject(NiStream &a_stream) override
static constexpr auto RTTI
Definition: BSFadeNode.h:13
void UpdateSelectedDownwardPass(NiUpdateData &a_data, std::uint32_t a_arg2) override
void LoadBinary(NiStream &a_stream) override
SKYRIM_REL_VR_VIRTUAL BSTreeNode * AsTreeNode()
Definition: NiCloningProcess.h:10
Definition: NiCullingProcess.h:34
Definition: NiNode.h:12
Definition: NiObject.h:37
Definition: NiRTTI.h:6
Definition: NiStream.h:29
Definition: NiAVObject.h:25
Definition: AbsorbEffect.h:6
constexpr REL::VariantID RTTI_BSFadeNode(691872, 399916, 0x1f7d738)
constexpr REL::VariantID NiRTTI_BSFadeNode(527630, 414559, 0x3422f38)
Definition: BSFadeNode.h:17