CommonLibSSE NG
Sky.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "RE/B/BSPointerHandle.h"
4 #include "RE/B/BSTArray.h"
5 #include "RE/B/BSTList.h"
6 #include "RE/B/BSTextureSet.h"
7 #include "RE/N/NiColor.h"
8 #include "RE/N/NiSmartPointer.h"
10 
11 namespace RE
12 {
13  class Atmosphere;
14  class BGSLightingTemplate;
15  class BSMultiBoundNode;
16  class Clouds;
17  class ImageSpaceModifierInstanceForm;
18  class Moon;
19  class NiNode;
20  class NiTexture;
21  class Precipitation;
22  class ReferenceEffect;
23  class SkySound;
24  class Stars;
25  class Sun;
26  class TESClimate;
27  class TESRegion;
28  class TESWeather;
29 
30  class Sky
31  {
32  public:
33  inline static constexpr auto RTTI = RTTI_Sky;
34 
35  enum class Mode
36  {
37  kNone = 0,
38  kInterior,
40  kFull,
41 
42  kTotal
43  };
44 
45  enum class Flags
46  {
47  kNone = 0,
48  kFastTravel = 1 << 4,
49  kHideSky = 1 << 7,
50  kUpdateSunriseBegin = 1 << 9,
51  kUpdateSunriseEnd = 1 << 10,
52  kUpdateSunsetBegin = 1 << 11,
53  kUpdateSunsetEnd = 1 << 12,
54  kUpdateColorsSunriseBegin = 1 << 13,
55  kUpdateColorsSunsetEnd = 1 << 14,
56  kUpdateWind = 1 << 20,
57  kReleaseWeatherOverride = 1 << 21
58  };
59 
61  {
62  public:
63  };
64 
65  virtual ~Sky(); // 00
66 
67  static Sky* GetSingleton();
68 
69  [[nodiscard]] bool IsRaining() const;
70  [[nodiscard]] bool IsSnowing() const;
71 
72  void SetWeather(TESWeather* a_weather, bool a_override, bool a_accelerate);
73  void ForceWeather(TESWeather* a_weather, bool a_override);
75  void ResetWeather();
76 
77  // members
81  void* auroraDBHandle; // 020
85  float lightingTransition; // 038
92  TESRegion* region; // 068
94  Stars* stars; // 078
95  Sun* sun; // 080
96  Clouds* clouds; // 088
97  Moon* masser; // 090
98  Moon* secunda; // 098
100  NiColor skyColor[17]; // 0A8
101  std::uint32_t unk174; // 174
102  std::uint64_t unk178; // 178
103  NiColor unk180; // 180
104  float windSpeed; // 18C
105  float windAngle; // 190
106  float fogNear; // 194
107  float fogFar; // 198
108  std::uint32_t unk19C; // 19C
109  std::uint32_t unk1A0; // 1A0
110  std::uint32_t unk1A4; // 1A4
111  float fogPower; // 1A8
112  float fogClamp; // 1AC
113  float currentGameHour; // 1B0
114  float lastWeatherUpdate; // 1B4
115  float currentWeatherPct; // 1B8
118  float flash; // 1C8
119  std::uint32_t pad1CC; // 1CC
120  std::time_t flashTime; // 1D0
121  std::uint32_t lastMoonPhaseUpdate; // 1D8
130  float auroraInStart; // 258
131  float auroraIn; // 25C
132  float auroraOutStart; // 260
133  float auroraOut; // 264
140  };
141  static_assert(sizeof(Sky) == 0x2C8);
142 }
Definition: Atmosphere.h:13
Definition: BGSLightingTemplate.h:11
Definition: BSTArray.h:377
Definition: Clouds.h:13
Definition: ImageSpaceModifierInstanceForm.h:10
Definition: Moon.h:12
Definition: NiColor.h:11
Definition: NiSmartPointer.h:9
Definition: Precipitation.h:16
Definition: SkyEffectController.h:8
Definition: Sky.h:31
stl::enumeration< Mode, std::uint32_t > mode
Definition: Sky.h:116
void ReleaseWeatherOverride()
NiColor unk180
Definition: Sky.h:103
void ResetWeather()
float lightingTransition
Definition: Sky.h:85
SkyEffectController effectController
Definition: Sky.h:136
TESClimate * currentClimate
Definition: Sky.h:87
float auroraOut
Definition: Sky.h:133
float lastWeatherUpdate
Definition: Sky.h:114
float fogFar
Definition: Sky.h:107
float fogClamp
Definition: Sky.h:112
TESWeather * currentWeather
Definition: Sky.h:88
NiColor skyColor[17]
Definition: Sky.h:100
ObjectRefHandle currentRoom
Definition: Sky.h:83
void SetWeather(TESWeather *a_weather, bool a_override, bool a_accelerate)
std::uint32_t unk1A4
Definition: Sky.h:110
NiPointer< NiNode > moonsRoot
Definition: Sky.h:79
ObjectRefHandle previousRoom
Definition: Sky.h:84
Mode
Definition: Sky.h:36
Flags
Definition: Sky.h:46
NiPointer< ReferenceEffect > lastReferenceEffect
Definition: Sky.h:135
NiColor ambientSpecularTint
Definition: Sky.h:128
BSTArray< NiPointer< NiTexture > > storedCloudTextures
Definition: Sky.h:137
std::uint32_t unk1A0
Definition: Sky.h:109
float ambientSpecularFresnel
Definition: Sky.h:129
static Sky * GetSingleton()
void * auroraDBHandle
Definition: Sky.h:81
float auroraIn
Definition: Sky.h:131
std::uint32_t pad1CC
Definition: Sky.h:119
TESRegion * region
Definition: Sky.h:92
ImageSpaceModifierInstanceForm * lastWeatherImageSpaceMod
Definition: Sky.h:125
void ForceWeather(TESWeather *a_weather, bool a_override)
NiPointer< BSMultiBoundNode > root
Definition: Sky.h:78
bool IsSnowing() const
std::uint32_t unk19C
Definition: Sky.h:108
Precipitation * precip
Definition: Sky.h:99
Atmosphere * atmosphere
Definition: Sky.h:93
float flash
Definition: Sky.h:118
std::uint32_t unk174
Definition: Sky.h:101
float auroraOutStart
Definition: Sky.h:132
float auroraInStart
Definition: Sky.h:130
float windSpeed
Definition: Sky.h:104
BSTArray< SkyStaticRefData > skyStaticRefData
Definition: Sky.h:139
std::time_t flashTime
Definition: Sky.h:120
Sun * sun
Definition: Sky.h:95
TESWeather * defaultWeather
Definition: Sky.h:90
BSTArray< NiPointer< NiTexture > > storedWorldMapCloudTextures
Definition: Sky.h:138
ImageSpaceModifierInstanceForm * currentWeatherImageSpaceMod
Definition: Sky.h:123
std::uint32_t lastMoonPhaseUpdate
Definition: Sky.h:121
NiColor directionalAmbientColors[3][2]
Definition: Sky.h:127
ImageSpaceModifierInstanceForm * currentWeatherImageSpaceMod2
Definition: Sky.h:124
std::uint64_t unk178
Definition: Sky.h:102
float fogPower
Definition: Sky.h:111
float currentGameHour
Definition: Sky.h:113
bool IsRaining() const
NiPointer< NiNode > auroraRoot
Definition: Sky.h:80
float windAngle
Definition: Sky.h:105
float currentWeatherPct
Definition: Sky.h:115
float fogNear
Definition: Sky.h:106
TESWeather * lastWeather
Definition: Sky.h:89
virtual ~Sky()
Moon * secunda
Definition: Sky.h:98
BGSLightingTemplate * extLightingOverride
Definition: Sky.h:82
Moon * masser
Definition: Sky.h:97
stl::enumeration< Flags, std::uint32_t > flags
Definition: Sky.h:122
ImageSpaceModifierInstanceForm * lastWeatherImageSpaceMod2
Definition: Sky.h:126
NiPointer< ReferenceEffect > currentReferenceEffect
Definition: Sky.h:134
Clouds * clouds
Definition: Sky.h:96
static constexpr auto RTTI
Definition: Sky.h:33
BSSimpleList< SkySound * > * skySoundList
Definition: Sky.h:117
TESWeather * overrideWeather
Definition: Sky.h:91
Stars * stars
Definition: Sky.h:94
float lightingTransitionTimer
Definition: Sky.h:86
Definition: Stars.h:11
Definition: Sun.h:14
Definition: TESClimate.h:13
Definition: TESRegion.h:53
Definition: TESWeather.h:17
Definition: AbsorbEffect.h:6
constexpr REL::VariantID RTTI_Sky(685534, 393319, 0x1ee7560)
Definition: Sky.h:61