Skip to content

Commit

Permalink
feat: couple of functions, BGSSaveLoadManager defs (#290)
Browse files Browse the repository at this point in the history
Co-authored-by: powerof3 <[email protected]>
  • Loading branch information
powerof3 and powerof3 authored Oct 14, 2024
1 parent 774faa9 commit 41d3c6c
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 0 deletions.
7 changes: 7 additions & 0 deletions include/RE/B/BGSEditorID.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,13 @@ namespace RE

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

void Register(const char* a_editorID, const RE::TESForm* a_form)
{
using func_t = decltype(&BGSEditorID::Register);
static REL::Relocation<func_t> func{ ID::BGSEditorID::Register };
return func(this, a_editorID, a_form);
}

private:
// members
BSFixedString _data; // 00
Expand Down
5 changes: 5 additions & 0 deletions include/RE/B/BGSSaveLoadManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,10 @@ namespace RE
static REL::Relocation<func_t> func{ ID::BGSSaveLoadManager::DeleteSaveFile };
return func(this, a_filename, a_unk1, a_unk2);
}

// members
std::uint8_t unk00[0x110]; // 000
std::uint64_t currentPlayerID; // 110
};
static_assert(offsetof(BGSSaveLoadManager, currentPlayerID) == 0x110);
}
7 changes: 7 additions & 0 deletions include/RE/E/ExtraDataList.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,13 @@ namespace RE
return static_cast<T*>(GetByType(T::EXTRADATATYPE));
}

[[nodiscard]] bool HasQuestObjectAlias() const
{
using func_t = decltype(&ExtraDataList::HasQuestObjectAlias);
static REL::Relocation<func_t> func{ ID::ExtraDataList::HasQuestObjectAlias };
return func(this);
}

[[nodiscard]] bool HasType(ExtraDataType a_type) const noexcept
{
using func_t = bool (*)(const ExtraDataList*, ExtraDataType);
Expand Down
6 changes: 6 additions & 0 deletions include/RE/IDs.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,11 @@ namespace RE::ID
inline constexpr REL::ID GetSingleton{ 82283 };
}

namespace BGSEditorID
{
inline constexpr REL::ID Register{ 86172 };
}

namespace BGSEntryPoint
{
inline constexpr REL::ID HandleEntryPoint{ 110912 };
Expand Down Expand Up @@ -224,6 +229,7 @@ namespace RE::ID

namespace ExtraDataList
{
inline constexpr REL::ID HasQuestObjectAlias{ 83336 };
inline constexpr REL::ID HasType{ 83208 };
}

Expand Down
1 change: 1 addition & 0 deletions include/REX/W32.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#include "REX/W32/KERNEL32.h"
#include "REX/W32/NT.h"
#include "REX/W32/OLE32.h"
#include "REX/W32/SHELL32.h"
#include "REX/W32/USER32.h"
#include "REX/W32/VERSION.h"
#include "REX/W32/WS2_32.h"
Expand Down

0 comments on commit 41d3c6c

Please sign in to comment.