CommonLibVR
Loading...
Searching...
No Matches
Main.h
Go to the documentation of this file.
1#pragma once
2
3#include "RE/B/BSTEvent.h"
5#include "RE/S/ScrapHeap.h"
6
7#include "REX/W32/BASE.h"
8
9namespace 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#ifndef SKYRIMVR
55 public BSTEventSink<PositionPlayerEvent>, // 00
56 public BSTEventSink<BSGamerProfileEvent> // 08
57#else
58 public BSTEventSink<PositionPlayerEvent> // 00
59#endif
60 {
61 public:
62 inline static constexpr auto RTTI = RTTI_Main;
63 inline static constexpr auto VTABLE = VTABLE_Main;
64
65 ~Main() override; // 00
66
67 // override (BSTEventSink<PositionPlayerEvent>)
68 BSEventNotifyControl ProcessEvent(const PositionPlayerEvent* a_event, BSTEventSource<PositionPlayerEvent>* a_eventSource) override; // 01 - { return BSEventNotifyControl::kContinue; }
69
70#ifndef SKYRIMVR
71 // override (BSTEventSink<BSGamerProfileEvent>)
72 BSEventNotifyControl ProcessEvent(const BSGamerProfileEvent* a_event, BSTEventSource<BSGamerProfileEvent>* a_eventSource) override; // 01
73#endif
74 static Main* GetSingleton();
75
76 static float QFrameAnimTime();
78 static Scenegraph* WorldRootNode();
79
80 bool IsRoomVisible(NiNode* a_room);
81 void SetActive(bool a_active);
82
83 // members
84 bool quitGame; // 010 VR 08
85 bool resetGame; // 011 VR 09
86 bool fullReset; // 012 VR 0a
87 bool gameActive; // 013 VR 0b
88 bool onIdle; // 014 VR 0c
89 bool reloadContent; // 015 VR 0d
90 bool freezeTime; // 016 VR 0e
91 bool freezeNextFrame; // 017 VR 0f This continues for all members I assume
94 std::uint32_t threadID; // 028
95 std::uint32_t unk02C; // 02C
96 std::uint64_t unk030; // 030
101 std::uint8_t unk1D8; // 1D8
102 std::uint8_t unk1D9; // 1D9
103 std::uint16_t unk1DA; // 1DA
104 std::uint32_t unk1DC; // 1DC
107 private:
109 };
110#ifndef SKYRIMVR
111 static_assert(sizeof(Main) == 0x270);
112#else
113 static_assert(sizeof(Main) == 0x268);
114#endif
115}
#define KEEP_FOR_RE()
Definition PCH.h:517
Definition BSTMessageQueue.h:52
Definition BSTEvent.h:143
Definition BSTEvent.h:19
Definition Main.h:60
static Scenegraph * WorldRootNode()
bool quitGame
Definition Main.h:84
ScrapHeap secondaryPackedTaskHeap
Definition Main.h:99
static NiCamera * WorldRootCamera()
bool reloadContent
Definition Main.h:89
std::uint32_t unk02C
Definition Main.h:95
bool freezeTime
Definition Main.h:90
BSPackedTaskQueue taskQueue
Definition Main.h:98
BSPackedTaskQueue secondaryTaskQueue
Definition Main.h:100
bool resetGame
Definition Main.h:85
static constexpr auto VTABLE
Definition Main.h:63
std::uint32_t threadID
Definition Main.h:94
bool IsRoomVisible(NiNode *a_room)
std::uint32_t unk1DC
Definition Main.h:104
static constexpr auto RTTI
Definition Main.h:62
std::uint8_t unk1D9
Definition Main.h:102
ScrapHeap packedTaskHeap
Definition Main.h:97
std::uint64_t unk030
Definition Main.h:96
REX::W32::HWND wnd
Definition Main.h:92
bool gameActive
Definition Main.h:87
REX::W32::HINSTANCE instance
Definition Main.h:93
bool fullReset
Definition Main.h:86
BSEventNotifyControl ProcessEvent(const BSGamerProfileEvent *a_event, BSTEventSource< BSGamerProfileEvent > *a_eventSource) override
~Main() override
std::uint8_t unk1D8
Definition Main.h:101
static Main * GetSingleton()
void SetActive(bool a_active)
bool freezeNextFrame
Definition Main.h:91
bool onIdle
Definition Main.h:88
BSSaveDataSystemUtilityImage saveDataBackgroundImages[3]
Definition Main.h:105
std::uint16_t unk1DA
Definition Main.h:103
BSEventNotifyControl ProcessEvent(const PositionPlayerEvent *a_event, BSTEventSource< PositionPlayerEvent > *a_eventSource) override
BSSaveDataSystemUtilityImage saveDataIconImages[3]
Definition Main.h:106
static float QFrameAnimTime()
Definition NiCamera.h:11
Definition NiNode.h:12
Definition ScrapHeap.h:10
HINSTANCE__ * HINSTANCE
Definition BASE.h:21
HWND__ * HWND
Definition BASE.h:30
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:35
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