CommonLibSSE (powerof3)
Main.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "RE/B/BSTEvent.h"
4 #include "RE/B/BSTMessageQueue.h"
5 #include "RE/S/ScrapHeap.h"
6 
7 namespace RE
8 {
9  class ScrapHeap;
10  struct BSGamerProfileEvent;
11  struct BSPackedTask;
12  struct PositionPlayerEvent;
13 
15  {
16  public:
17  using UnpackFunc_t = void(const BSPackedTask*);
18 
19  struct Semaphore
20  {
21  public:
22  // members
23  void* handle; // 00
24  std::uint32_t size; // 08
25  std::uint32_t capacity; // 0C
26  };
27  static_assert(sizeof(Semaphore) == 0x10);
28 
29  // members
31  mutable Semaphore semaphore; // 28
33  };
34  static_assert(sizeof(BSPackedTaskQueue) == 0x40);
35 
37  {
38  public:
39  // members
40  std::uint32_t size; // 00
41  std::uint32_t width; // 04
42  std::uint32_t height; // 08
43  std::uint32_t pad0C; // 0C
44  char* buffer; // 10
45  };
46  static_assert(sizeof(BSSaveDataSystemUtilityImage) == 0x18);
47 
48  class Main :
49  public BSTEventSink<PositionPlayerEvent>, // 00
50  public BSTEventSink<BSGamerProfileEvent> // 08
51  {
52  public:
53  inline static constexpr auto RTTI = RTTI_Main;
54 
55  ~Main() override; // 00
56 
57  // override (BSTEventSink<PositionPlayerEvent>)
58  BSEventNotifyControl ProcessEvent(const PositionPlayerEvent* a_event, BSTEventSource<PositionPlayerEvent>* a_eventSource) override; // 01 - { return BSEventNotifyControl::kContinue; }
59 
60  // override (BSTEventSink<BSGamerProfileEvent>)
61  BSEventNotifyControl ProcessEvent(const BSGamerProfileEvent* a_event, BSTEventSource<BSGamerProfileEvent>* a_eventSource) override; // 01
62 
63  static Main* GetSingleton();
64 
65  static float QFrameAnimTime();
66 
67  // members
68  bool quitGame; // 010
69  bool resetGame; // 011
70  bool fullReset; // 012
71  bool gameActive; // 013
72  bool onIdle; // 014
73  bool reloadContent; // 015
74  bool freezeTime; // 016
75  bool freezeNextFrame; // 017
76  WinAPI::HWND wnd; // 018
78  std::uint32_t threadID; // 028
79  std::uint32_t unk02C; // 02C
80  std::uint64_t unk030; // 030
85  std::uint8_t unk1D8; // 1D8
86  std::uint8_t unk1D9; // 1D9
87  std::uint16_t unk1DA; // 1DA
88  std::uint32_t unk1DC; // 1DC
91  };
92  static_assert(sizeof(Main) == 0x270);
93 }
Definition: BSTEvent.h:146
Definition: Main.h:51
bool quitGame
Definition: Main.h:68
ScrapHeap secondaryPackedTaskHeap
Definition: Main.h:83
bool reloadContent
Definition: Main.h:73
std::uint32_t unk02C
Definition: Main.h:79
static Main * GetSingleton()
bool freezeTime
Definition: Main.h:74
BSPackedTaskQueue taskQueue
Definition: Main.h:82
BSPackedTaskQueue secondaryTaskQueue
Definition: Main.h:84
bool resetGame
Definition: Main.h:69
std::uint32_t threadID
Definition: Main.h:78
WinAPI::HINSTANCE instance
Definition: Main.h:77
std::uint32_t unk1DC
Definition: Main.h:88
static constexpr auto RTTI
Definition: Main.h:53
std::uint8_t unk1D9
Definition: Main.h:86
ScrapHeap packedTaskHeap
Definition: Main.h:81
std::uint64_t unk030
Definition: Main.h:80
bool gameActive
Definition: Main.h:71
WinAPI::HWND wnd
Definition: Main.h:76
bool fullReset
Definition: Main.h:70
BSEventNotifyControl ProcessEvent(const BSGamerProfileEvent *a_event, BSTEventSource< BSGamerProfileEvent > *a_eventSource) override
~Main() override
std::uint8_t unk1D8
Definition: Main.h:85
bool freezeNextFrame
Definition: Main.h:75
bool onIdle
Definition: Main.h:72
BSSaveDataSystemUtilityImage saveDataBackgroundImages[3]
Definition: Main.h:89
std::uint16_t unk1DA
Definition: Main.h:87
BSEventNotifyControl ProcessEvent(const PositionPlayerEvent *a_event, BSTEventSource< PositionPlayerEvent > *a_eventSource) override
BSSaveDataSystemUtilityImage saveDataIconImages[3]
Definition: Main.h:90
static float QFrameAnimTime()
Definition: ScrapHeap.h:8
Definition: AbsorbEffect.h:6
constexpr REL::ID RTTI_Main
Definition: Offsets_RTTI.h:5140
BSEventNotifyControl
Definition: BSTEvent.h:12
HWND__ * HWND
Definition: WinAPI.h:37
HINSTANCE__ * HINSTANCE
Definition: WinAPI.h:40
std::uint32_t size
Definition: Main.h:24
void * handle
Definition: Main.h:23
std::uint32_t capacity
Definition: Main.h:25
Definition: Main.h:15
void(const BSPackedTask *) UnpackFunc_t
Definition: Main.h:17
UnpackFunc_t * unpackFunc
Definition: Main.h:32
BSTCommonScrapHeapMessageQueue< BSPackedTask > queue
Definition: Main.h:27
Semaphore semaphore
Definition: Main.h:31
std::uint32_t pad0C
Definition: Main.h:43
std::uint32_t width
Definition: Main.h:41
char * buffer
Definition: Main.h:44
std::uint32_t size
Definition: Main.h:40
std::uint32_t height
Definition: Main.h:42
Definition: PositionPlayerEvent.h:7