From 8cf586a54a45dde066ce73749085e814ec13436b Mon Sep 17 00:00:00 2001 From: Angad <66992519+ThirdEyeSqueegee@users.noreply.github.com> Date: Fri, 20 Oct 2023 07:43:45 -0700 Subject: [PATCH 01/15] refactor: rename Offsets_*.h to IDs_*.h (related: #175) (#176) --- CommonLibSF/include/RE/{Offsets_NiRTTI.h => IDs_NiRTTI.h} | 0 CommonLibSF/include/RE/{Offsets_RTTI.h => IDs_RTTI.h} | 0 CommonLibSF/include/RE/{Offsets_VTABLE.h => IDs_VTABLE.h} | 0 CommonLibSF/include/RE/Starfield.h | 6 +++--- CommonLibSF/include/SFSE/Impl/PCH.h | 6 +++--- 5 files changed, 6 insertions(+), 6 deletions(-) rename CommonLibSF/include/RE/{Offsets_NiRTTI.h => IDs_NiRTTI.h} (100%) rename CommonLibSF/include/RE/{Offsets_RTTI.h => IDs_RTTI.h} (100%) rename CommonLibSF/include/RE/{Offsets_VTABLE.h => IDs_VTABLE.h} (100%) diff --git a/CommonLibSF/include/RE/Offsets_NiRTTI.h b/CommonLibSF/include/RE/IDs_NiRTTI.h similarity index 100% rename from CommonLibSF/include/RE/Offsets_NiRTTI.h rename to CommonLibSF/include/RE/IDs_NiRTTI.h diff --git a/CommonLibSF/include/RE/Offsets_RTTI.h b/CommonLibSF/include/RE/IDs_RTTI.h similarity index 100% rename from CommonLibSF/include/RE/Offsets_RTTI.h rename to CommonLibSF/include/RE/IDs_RTTI.h diff --git a/CommonLibSF/include/RE/Offsets_VTABLE.h b/CommonLibSF/include/RE/IDs_VTABLE.h similarity index 100% rename from CommonLibSF/include/RE/Offsets_VTABLE.h rename to CommonLibSF/include/RE/IDs_VTABLE.h diff --git a/CommonLibSF/include/RE/Starfield.h b/CommonLibSF/include/RE/Starfield.h index f5cb7a66..81ea49ed 100644 --- a/CommonLibSF/include/RE/Starfield.h +++ b/CommonLibSF/include/RE/Starfield.h @@ -86,6 +86,9 @@ #include "RE/I/IPostAnimationChannelUpdateFunctor.h" #include "RE/I/IStoreAnimationActions.h" #include "RE/IDs.h" +#include "RE/IDs_NiRTTI.h" +#include "RE/IDs_RTTI.h" +#include "RE/IDs_VTABLE.h" #include "RE/M/MagicTarget.h" #include "RE/M/MemoryManager.h" #include "RE/M/MenuOpenCloseEvent.h" @@ -94,9 +97,6 @@ #include "RE/N/NativeFunctionBase.h" #include "RE/N/NiPoint3.h" #include "RE/N/NiSmartPointer.h" -#include "RE/Offsets_NiRTTI.h" -#include "RE/Offsets_RTTI.h" -#include "RE/Offsets_VTABLE.h" #include "RE/P/PerkRankData.h" #include "RE/P/PlayerCamera.h" #include "RE/P/PlayerCharacter.h" diff --git a/CommonLibSF/include/SFSE/Impl/PCH.h b/CommonLibSF/include/SFSE/Impl/PCH.h index 2b37d1f2..a9481fca 100644 --- a/CommonLibSF/include/SFSE/Impl/PCH.h +++ b/CommonLibSF/include/SFSE/Impl/PCH.h @@ -754,9 +754,9 @@ namespace REL #include "REL/REL.h" #include "RE/IDs.h" -#include "RE/Offsets_NiRTTI.h" -#include "RE/Offsets_RTTI.h" -#include "RE/Offsets_VTABLE.h" +#include "RE/IDs_NiRTTI.h" +#include "RE/IDs_RTTI.h" +#include "RE/IDs_VTABLE.h" #include "RE/F/FormTypes.h" From d7073a4d742108740cb45cf53c622471da63c905 Mon Sep 17 00:00:00 2001 From: maintenance <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 20 Oct 2023 14:44:29 +0000 Subject: [PATCH 02/15] ci: maintenance `2023-10-20.1` --- CommonLibSF/vcpkg.json | 2 +- README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CommonLibSF/vcpkg.json b/CommonLibSF/vcpkg.json index 1e14f58c..01065ebc 100644 --- a/CommonLibSF/vcpkg.json +++ b/CommonLibSF/vcpkg.json @@ -1,7 +1,7 @@ { "$schema": "https://raw.githubusercontent.com/microsoft/vcpkg-tool/main/docs/vcpkg.schema.json", "name": "commonlibsf", - "version-date": "2023-10-20", + "version-date": "2023-10-20.1", "port-version": 0, "description": "A collaborative reverse-engineered library for Starfield.", "homepage": "https://github.com/Starfield-Reverse-Engineering/CommonLibSF", diff --git a/README.md b/README.md index ae20040d..595b9386 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ [![C++23](https://img.shields.io/static/v1?label=standard&message=c%2B%2B23&color=blue&logo=c%2B%2B&&logoColor=red&style=flat)](https://en.cppreference.com/w/cpp/compiler_support) ![Platform](https://img.shields.io/static/v1?label=platform&message=windows&color=dimgray&style=flat&logo=windows) [![Game version](https://img.shields.io/badge/game%20version-1.7.36-orange)](#Developing-with-CommonLibSF) -[![VCPKG_VER](https://img.shields.io/static/v1?label=vcpkg%20registry&message=2023-10-20&color=green&style=flat)](https://github.com/Starfield-Reverse-Engineering/Starfield-RE-vcpkg) +[![VCPKG_VER](https://img.shields.io/static/v1?label=vcpkg%20registry&message=2023-10-20.1&color=green&style=flat)](https://github.com/Starfield-Reverse-Engineering/Starfield-RE-vcpkg) [![Main CI](https://img.shields.io/github/actions/workflow/status/Starfield-Reverse-Engineering/CommonLibSF/main_ci.yml)](https://github.com/Starfield-Reverse-Engineering/CommonLibSF/actions/workflows/main_ci.yml) ## Build Dependencies From 50da4a557ab038b4cdf708c29223244726f536c2 Mon Sep 17 00:00:00 2001 From: Angad <66992519+ThirdEyeSqueegee@users.noreply.github.com> Date: Fri, 20 Oct 2023 10:44:31 -0700 Subject: [PATCH 03/15] feat: add write_thunk_jump to Utilities.h (#178) --- CommonLibSF/include/SFSE/Utilities.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CommonLibSF/include/SFSE/Utilities.h b/CommonLibSF/include/SFSE/Utilities.h index 20b22fd9..0591e415 100644 --- a/CommonLibSF/include/SFSE/Utilities.h +++ b/CommonLibSF/include/SFSE/Utilities.h @@ -31,4 +31,12 @@ namespace SFSE::stl { write_vfunc(To::VTABLE[a_vtableIdx]); } + + template + constexpr void write_thunk_jump(const std::uintptr_t a_src) noexcept + { + SFSE::AllocTrampoline(14); + auto& trampoline = SFSE::GetTrampoline(); + T::func = trampoline.write_branch(a_src, T::thunk); + } } From ec977873a65651ea4b74adb03349bdfaf8b6cbb0 Mon Sep 17 00:00:00 2001 From: Angad <66992519+ThirdEyeSqueegee@users.noreply.github.com> Date: Fri, 20 Oct 2023 10:44:40 -0700 Subject: [PATCH 04/15] chore: bump CMake version to 3.27 (#179) --- CommonLibSF/CMakeLists.txt | 2 +- CommonLibSF/CMakePresets.json | 2 +- README.md | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CommonLibSF/CMakeLists.txt b/CommonLibSF/CMakeLists.txt index a8d31b35..51ee47b0 100644 --- a/CommonLibSF/CMakeLists.txt +++ b/CommonLibSF/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.26) +cmake_minimum_required(VERSION 3.27) message("Using toolchain file ${CMAKE_TOOLCHAIN_FILE}.") # singleton target across multiple projects diff --git a/CommonLibSF/CMakePresets.json b/CommonLibSF/CMakePresets.json index 11659a4c..dae7e35a 100644 --- a/CommonLibSF/CMakePresets.json +++ b/CommonLibSF/CMakePresets.json @@ -2,7 +2,7 @@ "version": 6, "cmakeMinimumRequired": { "major": 3, - "minor": 26, + "minor": 27, "patch": 0 }, "configurePresets": [ diff --git a/README.md b/README.md index 595b9386..ec3e46f2 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ ## Build Dependencies -- [CMake v3.26+](https://cmake.org/) or [XMake v2.8.2+](https://github.com/xmake-io/xmake/releases) +- [CMake v3.27+](https://cmake.org/) or [XMake v2.8.2+](https://github.com/xmake-io/xmake/releases) - Add this to your PATH - [vcpkg](https://github.com/microsoft/vcpkg) (CMake) - Add the environment variable `VCPKG_ROOT` with the value as the path to the folder containing vcpkg From 74656ed1b74a10863487cfcb7e9767775c3e01c9 Mon Sep 17 00:00:00 2001 From: maintenance <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 20 Oct 2023 17:45:18 +0000 Subject: [PATCH 05/15] ci: maintenance `2023-10-20.2` --- CommonLibSF/vcpkg.json | 2 +- README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CommonLibSF/vcpkg.json b/CommonLibSF/vcpkg.json index 01065ebc..33274f2a 100644 --- a/CommonLibSF/vcpkg.json +++ b/CommonLibSF/vcpkg.json @@ -1,7 +1,7 @@ { "$schema": "https://raw.githubusercontent.com/microsoft/vcpkg-tool/main/docs/vcpkg.schema.json", "name": "commonlibsf", - "version-date": "2023-10-20.1", + "version-date": "2023-10-20.2", "port-version": 0, "description": "A collaborative reverse-engineered library for Starfield.", "homepage": "https://github.com/Starfield-Reverse-Engineering/CommonLibSF", diff --git a/README.md b/README.md index ec3e46f2..f9fe355a 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ [![C++23](https://img.shields.io/static/v1?label=standard&message=c%2B%2B23&color=blue&logo=c%2B%2B&&logoColor=red&style=flat)](https://en.cppreference.com/w/cpp/compiler_support) ![Platform](https://img.shields.io/static/v1?label=platform&message=windows&color=dimgray&style=flat&logo=windows) [![Game version](https://img.shields.io/badge/game%20version-1.7.36-orange)](#Developing-with-CommonLibSF) -[![VCPKG_VER](https://img.shields.io/static/v1?label=vcpkg%20registry&message=2023-10-20.1&color=green&style=flat)](https://github.com/Starfield-Reverse-Engineering/Starfield-RE-vcpkg) +[![VCPKG_VER](https://img.shields.io/static/v1?label=vcpkg%20registry&message=2023-10-20.2&color=green&style=flat)](https://github.com/Starfield-Reverse-Engineering/Starfield-RE-vcpkg) [![Main CI](https://img.shields.io/github/actions/workflow/status/Starfield-Reverse-Engineering/CommonLibSF/main_ci.yml)](https://github.com/Starfield-Reverse-Engineering/CommonLibSF/actions/workflows/main_ci.yml) ## Build Dependencies From 2c844e2d786fa65fd6616803398262ee744656bc Mon Sep 17 00:00:00 2001 From: powerof3 <32599957+powerof3@users.noreply.github.com> Date: Sat, 21 Oct 2023 00:24:09 +0530 Subject: [PATCH 06/15] feat: inventory RE (#180) --- .../include/RE/B/BGSInventoryInterface.h | 70 +++ CommonLibSF/include/RE/B/BGSInventoryItem.h | 45 ++ CommonLibSF/include/RE/IDs.h | 7 + CommonLibSF/include/RE/T/TESObjectREFR.h | 470 ++++++++++-------- CommonLibSF/src/RE/T/TESObjectREFR.cpp | 27 + 5 files changed, 413 insertions(+), 206 deletions(-) create mode 100644 CommonLibSF/include/RE/B/BGSInventoryInterface.h create mode 100644 CommonLibSF/include/RE/B/BGSInventoryItem.h diff --git a/CommonLibSF/include/RE/B/BGSInventoryInterface.h b/CommonLibSF/include/RE/B/BGSInventoryInterface.h new file mode 100644 index 00000000..19b23d5a --- /dev/null +++ b/CommonLibSF/include/RE/B/BGSInventoryInterface.h @@ -0,0 +1,70 @@ +#pragma once + +#include "RE/B/BSTArray.h" +#include "RE/B/BSTEvent.h" +#include "RE/B/BSTSingleton.h" + +namespace RE +{ + class BGSInventoryItem; + class TESBoundObject; + + namespace InventoryInterface + { + struct FavoriteChangedEvent + { + public: + ~FavoriteChangedEvent() noexcept {} // intentional + + // members + BGSInventoryItem* itemAffected; // 0 + }; + static_assert(sizeof(FavoriteChangedEvent) == 0x8); + + struct Handle + { + public: + ~Handle() noexcept {} // intentional + + // members + std::uint32_t id; // 0 + }; + static_assert(sizeof(Handle) == 0x4); + } + + class BGSInventoryInterface : + BSTSingletonSDM, // 00 + BSTEventSource // 08 + { + public: + struct Agent + { + public: + // members + std::uint32_t handleID; // 0 + std::uint32_t itemOwner; // 4 - TESPointerHandle + std::uint16_t listIndex; // 8 + std::uint16_t refCount; // A + }; + static_assert(sizeof(Agent) == 0xC); + + [[nodiscard]] static BGSInventoryInterface* GetSingleton() + { + REL::Relocation singleton { ID::BGSInventoryInterface::singleton }; + return *singleton; + } + + [[nodiscard]] TESBoundObject* GetInventoryObject(const std::uint32_t& a_handleID) const + { + using func_t = decltype(&BGSInventoryInterface::GetInventoryObject); + REL::Relocation func{ ID::BGSInventoryInterface::GetInventoryObject }; + return func(this, a_handleID); + } + + virtual ~BGSInventoryInterface(); // 00 + + // members + BSTArray agentArray; // 30 + }; + static_assert(sizeof(BGSInventoryInterface) == 0x40); +} diff --git a/CommonLibSF/include/RE/B/BGSInventoryItem.h b/CommonLibSF/include/RE/B/BGSInventoryItem.h new file mode 100644 index 00000000..72e42ad9 --- /dev/null +++ b/CommonLibSF/include/RE/B/BGSInventoryItem.h @@ -0,0 +1,45 @@ +#pragma once + +#include "RE/B/BSTArray.h" +#include "RE/B/BSTSmartPointer.h" + +namespace RE +{ + class ExtraDataList; + class TBO_InstanceData; + class TESBoundObject; + + class BGSInventoryItem + { + public: + struct Stack + { + public: + // members + BSTSmartPointer extra; // 00 + std::uint32_t unk10; // 10 + }; + static_assert(sizeof(Stack) == 0x10); + + enum class Flag + { + kSlotIndex1 = 1 << 0, + kSlotIndex2 = 1 << 1, + kSlotIndex3 = 1 << 2, + kEquipStateLocked = 1 << 3, + kInvShouldEquip = 1 << 4, + kTemporary = 1 << 5, + kSlotMask = kSlotIndex1 | kSlotIndex2 | kSlotIndex3 + }; + + [[nodiscard]] bool IsEquipped() const noexcept { return flags.any(Flag::kSlotMask); } + + // members + TESBoundObject* object; // 00 + BSTSmartPointer instanceData; // 08 + BSTArray stacks; // 10 + stl::enumeration flags; // 20 + std::int8_t unk24; // 24 + }; + static_assert(sizeof(BGSInventoryItem) == 0x28); +} diff --git a/CommonLibSF/include/RE/IDs.h b/CommonLibSF/include/RE/IDs.h index 415037ce..7be86a8a 100644 --- a/CommonLibSF/include/RE/IDs.h +++ b/CommonLibSF/include/RE/IDs.h @@ -25,6 +25,12 @@ namespace RE::ID inline constexpr REL::ID GetByType{ 83208 }; } + namespace BGSInventoryInterface + { + inline constexpr REL::ID singleton{ 825787 }; + inline constexpr REL::ID GetInventoryObject{ 87520 }; + } + namespace BGSObjectInstance { inline constexpr REL::ID ctor{ 101725 }; @@ -222,6 +228,7 @@ namespace RE::ID inline constexpr REL::ID HasKeyword{ 80343 }; inline constexpr REL::ID IsCrimeToActivate{ 106755 }; inline constexpr REL::ID IsInSpace{ 106767 }; + inline constexpr REL::ID IsObjectEquipped{ 106991 }; inline constexpr REL::ID IsSpaceshipDocked{ 174146 }; inline constexpr REL::ID IsSpaceshipLanded{ 173880 }; } diff --git a/CommonLibSF/include/RE/T/TESObjectREFR.h b/CommonLibSF/include/RE/T/TESObjectREFR.h index 20041a8d..448fe95c 100644 --- a/CommonLibSF/include/RE/T/TESObjectREFR.h +++ b/CommonLibSF/include/RE/T/TESObjectREFR.h @@ -2,6 +2,7 @@ #include "RE/A/ActorValueOwner.h" #include "RE/B/BGSInventoryList.h" +#include "RE/B/BSContainer.h" #include "RE/B/BSLock.h" #include "RE/B/BSTEvent.h" #include "RE/B/BSTSmartPointer.h" @@ -16,8 +17,11 @@ namespace RE { + class TESContainer; class Actor; + class BGSEquipSlot; class BGSLocation; + class BGSObjectInstance; class BGSScene; class BSAnimationGraphEvent; class BSTransformDeltaEvent; @@ -35,6 +39,56 @@ namespace RE struct ActorValueChangedEvent; } + enum class ITEM_TRANSFER_REASON + { + kNone, + kStealing, + kSelling, + kDropping, + kStoreInContainer, + kStoreInTeammate, + kLoading, + kWorldContainer, + kScrapping, + kCrafting, + kQuestReward, + kQuestItem, + kTakeFromActivator, + kDeathDrop, + kCellOverflow, + kPowerArmorFrame, + kDebug, + kEditor, + kQuestLoad, + kVendorLoad, + kAddWornItem, + kAddOutfit, + kInitialize, + kScriptAddItem, + kScriptRemoveItem, + kScriptStealing, + kScriptEquipItem, + kScriptAddKey, + kScriptStoreInContainer, + kModLockpickRewardKey, + kModRewardAmmo, + kShipAddItem, + kAddNote, + kEquipWeapon, + kScriptedEquip, + kCurrencyPlayerToVendor, + kCurrencyVendorToPlayer, + kCurrencyPayFine, + kCurrencyBuyShip, + kCurrencySellShip, + kCurrencyBuyShipEdit, + kCurrencySellShipEdit, + kLootBody, + kRemoveStolenItem, + kCurrencyRegisterShip, + kConsumingIngredient + }; + class IMovementProcessMessageInterface : public IMovementInterface // 00 { @@ -89,212 +143,215 @@ namespace RE ~TESObjectREFR() override; // 00 // override (TESForm) - virtual void Predestroy(); // 062 - virtual bool Unk_63(); // 063 - { return extraList.HasExtraData(14);}; - virtual bool GetEditorLocation(NiPoint3& a_originalLocation, NiPoint3& a_originalAngle, TESForm*& a_locationFormOut); // 064 - new - virtual void Unk_65(); // 065 - virtual BGSLocation* GetEditorLocation() const; // 066 - virtual bool GetEditorLocation(NiPoint3& a_originalLocation, NiPoint3& a_originalAngle, TESForm*& a_locationFormOut, TESForm* a_locationForm); // 067 - virtual bool IsTalking() const; // 068 - virtual void ForceEditorLocation(BGSLocation* a_location); // 069 - virtual void Unk_6A(); // 06A - virtual void UpdateSoundCallBack(bool a_endSceneAction); // 06B - virtual bool SetDialoguewithPlayer(bool a_flag, bool a_forceGreet, TESTopicInfo* a_topicInfo); // 06C - virtual void Unk_6D(); // 06D - virtual void Unk_6E(); // 06E - virtual void Unk_6F(); // 06F - virtual void Unk_70(); // 070 - virtual void Unk_71(); // 071 - virtual void Unk_72(); // 072 - virtual void Unk_73(); // 073 - virtual void Unk_74(); // 074 - virtual void Unk_75(); // 075 - virtual void Unk_76(); // 076 - virtual void Unk_77(); // 077 - virtual bool IsInZeroGravity(); // 078 - virtual void Unk_79(); // 079 - virtual BGSScene* GetCurrentScene() const; // 07A - virtual void Unk_7B(); // 07B - virtual void Unk_7C(); // 07C - virtual void Unk_7D(); // 07D - virtual void Unk_7E(); // 07E - virtual void Unk_7F(); // 07F - virtual void Unk_80(); // 080 - virtual void Unk_81(); // 081 - virtual void Unk_82(); // 082 - virtual void Unk_83(); // 083 - virtual void Unk_84(); // 084 - virtual void Unk_85(); // 085 - virtual void Unk_86(); // 086 - virtual void Unk_87(); // 087 - virtual void Unk_88(); // 088 - virtual void Unk_89(); // 089 - virtual void Unk_8A(); // 08A - virtual void Unk_8B(); // 08B - virtual void Unk_8C(); // 08C - virtual void Unk_8D(); // 08D - virtual void Unk_8E(); // 08E - virtual void Unk_8F(); // 08F - virtual void Unk_90(); // 090 - virtual void Unk_91(); // 091 - virtual void Unk_92(); // 092 - virtual void Unk_93(); // 093 - virtual void Unk_94(); // 094 - virtual void Unk_95(); // 095 - virtual void Unk_96(); // 096 - virtual void Unk_97(); // 097 - virtual float GetGravityScale(); // 098 - new - virtual void Unk_99(); // 099 - virtual void Unk_9A(); // 09A - virtual void Unk_9B(); // 09B - virtual void Unk_9C(); // 09C - virtual void Unk_9D(); // 09D - virtual void Unk_9E(); // 09E - virtual bool IsChild() const; // 09F - virtual void Unk_A0(); // 0A0 - virtual void Unk_A1(); // 0A1 - virtual void Unk_A2(); // 0A2 - virtual void Unk_A3(); // 0A3 - virtual void Unk_A4(); // 0A4 - virtual void Unk_A5(); // 0A5 - virtual void Unk_A6(); // 0A6 - virtual void Unk_A7(); // 0A7 - virtual void Unk_A8(); // 0A8 - virtual void Unk_A9(); // 0A9 - virtual void Unk_AA(); // 0AA - virtual void Unk_AB(); // 0AB - { return Get3D(a_objectOut) };? - virtual void Unk_AC(); // 0AC - Get3D(NiPointer&)? - virtual void Unk_AD(); // 0AD - virtual void Unk_AE(); // 0AE - virtual TESModel* GetTESModel() const; // 0AF - virtual TESRace* GetVisualsRace() const; // 0B0 - virtual void Unk_B1(); // 0B1 - virtual void Unk_B2(); // 0B2 - virtual void Unk_B3(); // 0B3 - virtual NiPoint3 GetBoundMin() const; // 0B4 - virtual NiPoint3 GetBoundMax() const; // 0B5 - virtual void Unk_B6(); // 0B6 - virtual void Unk_B7(); // 0B7 - virtual void Unk_B8(); // 0B8 - virtual void Unk_B9(); // 0B9 - virtual void Unk_BA(); // 0BA - virtual void Unk_BB(); // 0BB - virtual void Unk_BC(); // 0BC - virtual void Unk_BD(); // 0BD - virtual void Unk_BE(); // 0BE - virtual void Unk_BF(); // 0BF - virtual void Unk_C0(); // 0C0 - virtual void Unk_C1(); // 0C1 - virtual void Unk_C2(); // 0C2 - virtual void Unk_C3(); // 0C3 - virtual void Unk_C4(); // 0C4 - virtual void Unk_C5(); // 0C5 - virtual void Unk_C6(); // 0C6 - virtual void Unk_C7(); // 0C7 - virtual void Unk_C8(); // 0C8 - virtual void Unk_C9(); // 0C9 - virtual void Unk_CA(); // 0CA - virtual void Unk_CB(); // 0CB - virtual void Unk_CC(); // 0CC - virtual void Unk_CD(); // 0CD - virtual void Unk_CE(); // 0CE - virtual void Unk_CF(); // 0CF - virtual void Unk_D0(); // 0D0 - virtual void Unk_D1(); // 0D1 - virtual void Unk_D2(); // 0D2 - virtual void Unk_D3(); // 0D3 - virtual void Unk_D4(); // 0D4 - virtual void Unk_D5(); // 0D5 - virtual void Unk_D6(); // 0D6 - virtual void Unk_D7(); // 0D7 - virtual void Unk_D8(); // 0D8 - virtual void Unk_D9(); // 0D9 - virtual void Unk_DA(); // 0DA - virtual void Unk_DB(); // 0DB - virtual void Unk_DC(); // 0DC - virtual void Unk_DD(); // 0DD - virtual void Unk_DE(); // 0DE - virtual void Unk_DF(); // 0DF - virtual void Unk_E0(); // 0E0 - virtual void Unk_E1(); // 0E1 - virtual void Unk_E2(); // 0E2 - virtual void Unk_E3(); // 0E3 - virtual void Unk_E4(); // 0E4 - virtual void Unk_E5(); // 0E5 - virtual void Unk_E6(); // 0E6 - virtual void Unk_E7(); // 0E7 - virtual void Unk_E8(); // 0E8 - virtual void Unk_E9(); // 0E9 - virtual void Unk_EA(); // 0EA - virtual void Unk_EB(); // 0EB - virtual void Unk_EC(); // 0EC - virtual void Unk_ED(); // 0ED - virtual void Unk_EE(); // 0EE - virtual void Unk_EF(); // 0EF - virtual void Unk_F0(); // 0F0 - virtual void Unk_F1(); // 0F1 - virtual const char* GetDisplayFullName(); // 0F2 - virtual void Unk_F3(); // 0F3 - virtual void Unk_F4(); // 0F4 - virtual void Unk_F5(); // 0F5 - virtual void Unk_F6(); // 0F6 - virtual void SetObjectReference(TESBoundObject* a_object, bool a_clearData); // 0F7 - virtual void Unk_F8(); // 0F8 - virtual void Unk_F9(); // 0F9 - virtual void Unk_FA(); // 0FA - virtual void Unk_FB(); // 0FB - virtual void Unk_FC(); // 0FC - virtual void Unk_FD(); // 0FD - virtual void Unk_FE(); // 0FE - virtual void Unk_FF(); // 0FF - virtual void Unk_100(); // 100 - virtual void Unk_101(); // 101 - virtual void Unk_102(); // 102 - virtual void Unk_103(); // 103 - virtual void Unk_104(); // 104 - virtual void Unk_105(); // 105 - virtual void Unk_106(); // 106 - virtual void Unk_107(); // 107 - virtual void Unk_108(); // 108 - virtual void Unk_109(); // 109 - virtual void Unk_10A(); // 10A - virtual void Unk_10B(); // 10B - virtual void SetParentCell(TESObjectCELL* a_cell); // 10C - virtual bool IsDead(bool a_notEssential) const; // 10D - virtual bool ProcessInWater(std::uint32_t a_bodyID, float a_waterHeight, float a_deltaTime); // 10E - virtual void Unk_10F(); // 10F - virtual void Unk_110(); // 110 - virtual void Unk_111(); // 111 - virtual void Unk_112(); // 112 - virtual void Unk_113(); // 113 - virtual void Unk_114(); // 114 - virtual void Unk_115(); // 115 - virtual void Unk_116(); // 116 - virtual void Unk_117(); // 117 - virtual void Unk_118(); // 118 - virtual void Unk_119(); // 119 - virtual void Unk_11A(); // 11A - virtual void Unk_11B(); // 11B - virtual void Unk_11C(); // 11C - virtual void Unk_11D(); // 11D - virtual void Unk_11E(); // 11E - virtual void Unk_11F(); // 11F - virtual void Unk_120(); // 120 - virtual void Unk_121(); // 121 - virtual void Unk_122(); // 122 - virtual void Unk_123(); // 123 - virtual void Unk_124(); // 124 - virtual void Unk_125(); // 125 - virtual void Unk_126(); // 126 - virtual void Unk_127(); // 127 - virtual void Unk_128(); // 128 - virtual void Unk_129(); // 129 - virtual void Unk_12A(); // 12A - virtual void Unk_12B(); // 12B - virtual void Unk_12C(); // 12C - virtual void Unk_12D(); // 12D - virtual void Unk_12E(); // 12E - virtual void Unk_12F(); // 12F + virtual void Predestroy(); // 062 + virtual bool Unk_63(); // 063 - { return extraList.HasExtraData(14);}; + virtual bool GetEditorLocation(NiPoint3& a_originalLocation, NiPoint3& a_originalAngle, TESForm*& a_locationFormOut); // 064 - new + virtual void Unk_65(); // 065 + virtual BGSLocation* GetEditorLocation() const; // 066 + virtual bool GetEditorLocation(NiPoint3& a_originalLocation, NiPoint3& a_originalAngle, TESForm*& a_locationFormOut, TESForm* a_locationForm); // 067 + virtual bool IsTalking() const; // 068 + virtual void ForceEditorLocation(BGSLocation* a_location); // 069 + virtual void Unk_6A(); // 06A + virtual void UpdateSoundCallBack(bool a_endSceneAction); // 06B + virtual bool SetDialoguewithPlayer(bool a_flag, bool a_forceGreet, TESTopicInfo* a_topicInfo); // 06C + virtual void Unk_6D(); // 06D + virtual void Unk_6E(); // 06E + virtual void Unk_6F(); // 06F + virtual void Unk_70(); // 070 + virtual void Unk_71(); // 071 + virtual void Unk_72(); // 072 + virtual void Unk_73(); // 073 + virtual void Unk_74(); // 074 + virtual void Unk_75(); // 075 + virtual void Unk_76(); // 076 + virtual void Unk_77(); // 077 + virtual bool IsInZeroGravity(); // 078 + virtual void Unk_79(); // 079 + virtual BGSScene* GetCurrentScene() const; // 07A + virtual void Unk_7B(); // 07B + virtual void Unk_7C(); // 07C + virtual void Unk_7D(); // 07D + virtual void Unk_7E(); // 07E + virtual void Unk_7F(); // 07F + virtual void Unk_80(); // 080 + virtual void Unk_81(); // 081 + virtual void Unk_82(); // 082 + virtual void Unk_83(); // 083 + virtual void Unk_84(); // 084 + virtual void Unk_85(); // 085 + virtual void SetScale(float a_scale); // 086 + virtual void Unk_87(); // 087 + virtual void Unk_88(); // 088 + virtual void Unk_89(); // 089 + virtual void Unk_8A(); // 08A + virtual void Unk_8B(); // 08B + virtual void Unk_8C(); // 08C + virtual void Unk_8D(); // 08D + virtual void Unk_8E(); // 08E + virtual void Unk_8F(); // 08F + virtual void SetEquipStateLocked(const BGSObjectInstance& a_object, bool a_lock); // 090 + virtual void SendContainerChangedEvent(const TESObjectREFR* a_oldContainer, const TESObjectREFR* a_newContainer, const TESBoundObject* a_baseObject, std::int32_t a_count, std::uint32_t a_referenceFormID, std::uint16_t a_uniqueID, std::uint64_t a_arg7, std::uint32_t a_arg8) const; // 091 + virtual void UnequipArmorFromSlot(std::uint32_t a_bipedObject, bool a_markAsReequippable); // 092 + virtual void Unk_93(); // 093 + virtual void RemoveAllObjectsWorn(); // 094 + virtual void PostRemoveWornObject(const BGSObjectInstance& a_object, const BGSEquipSlot* a_equipSlot); // 095 + virtual void Set3DUpdateFlag(std::uint32_t a_flag); // 096 + virtual void ClearAll3DUpdateFlags(); // 097 + virtual float GetGravityScale(); // 098 - new + virtual float AdjustItemWeight(TESBoundObject& a_object, const BGSInventoryItem& a_invItem, float a_weight, bool* a_shouldModifyWholeStackOut); // 099 + virtual void AddObjectToContainer(TESBoundObject* a_obj, BSTSmartPointer a_extra, std::int32_t a_count, TESObjectREFR* a_oldContainer, ITEM_TRANSFER_REASON a_reason); // 09A + virtual void Unk_9B(); // 09B + virtual void Unk_9C(); // 09C + virtual void Unk_9D(); // 09D + virtual void Unk_9E(); // 09E + virtual bool IsChild() const; // 09F + virtual void Unk_A0(); // 0A0 + virtual void Unk_A1(); // 0A1 + virtual void Unk_A2(); // 0A2 + virtual void Unk_A3(); // 0A3 + virtual void Unk_A4(); // 0A4 + virtual void Unk_A5(); // 0A5 + virtual void Unk_A6(); // 0A6 + virtual void Unk_A7(); // 0A7 + virtual void Unk_A8(); // 0A8 + virtual void Unk_A9(); // 0A9 + virtual void Unk_AA(); // 0AA + virtual void Unk_AB(); // 0AB - { return Get3D(a_objectOut) };? + virtual void Unk_AC(); // 0AC - Get3D(NiPointer&)? + virtual void Unk_AD(); // 0AD + virtual void Unk_AE(); // 0AE + virtual TESModel* GetTESModel() const; // 0AF + virtual TESRace* GetVisualsRace() const; // 0B0 + virtual void Unk_B1(); // 0B1 + virtual void Unk_B2(); // 0B2 + virtual void Unk_B3(); // 0B3 + virtual NiPoint3 GetBoundMin() const; // 0B4 + virtual NiPoint3 GetBoundMax() const; // 0B5 + virtual void Unk_B6(); // 0B6 + virtual void Unk_B7(); // 0B7 + virtual void Unk_B8(); // 0B8 + virtual void Unk_B9(); // 0B9 + virtual void Unk_BA(); // 0BA + virtual void Unk_BB(); // 0BB + virtual void Unk_BC(); // 0BC + virtual void Unk_BD(); // 0BD + virtual void Unk_BE(); // 0BE + virtual void Unk_BF(); // 0BF + virtual void Unk_C0(); // 0C0 + virtual void Unk_C1(); // 0C1 + virtual void Unk_C2(); // 0C2 + virtual void Unk_C3(); // 0C3 + virtual void Unk_C4(); // 0C4 + virtual void Unk_C5(); // 0C5 + virtual void Unk_C6(); // 0C6 + virtual void Unk_C7(); // 0C7 + virtual void Unk_C8(); // 0C8 + virtual void Unk_C9(); // 0C9 + virtual void Unk_CA(); // 0CA + virtual void Unk_CB(); // 0CB + virtual void Unk_CC(); // 0CC + virtual void Unk_CD(); // 0CD + virtual void Unk_CE(); // 0CE + virtual void Unk_CF(); // 0CF + virtual void Unk_D0(); // 0D0 + virtual void Unk_D1(); // 0D1 + virtual void Unk_D2(); // 0D2 + virtual void Unk_D3(); // 0D3 + virtual void Unk_D4(); // 0D4 + virtual void Unk_D5(); // 0D5 + virtual void Unk_D6(); // 0D6 + virtual void Unk_D7(); // 0D7 + virtual void Unk_D8(); // 0D8 + virtual void Unk_D9(); // 0D9 + virtual void Unk_DA(); // 0DA + virtual void Unk_DB(); // 0DB + virtual void Unk_DC(); // 0DC + virtual void Unk_DD(); // 0DD + virtual void Unk_DE(); // 0DE + virtual void Unk_DF(); // 0DF + virtual void Unk_E0(); // 0E0 + virtual void Unk_E1(); // 0E1 + virtual void Unk_E2(); // 0E2 + virtual void Unk_E3(); // 0E3 + virtual void Unk_E4(); // 0E4 + virtual void Unk_E5(); // 0E5 + virtual void Unk_E6(); // 0E6 + virtual void Unk_E7(); // 0E7 + virtual void Unk_E8(); // 0E8 + virtual void Unk_E9(); // 0E9 + virtual void Unk_EA(); // 0EA + virtual void Unk_EB(); // 0EB + virtual void Unk_EC(); // 0EC + virtual void Unk_ED(); // 0ED + virtual void Unk_EE(); // 0EE + virtual void Unk_EF(); // 0EF + virtual void CreateInventoryList(const TESContainer* a_container); // 0F0 + virtual void DestroyInventoryList(); // 0F1 + virtual const char* GetDisplayFullName(); // 0F2 + virtual void Unk_F3(); // 0F3 + virtual void Unk_F4(); // 0F4 + virtual void Unk_F5(); // 0F5 + virtual void Unk_F6(); // 0F6 + virtual void SetObjectReference(TESBoundObject* a_object, bool a_clearData); // 0F7 + virtual void Unk_F8(); // 0F8 + virtual void Unk_F9(); // 0F9 + virtual void Unk_FA(); // 0FA + virtual void Unk_FB(); // 0FB + virtual void Unk_FC(); // 0FC + virtual void Unk_FD(); // 0FD + virtual void ResetInventory(bool a_leveledOnly, bool a_skipInitDefaultWorn); // 0FE + virtual void Unk_FF(); // 0FF + virtual void Unk_100(); // 100 + virtual void Unk_101(); // 101 + virtual void Unk_102(); // 102 + virtual void Unk_103(); // 103 + virtual void Unk_104(); // 104 + virtual void Unk_105(); // 105 + virtual void Unk_106(); // 106 + virtual void Unk_107(); // 107 + virtual void Unk_108(); // 108 + virtual void Unk_109(); // 109 + virtual void Unk_10A(); // 10A + virtual void Unk_10B(); // 10B + virtual void SetParentCell(TESObjectCELL* a_cell); // 10C + virtual bool IsDead(bool a_notEssential) const; // 10D + virtual bool ProcessInWater(std::uint32_t a_bodyID, float a_waterHeight, float a_deltaTime); // 10E + virtual void Unk_10F(); // 10F + virtual void Unk_110(); // 110 + virtual void Unk_111(); // 111 + virtual void Unk_112(); // 112 + virtual void Unk_113(); // 113 + virtual void InitDefaultWornImpl(bool a_weapon, bool a_allowChanges); // 114 + virtual void Unk_115(); // 115 + virtual void Unk_116(); // 116 + virtual void Unk_117(); // 117 + virtual void Unk_118(); // 118 + virtual void Unk_119(); // 119 + virtual void Unk_11A(); // 11A + virtual void Unk_11B(); // 11B + virtual void Unk_11C(); // 11C + virtual void Unk_11D(); // 11D + virtual void Unk_11E(); // 11E + virtual void Unk_11F(); // 11F + virtual void Unk_120(); // 120 + virtual void Unk_121(); // 121 + virtual void Unk_122(); // 122 + virtual void Unk_123(); // 123 + virtual void Unk_124(); // 124 + virtual void Unk_125(); // 125 + virtual void Unk_126(); // 126 + virtual void Unk_127(); // 127 + virtual void Unk_128(); // 128 + virtual void Unk_129(); // 129 + virtual void Unk_12A(); // 12A + virtual void Unk_12B(); // 12B + virtual void Unk_12C(); // 12C + virtual void Unk_12D(); // 12D + virtual void Unk_12E(); // 12E + virtual void Unk_12F(); // 12F + + void ForEachEquippedItem(std::function a_callback) const; + void ForEachInventoryItem(std::function a_callback) const; [[nodiscard]] constexpr NiPoint3A GetAngle() const { return data.angle; } [[nodiscard]] constexpr float GetAngleX() const { return data.angle.x; } @@ -316,6 +373,7 @@ namespace RE [[nodiscard]] bool HasKeyword(BGSKeyword* a_keyword); [[nodiscard]] bool IsCrimeToActivate(); [[nodiscard]] bool IsInSpace(bool a_arg1); + [[nodiscard]] bool IsObjectEquipped(TESBoundObject* a_object); [[nodiscard]] bool IsSpaceshipDocked(); [[nodiscard]] bool IsSpaceshipLanded(); diff --git a/CommonLibSF/src/RE/T/TESObjectREFR.cpp b/CommonLibSF/src/RE/T/TESObjectREFR.cpp index ecdc3d81..519586cd 100644 --- a/CommonLibSF/src/RE/T/TESObjectREFR.cpp +++ b/CommonLibSF/src/RE/T/TESObjectREFR.cpp @@ -1,7 +1,27 @@ #include "RE/T/TESObjectREFR.h" +#include "RE/B/BGSInventoryItem.h" namespace RE { + void TESObjectREFR::ForEachEquippedItem(std::function a_callback) const + { + ForEachInventoryItem([&](const BGSInventoryItem& a_invItem) { + return a_invItem.IsEquipped() ? a_callback(a_invItem) : BSContainer::ForEachResult::kContinue; + }); + } + + void TESObjectREFR::ForEachInventoryItem(std::function a_callback) const + { + BSAutoReadLock locker(inventoryListLock); + if (inventoryList) { + for (const auto& invItem : inventoryList->data) { + if (invItem.object && a_callback(invItem) == BSContainer::ForEachResult::kStop) { + break; + } + } + } + } + BGSLocation* TESObjectREFR::GetCurrentLocation() { using func_t = decltype(&TESObjectREFR::GetCurrentLocation); @@ -72,6 +92,13 @@ namespace RE return func(this, a_arg1); } + bool TESObjectREFR::IsObjectEquipped(TESBoundObject* a_object) + { + using func_t = decltype(&TESObjectREFR::IsObjectEquipped); + REL::Relocation func{ ID::TESObjectREFR::IsObjectEquipped }; + return func(this, a_object); + } + bool TESObjectREFR::IsSpaceshipDocked() { using func_t = decltype(&TESObjectREFR::IsSpaceshipDocked); From 990fd799a401fc863e3a59705342c10153785440 Mon Sep 17 00:00:00 2001 From: maintenance <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 20 Oct 2023 18:54:38 +0000 Subject: [PATCH 07/15] ci: maintenance `2023-10-20.3` --- CommonLibSF/include/RE/B/BGSInventoryInterface.h | 2 +- CommonLibSF/include/RE/Starfield.h | 2 ++ CommonLibSF/src/RE/T/TESObjectREFR.cpp | 2 +- CommonLibSF/vcpkg.json | 2 +- README.md | 2 +- 5 files changed, 6 insertions(+), 4 deletions(-) diff --git a/CommonLibSF/include/RE/B/BGSInventoryInterface.h b/CommonLibSF/include/RE/B/BGSInventoryInterface.h index 19b23d5a..8b854b78 100644 --- a/CommonLibSF/include/RE/B/BGSInventoryInterface.h +++ b/CommonLibSF/include/RE/B/BGSInventoryInterface.h @@ -50,7 +50,7 @@ namespace RE [[nodiscard]] static BGSInventoryInterface* GetSingleton() { - REL::Relocation singleton { ID::BGSInventoryInterface::singleton }; + REL::Relocation singleton{ ID::BGSInventoryInterface::singleton }; return *singleton; } diff --git a/CommonLibSF/include/RE/Starfield.h b/CommonLibSF/include/RE/Starfield.h index 81ea49ed..892a3085 100644 --- a/CommonLibSF/include/RE/Starfield.h +++ b/CommonLibSF/include/RE/Starfield.h @@ -21,6 +21,8 @@ #include "RE/B/BGSEntryPoint.h" #include "RE/B/BGSEquipSlot.h" #include "RE/B/BGSForcedLocRefType.h" +#include "RE/B/BGSInventoryInterface.h" +#include "RE/B/BGSInventoryItem.h" #include "RE/B/BGSInventoryList.h" #include "RE/B/BGSKeyword.h" #include "RE/B/BGSKeywordForm.h" diff --git a/CommonLibSF/src/RE/T/TESObjectREFR.cpp b/CommonLibSF/src/RE/T/TESObjectREFR.cpp index 519586cd..0e393f2b 100644 --- a/CommonLibSF/src/RE/T/TESObjectREFR.cpp +++ b/CommonLibSF/src/RE/T/TESObjectREFR.cpp @@ -92,7 +92,7 @@ namespace RE return func(this, a_arg1); } - bool TESObjectREFR::IsObjectEquipped(TESBoundObject* a_object) + bool TESObjectREFR::IsObjectEquipped(TESBoundObject* a_object) { using func_t = decltype(&TESObjectREFR::IsObjectEquipped); REL::Relocation func{ ID::TESObjectREFR::IsObjectEquipped }; diff --git a/CommonLibSF/vcpkg.json b/CommonLibSF/vcpkg.json index 33274f2a..f87518e0 100644 --- a/CommonLibSF/vcpkg.json +++ b/CommonLibSF/vcpkg.json @@ -1,7 +1,7 @@ { "$schema": "https://raw.githubusercontent.com/microsoft/vcpkg-tool/main/docs/vcpkg.schema.json", "name": "commonlibsf", - "version-date": "2023-10-20.2", + "version-date": "2023-10-20.3", "port-version": 0, "description": "A collaborative reverse-engineered library for Starfield.", "homepage": "https://github.com/Starfield-Reverse-Engineering/CommonLibSF", diff --git a/README.md b/README.md index f9fe355a..00276841 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ [![C++23](https://img.shields.io/static/v1?label=standard&message=c%2B%2B23&color=blue&logo=c%2B%2B&&logoColor=red&style=flat)](https://en.cppreference.com/w/cpp/compiler_support) ![Platform](https://img.shields.io/static/v1?label=platform&message=windows&color=dimgray&style=flat&logo=windows) [![Game version](https://img.shields.io/badge/game%20version-1.7.36-orange)](#Developing-with-CommonLibSF) -[![VCPKG_VER](https://img.shields.io/static/v1?label=vcpkg%20registry&message=2023-10-20.2&color=green&style=flat)](https://github.com/Starfield-Reverse-Engineering/Starfield-RE-vcpkg) +[![VCPKG_VER](https://img.shields.io/static/v1?label=vcpkg%20registry&message=2023-10-20.3&color=green&style=flat)](https://github.com/Starfield-Reverse-Engineering/Starfield-RE-vcpkg) [![Main CI](https://img.shields.io/github/actions/workflow/status/Starfield-Reverse-Engineering/CommonLibSF/main_ci.yml)](https://github.com/Starfield-Reverse-Engineering/CommonLibSF/actions/workflows/main_ci.yml) ## Build Dependencies From 391edf1660cbde478c6fe5d1a28acab07d29e686 Mon Sep 17 00:00:00 2001 From: Angad <66992519+ThirdEyeSqueegee@users.noreply.github.com> Date: Fri, 20 Oct 2023 12:01:33 -0700 Subject: [PATCH 08/15] fix: bump CMake version in top-level CMakeLists.txt --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9ecaecbc..be24755f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.26) +cmake_minimum_required(VERSION 3.27) # singleton target across multiple projects if(TARGET CommonLib) From fb4840b4a3a45bde17393778d6c61625bb4838e2 Mon Sep 17 00:00:00 2001 From: Angad <66992519+ThirdEyeSqueegee@users.noreply.github.com> Date: Fri, 20 Oct 2023 12:11:20 -0700 Subject: [PATCH 09/15] chore: update workflows --- .github/workflows/lint_pr_title.yaml | 2 +- .github/workflows/main_ci.yml | 2 +- .github/workflows/main_ci_xmake.yml | 3 ++- .github/workflows/maintenance.yml | 11 +++++------ .github/workflows/update_pdb.yml | 2 +- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/lint_pr_title.yaml b/.github/workflows/lint_pr_title.yaml index 73a5e8fa..db56be4a 100644 --- a/.github/workflows/lint_pr_title.yaml +++ b/.github/workflows/lint_pr_title.yaml @@ -1,5 +1,5 @@ # https://github.com/amannn/action-semantic-pull-request -name: Lint PR against Conventional Commits +name: Lint PR Title on: pull_request_target: diff --git a/.github/workflows/main_ci.yml b/.github/workflows/main_ci.yml index c6a48ee7..24b711b2 100644 --- a/.github/workflows/main_ci.yml +++ b/.github/workflows/main_ci.yml @@ -8,7 +8,7 @@ on: workflow_dispatch: env: - VCPKG_COMMIT_ID: e44d60e6bf0964064bf69667cd9f3e91dc383c7c + VCPKG_COMMIT_ID: 830f86fb309ad7167468a433a890b7415fbb90a5 GITHUB_WORKSPACE: ${{ github.workspace }} jobs: diff --git a/.github/workflows/main_ci_xmake.yml b/.github/workflows/main_ci_xmake.yml index 6ea981ff..f1cdbc37 100644 --- a/.github/workflows/main_ci_xmake.yml +++ b/.github/workflows/main_ci_xmake.yml @@ -6,6 +6,7 @@ on: paths: - "CommonLibSF/**" - "xmake.lua" + workflow_dispatch: jobs: build: @@ -22,7 +23,7 @@ jobs: - name: Setup XMake uses: xmake-io/github-action-setup-xmake@v1.0.13 with: - xmake-version: '2.8.2' + xmake-version: "2.8.2" - name: Configure run: xmake config -y --mode=${{ matrix.mode }} --vs_toolset=14.37 diff --git a/.github/workflows/maintenance.yml b/.github/workflows/maintenance.yml index b2e04ede..14dacb5a 100644 --- a/.github/workflows/maintenance.yml +++ b/.github/workflows/maintenance.yml @@ -23,7 +23,7 @@ jobs: shell: pwsh run: "& ${{ github.workspace }}/.github/make-directives.ps1 ${{ github.workspace }}/CommonLibSF" - - name: Apply Clang-Format + - name: Run clang-format uses: DoozyX/clang-format-lint-action@v0.16.2 with: source: "." @@ -32,21 +32,20 @@ jobs: clangFormatVersion: 16 inplace: True - - name: Update VCPKG Version + - name: Update vcpkg port version id: versioning shell: pwsh run: "& ${{ github.workspace }}/.github/update-registry.ps1 ${{ github.workspace }}" - - name: Check Failure + - name: Check failure run: exit 1 if: ${{ steps.versioning.outputs.VCPKG_SUCCESS == 'false' }} - - name: Check for Commit + - name: Add & Commit id: registry uses: EndBug/add-and-commit@v9 with: - author_name: maintenance - author_email: 41898282+github-actions[bot]@users.noreply.github.com + default_author: github_actions message: "ci: maintenance `${{ steps.versioning.outputs.VCPKG_VERSION }}`" - name: Repository Dispatch diff --git a/.github/workflows/update_pdb.yml b/.github/workflows/update_pdb.yml index 47ee804f..0026ba05 100644 --- a/.github/workflows/update_pdb.yml +++ b/.github/workflows/update_pdb.yml @@ -11,7 +11,7 @@ concurrency: cancel-in-progress: true env: - VCPKG_COMMIT_ID: 5a38b5ec0eee3d1a1a6faab5e944617fee2697cf + VCPKG_COMMIT_ID: 830f86fb309ad7167468a433a890b7415fbb90a5 GITHUB_WORKSPACE: ${{ github.workspace }} jobs: From 73a3d2316d91f2f1f9a98a5eb786d065aaf3f8df Mon Sep 17 00:00:00 2001 From: Angad <66992519+ThirdEyeSqueegee@users.noreply.github.com> Date: Fri, 20 Oct 2023 12:16:38 -0700 Subject: [PATCH 10/15] docs: update README.md --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 00276841..d6ceac80 100644 --- a/README.md +++ b/README.md @@ -11,11 +11,11 @@ ## Build Dependencies - [CMake v3.27+](https://cmake.org/) or [XMake v2.8.2+](https://github.com/xmake-io/xmake/releases) - - Add this to your PATH -- [vcpkg](https://github.com/microsoft/vcpkg) (CMake) - - Add the environment variable `VCPKG_ROOT` with the value as the path to the folder containing vcpkg -- [Visual Studio 2022](https://visualstudio.microsoft.com/) with "Desktop development with C++" - - clang-cl toolset and build support if using `clang-cl` configuration + - Add this to your `PATH` +- [vcpkg](https://github.com/microsoft/vcpkg) (not required if using XMake) + - Create a Windows environment variable called `VCPKG_ROOT` with the value as the path to your vcpkg install directory +- [Visual Studio 2022](https://visualstudio.microsoft.com/) with "Desktop development with C++" workload + - clang-cl toolset and build support if using `clang-cl` configurations - [PowerShell](https://github.com/PowerShell/PowerShell/releases) ## Developing with CommonLibSF From d52d8dbb0cff5072f5653bdd2df5e5a995825e2b Mon Sep 17 00:00:00 2001 From: Angad <66992519+ThirdEyeSqueegee@users.noreply.github.com> Date: Fri, 20 Oct 2023 15:48:18 -0700 Subject: [PATCH 11/15] fix: un-bump CMake version --- CMakeLists.txt | 2 +- CommonLibSF/CMakeLists.txt | 2 +- CommonLibSF/CMakePresets.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index be24755f..9ecaecbc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.27) +cmake_minimum_required(VERSION 3.26) # singleton target across multiple projects if(TARGET CommonLib) diff --git a/CommonLibSF/CMakeLists.txt b/CommonLibSF/CMakeLists.txt index 51ee47b0..a8d31b35 100644 --- a/CommonLibSF/CMakeLists.txt +++ b/CommonLibSF/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.27) +cmake_minimum_required(VERSION 3.26) message("Using toolchain file ${CMAKE_TOOLCHAIN_FILE}.") # singleton target across multiple projects diff --git a/CommonLibSF/CMakePresets.json b/CommonLibSF/CMakePresets.json index dae7e35a..11659a4c 100644 --- a/CommonLibSF/CMakePresets.json +++ b/CommonLibSF/CMakePresets.json @@ -2,7 +2,7 @@ "version": 6, "cmakeMinimumRequired": { "major": 3, - "minor": 27, + "minor": 26, "patch": 0 }, "configurePresets": [ From c7b6edba967cdf1bc675160546426c459174669c Mon Sep 17 00:00:00 2001 From: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 20 Oct 2023 22:48:45 +0000 Subject: [PATCH 12/15] ci: maintenance `2023-10-20.4` --- CommonLibSF/vcpkg.json | 2 +- README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CommonLibSF/vcpkg.json b/CommonLibSF/vcpkg.json index f87518e0..1dabab7f 100644 --- a/CommonLibSF/vcpkg.json +++ b/CommonLibSF/vcpkg.json @@ -1,7 +1,7 @@ { "$schema": "https://raw.githubusercontent.com/microsoft/vcpkg-tool/main/docs/vcpkg.schema.json", "name": "commonlibsf", - "version-date": "2023-10-20.3", + "version-date": "2023-10-20.4", "port-version": 0, "description": "A collaborative reverse-engineered library for Starfield.", "homepage": "https://github.com/Starfield-Reverse-Engineering/CommonLibSF", diff --git a/README.md b/README.md index d6ceac80..23786063 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ [![C++23](https://img.shields.io/static/v1?label=standard&message=c%2B%2B23&color=blue&logo=c%2B%2B&&logoColor=red&style=flat)](https://en.cppreference.com/w/cpp/compiler_support) ![Platform](https://img.shields.io/static/v1?label=platform&message=windows&color=dimgray&style=flat&logo=windows) [![Game version](https://img.shields.io/badge/game%20version-1.7.36-orange)](#Developing-with-CommonLibSF) -[![VCPKG_VER](https://img.shields.io/static/v1?label=vcpkg%20registry&message=2023-10-20.3&color=green&style=flat)](https://github.com/Starfield-Reverse-Engineering/Starfield-RE-vcpkg) +[![VCPKG_VER](https://img.shields.io/static/v1?label=vcpkg%20registry&message=2023-10-20.4&color=green&style=flat)](https://github.com/Starfield-Reverse-Engineering/Starfield-RE-vcpkg) [![Main CI](https://img.shields.io/github/actions/workflow/status/Starfield-Reverse-Engineering/CommonLibSF/main_ci.yml)](https://github.com/Starfield-Reverse-Engineering/CommonLibSF/actions/workflows/main_ci.yml) ## Build Dependencies From 805308fe12d87ccc04eb394cc102aa1e1e0b55de Mon Sep 17 00:00:00 2001 From: Angad <66992519+ThirdEyeSqueegee@users.noreply.github.com> Date: Fri, 20 Oct 2023 15:54:09 -0700 Subject: [PATCH 13/15] docs: update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 23786063..a247d53e 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ ## Build Dependencies -- [CMake v3.27+](https://cmake.org/) or [XMake v2.8.2+](https://github.com/xmake-io/xmake/releases) +- [CMake v3.26+](https://cmake.org/) or [XMake v2.8.2+](https://github.com/xmake-io/xmake/releases) - Add this to your `PATH` - [vcpkg](https://github.com/microsoft/vcpkg) (not required if using XMake) - Create a Windows environment variable called `VCPKG_ROOT` with the value as the path to your vcpkg install directory From ae613ca5e66bef0bed6bb75aab14037a31afd579 Mon Sep 17 00:00:00 2001 From: powerof3 <32599957+powerof3@users.noreply.github.com> Date: Sat, 21 Oct 2023 04:26:18 +0530 Subject: [PATCH 14/15] fix: rename remaining `Offset` to `ID` (#181) --- CommonLibSF/include/RE/B/BGSObjectInstance.h | 2 +- CommonLibSF/include/RE/C/ConsoleLog.h | 4 +- CommonLibSF/include/RE/N/NativeFunctionBase.h | 10 ++--- .../include/RE/R/RegSettingCollection.h | 2 +- CommonLibSF/include/RE/RTTI.h | 2 +- CommonLibSF/include/RE/S/ScaleformGFxValue.h | 44 +++++++++---------- CommonLibSF/include/RE/S/Script.h | 4 +- .../include/RE/T/TESCellFullyLoadedEvent.h | 2 +- .../include/RE/T/TESContainerChangedEvent.h | 2 +- CommonLibSF/include/RE/T/TESDataHandler.h | 2 +- CommonLibSF/include/RE/T/TESDeathEvent.h | 2 +- .../include/RE/T/TESObjectLoadedEvent.h | 2 +- CommonLibSF/include/RE/U/UI.h | 4 +- 13 files changed, 41 insertions(+), 41 deletions(-) diff --git a/CommonLibSF/include/RE/B/BGSObjectInstance.h b/CommonLibSF/include/RE/B/BGSObjectInstance.h index ef53c84f..d9df35d0 100644 --- a/CommonLibSF/include/RE/B/BGSObjectInstance.h +++ b/CommonLibSF/include/RE/B/BGSObjectInstance.h @@ -23,7 +23,7 @@ namespace RE BGSObjectInstance* ctor(TESForm* a_object, TBO_InstanceData* a_instanceData) { using func_t = decltype(&BGSObjectInstance::ctor); - REL::Relocation func{ Offset::BGSObjectInstance::ctor }; + REL::Relocation func{ ID::BGSObjectInstance::ctor }; return func(this, a_object, a_instanceData); } }; diff --git a/CommonLibSF/include/RE/C/ConsoleLog.h b/CommonLibSF/include/RE/C/ConsoleLog.h index 890a2d99..df9be9a8 100644 --- a/CommonLibSF/include/RE/C/ConsoleLog.h +++ b/CommonLibSF/include/RE/C/ConsoleLog.h @@ -10,14 +10,14 @@ namespace RE // BSTSDM [[nodiscard]] static ConsoleLog* GetSingleton() { - static REL::Relocation singleton{ Offset::ConsoleLog::singleton }; + static REL::Relocation singleton{ ID::ConsoleLog::singleton }; return *singleton; } void VPrint(const char* a_fmt, std::va_list a_args) { using func_t = decltype(&ConsoleLog::VPrint); - REL::Relocation func{ Offset::ConsoleLog::VPrint }; + REL::Relocation func{ ID::ConsoleLog::VPrint }; func(this, a_fmt, a_args); } diff --git a/CommonLibSF/include/RE/N/NativeFunctionBase.h b/CommonLibSF/include/RE/N/NativeFunctionBase.h index a5eb4620..19a9a038 100644 --- a/CommonLibSF/include/RE/N/NativeFunctionBase.h +++ b/CommonLibSF/include/RE/N/NativeFunctionBase.h @@ -59,7 +59,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{ Offset::BSScript::Internal::NF_util::NativeFunctionBase::GetParam }; + REL::Relocation func{ ID::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 +73,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{ Offset::BSScript::Internal::NF_util::NativeFunctionBase::Invoke }; + REL::Relocation func{ ID::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{ Offset::BSScript::Internal::NF_util::NativeFunctionBase::Unk_10 }; + REL::Relocation func{ ID::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 +104,13 @@ namespace RE virtual bool GetParamInfo(std::uint32_t a_idx, void* a_out) override { using func_t = decltype(&NativeFunctionBase::GetParamInfo); - REL::Relocation func{ Offset::BSScript::Internal::NF_util::NativeFunctionBase::GetParamInfo }; + REL::Relocation func{ ID::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{ Offset::BSScript::Internal::NF_util::NativeFunctionBase::Unk_15 }; + REL::Relocation func{ ID::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/R/RegSettingCollection.h b/CommonLibSF/include/RE/R/RegSettingCollection.h index 4b3aeb77..88cfde8f 100644 --- a/CommonLibSF/include/RE/R/RegSettingCollection.h +++ b/CommonLibSF/include/RE/R/RegSettingCollection.h @@ -15,7 +15,7 @@ namespace RE [[nodiscard]] static RegSettingCollection* GetSingleton() { - REL::Relocation singleton{ Offset::RegSettingCollection::singleton }; + REL::Relocation singleton{ ID::RegSettingCollection::singleton }; return *singleton; } diff --git a/CommonLibSF/include/RE/RTTI.h b/CommonLibSF/include/RE/RTTI.h index aebc25e3..2e929646 100644 --- a/CommonLibSF/include/RE/RTTI.h +++ b/CommonLibSF/include/RE/RTTI.h @@ -138,7 +138,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{ Offset::RTDynamicCast }; + REL::Relocation func{ ID::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 0d9eb91f..e3e76980 100644 --- a/CommonLibSF/include/RE/S/ScaleformGFxValue.h +++ b/CommonLibSF/include/RE/S/ScaleformGFxValue.h @@ -169,154 +169,154 @@ namespace RE::Scaleform::GFx void ObjectAddRef(Value* a_val, void* a_obj) { using func_t = decltype(&ObjectInterface::ObjectAddRef); - REL::Relocation func{ Offset::Scaleform::ObjectInterface::ObjectAddRef }; + REL::Relocation func{ ID::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{ Offset::Scaleform::ObjectInterface::ObjectRelease }; + REL::Relocation func{ ID::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{ Offset::Scaleform::ObjectInterface::HasMember }; + REL::Relocation func{ ID::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{ Offset::Scaleform::ObjectInterface::GetMember }; + REL::Relocation func{ ID::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{ Offset::Scaleform::ObjectInterface::SetMember }; + REL::Relocation func{ ID::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{ Offset::Scaleform::ObjectInterface::Invoke }; + REL::Relocation func{ ID::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{ Offset::Scaleform::ObjectInterface::VisitMembers }; + REL::Relocation func{ ID::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{ Offset::Scaleform::ObjectInterface::GetArraySize }; + REL::Relocation func{ ID::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{ Offset::Scaleform::ObjectInterface::SetArraySize }; + REL::Relocation func{ ID::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{ Offset::Scaleform::ObjectInterface::GetElement }; + REL::Relocation func{ ID::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{ Offset::Scaleform::ObjectInterface::SetElement }; + REL::Relocation func{ ID::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{ Offset::Scaleform::ObjectInterface::VisitElements }; + REL::Relocation func{ ID::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{ Offset::Scaleform::ObjectInterface::PushBack }; + REL::Relocation func{ ID::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{ Offset::Scaleform::ObjectInterface::PopBack }; + REL::Relocation func{ ID::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{ Offset::Scaleform::ObjectInterface::RemoveElements }; + REL::Relocation func{ ID::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{ Offset::Scaleform::ObjectInterface::GetParent }; + REL::Relocation func{ ID::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{ Offset::Scaleform::ObjectInterface::GetText }; + REL::Relocation func{ ID::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{ Offset::Scaleform::ObjectInterface::SetText }; + REL::Relocation func{ ID::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{ Offset::Scaleform::ObjectInterface::SetTextW }; + REL::Relocation func{ ID::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{ Offset::Scaleform::ObjectInterface::CreateEmptyMovieClip }; + REL::Relocation func{ ID::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{ Offset::Scaleform::ObjectInterface::GotoAndPlayL }; + REL::Relocation func{ ID::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{ Offset::Scaleform::ObjectInterface::GotoAndPlay }; + REL::Relocation func{ ID::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 dad4c551..158cc0d2 100644 --- a/CommonLibSF/include/RE/S/Script.h +++ b/CommonLibSF/include/RE/S/Script.h @@ -158,13 +158,13 @@ namespace RE inline static const auto GetConsoleCommands() { - static REL::Relocation chunk{ Offset::Script::GetConsoleCommands }; + static REL::Relocation chunk{ ID::Script::GetConsoleCommands }; return std::span{ *chunk }; } inline static const auto GetScriptCommands() { - static REL::Relocation chunk{ Offset::Script::GetScriptCommands }; + static REL::Relocation chunk{ ID::Script::GetScriptCommands }; return std::span{ *chunk }; } diff --git a/CommonLibSF/include/RE/T/TESCellFullyLoadedEvent.h b/CommonLibSF/include/RE/T/TESCellFullyLoadedEvent.h index e82bd191..3d3200c3 100644 --- a/CommonLibSF/include/RE/T/TESCellFullyLoadedEvent.h +++ b/CommonLibSF/include/RE/T/TESCellFullyLoadedEvent.h @@ -12,7 +12,7 @@ namespace RE [[nodiscard]] static BSTEventSource* GetEventSource() { using func_t = decltype(&TESCellFullyLoadedEvent::GetEventSource); - REL::Relocation func{ Offset::TESCellFullyLoadedEvent::GetEventSource }; + REL::Relocation func{ ID::TESCellFullyLoadedEvent::GetEventSource }; return func(); } diff --git a/CommonLibSF/include/RE/T/TESContainerChangedEvent.h b/CommonLibSF/include/RE/T/TESContainerChangedEvent.h index ba059c70..735ace93 100644 --- a/CommonLibSF/include/RE/T/TESContainerChangedEvent.h +++ b/CommonLibSF/include/RE/T/TESContainerChangedEvent.h @@ -10,7 +10,7 @@ namespace RE [[nodiscard]] static BSTEventSource* GetEventSource() { using func_t = decltype(&TESContainerChangedEvent::GetEventSource); - REL::Relocation func{ Offset::TESContainerChangedEvent::GetEventSource }; + REL::Relocation func{ ID::TESContainerChangedEvent::GetEventSource }; return func(); } diff --git a/CommonLibSF/include/RE/T/TESDataHandler.h b/CommonLibSF/include/RE/T/TESDataHandler.h index f3189c3a..1886074b 100644 --- a/CommonLibSF/include/RE/T/TESDataHandler.h +++ b/CommonLibSF/include/RE/T/TESDataHandler.h @@ -40,7 +40,7 @@ namespace RE [[nodiscard]] static TESDataHandler* GetSingleton() { - REL::Relocation singleton{ Offset::TESDataHandler::singleton }; + REL::Relocation singleton{ ID::TESDataHandler::singleton }; return *singleton; } diff --git a/CommonLibSF/include/RE/T/TESDeathEvent.h b/CommonLibSF/include/RE/T/TESDeathEvent.h index 6773e691..0d8b2d2b 100644 --- a/CommonLibSF/include/RE/T/TESDeathEvent.h +++ b/CommonLibSF/include/RE/T/TESDeathEvent.h @@ -13,7 +13,7 @@ namespace RE [[nodiscard]] static BSTEventSource* GetEventSource() { using func_t = decltype(&TESDeathEvent::GetEventSource); - REL::Relocation func{ Offset::TESDeathEvent::GetEventSource }; + REL::Relocation func{ ID::TESDeathEvent::GetEventSource }; return func(); } diff --git a/CommonLibSF/include/RE/T/TESObjectLoadedEvent.h b/CommonLibSF/include/RE/T/TESObjectLoadedEvent.h index 76bb0485..329fb86c 100644 --- a/CommonLibSF/include/RE/T/TESObjectLoadedEvent.h +++ b/CommonLibSF/include/RE/T/TESObjectLoadedEvent.h @@ -10,7 +10,7 @@ namespace RE [[nodiscard]] static BSTEventSource* GetEventSource() { using func_t = decltype(&TESObjectLoadedEvent::GetEventSource); - REL::Relocation func{ Offset::TESObjectLoadedEvent::GetEventSource }; + REL::Relocation func{ ID::TESObjectLoadedEvent::GetEventSource }; return func(); } diff --git a/CommonLibSF/include/RE/U/UI.h b/CommonLibSF/include/RE/U/UI.h index 50d57f76..6cb6f2b6 100644 --- a/CommonLibSF/include/RE/U/UI.h +++ b/CommonLibSF/include/RE/U/UI.h @@ -42,14 +42,14 @@ namespace RE inline static UI* GetSingleton() { - static REL::Relocation singleton{ Offset::UI::singleton }; + static REL::Relocation singleton{ ID::UI::singleton }; return *singleton; } bool IsMenuOpen(const BSFixedString& a_name) { using func_t = decltype(&UI::IsMenuOpen); - REL::Relocation func{ Offset::UI::IsMenuOpen }; + REL::Relocation func{ ID::UI::IsMenuOpen }; return func(this, a_name); } From 54c2797f69e87875ab2cbc0f066ef59259547730 Mon Sep 17 00:00:00 2001 From: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 20 Oct 2023 22:56:49 +0000 Subject: [PATCH 15/15] ci: maintenance `2023-10-20.5` --- CommonLibSF/vcpkg.json | 2 +- README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CommonLibSF/vcpkg.json b/CommonLibSF/vcpkg.json index 1dabab7f..db967cda 100644 --- a/CommonLibSF/vcpkg.json +++ b/CommonLibSF/vcpkg.json @@ -1,7 +1,7 @@ { "$schema": "https://raw.githubusercontent.com/microsoft/vcpkg-tool/main/docs/vcpkg.schema.json", "name": "commonlibsf", - "version-date": "2023-10-20.4", + "version-date": "2023-10-20.5", "port-version": 0, "description": "A collaborative reverse-engineered library for Starfield.", "homepage": "https://github.com/Starfield-Reverse-Engineering/CommonLibSF", diff --git a/README.md b/README.md index a247d53e..8c1e8310 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ [![C++23](https://img.shields.io/static/v1?label=standard&message=c%2B%2B23&color=blue&logo=c%2B%2B&&logoColor=red&style=flat)](https://en.cppreference.com/w/cpp/compiler_support) ![Platform](https://img.shields.io/static/v1?label=platform&message=windows&color=dimgray&style=flat&logo=windows) [![Game version](https://img.shields.io/badge/game%20version-1.7.36-orange)](#Developing-with-CommonLibSF) -[![VCPKG_VER](https://img.shields.io/static/v1?label=vcpkg%20registry&message=2023-10-20.4&color=green&style=flat)](https://github.com/Starfield-Reverse-Engineering/Starfield-RE-vcpkg) +[![VCPKG_VER](https://img.shields.io/static/v1?label=vcpkg%20registry&message=2023-10-20.5&color=green&style=flat)](https://github.com/Starfield-Reverse-Engineering/Starfield-RE-vcpkg) [![Main CI](https://img.shields.io/github/actions/workflow/status/Starfield-Reverse-Engineering/CommonLibSF/main_ci.yml)](https://github.com/Starfield-Reverse-Engineering/CommonLibSF/actions/workflows/main_ci.yml) ## Build Dependencies