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 #include "REX/W32/BASE.h"
8 
9 namespace RE
10 {
11  class NiNode;
12  class NiCamera;
13  class Scenegraph;
14  class ScrapHeap;
15  struct BSGamerProfileEvent;
16  struct BSPackedTask;
17  struct PositionPlayerEvent;
18 
20  {
21  public:
22  using UnpackFunc_t = void(const BSPackedTask*);
23 
24  struct Semaphore
25  {
26  public:
27  // members
28  void* handle; // 00
29  std::uint32_t size; // 08
30  std::uint32_t capacity; // 0C
31  };
32  static_assert(sizeof(Semaphore) == 0x10);
33 
34  // members
36  mutable Semaphore semaphore; // 28
38  };
39  static_assert(sizeof(BSPackedTaskQueue) == 0x40);
40 
42  {
43  public:
44  // members
45  std::uint32_t size; // 00
46  std::uint32_t width; // 04
47  std::uint32_t height; // 08
48  std::uint32_t pad0C; // 0C
49  char* buffer; // 10
50  };
51  static_assert(sizeof(BSSaveDataSystemUtilityImage) == 0x18);
52 
53  class Main :
54  public BSTEventSink<PositionPlayerEvent>, // 00
55  public BSTEventSink<BSGamerProfileEvent> // 08
56  {
57  public:
58  inline static constexpr auto RTTI = RTTI_Main;
59  inline static constexpr auto VTABLE = VTABLE_Main;
60 
61  ~Main() override; // 00
62 
63  // override (BSTEventSink<PositionPlayerEvent>)
64  BSEventNotifyControl ProcessEvent(const PositionPlayerEvent* a_event, BSTEventSource<PositionPlayerEvent>* a_eventSource) override; // 01 - { return BSEventNotifyControl::kContinue; }
65 
66  // override (BSTEventSink<BSGamerProfileEvent>)
67  BSEventNotifyControl ProcessEvent(const BSGamerProfileEvent* a_event, BSTEventSource<BSGamerProfileEvent>* a_eventSource) override; // 01
68 
69  static Main* GetSingleton();
70 
71  static float QFrameAnimTime();
73  static Scenegraph* WorldRootNode();
74 
75  bool IsRoomVisible(NiNode* a_room);
76  void SetActive(bool a_active);
77 
78  // members
79  bool quitGame; // 010
80  bool resetGame; // 011
81  bool fullReset; // 012
82  bool gameActive; // 013
83  bool onIdle; // 014
84  bool reloadContent; // 015
85  bool freezeTime; // 016
86  bool freezeNextFrame; // 017
89  std::uint32_t threadID; // 028
90  std::uint32_t unk02C; // 02C
91  std::uint64_t unk030; // 030
96  std::uint8_t unk1D8; // 1D8
97  std::uint8_t unk1D9; // 1D9
98  std::uint16_t unk1DA; // 1DA
99  std::uint32_t unk1DC; // 1DC
102  };
103  static_assert(sizeof(Main) == 0x270);
104 }
Definition: BSTEvent.h:143
Definition: Main.h:56
bool quitGame
Definition: Main.h:79
ScrapHeap secondaryPackedTaskHeap
Definition: Main.h:94
bool reloadContent
Definition: Main.h:84
std::uint32_t unk02C
Definition: Main.h:90
static Main * GetSingleton()
bool freezeTime
Definition: Main.h:85
BSPackedTaskQueue taskQueue
Definition: Main.h:93
BSPackedTaskQueue secondaryTaskQueue
Definition: Main.h:95
bool resetGame
Definition: Main.h:80
static constexpr auto VTABLE
Definition: Main.h:59
std::uint32_t threadID
Definition: Main.h:89
bool IsRoomVisible(NiNode *a_room)
std::uint32_t unk1DC
Definition: Main.h:99
static constexpr auto RTTI
Definition: Main.h:58
std::uint8_t unk1D9
Definition: Main.h:97
ScrapHeap packedTaskHeap
Definition: Main.h:92
std::uint64_t unk030
Definition: Main.h:91
static Scenegraph * WorldRootNode()
REX::W32::HWND wnd
Definition: Main.h:87
bool gameActive
Definition: Main.h:82
REX::W32::HINSTANCE instance
Definition: Main.h:88
bool fullReset
Definition: Main.h:81
BSEventNotifyControl ProcessEvent(const BSGamerProfileEvent *a_event, BSTEventSource< BSGamerProfileEvent > *a_eventSource) override
~Main() override
std::uint8_t unk1D8
Definition: Main.h:96
void SetActive(bool a_active)
bool freezeNextFrame
Definition: Main.h:86
static NiCamera * WorldRootCamera()
bool onIdle
Definition: Main.h:83
BSSaveDataSystemUtilityImage saveDataBackgroundImages[3]
Definition: Main.h:100
std::uint16_t unk1DA
Definition: Main.h:98
BSEventNotifyControl ProcessEvent(const PositionPlayerEvent *a_event, BSTEventSource< PositionPlayerEvent > *a_eventSource) override
BSSaveDataSystemUtilityImage saveDataIconImages[3]
Definition: Main.h:101
static float QFrameAnimTime()
Definition: NiCamera.h:11
Definition: NiNode.h:12
Definition: ScrapHeap.h:10
struct HWND__ * HWND
Definition: BASE.h:30
struct HINSTANCE__ * HINSTANCE
Definition: BASE.h:21
Definition: AbsorbEffect.h:6
constexpr std::array< REL::ID, 2 > VTABLE_Main
Definition: Offsets_VTABLE.h:11988
BSEventNotifyControl
Definition: BSTEvent.h:12
constexpr REL::ID RTTI_Main(static_cast< std::uint64_t >(686648))
std::uint32_t size
Definition: Main.h:29
void * handle
Definition: Main.h:28
std::uint32_t capacity
Definition: Main.h:30
Definition: Main.h:20
void(const BSPackedTask *) UnpackFunc_t
Definition: Main.h:22
UnpackFunc_t * unpackFunc
Definition: Main.h:37
BSTCommonScrapHeapMessageQueue< BSPackedTask > queue
Definition: Main.h:32
Semaphore semaphore
Definition: Main.h:36
std::uint32_t pad0C
Definition: Main.h:48
std::uint32_t width
Definition: Main.h:46
char * buffer
Definition: Main.h:49
std::uint32_t size
Definition: Main.h:45
std::uint32_t height
Definition: Main.h:47
Definition: PositionPlayerEvent.h:7