CommonLibSSE (powerof3)
TESWeather.h
Go to the documentation of this file.
1 #pragma once
2 
4 #include "RE/B/BSTArray.h"
5 #include "RE/B/BSTList.h"
6 #include "RE/C/Color.h"
7 #include "RE/F/FormTypes.h"
8 #include "RE/T/TESForm.h"
9 #include "RE/T/TESModel.h"
10 #include "RE/T/TESTexture1024.h"
11 
12 namespace RE
13 {
14  class BGSVolumetricLighting;
15 
16  class TESWeather : public TESForm
17  {
18  public:
19  inline static constexpr auto RTTI = RTTI_TESWeather;
20  inline static constexpr auto FORMTYPE = FormType::Weather;
21 
22  enum
23  {
24  kTotalLayers = 32
25  };
26 
27  enum class SoundType
28  {
29  kDefault = 0,
30  kPrecip = 1,
31  kWind = 2,
32  kThunder = 3
33  };
34 
35  enum class WeatherDataFlag
36  {
37  kNone = 0,
38  kPleasant = 1 << 0,
39  kCloudy = 1 << 1,
40  kRainy = 1 << 2,
41  kSnow = 1 << 3,
42  kPermAurora = 1 << 4,
43  kAuroraFollowsSun = 1 << 5
44  };
45 
46  struct ColorTimes
47  {
48  enum ColorTime : std::uint32_t
49  {
50  kSunrise = 0,
54 
55  kTotal
56  };
57  };
59 
60  struct ColorTypes
61  {
62  enum
63  {
64  kSkyUpper = 0,
81 
82  kTotal
83  };
84  };
85 
86  struct RecordFlags
87  {
88  enum RecordFlag : std::uint32_t
89  {
90  kDeleted = 1 << 5,
91  kIgnored = 1 << 12
92  };
93  };
94 
95  struct Data // DATA
96  {
97  public:
98  struct Color3
99  {
100  public:
101  // members
102  std::int8_t red; // 0
103  std::int8_t green; // 1
104  std::int8_t blue; // 2
105  };
106  static_assert(sizeof(Color3) == 0x3);
107 
108  // members
109  std::int8_t windSpeed; // 00
110  std::int8_t unk01; // 01
111  std::int8_t unk02; // 02
112  std::int8_t transDelta; // 03
113  std::int8_t sunGlare; // 04
114  std::int8_t sunDamage; // 05
115  std::int8_t precipitationBeginFadeIn; // 06
116  std::int8_t precipitationEndFadeOut; // 07
117  std::int8_t thunderLightningBeginFadeIn; // 08
118  std::int8_t thunderLightningEndFadeOut; // 09
119  std::int8_t thunderLightningFrequency; // 0A
122  std::int8_t visualEffectBegin; // 0F
123  std::int8_t visualEffectEnd; // 10
124  std::int8_t windDirection; // 11
125  std::int8_t windDirectionRange; // 12
126  std::int8_t unk13; // 13
127  };
128  static_assert(sizeof(Data) == 0x14);
129 
130  struct FogData // FNAM
131  {
132  public:
133  // members
134  float dayNear; // 00
135  float dayFar; // 04
136  float nightNear; // 08
137  float nightFar; // 0C
138  float dayPower; // 10
139  float nightPower; // 14
140  float dayMax; // 18
141  float nightMax; // 1C
142  };
143  static_assert(sizeof(FogData) == 0x20);
144 
145  struct WeatherSound // SNAM
146  {
147  public:
148  // members
151  };
152  static_assert(sizeof(WeatherSound) == 0x8);
153 
154  struct WeatherSoundList : public BSSimpleList<WeatherSound*>
155  {};
156 
157  ~TESWeather() override; // 00
158 
159  // override (TESForm)
160  void InitializeData() override; // 04
161  void ClearData() override; // 05
162  bool Load(TESFile* a_mod) override; // 06
163  void InitItemImpl() override; // 13
164 
165  // members
167  std::int8_t cloudLayerSpeedY[kTotalLayers]; // 220 - RNAM
168  std::int8_t cloudLayerSpeedX[kTotalLayers]; // 240 - QNAM
169  Color cloudColorData[kTotalLayers][ColorTime::kTotal]; // 260 - PNAM
170  float cloudAlpha[kTotalLayers][ColorTime::kTotal]; // 460 - JNAM
171  std::uint32_t cloudLayerDisabledBits; // 660 - NAM1 - bitfield
172  Data data; // 664 - DATA
173  FogData fogData; // 678 - FNAM
174  Color colorData[ColorTypes::kTotal][ColorTime::kTotal]; // 698 - NAM0
177  std::uint32_t numCloudLayers; // 7D0 - LNAM
178  std::uint32_t pad7D4; // 7D4
179  TESImageSpace* imageSpaces[ColorTime::kTotal]; // 7D8 - IMSP
181  TESModel aurora; // 878
183  BGSVolumetricLighting* volumetricLighting[ColorTime::kTotal]; // 8A8 - HNAM
186  };
187  static_assert(sizeof(TESWeather) == 0x8D8);
188 }
Definition: BGSDirectionalAmbientLightingColors.h:8
Definition: BGSLensFlare.h:12
Definition: BGSReferenceEffect.h:9
Definition: BGSShaderParticleGeometryData.h:18
Definition: BGSVolumetricLighting.h:12
Definition: BSTList.h:10
Definition: BSTArray.h:377
Definition: TESFile.h:14
Definition: TESForm.h:34
Definition: TESImageSpace.h:96
Definition: TESModel.h:16
Definition: TESTexture1024.h:8
Definition: TESWeather.h:17
WeatherDataFlag
Definition: TESWeather.h:36
BGSDirectionalAmbientLightingColors directionalAmbientLightingColors[ColorTime::kTotal]
Definition: TESWeather.h:180
BGSShaderParticleGeometryData * precipitationData
Definition: TESWeather.h:184
~TESWeather() override
BGSReferenceEffect * referenceEffect
Definition: TESWeather.h:185
std::int8_t cloudLayerSpeedY[kTotalLayers]
Definition: TESWeather.h:167
void InitItemImpl() override
static constexpr auto FORMTYPE
Definition: TESWeather.h:20
bool Load(TESFile *a_mod) override
TESImageSpace * imageSpaces[ColorTime::kTotal]
Definition: TESWeather.h:179
std::uint32_t pad7D4
Definition: TESWeather.h:178
std::uint32_t numCloudLayers
Definition: TESWeather.h:177
std::int8_t cloudLayerSpeedX[kTotalLayers]
Definition: TESWeather.h:168
WeatherSoundList sounds
Definition: TESWeather.h:175
FogData fogData
Definition: TESWeather.h:173
void InitializeData() override
SoundType
Definition: TESWeather.h:28
static constexpr auto RTTI
Definition: TESWeather.h:19
Color colorData[ColorTypes::kTotal][ColorTime::kTotal]
Definition: TESWeather.h:174
BGSLensFlare * sunGlareLensFlare
Definition: TESWeather.h:182
TESModel aurora
Definition: TESWeather.h:181
Data data
Definition: TESWeather.h:172
@ kTotalLayers
Definition: TESWeather.h:24
BSTArray< TESObjectSTAT * > skyStatics
Definition: TESWeather.h:176
void ClearData() override
float cloudAlpha[kTotalLayers][ColorTime::kTotal]
Definition: TESWeather.h:170
TESTexture1024 cloudTextures[kTotalLayers]
Definition: TESWeather.h:166
std::uint32_t cloudLayerDisabledBits
Definition: TESWeather.h:171
Color cloudColorData[kTotalLayers][ColorTime::kTotal]
Definition: TESWeather.h:169
BGSVolumetricLighting * volumetricLighting[ColorTime::kTotal]
Definition: TESWeather.h:183
Definition: AbsorbEffect.h:6
std::uint32_t FormID
Definition: BSCoreTypes.h:5
constexpr REL::ID RTTI_TESWeather
Definition: Offsets_RTTI.h:6089
Definition: Color.h:6
Definition: TESWeather.h:47
ColorTime
Definition: TESWeather.h:49
@ kTotal
Definition: TESWeather.h:55
@ kDay
Definition: TESWeather.h:51
@ kSunrise
Definition: TESWeather.h:50
@ kNight
Definition: TESWeather.h:53
@ kSunset
Definition: TESWeather.h:52
Definition: TESWeather.h:61
@ kMoonGlare
Definition: TESWeather.h:80
@ kUnknown
Definition: TESWeather.h:66
@ kHorizon
Definition: TESWeather.h:72
@ kSkyStatics
Definition: TESWeather.h:77
@ kFogNear
Definition: TESWeather.h:65
@ kSunGlare
Definition: TESWeather.h:79
@ kStars
Definition: TESWeather.h:70
@ kEffectLighting
Definition: TESWeather.h:73
@ kSunlight
Definition: TESWeather.h:68
@ kSkyLower
Definition: TESWeather.h:71
@ kFogFar
Definition: TESWeather.h:76
@ kCloudLODDiffuse
Definition: TESWeather.h:74
@ kSun
Definition: TESWeather.h:69
@ kCloudLODAmbient
Definition: TESWeather.h:75
@ kWaterMultiplier
Definition: TESWeather.h:78
@ kAmbient
Definition: TESWeather.h:67
@ kTotal
Definition: TESWeather.h:82
@ kSkyUpper
Definition: TESWeather.h:64
Definition: TESWeather.h:99
std::int8_t red
Definition: TESWeather.h:102
std::int8_t blue
Definition: TESWeather.h:104
std::int8_t green
Definition: TESWeather.h:103
Definition: TESWeather.h:96
std::int8_t thunderLightningEndFadeOut
Definition: TESWeather.h:118
std::int8_t thunderLightningFrequency
Definition: TESWeather.h:119
std::int8_t windSpeed
Definition: TESWeather.h:106
std::int8_t sunGlare
Definition: TESWeather.h:113
std::int8_t unk13
Definition: TESWeather.h:126
std::int8_t unk01
Definition: TESWeather.h:110
Color3 lightningColor
Definition: TESWeather.h:121
std::int8_t sunDamage
Definition: TESWeather.h:114
std::int8_t precipitationBeginFadeIn
Definition: TESWeather.h:115
std::int8_t windDirectionRange
Definition: TESWeather.h:125
stl::enumeration< WeatherDataFlag, std::uint8_t > flags
Definition: TESWeather.h:120
std::int8_t visualEffectEnd
Definition: TESWeather.h:123
std::int8_t transDelta
Definition: TESWeather.h:112
std::int8_t windDirection
Definition: TESWeather.h:124
std::int8_t unk02
Definition: TESWeather.h:111
std::int8_t precipitationEndFadeOut
Definition: TESWeather.h:116
std::int8_t visualEffectBegin
Definition: TESWeather.h:122
std::int8_t thunderLightningBeginFadeIn
Definition: TESWeather.h:117
Definition: TESWeather.h:131
float nightFar
Definition: TESWeather.h:137
float dayFar
Definition: TESWeather.h:135
float nightNear
Definition: TESWeather.h:136
float nightPower
Definition: TESWeather.h:139
float dayPower
Definition: TESWeather.h:138
float dayMax
Definition: TESWeather.h:140
float nightMax
Definition: TESWeather.h:141
float dayNear
Definition: TESWeather.h:134
Definition: TESWeather.h:87
RecordFlag
Definition: TESWeather.h:89
@ kIgnored
Definition: TESWeather.h:91
@ kDeleted
Definition: TESWeather.h:90
Definition: TESWeather.h:155
Definition: TESWeather.h:146
FormID soundFormID
Definition: TESWeather.h:149
stl::enumeration< SoundType, std::uint32_t > type
Definition: TESWeather.h:150