diff --git a/include/OBSE/Interfaces.h b/include/OBSE/Interfaces.h index a112b91..8993912 100644 --- a/include/OBSE/Interfaces.h +++ b/include/OBSE/Interfaces.h @@ -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); } @@ -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 a_versions) noexcept { diff --git a/include/RE/T/TESObjectWEAP.h b/include/RE/T/TESObjectWEAP.h index 1b6cd7f..42edc93 100644 --- a/include/RE/T/TESObjectWEAP.h +++ b/include/RE/T/TESObjectWEAP.h @@ -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" diff --git a/lib/commonlib-shared b/lib/commonlib-shared index c4379b2..9fbb74d 160000 --- a/lib/commonlib-shared +++ b/lib/commonlib-shared @@ -1 +1 @@ -Subproject commit c4379b2082a464f99c45618f79b920daf6d15dd3 +Subproject commit 9fbb74d628134ab4ea3a3cf5c0ed3f7eeabbd01d diff --git a/res/commonlibob64-plugin.cpp.in b/res/commonlibob64-plugin.cpp.in index 10a1cad..e71acb5 100644 --- a/res/commonlibob64-plugin.cpp.in +++ b/res/commonlibob64-plugin.cpp.in @@ -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; }();