CommonLibVR
BGSSaveLoadGame.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "RE/B/BSPointerHandle.h"
4 #include "RE/B/BSTArray.h"
5 #include "RE/B/BSTHashMap.h"
6 
7 namespace RE
8 {
9  class BGSCellFormIDArrayMap;
10  class BGSConstructFormsInFileMap;
11  class BGSSaveLoadChangesMap;
12  class TESFile;
13  class TESForm;
14  struct BGSLoadGameSubBuffer;
15 
17  {
18  public:
19  // members
22  std::uint32_t unk60; // 60
23  std::uint32_t pad64; // 64
24  private:
25  KEEP_FOR_RE()
26  };
27  static_assert(sizeof(BGSSaveLoadFormIDMap) == 0x68);
28 
30  {
31  public:
32  // members
36  private:
37  KEEP_FOR_RE()
38  };
39  static_assert(sizeof(BGSSaveLoadReferencesMap) == 0x90);
40 
42  {
43  public:
44  // members
47  std::uint32_t unk78; // 78
48  private:
49  KEEP_FOR_RE()
50  };
51  static_assert(sizeof(BGSConstructFormsInAllFilesMap) == 0x80);
52 
54  {
55  public:
56  // members
58  private:
59  KEEP_FOR_RE()
60  };
61  static_assert(sizeof(BGSSaveLoadQueuedSubBufferMap) == 0x90);
62 
64  {
65  public:
66  enum class Flags
67  {
68  kGlobalAllowChanges = 1 << 0,
69  kLoading = 1 << 1,
70  kSaving = 1 << 2,
71  kInitingForms = 1 << 3,
72  kDeferInitForms = 1 << 4,
73  kPositioningPlayer = 1 << 5,
74  kPlayerLocationInvalid = 1 << 6
75  };
76 
78  {
79  REL::Relocation<BGSSaveLoadGame**> singleton{ RELOCATION_ID(516851, 403330) };
80  return *singleton;
81  }
82 
83  bool GetChange(TESForm* a_form, std::uint32_t a_changes)
84  {
85  using func_t = decltype(&BGSSaveLoadGame::GetChange);
86  static REL::Relocation<func_t> func{ RELOCATION_ID(34655, 35577) };
87  return func(this, a_form, a_changes);
88  }
89 
90 // members
91 #ifndef SKYRIMVR
94 #else
95  std::uint8_t pluginList[0xFF]; // 000
96  std::uint8_t unk18[0xFF]; // 0FF
97 #endif
107  BGSSaveLoadChangesMap* saveLoadChanges; // 330
108  std::uint64_t unk338; // 338
110  std::uint8_t currentMinorVersion; // 344
111  private:
112  KEEP_FOR_RE()
113  };
114 #ifndef SKYRIMVR
115  static_assert(sizeof(BGSSaveLoadGame) == 0x348);
116 #else
117  static_assert(sizeof(BGSSaveLoadGame) == 0x518);
118 #endif
119 }
#define KEEP_FOR_RE()
Definition: PCH.h:713
#define RELOCATION_ID(SE, AE)
Definition: PCH.h:702
Definition: Relocation.h:210
Definition: BGSSaveLoadGame.h:42
std::uint32_t unk78
Definition: BGSSaveLoadGame.h:47
BSTArray< void * > unk30[3]
Definition: BGSSaveLoadGame.h:46
BSTHashMap< TESFile *, BGSConstructFormsInFileMap * > unk00
Definition: BGSSaveLoadGame.h:45
Definition: BGSSaveLoadGame.h:17
std::uint32_t pad64
Definition: BGSSaveLoadGame.h:23
BSTHashMap< FormID, FormID > unk30
Definition: BGSSaveLoadGame.h:21
std::uint32_t unk60
Definition: BGSSaveLoadGame.h:22
BSTHashMap< FormID, FormID > unk00
Definition: BGSSaveLoadGame.h:20
Definition: BGSSaveLoadGame.h:64
BGSSaveLoadFormIDMap worldspaceFormIDMap
Definition: BGSSaveLoadGame.h:98
BSTArray< void * > unk18
Definition: BGSSaveLoadGame.h:93
BSTArray< TESFile * > pluginList
Definition: BGSSaveLoadGame.h:92
bool GetChange(TESForm *a_form, std::uint32_t a_changes)
Definition: BGSSaveLoadGame.h:83
Flags
Definition: BGSSaveLoadGame.h:67
BGSSaveLoadReferencesMap unkC8
Definition: BGSSaveLoadGame.h:100
BGSSaveLoadQueuedSubBufferMap queuedSubBuffersMap
Definition: BGSSaveLoadGame.h:103
stl::enumeration< Flags, std::uint32_t > flags
Definition: BGSSaveLoadGame.h:109
BSTArray< void * > saveLoadHistory
Definition: BGSSaveLoadGame.h:105
static BGSSaveLoadGame * GetSingleton()
Definition: BGSSaveLoadGame.h:77
BGSSaveLoadChangesMap * saveLoadChanges
Definition: BGSSaveLoadGame.h:107
BSTHashMap< FormID, ActorHandle > unk98
Definition: BGSSaveLoadGame.h:99
BGSConstructFormsInAllFilesMap reconstructFormsMap
Definition: BGSSaveLoadGame.h:102
BSTHashMap< FormID, FormID > unk158
Definition: BGSSaveLoadGame.h:101
BSTArray< void * > unk318
Definition: BGSSaveLoadGame.h:106
std::uint64_t unk338
Definition: BGSSaveLoadGame.h:108
BGSSaveLoadFormIDMap formIDMap
Definition: BGSSaveLoadGame.h:104
std::uint8_t currentMinorVersion
Definition: BGSSaveLoadGame.h:110
Definition: BGSSaveLoadGame.h:54
BSTHashMap< TESForm *, BGSLoadGameSubBuffer > queuedSubBuffers[3]
Definition: BGSSaveLoadGame.h:57
Definition: BGSSaveLoadGame.h:30
BSTHashMap< FormID, BSTArray< FormID > > unk30
Definition: BGSSaveLoadGame.h:34
BSTHashMap< FormID, FormID > unk00
Definition: BGSSaveLoadGame.h:33
BSTHashMap< FormID, BGSCellFormIDArrayMap * > unk60
Definition: BGSSaveLoadGame.h:35
Definition: BSTHashMap.h:21
Definition: TESForm.h:40
Definition: AbsorbEffect.h:6