Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: couple of functions, BGSSaveLoadManager defs #290

Merged
merged 3 commits into from
Oct 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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