CommonLibSSE NG
BGSSaveLoadManager.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "RE/B/BSAtomic.h"
4 #include "RE/B/BSFixedString.h"
5 #include "RE/B/BSTArray.h"
6 #include "RE/B/BSTEvent.h"
7 #include "RE/B/BSTHashMap.h"
8 #include "RE/B/BSTMessageQueue.h"
9 #include "RE/B/BSTSmartPointer.h"
10 #include "RE/B/BSThread.h"
11 #include "RE/R/RaceSexMenuEvent.h"
12 #include "RE/R/Request.h"
13 
14 namespace RE
15 {
16  class BSSaveDataEvent;
17  class BSSystemEvent;
18  struct BGSSaveLoadManagerEvent;
19 
21  {
22  public:
23  // members
30  std::uint32_t unk30; // 30
31  std::uint32_t unk34; // 34
32  std::uint32_t unk38; // 38
33  std::uint32_t unk3C; // 3C
34  std::uint32_t unk40; // 40
35  std::uint32_t unk44; // 44
36  std::uint64_t unk48; // 48
37  std::uint64_t unk50; // 50
38  std::uint64_t unk58; // 58
39  std::uint64_t unk60; // 60
40  std::uint64_t unk68; // 68
41  std::uint64_t unk70; // 70
42  };
43  static_assert(sizeof(BGSSaveLoadFileEntry) == 0x78);
44 
46  public BSTEventSink<BSSaveDataEvent>, // 000
47  public BSTEventSink<RaceSexMenuEvent::NameChangedEvent>, // 008
48  public BSTEventSource<BGSSaveLoadManagerEvent>, // 018
49  public BSTEventSink<BSSystemEvent> // 010
50  {
51  public:
52  inline static constexpr auto RTTI = RTTI_BGSSaveLoadManager;
53 
54  class Thread : public BSThread
55  {
56  public:
57  inline static constexpr auto RTTI = RTTI_BGSSaveLoadManager__Thread;
58 
59  ~Thread() override; // 00
60 
61  void Unk_01(void) override; // 01
62  void Unk_02(void) override; // 02
63 
64  // members
65  bool isRunnning; // 50
66  bool isBusy; // 51
67  std::uint16_t pad52; // 52
68  std::uint32_t pad54; // 54
71  };
72  static_assert(sizeof(Thread) == 0xC0);
73 
74  ~BGSSaveLoadManager() override; // 00
75 
76  // override (BSTEventSink<BSSaveDataEvent>)
77  BSEventNotifyControl ProcessEvent(const BSSaveDataEvent* a_event, BSTEventSource<BSSaveDataEvent>* a_eventSource) override; // 01
78 
79  // override (BSTEventSink<RaceSexMenuEvent::NameChangedEvent>)
81 
82  // override (BSTEventSink<BSSystemEvent>)
83  BSEventNotifyControl ProcessEvent(const BSSystemEvent* a_event, BSTEventSource<BSSystemEvent>* a_eventSource) override; // 01
84 
86 
87  void Save(const char* a_fileName);
88  void Load(const char* a_fileName);
89  void Load(const char* a_fileName, bool a_checkForMods);
90 
92 
93  // members
95  std::uint64_t unk0A0; // 0A0
96  std::uint32_t unk0A8; // 0A8
97  std::uint32_t unk0AC; // 0AC
98  std::uint32_t unk0B0; // 0B0
99  std::uint32_t unk0B4; // 0B4
100  std::uint64_t unk0B8; // 0B8
101  std::uint64_t unk0C0; // 0C0
102  std::uint64_t unk0C8; // 0C8
103  std::uint64_t currentPlayerID; // 0D0
104  std::uint64_t displayPlayerID; // 0D8
105  std::uint32_t unk0E0; // 0E0
106  std::uint32_t unk0E4; // 0E4
108 
110  std::uint8_t unk118; // 118
111  std::uint8_t unk119; // 119
112  std::uint16_t unk11A; // 11A
113  std::uint32_t unk11C; // 11C
114  std::uint16_t unk120; // 120
115  std::uint16_t unk122; // 122
116  std::uint32_t unk124; // 124
117  std::uint32_t tickCount; // 128
118  std::uint32_t unk12C; // 12C
119  std::uint8_t unk130; // 130
120  std::uint8_t unk131; // 131
121  std::uint16_t unk132; // 132
122  std::uint32_t unk134; // 134
123  std::uint64_t unk138; // 138
124  std::uint64_t unk140; // 140
125  std::uint64_t unk148; // 148
126  std::uint64_t unk150; // 150
127  std::uint64_t unk158; // 158
128  std::uint64_t unk160; // 160
129  std::uint64_t unk168; // 168
130  std::uint64_t unk170; // 170
131  std::uint64_t unk178; // 178
132  std::uint64_t unk180; // 180
133  std::uint64_t unk188; // 188
134  std::uint64_t unk190; // 190
135  std::uint64_t unk198; // 198
136  std::uint64_t unk1A0; // 1A0
137  std::uint64_t unk1A8; // 1A8
138  std::uint64_t unk1B0; // 1B0
139  std::uint64_t unk1B8; // 1B8
140  std::uint64_t unk1C0; // 1C0
141  std::uint64_t unk1C8; // 1C8
142  std::uint64_t unk1D0; // 1D0
143  std::uint64_t unk1D8; // 1D8
144  std::uint64_t unk1E0; // 1E0
145  std::uint64_t unk1E8; // 1E8
146  std::uint64_t unk1F0; // 1F0
147  std::uint64_t unk1F8; // 1F8
148 
149  std::uint64_t unk200; // 200
150  std::uint64_t unk208; // 208
151  std::uint64_t unk210; // 210
152  std::uint64_t unk218; // 218
153  std::uint64_t unk220; // 220
154  std::uint64_t unk228; // 228
155  std::uint64_t unk230; // 230
156  std::uint64_t unk238; // 238
157  std::uint64_t unk240; // 240
158  std::uint64_t unk248; // 248
159  std::uint32_t unk250; // 250
160  std::uint32_t unk254; // 254
161  std::uint64_t unk258; // 258
162  std::uint16_t unk260; // 260
163  std::uint16_t unk262; // 262
164  std::uint32_t unk264; // 264
165  std::uint64_t unk268; // 268
166  std::uint32_t unk270; // 270
167  std::uint32_t unk274; // 274
168  std::uint64_t unk278; // 278
169  std::uint64_t unk280; // 280
170  std::uint32_t unk288; // 288
171  std::uint32_t unk28C; // 28C
172  std::uint64_t unk290; // 290
173  std::uint64_t unk298; // 298
174  std::uint32_t unk2A0; // 2A0
175  std::uint32_t unk2A4; // 2A4
176  std::uint64_t unk2A8; // 2A8
177 #ifdef SKYRIM_SUPPORT_AE
178  std::uint16_t unk2B0; // 2B0
179  std::uint16_t unk2B2; // 2B2
180  std::uint64_t unk2B8; // 2B8
181  BSTArray<void*> unk2C0; // 2C0
182  BSTArray<void*> unk2D8; // 2D8
183  std::uint8_t unk2F0; // 2F0
184 #endif
185  Thread thread; // 2B0
186 
188 
189  protected:
190  bool Save_Impl(std::int32_t a_deviceID, std::uint32_t a_outputStats, const char* a_fileName);
191  bool Load_Impl(const char* a_fileName, std::int32_t a_deviceID, std::uint32_t a_outputStats, bool a_checkForMods);
192  };
193 #ifdef SKYRIM_SUPPORT_AE
194  static_assert(sizeof(BGSSaveLoadManager) == 0x418);
195 #else
196  static_assert(sizeof(BGSSaveLoadManager) == 0x3D0);
197 #endif
198 }
Definition: BGSSaveLoadManager.h:21
BSFixedString playTime
Definition: BGSSaveLoadManager.h:28
std::uint32_t unk34
Definition: BGSSaveLoadManager.h:31
std::uint32_t unk3C
Definition: BGSSaveLoadManager.h:33
std::uint64_t unk60
Definition: BGSSaveLoadManager.h:39
BSFixedString fileName
Definition: BGSSaveLoadManager.h:24
BSFixedString raceName
Definition: BGSSaveLoadManager.h:29
BSFixedString location
Definition: BGSSaveLoadManager.h:27
std::uint32_t unk40
Definition: BGSSaveLoadManager.h:34
std::uint64_t unk58
Definition: BGSSaveLoadManager.h:38
BSFixedString playerName
Definition: BGSSaveLoadManager.h:25
std::uint32_t unk30
Definition: BGSSaveLoadManager.h:30
std::uint32_t unk38
Definition: BGSSaveLoadManager.h:32
std::uint32_t unk44
Definition: BGSSaveLoadManager.h:35
BSFixedString playerTitle
Definition: BGSSaveLoadManager.h:26
std::uint64_t unk48
Definition: BGSSaveLoadManager.h:36
std::uint64_t unk70
Definition: BGSSaveLoadManager.h:41
std::uint64_t unk50
Definition: BGSSaveLoadManager.h:37
std::uint64_t unk68
Definition: BGSSaveLoadManager.h:40
Definition: BGSSaveLoadManager.h:55
void Unk_02(void) override
bool isBusy
Definition: BGSSaveLoadManager.h:66
std::uint32_t pad54
Definition: BGSSaveLoadManager.h:68
void Unk_01(void) override
static constexpr auto RTTI
Definition: BGSSaveLoadManager.h:57
BSTCommonStaticMessageQueue< BSTSmartPointer< bgs::saveload::Request >, 8 > asyncSaveLoadOperationQueue
Definition: BGSSaveLoadManager.h:70
std::uint16_t pad52
Definition: BGSSaveLoadManager.h:67
BSEventFlag haveTask
Definition: BGSSaveLoadManager.h:69
bool isRunnning
Definition: BGSSaveLoadManager.h:65
Definition: BGSSaveLoadManager.h:50
std::uint64_t unk220
Definition: BGSSaveLoadManager.h:153
BSTCommonStaticMessageQueue< BSTSmartPointer< bgs::saveload::Request >, 8 > unk370
Definition: BGSSaveLoadManager.h:187
static BGSSaveLoadManager * GetSingleton()
std::uint64_t unk140
Definition: BGSSaveLoadManager.h:124
std::uint32_t unk2A4
Definition: BGSSaveLoadManager.h:175
std::uint64_t unk1F0
Definition: BGSSaveLoadManager.h:146
static constexpr auto RTTI
Definition: BGSSaveLoadManager.h:52
std::uint64_t unk148
Definition: BGSSaveLoadManager.h:125
std::uint64_t unk278
Definition: BGSSaveLoadManager.h:168
std::uint64_t unk170
Definition: BGSSaveLoadManager.h:130
std::uint64_t unk248
Definition: BGSSaveLoadManager.h:158
std::uint64_t unk1A8
Definition: BGSSaveLoadManager.h:137
std::uint8_t unk118
Definition: BGSSaveLoadManager.h:110
std::uint32_t unk2A0
Definition: BGSSaveLoadManager.h:174
std::uint64_t unk190
Definition: BGSSaveLoadManager.h:134
std::uint32_t unk0B0
Definition: BGSSaveLoadManager.h:98
std::uint32_t unk0E4
Definition: BGSSaveLoadManager.h:106
std::uint64_t unk230
Definition: BGSSaveLoadManager.h:155
BSEventNotifyControl ProcessEvent(const BSSaveDataEvent *a_event, BSTEventSource< BSSaveDataEvent > *a_eventSource) override
std::uint64_t unk1B0
Definition: BGSSaveLoadManager.h:138
std::uint32_t unk250
Definition: BGSSaveLoadManager.h:159
std::uint64_t unk240
Definition: BGSSaveLoadManager.h:157
std::uint64_t unk1C8
Definition: BGSSaveLoadManager.h:141
void Save(const char *a_fileName)
std::uint64_t unk1C0
Definition: BGSSaveLoadManager.h:140
Thread thread
Definition: BGSSaveLoadManager.h:185
BSEventNotifyControl ProcessEvent(const RaceSexMenuEvent::NameChangedEvent *a_event, BSTEventSource< RaceSexMenuEvent::NameChangedEvent > *a_eventSource) override
std::uint16_t unk11A
Definition: BGSSaveLoadManager.h:112
std::uint8_t unk131
Definition: BGSSaveLoadManager.h:120
std::uint64_t unk228
Definition: BGSSaveLoadManager.h:154
std::uint32_t unk270
Definition: BGSSaveLoadManager.h:166
std::uint64_t unk258
Definition: BGSSaveLoadManager.h:161
std::uint64_t unk198
Definition: BGSSaveLoadManager.h:135
std::uint64_t unk1E0
Definition: BGSSaveLoadManager.h:144
std::uint32_t unk12C
Definition: BGSSaveLoadManager.h:118
std::uint16_t unk262
Definition: BGSSaveLoadManager.h:163
std::uint32_t unk0B4
Definition: BGSSaveLoadManager.h:99
std::uint32_t unk254
Definition: BGSSaveLoadManager.h:160
BSEventNotifyControl ProcessEvent(const BSSystemEvent *a_event, BSTEventSource< BSSystemEvent > *a_eventSource) override
bool Load_Impl(const char *a_fileName, std::int32_t a_deviceID, std::uint32_t a_outputStats, bool a_checkForMods)
std::uint32_t unk134
Definition: BGSSaveLoadManager.h:122
std::uint64_t unk0A0
Definition: BGSSaveLoadManager.h:95
std::uint64_t unk2A8
Definition: BGSSaveLoadManager.h:176
std::uint64_t unk280
Definition: BGSSaveLoadManager.h:169
std::uint64_t unk188
Definition: BGSSaveLoadManager.h:133
std::uint16_t unk122
Definition: BGSSaveLoadManager.h:115
std::uint64_t unk290
Definition: BGSSaveLoadManager.h:172
std::uint32_t unk274
Definition: BGSSaveLoadManager.h:167
std::uint64_t unk200
Definition: BGSSaveLoadManager.h:149
void Load(const char *a_fileName, bool a_checkForMods)
BSTArray< void * > unk0E8
Definition: BGSSaveLoadManager.h:107
BSTHashMap< std::uint64_t, BSFixedString > playerIDNameMap
Definition: BGSSaveLoadManager.h:94
std::uint16_t unk132
Definition: BGSSaveLoadManager.h:121
std::uint32_t unk288
Definition: BGSSaveLoadManager.h:170
std::uint32_t unk11C
Definition: BGSSaveLoadManager.h:113
std::uint64_t unk168
Definition: BGSSaveLoadManager.h:129
std::uint8_t unk130
Definition: BGSSaveLoadManager.h:119
std::uint64_t unk0C8
Definition: BGSSaveLoadManager.h:102
std::uint32_t unk0AC
Definition: BGSSaveLoadManager.h:97
std::uint16_t unk260
Definition: BGSSaveLoadManager.h:162
std::uint64_t unk238
Definition: BGSSaveLoadManager.h:156
std::uint32_t unk0E0
Definition: BGSSaveLoadManager.h:105
std::uint64_t unk1E8
Definition: BGSSaveLoadManager.h:145
std::uint64_t unk0B8
Definition: BGSSaveLoadManager.h:100
std::uint64_t unk1D8
Definition: BGSSaveLoadManager.h:143
std::uint64_t unk1A0
Definition: BGSSaveLoadManager.h:136
std::uint64_t displayPlayerID
Definition: BGSSaveLoadManager.h:104
std::uint64_t unk1F8
Definition: BGSSaveLoadManager.h:147
std::uint64_t unk180
Definition: BGSSaveLoadManager.h:132
std::uint64_t unk1D0
Definition: BGSSaveLoadManager.h:142
std::uint64_t unk138
Definition: BGSSaveLoadManager.h:123
std::uint64_t currentPlayerID
Definition: BGSSaveLoadManager.h:103
void Load(const char *a_fileName)
std::uint64_t unk150
Definition: BGSSaveLoadManager.h:126
std::uint8_t unk119
Definition: BGSSaveLoadManager.h:111
std::uint64_t unk178
Definition: BGSSaveLoadManager.h:131
std::uint64_t unk268
Definition: BGSSaveLoadManager.h:165
~BGSSaveLoadManager() override
std::uint64_t unk160
Definition: BGSSaveLoadManager.h:128
std::uint32_t tickCount
Definition: BGSSaveLoadManager.h:117
std::uint32_t unk124
Definition: BGSSaveLoadManager.h:116
std::uint64_t unk298
Definition: BGSSaveLoadManager.h:173
std::uint32_t unk0A8
Definition: BGSSaveLoadManager.h:96
std::uint32_t unk28C
Definition: BGSSaveLoadManager.h:171
std::uint16_t unk120
Definition: BGSSaveLoadManager.h:114
std::uint64_t unk1B8
Definition: BGSSaveLoadManager.h:139
std::uint64_t unk208
Definition: BGSSaveLoadManager.h:150
BSTArray< BGSSaveLoadFileEntry * > saveGameList
Definition: BGSSaveLoadManager.h:109
std::uint64_t unk218
Definition: BGSSaveLoadManager.h:152
std::uint32_t unk264
Definition: BGSSaveLoadManager.h:164
std::uint64_t unk210
Definition: BGSSaveLoadManager.h:151
std::uint64_t unk158
Definition: BGSSaveLoadManager.h:127
std::uint64_t unk0C0
Definition: BGSSaveLoadManager.h:101
bool Save_Impl(std::int32_t a_deviceID, std::uint32_t a_outputStats, const char *a_fileName)
Definition: BSAtomic.h:16
Definition: BSTMessageQueue.h:81
Definition: BSTEvent.h:143
Definition: BSTEvent.h:19
Definition: BSTHashMap.h:21
Definition: BSThread.h:8
Definition: AbsorbEffect.h:6
constexpr REL::VariantID RTTI_BGSSaveLoadManager(686602, 394445, 0x1f02078)
constexpr REL::VariantID RTTI_BGSSaveLoadManager__Thread(686610, 394453, 0x1f02280)
BSEventNotifyControl
Definition: BSTEvent.h:12
Definition: RaceSexMenuEvent.h:9