-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into bsscript-rebase
- Loading branch information
Showing
18 changed files
with
447 additions
and
230 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,7 @@ on: | |
paths: | ||
- "CommonLibSF/**" | ||
- "xmake.lua" | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
|
@@ -22,7 +23,7 @@ jobs: | |
- name: Setup XMake | ||
uses: xmake-io/[email protected] | ||
with: | ||
xmake-version: '2.8.2' | ||
xmake-version: "2.8.2" | ||
|
||
- name: Configure | ||
run: xmake config -y --mode=${{ matrix.mode }} --vs_toolset=14.37 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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/[email protected] | ||
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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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<BGSInventoryInterface>, // 00 | ||
BSTEventSource<InventoryInterface::FavoriteChangedEvent> // 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<BGSInventoryInterface**> 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_t> func{ ID::BGSInventoryInterface::GetInventoryObject }; | ||
return func(this, a_handleID); | ||
} | ||
|
||
virtual ~BGSInventoryInterface(); // 00 | ||
|
||
// members | ||
BSTArray<Agent> agentArray; // 30 | ||
}; | ||
static_assert(sizeof(BGSInventoryInterface) == 0x40); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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<ExtraDataList> 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<TBO_InstanceData> instanceData; // 08 | ||
BSTArray<Stack> stacks; // 10 | ||
stl::enumeration<Flag, std::uint32_t> flags; // 20 | ||
std::int8_t unk24; // 24 | ||
}; | ||
static_assert(sizeof(BGSInventoryItem) == 0x28); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.