From 7b72d64df56ebedd46652fe8481dd9b27bc8aae1 Mon Sep 17 00:00:00 2001 From: Robbe Bryssinck Date: Sun, 7 May 2023 20:52:22 +0200 Subject: [PATCH 1/6] fix: Activate() signature --- Code/client/Games/Fallout4/TESObjectREFR.cpp | 6 +++--- Code/client/Games/Fallout4/TESObjectREFR.h | 2 +- Code/client/Games/Skyrim/TESObjectREFR.cpp | 6 +++--- Code/client/Games/Skyrim/TESObjectREFR.h | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Code/client/Games/Fallout4/TESObjectREFR.cpp b/Code/client/Games/Fallout4/TESObjectREFR.cpp index 6ec94abb5..19f17083b 100644 --- a/Code/client/Games/Fallout4/TESObjectREFR.cpp +++ b/Code/client/Games/Fallout4/TESObjectREFR.cpp @@ -14,7 +14,7 @@ #include -TP_THIS_FUNCTION(TActivate, void, TESObjectREFR, TESObjectREFR* apActivator, TESBoundObject* apObjectToGet, int32_t aCount, bool aDefaultProcessing, bool aFromScript, bool aIsLooping); +TP_THIS_FUNCTION(TActivate, bool, TESObjectREFR, TESObjectREFR* apActivator, TESBoundObject* apObjectToGet, int32_t aCount, bool aDefaultProcessing, bool aFromScript, bool aIsLooping); TP_THIS_FUNCTION(TAddInventoryItem, void, TESObjectREFR, TESBoundObject* apObject, ExtraDataList* apExtraData, uint32_t aCount, TESObjectREFR* apOldContainer, void* apUnk1, void* apUnk2); TP_THIS_FUNCTION(TRemoveInventoryItem, uint32_t*, TESObjectREFR, uint32_t* apUnk1, void* apUnk2); @@ -139,12 +139,12 @@ const BGSEquipSlot* TESObjectREFR::GetEquipSlot(uint32_t aEquipIndex) const noex return TiltedPhoques::ThisCall(getEquipSlot, this, aEquipIndex); } -void TESObjectREFR::Activate(TESObjectREFR* apActivator, TESBoundObject* apObjectToGet, int32_t aCount, bool aDefaultProcessing, bool aFromScript, bool aIsLooping) noexcept +bool TESObjectREFR::Activate(TESObjectREFR* apActivator, TESBoundObject* apObjectToGet, int32_t aCount, bool aDefaultProcessing, bool aFromScript, bool aIsLooping) noexcept { return TiltedPhoques::ThisCall(RealActivate, this, apActivator, apObjectToGet, aCount, aDefaultProcessing, aFromScript, aIsLooping); } -void TP_MAKE_THISCALL(HookActivate, TESObjectREFR, TESObjectREFR* apActivator, TESBoundObject* apObjectToGet, int aCount, bool aDefaultProcessing, bool aFromScript, bool aIsLooping) +bool TP_MAKE_THISCALL(HookActivate, TESObjectREFR, TESObjectREFR* apActivator, TESBoundObject* apObjectToGet, int aCount, bool aDefaultProcessing, bool aFromScript, bool aIsLooping) { auto* pActivator = Cast(apActivator); if (pActivator) diff --git a/Code/client/Games/Fallout4/TESObjectREFR.h b/Code/client/Games/Fallout4/TESObjectREFR.h index e6404065a..aea07a403 100644 --- a/Code/client/Games/Fallout4/TESObjectREFR.h +++ b/Code/client/Games/Fallout4/TESObjectREFR.h @@ -188,7 +188,7 @@ struct TESObjectREFR : TESForm void PayGold(int32_t aAmount) noexcept; void PayGoldToContainer(TESObjectREFR* pContainer, int32_t aAmount) noexcept; - void Activate(TESObjectREFR* apActivator, TESBoundObject* apObjectToGet, int32_t aCount, bool aDefaultProcessing, bool aFromScript, bool aIsLooping) noexcept; + bool Activate(TESObjectREFR* apActivator, TESBoundObject* apObjectToGet, int32_t aCount, bool aDefaultProcessing, bool aFromScript, bool aIsLooping) noexcept; Lock* CreateLock() noexcept; void LockChange() noexcept; diff --git a/Code/client/Games/Skyrim/TESObjectREFR.cpp b/Code/client/Games/Skyrim/TESObjectREFR.cpp index 27bbc59dd..ffb8b5785 100644 --- a/Code/client/Games/Skyrim/TESObjectREFR.cpp +++ b/Code/client/Games/Skyrim/TESObjectREFR.cpp @@ -24,7 +24,7 @@ #include #include -TP_THIS_FUNCTION(TActivate, void, TESObjectREFR, TESObjectREFR* apActivator, uint8_t aUnk1, TESBoundObject* apObjectToGet, int32_t aCount, char aDefaultProcessing); +TP_THIS_FUNCTION(TActivate, bool, TESObjectREFR, TESObjectREFR* apActivator, uint8_t aUnk1, TESBoundObject* apObjectToGet, int32_t aCount, char aDefaultProcessing); TP_THIS_FUNCTION(TAddInventoryItem, void, TESObjectREFR, TESBoundObject* apItem, ExtraDataList* apExtraData, int32_t aCount, TESObjectREFR* apOldOwner); TP_THIS_FUNCTION( TRemoveInventoryItem, BSPointerHandle*, TESObjectREFR, BSPointerHandle* apResult, TESBoundObject* apItem, int32_t aCount, ITEM_REMOVE_REASON aReason, ExtraDataList* apExtraList, TESObjectREFR* apMoveToRef, const NiPoint3* apDropLoc, const NiPoint3* apRotate); @@ -520,7 +520,7 @@ void TESObjectREFR::UpdateItemList(TESForm* pUnkForm) noexcept TiltedPhoques::ThisCall(updateItemList, this, pUnkForm); } -void TESObjectREFR::Activate(TESObjectREFR* apActivator, uint8_t aUnk1, TESBoundObject* aObjectToGet, int32_t aCount, char aDefaultProcessing) noexcept +bool TESObjectREFR::Activate(TESObjectREFR* apActivator, uint8_t aUnk1, TESBoundObject* aObjectToGet, int32_t aCount, char aDefaultProcessing) noexcept { ScopedActivateOverride _; @@ -590,7 +590,7 @@ bool TP_MAKE_THISCALL(HookPlayAnimation, void, uint32_t auiStackID, TESObjectREF return TiltedPhoques::ThisCall(RealPlayAnimation, apThis, auiStackID, apSelf, apEventName); } -void TP_MAKE_THISCALL(HookActivate, TESObjectREFR, TESObjectREFR* apActivator, uint8_t aUnk1, TESBoundObject* apObjectToGet, int32_t aCount, char aDefaultProcessing) +bool TP_MAKE_THISCALL(HookActivate, TESObjectREFR, TESObjectREFR* apActivator, uint8_t aUnk1, TESBoundObject* apObjectToGet, int32_t aCount, char aDefaultProcessing) { Actor* pActivator = Cast(apActivator); if (pActivator) diff --git a/Code/client/Games/Skyrim/TESObjectREFR.h b/Code/client/Games/Skyrim/TESObjectREFR.h index 0e80559bc..df12dee59 100644 --- a/Code/client/Games/Skyrim/TESObjectREFR.h +++ b/Code/client/Games/Skyrim/TESObjectREFR.h @@ -176,7 +176,7 @@ struct TESObjectREFR : TESForm void PayGold(int32_t aAmount) noexcept; void PayGoldToContainer(TESObjectREFR* pContainer, int32_t aAmount) noexcept; - void Activate(TESObjectREFR* apActivator, uint8_t aUnk1, TESBoundObject* apObjectToGet, int32_t aCount, char aDefaultProcessing) noexcept; + bool Activate(TESObjectREFR* apActivator, uint8_t aUnk1, TESBoundObject* apObjectToGet, int32_t aCount, char aDefaultProcessing) noexcept; bool PlayAnimationAndWait(BSFixedString* apAnimation, BSFixedString* apEventName) noexcept; bool PlayAnimation(BSFixedString* apEventName) noexcept; From c0657c1e08b2bbb93468fd7ca0bcc0dbaa1997e3 Mon Sep 17 00:00:00 2001 From: Robbe Bryssinck Date: Thu, 25 Jan 2024 20:38:29 +0100 Subject: [PATCH 2/6] Branchinfo --- Code/immersive_launcher/Launcher.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Code/immersive_launcher/Launcher.cpp b/Code/immersive_launcher/Launcher.cpp index 5323bc964..0547a00de 100644 --- a/Code/immersive_launcher/Launcher.cpp +++ b/Code/immersive_launcher/Launcher.cpp @@ -15,6 +15,8 @@ #include "base/dialogues/win/TaskDialog.h" +#include + // These symbols are defined within the client code skyrimtogetherclient extern void InstallStartHook(); extern void RunTiltedApp(); From 75c005329d83008709b1f5bd7a4c13f6fbe16d83 Mon Sep 17 00:00:00 2001 From: Robbe Bryssinck Date: Fri, 29 Mar 2024 11:06:33 +0100 Subject: [PATCH 3/6] Version pinning --- Code/client/xmake.lua | 2 +- Code/server/xmake.lua | 2 +- Libraries/TiltedUI | 2 +- xmake.lua | 34 +++++++++++++--------------------- 4 files changed, 16 insertions(+), 24 deletions(-) diff --git a/Code/client/xmake.lua b/Code/client/xmake.lua index 2b655a412..9c2028ef0 100644 --- a/Code/client/xmake.lua +++ b/Code/client/xmake.lua @@ -79,7 +79,7 @@ target(name) "kernel32") end -add_requires("tiltedcore", {debug = true}) +add_requires("tiltedcore v0.2.7", {debug = true}) build_client("SkyrimTogetherClient", "TP_SKYRIM=1") build_client("FalloutTogetherClient", "TP_FALLOUT=1") diff --git a/Code/server/xmake.lua b/Code/server/xmake.lua index 6fd4ddfcc..57b7840a7 100644 --- a/Code/server/xmake.lua +++ b/Code/server/xmake.lua @@ -1,6 +1,6 @@ local function istable(t) return type(t) == 'table' end -add_requires("sol2", {configs = {lua = "lua"}}) +add_requires("sol2 v3.3.0", {configs = {lua = "lua"}}) local function build_server() set_kind("shared") diff --git a/Libraries/TiltedUI b/Libraries/TiltedUI index 7f421437a..2c00af54e 160000 --- a/Libraries/TiltedUI +++ b/Libraries/TiltedUI @@ -1 +1 @@ -Subproject commit 7f421437a36a49e5d06ca534e1eacf217b84bee7 +Subproject commit 2c00af54e93310597a5b750ddb8cf7893d741e47 diff --git a/xmake.lua b/xmake.lua index 344f0fd1a..7d917ee0d 100644 --- a/xmake.lua +++ b/xmake.lua @@ -1,4 +1,4 @@ -set_xmakever("2.6.5") +set_xmakever("2.8.5") -- If newer version of xmake, remove ccache until it actually works if set_policy ~= nil then @@ -32,16 +32,16 @@ end add_requires( "entt v3.10.0", - "recastnavigation", - "tiltedcore", - "cryptopp", - "spdlog", - "cpp-httplib", - "gtest", - "mem", - "glm", - "sentry-native", - "zlib") + "recastnavigation v1.6.0", + "tiltedcore v0.2.7", + "cryptopp 8.9.0", + "spdlog v1.13.0", + "cpp-httplib 0.14.0", + "gtest v1.14.0", + "mem 1.0.0", + "glm 0.9.9+8", + "sentry-native 0.7.1", + "zlib v1.3.1") add_requireconfs("cpp-httplib", {configs = {ssl = true}}) add_requireconfs("sentry-native", { configs = { backend = "crashpad" } }) @@ -54,17 +54,9 @@ add_requireconfs("magnum-integration.imgui", { override = true }) if is_plat("windows") then add_requires( - "discord", - "imgui" + "discord 3.2.1", + "imgui v1.89.7" ) - --[[ - add_requires( - "discord", - "imgui", - "magnum", - "magnum-integration" - ) - --]] end before_build(function (target) From 742122214032766822c514a16af8bc9c64e5fd40 Mon Sep 17 00:00:00 2001 From: Robbe Bryssinck Date: Fri, 29 Mar 2024 12:11:57 +0100 Subject: [PATCH 4/6] Disable Sentry --- Code/client/TiltedOnlineApp.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Code/client/TiltedOnlineApp.h b/Code/client/TiltedOnlineApp.h index 84db976e2..875439460 100644 --- a/Code/client/TiltedOnlineApp.h +++ b/Code/client/TiltedOnlineApp.h @@ -36,6 +36,6 @@ struct TiltedOnlineApp final : App #if (!IS_MASTER) CrashHandler m_crashHandler; #else - ScopedCrashHandler m_crashHandler; + //ScopedCrashHandler m_crashHandler; #endif }; From 54c32308e3ae1f61964a0142654c8dafed92ace7 Mon Sep 17 00:00:00 2001 From: Robbe Bryssinck Date: Fri, 29 Mar 2024 12:34:23 +0100 Subject: [PATCH 5/6] Unnecessary include in PCH --- Code/client/TiltedOnlinePCH.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/Code/client/TiltedOnlinePCH.h b/Code/client/TiltedOnlinePCH.h index 5095b2279..6e6ddfee4 100644 --- a/Code/client/TiltedOnlinePCH.h +++ b/Code/client/TiltedOnlinePCH.h @@ -4,8 +4,6 @@ #define NOMINMAX #endif -#include - #include #if defined(TP_SKYRIM) && TP_PLATFORM_64 From fad3eca68d16cb013c215e823ab0edf0d488f827 Mon Sep 17 00:00:00 2001 From: Robbe Bryssinck Date: Fri, 29 Mar 2024 12:35:55 +0100 Subject: [PATCH 6/6] Include BranchInfo appropriately --- Code/client/Services/Debug/DebugService.cpp | 2 ++ Code/client/TiltedOnlineApp.h | 2 ++ 2 files changed, 4 insertions(+) diff --git a/Code/client/Services/Debug/DebugService.cpp b/Code/client/Services/Debug/DebugService.cpp index 82c2cbf2a..85639f819 100644 --- a/Code/client/Services/Debug/DebugService.cpp +++ b/Code/client/Services/Debug/DebugService.cpp @@ -1,3 +1,5 @@ +#include + #include #include diff --git a/Code/client/TiltedOnlineApp.h b/Code/client/TiltedOnlineApp.h index 875439460..f860966e7 100644 --- a/Code/client/TiltedOnlineApp.h +++ b/Code/client/TiltedOnlineApp.h @@ -1,5 +1,7 @@ #pragma once +#include + #if (!IS_MASTER) #include "CrashHandler.h" #else