From 09e0c04f7b9d2d357715dc908ff0094dcf3e4fcc Mon Sep 17 00:00:00 2001 From: void_17 Date: Mon, 2 Mar 2026 15:11:05 +0700 Subject: [PATCH 1/3] Further C-style struct definitions fixes --- Minecraft.Client/TextureHolder.h | 7 ++++--- Minecraft.World/ChunkPos.h | 15 ++++++++------- Minecraft.World/TilePos.h | 15 ++++++++------- 3 files changed, 20 insertions(+), 17 deletions(-) diff --git a/Minecraft.Client/TextureHolder.h b/Minecraft.Client/TextureHolder.h index 304d03e75..6c600d637 100644 --- a/Minecraft.Client/TextureHolder.h +++ b/Minecraft.Client/TextureHolder.h @@ -30,7 +30,8 @@ public: int compareTo(const TextureHolder *other) const; }; -typedef struct +struct TextureHolderLessThan { - bool operator() (const TextureHolder *first, const TextureHolder *second) const { return first->compareTo(second) >= 0; } -} TextureHolderLessThan; \ No newline at end of file + inline bool operator()(const TextureHolder *first, const TextureHolder *second) const + { return first->compareTo(second) >= 0; } +}; \ No newline at end of file diff --git a/Minecraft.World/ChunkPos.h b/Minecraft.World/ChunkPos.h index f1d483c7e..2a3fda02b 100644 --- a/Minecraft.World/ChunkPos.h +++ b/Minecraft.World/ChunkPos.h @@ -28,13 +28,14 @@ public: ChunkPos & operator= (const ChunkPos & other) { x = other.x; z = other.z; return *this; } }; -typedef struct +struct ChunkPosKeyHash { - __int64 operator() (const ChunkPos &k) const { return ChunkPos::hash_fnct(k); } + inline __int64 operator()(const ChunkPos &k) const + { return ChunkPos::hash_fnct(k); } +}; -} ChunkPosKeyHash; - -typedef struct +struct ChunkPosKeyEq { - bool operator() (const ChunkPos &x, const ChunkPos &y) const { return ChunkPos::eq_test(x, y); } -} ChunkPosKeyEq; \ No newline at end of file + inline bool operator()(const ChunkPos &x, const ChunkPos &y) const + { return ChunkPos::eq_test(x, y); } +}; \ No newline at end of file diff --git a/Minecraft.World/TilePos.h b/Minecraft.World/TilePos.h index d4a3e84eb..04804066a 100644 --- a/Minecraft.World/TilePos.h +++ b/Minecraft.World/TilePos.h @@ -14,14 +14,15 @@ public: static bool eq_test(const TilePos &x, const TilePos &y); }; -typedef struct +struct TilePosKeyHash { - int operator() (const TilePos &k) const { return TilePos::hash_fnct (k); } + inline int operator()(const TilePos &k) const + { return TilePos::hash_fnct (k); } +}; -} TilePosKeyHash; - -typedef struct +struct TilePosKeyEq { - bool operator() (const TilePos &x, const TilePos &y) const { return TilePos::eq_test (x, y); } -} TilePosKeyEq; + inline bool operator()(const TilePos &x, const TilePos &y) const + { return TilePos::eq_test (x, y); } +}; From e15bd26917cca606800c025371e61129109af004 Mon Sep 17 00:00:00 2001 From: rtm516 Date: Mon, 2 Mar 2026 08:14:14 +0000 Subject: [PATCH 2/3] Move to a postbuild.ps1 script and set the working dir at runtime as output dir (#113) * Move to a postbuild.ps1 script and Set the working dir at runtime as output dir * Update for 2f711d4 * Only copy newer files and remove needed files from gitignore --- .gitignore | 8 +++- Minecraft.Client/Minecraft.Client.vcxproj | 31 ++------------ .../Minecraft.Client.vcxproj.user | 8 ++++ Minecraft.Client/postbuild.ps1 | 42 +++++++++++++++++++ 4 files changed, 61 insertions(+), 28 deletions(-) create mode 100644 Minecraft.Client/postbuild.ps1 diff --git a/.gitignore b/.gitignore index 0a42b42e5..eef95bde6 100644 --- a/.gitignore +++ b/.gitignore @@ -423,4 +423,10 @@ Minecraft.World/x64_Debug/ Minecraft.World/Release/ Minecraft.World/x64_Release/ -build/* \ No newline at end of file +build/* + +# Existing build output files +!x64/**/Effects.msscmp +!x64/**/iggy_w64.dll +!x64/**/mss64.dll +!x64/**/redist64/ diff --git a/Minecraft.Client/Minecraft.Client.vcxproj b/Minecraft.Client/Minecraft.Client.vcxproj index 5e448ab66..4e8d46bec 100644 --- a/Minecraft.Client/Minecraft.Client.vcxproj +++ b/Minecraft.Client/Minecraft.Client.vcxproj @@ -1302,14 +1302,8 @@ if not exist "$(TargetDir)\savedata" mkdir "$(TargetDir)\savedata" MultiplyDefinedSymbolOnly - Copying sound assets to output directory - xcopy /q /y /i /s /e "$(ProjectDir)Durango\Sound" "$(OutDir)Durango\Sound" -xcopy /q /y /i /s /e "$(ProjectDir)music" "$(OutDir)music" -xcopy /q /y /i /s /e "$(ProjectDir)Windows64\GameHDD" "$(OutDir)Windows64\GameHDD" -xcopy /q /y /i /s /e "$(ProjectDir)Common\Media" "$(OutDir)Common\Media" -xcopy /q /y /i /s /e "$(ProjectDir)Common\res" "$(OutDir)Common\res" -xcopy /q /y /i /s /e "$(ProjectDir)Common\Trial" "$(OutDir)Common\Trial" -xcopy /q /y /i /s /e "$(ProjectDir)Common\Tutorial" "$(OutDir)Common\Tutorial" + Run postbuild script + powershell -ExecutionPolicy Bypass -File "$(ProjectDir)postbuild.ps1" -OutDir "$(OutDir)/" -ProjectDir "$(ProjectDir)/" $(ProjectDir)xbox\xex-dev.xml @@ -1440,25 +1434,8 @@ xcopy /q /y /i /s /e $(ProjectDir)Durango\CU $(LayoutDir)Image\Loose\CUfalse - Copying game assets to output directory - mkdir "$(OutDir)music" 2>nul -mkdir "$(OutDir)Windows64\GameHDD" 2>nul -mkdir "$(OutDir)Common\Media" 2>nul -mkdir "$(OutDir)Common\res" 2>nul -mkdir "$(OutDir)Common\Trial" 2>nul -mkdir "$(OutDir)Common\Tutorial" 2>nul -mkdir "$(OutDir)Windows64Media" 2>nul - -xcopy /q /y /i /s /e "$(ProjectDir)music" "$(OutDir)music" || exit /b 0 -xcopy /q /y /i /s /e "$(ProjectDir)Windows64\GameHDD" "$(OutDir)Windows64\GameHDD" || exit /b 0 -xcopy /q /y /i /s /e "$(ProjectDir)Common\Media" "$(OutDir)Common\Media" || exit /b 0 -xcopy /q /y /i /s /e "$(ProjectDir)Common\res" "$(OutDir)Common\res" || exit /b 0 -xcopy /q /y /i /s /e "$(ProjectDir)Common\Trial" "$(OutDir)Common\Trial" || exit /b 0 -xcopy /q /y /i /s /e "$(ProjectDir)Common\Tutorial" "$(OutDir)Common\Tutorial" || exit /b 0 -xcopy /q /y /i /s /e "$(ProjectDir)DurangoMedia" "$(OutDir)Windows64Media" || exit /b 0 -xcopy /q /y /i /s /e "$(ProjectDir)Windows64Media" "$(OutDir)Windows64Media" || exit /b 0 - -exit /b 0 + Run postbuild script + powershell -ExecutionPolicy Bypass -File "$(ProjectDir)postbuild.ps1" -OutDir "$(OutDir)/" -ProjectDir "$(ProjectDir)/" $(ProjectDir)xbox\xex-dev.xml diff --git a/Minecraft.Client/Minecraft.Client.vcxproj.user b/Minecraft.Client/Minecraft.Client.vcxproj.user index cf9782cd0..10dbfa336 100644 --- a/Minecraft.Client/Minecraft.Client.vcxproj.user +++ b/Minecraft.Client/Minecraft.Client.vcxproj.user @@ -3,4 +3,12 @@ Debug + + $(SolutionDir)$(Platform)\$(Configuration)\ + WindowsLocalDebugger + + + $(SolutionDir)$(Platform)\$(Configuration)\ + WindowsLocalDebugger + \ No newline at end of file diff --git a/Minecraft.Client/postbuild.ps1 b/Minecraft.Client/postbuild.ps1 new file mode 100644 index 000000000..1c965758a --- /dev/null +++ b/Minecraft.Client/postbuild.ps1 @@ -0,0 +1,42 @@ +param( + [string]$OutDir, + [string]$ProjectDir +) + +Write-Host "Post-build script started. Output Directory: $OutDir, Project Directory: $ProjectDir" + +$directories = @( + "music", + "Windows64\GameHDD", + "Common\Media", + "Common\res", + "Common\Trial", + "Common\Tutorial", + "Windows64Media" +) + +foreach ($dir in $directories) { + New-Item -ItemType Directory -Path (Join-Path $OutDir $dir) -Force | Out-Null +} + +$copies = @( + @{ Source = "music"; Dest = "music" }, + @{ Source = "Common\Media"; Dest = "Common\Media" }, + @{ Source = "Common\res"; Dest = "Common\res" }, + @{ Source = "Common\Trial"; Dest = "Common\Trial" }, + @{ Source = "Common\Tutorial"; Dest = "Common\Tutorial" }, + @{ Source = "Windows64\GameHDD"; Dest = "Windows64\GameHDD" }, + @{ Source = "Windows64\Sound"; Dest = "Windows64\Sound" }, + @{ Source = "DurangoMedia"; Dest = "Windows64Media" }, + @{ Source = "Windows64Media"; Dest = "Windows64Media" } +) + +foreach ($copy in $copies) { + $src = Join-Path $ProjectDir $copy.Source + $dst = Join-Path $OutDir $copy.Dest + + if (Test-Path $src) { + # Copy the files using xcopy, forcing overwrite and suppressing errors, and only copying if the source is newer than the destination + xcopy /q /y /i /s /e /d "$src" "$dst" 2>$null + } +} From d6ec138710461294c3ffd2723bc8a9f212d3471f Mon Sep 17 00:00:00 2001 From: Karsam Date: Mon, 2 Mar 2026 00:28:30 -0800 Subject: [PATCH 3/3] Fixed issue 109 with tab menu (#116) --- Minecraft.Client/Common/UI/UILayer.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Minecraft.Client/Common/UI/UILayer.cpp b/Minecraft.Client/Common/UI/UILayer.cpp index e6f87f81b..15bde2fa1 100644 --- a/Minecraft.Client/Common/UI/UILayer.cpp +++ b/Minecraft.Client/Common/UI/UILayer.cpp @@ -313,6 +313,10 @@ bool UILayer::NavigateToScene(int iPad, EUIScene scene, void *initData) newScene = new UIScene_InGameInfoMenu(iPad, initData, this); break; case eUIScene_InGameHostOptionsMenu: + if (IsSceneInStack(eUIScene_InGameHostOptionsMenu)) { + app.DebugPrintf("Skipped eUIScene_InGameHostOptionsMenu, we have already this tab!"); + return false; + } newScene = new UIScene_InGameHostOptionsMenu(iPad, initData, this); break; case eUIScene_InGamePlayerOptionsMenu: