CommonLibSSE (Parapets fork)
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 FORMTYPE = FormType::Water;
87
88 enum class Flag // FNAM
89 {
90 kNone = 0,
91 kCauseDamage = 1 << 0,
92 kEnableFlowmap = 1 << 3,
93 kBlendNormals = 1 << 4
94 };
95
97 {
98 enum RecordFlag : std::uint32_t
99 {
100 kDeleted = 1 << 5,
101 kIgnored = 1 << 12
102 };
103 };
104
105 ~TESWaterForm() override; // 00
106
107 // override (TESForm)
108 void InitializeData() override; // 04
109 bool Load(TESFile* a_mod) override; // 06
110 void InitItemImpl() override; // 13
111 bool GetDangerous() const override; // 1B - { return flags & 1; }
112 bool Activate(TESObjectREFR* a_targetRef, TESObjectREFR* a_activatorRef, std::uint8_t a_arg3, TESBoundObject* a_object, std::int32_t a_targetCount) override; // 37
113
114 // members
115 bool needUpdate; // 040
116 std::uint8_t pad41; // 041
117 std::uint16_t pad42; // 042
119 std::uint32_t pad074; // 074
120 TESTexture noiseTextures[4]; // 078 - NAM2 - NAM5
121 std::int8_t alpha; // 0B8 - ANAM
123 std::uint16_t pad0BA; // 0BA
124 std::uint32_t pad0BC; // 0BC
127 WaterShaderData data; // 0D0 - DNAM
129 std::int32_t currentTextureSelect[2]; // 1D0
130 std::uint32_t frequencyX; // 1D8
131 std::uint32_t frequencyY; // 1DC
132 std::int32_t octaves; // 1E0
133 float amplitude; // 1E4
134 float lacunarity; // 1E8
135 float bias; // 1EC
136 float gain; // 1F0
137 std::uint32_t pad1F4; // 1F4
138 SpellItem* contactSpell; // 1F8 - XNAM
142 BSWaterShaderMaterial* waterShaderMaterial; // 230
144 std::uint8_t pad239; // 239
145 std::uint16_t pad23A; // 23A
146 std::uint32_t pad23C; // 23C
147 TESImageSpace* imageSpace; // 240 - INAM
150 };
151 static_assert(sizeof(TESWaterForm) == 0x260);
152}
Definition: BGSMaterialType.h:11
Definition: BGSSoundDescriptorForm.h:14
Definition: NiColor.h:137
Definition: NiPoint3.h:6
Definition: NiSmartPointer.h:9
Definition: SpellItem.h:16
Definition: TESAttackDamageForm.h:8
Definition: TESBoundObject.h:24
Definition: TESFile.h:14
Definition: TESForm.h:34
Definition: TESFullName.h:9
Definition: TESImageSpace.h:96
Definition: TESObjectACTI.h:22
Definition: TESObjectREFR.h:105
Definition: TESTexture.h:10
Definition: TESWaterForm.h:83
BGSMaterialType * materialType
Definition: TESWaterForm.h:125
bool GetDangerous() const override
std::int32_t currentTextureSelect[2]
Definition: TESWaterForm.h:129
std::uint32_t pad23C
Definition: TESWaterForm.h:146
NiPointer< NiTexture > noiseTextureData[4]
Definition: TESWaterForm.h:139
std::uint16_t pad0BA
Definition: TESWaterForm.h:123
std::int32_t octaves
Definition: TESWaterForm.h:132
std::int8_t alpha
Definition: TESWaterForm.h:121
Flag
Definition: TESWaterForm.h:89
SpellItem * contactSpell
Definition: TESWaterForm.h:138
std::uint32_t pad1F4
Definition: TESWaterForm.h:137
static constexpr auto RTTI
Definition: TESWaterForm.h:85
float amplitude
Definition: TESWaterForm.h:133
TESImageSpace * imageSpace
Definition: TESWaterForm.h:147
static constexpr auto FORMTYPE
Definition: TESWaterForm.h:86
TESTexture noiseTextures[4]
Definition: TESWaterForm.h:120
stl::enumeration< Flag, std::uint8_t > flags
Definition: TESWaterForm.h:122
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:116
WaterShaderData data
Definition: TESWaterForm.h:127
float bias
Definition: TESWaterForm.h:135
NiColorA texScroll[3]
Definition: TESWaterForm.h:118
std::uint32_t frequencyY
Definition: TESWaterForm.h:131
float gain
Definition: TESWaterForm.h:136
std::uint32_t pad074
Definition: TESWaterForm.h:119
NiPoint3 angularVelocity
Definition: TESWaterForm.h:149
bool resetNoiseTextures
Definition: TESWaterForm.h:143
BGSSoundDescriptorForm * waterSound
Definition: TESWaterForm.h:126
TESObjectACTI * placeableAutoWater
Definition: TESWaterForm.h:140
void InitializeData() override
TESWaterForm * waterWeatherControl[3]
Definition: TESWaterForm.h:128
NiPoint3 linearVelocity
Definition: TESWaterForm.h:148
bool needUpdate
Definition: TESWaterForm.h:115
void InitItemImpl() override
~TESWaterForm() override
std::uint16_t pad42
Definition: TESWaterForm.h:117
bool Load(TESFile *a_mod) override
std::uint8_t pad239
Definition: TESWaterForm.h:144
BSWaterShaderMaterial * waterShaderMaterial
Definition: TESWaterForm.h:142
TESObjectACTI * placeableLODWater
Definition: TESWaterForm.h:141
float lacunarity
Definition: TESWaterForm.h:134
std::uint32_t pad0BC
Definition: TESWaterForm.h:124
std::uint16_t pad23A
Definition: TESWaterForm.h:145
std::uint32_t frequencyX
Definition: TESWaterForm.h:130
Definition: PCH.h:216
Definition: AbsorbEffect.h:6
constexpr REL::ID RTTI_TESWaterForm
Definition: Offsets_RTTI.h:6085
Definition: Color.h:6
Definition: TESWaterForm.h:97
RecordFlag
Definition: TESWaterForm.h:99
@ kDeleted
Definition: TESWaterForm.h:100
@ kIgnored
Definition: TESWaterForm.h:101
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