CommonLibVR
ShaderReferenceEffect.h
Go to the documentation of this file.
1 #pragma once
2 
4 #include "RE/B/BSSoundHandle.h"
5 #include "RE/B/BSTArray.h"
6 #include "RE/N/NiSmartPointer.h"
7 #include "RE/R/ReferenceEffect.h"
8 
9 namespace RE
10 {
11  class BSEffectShaderData;
12  class BSParticleShaderObjectEmitter;
13  class BSParticleShaderProperty;
14  class NiAVObject;
15  class NiSourceTexture;
16  class TESBoundObject;
17  class TESEffectShader;
18  class BSEffectShaderData;
19 
21  {
22  public:
23  inline static constexpr auto RTTI = RTTI_ShaderReferenceEffect;
24  inline static constexpr auto Ni_RTTI = NiRTTI_ShaderReferenceEffect;
25  inline static constexpr auto VTABLE = VTABLE_ShaderReferenceEffect;
26  inline static constexpr auto TYPE = TEMP_EFFECT_TYPE::kRefShader;
27 
28  enum class Flag
29  {
30  kNone = 0,
31  kVisible = 1 << 0,
32  kInterfaceEffect = 1 << 1,
33  kAllowTargetRoot = 1 << 7
34  };
35 
37  {
38  std::uint64_t unk00; // 00
40  };
41  static_assert(sizeof(TextureRequest) == 0x10);
42 
44  {
47  };
48  static_assert(sizeof(ParticleShader) == 0x10);
49 
50  ~ShaderReferenceEffect() override; // 00
51 
52  // override (ReferenceEffect)
53  const NiRTTI* GetRTTI() const override; // 02
54  bool Update(float a_arg1) override; // 28
55  NiAVObject* Get3D() const override; // 29 - { return lastRootNode.get(); }
56  TEMP_EFFECT_TYPE GetType() const override; // 2C - { return 10; }
57  void SaveGame(BGSSaveGameBuffer* a_buf) override; // 2D
58  void LoadGame(BGSLoadGameBuffer* a_buf) override; // 2E
59  void FinishLoadGame(BGSLoadGameBuffer* a_buf) override; // 2F - { return ReferenceEffect::Unk_2F(); }
60  bool IsInterfaceEffect() const override; // 30 - { return (unk130 >> 1) & 1; }
61  void SetInterfaceEffect(bool a_set) override; // 31
62  bool GetStackable() const override; // 32 - { return true; }
63  bool GetStackableMatch(BSTempEffect* a_effect) const override; // 33
64  void Push() override; // 34 - { if (effectShaderData) ++pushCount; }
65  void Pop() override; // 35
66  void Init() override; // 36
67  void Suspend() override; // 37
68  void Resume() override; // 38
69  void ClearTarget() override; // 39
70  void UpdatePosition() override; // 3B
71  NiAVObject* GetAttachRoot() override; // 3C
72  void DetachImpl() override; // 3E
73 
74  // members
79  BSTArray<void*> unk0A8; // 0A8 - smart ptrs
81  std::uint32_t pad0CC; // 0CC
91  NiPointer<NiAVObject> targetRoot; // 118 - smart ptr
92  float alphaTimer; // 120
93  float addonAlpha; // 124 - 1.0f
94  float addonScale; // 128 - 1.0f
95  float effectShaderAge; // 12C
97  std::uint32_t pushCount; // 134
98  private:
99  KEEP_FOR_RE()
100  };
101  static_assert(sizeof(ShaderReferenceEffect) == 0x138);
102 }
#define KEEP_FOR_RE()
Definition: PCH.h:713
Definition: BGSLoadGameBuffer.h:6
Definition: BGSSaveGameBuffer.h:10
Definition: BSEffectShaderData.h:16
Definition: BSTArray.h:378
Definition: BSTempEffect.h:29
Definition: NiAVObject.h:57
Definition: NiSmartPointer.h:9
Definition: NiRTTI.h:6
Definition: ReferenceEffect.h:12
Definition: ShaderReferenceEffect.h:21
Flag
Definition: ShaderReferenceEffect.h:29
std::uint32_t pushCount
Definition: ShaderReferenceEffect.h:97
bool GetStackableMatch(BSTempEffect *a_effect) const override
static constexpr auto TYPE
Definition: ShaderReferenceEffect.h:26
BSTArray< NiPointer< NiAVObject > > addonObjects
Definition: ShaderReferenceEffect.h:76
float addonScale
Definition: ShaderReferenceEffect.h:94
TESEffectShader * effectData
Definition: ShaderReferenceEffect.h:89
NiPointer< NiAVObject > lastRootNode
Definition: ShaderReferenceEffect.h:87
void UpdatePosition() override
void DetachImpl() override
BSEffectShaderData * effectShaderData
Definition: ShaderReferenceEffect.h:90
NiPointer< NiAVObject > targetRoot
Definition: ShaderReferenceEffect.h:91
bool Update(float a_arg1) override
static constexpr auto VTABLE
Definition: ShaderReferenceEffect.h:25
stl::enumeration< Flag, std::uint32_t > flags
Definition: ShaderReferenceEffect.h:96
float alphaTimer
Definition: ShaderReferenceEffect.h:92
~ShaderReferenceEffect() override
BSTArray< ModelDBHandle > modelHandles
Definition: ShaderReferenceEffect.h:77
NiAVObject * GetAttachRoot() override
const NiRTTI * GetRTTI() const override
NiPointer< NiSourceTexture > particleShaderTexture
Definition: ShaderReferenceEffect.h:82
NiPointer< NiSourceTexture > holesTexture
Definition: ShaderReferenceEffect.h:85
void FinishLoadGame(BGSLoadGameBuffer *a_buf) override
std::uint32_t pad0CC
Definition: ShaderReferenceEffect.h:81
NiAVObject * Get3D() const override
static constexpr auto RTTI
Definition: ShaderReferenceEffect.h:23
BSTArray< TextureRequest > textureRequests
Definition: ShaderReferenceEffect.h:75
bool IsInterfaceEffect() const override
void Resume() override
void SaveGame(BGSSaveGameBuffer *a_buf) override
bool GetStackable() const override
float addonAlpha
Definition: ShaderReferenceEffect.h:93
NiPointer< NiSourceTexture > paletteTexture
Definition: ShaderReferenceEffect.h:86
TEMP_EFFECT_TYPE GetType() const override
void SetInterfaceEffect(bool a_set) override
TESBoundObject * wornObject
Definition: ShaderReferenceEffect.h:88
NiPointer< NiSourceTexture > particlePaletteTexture
Definition: ShaderReferenceEffect.h:83
NiPointer< NiSourceTexture > fillTexture
Definition: ShaderReferenceEffect.h:84
BSTArray< void * > unk0A8
Definition: ShaderReferenceEffect.h:79
void Suspend() override
BSSoundHandle soundHandle
Definition: ShaderReferenceEffect.h:80
BSTArray< ParticleShader > particleShaders
Definition: ShaderReferenceEffect.h:78
void LoadGame(BGSLoadGameBuffer *a_buf) override
float effectShaderAge
Definition: ShaderReferenceEffect.h:95
static constexpr auto Ni_RTTI
Definition: ShaderReferenceEffect.h:24
void ClearTarget() override
Definition: TESBoundObject.h:26
Definition: TESEffectShader.h:182
Definition: AbsorbEffect.h:6
TEMP_EFFECT_TYPE
Definition: BSTempEffect.h:13
constexpr std::array< REL::ID, 1 > VTABLE_ShaderReferenceEffect
Definition: Offsets_VTABLE.h:12642
constexpr REL::ID RTTI_ShaderReferenceEffect(static_cast< std::uint64_t >(686554))
constexpr REL::ID NiRTTI_ShaderReferenceEffect(static_cast< std::uint64_t >(516712))
Definition: BSSoundHandle.h:10
Definition: ShaderReferenceEffect.h:44
NiPointer< BSParticleShaderObjectEmitter > particleEmitter
Definition: ShaderReferenceEffect.h:46
NiPointer< BSParticleShaderProperty > particleShaderProp
Definition: ShaderReferenceEffect.h:45
Definition: ShaderReferenceEffect.h:37
std::uint64_t unk00
Definition: ShaderReferenceEffect.h:38
NiPointer< NiSourceTexture > unk08
Definition: ShaderReferenceEffect.h:39