diff --git a/CommonLibSF/include/RE/A/ActorValues.h b/CommonLibSF/include/RE/A/ActorValues.h index 2efd6fbe..8e886c4b 100644 --- a/CommonLibSF/include/RE/A/ActorValues.h +++ b/CommonLibSF/include/RE/A/ActorValues.h @@ -2,6 +2,7 @@ #include "RE/B/BSTArray.h" #include "RE/B/BSTSingleton.h" +#include "RE/Offsets.h" namespace RE { @@ -37,7 +38,7 @@ namespace RE [[nodiscard]] static ActorValue* GetSingleton() { using func_t = decltype(&ActorValue::GetSingleton); - REL::Relocation func{ REL::ID(36266) }; + REL::Relocation func{ Offset::ActorValue::GetSingleton }; return func(); } diff --git a/CommonLibSF/include/RE/B/BGSObjectInstance.h b/CommonLibSF/include/RE/B/BGSObjectInstance.h index d2fc5eea..89f7c537 100644 --- a/CommonLibSF/include/RE/B/BGSObjectInstance.h +++ b/CommonLibSF/include/RE/B/BGSObjectInstance.h @@ -1,6 +1,7 @@ #pragma once #include "RE/B/BSTSmartPointer.h" +#include "RE/Offsets.h" namespace RE { @@ -23,7 +24,7 @@ namespace RE BGSObjectInstance* ctor(TESForm* a_object, TBO_InstanceData* a_instanceData) { using func_t = decltype(&BGSObjectInstance::ctor); - REL::Relocation func{ REL::ID(101725) }; + REL::Relocation func{ Offset::BGSObjectInstance::ctor }; return func(this, a_object, a_instanceData); } }; diff --git a/CommonLibSF/include/RE/B/BSStringPool.h b/CommonLibSF/include/RE/B/BSStringPool.h index d860f281..0f4addd8 100644 --- a/CommonLibSF/include/RE/B/BSStringPool.h +++ b/CommonLibSF/include/RE/B/BSStringPool.h @@ -1,5 +1,7 @@ #pragma once +#include "RE/Offsets.h" + namespace RE { struct BSStringPool @@ -16,7 +18,7 @@ namespace RE static void release(Entry*& a_entry) { using func_t = decltype(&Entry::release); - REL::Relocation func{ REL::ID(36754) }; + REL::Relocation func{ Offset::BSStringPool::Entry::release }; return func(a_entry); } @@ -85,7 +87,7 @@ namespace RE static BucketTable& GetSingleton() { using func_t = decltype(&BucketTable::GetSingleton); - REL::Relocation func{ REL::ID(198241) }; + REL::Relocation func{ Offset::BSStringPool::BucketTable::GetSingleton }; return func(); } @@ -103,7 +105,7 @@ namespace RE inline void GetEntry(BSStringPool::Entry*& a_result, const char* a_string, bool a_caseSensitive) { using func_t = decltype(&GetEntry); - REL::Relocation func{ REL::ID(198219) }; + REL::Relocation func{ Offset::BSStringPool::GetEntry_char_ }; return func(a_result, a_string, a_caseSensitive); } @@ -111,7 +113,7 @@ namespace RE inline void GetEntry(BSStringPool::Entry*& a_result, const wchar_t* a_string, bool a_caseSensitive) { using func_t = decltype(&GetEntry); - REL::Relocation func{ REL::ID(198220) }; + REL::Relocation func{ Offset::BSStringPool::GetEntry_wchar_t_ }; return func(a_result, a_string, a_caseSensitive); } } diff --git a/CommonLibSF/include/RE/B/BSTEvent.h b/CommonLibSF/include/RE/B/BSTEvent.h index e47d997c..aa400351 100644 --- a/CommonLibSF/include/RE/B/BSTEvent.h +++ b/CommonLibSF/include/RE/B/BSTEvent.h @@ -2,6 +2,7 @@ #include "RE/B/BSTArray.h" #include "RE/B/BSTSingleton.h" +#include "RE/Offsets.h" namespace RE { @@ -53,19 +54,19 @@ namespace RE void Notify(void* a_event) { using func_t = decltype(&BSTEventSource::Notify); - REL::Relocation func{ REL::ID(178573) }; + REL::Relocation func{ Offset::BSTEventSource::Notify }; return func(this, a_event); } void RegisterSink(BSTEventSink* a_sink) { using func_t = decltype(&BSTEventSource::RegisterSink); - REL::Relocation func{ REL::ID(34452) }; + REL::Relocation func{ Offset::BSTEventSource::RegisterSink }; return func(this, a_sink); } void UnregisterSink(BSTEventSink* a_sink) { using func_t = decltype(&BSTEventSource::UnregisterSink); - REL::Relocation func{ REL::ID(34451) }; + REL::Relocation func{ Offset::BSTEventSource::UnregisterSink }; return func(this, a_sink); } diff --git a/CommonLibSF/include/RE/C/ConsoleLog.h b/CommonLibSF/include/RE/C/ConsoleLog.h index 703bb45b..bc4ffa20 100644 --- a/CommonLibSF/include/RE/C/ConsoleLog.h +++ b/CommonLibSF/include/RE/C/ConsoleLog.h @@ -1,5 +1,7 @@ #pragma once +#include "RE/Offsets.h" + namespace RE { class ConsoleLog @@ -10,14 +12,14 @@ namespace RE // BSTSDM [[nodiscard]] static ConsoleLog* GetSingleton() { - static REL::Relocation singleton{ REL::ID(879277) }; + static REL::Relocation singleton{ Offset::ConsoleLog::singleton }; return *singleton; } void VPrint(const char* a_fmt, std::va_list a_args) { using func_t = decltype(&ConsoleLog::VPrint); - REL::Relocation func{ REL::ID(166358) }; + REL::Relocation func{ Offset::ConsoleLog::VPrint }; func(this, a_fmt, a_args); } diff --git a/CommonLibSF/include/RE/E/ExtraDataList.h b/CommonLibSF/include/RE/E/ExtraDataList.h index fc7f6cfc..c9ce1f20 100644 --- a/CommonLibSF/include/RE/E/ExtraDataList.h +++ b/CommonLibSF/include/RE/E/ExtraDataList.h @@ -4,6 +4,7 @@ #include "RE/B/BSIntrusiveRefCounted.h" #include "RE/B/BSLock.h" #include "RE/E/ExtraDataTypes.h" +#include "RE/Offsets.h" namespace RE { @@ -13,14 +14,14 @@ namespace RE void AddExtra(BSExtraData* a_extra) { using func_t = decltype(&BaseExtraList::AddExtra); - REL::Relocation func{ REL::ID(83084) }; + REL::Relocation func{ Offset::BaseExtraList::AddExtra }; return func(this, a_extra); } [[nodiscard]] BSExtraData* GetByType(ExtraDataType a_type) const noexcept { using func_t = decltype(&BaseExtraList::GetByType); - REL::Relocation func{ REL::ID(83208) }; + REL::Relocation func{ Offset::BaseExtraList::GetByType }; return func(this, a_type); } @@ -66,7 +67,7 @@ namespace RE [[nodiscard]] bool HasType(ExtraDataType a_type) const noexcept { using func_t = bool (*)(const ExtraDataList*, ExtraDataType); - REL::Relocation func{ REL::ID(83208) }; + REL::Relocation func{ Offset::ExtraDataList::HasType }; return func(this, a_type); } diff --git a/CommonLibSF/include/RE/M/MemoryManager.h b/CommonLibSF/include/RE/M/MemoryManager.h index 1e543a14..73ffa6c8 100644 --- a/CommonLibSF/include/RE/M/MemoryManager.h +++ b/CommonLibSF/include/RE/M/MemoryManager.h @@ -1,5 +1,7 @@ #pragma once +#include "RE/Offsets.h" + namespace RE { class MemoryManager @@ -8,21 +10,21 @@ namespace RE [[nodiscard]] static MemoryManager* GetSingleton() { using func_t = decltype(&MemoryManager::GetSingleton); - const REL::Relocation func{ REL::ID(33961) }; + const REL::Relocation func{ Offset::MemoryManager::GetSingleton }; return func(); } [[nodiscard]] void* Allocate(std::size_t a_size, std::uint32_t a_alignment, bool a_alignmentRequired) { using func_t = decltype(&MemoryManager::Allocate); - const REL::Relocation func{ REL::ID(33962) }; + const REL::Relocation func{ Offset::MemoryManager::Allocate }; return func(this, a_size, a_alignment, a_alignmentRequired); } void Free(void* a_ptr, bool a_alignmentRequired) { using func_t = decltype(&MemoryManager::Free); - const REL::Relocation func{ REL::ID(34032) }; + const REL::Relocation func{ Offset::MemoryManager::Free }; return func(this, a_ptr, a_alignmentRequired); } }; diff --git a/CommonLibSF/include/RE/N/NativeFunctionBase.h b/CommonLibSF/include/RE/N/NativeFunctionBase.h index d826acb3..e0466bab 100644 --- a/CommonLibSF/include/RE/N/NativeFunctionBase.h +++ b/CommonLibSF/include/RE/N/NativeFunctionBase.h @@ -1,6 +1,7 @@ #pragma once #include "RE/I/IFunction.h" +#include "RE/Offsets.h" namespace RE { @@ -59,7 +60,7 @@ namespace RE virtual std::uint64_t* GetParam(std::uint32_t a_idx, BSFixedString* a_nameOut, std::uint64_t* a_typeOut) { using func_t = std::add_pointer_t; - REL::Relocation func{ REL::ID(196404) }; + REL::Relocation func{ Offset::BSScript::Internal::NF_util::NativeFunctionBase::GetParam }; return func(&_params, a_idx, a_nameOut, a_typeOut); } virtual std::uint64_t GetNumParams2(void) override { return _params.unk0A; } @@ -73,13 +74,13 @@ namespace RE virtual std::uint32_t Invoke(std::uint64_t a_unk0, std::uint64_t a_unk1, VMClassRegistry* a_registry, VMState* a_unk3) override { using func_t = decltype(&NativeFunctionBase::Invoke); - REL::Relocation func{ REL::ID(196401) }; + REL::Relocation func{ Offset::BSScript::Internal::NF_util::NativeFunctionBase::Invoke }; return func(this, a_unk0, a_unk1, a_registry, a_unk3); } virtual BSFixedString* Unk_10(void) override { using func_t = decltype(&NativeFunctionBase::Unk_10); - REL::Relocation func{ REL::ID(196407) }; + REL::Relocation func{ Offset::BSScript::Internal::NF_util::NativeFunctionBase::Unk_10 }; return func(this); } virtual bool Unk_11(std::uint32_t a_unk0, std::uint32_t* a_unk1) override @@ -104,13 +105,13 @@ namespace RE virtual bool GetParamInfo(std::uint32_t a_idx, void* a_out) override { using func_t = decltype(&NativeFunctionBase::GetParamInfo); - REL::Relocation func{ REL::ID(196409) }; + REL::Relocation func{ Offset::BSScript::Internal::NF_util::NativeFunctionBase::GetParamInfo }; return func(this, a_idx, a_out); } virtual void* Unk_15(std::uint64_t a_arg0, std::uint64_t a_arg1) { using func_t = decltype(&NativeFunctionBase::Unk_15); - REL::Relocation func{ REL::ID(196408) }; + REL::Relocation func{ Offset::BSScript::Internal::NF_util::NativeFunctionBase::Unk_15 }; return func(this, a_arg0, a_arg1); } virtual bool GetUnk41(void) override { return _isCallableFromTasklet; } diff --git a/CommonLibSF/include/RE/Offsets.h b/CommonLibSF/include/RE/Offsets.h index daa06842..8268e983 100644 --- a/CommonLibSF/include/RE/Offsets.h +++ b/CommonLibSF/include/RE/Offsets.h @@ -3,4 +3,244 @@ #include "REL/Relocation.h" namespace RE::Offset -{} +{ + namespace Actor + { + inline constexpr REL::ID IsHostileToActor{ 150777 }; + } + + namespace ActorValue + { + inline constexpr REL::ID GetSingleton{ 36266 }; + } + + namespace ActorEquipManager + { + inline constexpr REL::ID singleton{ 879425 }; + inline constexpr REL::ID EquipObject{ 151991 }; + inline constexpr REL::ID UnequipObject{ 152007 }; + } + //Extradatalist.h + namespace BaseExtraList + { + inline constexpr REL::ID AddExtra{ 83084 }; + inline constexpr REL::ID GetByType{ 83208 }; + } + + namespace BGSObjectInstance + { + inline constexpr REL::ID ctor{ 101725 }; + } + + namespace BSNonReentrantSpinLock + { + inline constexpr REL::ID lock{ 73879 }; + inline constexpr REL::ID try_lock{ 74235 }; + inline constexpr REL::ID unlock{ 73895 }; + } + + namespace BSReadWriteLock + { + inline constexpr REL::ID lock_read{ 178605 }; + inline constexpr REL::ID lock_write{ 34125 }; + inline constexpr REL::ID unlock_read{ 178609 }; + inline constexpr REL::ID unlock_write{ 34257 }; + + } + + namespace BSScript + { + namespace Internal + { + namespace NF_util + { + namespace NativeFunctionBase + { + inline constexpr REL::ID Invoke{ 196401 }; + inline constexpr REL::ID GetParam{ 196404 }; + inline constexpr REL::ID Unk_10{ 196407 }; + inline constexpr REL::ID GetParamInfo{ 196409 }; + inline constexpr REL::ID Unk_15{ 196408 }; + } + } + } + } + + namespace BSSpinLock + { + inline constexpr REL::ID lock{ 178543 }; + inline constexpr REL::ID try_lock{ 178545 }; + inline constexpr REL::ID unlock{ 178544 }; + } + + namespace BSStringPool + { + namespace Entry + { + inline constexpr REL::ID release{ 36754 }; + } + namespace BucketTable + { + inline constexpr REL::ID GetSingleton{ 198241 }; + } + + inline constexpr REL::ID GetEntry_char_{ 198219 }; + inline constexpr REL::ID GetEntry_wchar_t_{ 198220 }; + + } + + namespace BSTEventSource + { + inline constexpr REL::ID Notify{ 178573 }; + inline constexpr REL::ID RegisterSink{ 34452 }; + inline constexpr REL::ID UnregisterSink{ 34451 }; + } + + namespace BSTHeapSTLAllocatorBase + { + inline constexpr REL::ID allocate{ 34039 }; + inline constexpr REL::ID deallocate{ 34440 }; + } + + namespace ConsoleLog + { + inline constexpr REL::ID singleton{ 879277 }; + inline constexpr REL::ID VPrint{ 166358 }; + } + + namespace ExtraDataList + { + inline constexpr REL::ID HasType{ 83208 }; + } + + namespace MemoryManager + { + inline constexpr REL::ID GetSingleton{ 33961 }; + inline constexpr REL::ID Allocate{ 33962 }; + inline constexpr REL::ID Free{ 34032 }; + } + + namespace Misc + { + inline constexpr REL::ID DebugNotification{ 138728 }; + inline constexpr REL::ID PlayMenuSound{ 167344 }; + } + + namespace PlayerCamera + { + inline constexpr REL::ID singleton{ 878523 }; + inline constexpr REL::ID ForceFirstPerson{ 166029 }; + inline constexpr REL::ID ForceThirdPerson{ 166031 }; + inline constexpr REL::ID SetCameraState{ 166078 }; + inline constexpr REL::ID QCameraEquals{ 166081 }; + } + + namespace PlayerCharacter + { + inline constexpr REL::ID singleton{ 865059 }; + } + + namespace RegSettingCollection + { + inline constexpr REL::ID singleton{ 885510 }; + } + + namespace Scaleform + { + namespace ObjectInterface + { + inline constexpr REL::ID ObjectAddRef{ 57288 }; + inline constexpr REL::ID ObjectRelease{ 57289 }; + inline constexpr REL::ID HasMember{ 57290 }; + inline constexpr REL::ID GetMember{ 57291 }; + inline constexpr REL::ID SetMember{ 57292 }; + inline constexpr REL::ID Invoke{ 57293 }; + inline constexpr REL::ID VisitMembers{ 57296 }; + inline constexpr REL::ID GetArraySize{ 57297 }; + inline constexpr REL::ID SetArraySize{ 57298 }; + inline constexpr REL::ID GetElement{ 57299 }; + inline constexpr REL::ID SetElement{ 57300 }; + inline constexpr REL::ID VisitElements{ 57301 }; + inline constexpr REL::ID PushBack{ 57303 }; + inline constexpr REL::ID PopBack{ 57304 }; + inline constexpr REL::ID RemoveElements{ 57305 }; + inline constexpr REL::ID GetParent{ 57314 }; + inline constexpr REL::ID GetText{ 57324 }; + inline constexpr REL::ID SetText{ 57325 }; + inline constexpr REL::ID SetTextW{ 57326 }; + inline constexpr REL::ID CreateEmptyMovieClip{ 57327 }; + inline constexpr REL::ID GotoAndPlayL{ 57329 }; + inline constexpr REL::ID GotoAndPlay{ 57330 }; + } + } + + namespace Script + { + inline constexpr REL::ID GetConsoleCommands{ 841465 }; + inline constexpr REL::ID GetScriptCommands{ 841467 }; + } + + namespace TESCellFullyLoadedEvent + { + inline constexpr REL::ID GetEventSource{ 107143 }; + } + + namespace TESContainerChangedEvent + { + inline constexpr REL::ID GetEventSource{ 107155 }; + } + + namespace TESDataHandler + { + inline constexpr REL::ID singleton{ 825890 }; + } + + namespace TESDeathEvent + { + inline constexpr REL::ID GetEventSource{ 107156 }; + } + + namespace TESForm + { + inline constexpr REL::ID DecRefCount{ 35164 }; + inline constexpr REL::ID LookupByID{ 86125 }; + inline constexpr REL::ID LookupByEditorID{ 86127 }; + } + + namespace TESObjectLoadedEvent + { + inline constexpr REL::ID GetEventSource{ 107177 }; + } + + namespace TESObjectREFR + { + inline constexpr REL::ID GetCurrentLocation{ 106554 }; + inline constexpr REL::ID GetLinkedRef{ 107578 }; + inline constexpr REL::ID GetParentWorldSpace{ 106696 }; + inline constexpr REL::ID GetSpaceship{ 173851 }; + inline constexpr REL::ID GetSpaceshipParentDock{ 174134 }; + inline constexpr REL::ID GetSpaceshipPilot{ 173834 }; + inline constexpr REL::ID GetValue{ 107605 }; + inline constexpr REL::ID HasKeyword{ 80343 }; + inline constexpr REL::ID IsCrimeToActivate{ 106755 }; + inline constexpr REL::ID IsInSpace{ 106767 }; + inline constexpr REL::ID IsSpaceshipDocked{ 174146 }; + inline constexpr REL::ID IsSpaceshipLanded{ 173880 }; + } + + namespace TESWorldSpace + { + inline constexpr REL::ID GetLocationFromCoordinates{ 107914 }; + } + + namespace UI + { + inline constexpr REL::ID singleton{ 878339 }; + inline constexpr REL::ID IsMenuOpen{ 187049 }; + } + + // global functions/ ids + + inline constexpr REL::ID RTDynamicCast{ 211916 }; + +} diff --git a/CommonLibSF/include/RE/R/RegSettingCollection.h b/CommonLibSF/include/RE/R/RegSettingCollection.h index 1809a114..a9ecd185 100644 --- a/CommonLibSF/include/RE/R/RegSettingCollection.h +++ b/CommonLibSF/include/RE/R/RegSettingCollection.h @@ -1,5 +1,6 @@ #pragma once +#include "RE/Offsets.h" #include "RE/S/Setting.h" #include "RE/S/SettingCollectionList.h" @@ -15,7 +16,7 @@ namespace RE [[nodiscard]] static RegSettingCollection* GetSingleton() { - REL::Relocation singleton{ REL::ID(885510) }; + REL::Relocation singleton{ Offset::RegSettingCollection::singleton }; return *singleton; } diff --git a/CommonLibSF/include/RE/RTTI.h b/CommonLibSF/include/RE/RTTI.h index c1b17375..1aaec631 100644 --- a/CommonLibSF/include/RE/RTTI.h +++ b/CommonLibSF/include/RE/RTTI.h @@ -1,5 +1,6 @@ #pragma once +#include "RE/Offsets.h" // NOTE: this has not been updated struct __type_info_node; @@ -138,7 +139,7 @@ namespace RE inline void* RTDynamicCast(void* a_inptr, std::int32_t a_vfDelta, void* a_srcType, void* a_targetType, std::int32_t a_isReference) { using func_t = decltype(&RTDynamicCast); - REL::Relocation func{ REL::ID(211916) }; + REL::Relocation func{ Offset::RTDynamicCast }; return func(a_inptr, a_vfDelta, a_srcType, a_targetType, a_isReference); } diff --git a/CommonLibSF/include/RE/S/ScaleformGFxValue.h b/CommonLibSF/include/RE/S/ScaleformGFxValue.h index 46f5ca41..e3a97d94 100644 --- a/CommonLibSF/include/RE/S/ScaleformGFxValue.h +++ b/CommonLibSF/include/RE/S/ScaleformGFxValue.h @@ -1,5 +1,7 @@ #pragma once +#include "RE/Offsets.h" + namespace RE::Scaleform::GFx { class MovieImpl; @@ -168,155 +170,155 @@ namespace RE::Scaleform::GFx void ObjectAddRef(Value* a_val, void* a_obj) { - using func_t = decltype(&ObjectInterface::ObjectRelease); - REL::Relocation func{ REL::ID(57288) }; + using func_t = decltype(&ObjectInterface::ObjectAddRef); + REL::Relocation func{ Offset::Scaleform::ObjectInterface::ObjectAddRef }; return func(this, a_val, a_obj); } void ObjectRelease(Value* a_val, void* a_obj) { using func_t = decltype(&ObjectInterface::ObjectRelease); - REL::Relocation func{ REL::ID(57289) }; + REL::Relocation func{ Offset::Scaleform::ObjectInterface::ObjectRelease }; return func(this, a_val, a_obj); } bool HasMember(void* a_data, const char* a_name, bool a_isdobj) const { using func_t = decltype(&ObjectInterface::HasMember); - REL::Relocation func{ REL::ID(57290) }; + REL::Relocation func{ Offset::Scaleform::ObjectInterface::HasMember }; return func(this, a_data, a_name, a_isdobj); } bool GetMember(void* a_data, const char* a_name, Value* a_val, bool a_isdobj) const { using func_t = decltype(&ObjectInterface::GetMember); - REL::Relocation func{ REL::ID(57291) }; + REL::Relocation func{ Offset::Scaleform::ObjectInterface::GetMember }; return func(this, a_data, a_name, a_val, a_isdobj); } bool SetMember(void* a_data, const char* a_name, const Value& a_value, bool a_isdobj) { using func_t = decltype(&ObjectInterface::SetMember); - REL::Relocation func{ REL::ID(57292) }; + REL::Relocation func{ Offset::Scaleform::ObjectInterface::SetMember }; return func(this, a_data, a_name, a_value, a_isdobj); } bool Invoke(void* a_data, Value* a_result, const char* a_name, const Value* a_args, std::size_t a_numArgs, bool a_isdobj) { using func_t = decltype(&ObjectInterface::Invoke); - REL::Relocation func{ REL::ID(57293) }; + REL::Relocation func{ Offset::Scaleform::ObjectInterface::Invoke }; return func(this, a_data, a_result, a_name, a_args, a_numArgs, a_isdobj); } void VisitMembers(void* a_data, ObjVisitor* a_visitor, bool a_isdobj) { using func_t = decltype(&ObjectInterface::VisitMembers); - REL::Relocation func{ REL::ID(57296) }; + REL::Relocation func{ Offset::Scaleform::ObjectInterface::VisitMembers }; return func(this, a_data, a_visitor, a_isdobj); } std::uint32_t GetArraySize(void* a_data) { using func_t = decltype(&ObjectInterface::GetArraySize); - REL::Relocation func{ REL::ID(57297) }; + REL::Relocation func{ Offset::Scaleform::ObjectInterface::GetArraySize }; return func(this, a_data); } bool SetArraySize(void* a_data, std::uint32_t a_size) { using func_t = decltype(&ObjectInterface::SetArraySize); - REL::Relocation func{ REL::ID(57298) }; + REL::Relocation func{ Offset::Scaleform::ObjectInterface::SetArraySize }; return func(this, a_data, a_size); } bool GetElement(void* a_data, std::uint32_t a_index, Value* a_value) { using func_t = decltype(&ObjectInterface::GetElement); - REL::Relocation func{ REL::ID(57299) }; + REL::Relocation func{ Offset::Scaleform::ObjectInterface::GetElement }; return func(this, a_data, a_index, a_value); } bool SetElement(void* a_data, std::uint32_t a_index, const Value& a_value) { using func_t = decltype(&ObjectInterface::SetElement); - REL::Relocation func{ REL::ID(57300) }; + REL::Relocation func{ Offset::Scaleform::ObjectInterface::SetElement }; return func(this, a_data, a_index, a_value); } void VisitElements(void* a_data, ArrVisitor* a_visitor, std::uint32_t a_index, std::int32_t a_count) { using func_t = decltype(&ObjectInterface::VisitElements); - REL::Relocation func{ REL::ID(57301) }; + REL::Relocation func{ Offset::Scaleform::ObjectInterface::VisitElements }; return func(this, a_data, a_visitor, a_index, a_count); } bool PushBack(void* a_data, const Value& a_value) { using func_t = decltype(&ObjectInterface::PushBack); - REL::Relocation func{ REL::ID(57303) }; + REL::Relocation func{ Offset::Scaleform::ObjectInterface::PushBack }; return func(this, a_data, a_value); } bool PopBack(void* a_data, Value* a_value) { using func_t = decltype(&ObjectInterface::PopBack); - REL::Relocation func{ REL::ID(57304) }; + REL::Relocation func{ Offset::Scaleform::ObjectInterface::PopBack }; return func(this, a_data, a_value); } bool RemoveElements(void* a_data, std::uint32_t a_index, std::int32_t a_count) { using func_t = decltype(&ObjectInterface::RemoveElements); - REL::Relocation func{ REL::ID(57305) }; + REL::Relocation func{ Offset::Scaleform::ObjectInterface::RemoveElements }; return func(this, a_data, a_index, a_count); } bool GetParent(void* a_data, Value* a_value) { using func_t = decltype(&ObjectInterface::GetParent); - REL::Relocation func{ REL::ID(57314) }; + REL::Relocation func{ Offset::Scaleform::ObjectInterface::GetParent }; return func(this, a_data, a_value); } bool GetText(void* a_data, Value* a_value, bool a_html) { using func_t = decltype(&ObjectInterface::GetText); - REL::Relocation func{ REL::ID(57324) }; + REL::Relocation func{ Offset::Scaleform::ObjectInterface::GetText }; return func(this, a_data, a_value, a_html); } bool SetText(void* a_data, const char* a_text, bool a_html) { using func_t = decltype(&ObjectInterface::SetText); - REL::Relocation func{ REL::ID(57325) }; + REL::Relocation func{ Offset::Scaleform::ObjectInterface::SetText }; return func(this, a_data, a_text, a_html); } bool SetTextW(void* a_data, const wchar_t* a_text, bool a_html) { using func_t = decltype(&ObjectInterface::SetTextW); - REL::Relocation func{ REL::ID(57326) }; + REL::Relocation func{ Offset::Scaleform::ObjectInterface::SetTextW }; return func(this, a_data, a_text, a_html); } bool CreateEmptyMovieClip(void* a_data, Value* a_value, const char* a_name, std::int32_t a_depth) { using func_t = decltype(&ObjectInterface::CreateEmptyMovieClip); - REL::Relocation func{ REL::ID(57327) }; + REL::Relocation func{ Offset::Scaleform::ObjectInterface::CreateEmptyMovieClip }; return func(this, a_data, a_value, a_name, a_depth); } bool GotoAndPlayL(void* a_data, const char* a_frame, bool a_stop) { using func_t = decltype(&ObjectInterface::GotoAndPlayL); - REL::Relocation func{ REL::ID(57329) }; + REL::Relocation func{ Offset::Scaleform::ObjectInterface::GotoAndPlayL }; return func(this, a_data, a_frame, a_stop); } bool GotoAndPlay(void* a_data, std::uint32_t a_frame, bool a_stop) { using func_t = decltype(&ObjectInterface::GotoAndPlay); - REL::Relocation func{ REL::ID(57330) }; + REL::Relocation func{ Offset::Scaleform::ObjectInterface::GotoAndPlay }; return func(this, a_data, a_frame, a_stop); } diff --git a/CommonLibSF/include/RE/S/Script.h b/CommonLibSF/include/RE/S/Script.h index 051fefdf..588afcde 100644 --- a/CommonLibSF/include/RE/S/Script.h +++ b/CommonLibSF/include/RE/S/Script.h @@ -2,6 +2,7 @@ #include "RE/B/BSStringT.h" #include "RE/B/BSTList.h" +#include "RE/Offsets.h" #include "RE/T/TESForm.h" #include "RE/T/TESQuest.h" @@ -158,13 +159,13 @@ namespace RE inline static const auto GetConsoleCommands() { - static REL::Relocation chunk{ REL::ID(841465) }; + static REL::Relocation chunk{ Offset::Script::GetConsoleCommands }; return std::span{ *chunk }; } inline static const auto GetScriptCommands() { - static REL::Relocation chunk{ REL::ID(841467) }; + static REL::Relocation chunk{ Offset::Script::GetScriptCommands }; return std::span{ *chunk }; } diff --git a/CommonLibSF/include/RE/T/TESCellFullyLoadedEvent.h b/CommonLibSF/include/RE/T/TESCellFullyLoadedEvent.h index c8be6c45..869e3dc0 100644 --- a/CommonLibSF/include/RE/T/TESCellFullyLoadedEvent.h +++ b/CommonLibSF/include/RE/T/TESCellFullyLoadedEvent.h @@ -1,6 +1,7 @@ #pragma once #include "RE/B/BSTEvent.h" +#include "RE/Offsets.h" namespace RE { @@ -12,7 +13,7 @@ namespace RE [[nodiscard]] static BSTEventSource* GetEventSource() { using func_t = decltype(&TESCellFullyLoadedEvent::GetEventSource); - REL::Relocation func{ REL::ID(107143) }; + REL::Relocation func{ Offset::TESCellFullyLoadedEvent::GetEventSource }; return func(); } diff --git a/CommonLibSF/include/RE/T/TESContainerChangedEvent.h b/CommonLibSF/include/RE/T/TESContainerChangedEvent.h index 510027ce..32f28b78 100644 --- a/CommonLibSF/include/RE/T/TESContainerChangedEvent.h +++ b/CommonLibSF/include/RE/T/TESContainerChangedEvent.h @@ -1,6 +1,7 @@ #pragma once #include "RE/B/BSTEvent.h" +#include "RE/Offsets.h" namespace RE { @@ -10,7 +11,7 @@ namespace RE [[nodiscard]] static BSTEventSource* GetEventSource() { using func_t = decltype(&TESContainerChangedEvent::GetEventSource); - REL::Relocation func{ REL::ID(107155) }; + REL::Relocation func{ Offset::TESContainerChangedEvent::GetEventSource }; return func(); } diff --git a/CommonLibSF/include/RE/T/TESDataHandler.h b/CommonLibSF/include/RE/T/TESDataHandler.h index cdf7f8e2..ba72d861 100644 --- a/CommonLibSF/include/RE/T/TESDataHandler.h +++ b/CommonLibSF/include/RE/T/TESDataHandler.h @@ -6,6 +6,7 @@ #include "RE/B/BSTList.h" #include "RE/F/FormTypes.h" #include "RE/N/NiSmartPointer.h" +#include "RE/Offsets.h" namespace RE { @@ -40,7 +41,7 @@ namespace RE [[nodiscard]] static TESDataHandler* GetSingleton() { - REL::Relocation singleton{ REL::ID(825890) }; + REL::Relocation singleton{ Offset::TESDataHandler::singleton }; return *singleton; } diff --git a/CommonLibSF/include/RE/T/TESDeathEvent.h b/CommonLibSF/include/RE/T/TESDeathEvent.h index 08492b0c..a1ef4643 100644 --- a/CommonLibSF/include/RE/T/TESDeathEvent.h +++ b/CommonLibSF/include/RE/T/TESDeathEvent.h @@ -2,6 +2,7 @@ #include "RE/B/BSTEvent.h" #include "RE/N/NiSmartPointer.h" +#include "RE/Offsets.h" namespace RE { @@ -13,7 +14,7 @@ namespace RE [[nodiscard]] static BSTEventSource* GetEventSource() { using func_t = decltype(&TESDeathEvent::GetEventSource); - REL::Relocation func{ REL::ID(107156) }; + REL::Relocation func{ Offset::TESDeathEvent::GetEventSource }; return func(); } diff --git a/CommonLibSF/include/RE/T/TESForm.h b/CommonLibSF/include/RE/T/TESForm.h index 48df27c4..5c90e568 100644 --- a/CommonLibSF/include/RE/T/TESForm.h +++ b/CommonLibSF/include/RE/T/TESForm.h @@ -1,6 +1,7 @@ #pragma once #include "RE/B/BSReflection.h" +#include "RE/Offsets.h" #include "RE/T/TESFile.h" #include "RE/T/TESFormRefCount.h" @@ -142,21 +143,21 @@ namespace RE std::uint64_t DecRefCount() const { using func_t = decltype(&TESForm::DecRefCount); - REL::Relocation func{ REL::ID(35164) }; + REL::Relocation func{ Offset::TESForm::DecRefCount }; return func(this); } [[nodiscard]] static TESForm* LookupByID(std::uint32_t a_formID) { using func_t = decltype(&TESForm::LookupByID); - REL::Relocation func{ REL::ID(86125) }; + REL::Relocation func{ Offset::TESForm::LookupByID }; return func(a_formID); } [[nodiscard]] static TESForm* LookupByEditorID(const char* a_editorID) { using func_t = decltype(&TESForm::LookupByEditorID); - REL::Relocation func{ REL::ID(86127) }; + REL::Relocation func{ Offset::TESForm::LookupByEditorID }; return func(a_editorID); } diff --git a/CommonLibSF/include/RE/T/TESObjectLoadedEvent.h b/CommonLibSF/include/RE/T/TESObjectLoadedEvent.h index 0ae7875e..be3f13bf 100644 --- a/CommonLibSF/include/RE/T/TESObjectLoadedEvent.h +++ b/CommonLibSF/include/RE/T/TESObjectLoadedEvent.h @@ -1,5 +1,8 @@ #pragma once +#include "RE/B/BSTEvent.h" +#include "RE/Offsets.h" + namespace RE { struct TESObjectLoadedEvent @@ -8,7 +11,7 @@ namespace RE [[nodiscard]] static BSTEventSource* GetEventSource() { using func_t = decltype(&TESObjectLoadedEvent::GetEventSource); - REL::Relocation func{ REL::ID(107177) }; + REL::Relocation func{ Offset::TESObjectLoadedEvent::GetEventSource }; return func(); } diff --git a/CommonLibSF/include/RE/U/UI.h b/CommonLibSF/include/RE/U/UI.h index a4ff86a1..1e76670e 100644 --- a/CommonLibSF/include/RE/U/UI.h +++ b/CommonLibSF/include/RE/U/UI.h @@ -1,5 +1,7 @@ #pragma once +#include "RE/Offsets.h" + namespace RE { class IMenu; @@ -42,14 +44,14 @@ namespace RE inline static UI* GetSingleton() { - static REL::Relocation singleton{ REL::ID(878339) }; + static REL::Relocation singleton{ Offset::UI::singleton }; return *singleton; } bool IsMenuOpen(const BSFixedString& a_name) { using func_t = decltype(&UI::IsMenuOpen); - REL::Relocation func{ REL::ID(187049) }; + REL::Relocation func{ Offset::UI::IsMenuOpen }; return func(this, a_name); } diff --git a/CommonLibSF/src/RE/A/Actor.cpp b/CommonLibSF/src/RE/A/Actor.cpp index 676c781a..5a1d0903 100644 --- a/CommonLibSF/src/RE/A/Actor.cpp +++ b/CommonLibSF/src/RE/A/Actor.cpp @@ -1,11 +1,12 @@ #include "RE/A/Actor.h" +#include "RE/Offsets.h" namespace RE { bool Actor::IsHostileToActor(Actor* a_actor) { using func_t = decltype(&Actor::IsHostileToActor); - REL::Relocation func{ REL::ID(150777) }; + REL::Relocation func{ Offset::Actor::IsHostileToActor }; return func(this, a_actor); } } diff --git a/CommonLibSF/src/RE/A/ActorEquipManager.cpp b/CommonLibSF/src/RE/A/ActorEquipManager.cpp index bc9cf7d1..5d90f866 100644 --- a/CommonLibSF/src/RE/A/ActorEquipManager.cpp +++ b/CommonLibSF/src/RE/A/ActorEquipManager.cpp @@ -1,24 +1,25 @@ #include "RE/A/ActorEquipManager.h" +#include "RE/Offsets.h" namespace RE { ActorEquipManager* ActorEquipManager::GetSingleton() { - REL::Relocation singleton{ REL::ID(879425) }; + REL::Relocation singleton{ Offset::ActorEquipManager::singleton }; return *singleton; } bool ActorEquipManager::EquipObject(Actor* a_actor, const BGSObjectInstance& a_object, const BGSEquipSlot* a_slot, bool a_queueEquip, bool a_forceEquip, bool a_playSounds, bool a_applyNow, bool a_locked) { using func_t = decltype(&ActorEquipManager::EquipObject); - REL::Relocation func{ REL::ID(151991) }; + REL::Relocation func{ Offset::ActorEquipManager::EquipObject }; return func(this, a_actor, a_object, a_slot, a_queueEquip, a_forceEquip, a_playSounds, a_applyNow, a_locked); } bool ActorEquipManager::UnequipObject(Actor* a_actor, const BGSObjectInstance& a_object, const BGSEquipSlot* a_slot, bool a_queueUnequip, bool a_forceUnequip, bool a_playSounds, bool a_applyNow, const BGSEquipSlot* a_slotBeingReplaced) { using func_t = decltype(&ActorEquipManager::UnequipObject); - REL::Relocation func{ REL::ID(152007) }; + REL::Relocation func{ Offset::ActorEquipManager::UnequipObject }; return func(this, a_actor, a_object, a_slot, a_queueUnequip, a_forceUnequip, a_playSounds, a_applyNow, a_slotBeingReplaced); } } diff --git a/CommonLibSF/src/RE/B/BSLock.cpp b/CommonLibSF/src/RE/B/BSLock.cpp index f3a8f2b9..ac2f7416 100644 --- a/CommonLibSF/src/RE/B/BSLock.cpp +++ b/CommonLibSF/src/RE/B/BSLock.cpp @@ -1,74 +1,75 @@ #include "RE/B/BSLock.h" +#include "RE/Offsets.h" namespace RE { void BSNonReentrantSpinLock::lock() { using func_t = decltype(&BSNonReentrantSpinLock::lock); - REL::Relocation func{ REL::ID(73879) }; + REL::Relocation func{ Offset::BSNonReentrantSpinLock::lock }; return func(this); } bool BSNonReentrantSpinLock::try_lock() { using func_t = decltype(&BSNonReentrantSpinLock::try_lock); - REL::Relocation func{ REL::ID(74235) }; + REL::Relocation func{ Offset::BSNonReentrantSpinLock::try_lock }; return func(this); } void BSNonReentrantSpinLock::unlock() { using func_t = decltype(&BSNonReentrantSpinLock::unlock); - REL::Relocation func{ REL::ID(73895) }; + REL::Relocation func{ Offset::BSNonReentrantSpinLock::unlock }; return func(this); } void BSReadWriteLock::lock_read() { using func_t = decltype(&BSReadWriteLock::lock_read); - REL::Relocation func{ REL::ID(178605) }; + REL::Relocation func{ Offset::BSReadWriteLock::lock_read }; return func(this); } void BSReadWriteLock::lock_write() { using func_t = decltype(&BSReadWriteLock::lock_write); - REL::Relocation func{ REL::ID(34125) }; + REL::Relocation func{ Offset::BSReadWriteLock::lock_write }; return func(this); } void BSReadWriteLock::unlock_read() { using func_t = decltype(&BSReadWriteLock::unlock_read); - REL::Relocation func{ REL::ID(178609) }; + REL::Relocation func{ Offset::BSReadWriteLock::unlock_read }; return func(this); } void BSReadWriteLock::unlock_write() { using func_t = decltype(&BSReadWriteLock::unlock_write); - REL::Relocation func{ REL::ID(34257) }; + REL::Relocation func{ Offset::BSReadWriteLock::unlock_write }; return func(this); } void BSSpinLock::lock() { using func_t = decltype(&BSSpinLock::lock); - REL::Relocation func{ REL::ID(178543) }; + REL::Relocation func{ Offset::BSSpinLock::lock }; return func(this); } bool BSSpinLock::try_lock() { using func_t = decltype(&BSSpinLock::try_lock); - REL::Relocation func{ REL::ID(178545) }; + REL::Relocation func{ Offset::BSSpinLock::try_lock }; return func(this); } void BSSpinLock::unlock() { using func_t = decltype(&BSSpinLock::unlock); - REL::Relocation func{ REL::ID(178544) }; + REL::Relocation func{ Offset::BSSpinLock::unlock }; return func(this); } } diff --git a/CommonLibSF/src/RE/P/PlayerCamera.cpp b/CommonLibSF/src/RE/P/PlayerCamera.cpp index 3ba8332e..eea8b6cb 100644 --- a/CommonLibSF/src/RE/P/PlayerCamera.cpp +++ b/CommonLibSF/src/RE/P/PlayerCamera.cpp @@ -1,24 +1,25 @@ #include "RE/P/PlayerCamera.h" +#include "RE/Offsets.h" namespace RE { PlayerCamera* PlayerCamera::GetSingleton() { - REL::Relocation singleton{ REL::ID(878523) }; + REL::Relocation singleton{ Offset::PlayerCamera::singleton }; return *singleton; } void PlayerCamera::ForceFirstPerson() { using func_t = decltype(&PlayerCamera::ForceFirstPerson); - REL::Relocation func{ REL::ID(166029) }; + REL::Relocation func{ Offset::PlayerCamera::ForceFirstPerson }; return func(this); } void PlayerCamera::ForceThirdPerson() { using func_t = decltype(&PlayerCamera::ForceThirdPerson); - REL::Relocation func{ REL::ID(166031) }; + REL::Relocation func{ Offset::PlayerCamera::ForceThirdPerson }; return func(this); } @@ -35,14 +36,14 @@ namespace RE void PlayerCamera::SetCameraState(CameraState a_cameraState) { using func_t = decltype(&PlayerCamera::SetCameraState); - REL::Relocation func{ REL::ID(166078) }; + REL::Relocation func{ Offset::PlayerCamera::SetCameraState }; return func(this, a_cameraState); } bool PlayerCamera::QCameraEquals(CameraState a_cameraState) const { using func_t = decltype(&PlayerCamera::QCameraEquals); - REL::Relocation func{ REL::ID(166081) }; + REL::Relocation func{ Offset::PlayerCamera::QCameraEquals }; return func(this, a_cameraState); } } diff --git a/CommonLibSF/src/RE/P/PlayerCharacter.cpp b/CommonLibSF/src/RE/P/PlayerCharacter.cpp index d8f08f2e..7f4cc177 100644 --- a/CommonLibSF/src/RE/P/PlayerCharacter.cpp +++ b/CommonLibSF/src/RE/P/PlayerCharacter.cpp @@ -1,10 +1,11 @@ #include "RE/P/PlayerCharacter.h" +#include "RE/Offsets.h" namespace RE { PlayerCharacter* PlayerCharacter::GetSingleton() { - static REL::Relocation singleton{ REL::ID(865059) }; + static REL::Relocation singleton{ Offset::PlayerCharacter::singleton }; return *singleton; } diff --git a/CommonLibSF/src/RE/T/TESObjectREFR.cpp b/CommonLibSF/src/RE/T/TESObjectREFR.cpp index d1eec8c8..ef28b841 100644 --- a/CommonLibSF/src/RE/T/TESObjectREFR.cpp +++ b/CommonLibSF/src/RE/T/TESObjectREFR.cpp @@ -1,88 +1,89 @@ #include "RE/T/TESObjectREFR.h" +#include "RE/Offsets.h" namespace RE { BGSLocation* TESObjectREFR::GetCurrentLocation() { using func_t = decltype(&TESObjectREFR::GetCurrentLocation); - REL::Relocation func{ REL::ID(106554) }; + REL::Relocation func{ Offset::TESObjectREFR::GetCurrentLocation }; return func(this); } TESObjectREFR* TESObjectREFR::GetLinkedRef(BGSKeyword* a_keyword) { using func_t = decltype(&TESObjectREFR::GetLinkedRef); - REL::Relocation func{ REL::ID(107578) }; + REL::Relocation func{ Offset::TESObjectREFR::GetLinkedRef }; return func(this, a_keyword); } TESWorldSpace* TESObjectREFR::GetParentWorldSpace() { using func_t = decltype(&TESObjectREFR::GetParentWorldSpace); - REL::Relocation func{ REL::ID(106696) }; + REL::Relocation func{ Offset::TESObjectREFR::GetParentWorldSpace }; return func(this); } TESObjectREFR* TESObjectREFR::GetSpaceship(bool a_arg1) { using func_t = decltype(&TESObjectREFR::GetSpaceship); - REL::Relocation func{ REL::ID(173851) }; + REL::Relocation func{ Offset::TESObjectREFR::GetSpaceship }; return func(this, a_arg1); } TESObjectREFR* TESObjectREFR::GetSpaceshipParentDock() { using func_t = decltype(&TESObjectREFR::GetSpaceshipParentDock); - REL::Relocation func{ REL::ID(174134) }; + REL::Relocation func{ Offset::TESObjectREFR::GetSpaceshipParentDock }; return func(this); } Actor* TESObjectREFR::GetSpaceshipPilot() { using func_t = decltype(&TESObjectREFR::GetSpaceshipPilot); - REL::Relocation func{ REL::ID(173834) }; + REL::Relocation func{ Offset::TESObjectREFR::GetSpaceshipPilot }; return func(this); } std::int32_t TESObjectREFR::GetValue() { using func_t = decltype(&TESObjectREFR::GetValue); - REL::Relocation func{ REL::ID(107605) }; + REL::Relocation func{ Offset::TESObjectREFR::GetValue }; return func(this); } bool TESObjectREFR::HasKeyword(BGSKeyword* a_keyword) { using func_t = decltype(&TESObjectREFR::HasKeyword); - REL::Relocation func{ REL::ID(80343) }; + REL::Relocation func{ Offset::TESObjectREFR::HasKeyword }; return func(this, a_keyword); } bool TESObjectREFR::IsCrimeToActivate() { using func_t = decltype(&TESObjectREFR::IsCrimeToActivate); - REL::Relocation func{ REL::ID(106755) }; + REL::Relocation func{ Offset::TESObjectREFR::IsCrimeToActivate }; return func(this); } bool TESObjectREFR::IsInSpace(bool a_arg1) { using func_t = decltype(&TESObjectREFR::IsInSpace); - REL::Relocation func{ REL::ID(106767) }; + REL::Relocation func{ Offset::TESObjectREFR::IsInSpace }; return func(this, a_arg1); } bool TESObjectREFR::IsSpaceshipDocked() { using func_t = decltype(&TESObjectREFR::IsSpaceshipDocked); - REL::Relocation func{ REL::ID(174146) }; + REL::Relocation func{ Offset::TESObjectREFR::IsSpaceshipDocked }; return func(this); } bool TESObjectREFR::IsSpaceshipLanded() { using func_t = decltype(&TESObjectREFR::IsSpaceshipLanded); - REL::Relocation func{ REL::ID(173880) }; + REL::Relocation func{ Offset::TESObjectREFR::IsSpaceshipLanded }; return func(this); } diff --git a/CommonLibSF/src/RE/T/TESWorldSpace.cpp b/CommonLibSF/src/RE/T/TESWorldSpace.cpp index 7af6f405..4763d761 100644 --- a/CommonLibSF/src/RE/T/TESWorldSpace.cpp +++ b/CommonLibSF/src/RE/T/TESWorldSpace.cpp @@ -1,11 +1,12 @@ #include "RE/T/TESWorldSpace.h" +#include "RE/Offsets.h" namespace RE { BGSLocation* TESWorldSpace::GetLocationFromCoordinates(const NiPoint3A& a_coordinates) { using func_t = decltype(&TESWorldSpace::GetLocationFromCoordinates); - REL::Relocation func{ REL::ID(107914) }; + REL::Relocation func{ Offset::TESWorldSpace::GetLocationFromCoordinates }; return func(this, a_coordinates); } }