From 466f2cf0b7fc30380a799bc511fb523f942e9117 Mon Sep 17 00:00:00 2001 From: DismissedLight <1686188646@qq.com> Date: Fri, 25 Oct 2024 16:07:43 +0800 Subject: [PATCH] fix build --- .../Snap.Hutao.UnlockerIsland/dllmain.cpp | 16 ++++++++++++++++ .../Snap.Hutao.UnlockerIsland/framework.h | 18 +----------------- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/src/UnlockerIsland/Snap.Hutao.UnlockerIsland/dllmain.cpp b/src/UnlockerIsland/Snap.Hutao.UnlockerIsland/dllmain.cpp index ebec089..4d28e53 100644 --- a/src/UnlockerIsland/Snap.Hutao.UnlockerIsland/dllmain.cpp +++ b/src/UnlockerIsland/Snap.Hutao.UnlockerIsland/dllmain.cpp @@ -57,6 +57,22 @@ static VOID OpenTeamEndpoint() } } +VOID InitializeIslandStaging(Snap::Hutao::UnlockerIsland::IslandStaging& const staging, UINT64 base, Snap::Hutao::UnlockerIsland::IslandEnvironment* pEnvironment) +{ + // Magic + staging.MickeyWonder = reinterpret_cast(base + pEnvironment->FunctionOffsetMickeyWonderMethod); + staging.MickeyWonderPartner = reinterpret_cast(base + pEnvironment->FunctionOffsetMickeyWonderMethodPartner); + + // Basic functions + staging.SetFieldOfView = reinterpret_cast(base + pEnvironment->FunctionOffsetSetFieldOfView); + staging.SetEnableFogRendering = reinterpret_cast(base + pEnvironment->FunctionOffsetSetEnableFogRendering); + staging.SetTargetFrameRate = reinterpret_cast(base + pEnvironment->FunctionOffsetSetTargetFrameRate); + + // Team functions + staging.OpenTeam = reinterpret_cast(base + pEnvironment->FunctionOffsetOpenTeam); + staging.OpenTeamPageAccordingly = reinterpret_cast(base + pEnvironment->FunctionOffsetOpenTeamPageAccordingly); +} + static DWORD WINAPI IslandThread(LPVOID lpParam) { const UNIQUE_HANDLE hFile = UNIQUE_HANDLE(OpenFileMappingW(FILE_MAP_READ | FILE_MAP_WRITE, FALSE, ISLAND_ENVIRONMENT_NAME)); diff --git a/src/UnlockerIsland/Snap.Hutao.UnlockerIsland/framework.h b/src/UnlockerIsland/Snap.Hutao.UnlockerIsland/framework.h index 0211daa..8c7da35 100644 --- a/src/UnlockerIsland/Snap.Hutao.UnlockerIsland/framework.h +++ b/src/UnlockerIsland/Snap.Hutao.UnlockerIsland/framework.h @@ -91,20 +91,4 @@ struct Snap::Hutao::UnlockerIsland::IslandStaging SetTargetFrameRateFunc SetTargetFrameRate; OpenTeamFunc OpenTeam; OpenTeamPageAccordinglyFunc OpenTeamPageAccordingly; -}; - -VOID InitializeIslandStaging(Snap::Hutao::UnlockerIsland::IslandStaging& const staging, UINT64 base, Snap::Hutao::UnlockerIsland::IslandEnvironment* pEnvironment) -{ - // Magic - staging.MickeyWonder = reinterpret_cast(base + pEnvironment->FunctionOffsetMickeyWonderMethod); - staging.MickeyWonderPartner = reinterpret_cast(base + pEnvironment->FunctionOffsetMickeyWonderMethodPartner); - - // Basic functions - staging.SetFieldOfView = reinterpret_cast(base + pEnvironment->FunctionOffsetSetFieldOfView); - staging.SetEnableFogRendering = reinterpret_cast(base + pEnvironment->FunctionOffsetSetEnableFogRendering); - staging.SetTargetFrameRate = reinterpret_cast(base + pEnvironment->FunctionOffsetSetTargetFrameRate); - - // Team functions - staging.OpenTeam = reinterpret_cast(base + pEnvironment->FunctionOffsetOpenTeam); - staging.OpenTeamPageAccordingly = reinterpret_cast(base + pEnvironment->FunctionOffsetOpenTeamPageAccordingly); -} \ No newline at end of file +}; \ No newline at end of file