diff --git a/platforms/sdl/base/AppPlatform_sdl.cpp b/platforms/sdl/base/AppPlatform_sdl.cpp index 63396731e..9e2dd555e 100644 --- a/platforms/sdl/base/AppPlatform_sdl.cpp +++ b/platforms/sdl/base/AppPlatform_sdl.cpp @@ -113,7 +113,7 @@ void AppPlatform_sdl::_ensureDirectoryExists(const char* path) if (stat(path, &obj) != 0 || !S_ISDIR(obj.st_mode)) { // Create Screenshots Folder -#if defined(_WIN32) && !defined(__MINGW32__) +#if defined(_WIN32) && !defined(__MINGW32__) && !defined(__clang__) int ret = XPL_MKDIR(path); #else int ret = XPL_MKDIR(path, S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH); diff --git a/platforms/sound/directsound/SoundSystemDS.cpp b/platforms/sound/directsound/SoundSystemDS.cpp index 449201329..4ad03b304 100644 --- a/platforms/sound/directsound/SoundSystemDS.cpp +++ b/platforms/sound/directsound/SoundSystemDS.cpp @@ -9,6 +9,7 @@ #define WIN32_LEAN_AND_MEAN #include "CustomSoundSystem.hpp" #include "common/Logger.hpp" +#include "common/Utils.hpp" #include "client/app/AppPlatform.hpp" // @TODO: fix crash in playAt when Asan is active diff --git a/platforms/sound/openal/SoundSystemAL.cpp b/platforms/sound/openal/SoundSystemAL.cpp index c9cdb5ec2..fc9f97542 100644 --- a/platforms/sound/openal/SoundSystemAL.cpp +++ b/platforms/sound/openal/SoundSystemAL.cpp @@ -1,7 +1,10 @@ +#include + #include "CustomSoundSystem.hpp" #include "thirdparty/OpenAL.h" #include "common/Logger.hpp" +#include "common/Utils.hpp" #include "SoundStreamAL.hpp" diff --git a/platforms/windows/AppPlatform_win32.cpp b/platforms/windows/AppPlatform_win32.cpp index 797154f24..6756f32cb 100644 --- a/platforms/windows/AppPlatform_win32.cpp +++ b/platforms/windows/AppPlatform_win32.cpp @@ -15,6 +15,7 @@ #include "GameMods.hpp" #include "common/Logger.hpp" +#include "common/Utils.hpp" #include "renderer/RenderContextImmediate.hpp" #if MCE_GFX_API_OGL diff --git a/platforms/windows/projects/MinecraftClient.SDL2/MinecraftClient.SDL2.vcxproj b/platforms/windows/projects/MinecraftClient.SDL2/MinecraftClient.SDL2.vcxproj index 0ac64178c..661d0ae41 100644 --- a/platforms/windows/projects/MinecraftClient.SDL2/MinecraftClient.SDL2.vcxproj +++ b/platforms/windows/projects/MinecraftClient.SDL2/MinecraftClient.SDL2.vcxproj @@ -37,7 +37,7 @@ - $(MC_ROOT)\platforms\sound\openal;$(MC_ROOT)\thirdparty\stb_image\include;$(SDL2_PATH)\include;$(LIBPNG_PATH);$(OPENAL_PATH)\include;%(AdditionalIncludeDirectories) + $(MC_ROOT)\platforms\sound\openal;$(MC_ROOT)\thirdparty\stb_image\include;$(SDL2_PATH)\include;$(OPENAL_PATH)\include;%(AdditionalIncludeDirectories) Console @@ -46,7 +46,7 @@ - $(SDL2_PATH)\VisualC\Win32\Release;$(LIBPNG_PATH)\projects\vstudio\Release Library\;$(OPENAL_PATH)\libs\Win32\;%(AdditionalLibraryDirectories) + $(SDL2_PATH)\VisualC\Win32\Release;$(OPENAL_PATH)\libs\Win32\;%(AdditionalLibraryDirectories) copy $(SDL2_PATH)\VisualC\Win32\Release\SDL2.dll $(TargetDir) /y @@ -54,7 +54,7 @@ - $(SDL2_PATH)\VisualC\x64\Release;$(LIBPNG_PATH)\projects\vstudio\x64\Release Library;$(OPENAL_PATH)\libs\Win64\;%(AdditionalLibraryDirectories) + $(SDL2_PATH)\VisualC\x64\Release;$(OPENAL_PATH)\libs\Win64\;%(AdditionalLibraryDirectories) copy $(SDL2_PATH)\VisualC\x64\Release\SDL2.dll $(TargetDir) /y diff --git a/platforms/xenon/Minecraft.sln b/platforms/xenon/Minecraft.sln deleted file mode 100644 index faba8efef..000000000 --- a/platforms/xenon/Minecraft.sln +++ /dev/null @@ -1,32 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual Studio 2010 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Minecraft", "projects/Minecraft.vcxproj", "{5871555D-341B-400D-B446-DF4868AAF7F6}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - CodeAnalysis|Xbox 360 = CodeAnalysis|Xbox 360 - Debug|Xbox 360 = Debug|Xbox 360 - Profile_FastCap|Xbox 360 = Profile_FastCap|Xbox 360 - Profile|Xbox 360 = Profile|Xbox 360 - Release_LTCG|Xbox 360 = Release_LTCG|Xbox 360 - Release|Xbox 360 = Release|Xbox 360 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {5871555D-341B-400D-B446-DF4868AAF7F6}.CodeAnalysis|Xbox 360.ActiveCfg = CodeAnalysis|Xbox 360 - {5871555D-341B-400D-B446-DF4868AAF7F6}.CodeAnalysis|Xbox 360.Build.0 = CodeAnalysis|Xbox 360 - {5871555D-341B-400D-B446-DF4868AAF7F6}.Debug|Xbox 360.ActiveCfg = Debug|Xbox 360 - {5871555D-341B-400D-B446-DF4868AAF7F6}.Debug|Xbox 360.Build.0 = Debug|Xbox 360 - {5871555D-341B-400D-B446-DF4868AAF7F6}.Profile_FastCap|Xbox 360.ActiveCfg = Profile_FastCap|Xbox 360 - {5871555D-341B-400D-B446-DF4868AAF7F6}.Profile_FastCap|Xbox 360.Build.0 = Profile_FastCap|Xbox 360 - {5871555D-341B-400D-B446-DF4868AAF7F6}.Profile|Xbox 360.ActiveCfg = Profile|Xbox 360 - {5871555D-341B-400D-B446-DF4868AAF7F6}.Profile|Xbox 360.Build.0 = Profile|Xbox 360 - {5871555D-341B-400D-B446-DF4868AAF7F6}.Release_LTCG|Xbox 360.ActiveCfg = Release_LTCG|Xbox 360 - {5871555D-341B-400D-B446-DF4868AAF7F6}.Release_LTCG|Xbox 360.Build.0 = Release_LTCG|Xbox 360 - {5871555D-341B-400D-B446-DF4868AAF7F6}.Release|Xbox 360.ActiveCfg = Release|Xbox 360 - {5871555D-341B-400D-B446-DF4868AAF7F6}.Release|Xbox 360.Build.0 = Release|Xbox 360 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/platforms/xenon/projects/CustomProperties.props b/platforms/xenon/projects/CustomProperties.props deleted file mode 100644 index 0224e0b7e..000000000 --- a/platforms/xenon/projects/CustomProperties.props +++ /dev/null @@ -1,16 +0,0 @@ - - - - - $(ProjectDir)..\..\..\ - - - <_PropertySheetDisplayName>CustomProperties - - - - - $(MC_ROOT) - - - \ No newline at end of file diff --git a/platforms/xenon/projects/Minecraft.vcxproj b/platforms/xenon/projects/Minecraft.vcxproj deleted file mode 100644 index ecb489ca5..000000000 --- a/platforms/xenon/projects/Minecraft.vcxproj +++ /dev/null @@ -1,1054 +0,0 @@ - - - - - CodeAnalysis - Xbox 360 - - - Debug - Xbox 360 - - - Profile - Xbox 360 - - - Profile_FastCap - Xbox 360 - - - Release - Xbox 360 - - - Release_LTCG - Xbox 360 - - - - {5871555D-341B-400D-B446-DF4868AAF7F6} - Xbox360Proj - - - - Application - MultiByte - - - Application - MultiByte - - - Application - MultiByte - - - Application - MultiByte - - - Application - MultiByte - - - Application - true - MultiByte - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - true - $(SolutionDir)bin\$(Configuration)\ - obj\$(Configuration)\ - $(ProjectName) - $(MC_ROOT);$(MC_ROOT)\source;$(MC_ROOT)\platforms\windows;$(MC_ROOT)\thirdparty;$(MC_ROOT)\thirdparty\zlib;$(MC_ROOT)\thirdparty\raknet;$(ProjectDir);$(Xbox360TechPreviewInclude);$(XDKInstallDir)\include\xbox;$(VC_IncludePath);$(WindowsSDK_IncludePath) - hdd01:\dev\$(SolutionName) - - - true - $(SolutionDir)bin\$(Configuration)\ - obj\$(Configuration)\ - $(ProjectName) - $(MC_ROOT);$(MC_ROOT)\source;$(MC_ROOT)\platforms\windows;$(MC_ROOT)\thirdparty;$(MC_ROOT)\thirdparty\zlib;$(MC_ROOT)\thirdparty\raknet;$(ProjectDir);$(Xbox360TechPreviewInclude);$(XDKInstallDir)\include\xbox;$(VC_IncludePath);$(WindowsSDK_IncludePath) - hdd01:\dev\$(SolutionName) - - - false - $(SolutionDir)bin\$(Configuration)\ - obj\$(Configuration)\ - $(ProjectName) - $(MC_ROOT);$(MC_ROOT)\source;$(MC_ROOT)\platforms\windows;$(MC_ROOT)\thirdparty;$(MC_ROOT)\thirdparty\zlib;$(MC_ROOT)\thirdparty\raknet;$(ProjectDir);$(Xbox360TechPreviewInclude);$(XDKInstallDir)\include\xbox;$(VC_IncludePath);$(WindowsSDK_IncludePath) - hdd01:\dev\$(SolutionName) - - - false - $(SolutionDir)bin\$(Configuration)\ - obj\$(Configuration)\ - $(ProjectName) - $(MC_ROOT);$(MC_ROOT)\source;$(MC_ROOT)\platforms\windows;$(MC_ROOT)\thirdparty;$(MC_ROOT)\thirdparty\zlib;$(MC_ROOT)\thirdparty\raknet;$(ProjectDir);$(Xbox360TechPreviewInclude);$(XDKInstallDir)\include\xbox;$(VC_IncludePath);$(WindowsSDK_IncludePath) - hdd01:\dev\$(SolutionName) - - - false - $(SolutionDir)bin\$(Configuration)\ - obj\$(Configuration)\ - $(ProjectName) - $(MC_ROOT);$(MC_ROOT)\source;$(MC_ROOT)\platforms\windows;$(MC_ROOT)\thirdparty;$(MC_ROOT)\thirdparty\zlib;$(MC_ROOT)\thirdparty\raknet;$(ProjectDir);$(Xbox360TechPreviewInclude);$(XDKInstallDir)\include\xbox;$(VC_IncludePath);$(WindowsSDK_IncludePath) - hdd01:\dev\$(SolutionName) - - - false - $(SolutionDir)bin\$(Configuration)\ - obj\$(Configuration)\ - $(ProjectName) - $(MC_ROOT);$(MC_ROOT)\source;$(MC_ROOT)\platforms\windows;$(MC_ROOT)\thirdparty;$(MC_ROOT)\thirdparty\zlib;$(MC_ROOT)\thirdparty\raknet;$(ProjectDir);$(Xbox360TechPreviewInclude);$(XDKInstallDir)\include\xbox;$(VC_IncludePath);$(WindowsSDK_IncludePath) - hdd01:\dev\$(SolutionName) - - - - NotUsing - Level3 - ProgramDatabase - Disabled - false - true - false - $(OutDir)$(ProjectName).pch - MultiThreadedDebug - USE_OLD_CPP;_DEBUG;_XBOX - Callcap - - - - - true - $(OutDir)$(ProjectName).pdb - xapilibd.lib;d3d9d.lib;d3dx9d.lib;xgraphicsd.lib;xboxkrnl.lib;xnetd.lib;xaudiod2.lib;xactd3.lib;x3daudiod.lib;xmcored.lib;xbdm.lib;vcompd.lib - $(CONTRIB_PATH)\SDK\Lib - - - CopyToHardDrive - true - - - - - NotUsing - Level4 - ProgramDatabase - Disabled - false - true - AnalyzeOnly - false - $(OutDir)$(ProjectName).pch - MultiThreadedDebug - USE_OLD_CPP;_DEBUG;_XBOX - Callcap - C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Include - - - true - $(OutDir)$(ProjectName).pdb - xapilibd.lib;d3d9d.lib;d3dx9d.lib;xgraphicsd.lib;xboxkrnl.lib;xnetd.lib;xaudiod2.lib;xactd3.lib;x3daudiod.lib;xmcored.lib;xbdm.lib;vcompd.lib - $(CONTRIB_PATH)\SDK\Lib - - - CopyToHardDrive - true - - - - - Level3 - NotUsing - Full - true - false - true - ProgramDatabase - Size - false - $(OutDir)$(ProjectName).pch - MultiThreaded - USE_OLD_CPP;NDEBUG;_XBOX;PROFILE - Callcap - C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Include - - - true - false - xapilib.lib - true - $(OutDir)$(ProjectName).pdb - true - xapilibi.lib;d3d9i.lib;d3dx9.lib;xgraphics.lib;xboxkrnl.lib;xnet.lib;xaudio2.lib;xact3i.lib;x3daudioi.lib;xmcorei.lib;xbdm.lib;vcomp.lib - $(CONTRIB_PATH)\SDK\Lib - - - CopyToHardDrive - true - - - - - Level3 - NotUsing - Full - true - false - true - ProgramDatabase - Fastcap - Size - false - $(OutDir)$(ProjectName).pch - MultiThreaded - USE_OLD_CPP;NDEBUG;_XBOX;PROFILE;FASTCAP - C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Include - - - true - false - true - $(OutDir)$(ProjectName).pdb - true - xapilib.lib;d3d9.lib;d3dx9.lib;xgraphics.lib;xboxkrnl.lib;xnet.lib;xaudio2.lib;xact3.lib;x3daudio.lib;xmcore.lib;vcomp.lib;xbdm.lib - $(CONTRIB_PATH)\SDK\Lib - - - CopyToHardDrive - true - - - - - Level3 - NotUsing - Full - true - true - ProgramDatabase - Size - false - false - $(OutDir)$(ProjectName).pch - MultiThreaded - USE_OLD_CPP;NDEBUG;_XBOX - C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Include - - - true - true - true - $(OutDir)$(ProjectName).pdb - true - xapilib.lib;d3d9.lib;d3dx9.lib;xgraphics.lib;xboxkrnl.lib;xnet.lib;xaudio2.lib;xact3.lib;x3daudio.lib;xmcore.lib;vcomp.lib - $(CONTRIB_PATH)\SDK\Lib - - - CopyToHardDrive - true - - - - - Level3 - NotUsing - Full - true - true - ProgramDatabase - Size - false - false - $(OutDir)$(ProjectName).pch - MultiThreaded - USE_OLD_CPP;NDEBUG;_XBOX;LTCG - C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Include - - - true - true - true - $(OutDir)$(ProjectName).pdb - true - xapilib.lib;d3d9ltcg.lib;d3dx9.lib;xgraphics.lib;xboxkrnl.lib;xnet.lib;xaudio2.lib;xact3ltcg.lib;x3daudioltcg.lib;xmcoreltcg.lib;vcomp.lib - $(CONTRIB_PATH)\SDK\Lib - - - CopyToHardDrive - true - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/platforms/xenon/projects/Minecraft.vcxproj.filters b/platforms/xenon/projects/Minecraft.vcxproj.filters deleted file mode 100644 index eb467ea21..000000000 --- a/platforms/xenon/projects/Minecraft.vcxproj.filters +++ /dev/null @@ -1,2303 +0,0 @@ - - - - - {8d4cf099-09fc-46d6-8cbc-b00fcc66382f} - - - {d70c7fcc-0b30-43c2-aea1-f242ea8ddebe} - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - - - {581d51eb-ddd9-41e0-86c7-b29782e0ae61} - - - {d7db338f-b359-4720-a51e-f2eac0cc6967} - - - {f8d05e9c-3d9c-4c5c-ab68-3708499ba745} - - - {e833eea4-3f4f-4b8f-85ea-8575598110be} - - - {1ec0ee0e-91b6-4511-b13a-9d03d6d984e2} - - - {c3a8e592-56de-40c6-957b-bc22cb059e5d} - - - {37e65ecf-9d30-480f-aa72-9f6250e794b5} - - - {907f5431-3ac4-467b-ade9-f29af024a877} - - - {ee9a1cfa-569d-47a5-8d41-e1786126faa6} - - - {788fc9d4-4ec3-4632-865a-667720a51a3d} - - - {f425febb-a863-4acc-be9c-d7c203671677} - - - {b5be2620-6bd7-4efa-a6a8-7555da32e2e8} - - - {f4b794c9-b2ce-4082-a10e-172b4d4be682} - - - {7df149d5-c3b3-470b-90ba-686cac408817} - - - {cec17a65-94ee-4447-a6c7-9a3000aeeee7} - - - {768d8aaa-9fd8-48ea-90a0-eaf14cee487b} - - - {4bf04714-5e7a-44d0-9566-fa1a602e5be9} - - - {ab8a132a-dae1-4c52-8c06-740d2d8d18b7} - - - {1169ce9d-1a5c-4c4f-bb4d-ce4466869c93} - - - {b928443b-4ee8-4712-9b2a-48b24663c57c} - - - {06bb47a7-508a-48e0-a928-22d188699674} - - - {df55bfca-55e5-4842-a3cf-75e649ff1ea7} - - - {31101b35-f1ce-490e-a6b9-a5a1fab80b27} - - - {cc57a0f6-733d-44fa-8478-b1826b074d66} - - - {b413cd08-238d-4e52-90c7-eccb86bc37ed} - - - {4bd8c4f7-8db0-4fa2-b674-5cab5bad2d0d} - - - {235360f7-6b7c-4029-afef-fd6b9898df39} - - - {eee35d5d-6a69-4fbe-80ce-7a16f1b52499} - - - {9c920748-ac55-4577-8c2e-89a78248273e} - - - {bebcc3c4-9696-4e08-8967-6ac4e3d5d671} - - - {27e531b5-8c5e-4fcc-aa64-b1f364da0746} - - - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - source - - - source - - - source - - - source - - - source\client\gui - - - source\client\gui - - - source\client\gui - - - source\client\gui\screens - - - source\client\gui\screens - - - source\client\gui\screens - - - source\client\gui\screens - - - source\client\gui\screens - - - source\client\gui\screens - - - source\client\gui\screens - - - source\client\gui\screens - - - source\client\gui\screens - - - source\client\gui\screens - - - source\client\gui\screens - - - source\client\gui\screens - - - source\client\gui\screens - - - source\client\gui\screens - - - source\client\gui\screens - - - source\client\gui\components - - - source\client\gui\components - - - source\client\gui\components - - - source\client\gui\components - - - source\client\gui\components - - - source\client\gui\components - - - source\client\gui\components - - - source\client\model - - - source\client\model - - - source\client\model - - - source\client\model - - - source\client\player\input - - - source\client\player\input - - - source\client\player\input - - - source\client\player\input - - - source\client\player\input - - - source\client\player\input - - - source\client\player\input - - - source\client\player\input - - - source\client\renderer - - - source\client\renderer - - - source\client\renderer - - - source\client\renderer - - - source\client\renderer - - - source\client\renderer - - - source\client\renderer - - - source\client\renderer - - - source\client\renderer - - - source\client\renderer - - - source\client\renderer - - - source\client\renderer - - - source\client\renderer - - - source\client\renderer - - - source\client\renderer - - - source\client\renderer - - - source\client\renderer - - - source\client\renderer - - - source\client\renderer\entity - - - source\client\renderer\entity - - - source\client\renderer\entity - - - source\client\renderer\entity - - - source\client\renderer\entity - - - source\client\renderer\entity - - - source\client\renderer\entity - - - source\client\renderer\entity - - - source\client\renderer\entity - - - source\client\sound - - - source\client\sound - - - source\client\sound - - - source\client\sound - - - source\client\sound - - - source\world\gamemode - - - source\world\gamemode - - - source\world\gamemode - - - source\world\entity - - - source\world\entity - - - source\world\entity - - - source\world\entity - - - source\world\entity - - - source\world\entity - - - source\world\entity - - - source\world\entity - - - source\world\tile - - - source\world\particle - - - source\world\particle - - - source\world\item - - - source\world\item - - - source\world\item - - - source\world\level - - - source\world\level - - - source\world\level - - - source\world\level - - - source\world\level - - - source\world\level - - - source\world\level - - - source\world\level\storage - - - source\world\level\storage - - - source\world\level\storage - - - source\world\level\storage - - - source\world\level\storage - - - source\world\level\storage - - - source\world\level\storage - - - source\world\level\storage - - - source\world\level\storage - - - source\world\level\storage - - - source\world\level\storage - - - source\world\level\levelgen\feature - - - source\world\level\levelgen\feature - - - source\world\level\levelgen\feature - - - source\world\level\levelgen\chunk - - - source\world\level\levelgen\chunk - - - source\world\level\levelgen\chunk - - - source\world\level\levelgen\chunk - - - source\world\level\levelgen\chunk - - - source\world\level\levelgen\chunk - - - source\world\level\levelgen\biome - - - source\world\level\levelgen\biome - - - source\platforms - - - source\platforms\openal - - - source\client - - - source\client\renderer - - - source\world\tile - - - source\world\tile - - - source\world\tile - - - source\world\tile - - - source\world\tile - - - source\world\tile - - - source\world\tile - - - source\world\tile - - - source\world\tile - - - source\world\tile - - - source\world\tile - - - source\world\tile - - - source\world\tile - - - source\world\tile - - - source\world\tile - - - source\world\tile - - - source\world\tile - - - source\world\tile - - - source\world\tile - - - source\world\tile - - - source\world\tile - - - source\world\tile - - - source\world\tile - - - source\world\tile - - - source\world\tile - - - source\world\tile - - - source\world\tile - - - source\world\tile - - - source\world\tile - - - source\world\tile - - - source\world\tile - - - source\world\tile - - - source\world\tile - - - source\world\tile - - - source\world\tile - - - source\world\tile - - - source\world\tile - - - source\world\tile - - - source\world\tile - - - source\world\tile - - - source\world\tile - - - source\world\tile - - - source\world\tile - - - source\world\tile - - - source\world\tile - - - thirdparty\zlib - - - thirdparty\zlib - - - thirdparty\zlib - - - thirdparty\zlib - - - thirdparty\zlib - - - thirdparty\zlib - - - thirdparty\zlib - - - thirdparty\zlib - - - thirdparty\zlib - - - thirdparty\zlib - - - thirdparty\zlib - - - source\world\item - - - source\world\item - - - source\world\item - - - source\world\item - - - source\world\item - - - source\world\item - - - source\world\item - - - source\client\gui\screens - - - source\world\level\levelgen\synth - - - source\world\level\levelgen\synth - - - source\world\level\levelgen\synth - - - source\world\phys - - - source\world\phys - - - source\world\phys - - - source\common - - - source\common - - - source\common - - - source\common - - - source\common - - - source\common - - - source\common - - - source\common - - - source\common - - - source\network - - - source\network - - - source\network - - - source\network - - - source\network - - - source\network - - - source\network - - - source\platforms\windows - - - source\platforms\windows - - - thirdparty - - - source\common - - - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - source - - - source - - - source - - - source - - - source\client\gui - - - source\client\gui - - - source\client\gui - - - source\client\gui\screens - - - source\client\gui\screens - - - source\client\gui\screens - - - source\client\gui\screens - - - source\client\gui\screens - - - source\client\gui\screens - - - source\client\gui\screens - - - source\client\gui\screens - - - source\client\gui\screens - - - source\client\gui\screens - - - source\client\gui\screens - - - source\client\gui\screens - - - source\client\gui\screens - - - source\client\gui\screens - - - source\client\gui\screens - - - source\client\gui\components - - - source\client\gui\components - - - source\client\gui\components - - - source\client\gui\components - - - source\client\gui\components - - - source\client\gui\components - - - source\client\gui\components - - - source\client\model - - - source\client\model - - - source\client\model - - - source\client\model - - - source\client\player\input - - - source\client\player\input - - - source\client\player\input - - - source\client\player\input - - - source\client\player\input - - - source\client\player\input - - - source\client\player\input - - - source\client\renderer - - - source\client\renderer - - - source\client\renderer - - - source\client\renderer - - - source\client\renderer - - - source\client\renderer - - - source\client\renderer - - - source\client\renderer - - - source\client\renderer - - - source\client\renderer - - - source\client\renderer - - - source\client\renderer - - - source\client\renderer - - - source\client\renderer - - - source\client\renderer - - - source\client\renderer - - - source\client\renderer - - - source\client\renderer - - - source\client\renderer\entity - - - source\client\renderer\entity - - - source\client\renderer\entity - - - source\client\renderer\entity - - - source\client\renderer\entity - - - source\client\renderer\entity - - - source\client\renderer\entity - - - source\client\renderer\entity - - - source\client\renderer\entity - - - source\client\sound - - - source\client\sound - - - source\client\sound - - - source\client\sound - - - source\world\gamemode - - - source\world\gamemode - - - source\world\gamemode - - - source\world\entity - - - source\world\entity - - - source\world\entity - - - source\world\entity - - - source\world\entity - - - source\world\entity - - - source\world\entity - - - source\world\entity - - - source\world\tile - - - source\world\tile - - - source\world\tile - - - source\world\tile - - - source\world\tile - - - source\world\tile - - - source\world\tile - - - source\world\tile - - - source\world\tile - - - source\world\tile - - - source\world\tile - - - source\world\tile - - - source\world\tile - - - source\world\tile - - - source\world\tile - - - source\world\tile - - - source\world\tile - - - source\world\tile - - - source\world\tile - - - source\world\tile - - - source\world\tile - - - source\world\tile - - - source\world\tile - - - source\world\tile - - - source\world\tile - - - source\world\tile - - - source\world\tile - - - source\world\tile - - - source\world\tile - - - source\world\tile - - - source\world\tile - - - source\world\tile - - - source\world\tile - - - source\world\tile - - - source\world\tile - - - source\world\tile - - - source\world\tile - - - source\world\tile - - - source\world\tile - - - source\world\tile - - - source\world\tile - - - source\world\tile - - - source\world\tile - - - source\world\tile - - - source\world\tile - - - source\world\particle - - - source\world\particle - - - source\world\particle - - - source\world\particle - - - source\world\particle - - - source\world\particle - - - source\world\particle - - - source\world\particle - - - source\world\particle - - - source\world\item - - - source\world\item - - - source\world\item - - - source\world\item - - - source\world\item - - - source\world\item - - - source\world\item - - - source\world\item - - - source\world\item - - - source\world\item - - - source\world\level - - - source\world\level - - - source\world\level - - - source\world\level - - - source\world\level - - - source\world\level - - - source\world\level - - - source\world\level\storage - - - source\world\level\storage - - - source\world\level\storage - - - source\world\level\storage - - - source\world\level\storage - - - source\world\level\storage - - - source\world\level\storage - - - source\world\level\storage - - - source\world\level\storage - - - source\world\level\storage - - - source\world\level\storage - - - source\world\level\levelgen\feature - - - source\world\level\levelgen\feature - - - source\world\level\levelgen\feature - - - source\world\level\levelgen\feature - - - source\world\level\levelgen\feature - - - source\world\level\levelgen\feature - - - source\world\level\levelgen\feature - - - source\world\level\levelgen\feature - - - source\world\level\levelgen\feature - - - source\world\level\levelgen\feature - - - source\world\level\levelgen\feature - - - source\world\level\levelgen\feature - - - source\world\level\levelgen\feature - - - source\world\level\levelgen\feature - - - source\world\level\levelgen\feature - - - source\world\level\levelgen\chunk - - - source\world\level\levelgen\chunk - - - source\world\level\levelgen\chunk - - - source\world\level\levelgen\chunk - - - source\world\level\levelgen\chunk - - - source\world\level\levelgen\chunk - - - source\world\level\levelgen\biome - - - source\world\level\levelgen\biome - - - thirdparty - - - thirdparty - - - source\platforms\openal - - - source\client\renderer - - - source\client\renderer - - - source\client\renderer - - - source\client\renderer - - - source\world\tile - - - thirdparty\zlib - - - thirdparty\zlib - - - thirdparty\zlib - - - thirdparty\zlib - - - thirdparty\zlib - - - thirdparty\zlib - - - thirdparty\zlib - - - thirdparty\zlib - - - thirdparty\zlib - - - thirdparty\zlib - - - thirdparty\zlib - - - thirdparty\zlib - - - thirdparty\zlib - - - thirdparty\zlib - - - thirdparty\zlib - - - source\client\gui\screens - - - source\world\level\levelgen\synth - - - source\world\level\levelgen\synth - - - source\world\level\levelgen\synth - - - source\world\phys - - - source\world\phys - - - source\world\phys - - - source\common - - - source\common - - - source\common - - - source\common - - - source\common - - - source\common - - - source\common - - - source\common - - - source\network - - - source\network - - - source\network - - - source\network - - - source\network - - - source\network\packets - - - source\network\packets - - - source\network\packets - - - source\network\packets - - - source\network\packets - - - source\network\packets - - - source\network\packets - - - source\network\packets - - - source\network\packets - - - source\network\packets - - - source\network\packets - - - source\network\packets - - - source\network\packets - - - source\platforms\windows - - - source\platforms\windows - - - source\platforms\windows - - - source\common - - - - - thirdparty\raknet - - - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - thirdparty\raknet - - - - diff --git a/platforms/xenon/projects/ReadMe.txt b/platforms/xenon/projects/ReadMe.txt deleted file mode 100644 index 2e4943a86..000000000 --- a/platforms/xenon/projects/ReadMe.txt +++ /dev/null @@ -1,27 +0,0 @@ -======================================================================== - Xbox 360 APPLICATION : Minecraft Project Overview -======================================================================== - -AppWizard has created this Minecraft application for you. - -This file contains a summary of what you will find in each of the files that -make up your Minecraft application. - -Minecraft.vcxproj - This is the main project file for VC++ projects generated using an Application Wizard. - It contains information about the version of Visual C++ that generated the file, and - information about the platforms, configurations, and project features selected with the - Application Wizard. - -Minecraft.cpp - This is the main application source file. - - - -///////////////////////////////////////////////////////////////////////////// -Other notes: - -AppWizard uses "TODO:" comments to indicate parts of the source code you -should add to or customize. - -///////////////////////////////////////////////////////////////////////////// diff --git a/platforms/xenon/projects/stdafx.cpp b/platforms/xenon/projects/stdafx.cpp deleted file mode 100644 index 8a9c91acf..000000000 --- a/platforms/xenon/projects/stdafx.cpp +++ /dev/null @@ -1,8 +0,0 @@ -// stdafx.cpp : source file that includes just the standard includes -// Minecraft.pch will be the pre-compiled header -// stdafx.obj will contain the pre-compiled type information - -#include "stdafx.h" - -// TODO: reference any additional headers you need in STDAFX.H -// and not in this file diff --git a/platforms/xenon/projects/stdafx.h b/platforms/xenon/projects/stdafx.h deleted file mode 100644 index 306c63617..000000000 --- a/platforms/xenon/projects/stdafx.h +++ /dev/null @@ -1,11 +0,0 @@ -// stdafx.h : include file for standard system include files, -// or project specific include files that are used frequently, but -// are changed infrequently -// - -#pragma once - -#include -#include - -// TODO: reference additional headers your program requires here diff --git a/source/client/app/AppPlatform.cpp b/source/client/app/AppPlatform.cpp index 5fb0267fd..b061ea22b 100644 --- a/source/client/app/AppPlatform.cpp +++ b/source/client/app/AppPlatform.cpp @@ -7,6 +7,7 @@ ********************************************************************/ #include +#include #include "thirdparty/stb_image/include/stb_image.h" diff --git a/source/client/app/AppPlatformListener.cpp b/source/client/app/AppPlatformListener.cpp index 5132cbd85..ff80c3dee 100644 --- a/source/client/app/AppPlatformListener.cpp +++ b/source/client/app/AppPlatformListener.cpp @@ -7,6 +7,10 @@ AppPlatformListener::AppPlatformListener(bool doInit) if (doInit) initListener(); } +AppPlatformListener::~AppPlatformListener() +{ +} + void AppPlatformListener::initListener(float priority) { m_pPlatform = AppPlatform::singleton(); diff --git a/source/client/app/AppPlatformListener.hpp b/source/client/app/AppPlatformListener.hpp index 41a8bcf00..1c2b91a05 100644 --- a/source/client/app/AppPlatformListener.hpp +++ b/source/client/app/AppPlatformListener.hpp @@ -6,6 +6,7 @@ class AppPlatformListener { public: AppPlatformListener(bool doInit = true); + virtual ~AppPlatformListener(); virtual void onLowMemory() {} virtual void onAppResumed() {} diff --git a/source/client/app/Minecraft.cpp b/source/client/app/Minecraft.cpp index c071245a4..cca979877 100644 --- a/source/client/app/Minecraft.cpp +++ b/source/client/app/Minecraft.cpp @@ -506,7 +506,7 @@ void Minecraft::tickInput() if (!m_pLocalPlayer) return; - bool bIsInGUI = m_pGui->isInside(Mouse::getX(), Mouse::getY()); + //bool bIsInGUI = m_pGui->isInside(Mouse::getX(), Mouse::getY()); while (Mouse::next()) { diff --git a/source/client/gui/components/OptionList.cpp b/source/client/gui/components/OptionList.cpp index 3985ae7f7..41371a91d 100644 --- a/source/client/gui/components/OptionList.cpp +++ b/source/client/gui/components/OptionList.cpp @@ -221,7 +221,7 @@ void OptionList::drawOnOffSwitch(int x, int y, bool state, bool disabled) void OptionList::renderItem(int index, int x, int y, int height, Tesselator& t) { - Font* f = m_pMinecraft->m_pFont; + //Font* f = m_pMinecraft->m_pFont; OptionItem* pItem = m_items[index]; pItem->render(this, x, y); @@ -334,12 +334,11 @@ void OptionList::initMultiplayerMenu() { Options* pOptions = m_pMinecraft->getOptions(); int currentIndex = -1; - int idxLM = -1; - OPTION(Boolean, m_bServerVisibleDefault, "Local Server Multiplayer"); idxLM = currentIndex; + OPTION(Boolean, m_bServerVisibleDefault, "Local Server Multiplayer"); #ifdef __EMSCRIPTEN - m_items[idxLM]->setDisabled(true); + m_items[currentIndex]->setDisabled(true); #endif } diff --git a/source/client/gui/screens/OptionsScreen.cpp b/source/client/gui/screens/OptionsScreen.cpp index a7cb7c09f..a5f7703bc 100644 --- a/source/client/gui/screens/OptionsScreen.cpp +++ b/source/client/gui/screens/OptionsScreen.cpp @@ -17,12 +17,12 @@ #define BACK_BUTTON_ID 100 OptionsScreen::OptionsScreen() : + m_pList(nullptr), m_videoButton(MIN_CATEGORY_BUTTON_ID, "Video"), m_controlsButton(MIN_CATEGORY_BUTTON_ID + 1, "Controls"), m_multiplayerButton(MIN_CATEGORY_BUTTON_ID + 2, "Multiplayer"), m_miscButton(MAX_CATEGORY_BUTTON_ID, "Misc"), m_backButton(BACK_BUTTON_ID, "Done"), - m_pList(nullptr), m_currentCategory(OC_VIDEO) { } diff --git a/source/client/model/geom/ModelPart.cpp b/source/client/model/geom/ModelPart.cpp index e97bad4cb..c24c320e7 100644 --- a/source/client/model/geom/ModelPart.cpp +++ b/source/client/model/geom/ModelPart.cpp @@ -6,6 +6,7 @@ SPDX-License-Identifier: BSD-1-Clause ********************************************************************/ #include "ModelPart.hpp" +#include "common/Utils.hpp" #include "../models/Model.hpp" #define MUL_DEG_TO_RAD (180.0f / float(M_PI)) // formerly known as Cube::c diff --git a/source/client/model/models/SpiderModel.cpp b/source/client/model/models/SpiderModel.cpp index 204a0eed8..a3293ecb4 100644 --- a/source/client/model/models/SpiderModel.cpp +++ b/source/client/model/models/SpiderModel.cpp @@ -1,4 +1,5 @@ #include "SpiderModel.hpp" +#include "common/Utils.hpp" SpiderModel::SpiderModel() : Model(64, 64), diff --git a/source/client/model/models/ZombieModel.cpp b/source/client/model/models/ZombieModel.cpp index ae604df3e..d41311263 100644 --- a/source/client/model/models/ZombieModel.cpp +++ b/source/client/model/models/ZombieModel.cpp @@ -1,5 +1,6 @@ #include "ZombieModel.hpp" #include "common/Mth.hpp" +#include "common/Utils.hpp" ZombieModel::ZombieModel() : HumanoidModel(0.0f, 0.0f) diff --git a/source/client/multiplayer/MultiplayerLocalPlayer.cpp b/source/client/multiplayer/MultiplayerLocalPlayer.cpp index 5b1922c9b..2b2fb73fc 100644 --- a/source/client/multiplayer/MultiplayerLocalPlayer.cpp +++ b/source/client/multiplayer/MultiplayerLocalPlayer.cpp @@ -67,10 +67,11 @@ void MultiplayerLocalPlayer::heal(int health) { } -void MultiplayerLocalPlayer::drop() +/*void MultiplayerLocalPlayer::drop() { - //m_pLevel->m_pRakNetInstance->send(new PlayerActionPacket(PlayerActionPacket::DROP_ITEM)) -} + // From Java + m_pLevel->m_pRakNetInstance->send(new PlayerActionPacket(PlayerActionPacket::DROP_ITEM)) +}*/ void MultiplayerLocalPlayer::hurtTo(int newHealth) { diff --git a/source/client/multiplayer/MultiplayerLocalPlayer.hpp b/source/client/multiplayer/MultiplayerLocalPlayer.hpp index 9d71bc83d..f564abd8f 100644 --- a/source/client/multiplayer/MultiplayerLocalPlayer.hpp +++ b/source/client/multiplayer/MultiplayerLocalPlayer.hpp @@ -13,7 +13,7 @@ class MultiplayerLocalPlayer : public LocalPlayer public: bool hurt(Entity*, int) override; void heal(int health) override; - void drop() override; + //void drop() override; void hurtTo(int newHealth) override; private: diff --git a/source/client/network/ClientSideNetworkHandler.cpp b/source/client/network/ClientSideNetworkHandler.cpp index f975ffdd8..04f4c7234 100644 --- a/source/client/network/ClientSideNetworkHandler.cpp +++ b/source/client/network/ClientSideNetworkHandler.cpp @@ -58,8 +58,10 @@ void ClientSideNetworkHandler::levelGenerated(Level* level) void ClientSideNetworkHandler::onConnect(const RakNet::RakNetGUID& rakGuid) // server guid { - RakNet::RakNetGUID localGuid = ((RakNet::RakPeer*)m_pServerPeer)->GetMyGUID(); // iOS 0.2.1 crashes right here after loading chunks +#ifdef VERBOSE_CLIENT + RakNet::RakNetGUID localGuid = ((RakNet::RakPeer*)m_pServerPeer)->GetMyGUID(); printf_ignorable("onConnect, server guid: %s, local guid: %s", rakGuid.ToString(), localGuid.ToString()); +#endif m_serverGUID = rakGuid; diff --git a/source/client/player/input/Controller.cpp b/source/client/player/input/Controller.cpp index 86f66f331..adb2b31fb 100644 --- a/source/client/player/input/Controller.cpp +++ b/source/client/player/input/Controller.cpp @@ -23,10 +23,6 @@ float Controller::stickValuesY[] = { 0.0f, 0.0f }; float Controller::triggerValues[] = { 0.0f, 0.0f }; bool Controller::inReset = true; -#ifndef USE_NATIVE_ANDROID -const float Controller_unk_1[3] = { 0.0f, 0.64f, -0.64f }; -#endif - bool Controller::isValidStick(int stickNo) { // We have 2 'sticks' on the Xperia Play diff --git a/source/client/player/input/TouchscreenInput_TestFps.cpp b/source/client/player/input/TouchscreenInput_TestFps.cpp index 55fc23c4e..2dde7d3eb 100644 --- a/source/client/player/input/TouchscreenInput_TestFps.cpp +++ b/source/client/player/input/TouchscreenInput_TestFps.cpp @@ -14,17 +14,21 @@ #include "renderer/ShaderConstants.hpp" #include "world/entity/Player.hpp" -TouchscreenInput_TestFps::TouchscreenInput_TestFps(Minecraft* pMinecraft, Options* pOptions) : - m_rectArea(0.0f, 0.0f, 1.0f, 1.0f), - m_pOptions(pOptions), - field_40(false), - m_bJumpBeingHeld(false), - m_pMinecraft(pMinecraft), - m_pAreaLeft(nullptr), - m_pAreaRight(nullptr), - m_pAreaForward(nullptr), - m_pAreaBackward(nullptr), - m_pAreaJump(nullptr) +TouchscreenInput_TestFps::TouchscreenInput_TestFps(Minecraft* pMinecraft, Options* pOptions) + : m_rectArea(0.0f, 0.0f, 1.0f, 1.0f) + , m_pOptions(pOptions) + , field_40(false) + , m_bJumpBeingHeld(false) + , m_pMinecraft(pMinecraft) + , m_pAreaLeft(nullptr) + , m_pAreaRight(nullptr) + , m_pAreaForward(nullptr) + , m_pAreaBackward(nullptr) + , m_pAreaJump(nullptr) +#ifdef ENH_NEW_TOUCH_CONTROLS + , m_pAreaForwardLeft(nullptr) + , m_pAreaForwardRight(nullptr) +#endif { for (int i = 0; i < 10; i++) field_30[i] = 0; @@ -196,7 +200,7 @@ void TouchscreenInput_TestFps::tick(Player* pPlayer) switch (pointerId) { case 100 + INPUT_FORWARD: - if (m_bJumpBeingHeld && m_pMinecraft->getOptions()->m_bFlyCheat) { + if (m_bJumpBeingHeld && m_pOptions->m_bFlyCheat) { m_bJumpBeingHeld = true; m_bWasJumping = false; bJumpPressed = true; @@ -212,7 +216,7 @@ void TouchscreenInput_TestFps::tick(Player* pPlayer) break; case 100 + INPUT_BACKWARD: - if (m_bJumpBeingHeld && m_pMinecraft->getOptions()->m_bFlyCheat) { + if (m_bJumpBeingHeld && m_pOptions->m_bFlyCheat) { m_bJumpBeingHeld = true; m_bWasJumping = false; bJumpPressed = true; @@ -257,7 +261,7 @@ void TouchscreenInput_TestFps::tick(Player* pPlayer) m_bJumpBeingHeld = true; if (m_bWasJumping && m_pMinecraft->m_pGameMode->isCreativeType()) { - m_pMinecraft->getOptions()->m_bFlyCheat = !m_pMinecraft->getOptions()->m_bFlyCheat; + m_pOptions->m_bFlyCheat = !m_pOptions->m_bFlyCheat; m_bWasJumping = false; m_bJumpBeingHeld = false; } @@ -333,10 +337,10 @@ void TouchscreenInput_TestFps::render(float f) RenderTouchButton(&t, m_pAreaRight, 78, 106); t.color(isButtonDown(100 + INPUT_JUMP) ? 0xC0C0C0 : 0xFFFFFF, 0x80); - (m_pMinecraft->getOptions()->m_bFlyCheat) ? + (m_pOptions->m_bFlyCheat) ? RenderTouchButton(&t, m_pAreaJump, 104, 132) : RenderTouchButton(&t, m_pAreaJump, 104, 106); - if (m_pMinecraft->getOptions()->m_bFlyCheat && m_bJumpBeingHeld ) + if (m_pOptions->m_bFlyCheat && m_bJumpBeingHeld ) { t.color(isButtonDown(100 + INPUT_FORWARD) ? 0xC0C0C0 : 0xFFFFFF, 0x80); RenderTouchButton(&t, m_pAreaForward, 52, 132); diff --git a/source/client/player/input/TouchscreenInput_TestFps.hpp b/source/client/player/input/TouchscreenInput_TestFps.hpp index bfbc15a6a..4eeadd5ae 100644 --- a/source/client/player/input/TouchscreenInput_TestFps.hpp +++ b/source/client/player/input/TouchscreenInput_TestFps.hpp @@ -45,8 +45,10 @@ class TouchscreenInput_TestFps : public IMoveInput, public GuiComponent PolygonArea* m_pAreaForward; PolygonArea* m_pAreaBackward; PolygonArea* m_pAreaJump; +#ifdef ENH_NEW_TOUCH_CONTROLS PolygonArea* m_pAreaForwardLeft; PolygonArea* m_pAreaForwardRight; +#endif bool field_6C[8]; }; diff --git a/source/client/renderer/GameRenderer.cpp b/source/client/renderer/GameRenderer.cpp index 98c4972ba..a19b1de26 100644 --- a/source/client/renderer/GameRenderer.cpp +++ b/source/client/renderer/GameRenderer.cpp @@ -132,7 +132,6 @@ void GameRenderer::_renderItemInHand(float f, int i) void GameRenderer::_renderDebugOverlay(float a) { - ScreenRenderer& screenRenderer = ScreenRenderer::singleton(); Font& font = *m_pMinecraft->m_pFont; std::stringstream debugText; diff --git a/source/client/renderer/LevelRenderer.cpp b/source/client/renderer/LevelRenderer.cpp index 41ee16b00..eb33c4d11 100644 --- a/source/client/renderer/LevelRenderer.cpp +++ b/source/client/renderer/LevelRenderer.cpp @@ -476,15 +476,15 @@ void LevelRenderer::_updateViewArea(const Entity& camera) void LevelRenderer::_startFrame(FrustumCuller& culler, float renderDistance, float f) { - mce::GlobalConstantBuffers& globalBuffers = mce::GlobalConstantBuffers::getInstance(); - mce::PerFrameConstants& frame = globalBuffers.m_perFrameConstants; - const Entity& camera = *m_pMinecraft->m_pCameraEntity; m_viewPos = camera.getPos(f); _setupFog(camera, 1); #ifdef FEATURE_GFX_SHADERS + mce::GlobalConstantBuffers& globalBuffers = mce::GlobalConstantBuffers::getInstance(); + mce::PerFrameConstants& frame = globalBuffers.m_perFrameConstants; + Vec3 viewVector = camera.getViewVector(f); frame.VIEW_DIRECTION->setData(&viewVector); @@ -898,7 +898,7 @@ void LevelRenderer::render(const Entity& camera, Tile::RenderLayer layer, float if (layer == Tile::RENDER_LAYER_OPAQUE) m_totalChunks = m_offscreenChunks = m_occludedChunks = m_renderedChunks = m_emptyChunks = 0; - Vec3 cameraPos = camera.m_posPrev + (camera.m_pos - camera.m_posPrev) * alpha; + //Vec3 cameraPos = camera.m_posPrev + (camera.m_pos - camera.m_posPrev) * alpha; float dX = camera.m_pos.x - m_posPrev.x, dY = camera.m_pos.y - m_posPrev.y, dZ = camera.m_pos.z - m_posPrev.z; @@ -1285,13 +1285,13 @@ void LevelRenderer::renderCracks(const Entity& camera, const HitResult& hr, int t.setOffset(0, 0, 0); } } - else if (inventoryItem != nullptr) + /*else if (inventoryItem != nullptr) { float br = Mth::sin((float)getTimeMs() / 100.0f) * 0.2f + 0.8f; currentShaderColor = Color(br, br, br, Mth::sin((float)getTimeMs() / 200.0f) * 0.2f + 0.5f); m_pTextures->loadAndBindTexture(C_TERRAIN_NAME); TilePos tp = hr.m_tilePos.relative(hr.m_hitSide); - } + }*/ } void LevelRenderer::renderHitSelect(const Entity& camera, const HitResult& hr, int mode, const ItemInstance* inventoryItem, float a) @@ -1656,8 +1656,6 @@ void LevelRenderer::renderSky(const Entity& camera, float alpha) // called again a few lines down, no min in Java, why is it here? //currentShaderColor = Color(sc.x, sc.y, Mth::Min(1.0f, sc.z), 1.0f); - Tesselator& t = Tesselator::instance; - { Fog::enable(); // @TODO: can we avoid rebuilding the mesh every time the fog updates? diff --git a/source/client/renderer/RenderList.cpp b/source/client/renderer/RenderList.cpp index cfe9da868..b8c7b9d6a 100644 --- a/source/client/renderer/RenderList.cpp +++ b/source/client/renderer/RenderList.cpp @@ -7,6 +7,7 @@ ********************************************************************/ #include "RenderList.hpp" +#include "common/Utils.hpp" #include "renderer/GlobalConstantBuffers.hpp" #include "renderer/MatrixStack.hpp" diff --git a/source/client/renderer/Textures.cpp b/source/client/renderer/Textures.cpp index b087da461..6eecf47e9 100644 --- a/source/client/renderer/Textures.cpp +++ b/source/client/renderer/Textures.cpp @@ -8,6 +8,7 @@ #include "Textures.hpp" #include "common/Util.hpp" +#include "common/Utils.hpp" #include "renderer/RenderContextImmediate.hpp" #define MIP_TAG "_mip" diff --git a/source/client/renderer/TileRenderer.cpp b/source/client/renderer/TileRenderer.cpp index 33119ac5a..b5e34ca7e 100644 --- a/source/client/renderer/TileRenderer.cpp +++ b/source/client/renderer/TileRenderer.cpp @@ -939,7 +939,7 @@ bool TileRenderer::tesselateWaterInWorld(Tile* tile1, const TilePos& pos) label_8: bFlag2 = bFlag1; - bool bRenderedSides = false; + //bool bRenderedSides = false; for (int dir = 0; dir < 4; dir++) { @@ -1011,7 +1011,7 @@ bool TileRenderer::tesselateWaterInWorld(Tile* tile1, const TilePos& pos) texV_2 = C_RATIO * (float(texY) + (1.0f - height2) * 16.0f); texV_3 = C_RATIO * (float(texY + 16.0f) - 0.01f); bFlag2 = true; - bRenderedSides = true; + //bRenderedSides = true; float brightMul = dir >= Facing::WEST ? 0.6f : 0.8f; float bright = tile->getBrightness(m_pTileSource, TilePos(checkX, pos.y, checkZ)); diff --git a/source/client/renderer/entity/ItemRenderer.cpp b/source/client/renderer/entity/ItemRenderer.cpp index a35a71361..6684eed7a 100644 --- a/source/client/renderer/entity/ItemRenderer.cpp +++ b/source/client/renderer/entity/ItemRenderer.cpp @@ -214,7 +214,7 @@ void ItemRenderer::renderGuiItem(Font* font, Textures* textures, ItemInstance* i if (!b) return; - Item* pItem = instance->getItem(); + //Item* pItem = instance->getItem(); Tile* pTile = instance->getTile(); // @BUG: This is one of the reasons you can't actually hold items in early Minecraft. diff --git a/source/common/Mth.hpp b/source/common/Mth.hpp index b82d841ab..d0e3bc15c 100644 --- a/source/common/Mth.hpp +++ b/source/common/Mth.hpp @@ -10,6 +10,7 @@ #include +#include "compat/LegacyCPP.hpp" #include "Random.hpp" class Mth diff --git a/source/common/Random.cpp b/source/common/Random.cpp index 1794bfde6..dae50c43c 100644 --- a/source/common/Random.cpp +++ b/source/common/Random.cpp @@ -6,6 +6,9 @@ SPDX-License-Identifier: BSD-1-Clause ********************************************************************/ +#include +#include + #include "Random.hpp" /* Period parameters */ diff --git a/source/common/Random.hpp b/source/common/Random.hpp index b1d759ce3..23489306f 100644 --- a/source/common/Random.hpp +++ b/source/common/Random.hpp @@ -9,7 +9,6 @@ #pragma once #include -#include "common/Utils.hpp" // This appears to be VERY similar to https://github.com/SethRobinson/proton/blob/master/shared/util/CRandom.h#L10 // It turns out, RTsoft, Mojang, and the author of Game Coding Complete used the same reference implementation of diff --git a/source/common/Utils.hpp b/source/common/Utils.hpp index 58b5899ef..578d6e0df 100644 --- a/source/common/Utils.hpp +++ b/source/common/Utils.hpp @@ -39,6 +39,9 @@ #if MC_PLATFORM_WINPC #define WIN32_LEAN_AND_MEAN +#ifndef NOMINMAX +#define NOMINMAX /* don't define min() and max(). */ +#endif #include #include #include @@ -76,6 +79,10 @@ DIR* opendir(const char* name); dirent* readdir(DIR* dir); void closedir(DIR* dir); +#ifdef _WIN32 +#define _CRT_INTERNAL_NONSTDC_NAMES 1 // gives us the stat struct we need +#endif + #include #ifndef S_ISDIR diff --git a/source/network/packets/LevelDataPacket.cpp b/source/network/packets/LevelDataPacket.cpp index 859ac0e4a..23c944e08 100644 --- a/source/network/packets/LevelDataPacket.cpp +++ b/source/network/packets/LevelDataPacket.cpp @@ -24,7 +24,7 @@ void LevelDataPacket::write(RakNet::BitStream& bs) // send a crapton of them in a raw packet(why? Laziness) int chunksX = C_MAX_CHUNKS_X; int chunksZ = C_MAX_CHUNKS_Z; - int minus9999 = -9999; + //int minus9999 = -9999; RakNet::BitStream bs2; bs.Write((unsigned char)PACKET_LEVEL_DATA); @@ -64,7 +64,7 @@ void LevelDataPacket::write(RakNet::BitStream& bs) if (pCompressedData) { - float ratio = 100.0f * float(compSize) / float(uncompSize); + //float ratio = 100.0f * float(compSize) / float(uncompSize); //LOG_I("Compression ratio: %.2f (%d comp, %d uncomp)", ratio, int(compSize), int(uncompSize)); int cs2 = int(compSize), us2 = int(uncompSize); diff --git a/source/renderer/Mesh.cpp b/source/renderer/Mesh.cpp index e6b8962e6..b68955a4a 100644 --- a/source/renderer/Mesh.cpp +++ b/source/renderer/Mesh.cpp @@ -17,8 +17,8 @@ Mesh::Mesh() } Mesh::Mesh(const VertexFormat& vertexFormat, unsigned int vertexCount, unsigned int indexCount, uint8_t indexSize, PrimitiveMode primitiveMode, uint8_t *data, bool temporary) - : m_vertexCount(vertexCount) - , m_indexCount(indexCount) + : m_indexCount(indexCount) + , m_vertexCount(vertexCount) , m_primitiveMode(primitiveMode) , m_vertexFormat(vertexFormat) , m_indexSize(indexSize) diff --git a/source/renderer/RenderMaterial.cpp b/source/renderer/RenderMaterial.cpp index bef470e91..b2000203d 100644 --- a/source/renderer/RenderMaterial.cpp +++ b/source/renderer/RenderMaterial.cpp @@ -1,3 +1,5 @@ +#include + #include "RenderMaterial.hpp" #include "common/utility/JsonParser.hpp" diff --git a/source/renderer/hal/d3d11/ShaderD3D11.cpp b/source/renderer/hal/d3d11/ShaderD3D11.cpp index 540be13eb..d457052c4 100644 --- a/source/renderer/hal/d3d11/ShaderD3D11.cpp +++ b/source/renderer/hal/d3d11/ShaderD3D11.cpp @@ -1,5 +1,6 @@ #include #include +#include #include "ShaderD3D11.hpp" diff --git a/source/renderer/hal/ogl/ShaderResourceOGL.cpp b/source/renderer/hal/ogl/ShaderResourceOGL.cpp index fc7cd0667..88c3372c9 100644 --- a/source/renderer/hal/ogl/ShaderResourceOGL.cpp +++ b/source/renderer/hal/ogl/ShaderResourceOGL.cpp @@ -5,8 +5,8 @@ using namespace mce; ShaderResourceOGL::ShaderResourceOGL(const std::string& name, int location, int elements, ShaderPrimitiveTypes shaderPrimitiveType) : m_location(location) , m_elements(elements) - , m_name(name) , m_shaderPrimitiveType(shaderPrimitiveType) + , m_name(name) { m_bValid = false; } \ No newline at end of file diff --git a/source/server/ServerSideNetworkHandler.cpp b/source/server/ServerSideNetworkHandler.cpp index c732d30c5..5f28ae741 100644 --- a/source/server/ServerSideNetworkHandler.cpp +++ b/source/server/ServerSideNetworkHandler.cpp @@ -972,8 +972,6 @@ void ServerSideNetworkHandler::commandGamemode(OnlinePlayer* player, const std:: if (!_checkPermissions(player)) return; - Vec3 pos = player->m_pPlayer->getPos(1.0f); - GameType gameMode; std::stringstream ss; ss.str(parms[0]); diff --git a/source/world/entity/Entity.cpp b/source/world/entity/Entity.cpp index c7d544b31..e42ec35d7 100644 --- a/source/world/entity/Entity.cpp +++ b/source/world/entity/Entity.cpp @@ -193,7 +193,7 @@ void Entity::move(const Vec3& pos) if (!m_bSlide && cPosY != newPos.y) newPos = Vec3::ZERO; - bool lastsOnGround = m_bOnGround || cPosY != newPos.y && cPosY < 0.0; + bool lastsOnGround = m_bOnGround || (cPosY != newPos.y && cPosY < 0.0); for (int i = 0; i < int(cubes->size()); ++i) newPos.x = cubes->at(i).clipXCollide(m_hitbox, newPos.x); diff --git a/source/world/entity/Player.cpp b/source/world/entity/Player.cpp index 6fddc4aa1..e12e7e45e 100644 --- a/source/world/entity/Player.cpp +++ b/source/world/entity/Player.cpp @@ -371,16 +371,16 @@ void Player::setRespawnPos(const TilePos& pos) m_respawnPos = pos; } -void Player::drop() +/*void Player::drop() { // From b1.2_02, doesn't exist in PE // Isn't called anywhere, but is overriden in MultiplayerLocalPlayer with a PlayerActionPacket - /*ItemInstance* item = getSelectedItem(); + ItemInstance* item = getSelectedItem(); if (!item) return; - drop(m_pInventory->removeItem(*item, 1));*/ -} + drop(m_pInventory->removeItem(*item, 1)); +}*/ void Player::drop(const ItemInstance& item, bool randomly) { diff --git a/source/world/entity/Player.hpp b/source/world/entity/Player.hpp index adb457af8..a261e0c41 100644 --- a/source/world/entity/Player.hpp +++ b/source/world/entity/Player.hpp @@ -53,7 +53,7 @@ class Player : public Mob void readAdditionalSaveData(const CompoundTag& tag) override; virtual void animateRespawn(); - virtual void drop(); + //virtual void drop(); // see definition virtual void drop(const ItemInstance& item, bool randomly = false); virtual void startCrafting(const TilePos& pos); virtual void startStonecutting(const TilePos& pos); diff --git a/source/world/entity/SynchedEntityData.cpp b/source/world/entity/SynchedEntityData.cpp index ac75c3dd6..492af2ecf 100644 --- a/source/world/entity/SynchedEntityData.cpp +++ b/source/world/entity/SynchedEntityData.cpp @@ -153,7 +153,7 @@ void SynchedEntityData::assignValues(const ItemsArray& items) void SynchedEntityData::_WriteDataItem(IDataOutput& dos, const DataItem& dataItem) { - int8_t var2 = dataItem.getType() << C_ENTITYDATA_TYPE_SHIFT | dataItem.getId() & C_ENTITYDATA_MAX_ID_VALUE; + int8_t var2 = dataItem.getType() << C_ENTITYDATA_TYPE_SHIFT | (dataItem.getId() & C_ENTITYDATA_MAX_ID_VALUE); dos.writeInt8(var2); switch (dataItem.getType()) { diff --git a/source/world/gamemode/GameMode.cpp b/source/world/gamemode/GameMode.cpp index 8f43749b4..4e896140d 100644 --- a/source/world/gamemode/GameMode.cpp +++ b/source/world/gamemode/GameMode.cpp @@ -11,8 +11,8 @@ #include "network/packets/RemoveBlockPacket.hpp" GameMode::GameMode(Minecraft* pMinecraft, Level& level) : - m_pMinecraft(pMinecraft), _level(level), + m_pMinecraft(pMinecraft), field_8(0) { } diff --git a/source/world/item/ItemInstance.cpp b/source/world/item/ItemInstance.cpp index 334cc54ca..a75bc30dc 100644 --- a/source/world/item/ItemInstance.cpp +++ b/source/world/item/ItemInstance.cpp @@ -36,7 +36,6 @@ ItemInstance::ItemInstance(const ItemInstance& other) { _init(other.getId(), other.m_count, other.getAuxValue()); - bool v6 = false; if (other.hasUserData()) { setUserData(other.getUserData()->uniqueClone()); diff --git a/source/world/level/Region.hpp b/source/world/level/Region.hpp index 592a42536..ca0101edb 100644 --- a/source/world/level/Region.hpp +++ b/source/world/level/Region.hpp @@ -45,11 +45,5 @@ class Region : public LevelSource LevelChunk** field_C; const Level* m_pLevel; ChunkPos field_14; - int field_1C; - int field_20; - int field_24; - int field_28; - int field_2C; - int field_30; }; diff --git a/source/world/level/levelgen/chunk/LevelChunk.cpp b/source/world/level/levelgen/chunk/LevelChunk.cpp index aacc726c7..41eca9548 100644 --- a/source/world/level/levelgen/chunk/LevelChunk.cpp +++ b/source/world/level/levelgen/chunk/LevelChunk.cpp @@ -270,8 +270,8 @@ void LevelChunk::setBrightness(const LightLayer& ll, const ChunkTilePos& pos, in int LevelChunk::getRawBrightness(const ChunkTilePos& pos, int skySubtract) { CheckPosition(pos); - int bitIdx = MakeBlockDataIndex(pos); - int index = bitIdx >> 1, offs = bitIdx & 1; + //int bitIdx = MakeBlockDataIndex(pos); + //int index = bitIdx >> 1, offs = bitIdx & 1; uint8_t bSky = m_lightSky.get(pos); if (bSky > 0) diff --git a/source/world/level/levelgen/chunk/LevelChunk.hpp b/source/world/level/levelgen/chunk/LevelChunk.hpp index 00c2f891d..f25faf097 100644 --- a/source/world/level/levelgen/chunk/LevelChunk.hpp +++ b/source/world/level/levelgen/chunk/LevelChunk.hpp @@ -12,6 +12,7 @@ #include #include #include "common/Random.hpp" +#include "common/Utils.hpp" #include "client/renderer/LightLayer.hpp" #include "world/level/levelgen/chunk/ChunkPos.hpp" #include "world/level/levelgen/chunk/ChunkTilePos.hpp" diff --git a/source/world/level/levelgen/feature/BirchFeature.cpp b/source/world/level/levelgen/feature/BirchFeature.cpp index ee069dcf6..7fad27a6a 100644 --- a/source/world/level/levelgen/feature/BirchFeature.cpp +++ b/source/world/level/levelgen/feature/BirchFeature.cpp @@ -75,13 +75,13 @@ bool BirchFeature::place(Level* level, Random* random, const TilePos& pos) for (int i = lowerY; i <= upperY; i++, diff = i - upperY) { int c1 = 1 - diff / 2; - int c2 = diff / 2 - 1; + //int c2 = diff / 2 - 1; for (tp.x = pos.x - c1; tp.x <= pos.x + c1; tp.x++) { - int c3 = c2; + //int c3 = c2; int c4 = diff / 2 - 1; - if (c2 < 0) - c3 = -c2; + /*if (c2 < 0) + c3 = -c2;*/ //int c5 = c3; diff --git a/source/world/level/levelgen/feature/Feature.hpp b/source/world/level/levelgen/feature/Feature.hpp index a4346d58e..b5ee62cc3 100644 --- a/source/world/level/levelgen/feature/Feature.hpp +++ b/source/world/level/levelgen/feature/Feature.hpp @@ -9,6 +9,7 @@ #pragma once #include "common/Random.hpp" +#include "common/Utils.hpp" #include "world/level/TilePos.hpp" class Level; diff --git a/source/world/level/levelgen/feature/TreeFeature.cpp b/source/world/level/levelgen/feature/TreeFeature.cpp index 2474cdb68..731bd2b39 100644 --- a/source/world/level/levelgen/feature/TreeFeature.cpp +++ b/source/world/level/levelgen/feature/TreeFeature.cpp @@ -75,13 +75,13 @@ bool TreeFeature::place(Level* level, Random* random, const TilePos& pos) for (tp.y = lowerY; tp.y <= upperY; tp.y++, diff = tp.y - upperY) { int c1 = 1 - diff / 2; - int c2 = diff / 2 - 1; + //int c2 = diff / 2 - 1; for (tp.x = pos.x - c1; tp.x <= pos.x + c1; tp.x++) { - int c3 = c2; + //int c3 = c2; int c4 = diff / 2 - 1; - if (c2 < 0) - c3 = -c2; + /*if (c2 < 0) + c3 = -c2;*/ //int c5 = c3; diff --git a/source/world/level/levelgen/feature/VegetationFeature.cpp b/source/world/level/levelgen/feature/VegetationFeature.cpp index ee7480839..29ac36085 100644 --- a/source/world/level/levelgen/feature/VegetationFeature.cpp +++ b/source/world/level/levelgen/feature/VegetationFeature.cpp @@ -15,7 +15,7 @@ bool VegetationFeature::place(Level* level, Random* random, const TilePos& pos) while (true) { int var11 = level->getTile(bPos); - if (var11 != 0 && var11 != Tile::leaves->m_ID || bPos.y <= 0) + if ((var11 != 0 && var11 != Tile::leaves->m_ID) || bPos.y <= 0) { for (int var7 = 0; var7 < m_count; ++var7) { diff --git a/source/world/level/levelgen/synth/ImprovedNoise.hpp b/source/world/level/levelgen/synth/ImprovedNoise.hpp index 87f2dcfd4..ee49f8bc6 100644 --- a/source/world/level/levelgen/synth/ImprovedNoise.hpp +++ b/source/world/level/levelgen/synth/ImprovedNoise.hpp @@ -8,6 +8,7 @@ #pragma once +#include "compat/LegacyCPP.hpp" #include "common/Random.hpp" #include "Synth.hpp" diff --git a/source/world/level/path/BinaryHeap.cpp b/source/world/level/path/BinaryHeap.cpp index feffe8bc7..5eed80453 100644 --- a/source/world/level/path/BinaryHeap.cpp +++ b/source/world/level/path/BinaryHeap.cpp @@ -8,6 +8,7 @@ #include #include "BinaryHeap.hpp" #include "common/Mth.hpp" +#include "common/Utils.hpp" void BinaryHeap::insert(Node* pNode) { diff --git a/source/world/level/path/PathFinder.cpp b/source/world/level/path/PathFinder.cpp index 516632111..449a9e26d 100644 --- a/source/world/level/path/PathFinder.cpp +++ b/source/world/level/path/PathFinder.cpp @@ -11,7 +11,6 @@ #include "world/entity/Entity.hpp" static int dword_1CD868; -static int dword_1CD86C; static int dword_1CD870; constexpr int MakeNodeHash(const TilePos& pos) diff --git a/source/world/level/storage/LevelSource.hpp b/source/world/level/storage/LevelSource.hpp index 01bcf04ec..97cc026b2 100644 --- a/source/world/level/storage/LevelSource.hpp +++ b/source/world/level/storage/LevelSource.hpp @@ -8,6 +8,7 @@ #pragma once +#include "common/Utils.hpp" #include "world/level/Material.hpp" #include "world/level/levelgen/biome/BiomeSource.hpp" diff --git a/source/world/tile/DeadBush.cpp b/source/world/tile/DeadBush.cpp index 2fb47d006..39b7f9907 100644 --- a/source/world/tile/DeadBush.cpp +++ b/source/world/tile/DeadBush.cpp @@ -12,7 +12,7 @@ bool DeadBush::mayPlace(const Level* level, const TilePos& pos) const return tile == Tile::sand->m_ID; } -int DeadBush::getResource(int x, Random* random) const +int DeadBush::getResource(TileData data, Random* random) const { return -1; } diff --git a/source/world/tile/DeadBush.hpp b/source/world/tile/DeadBush.hpp index f2073f527..6cf395d07 100644 --- a/source/world/tile/DeadBush.hpp +++ b/source/world/tile/DeadBush.hpp @@ -6,6 +6,6 @@ class DeadBush : public Bush { public: DeadBush(int id, int texture); - int getResource(int, Random*) const; + int getResource(TileData, Random*) const override; bool mayPlace(const Level*, const TilePos& pos) const; }; diff --git a/source/world/tile/FenceTile.cpp b/source/world/tile/FenceTile.cpp index 7cd86c13f..3760a64fd 100644 --- a/source/world/tile/FenceTile.cpp +++ b/source/world/tile/FenceTile.cpp @@ -13,7 +13,7 @@ FenceTile::FenceTile(int a, int b) : Tile(a, b, Material::wood) { } -bool FenceTile::mayPlace(const Level* level, const TilePos& pos, Facing::Name face) const +bool FenceTile::mayPlace(const Level* level, const TilePos& pos) const { TilePos below = pos.below(); return level->getTile(below) == m_ID || (Tile::mayPlace(level, pos) && level->getMaterial(below)->isSolid()); diff --git a/source/world/tile/FenceTile.hpp b/source/world/tile/FenceTile.hpp index 12fe401b3..1f6864e4f 100644 --- a/source/world/tile/FenceTile.hpp +++ b/source/world/tile/FenceTile.hpp @@ -6,7 +6,7 @@ class FenceTile : public Tile { public: FenceTile(int id, int texture); - bool mayPlace(const Level*, const TilePos& pos, Facing::Name face) const; + bool mayPlace(const Level*, const TilePos& pos) const override; AABB* getAABB(const Level* pLevel, const TilePos& pos) override; bool isSolidRender() const override; bool isCubeShaped() const override; diff --git a/source/world/tile/PumpkinTile.cpp b/source/world/tile/PumpkinTile.cpp index 524263afc..c9481e442 100644 --- a/source/world/tile/PumpkinTile.cpp +++ b/source/world/tile/PumpkinTile.cpp @@ -10,7 +10,7 @@ int PumpkinTile::getTexture(Facing::Name face, TileData data) const switch (face) { case Facing::UP: case Facing::DOWN: return m_TextureFrame; default: - return face == 2 && data == 2 || face == 5 && data == 3 || face == 3 && data == 0 || face == 4 && data == 1 ? m_TextureFrame + (m_bLantern ? 18 : 17) : m_TextureFrame + 16; + return (face == 2 && data == 2) || (face == 5 && data == 3) || (face == 3 && data == 0) || (face == 4 && data == 1) ? m_TextureFrame + (m_bLantern ? 18 : 17) : m_TextureFrame + 16; } } diff --git a/thirdparty/SDL/SDL.h b/thirdparty/SDL/SDL.h index 4efb51aeb..7af64aa82 100644 --- a/thirdparty/SDL/SDL.h +++ b/thirdparty/SDL/SDL.h @@ -1,19 +1,19 @@ #pragma once #if (defined(_WIN32) || defined(USE_SDL1)) - -#ifdef _WIN32 -#ifdef USE_SDL1 -#pragma comment(lib, "SDL.lib") -#else -#pragma comment(lib, "SDL2.lib") -#endif -#include -#include -#else -#include -#endif - + #ifdef _WIN32 + #ifndef __clang__ + #ifdef USE_SDL1 + #pragma comment(lib, "SDL.lib") + #else + #pragma comment(lib, "SDL2.lib") + #endif + #endif + #include + #include + #else + #include + #endif #else -#include + #include #endif \ No newline at end of file diff --git a/thirdparty/SDL/SDL_opengl.h b/thirdparty/SDL/SDL_opengl.h index c3b4afcc0..a8a634f71 100644 --- a/thirdparty/SDL/SDL_opengl.h +++ b/thirdparty/SDL/SDL_opengl.h @@ -1,18 +1,18 @@ #pragma once #if (defined(_WIN32) || defined(USE_SDL1)) - -#ifdef _WIN32 -#ifdef USE_SDL1 -#pragma comment(lib, "SDL.lib") -#else -#pragma comment(lib, "SDL2.lib") -#endif -#include -#else -#include -#endif - + #ifdef _WIN32 + #ifndef __clang__ + #ifdef USE_SDL1 + #pragma comment(lib, "SDL.lib") + #else + #pragma comment(lib, "SDL2.lib") + #endif + #endif + #include + #else + #include + #endif #else -#include + #include #endif \ No newline at end of file diff --git a/thirdparty/raknet/gettimeofday.h b/thirdparty/raknet/gettimeofday.h index 29ddc5a19..21f52d37e 100644 --- a/thirdparty/raknet/gettimeofday.h +++ b/thirdparty/raknet/gettimeofday.h @@ -12,7 +12,7 @@ #define __GET_TIME_OF_DAY_H #if defined(_WIN32) && !defined(__GNUC__) &&!defined(__GCCXML__) -#include < time.h > +#include struct timezone { int tz_minuteswest; /* minutes W of Greenwich */