CommonLibSSE (powerof3)
TESImageSpaceModifier.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "RE/B/BSString.h"
4 #include "RE/F/FormTypes.h"
6 #include "RE/N/NiPoint2.h"
7 #include "RE/T/TESForm.h"
8 
9 namespace RE
10 {
11  class NiColorInterpolator;
12  class NiFloatInterpolator;
13 
14  struct ImageSpaceModifierData // DNAM
15  {
16  public:
17  template <typename T>
18  struct MultAdd
19  {
20  public:
21  // members
22  T mult;
23  T add;
24  };
25 
26  template <typename T>
27  struct MinMax
28  {
29  public:
30  // members
33  };
34 
35  struct HDR
36  {
37  public:
38  // members
47  };
48  static_assert(sizeof(HDR) == 0x70);
49 
50  struct Bloom
51  {
52  public:
53  // members
55  };
56  static_assert(sizeof(Bloom) == 0x18);
57 
58  struct Cinematic
59  {
60  public:
61  // members
66  };
67  static_assert(sizeof(Cinematic) == 0x20);
68 
69  struct DOF
70  {
71  public:
73 
74  // members
75  std::uint32_t strength; // 00
76  std::uint32_t distance; // 04
77  std::uint32_t range; // 08
78  bool useTarget; // 0C
80  std::uint16_t pad0E; // 0E
81  };
82  static_assert(sizeof(DOF) == 0x10);
83 
84  // members
85  bool animatable; // 00
86  std::uint8_t pad01; // 01
87  std::uint16_t pad02; // 01
88  float duration; // 04
89  HDR hdr; // 08
90  Bloom bloom; // 78
92  std::uint32_t tintColor; // B0
93  std::uint32_t blurRadius; // B4
94  std::uint32_t doubleVisionStrength; // B8
95  std::uint32_t radialBlurStrength; // BC
96  std::uint32_t radialBlurRampUp; // C0
97  std::uint32_t radialBlurStart; // C4
99  std::uint8_t padC9; // C9
100  std::uint16_t padCA; // CA
102  DOF dof; // D4
103  std::uint32_t radialBlurRampDown; // E4
104  std::uint32_t radialBlurDownStart; // E8
105  std::uint32_t fadeColor; // EC
106  std::uint32_t motionBlurStrength; // F0
107  };
108  static_assert(sizeof(ImageSpaceModifierData) == 0xF4);
109 
111  {
112  public:
113  inline static constexpr auto RTTI = RTTI_TESImageSpaceModifier;
114  inline static constexpr auto VTABLE = VTABLE_TESImageSpaceModifier;
115  inline static constexpr auto FORMTYPE = FormType::ImageAdapter;
116 
117  struct RecordFlags
118  {
119  enum RecordFlag : std::uint32_t
120  {
121  kDeleted = 1 << 5,
122  kIgnored = 1 << 12
123  };
124  };
125 
126  template <typename T>
127  struct MultAdd
128  {
129  T mult;
130  T add;
131  };
132 
133  template <typename T>
134  struct MinMax
135  {
138  };
139 
140  struct HDR
141  {
150  };
151  static_assert(sizeof(HDR) == 0xE0);
152 
153  struct Bloom
154  {
156  };
157  static_assert(sizeof(Bloom) == 0x30);
158 
159  struct Cinematic
160  {
165  };
166  static_assert(sizeof(Cinematic) == 0x40);
167 
168  struct RadialBlur
169  {
175  };
176  static_assert(sizeof(RadialBlur) == 0x28);
177 
178  struct DOF
179  {
183  };
184  static_assert(sizeof(DOF) == 0x18);
185 
186  ~TESImageSpaceModifier() override; // 00
187 
188  // override (TESForm)
189  void InitializeData() override; // 04
190  void ClearData() override; // 05
191  bool Load(TESFile* a_mod) override; // 06
192  const char* GetFormEditorID() const override; // 32 - { return formEditorID.c_str(); }
193  bool SetFormEditorID(const char* a_str) override; // 33 - { formEditorID = a_str; }
194 
196  {
197  using func_t = decltype(&TESImageSpaceModifier::TriggerIfNotActive);
198  static REL::Relocation<func_t> func{ RELOCATION_ID(18187, 18572) };
199  return func(this, a_strength, a_target);
200  }
201 
202  // members
204  std::uint32_t pad114; // 114
205  HDR hdr; // 118
206  Bloom bloom; // 1F8
213  DOF dof; // 2B0
215  BSString formEditorID; // 2D0 - EDID
216  };
217  static_assert(sizeof(TESImageSpaceModifier) == 0x2E0);
218 }
#define RELOCATION_ID(SE, AE)
Definition: PCH.h:505
Definition: Relocation.h:210
DepthOfFieldMode
Definition: ImageSpaceModifierInstanceDOF.h:15
Definition: ImageSpaceModifierInstanceForm.h:10
Definition: NiAVObject.h:51
Definition: NiPoint2.h:6
Definition: NiSmartPointer.h:9
Definition: TESFile.h:17
Definition: TESForm.h:36
Definition: TESImageSpaceModifier.h:111
ImageSpaceModifierInstanceForm * TriggerIfNotActive(float a_strength, NiAVObject *a_target)
Definition: TESImageSpaceModifier.h:195
bool SetFormEditorID(const char *a_str) override
NiPointer< NiFloatInterpolator > doubleVisionStrength
Definition: TESImageSpaceModifier.h:209
ImageSpaceModifierData data
Definition: TESImageSpaceModifier.h:203
Cinematic cinematic
Definition: TESImageSpaceModifier.h:207
std::uint32_t pad114
Definition: TESImageSpaceModifier.h:204
bool Load(TESFile *a_mod) override
DOF dof
Definition: TESImageSpaceModifier.h:213
static constexpr auto RTTI
Definition: TESImageSpaceModifier.h:113
NiPointer< NiColorInterpolator > motionBlurStrength
Definition: TESImageSpaceModifier.h:214
~TESImageSpaceModifier() override
static constexpr auto FORMTYPE
Definition: TESImageSpaceModifier.h:115
NiPointer< NiFloatInterpolator > blurRadius
Definition: TESImageSpaceModifier.h:208
NiPointer< NiColorInterpolator > tintColor
Definition: TESImageSpaceModifier.h:210
void ClearData() override
Bloom bloom
Definition: TESImageSpaceModifier.h:206
RadialBlur radialBlur
Definition: TESImageSpaceModifier.h:212
HDR hdr
Definition: TESImageSpaceModifier.h:205
void InitializeData() override
const char * GetFormEditorID() const override
BSString formEditorID
Definition: TESImageSpaceModifier.h:215
static constexpr auto VTABLE
Definition: TESImageSpaceModifier.h:114
NiPointer< NiColorInterpolator > fadeColor
Definition: TESImageSpaceModifier.h:211
Definition: AbsorbEffect.h:6
constexpr std::array< REL::ID, 1 > VTABLE_TESImageSpaceModifier
Definition: Offsets_VTABLE.h:12838
constexpr REL::ID RTTI_TESImageSpaceModifier(static_cast< std::uint64_t >(513871))
Definition: TESImageSpaceModifier.h:51
MultAdd< float > empty[3]
Definition: TESImageSpaceModifier.h:54
Definition: TESImageSpaceModifier.h:59
MultAdd< float > saturation
Definition: TESImageSpaceModifier.h:62
MultAdd< float > empty
Definition: TESImageSpaceModifier.h:65
MultAdd< float > brightness
Definition: TESImageSpaceModifier.h:63
MultAdd< float > contrast
Definition: TESImageSpaceModifier.h:64
Definition: TESImageSpaceModifier.h:70
bool useTarget
Definition: TESImageSpaceModifier.h:78
REX::EnumSet< Mode, std::uint8_t > flags
Definition: TESImageSpaceModifier.h:79
std::uint32_t strength
Definition: TESImageSpaceModifier.h:75
std::uint32_t distance
Definition: TESImageSpaceModifier.h:76
std::uint16_t pad0E
Definition: TESImageSpaceModifier.h:80
std::uint32_t range
Definition: TESImageSpaceModifier.h:77
Definition: TESImageSpaceModifier.h:36
MultAdd< float > bloomBlurRadius
Definition: TESImageSpaceModifier.h:40
MultAdd< float > skyScale
Definition: TESImageSpaceModifier.h:45
MinMax< float > targetLum
Definition: TESImageSpaceModifier.h:43
MultAdd< float > eyeAdaptSpeed
Definition: TESImageSpaceModifier.h:39
MultAdd< float > sunlightScale
Definition: TESImageSpaceModifier.h:44
MultAdd< float > empty[6]
Definition: TESImageSpaceModifier.h:46
MultAdd< float > bloomThreshold
Definition: TESImageSpaceModifier.h:41
MultAdd< float > bloomScale
Definition: TESImageSpaceModifier.h:42
Definition: TESImageSpaceModifier.h:28
MultAdd< T > min
Definition: TESImageSpaceModifier.h:31
MultAdd< T > max
Definition: TESImageSpaceModifier.h:32
Definition: TESImageSpaceModifier.h:19
T mult
Definition: TESImageSpaceModifier.h:22
T add
Definition: TESImageSpaceModifier.h:23
Definition: TESImageSpaceModifier.h:15
std::uint8_t pad01
Definition: TESImageSpaceModifier.h:86
std::uint32_t blurRadius
Definition: TESImageSpaceModifier.h:93
std::uint32_t tintColor
Definition: TESImageSpaceModifier.h:92
Bloom bloom
Definition: TESImageSpaceModifier.h:90
std::uint32_t radialBlurDownStart
Definition: TESImageSpaceModifier.h:104
DOF dof
Definition: TESImageSpaceModifier.h:102
std::uint32_t motionBlurStrength
Definition: TESImageSpaceModifier.h:106
float duration
Definition: TESImageSpaceModifier.h:88
Cinematic cinematic
Definition: TESImageSpaceModifier.h:91
std::uint16_t padCA
Definition: TESImageSpaceModifier.h:100
std::uint32_t radialBlurRampUp
Definition: TESImageSpaceModifier.h:96
bool animatable
Definition: TESImageSpaceModifier.h:82
std::uint16_t pad02
Definition: TESImageSpaceModifier.h:87
std::uint32_t radialBlurRampDown
Definition: TESImageSpaceModifier.h:103
std::uint32_t fadeColor
Definition: TESImageSpaceModifier.h:105
std::uint32_t radialBlurStart
Definition: TESImageSpaceModifier.h:97
NiPoint2 radialBlurCenter
Definition: TESImageSpaceModifier.h:101
std::uint8_t padC9
Definition: TESImageSpaceModifier.h:99
HDR hdr
Definition: TESImageSpaceModifier.h:89
bool useTargetForRadialBlur
Definition: TESImageSpaceModifier.h:98
std::uint32_t radialBlurStrength
Definition: TESImageSpaceModifier.h:95
std::uint32_t doubleVisionStrength
Definition: TESImageSpaceModifier.h:94
Definition: TESImageSpaceModifier.h:154
MultAdd< NiPointer< NiFloatInterpolator > > empty[3]
Definition: TESImageSpaceModifier.h:155
Definition: TESImageSpaceModifier.h:160
MultAdd< NiPointer< NiFloatInterpolator > > saturation
Definition: TESImageSpaceModifier.h:161
MultAdd< NiPointer< NiFloatInterpolator > > empty
Definition: TESImageSpaceModifier.h:164
MultAdd< NiPointer< NiFloatInterpolator > > brightness
Definition: TESImageSpaceModifier.h:162
MultAdd< NiPointer< NiFloatInterpolator > > contrast
Definition: TESImageSpaceModifier.h:163
Definition: TESImageSpaceModifier.h:179
NiPointer< NiFloatInterpolator > distance
Definition: TESImageSpaceModifier.h:181
NiPointer< NiFloatInterpolator > range
Definition: TESImageSpaceModifier.h:182
NiPointer< NiFloatInterpolator > strength
Definition: TESImageSpaceModifier.h:180
Definition: TESImageSpaceModifier.h:141
MultAdd< NiPointer< NiFloatInterpolator > > sunlightScale
Definition: TESImageSpaceModifier.h:147
MultAdd< NiPointer< NiFloatInterpolator > > skyScale
Definition: TESImageSpaceModifier.h:148
MultAdd< NiPointer< NiFloatInterpolator > > bloomThreshold
Definition: TESImageSpaceModifier.h:144
MultAdd< NiPointer< NiFloatInterpolator > > bloomBlurRadius
Definition: TESImageSpaceModifier.h:143
MinMax< NiPointer< NiFloatInterpolator > > targetLum
Definition: TESImageSpaceModifier.h:146
MultAdd< NiPointer< NiFloatInterpolator > > bloomScale
Definition: TESImageSpaceModifier.h:145
MultAdd< NiPointer< NiFloatInterpolator > > empty[6]
Definition: TESImageSpaceModifier.h:149
MultAdd< NiPointer< NiFloatInterpolator > > eyeAdaptSpeed
Definition: TESImageSpaceModifier.h:142
Definition: TESImageSpaceModifier.h:135
MultAdd< T > max
Definition: TESImageSpaceModifier.h:137
MultAdd< T > min
Definition: TESImageSpaceModifier.h:136
Definition: TESImageSpaceModifier.h:128
T add
Definition: TESImageSpaceModifier.h:130
T mult
Definition: TESImageSpaceModifier.h:129
Definition: TESImageSpaceModifier.h:169
NiPointer< NiFloatInterpolator > start
Definition: TESImageSpaceModifier.h:172
NiPointer< NiFloatInterpolator > rampUp
Definition: TESImageSpaceModifier.h:171
NiPointer< NiFloatInterpolator > rampDown
Definition: TESImageSpaceModifier.h:173
NiPointer< NiFloatInterpolator > downStart
Definition: TESImageSpaceModifier.h:174
NiPointer< NiFloatInterpolator > strength
Definition: TESImageSpaceModifier.h:170
Definition: TESImageSpaceModifier.h:118
RecordFlag
Definition: TESImageSpaceModifier.h:120
@ kIgnored
Definition: TESImageSpaceModifier.h:122
@ kDeleted
Definition: TESImageSpaceModifier.h:121