diff --git a/SPID/include/Cache.h b/SPID/include/Cache.h index ac60c16..6664b69 100644 --- a/SPID/include/Cache.h +++ b/SPID/include/Cache.h @@ -1,17 +1,7 @@ #pragma once -inline HMODULE tweaks; - namespace Cache { - using _GetFormEditorID = const char* (*)(std::uint32_t); - - namespace EditorID - { - std::string GetEditorID(RE::FormID a_formID); - std::string GetEditorID(RE::TESForm* a_form); - } - namespace FormType { inline constexpr std::array whitelist{ @@ -31,4 +21,3 @@ namespace Cache bool GetWhitelisted(RE::FormType a_type); } } -namespace EditorID = Cache::EditorID; diff --git a/SPID/include/Defs.h b/SPID/include/Defs.h index e14d594..1acd5f9 100644 --- a/SPID/include/Defs.h +++ b/SPID/include/Defs.h @@ -128,7 +128,7 @@ inline std::ostream& operator<<(std::ostream& os, RE::TESFile* file) inline std::ostream& operator<<(std::ostream& os, RE::TESForm* form) { - if (const auto& edid = EditorID::GetEditorID(form); !edid.empty()) { + if (const auto& edid = edid::get_editorID(form); !edid.empty()) { os << edid << " "; } os << "[" diff --git a/SPID/include/PCH.h b/SPID/include/PCH.h index c739661..95fcf30 100644 --- a/SPID/include/PCH.h +++ b/SPID/include/PCH.h @@ -9,16 +9,18 @@ #include "RE/Skyrim.h" #include "SKSE/SKSE.h" -#include -#include -#include -#include #include #include #include #include #include +#include +#include +#include +#include +#include + #include "LogBuffer.h" #define DLLEXPORT __declspec(dllexport) @@ -29,6 +31,7 @@ namespace buffered_logger = LogBuffer; namespace string = clib_util::string; namespace distribution = clib_util::distribution; namespace hash = clib_util::hash; +namespace edid = clib_util::editorID; using namespace std::literals; using namespace string::literals; diff --git a/SPID/src/Cache.cpp b/SPID/src/Cache.cpp index 6739de9..596eee1 100644 --- a/SPID/src/Cache.cpp +++ b/SPID/src/Cache.cpp @@ -2,54 +2,6 @@ namespace Cache { - std::string EditorID::GetEditorID(RE::FormID a_formID) - { - static auto function = reinterpret_cast<_GetFormEditorID>(GetProcAddress(tweaks, "GetFormEditorID")); - if (function) { - return function(a_formID); - } - return {}; - } - - std::string EditorID::GetEditorID(RE::TESForm* a_form) - { - if (!a_form) { - return {}; - } - switch (a_form->GetFormType()) { - case RE::FormType::Keyword: - case RE::FormType::LocationRefType: - case RE::FormType::Action: - case RE::FormType::MenuIcon: - case RE::FormType::Global: - case RE::FormType::HeadPart: - case RE::FormType::Race: - case RE::FormType::Sound: - case RE::FormType::Script: - case RE::FormType::Navigation: - case RE::FormType::Cell: - case RE::FormType::WorldSpace: - case RE::FormType::Land: - case RE::FormType::NavMesh: - case RE::FormType::Dialogue: - case RE::FormType::Quest: - case RE::FormType::Idle: - case RE::FormType::AnimatedObject: - case RE::FormType::ImageAdapter: - case RE::FormType::VoiceType: - case RE::FormType::Ragdoll: - case RE::FormType::DefaultObject: - case RE::FormType::MusicType: - case RE::FormType::StoryManagerBranchNode: - case RE::FormType::StoryManagerQuestNode: - case RE::FormType::StoryManagerEventNode: - case RE::FormType::SoundRecord: - return a_form->GetFormEditorID(); - default: - return GetEditorID(a_form->GetFormID()); - } - } - bool FormType::GetWhitelisted(const RE::FormType a_type) { return std::ranges::find(whitelist, a_type) != whitelist.end(); diff --git a/SPID/src/LookupNPC.cpp b/SPID/src/LookupNPC.cpp index 685bace..8304b10 100644 --- a/SPID/src/LookupNPC.cpp +++ b/SPID/src/LookupNPC.cpp @@ -4,7 +4,7 @@ namespace NPC { Data::ID::ID(RE::TESActorBase* a_base) : formID(a_base->GetFormID()), - editorID(EditorID::GetEditorID(a_base)) + editorID(edid::get_editorID(a_base)) {} bool Data::ID::contains(const std::string& a_str) const diff --git a/SPID/src/PCLevelMultManager.cpp b/SPID/src/PCLevelMultManager.cpp index 61fa234..3eb2b18 100644 --- a/SPID/src/PCLevelMultManager.cpp +++ b/SPID/src/PCLevelMultManager.cpp @@ -73,11 +73,11 @@ namespace PCLevelMult for (auto& [playerID, npcFormIDs] : _cache) { logger::info("PlayerID : {:X}", playerID); for (auto& [npcFormID, levelMap] : npcFormIDs) { - logger::info("\tNPC : {} [{:X}]", EditorID::GetEditorID(npcFormID), npcFormID); + logger::info("\tNPC : {} [{:X}]", edid::get_editorID(RE::TESForm::LookupByID(npcFormID)), npcFormID); for (auto& [level, distFormMap] : levelMap.entries) { logger::info("\t\tLevel : {}", level); for (auto& [distFormID, idxSet] : distFormMap.rejectedEntries) { - logger::info("\t\t\tDist FormID : {} [{:X}]", EditorID::GetEditorID(distFormID), distFormID); + logger::info("\t\t\tDist FormID : {} [{:X}]", edid::get_editorID(RE::TESForm::LookupByID(distFormID)), distFormID); for (auto& idx : idxSet) { logger::info("\t\t\t\tIDX : {}", idx); } @@ -110,13 +110,13 @@ namespace PCLevelMult for (auto& [playerID, npcFormIDs] : _cache) { logger::info("PlayerID : {:X}", playerID); for (auto& [npcFormID, levelMap] : npcFormIDs) { - logger::info("\tNPC : {} [{:X}]", EditorID::GetEditorID(npcFormID), npcFormID); + logger::info("\tNPC : {} [{:X}]", edid::get_editorID(RE::TESForm::LookupByID(npcFormID)), npcFormID); for (auto& [level, distFormMap] : levelMap.entries) { logger::info("\t\tLevel : {}", level); for (auto& [formType, formIDSet] : distFormMap.distributedEntries) { logger::info("\t\t\tDist FormType : {}", formType); for (auto& formID : formIDSet) { - logger::info("\t\t\t\tDist FormID : {} [{:X}]", EditorID::GetEditorID(formID), formID); + logger::info("\t\t\t\tDist FormID : {} [{:X}]", edid::get_editorID(RE::TESForm::LookupByID(formID)), formID); } } } diff --git a/SPID/src/main.cpp b/SPID/src/main.cpp index 215f3c8..bdc21ff 100644 --- a/SPID/src/main.cpp +++ b/SPID/src/main.cpp @@ -14,7 +14,7 @@ void MessageHandler(SKSE::MessagingInterface::Message* a_message) { logger::info("{:*^50}", "DEPENDENCIES"); - tweaks = GetModuleHandle(L"po3_Tweaks"); + const auto tweaks = GetModuleHandle(L"po3_Tweaks"); logger::info("powerofthree's Tweaks (po3_tweaks) detected : {}", tweaks != nullptr); if (std::tie(shouldLookupForms, shouldLogErrors) = INI::GetConfigs(); shouldLookupForms) { diff --git a/cmake/ports/clib-util/portfile.cmake b/cmake/ports/clib-util/portfile.cmake index b22d718..b814bf8 100644 --- a/cmake/ports/clib-util/portfile.cmake +++ b/cmake/ports/clib-util/portfile.cmake @@ -2,8 +2,8 @@ vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO powerof3/CLibUtil - REF bf52162882f92d0ceccccd3a75305ed31b3efafa - SHA512 37ced7ee80b63663a7ddaf0c50d74ec32b7459b0e4e3f3f6db3afbd69faebe727ccad7a97ad48bf02686f345a5fbf7da960ff9ea0f24a52afeceb8078b608ad7 + REF 4c942f62d83cfbdb9bb585a708cbbfbf5cb9c850 + SHA512 8130bf589476202dcae05704145b0cbca3587e2458f1f79ee497f45fdc7dddcbc6a0e7311dd0566eb46633da963203bf0d9864debdd2406c317bbb18b484e184 HEAD_REF master ) diff --git a/cmake/ports/clib-util/vcpkg.json b/cmake/ports/clib-util/vcpkg.json index f3c7dc6..10ea250 100644 --- a/cmake/ports/clib-util/vcpkg.json +++ b/cmake/ports/clib-util/vcpkg.json @@ -1,6 +1,6 @@ { "name": "clib-util", - "version-string": "1.3.3", + "version-string": "1.3.9", "port-version": 1, "description": "", "homepage": "https://github.com/powerof3/CLibUtil" diff --git a/cmake/ports/mergemapper/portfile.cmake b/cmake/ports/mergemapper/portfile.cmake index cb42ad6..00adf3c 100644 --- a/cmake/ports/mergemapper/portfile.cmake +++ b/cmake/ports/mergemapper/portfile.cmake @@ -2,8 +2,8 @@ vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO alandtse/MergeMapper - REF 9d710f2a2e055acb13e41319cc19e3255fa0538a - SHA512 4e9b49aaaf5ac969956bf066cb92423b42a4ba6681e188b792ee3494fba3084dccc744dfc4722ee8d8df1b245e5ee4b20a503e9610fadb546df921e6fae42506 + REF ad758592e2c4fa77f0c0e985348f17af8fa24371 + SHA512 010f2e5de88c41b5b614af5e7347f7f08293b190e89bd761664ee1f2bcfa70007f87b4e0bb219a5ad7ee06921db9f6df061c875d6723f6068d776e651f729374 HEAD_REF main ) diff --git a/cmake/ports/mergemapper/vcpkg.json b/cmake/ports/mergemapper/vcpkg.json index 1566ded..3b57c63 100644 --- a/cmake/ports/mergemapper/vcpkg.json +++ b/cmake/ports/mergemapper/vcpkg.json @@ -1,6 +1,6 @@ { "name": "mergemapper", - "version-string": "1.4.0", + "version-string": "1.5.0", "port-version": 1, "description": "A SKSE plugin to dynamically map zmerges.", "homepage": "https://github.com/alandtse/MergeMapper" diff --git a/cmake/ports/unordered-dense/portfile.cmake b/cmake/ports/unordered-dense/portfile.cmake deleted file mode 100644 index a614b0d..0000000 --- a/cmake/ports/unordered-dense/portfile.cmake +++ /dev/null @@ -1,24 +0,0 @@ -vcpkg_from_github( - OUT_SOURCE_PATH SOURCE_PATH - REPO martinus/unordered_dense - REF 3add2a63444869d123e24792f17b5618edfaee44 - SHA512 0a0d763a9f3797bc79a5be76f85e85442a99f2dfc126b53112d0e4905a52a1bc11f8bf1051d8bad9147e4877555b4f9c87615e54654956bfdc494de44fe78c6e - HEAD_REF main -) - -vcpkg_cmake_configure( - SOURCE_PATH "${SOURCE_PATH}" -) - -vcpkg_cmake_install() -vcpkg_cmake_config_fixup( - PACKAGE_NAME unordered_dense - CONFIG_PATH lib/cmake/unordered_dense -) - -file(REMOVE_RECURSE - "${CURRENT_PACKAGES_DIR}/debug" - "${CURRENT_PACKAGES_DIR}/lib" -) - -file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/cmake/ports/unordered-dense/vcpkg.json b/cmake/ports/unordered-dense/vcpkg.json deleted file mode 100644 index 7cf57f8..0000000 --- a/cmake/ports/unordered-dense/vcpkg.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "name": "unordered-dense", - "version-string": "4.0.0", - "port-version": 1, - "description": "", - "homepage": "https://github.com/martinus/unordered_dense", - "dependencies": [ - { - "name": "vcpkg-cmake", - "host": true - }, - { - "name": "vcpkg-cmake-config", - "host": true - } - ] -} diff --git a/extern/CommonLibSSE b/extern/CommonLibSSE index e42579e..d755bca 160000 --- a/extern/CommonLibSSE +++ b/extern/CommonLibSSE @@ -1 +1 @@ -Subproject commit e42579e8c0991816c43e64d6675e0227e0802a25 +Subproject commit d755bcad6efcbc362b34785f8a02fbbdea7c2042 diff --git a/extern/CommonLibVR b/extern/CommonLibVR index c78b8e3..92c4029 160000 --- a/extern/CommonLibVR +++ b/extern/CommonLibVR @@ -1 +1 @@ -Subproject commit c78b8e35947d7374be32aad54426c55306894425 +Subproject commit 92c4029671e11f0e70850a4954d0d11ee53d6cd6