CommonLibSSE NG
Loading...
Searching...
No Matches
TESWaterForm.h
Go to the documentation of this file.
1#pragma once
2
3#include "RE/C/Color.h"
4#include "RE/F/FormTypes.h"
5#include "RE/N/NiColor.h"
6#include "RE/N/NiPoint3.h"
9#include "RE/T/TESForm.h"
10#include "RE/T/TESFullName.h"
11#include "RE/T/TESTexture.h"
12
13namespace RE
14{
15 class BSWaterShaderMaterial;
16 class NiTexture;
17
18 struct WaterShaderData // DNAM
19 {
21 {
22 float reflections; // D0
23 float refraction; // D4
24 float normals; // D8
25 float specularLighting; // DC
26 };
27 static_assert(sizeof(DepthProperties) == 0x10);
28
29 float unk00; // 00
30 float unk04; // 04
31 float unk08; // 08
32 float unk0C; // 0C
33 float sunSpecularPower; // 10
34 float reflectionAmount; // 14
35 float fresnelAmount; // 18
36 std::uint32_t unk1C; // 1C
42 std::uint32_t unk34; // 34
43 float unk38; // 38
44 float unk3C; // 3C
45 float unk40; // 40
46 float unk44; // 44
47 float displacementSize; // 48
48 float displacementForce; // 4C
52 float unk5C; // 5C
53 float noiseFalloff; // 60
54 float noiseWindDirectionA[3]; // 64
55 float noiseWindSpeedA[3]; // 70
56 float unk7C; // 7C
57 float unk80; // 80
59 float unk88; // 88
64 float specularPower; // 9C
65 float unkA0; // A0
66 float specularRadius; // A4
67 float specularBrightness; // A8
68 float uvScaleA[3]; // AC
69 float amplitudeA[3]; // B8
74 float sunSparklePower; // E0
75 float flowmapScale; // E4
76 };
77 static_assert(sizeof(WaterShaderData) == 0xE8);
78
80 public TESForm, // 000
81 public TESFullName, // 020
82 public TESAttackDamageForm // 030
83 {
84 public:
85 inline static constexpr auto RTTI = RTTI_TESWaterForm;
86 inline static constexpr auto VTABLE = VTABLE_TESWaterForm;
87 inline static constexpr auto FORMTYPE = FormType::Water;
88
89 enum class Flag // FNAM
90 {
91 kNone = 0,
92 kCauseDamage = 1 << 0,
93 kEnableFlowmap = 1 << 3,
94 kBlendNormals = 1 << 4
95 };
96
98 {
99 enum RecordFlag : std::uint32_t
100 {
101 kDeleted = 1 << 5,
102 kIgnored = 1 << 12
103 };
104 };
105
106 ~TESWaterForm() override; // 00
107
108 // override (TESForm)
109 void InitializeData() override; // 04
110 bool Load(TESFile* a_mod) override; // 06
111 void InitItemImpl() override; // 13
112 bool GetDangerous() const override; // 1B - { return flags & 1; }
113 bool Activate(TESObjectREFR* a_targetRef, TESObjectREFR* a_activatorRef, std::uint8_t a_arg3, TESBoundObject* a_object, std::int32_t a_targetCount) override; // 37
114
115 // members
116 bool needUpdate; // 040
117 std::uint8_t pad41; // 041
118 std::uint16_t pad42; // 042
120 std::uint32_t pad074; // 074
121 TESTexture noiseTextures[4]; // 078 - NAM2 - NAM5
122 std::int8_t alpha; // 0B8 - ANAM
124 std::uint16_t pad0BA; // 0BA
125 std::uint32_t pad0BC; // 0BC
128 WaterShaderData data; // 0D0 - DNAM
130 std::int32_t currentTextureSelect[2]; // 1D0
131 std::uint32_t frequencyX; // 1D8
132 std::uint32_t frequencyY; // 1DC
133 std::int32_t octaves; // 1E0
134 float amplitude; // 1E4
135 float lacunarity; // 1E8
136 float bias; // 1EC
137 float gain; // 1F0
138 std::uint32_t pad1F4; // 1F4
139 SpellItem* contactSpell; // 1F8 - XNAM
145 std::uint8_t pad239; // 239
146 std::uint16_t pad23A; // 23A
147 std::uint32_t pad23C; // 23C
148 TESImageSpace* imageSpace; // 240 - INAM
151 };
152 static_assert(sizeof(TESWaterForm) == 0x260);
153}
Definition BGSMaterialType.h:12
Definition BGSSoundDescriptorForm.h:14
Definition BSWaterShaderMaterial.h:13
Definition NiColor.h:276
Definition NiPoint3.h:6
Definition NiSmartPointer.h:9
Definition SpellItem.h:16
Definition TESAttackDamageForm.h:8
Definition TESBoundObject.h:24
Definition TESFile.h:15
Definition TESForm.h:35
Definition TESFullName.h:9
Definition TESImageSpace.h:10
Definition TESObjectACTI.h:22
Definition TESObjectREFR.h:112
Definition TESTexture.h:10
Definition TESWaterForm.h:83
BGSMaterialType * materialType
Definition TESWaterForm.h:126
bool GetDangerous() const override
std::int32_t currentTextureSelect[2]
Definition TESWaterForm.h:130
std::uint32_t pad23C
Definition TESWaterForm.h:147
NiPointer< NiTexture > noiseTextureData[4]
Definition TESWaterForm.h:140
std::uint16_t pad0BA
Definition TESWaterForm.h:124
std::int32_t octaves
Definition TESWaterForm.h:133
std::int8_t alpha
Definition TESWaterForm.h:122
Flag
Definition TESWaterForm.h:90
SpellItem * contactSpell
Definition TESWaterForm.h:139
std::uint32_t pad1F4
Definition TESWaterForm.h:138
static constexpr auto RTTI
Definition TESWaterForm.h:85
float amplitude
Definition TESWaterForm.h:134
TESImageSpace * imageSpace
Definition TESWaterForm.h:148
static constexpr auto FORMTYPE
Definition TESWaterForm.h:87
TESTexture noiseTextures[4]
Definition TESWaterForm.h:121
stl::enumeration< Flag, std::uint8_t > flags
Definition TESWaterForm.h:123
bool Activate(TESObjectREFR *a_targetRef, TESObjectREFR *a_activatorRef, std::uint8_t a_arg3, TESBoundObject *a_object, std::int32_t a_targetCount) override
std::uint8_t pad41
Definition TESWaterForm.h:117
WaterShaderData data
Definition TESWaterForm.h:128
float bias
Definition TESWaterForm.h:136
NiColorA texScroll[3]
Definition TESWaterForm.h:119
std::uint32_t frequencyY
Definition TESWaterForm.h:132
float gain
Definition TESWaterForm.h:137
static constexpr auto VTABLE
Definition TESWaterForm.h:86
std::uint32_t pad074
Definition TESWaterForm.h:120
NiPoint3 angularVelocity
Definition TESWaterForm.h:150
bool resetNoiseTextures
Definition TESWaterForm.h:144
BGSSoundDescriptorForm * waterSound
Definition TESWaterForm.h:127
TESObjectACTI * placeableAutoWater
Definition TESWaterForm.h:141
void InitializeData() override
TESWaterForm * waterWeatherControl[3]
Definition TESWaterForm.h:129
NiPoint3 linearVelocity
Definition TESWaterForm.h:149
bool needUpdate
Definition TESWaterForm.h:116
void InitItemImpl() override
~TESWaterForm() override
std::uint16_t pad42
Definition TESWaterForm.h:118
bool Load(TESFile *a_mod) override
std::uint8_t pad239
Definition TESWaterForm.h:145
BSWaterShaderMaterial * waterShaderMaterial
Definition TESWaterForm.h:143
TESObjectACTI * placeableLODWater
Definition TESWaterForm.h:142
float lacunarity
Definition TESWaterForm.h:135
std::uint32_t pad0BC
Definition TESWaterForm.h:125
std::uint16_t pad23A
Definition TESWaterForm.h:146
std::uint32_t frequencyX
Definition TESWaterForm.h:131
Definition PCH.h:223
Definition AbsorbEffect.h:6
constexpr REL::VariantID RTTI_TESWaterForm(513896, 392434, 0x1ed9638)
constexpr std::array< REL::VariantID, 3 > VTABLE_TESWaterForm
Definition Offsets_VTABLE.h:683
Definition Color.h:8
Definition TESWaterForm.h:98
RecordFlag
Definition TESWaterForm.h:100
@ kDeleted
Definition TESWaterForm.h:101
@ kIgnored
Definition TESWaterForm.h:102
Definition TESWaterForm.h:21
float refraction
Definition TESWaterForm.h:23
float normals
Definition TESWaterForm.h:24
float specularLighting
Definition TESWaterForm.h:25
float reflections
Definition TESWaterForm.h:22
Definition TESWaterForm.h:19
float flowmapScale
Definition TESWaterForm.h:75
float uvScaleA[3]
Definition TESWaterForm.h:68
float noiseFalloff
Definition TESWaterForm.h:53
Color shallowWaterColor
Definition TESWaterForm.h:39
float displacementForce
Definition TESWaterForm.h:48
float amplitudeA[3]
Definition TESWaterForm.h:69
std::uint32_t unk34
Definition TESWaterForm.h:42
float aboveWaterFogAmount
Definition TESWaterForm.h:58
float unk44
Definition TESWaterForm.h:46
float underwaterFogAmount
Definition TESWaterForm.h:60
float unk38
Definition TESWaterForm.h:43
float fresnelAmount
Definition TESWaterForm.h:35
float unk5C
Definition TESWaterForm.h:52
Color reflectionWaterColor
Definition TESWaterForm.h:41
float unk40
Definition TESWaterForm.h:45
float sunSparklePower
Definition TESWaterForm.h:74
float specularRadius
Definition TESWaterForm.h:66
float unk3C
Definition TESWaterForm.h:44
float refractionMagnitude
Definition TESWaterForm.h:63
float underwaterFogDistNear
Definition TESWaterForm.h:61
float displacementVelocity
Definition TESWaterForm.h:49
float reflectionAmount
Definition TESWaterForm.h:34
float specularBrightness
Definition TESWaterForm.h:67
float unk08
Definition TESWaterForm.h:31
float unkA0
Definition TESWaterForm.h:65
float unk7C
Definition TESWaterForm.h:56
float underwaterFogDistFar
Definition TESWaterForm.h:62
Color deepWaterColor
Definition TESWaterForm.h:40
float unk00
Definition TESWaterForm.h:29
float displacementFalloff
Definition TESWaterForm.h:50
float displacementDampener
Definition TESWaterForm.h:51
float unk80
Definition TESWaterForm.h:57
float specularPower
Definition TESWaterForm.h:64
float unk0C
Definition TESWaterForm.h:32
float sunSparkleMagnitude
Definition TESWaterForm.h:71
float aboveWaterFogDistFar
Definition TESWaterForm.h:38
float aboveWaterFogDistNear
Definition TESWaterForm.h:37
DepthProperties depthProperties
Definition TESWaterForm.h:73
float displacementSize
Definition TESWaterForm.h:47
float sunSpecularMagnitude
Definition TESWaterForm.h:72
float unk88
Definition TESWaterForm.h:59
float reflectionMagnitude
Definition TESWaterForm.h:70
float sunSpecularPower
Definition TESWaterForm.h:33
float noiseWindDirectionA[3]
Definition TESWaterForm.h:54
std::uint32_t unk1C
Definition TESWaterForm.h:36
float unk04
Definition TESWaterForm.h:30
float noiseWindSpeedA[3]
Definition TESWaterForm.h:55