Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 17 additions & 6 deletions include/OBSE/Interfaces.h
Original file line number Diff line number Diff line change
Expand Up @@ -187,11 +187,24 @@ namespace OBSE

struct PluginVersionData
{
public:
enum Version : std::uint32_t
{
kVersion = 1
};

enum
{
kAddressIndependence_Signatures = 1 << 0,
kAddressIndependence_AddressLibrary = 1 << 1,
};

enum
{
kStructureIndependence_NoStructs = 1 << 0,
kStructureIndependence_InitialLayout = 1 << 1,
};

constexpr void PluginVersion(const OBSE::Version a_version) noexcept { pluginVersion = a_version.pack(); }

[[nodiscard]] constexpr OBSE::Version GetPluginVersion() const noexcept { return OBSE::Version::unpack(pluginVersion); }
Expand All @@ -204,15 +217,13 @@ namespace OBSE

[[nodiscard]] constexpr std::string_view GetAuthorName() const noexcept { return std::string_view{ author }; }

constexpr void UsesSigScanning(const bool a_value) noexcept { SetOrClearBit(addressIndependence, 1 << 0, a_value); }
constexpr void UsesSigScanning(const bool a_value) noexcept { SetOrClearBit(addressIndependence, kAddressIndependence_Signatures, a_value); }

// 1 << 1 is for Address Library
constexpr void UsesAddressLibrary(const bool a_value) noexcept { SetOrClearBit(addressIndependence, 1 << 1, a_value); }
constexpr void UsesAddressLibrary(const bool a_value) noexcept { SetOrClearBit(addressIndependence, kAddressIndependence_AddressLibrary, a_value); }

constexpr void HasNoStructUse(const bool a_value) noexcept { SetOrClearBit(structureIndependence, 1 << 0, a_value); }
constexpr void HasNoStructUse(const bool a_value) noexcept { SetOrClearBit(structureIndependence, kStructureIndependence_NoStructs, a_value); }

// 1 << 1 is for runtime 0.411.140 and later
constexpr void IsLayoutDependent(const bool a_value) noexcept { SetOrClearBit(structureIndependence, 1 << 1, a_value); }
constexpr void IsLayoutDependent(const bool a_value) noexcept { SetOrClearBit(structureIndependence, kStructureIndependence_InitialLayout, a_value); }

constexpr void CompatibleVersions(std::initializer_list<OBSE::Version> a_versions) noexcept
{
Expand Down
1 change: 1 addition & 0 deletions include/RE/T/TESObjectWEAP.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#include "RE/O/OBJ_WEAP.h"
#include "RE/T/TESAttackDamageForm.h"
#include "RE/T/TESBoundObject.h"
#include "RE/T/TESEnchantableForm.h"
#include "RE/T/TESFullName.h"
#include "RE/T/TESHealthForm.h"
#include "RE/T/TESIcon.h"
Expand Down
2 changes: 1 addition & 1 deletion lib/commonlib-shared
Submodule commonlib-shared updated 1 files
+228 −1 xmake.lua
5 changes: 3 additions & 2 deletions res/commonlibob64-plugin.cpp.in
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@ OBSE_PLUGIN_VERSION = []() noexcept {
v.PluginVersion({ ${COMMONLIB_PLUGIN_VERSION_MAJOR}, ${COMMONLIB_PLUGIN_VERSION_MINOR}, ${COMMONLIB_PLUGIN_VERSION_PATCH}, 0 });
v.PluginName("${COMMONLIB_PLUGIN_NAME}");
v.AuthorName("${COMMONLIB_PLUGIN_AUTHOR}");
v.UsesAddressLibrary(${COMMONLIBOB64_OPTION_ADDRESS_LIBRARY});
v.UsesSigScanning(${COMMONLIBOB64_OPTION_SIG_SCANNING});
v.IsLayoutDependent(${COMMONLIBOB64_OPTION_LAYOUT_DEPENDENT});
v.UsesAddressLibrary(${COMMONLIBOB64_OPTION_ADDRESS_LIBRARY});
v.HasNoStructUse(${COMMONLIBOB64_OPTION_NO_STRUCT_USE});
v.IsLayoutDependent(${COMMONLIBOB64_OPTION_LAYOUT_DEPENDENT});
v.CompatibleVersions({ OBSE::RUNTIME_LATEST });
v.MinimumRequiredXSEVersion({ ${COMMONLIB_PLUGIN_XSE_VERSION_MAJOR}, ${COMMONLIB_PLUGIN_XSE_VERSION_MINOR}, ${COMMONLIB_PLUGIN_XSE_VERSION_PATCH}, 0 });
return v;
}();
Loading