From 3caa0a8bfcf791a3a318268fd463e8dac9000859 Mon Sep 17 00:00:00 2001 From: shad0wshayd3 Date: Sat, 4 May 2024 05:22:01 -0600 Subject: [PATCH] updated IDs for BakaFramework --- CommonLibF4/include/F4SE/Impl/WinAPI.h | 4 +++ .../RE/Bethesda/BGSDefaultObjectManager.h | 4 +-- .../RE/Bethesda/BGSStoryEventManager.h | 6 ++-- CommonLibF4/include/RE/Bethesda/BSLock.h | 8 ++--- .../include/RE/Bethesda/BSScript/Object.h | 4 +-- .../include/RE/Bethesda/BSStringPool.h | 8 ++--- CommonLibF4/include/RE/Bethesda/BSTEvent.h | 2 +- CommonLibF4/include/RE/Bethesda/Console.h | 6 ++-- CommonLibF4/include/RE/Bethesda/Events.h | 4 +-- .../include/RE/Bethesda/FormComponents.h | 2 +- CommonLibF4/include/RE/Bethesda/ItemCrafted.h | 6 ++-- CommonLibF4/include/RE/Bethesda/Main.h | 4 +-- .../include/RE/Bethesda/MemoryManager.h | 20 +++++------ .../include/RE/Bethesda/PlayerCharacter.h | 2 +- CommonLibF4/include/RE/Bethesda/Script.h | 34 +++++++++---------- CommonLibF4/include/RE/Bethesda/Settings.h | 8 ++--- .../include/RE/Bethesda/TESCondition.h | 2 +- .../include/RE/Bethesda/TESDataHandler.h | 2 +- CommonLibF4/include/RE/Bethesda/TESFile.h | 14 ++++---- CommonLibF4/include/RE/Bethesda/TESForms.h | 18 +++++----- CommonLibF4/include/RE/Bethesda/UI.h | 2 +- CommonLibF4/include/RE/NetImmerse/NiMatrix3.h | 2 +- CommonLibF4/src/F4SE/Impl/WinAPI.cpp | 11 ++++++ 23 files changed, 94 insertions(+), 79 deletions(-) diff --git a/CommonLibF4/include/F4SE/Impl/WinAPI.h b/CommonLibF4/include/F4SE/Impl/WinAPI.h index 171dee7b..73c5e5cd 100644 --- a/CommonLibF4/include/F4SE/Impl/WinAPI.h +++ b/CommonLibF4/include/F4SE/Impl/WinAPI.h @@ -20,6 +20,10 @@ namespace F4SE::WinAPI }; static_assert(sizeof(CRITICAL_SECTION) == 0x28); + [[nodiscard]] bool(GetComputerName)( + char* a_buffer, + std::uint32_t* a_size) noexcept; + [[nodiscard]] void*(GetCurrentModule)() noexcept; [[nodiscard]] void*(GetCurrentProcess)() noexcept; diff --git a/CommonLibF4/include/RE/Bethesda/BGSDefaultObjectManager.h b/CommonLibF4/include/RE/Bethesda/BGSDefaultObjectManager.h index 9b9a6940..3f04a0b4 100644 --- a/CommonLibF4/include/RE/Bethesda/BGSDefaultObjectManager.h +++ b/CommonLibF4/include/RE/Bethesda/BGSDefaultObjectManager.h @@ -489,7 +489,7 @@ namespace RE [[nodiscard]] static BSTArray* GetSingleton() { - REL::Relocation**> singleton{ REL::ID(561749) }; + REL::Relocation**> singleton{ REL::ID(2690473) }; return *singleton; } @@ -508,7 +508,7 @@ namespace RE BGSDefaultObject* ctor(const char* a_name, ENUM_FORM_ID a_formType, const char* a_description) { using func_t = decltype(&BGSDefaultObject::ctor); - REL::Relocation func{ REL::ID(1144014) }; + REL::Relocation func{ REL::ID(2197003) }; return func(this, a_name, a_formType, a_description); } }; diff --git a/CommonLibF4/include/RE/Bethesda/BGSStoryEventManager.h b/CommonLibF4/include/RE/Bethesda/BGSStoryEventManager.h index 354dd49b..422eb2de 100644 --- a/CommonLibF4/include/RE/Bethesda/BGSStoryEventManager.h +++ b/CommonLibF4/include/RE/Bethesda/BGSStoryEventManager.h @@ -17,14 +17,14 @@ namespace RE public: [[nodiscard]] static BGSStoryEventManager* GetSingleton() { - REL::Relocation singleton{ REL::ID(1160067) }; + REL::Relocation singleton{ REL::ID(2693504) }; return *singleton; } std::uint32_t AddEvent(std::uint32_t a_index, const void* a_event) { using func_t = std::uint32_t (BGSStoryEventManager::*)(std::uint32_t, const void*); - REL::Relocation func{ REL::ID(312533) }; + REL::Relocation func{ REL::ID(2214088) }; return func(this, a_index, a_event); } @@ -55,7 +55,7 @@ namespace RE [[nodiscard]] static std::uint32_t EVENT_INDEX() { - REL::Relocation eventIdx{ REL::ID(1382765) }; + REL::Relocation eventIdx{ REL::ID(2663409) }; return *eventIdx; } diff --git a/CommonLibF4/include/RE/Bethesda/BSLock.h b/CommonLibF4/include/RE/Bethesda/BSLock.h index 21273ad4..b2119d51 100644 --- a/CommonLibF4/include/RE/Bethesda/BSLock.h +++ b/CommonLibF4/include/RE/Bethesda/BSLock.h @@ -62,28 +62,28 @@ namespace RE void lock_read() { using func_t = decltype(&BSReadWriteLock::lock_read); - REL::Relocation func{ REL::ID(1573164) }; + REL::Relocation func{ REL::ID(2267897) }; return func(this); } void lock_write() { using func_t = decltype(&BSReadWriteLock::lock_write); - REL::Relocation func{ REL::ID(336186) }; + REL::Relocation func{ REL::ID(2267898) }; return func(this); } [[nodiscard]] bool try_lock_read() { using func_t = decltype(&BSReadWriteLock::try_lock_read); - REL::Relocation func{ REL::ID(1372435) }; + REL::Relocation func{ REL::ID(2267901) }; return func(this); } [[nodiscard]] bool try_lock_write() { using func_t = decltype(&BSReadWriteLock::try_lock_write); - REL::Relocation func{ REL::ID(1279453) }; + REL::Relocation func{ REL::ID(2267902) }; return func(this); } diff --git a/CommonLibF4/include/RE/Bethesda/BSScript/Object.h b/CommonLibF4/include/RE/Bethesda/BSScript/Object.h index a2c46b45..586f246d 100644 --- a/CommonLibF4/include/RE/Bethesda/BSScript/Object.h +++ b/CommonLibF4/include/RE/Bethesda/BSScript/Object.h @@ -43,14 +43,14 @@ namespace RE [[nodiscard]] std::size_t GetHandle() const { using func_t = decltype(&Object::GetHandle); - REL::Relocation func{ REL::ID(1452752) }; + REL::Relocation func{ REL::ID(2314431) }; return func(this); } void IncRef() const { using func_t = decltype(&Object::IncRef); - REL::Relocation func{ REL::ID(461710) }; + REL::Relocation func{ REL::ID(2314436) }; return func(this); } diff --git a/CommonLibF4/include/RE/Bethesda/BSStringPool.h b/CommonLibF4/include/RE/Bethesda/BSStringPool.h index 438b7bce..3b29554e 100644 --- a/CommonLibF4/include/RE/Bethesda/BSStringPool.h +++ b/CommonLibF4/include/RE/Bethesda/BSStringPool.h @@ -18,7 +18,7 @@ namespace RE static void release(Entry*& a_entry) { using func_t = decltype(&Entry::release); - REL::Relocation func{ REL::ID(1204430) }; + REL::Relocation func{ REL::ID(2268720) }; return func(a_entry); } @@ -121,7 +121,7 @@ namespace RE static BucketTable& GetSingleton() { using func_t = decltype(&BucketTable::GetSingleton); - REL::Relocation func{ REL::ID(1390486) }; + REL::Relocation func{ REL::ID(2268736) }; return func(); } @@ -139,7 +139,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(507142) }; + REL::Relocation func{ REL::ID(2268729) }; return func(a_result, a_string, a_caseSensitive); } @@ -147,7 +147,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(345043) }; + REL::Relocation func{ REL::ID(2268730) }; return func(a_result, a_string, a_caseSensitive); } } diff --git a/CommonLibF4/include/RE/Bethesda/BSTEvent.h b/CommonLibF4/include/RE/Bethesda/BSTEvent.h index b4fdc90c..a2794b6b 100644 --- a/CommonLibF4/include/RE/Bethesda/BSTEvent.h +++ b/CommonLibF4/include/RE/Bethesda/BSTEvent.h @@ -231,7 +231,7 @@ namespace RE [[nodiscard]] static BSTGlobalEvent* GetSingleton() { - REL::Relocation singleton{ REL::ID(1424022) }; + REL::Relocation singleton{ REL::ID(2688814) }; return *singleton; } diff --git a/CommonLibF4/include/RE/Bethesda/Console.h b/CommonLibF4/include/RE/Bethesda/Console.h index 4bb736ba..d83c8f75 100644 --- a/CommonLibF4/include/RE/Bethesda/Console.h +++ b/CommonLibF4/include/RE/Bethesda/Console.h @@ -11,21 +11,21 @@ namespace RE public: [[nodiscard]] static ConsoleLog* GetSingleton() { - REL::Relocation singleton{ REL::ID(689441) }; + REL::Relocation singleton{ REL::ID(2690148) }; return *singleton; } void AddString(char const* a_string) { using func_t = decltype(&ConsoleLog::AddString); - REL::Relocation func{ REL::ID(764) }; + REL::Relocation func{ REL::ID(2248593) }; return func(this, a_string); } void Print(const char* a_fmt, std::va_list a_args) { using func_t = decltype(&ConsoleLog::Print); - REL::Relocation func{ REL::ID(799546) }; + REL::Relocation func{ REL::ID(2248591) }; func(this, a_fmt, a_args); } diff --git a/CommonLibF4/include/RE/Bethesda/Events.h b/CommonLibF4/include/RE/Bethesda/Events.h index 2a6784f0..ba59527c 100644 --- a/CommonLibF4/include/RE/Bethesda/Events.h +++ b/CommonLibF4/include/RE/Bethesda/Events.h @@ -201,7 +201,7 @@ namespace RE public: [[nodiscard]] static EventSource_t* GetEventSource() { - REL::Relocation singleton{ REL::ID(696410) }; + REL::Relocation singleton{ REL::ID(2696196) }; if (!*singleton) { *singleton = new EventSource_t(&BSTGlobalEvent::GetSingleton()->eventSourceSDMKiller); } @@ -400,7 +400,7 @@ namespace RE public: [[nodiscard]] static EventSource_t* GetEventSource() { - REL::Relocation singleton{ REL::ID(1140080) }; + REL::Relocation singleton{ REL::ID(2696280) }; if (!*singleton) { *singleton = new EventSource_t(&BSTGlobalEvent::GetSingleton()->eventSourceSDMKiller); } diff --git a/CommonLibF4/include/RE/Bethesda/FormComponents.h b/CommonLibF4/include/RE/Bethesda/FormComponents.h index 34411e62..cd354414 100644 --- a/CommonLibF4/include/RE/Bethesda/FormComponents.h +++ b/CommonLibF4/include/RE/Bethesda/FormComponents.h @@ -1354,7 +1354,7 @@ namespace RE [[nodiscard]] static auto GetSparseFullNameMap() -> BSTHashMap& { - REL::Relocation*> sparseFullNameMap{ REL::ID(226372), -0x8 }; + REL::Relocation*> sparseFullNameMap{ REL::ID(2661402), -0x8 }; return *sparseFullNameMap; } diff --git a/CommonLibF4/include/RE/Bethesda/ItemCrafted.h b/CommonLibF4/include/RE/Bethesda/ItemCrafted.h index 59d2fc3b..6d55f6c8 100644 --- a/CommonLibF4/include/RE/Bethesda/ItemCrafted.h +++ b/CommonLibF4/include/RE/Bethesda/ItemCrafted.h @@ -20,21 +20,21 @@ namespace RE inline void NotifyOfItemCrafted(const TESFurniture* a_workbench, const BGSConstructibleObject* a_recipe) { using func_t = decltype(&NotifyOfItemCrafted); - REL::Relocation func{ REL::ID(788895) }; + REL::Relocation func{ REL::ID(2232809) }; return func(a_workbench, a_recipe); } inline void RegisterSink(BSTEventSink* a_sink) { using func_t = decltype(&RegisterSink); - REL::Relocation func{ REL::ID(1320496) }; + REL::Relocation func{ REL::ID(2232807) }; return func(a_sink); } inline void UnregisterSink(BSTEventSink* a_sink) { using func_t = decltype(&UnregisterSink); - REL::Relocation func{ REL::ID(1054567) }; + REL::Relocation func{ REL::ID(2232808) }; return func(a_sink); } } diff --git a/CommonLibF4/include/RE/Bethesda/Main.h b/CommonLibF4/include/RE/Bethesda/Main.h index 566db27a..28675116 100644 --- a/CommonLibF4/include/RE/Bethesda/Main.h +++ b/CommonLibF4/include/RE/Bethesda/Main.h @@ -34,14 +34,14 @@ namespace RE [[nodiscard]] static Main* GetSingleton() { - REL::Relocation singleton{ REL::ID(756304) }; + REL::Relocation singleton{ REL::ID(2698043) }; return *singleton; } [[nodiscard]] static NiCamera* WorldRootCamera() { using func_t = decltype(&Main::WorldRootCamera); - REL::Relocation func{ REL::ID(384264) }; + REL::Relocation func{ REL::ID(2228956) }; return func(); } diff --git a/CommonLibF4/include/RE/Bethesda/MemoryManager.h b/CommonLibF4/include/RE/Bethesda/MemoryManager.h index c50c6605..a813b304 100644 --- a/CommonLibF4/include/RE/Bethesda/MemoryManager.h +++ b/CommonLibF4/include/RE/Bethesda/MemoryManager.h @@ -124,14 +124,14 @@ namespace RE void* Allocate(std::size_t a_size, std::size_t a_alignment) { using func_t = decltype(&ScrapHeap::Allocate); - REL::Relocation func{ REL::ID(1085394) }; + REL::Relocation func{ REL::ID(2267983) }; return func(this, a_size, a_alignment); } void Deallocate(void* a_mem) { using func_t = decltype(&ScrapHeap::Deallocate); - REL::Relocation func{ REL::ID(923307) }; + REL::Relocation func{ REL::ID(2267984) }; return func(this, a_mem); } @@ -171,14 +171,14 @@ namespace RE AutoScrapBuffer* Ctor() { using func_t = decltype(&AutoScrapBuffer::Ctor); - REL::Relocation func{ REL::ID(1571567) }; + REL::Relocation func{ REL::ID(2267865) }; return func(this); } void Dtor() { using func_t = decltype(&AutoScrapBuffer::Dtor); - REL::Relocation func{ REL::ID(68625) }; + REL::Relocation func{ REL::ID(2267867) }; return func(this); } }; @@ -197,42 +197,42 @@ namespace RE [[nodiscard]] static MemoryManager& GetSingleton() { using func_t = decltype(&MemoryManager::GetSingleton); - const REL::Relocation func{ REL::ID(343176) }; + const REL::Relocation func{ REL::ID(2193197) }; 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(652767) }; + const REL::Relocation func{ REL::ID(2267872) }; return func(this, a_size, a_alignment, a_alignmentRequired); } void Deallocate(void* a_mem, bool a_alignmentRequired) { using func_t = decltype(&MemoryManager::Deallocate); - const REL::Relocation func{ REL::ID(1582181) }; + const REL::Relocation func{ REL::ID(2267874) }; return func(this, a_mem, a_alignmentRequired); } [[nodiscard]] ScrapHeap* GetThreadScrapHeap() { using func_t = decltype(&MemoryManager::GetThreadScrapHeap); - const REL::Relocation func{ REL::ID(1495205) }; + const REL::Relocation func{ REL::ID(2267850) }; return func(this); } [[nodiscard]] void* Reallocate(void* a_oldMem, std::size_t a_newSize, std::uint32_t a_alignment, bool a_alignmentRequired) { using func_t = decltype(&MemoryManager::Reallocate); - const REL::Relocation func{ REL::ID(1502917) }; + const REL::Relocation func{ REL::ID(2267873) }; return func(this, a_oldMem, a_newSize, a_alignment, a_alignmentRequired); } void RegisterMemoryManager() { using func_t = decltype(&MemoryManager::RegisterMemoryManager); - const REL::Relocation func{ REL::ID(453212) }; + const REL::Relocation func{ REL::ID(2228356) }; return func(this); } diff --git a/CommonLibF4/include/RE/Bethesda/PlayerCharacter.h b/CommonLibF4/include/RE/Bethesda/PlayerCharacter.h index ddd91ad7..780cc56c 100644 --- a/CommonLibF4/include/RE/Bethesda/PlayerCharacter.h +++ b/CommonLibF4/include/RE/Bethesda/PlayerCharacter.h @@ -269,7 +269,7 @@ namespace RE [[nodiscard]] static PlayerCharacter* GetSingleton() { - REL::Relocation*> singleton{ REL::ID(303410) }; + REL::Relocation*> singleton{ REL::ID(2690919) }; return singleton->get(); } diff --git a/CommonLibF4/include/RE/Bethesda/Script.h b/CommonLibF4/include/RE/Bethesda/Script.h index 58c8c93d..c5628a9f 100644 --- a/CommonLibF4/include/RE/Bethesda/Script.h +++ b/CommonLibF4/include/RE/Bethesda/Script.h @@ -257,9 +257,9 @@ namespace RE using CompileFunction_t = bool(const std::uint16_t a_paramCount, const SCRIPT_PARAMETER* a_parameters, SCRIPT_LINE* a_scriptLine, ScriptCompileData* a_compileData); using ExecuteFunction_t = bool(const SCRIPT_PARAMETER* a_parameters, const char* a_compiledParams, TESObjectREFR* a_refObject, TESObjectREFR* a_container, Script* a_script, ScriptLocals* a_scriptLocals, float& a_returnValue, std::uint32_t& a_offset); - [[nodiscard]] static std::span GetConsoleFunctions() + [[nodiscard]] static std::span GetConsoleFunctions() { - REL::Relocation functions{ REL::ID(901511) }; + REL::Relocation functions{ REL::ID(901511) }; return { *functions }; } @@ -270,18 +270,18 @@ namespace RE } // members - const char* functionName{ "" }; // 00 - const char* shortName{ "" }; // 08 - stl::enumeration output; // 10 - const char* helpString{ "" }; // 18 - bool referenceFunction{ false }; // 20 - std::uint16_t paramCount{ 0 }; // 22 - SCRIPT_PARAMETER* parameters{ nullptr }; // 28 - ExecuteFunction_t* executeFunction{ nullptr }; // 30 - CompileFunction_t* compileFunction{ REL::Relocation{ REL::ID(638606) }.get() }; // 38 - ConditionFunction_t* conditionFunction{ nullptr }; // 40 - bool editorFilter{ false }; // 48 - bool invalidatesCellList{ false }; // 49 + const char* functionName{ "" }; // 00 + const char* shortName{ "" }; // 08 + stl::enumeration output; // 10 + const char* helpString{ "" }; // 18 + bool referenceFunction{ false }; // 20 + std::uint16_t paramCount{ 0 }; // 22 + SCRIPT_PARAMETER* parameters{ nullptr }; // 28 + ExecuteFunction_t* executeFunction{ nullptr }; // 30 + CompileFunction_t* compileFunction{ REL::Relocation{ REL::ID(2204343) }.get() }; // 38 + ConditionFunction_t* conditionFunction{ nullptr }; // 40 + bool editorFilter{ false }; // 48 + bool invalidatesCellList{ false }; // 49 }; static_assert(sizeof(SCRIPT_FUNCTION) == 0x50); @@ -304,14 +304,14 @@ namespace RE { static_assert((std::is_pointer_v && ...), "arguments must all be pointers"); using func_t = bool(const SCRIPT_PARAMETER*, const char*, std::uint32_t&, TESObjectREFR*, TESObjectREFR*, Script*, ScriptLocals*, ...); - REL::Relocation func{ REL::ID(1607) }; + REL::Relocation func{ REL::ID(2204298) }; return func(a_parameters, a_compiledParams, a_offset, a_refObject, a_container, a_script, a_scriptLocals, a_args...); } void CompileAndRun(ScriptCompiler* a_compiler, COMPILER_NAME a_compilerIndex, TESObjectREFR* a_ownerObject) { using func_t = decltype(&Script::CompileAndRun); - REL::Relocation func{ REL::ID(526625) }; + REL::Relocation func{ REL::ID(2204287) }; return func(this, a_compiler, a_compilerIndex, a_ownerObject); } @@ -325,7 +325,7 @@ namespace RE static void SetProcessScripts(bool a_processScripts) { using func_t = decltype(&Script::SetProcessScripts); - REL::Relocation func{ REL::ID(1188642) }; + REL::Relocation func{ REL::ID(2204309) }; return func(a_processScripts); } diff --git a/CommonLibF4/include/RE/Bethesda/Settings.h b/CommonLibF4/include/RE/Bethesda/Settings.h index be1a921a..009a0551 100644 --- a/CommonLibF4/include/RE/Bethesda/Settings.h +++ b/CommonLibF4/include/RE/Bethesda/Settings.h @@ -339,13 +339,13 @@ namespace RE [[nodiscard]] static void InitCollection() { using func_t = decltype(&GameSettingCollection::InitCollection); - REL::Relocation func{ REL::ID(948832) }; + REL::Relocation func{ REL::ID(2188690) }; return func(); } [[nodiscard]] static GameSettingCollection* GetSingleton() { - REL::Relocation singleton{ REL::ID(8308) }; + REL::Relocation singleton{ REL::ID(2690301) }; return *singleton; } @@ -366,7 +366,7 @@ namespace RE [[nodiscard]] static INISettingCollection* GetSingleton() { - REL::Relocation singleton{ REL::ID(791183) }; + REL::Relocation singleton{ REL::ID(2704108) }; return *singleton; } @@ -391,7 +391,7 @@ namespace RE [[nodiscard]] static INIPrefSettingCollection* GetSingleton() { - REL::Relocation singleton{ REL::ID(767844) }; + REL::Relocation singleton{ REL::ID(2703234) }; return *singleton; } }; diff --git a/CommonLibF4/include/RE/Bethesda/TESCondition.h b/CommonLibF4/include/RE/Bethesda/TESCondition.h index 2fe49ae9..2662b5c7 100644 --- a/CommonLibF4/include/RE/Bethesda/TESCondition.h +++ b/CommonLibF4/include/RE/Bethesda/TESCondition.h @@ -104,7 +104,7 @@ namespace RE [[nodiscard]] bool IsTrue(TESObjectREFR* a_actionRef, TESObjectREFR* a_targetRef) const { using func_t = decltype(&TESCondition::IsTrue); - REL::Relocation func{ REL::ID(1275731) }; + REL::Relocation func{ REL::ID(2211989) }; return func(this, a_actionRef, a_targetRef); } diff --git a/CommonLibF4/include/RE/Bethesda/TESDataHandler.h b/CommonLibF4/include/RE/Bethesda/TESDataHandler.h index 6a97a121..6d6ab66d 100644 --- a/CommonLibF4/include/RE/Bethesda/TESDataHandler.h +++ b/CommonLibF4/include/RE/Bethesda/TESDataHandler.h @@ -65,7 +65,7 @@ namespace RE public: [[nodiscard]] static TESDataHandler* GetSingleton() { - REL::Relocation singleton{ REL::ID(711558) }; + REL::Relocation singleton{ REL::ID(2688883) }; return *singleton; } diff --git a/CommonLibF4/include/RE/Bethesda/TESFile.h b/CommonLibF4/include/RE/Bethesda/TESFile.h index e1fa59ce..5efa86c0 100644 --- a/CommonLibF4/include/RE/Bethesda/TESFile.h +++ b/CommonLibF4/include/RE/Bethesda/TESFile.h @@ -101,14 +101,14 @@ namespace RE [[nodiscard]] bool CloseTES(bool a_forceClose) { using func_t = decltype(&TESFile::CloseTES); - REL::Relocation func{ REL::ID(766555) }; + REL::Relocation func{ REL::ID(2192491) }; return func(this, a_forceClose); } [[nodiscard]] bool GetChunkData(void* a_data, std::uint32_t a_maxSize) { using func_t = bool (TESFile::*)(void*, uint32_t); - REL::Relocation func{ REL::ID(188910) }; + REL::Relocation func{ REL::ID(2192538) }; return func(this, a_data, a_maxSize); } @@ -131,35 +131,35 @@ namespace RE [[nodiscard]] std::uint32_t GetTESChunk() { using func_t = decltype(&TESFile::GetTESChunk); - REL::Relocation func{ REL::ID(641361) }; + REL::Relocation func{ REL::ID(2192536) }; return func(this); } [[nodiscard]] bool NextChunk() { using func_t = decltype(&TESFile::NextChunk); - REL::Relocation func{ REL::ID(1252764) }; + REL::Relocation func{ REL::ID(2192537) }; return func(this); } [[nodiscard]] bool NextForm(bool a_skipIgnored) { using func_t = decltype(&TESFile::NextForm); - REL::Relocation func{ REL::ID(644374) }; + REL::Relocation func{ REL::ID(2192527) }; return func(this, a_skipIgnored); } [[nodiscard]] bool NextGroup() { using func_t = decltype(&TESFile::NextGroup); - REL::Relocation func{ REL::ID(339855) }; + REL::Relocation func{ REL::ID(2192522) }; return func(this); } [[nodiscard]] bool OpenTES(char* a_path, const char* a_filename, NiFile::OpenMode a_accessMode, bool a_lock) { using func_t = bool (TESFile::*)(char*, const char*, NiFile::OpenMode, bool); - REL::Relocation func{ REL::ID(728465) }; + REL::Relocation func{ REL::ID(2192490) }; return func(this, a_path, a_filename, a_accessMode, a_lock); } diff --git a/CommonLibF4/include/RE/Bethesda/TESForms.h b/CommonLibF4/include/RE/Bethesda/TESForms.h index 8dd626ff..3142cc6b 100644 --- a/CommonLibF4/include/RE/Bethesda/TESForms.h +++ b/CommonLibF4/include/RE/Bethesda/TESForms.h @@ -726,8 +726,8 @@ namespace RE BSTHashMap*, std::reference_wrapper> { - REL::Relocation**> allForms{ REL::ID(422985) }; - REL::Relocation allFormsMapLock{ REL::ID(691815) }; + REL::Relocation**> allForms{ REL::ID(2689178) }; + REL::Relocation allFormsMapLock{ REL::ID(2689189) }; return { *allForms, *allFormsMapLock }; } @@ -736,8 +736,8 @@ namespace RE BSTHashMap*, std::reference_wrapper> { - REL::Relocation**> allFormsByEditorID{ REL::ID(642758) }; - REL::Relocation allFormsEditorIDMapLock{ REL::ID(910917) }; + REL::Relocation**> allFormsByEditorID{ REL::ID(2689179) }; + REL::Relocation allFormsEditorIDMapLock{ REL::ID(2689190) }; return { *allFormsByEditorID, *allFormsEditorIDMapLock }; } @@ -749,7 +749,7 @@ namespace RE [[nodiscard]] TESFile* GetFile(std::int32_t a_index = -1) const { using func_t = decltype(&TESForm::GetFile); - REL::Relocation func{ REL::ID(1376557) }; + REL::Relocation func{ REL::ID(2193103) }; return func(this, a_index); } @@ -800,7 +800,7 @@ namespace RE [[nodiscard]] static ENUM_FORM_ID GetFormTypeFromString(const char* a_formTypeString) { using func_t = decltype(&TESForm::GetFormTypeFromString); - REL::Relocation func{ REL::ID(565203) }; + REL::Relocation func{ REL::ID(2193108) }; return func(a_formTypeString); } @@ -1496,14 +1496,14 @@ namespace RE [[nodiscard]] std::int32_t GetDataX() { using func_t = decltype(&TESObjectCELL::GetDataX); - REL::Relocation func{ REL::ID(445210) }; + REL::Relocation func{ REL::ID(2200213) }; return func(this); } [[nodiscard]] std::int32_t GetDataY() { using func_t = decltype(&TESObjectCELL::GetDataY); - REL::Relocation func{ REL::ID(1322816) }; + REL::Relocation func{ REL::ID(2200214) }; return func(this); } @@ -1517,7 +1517,7 @@ namespace RE [[nodiscard]] BGSLocation* GetLocation() const { using func_t = decltype(&TESObjectCELL::GetLocation); - REL::Relocation func{ REL::ID(868663) }; + REL::Relocation func{ REL::ID(2200179) }; return func(this); } diff --git a/CommonLibF4/include/RE/Bethesda/UI.h b/CommonLibF4/include/RE/Bethesda/UI.h index 5d2c3239..2c0ed038 100644 --- a/CommonLibF4/include/RE/Bethesda/UI.h +++ b/CommonLibF4/include/RE/Bethesda/UI.h @@ -74,7 +74,7 @@ namespace RE [[nodiscard]] static UI* GetSingleton() { - REL::Relocation singleton{ REL::ID(548587) }; + REL::Relocation singleton{ REL::ID(2689028) }; return *singleton; } diff --git a/CommonLibF4/include/RE/NetImmerse/NiMatrix3.h b/CommonLibF4/include/RE/NetImmerse/NiMatrix3.h index 41daccbf..9b06df0f 100644 --- a/CommonLibF4/include/RE/NetImmerse/NiMatrix3.h +++ b/CommonLibF4/include/RE/NetImmerse/NiMatrix3.h @@ -85,7 +85,7 @@ namespace RE bool ToEulerAnglesXYZ(float& x, float& y, float& z) { using func_t = decltype(&NiMatrix3::ToEulerAnglesXYZ); - REL::Relocation func{ REL::ID(34114) }; + REL::Relocation func{ REL::ID(2269806) }; return func(this, x, y, z); } }; diff --git a/CommonLibF4/src/F4SE/Impl/WinAPI.cpp b/CommonLibF4/src/F4SE/Impl/WinAPI.cpp index 079f59c2..951cc866 100644 --- a/CommonLibF4/src/F4SE/Impl/WinAPI.cpp +++ b/CommonLibF4/src/F4SE/Impl/WinAPI.cpp @@ -47,6 +47,7 @@ #include #pragma warning(pop) +#undef GetComputerName #undef GetEnvironmentVariable #undef GetFileVersionInfo #undef GetFileVersionInfoSize @@ -60,6 +61,16 @@ extern "C" IMAGE_DOS_HEADER __ImageBase; // NOLINT(bugprone-reserved-identifier namespace F4SE::WinAPI { + bool(GetComputerName)( + char* a_buffer, + std::uint32_t* a_size) noexcept + { + return static_cast( + ::GetComputerNameA( + static_cast<::LPSTR>(a_buffer), + reinterpret_cast<::LPDWORD>(a_size))); + } + void*(GetCurrentModule)() noexcept { return static_cast(