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