Skip to content

Commit

Permalink
fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
Lightczx committed Oct 25, 2024
1 parent 7a7f768 commit 466f2cf
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 17 deletions.
16 changes: 16 additions & 0 deletions src/UnlockerIsland/Snap.Hutao.UnlockerIsland/dllmain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<MickeyWonderMethod>(base + pEnvironment->FunctionOffsetMickeyWonderMethod);
staging.MickeyWonderPartner = reinterpret_cast<MickeyWonderMethodPartner>(base + pEnvironment->FunctionOffsetMickeyWonderMethodPartner);

// Basic functions
staging.SetFieldOfView = reinterpret_cast<SetFieldOfViewFunc>(base + pEnvironment->FunctionOffsetSetFieldOfView);
staging.SetEnableFogRendering = reinterpret_cast<SetEnableFogRenderingFunc>(base + pEnvironment->FunctionOffsetSetEnableFogRendering);
staging.SetTargetFrameRate = reinterpret_cast<SetTargetFrameRateFunc>(base + pEnvironment->FunctionOffsetSetTargetFrameRate);

// Team functions
staging.OpenTeam = reinterpret_cast<OpenTeamFunc>(base + pEnvironment->FunctionOffsetOpenTeam);
staging.OpenTeamPageAccordingly = reinterpret_cast<OpenTeamPageAccordinglyFunc>(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));
Expand Down
18 changes: 1 addition & 17 deletions src/UnlockerIsland/Snap.Hutao.UnlockerIsland/framework.h
Original file line number Diff line number Diff line change
Expand Up @@ -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<MickeyWonderMethod>(base + pEnvironment->FunctionOffsetMickeyWonderMethod);
staging.MickeyWonderPartner = reinterpret_cast<MickeyWonderMethodPartner>(base + pEnvironment->FunctionOffsetMickeyWonderMethodPartner);

// Basic functions
staging.SetFieldOfView = reinterpret_cast<SetFieldOfViewFunc>(base + pEnvironment->FunctionOffsetSetFieldOfView);
staging.SetEnableFogRendering = reinterpret_cast<SetEnableFogRenderingFunc>(base + pEnvironment->FunctionOffsetSetEnableFogRendering);
staging.SetTargetFrameRate = reinterpret_cast<SetTargetFrameRateFunc>(base + pEnvironment->FunctionOffsetSetTargetFrameRate);

// Team functions
staging.OpenTeam = reinterpret_cast<OpenTeamFunc>(base + pEnvironment->FunctionOffsetOpenTeam);
staging.OpenTeamPageAccordingly = reinterpret_cast<OpenTeamPageAccordinglyFunc>(base + pEnvironment->FunctionOffsetOpenTeamPageAccordingly);
}
};

0 comments on commit 466f2cf

Please sign in to comment.