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