CommonLibSSE (powerof3)
Loading...
Searching...
No Matches
Calendar.h
Go to the documentation of this file.
1#pragma once
2
3#include "RE/B/BSTSingleton.h"
4
5namespace RE
6{
7 class TESGlobal;
8
9 class Calendar : public BSTSingletonSDM<Calendar>
10 {
11 public:
12 static constexpr std::uint8_t DAYS_IN_MONTH[] = {
13 31, // Morning Star
14 28, // Sun's Dawn
15 31, // First Seed
16 30, // Rain's Hand
17 31, // Second Seed
18 30, // Midyear
19 31, // Sun's Height
20 31, // Last Seed
21 30, // Hearthfire
22 31, // Frostfall
23 30, // Sun's Dusk
24 31 // Evening Star
25 };
26
41 using Day = Days::Day;
42
63
65
66 [[nodiscard]] float GetCurrentGameTime() const;
67 [[nodiscard]] float GetDay() const;
68 [[nodiscard]] std::string GetDayName() const;
69 [[nodiscard]] std::uint32_t GetDayOfWeek() const;
70 [[nodiscard]] float GetDaysPassed() const;
71 void GetTimeDateString(char* a_dest, std::uint32_t a_max, bool a_showYear) const;
72 [[nodiscard]] float GetHour() const;
73 [[nodiscard]] float GetHoursPassed() const;
74 [[nodiscard]] static float GetHoursPerDay();
75 [[nodiscard]] std::uint32_t GetMinutes() const;
76 [[nodiscard]] std::uint32_t GetMonth() const;
77 [[nodiscard]] std::string GetMonthName() const;
78 [[nodiscard]] std::string GetOrdinalSuffix() const;
79 [[nodiscard]] std::tm GetTime() const;
80 [[nodiscard]] float GetTimescale() const;
81 [[nodiscard]] std::uint32_t GetYear() const;
82
83 // members
84 std::uint8_t pad01; // 01
85 std::uint16_t pad02; // 02
86 std::uint32_t pad04; // 04
93 std::uint32_t midnightsPassed; // 38
94 float rawDaysPassed; // 3C
95 };
96 static_assert(sizeof(Calendar) == 0x40);
97}
Definition Calendar.h:10
std::uint32_t GetYear() const
std::string GetDayName() const
std::uint32_t GetMonth() const
float GetHour() const
TESGlobal * gameYear
Definition Calendar.h:87
TESGlobal * gameDay
Definition Calendar.h:89
void GetTimeDateString(char *a_dest, std::uint32_t a_max, bool a_showYear) const
static float GetHoursPerDay()
std::uint32_t GetMinutes() const
float GetHoursPassed() const
float rawDaysPassed
Definition Calendar.h:94
static constexpr std::uint8_t DAYS_IN_MONTH[]
Definition Calendar.h:12
TESGlobal * timeScale
Definition Calendar.h:92
float GetDaysPassed() const
std::string GetOrdinalSuffix() const
std::tm GetTime() const
TESGlobal * gameDaysPassed
Definition Calendar.h:91
float GetDay() const
TESGlobal * gameMonth
Definition Calendar.h:88
std::uint32_t GetDayOfWeek() const
float GetCurrentGameTime() const
float GetTimescale() const
std::uint32_t pad04
Definition Calendar.h:86
std::uint16_t pad02
Definition Calendar.h:85
std::uint32_t midnightsPassed
Definition Calendar.h:93
std::uint8_t pad01
Definition Calendar.h:84
TESGlobal * gameHour
Definition Calendar.h:90
static Calendar * GetSingleton()
std::string GetMonthName() const
Definition TESGlobal.h:10
Definition AbsorbEffect.h:6
Definition BSTSingleton.h:50
Definition Calendar.h:28
Day
Definition Calendar.h:30
@ kMiddas
Definition Calendar.h:34
@ kLoredas
Definition Calendar.h:37
@ kMorndas
Definition Calendar.h:32
@ kSundas
Definition Calendar.h:31
@ kFredas
Definition Calendar.h:36
@ kTurdas
Definition Calendar.h:35
@ kTirdas
Definition Calendar.h:33
@ kTotal
Definition Calendar.h:38
Definition Calendar.h:44
Month
Definition Calendar.h:46
@ kTotal
Definition Calendar.h:59
@ kMidyear
Definition Calendar.h:52
@ kMorningStar
Definition Calendar.h:47
@ kRainsHand
Definition Calendar.h:50
@ kLastSeed
Definition Calendar.h:54
@ kSecondSeed
Definition Calendar.h:51
@ kFirstSeed
Definition Calendar.h:49
@ kSunsDawn
Definition Calendar.h:48
@ kSunsHeight
Definition Calendar.h:53
@ kHearthfire
Definition Calendar.h:55
@ kEveningStar
Definition Calendar.h:58
@ kSunsDusk
Definition Calendar.h:57
@ kFrostfall
Definition Calendar.h:56