Skip to content

Commit 41d3c6c

Browse files
authored
feat: couple of functions, BGSSaveLoadManager defs (#290)
Co-authored-by: powerof3 <[email protected]>
1 parent 774faa9 commit 41d3c6c

File tree

5 files changed

+26
-0
lines changed

5 files changed

+26
-0
lines changed

include/RE/B/BGSEditorID.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,13 @@ namespace RE
3333

3434
[[nodiscard]] TESForm* owner() const { return _owner; }
3535

36+
void Register(const char* a_editorID, const RE::TESForm* a_form)
37+
{
38+
using func_t = decltype(&BGSEditorID::Register);
39+
static REL::Relocation<func_t> func{ ID::BGSEditorID::Register };
40+
return func(this, a_editorID, a_form);
41+
}
42+
3643
private:
3744
// members
3845
BSFixedString _data; // 00

include/RE/B/BGSSaveLoadManager.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,10 @@ namespace RE
1717
static REL::Relocation<func_t> func{ ID::BGSSaveLoadManager::DeleteSaveFile };
1818
return func(this, a_filename, a_unk1, a_unk2);
1919
}
20+
21+
// members
22+
std::uint8_t unk00[0x110]; // 000
23+
std::uint64_t currentPlayerID; // 110
2024
};
25+
static_assert(offsetof(BGSSaveLoadManager, currentPlayerID) == 0x110);
2126
}

include/RE/E/ExtraDataList.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,13 @@ namespace RE
6363
return static_cast<T*>(GetByType(T::EXTRADATATYPE));
6464
}
6565

66+
[[nodiscard]] bool HasQuestObjectAlias() const
67+
{
68+
using func_t = decltype(&ExtraDataList::HasQuestObjectAlias);
69+
static REL::Relocation<func_t> func{ ID::ExtraDataList::HasQuestObjectAlias };
70+
return func(this);
71+
}
72+
6673
[[nodiscard]] bool HasType(ExtraDataType a_type) const noexcept
6774
{
6875
using func_t = bool (*)(const ExtraDataList*, ExtraDataType);

include/RE/IDs.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,11 @@ namespace RE::ID
4242
inline constexpr REL::ID GetSingleton{ 82283 };
4343
}
4444

45+
namespace BGSEditorID
46+
{
47+
inline constexpr REL::ID Register{ 86172 };
48+
}
49+
4550
namespace BGSEntryPoint
4651
{
4752
inline constexpr REL::ID HandleEntryPoint{ 110912 };
@@ -224,6 +229,7 @@ namespace RE::ID
224229

225230
namespace ExtraDataList
226231
{
232+
inline constexpr REL::ID HasQuestObjectAlias{ 83336 };
227233
inline constexpr REL::ID HasType{ 83208 };
228234
}
229235

include/REX/W32.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
#include "REX/W32/KERNEL32.h"
1818
#include "REX/W32/NT.h"
1919
#include "REX/W32/OLE32.h"
20+
#include "REX/W32/SHELL32.h"
2021
#include "REX/W32/USER32.h"
2122
#include "REX/W32/VERSION.h"
2223
#include "REX/W32/WS2_32.h"

0 commit comments

Comments
 (0)