CommonLibSSE (Parapets fork)
TESClimate.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "RE/B/BSSimpleList.h"
4 #include "RE/F/FormTypes.h"
5 #include "RE/T/TESForm.h"
6 #include "RE/T/TESModel.h"
7 #include "RE/T/TESTexture.h"
8 #include "RE/W/WeatherType.h"
9 
10 namespace RE
11 {
12  class TESClimate : public TESForm
13  {
14  public:
15  inline static constexpr auto RTTI = RTTI_TESClimate;
16  inline static constexpr auto FORMTYPE = FormType::Climate;
17 
18  struct SkyObjects
19  {
20  enum SkyObject
21  {
24 
25  kTotal
26  };
27  };
29 
30  struct RecordFlags
31  {
32  enum RecordFlag : std::uint32_t
33  {
34  kDeleted = 1 << 5,
35  kIgnored = 1 << 12
36  };
37  };
38 
39  struct Timing
40  {
41  public:
42  enum class MoonPhaseLength
43  {
44  kPhaseLengthMask = 0x3F,
45 
46  kNone = 0,
47  kMasser = 1 << 6,
48  kSecunda = 1 << 7
49  };
50 
51  struct Interval
52  {
53  public:
54  [[nodiscard]] std::tm ConvertInterval(std::uint8_t a_time) const;
55  [[nodiscard]] std::tm GetBeginTime() const;
56  [[nodiscard]] std::tm GetEndTime() const;
57 
58  // members
59  std::uint8_t begin; // 0
60  std::uint8_t end; // 1
61  };
62  static_assert(sizeof(Interval) == 0x2);
63 
64  [[nodiscard]] bool IncludesMasser() const;
65  [[nodiscard]] bool IncludesSecunda() const;
66  [[nodiscard]] std::uint8_t GetPhaseLength() const;
67 
68  // members
71  std::uint8_t volatility; // 4
73  std::uint8_t unk6; // 6
74  std::uint8_t unk7; // 7
75  };
76  static_assert(sizeof(Timing) == 0x8);
77 
78  ~TESClimate() override; // 00
79 
80  // override (TESForm)
81  void InitializeData() override; // 04
82  bool Load(TESFile* a_mod) override; // 06
83 
84  // members
88  Timing timing; // 78 - TNAM
89  };
90  static_assert(sizeof(TESClimate) == 0x80);
91 }
Definition: BSSimpleList.h:10
Definition: TESClimate.h:13
bool Load(TESFile *a_mod) override
static constexpr auto FORMTYPE
Definition: TESClimate.h:16
TESModel nightSky
Definition: TESClimate.h:85
void InitializeData() override
static constexpr auto RTTI
Definition: TESClimate.h:15
Timing timing
Definition: TESClimate.h:88
TESTexture skyObjects[SkyObjects::kTotal]
Definition: TESClimate.h:87
BSSimpleList< WeatherType * > weatherList
Definition: TESClimate.h:86
~TESClimate() override
Definition: TESFile.h:14
Definition: TESForm.h:34
Definition: TESModel.h:16
Definition: TESTexture.h:10
Definition: AbsorbEffect.h:6
constexpr REL::ID RTTI_TESClimate
Definition: Offsets_RTTI.h:5981
Definition: TESClimate.h:31
RecordFlag
Definition: TESClimate.h:33
@ kIgnored
Definition: TESClimate.h:35
@ kDeleted
Definition: TESClimate.h:34
Definition: TESClimate.h:19
SkyObject
Definition: TESClimate.h:21
@ kSunGlare
Definition: TESClimate.h:23
@ kTotal
Definition: TESClimate.h:25
@ kSun
Definition: TESClimate.h:22
Definition: TESClimate.h:52
std::uint8_t end
Definition: TESClimate.h:60
std::tm ConvertInterval(std::uint8_t a_time) const
std::uint8_t begin
Definition: TESClimate.h:59
Definition: TESClimate.h:40
stl::enumeration< MoonPhaseLength, std::uint8_t > moonPhaseLength
Definition: TESClimate.h:72
std::uint8_t unk7
Definition: TESClimate.h:74
std::uint8_t GetPhaseLength() const
bool IncludesMasser() const
std::uint8_t unk6
Definition: TESClimate.h:73
std::uint8_t volatility
Definition: TESClimate.h:71
Interval sunrise
Definition: TESClimate.h:69
bool IncludesSecunda() const
Interval sunset
Definition: TESClimate.h:70
MoonPhaseLength
Definition: TESClimate.h:43