From b3ce3003389ec0ad66a78488be7504cb845da4a7 Mon Sep 17 00:00:00 2001 From: Kawe Mazidjatari <48657826+Mauler125@users.noreply.github.com> Date: Mon, 15 Jul 2024 20:53:38 +0200 Subject: [PATCH] Recast: properly split PCH between library and editor Both were using the same PCH, but the recast library doesn't need anything from SDL or ImGui, properly split them apart and cleaned up includes. --- src/naveditor/CMakeLists.txt | 6 ++-- src/naveditor/ChunkyTriMesh.cpp | 1 - src/naveditor/ConvexVolumeTool.cpp | 1 - src/naveditor/CrowdTool.cpp | 3 +- src/naveditor/Editor.cpp | 1 - src/naveditor/EditorInterfaces.cpp | 1 - src/naveditor/Editor_Debug.cpp | 1 - src/naveditor/Editor_SoloMesh.cpp | 1 - src/naveditor/Editor_TileMesh.cpp | 1 - src/naveditor/Filelist.cpp | 1 - src/naveditor/GameUtils.cpp | 1 - src/naveditor/InputGeom.cpp | 1 - src/naveditor/MeshLoaderBsp.cpp | 1 - src/naveditor/MeshLoaderObj.cpp | 1 - src/naveditor/MeshLoaderPly.cpp | 1 - src/naveditor/NavMeshPruneTool.cpp | 1 - src/naveditor/NavMeshTesterTool.cpp | 1 - src/naveditor/OffMeshConnectionTool.cpp | 1 - src/{thirdparty/recast => naveditor}/Pch.cpp | 2 +- src/naveditor/PerfTimer.cpp | 1 - src/naveditor/TestCase.cpp | 1 - src/naveditor/ValueHistory.cpp | 1 - .../recast => naveditor/include}/Pch.h | 6 ++-- src/naveditor/main.cpp | 1 - src/thirdparty/recast/CMakeLists.txt | 4 ++- .../recast/DebugUtils/Source/DebugDraw.cpp | 2 -- .../DebugUtils/Source/RecastDebugDraw.cpp | 2 -- .../recast/DebugUtils/Source/RecastDump.cpp | 5 ---- .../recast/Detour/Source/DetourNavMesh.cpp | 4 --- .../Detour/Source/DetourNavMeshBuilder.cpp | 5 ---- .../Detour/Source/DetourNavMeshQuery.cpp | 3 -- .../recast/Detour/Source/DetourNode.cpp | 1 - .../recast/DetourCrowd/Include/DetourCrowd.h | 4 +++ .../recast/DetourCrowd/Source/DetourCrowd.cpp | 5 ---- .../Source/DetourCrowdInternal.cpp | 5 ---- .../Source/DetourLocalBoundary.cpp | 2 -- .../Source/DetourObstacleAvoidance.cpp | 3 -- .../DetourCrowd/Source/DetourPathCorridor.cpp | 1 - .../DetourCrowd/Source/DetourPathQueue.cpp | 1 - .../Source/DetourProximityGrid.cpp | 2 -- .../recast/Recast/Source/Recast.cpp | 5 ---- .../recast/Recast/Source/RecastArea.cpp | 6 ---- .../recast/Recast/Source/RecastContour.cpp | 4 --- .../recast/Recast/Source/RecastFilter.cpp | 2 -- .../recast/Recast/Source/RecastLayers.cpp | 6 ---- .../recast/Recast/Source/RecastMesh.cpp | 5 ---- .../recast/Recast/Source/RecastMeshDetail.cpp | 7 ----- .../Recast/Source/RecastRasterization.cpp | 2 -- .../recast/Recast/Source/RecastRegion.cpp | 6 ---- src/thirdparty/recast/Shared/Include/Pch.h | 29 +++++++++++++++++++ src/thirdparty/recast/Shared/Source/Pch.cpp | 8 +++++ .../recast/Shared/Source/SharedAlloc.cpp | 1 - 52 files changed, 52 insertions(+), 115 deletions(-) rename src/{thirdparty/recast => naveditor}/Pch.cpp (90%) rename src/{thirdparty/recast => naveditor/include}/Pch.h (95%) create mode 100644 src/thirdparty/recast/Shared/Include/Pch.h create mode 100644 src/thirdparty/recast/Shared/Source/Pch.cpp diff --git a/src/naveditor/CMakeLists.txt b/src/naveditor/CMakeLists.txt index b31b165f..1f997745 100644 --- a/src/naveditor/CMakeLists.txt +++ b/src/naveditor/CMakeLists.txt @@ -20,12 +20,12 @@ add_sources( SOURCE_GROUP "Builder/Include" add_sources( SOURCE_GROUP "Core" "Editor.cpp" "main.cpp" - "../thirdparty/recast/Pch.cpp" + "Pch.cpp" ) add_sources( SOURCE_GROUP "Core/Include" "include/Editor.h" - "../thirdparty/recast/Pch.h" + "include/Pch.h" ) add_sources( SOURCE_GROUP "IO" @@ -96,7 +96,7 @@ target_compile_definitions( ${PROJECT_NAME} PRIVATE "_TOOLS" ) target_precompile_headers( ${PROJECT_NAME} PRIVATE - "${ENGINE_SOURCE_DIR}/thirdparty/recast/Pch.h" + "Include/Pch.h" ) target_link_libraries( ${PROJECT_NAME} PRIVATE "navsharedcommon" diff --git a/src/naveditor/ChunkyTriMesh.cpp b/src/naveditor/ChunkyTriMesh.cpp index 0c2f8d7d..2c0946e6 100644 --- a/src/naveditor/ChunkyTriMesh.cpp +++ b/src/naveditor/ChunkyTriMesh.cpp @@ -16,7 +16,6 @@ // 3. This notice may not be removed or altered from any source distribution. // -#include "Pch.h" #include "NavEditor/Include/ChunkyTriMesh.h" struct BoundsItem diff --git a/src/naveditor/ConvexVolumeTool.cpp b/src/naveditor/ConvexVolumeTool.cpp index e1bc033a..4299f232 100644 --- a/src/naveditor/ConvexVolumeTool.cpp +++ b/src/naveditor/ConvexVolumeTool.cpp @@ -16,7 +16,6 @@ // 3. This notice may not be removed or altered from any source distribution. // -#include "Pch.h" #include "Recast/Include/Recast.h" #include "DebugUtils/Include/DetourDebugDraw.h" #include "DebugUtils/Include/RecastDebugDraw.h" diff --git a/src/naveditor/CrowdTool.cpp b/src/naveditor/CrowdTool.cpp index 6f77d76c..f2de2a7c 100644 --- a/src/naveditor/CrowdTool.cpp +++ b/src/naveditor/CrowdTool.cpp @@ -16,7 +16,6 @@ // 3. This notice may not be removed or altered from any source distribution. // -#include "Pch.h" #include "Shared/Include/SharedCommon.h" #include "Detour/Include/DetourNode.h" #include "DetourCrowd/Include/DetourCrowd.h" @@ -26,7 +25,7 @@ #include "NavEditor/Include/InputGeom.h" #include "NavEditor/Include/Editor.h" #include "NavEditor/Include/EditorInterfaces.h" -#include "thirdparty/recast/DetourCrowd/Include/DetourCrowdInternal.h" +#include "DetourCrowd/Include/DetourCrowdInternal.h" static bool isectSegAABB(const float* sp, const float* sq, const float* amin, const float* amax, diff --git a/src/naveditor/Editor.cpp b/src/naveditor/Editor.cpp index 3e72d264..b082cd13 100644 --- a/src/naveditor/Editor.cpp +++ b/src/naveditor/Editor.cpp @@ -16,7 +16,6 @@ // 3. This notice may not be removed or altered from any source distribution. // -#include "Pch.h" #include "Recast/Include/Recast.h" #include "Shared/Include/SharedAssert.h" #include "Shared/Include/SharedCommon.h" diff --git a/src/naveditor/EditorInterfaces.cpp b/src/naveditor/EditorInterfaces.cpp index b28e0586..8b347fff 100644 --- a/src/naveditor/EditorInterfaces.cpp +++ b/src/naveditor/EditorInterfaces.cpp @@ -1,4 +1,3 @@ -#include "Pch.h" #include "Shared/Include/SharedCommon.h" #include "Recast/Include/Recast.h" #include "DebugUtils/Include/RecastDebugDraw.h" diff --git a/src/naveditor/Editor_Debug.cpp b/src/naveditor/Editor_Debug.cpp index b30a9a75..0d8f0c05 100644 --- a/src/naveditor/Editor_Debug.cpp +++ b/src/naveditor/Editor_Debug.cpp @@ -16,7 +16,6 @@ // 3. This notice may not be removed or altered from any source distribution. // -#include "Pch.h" #include "Recast/Include/Recast.h" #include "DebugUtils/Include/RecastDebugDraw.h" #include "DebugUtils/Include/DetourDebugDraw.h" diff --git a/src/naveditor/Editor_SoloMesh.cpp b/src/naveditor/Editor_SoloMesh.cpp index cff305d6..a0941739 100644 --- a/src/naveditor/Editor_SoloMesh.cpp +++ b/src/naveditor/Editor_SoloMesh.cpp @@ -16,7 +16,6 @@ // 3. This notice may not be removed or altered from any source distribution. // -#include "Pch.h" #include "Recast/Include/Recast.h" #include "Detour/Include/DetourNavMesh.h" #include "Detour/Include/DetourNavMeshBuilder.h" diff --git a/src/naveditor/Editor_TileMesh.cpp b/src/naveditor/Editor_TileMesh.cpp index 66e989ee..fc676a24 100644 --- a/src/naveditor/Editor_TileMesh.cpp +++ b/src/naveditor/Editor_TileMesh.cpp @@ -16,7 +16,6 @@ // 3. This notice may not be removed or altered from any source distribution. // -#include "Pch.h" #include "Shared/Include/SharedAssert.h" #include "Shared/Include/SharedCommon.h" #include "Recast/Include/Recast.h" diff --git a/src/naveditor/Filelist.cpp b/src/naveditor/Filelist.cpp index f2b439fc..2a61750e 100644 --- a/src/naveditor/Filelist.cpp +++ b/src/naveditor/Filelist.cpp @@ -16,7 +16,6 @@ // 3. This notice may not be removed or altered from any source distribution. // -#include "Pch.h" #include "NavEditor/Include/Filelist.h" using std::vector; diff --git a/src/naveditor/GameUtils.cpp b/src/naveditor/GameUtils.cpp index e887e9bd..b7a31bc6 100644 --- a/src/naveditor/GameUtils.cpp +++ b/src/naveditor/GameUtils.cpp @@ -16,7 +16,6 @@ // 3. This notice may not be removed or altered from any source distribution. // -#include "pch.h" #include "NavEditor/include/GameUtils.h" #include "NavEditor/include/FileTypes.h" diff --git a/src/naveditor/InputGeom.cpp b/src/naveditor/InputGeom.cpp index 7f864fd7..3c800656 100644 --- a/src/naveditor/InputGeom.cpp +++ b/src/naveditor/InputGeom.cpp @@ -16,7 +16,6 @@ // 3. This notice may not be removed or altered from any source distribution. // -#include "Pch.h" #include "Recast/Include/Recast.h" #include "NavEditor/Include/InputGeom.h" #include "NavEditor/Include/ChunkyTriMesh.h" diff --git a/src/naveditor/MeshLoaderBsp.cpp b/src/naveditor/MeshLoaderBsp.cpp index 1d8d2bc1..03b32897 100644 --- a/src/naveditor/MeshLoaderBsp.cpp +++ b/src/naveditor/MeshLoaderBsp.cpp @@ -16,7 +16,6 @@ // 3. This notice may not be removed or altered from any source distribution. // -#include "Pch.h" #include "NavEditor/Include/MeshLoaderBsp.h" bool rcMeshLoaderBsp::load(const std::string& /*filename*/) diff --git a/src/naveditor/MeshLoaderObj.cpp b/src/naveditor/MeshLoaderObj.cpp index f5efdecc..693e8e15 100644 --- a/src/naveditor/MeshLoaderObj.cpp +++ b/src/naveditor/MeshLoaderObj.cpp @@ -16,7 +16,6 @@ // 3. This notice may not be removed or altered from any source distribution. // -#include "Pch.h" #include "NavEditor/Include/MeshLoaderObj.h" rcMeshLoaderObj::rcMeshLoaderObj() : diff --git a/src/naveditor/MeshLoaderPly.cpp b/src/naveditor/MeshLoaderPly.cpp index 823f987c..fe59fb4b 100644 --- a/src/naveditor/MeshLoaderPly.cpp +++ b/src/naveditor/MeshLoaderPly.cpp @@ -16,7 +16,6 @@ // 3. This notice may not be removed or altered from any source distribution. // -#include "Pch.h" #include "NavEditor/Include/MeshLoaderPly.h" bool rcMeshLoaderPly::load(const std::string& filename) diff --git a/src/naveditor/NavMeshPruneTool.cpp b/src/naveditor/NavMeshPruneTool.cpp index 0e06c4f8..e68645e2 100644 --- a/src/naveditor/NavMeshPruneTool.cpp +++ b/src/naveditor/NavMeshPruneTool.cpp @@ -16,7 +16,6 @@ // 3. This notice may not be removed or altered from any source distribution. // -#include "Pch.h" #include "Shared/Include/SharedCommon.h" #include "Detour/Include/DetourNavMesh.h" #include "DebugUtils/Include/DetourDebugDraw.h" diff --git a/src/naveditor/NavMeshTesterTool.cpp b/src/naveditor/NavMeshTesterTool.cpp index 7c5c9fa8..d45ec905 100644 --- a/src/naveditor/NavMeshTesterTool.cpp +++ b/src/naveditor/NavMeshTesterTool.cpp @@ -16,7 +16,6 @@ // 3. This notice may not be removed or altered from any source distribution. // -#include "Pch.h" #include "Shared/Include/SharedCommon.h" #include "Recast/Include/Recast.h" #include "Detour/Include/DetourNavMesh.h" diff --git a/src/naveditor/OffMeshConnectionTool.cpp b/src/naveditor/OffMeshConnectionTool.cpp index b63f1035..f57e8c45 100644 --- a/src/naveditor/OffMeshConnectionTool.cpp +++ b/src/naveditor/OffMeshConnectionTool.cpp @@ -16,7 +16,6 @@ // 3. This notice may not be removed or altered from any source distribution. // -#include "Pch.h" #include "Recast/Include/Recast.h" #include "DebugUtils/Include/RecastDebugDraw.h" #include "DebugUtils/Include/DetourDebugDraw.h" diff --git a/src/thirdparty/recast/Pch.cpp b/src/naveditor/Pch.cpp similarity index 90% rename from src/thirdparty/recast/Pch.cpp rename to src/naveditor/Pch.cpp index ef981e3d..efecddf9 100644 --- a/src/thirdparty/recast/Pch.cpp +++ b/src/naveditor/Pch.cpp @@ -2,7 +2,7 @@ // *.pch will be the pre-compiled header // Pch.obj will contain the pre-compiled type information -#include "Pch.h" +#include "Include/Pch.h" // TODO: reference any additional headers you need in PCH.H // and not in this file diff --git a/src/naveditor/PerfTimer.cpp b/src/naveditor/PerfTimer.cpp index acc10d5f..d0f93f87 100644 --- a/src/naveditor/PerfTimer.cpp +++ b/src/naveditor/PerfTimer.cpp @@ -16,7 +16,6 @@ // 3. This notice may not be removed or altered from any source distribution. // -#include "Pch.h" #include "NavEditor/Include/PerfTimer.h" #if defined(WIN32) diff --git a/src/naveditor/TestCase.cpp b/src/naveditor/TestCase.cpp index 0f91c901..fb315c3b 100644 --- a/src/naveditor/TestCase.cpp +++ b/src/naveditor/TestCase.cpp @@ -16,7 +16,6 @@ // 3. This notice may not be removed or altered from any source distribution. // -#include "Pch.h" #include "Shared/Include/SharedCommon.h" #include "Detour/Include/DetourNavMesh.h" #include "Detour/Include/DetourNavMeshQuery.h" diff --git a/src/naveditor/ValueHistory.cpp b/src/naveditor/ValueHistory.cpp index ddc4500e..ba40af94 100644 --- a/src/naveditor/ValueHistory.cpp +++ b/src/naveditor/ValueHistory.cpp @@ -1,4 +1,3 @@ -#include "Pch.h" #include "NavEditor/Include/ValueHistory.h" #ifdef WIN32 diff --git a/src/thirdparty/recast/Pch.h b/src/naveditor/include/Pch.h similarity index 95% rename from src/thirdparty/recast/Pch.h rename to src/naveditor/include/Pch.h index 49c3f718..6a0cbb98 100644 --- a/src/thirdparty/recast/Pch.h +++ b/src/naveditor/include/Pch.h @@ -1,5 +1,5 @@ -#ifndef RDPCH_H -#define RDPCH_H +#ifndef NAVEDITORPCH_H +#define NAVEDITORPCH_H #define _USE_MATH_DEFINES #include @@ -66,4 +66,4 @@ #include "tier0/commonmacros.h" #include "common/sdkdefs.h" -#endif // RDPCH_H +#endif // NAVEDITORPCH_H diff --git a/src/naveditor/main.cpp b/src/naveditor/main.cpp index e122109b..d82f5a9e 100644 --- a/src/naveditor/main.cpp +++ b/src/naveditor/main.cpp @@ -16,7 +16,6 @@ // 3. This notice may not be removed or altered from any source distribution. // -#include "Pch.h" #include "Recast/Include/Recast.h" #include "Shared/Include/SharedAlloc.h" #include "DebugUtils/Include/RecastDebugDraw.h" diff --git a/src/thirdparty/recast/CMakeLists.txt b/src/thirdparty/recast/CMakeLists.txt index 088958f5..fcec4ede 100644 --- a/src/thirdparty/recast/CMakeLists.txt +++ b/src/thirdparty/recast/CMakeLists.txt @@ -8,12 +8,14 @@ add_module( "lib" "navsharedcommon" "" ${FOLDER_CONTEXT} TRUE TRUE ) start_sources() add_sources( SOURCE_GROUP "Source" + "Shared/Source/Pch.cpp" "Shared/Source/SharedAlloc.cpp" "Shared/Source/SharedAssert.cpp" "Shared/Source/SharedCommon.cpp" ) add_sources( SOURCE_GROUP "Include" + "Shared/Include/Pch.h" "Shared/Include/SharedAlloc.h" "Shared/Include/SharedAssert.h" "Shared/Include/SharedCommon.h" @@ -24,7 +26,7 @@ end_sources() whole_program_optimization() target_precompile_headers( ${PROJECT_NAME} PRIVATE - "Pch.h" + "Shared/Include/Pch.h" ) # ----------------------------------------------------------------------------- diff --git a/src/thirdparty/recast/DebugUtils/Source/DebugDraw.cpp b/src/thirdparty/recast/DebugUtils/Source/DebugDraw.cpp index 8e939a4e..f0f1808b 100644 --- a/src/thirdparty/recast/DebugUtils/Source/DebugDraw.cpp +++ b/src/thirdparty/recast/DebugUtils/Source/DebugDraw.cpp @@ -16,8 +16,6 @@ // 3. This notice may not be removed or altered from any source distribution. // -#define _USE_MATH_DEFINES -#include #include "Shared/Include/SharedMath.h" #include "Shared/Include/SharedCommon.h" #include "DebugUtils/Include/DebugDraw.h" diff --git a/src/thirdparty/recast/DebugUtils/Source/RecastDebugDraw.cpp b/src/thirdparty/recast/DebugUtils/Source/RecastDebugDraw.cpp index 41bf8121..b612fcb7 100644 --- a/src/thirdparty/recast/DebugUtils/Source/RecastDebugDraw.cpp +++ b/src/thirdparty/recast/DebugUtils/Source/RecastDebugDraw.cpp @@ -16,8 +16,6 @@ // 3. This notice may not be removed or altered from any source distribution. // -#define _USE_MATH_DEFINES -#include #include "DebugUtils/Include/DebugDraw.h" #include "DebugUtils/Include/RecastDebugDraw.h" #include "Recast/Include/Recast.h" diff --git a/src/thirdparty/recast/DebugUtils/Source/RecastDump.cpp b/src/thirdparty/recast/DebugUtils/Source/RecastDump.cpp index 96fe1de0..82110a22 100644 --- a/src/thirdparty/recast/DebugUtils/Source/RecastDump.cpp +++ b/src/thirdparty/recast/DebugUtils/Source/RecastDump.cpp @@ -16,11 +16,6 @@ // 3. This notice may not be removed or altered from any source distribution. // -#define _USE_MATH_DEFINES -#include -#include -#include -#include #include "Recast/Include/Recast.h" #include "Shared/Include/SharedAlloc.h" #include "DebugUtils/Include/RecastDump.h" diff --git a/src/thirdparty/recast/Detour/Source/DetourNavMesh.cpp b/src/thirdparty/recast/Detour/Source/DetourNavMesh.cpp index 71ddaf2f..23756fce 100644 --- a/src/thirdparty/recast/Detour/Source/DetourNavMesh.cpp +++ b/src/thirdparty/recast/Detour/Source/DetourNavMesh.cpp @@ -16,10 +16,6 @@ // 3. This notice may not be removed or altered from any source distribution. // -#include -#include -#include -#include #include "Shared/Include/SharedMath.h" #include "Shared/Include/SharedCommon.h" #include "Shared/Include/SharedAlloc.h" diff --git a/src/thirdparty/recast/Detour/Source/DetourNavMeshBuilder.cpp b/src/thirdparty/recast/Detour/Source/DetourNavMeshBuilder.cpp index de77da77..dd6ca7d5 100644 --- a/src/thirdparty/recast/Detour/Source/DetourNavMeshBuilder.cpp +++ b/src/thirdparty/recast/Detour/Source/DetourNavMeshBuilder.cpp @@ -16,11 +16,6 @@ // 3. This notice may not be removed or altered from any source distribution. // -#include -#include -#include -#include -#include #include "Shared/Include/SharedMath.h" #include "Shared/Include/SharedCommon.h" #include "Shared/Include/SharedAlloc.h" diff --git a/src/thirdparty/recast/Detour/Source/DetourNavMeshQuery.cpp b/src/thirdparty/recast/Detour/Source/DetourNavMeshQuery.cpp index 52058c05..d4494a86 100644 --- a/src/thirdparty/recast/Detour/Source/DetourNavMeshQuery.cpp +++ b/src/thirdparty/recast/Detour/Source/DetourNavMeshQuery.cpp @@ -16,8 +16,6 @@ // 3. This notice may not be removed or altered from any source distribution. // -#include -#include #include "Shared/Include/SharedMath.h" #include "Detour/Include/DetourNavMeshQuery.h" #include "Detour/Include/DetourNavMesh.h" @@ -25,7 +23,6 @@ #include "Shared/Include/SharedCommon.h" #include "Shared/Include/SharedAlloc.h" #include "Shared/Include/SharedAssert.h" -#include /// @class dtQueryFilter /// diff --git a/src/thirdparty/recast/Detour/Source/DetourNode.cpp b/src/thirdparty/recast/Detour/Source/DetourNode.cpp index 4410ad56..37194bf1 100644 --- a/src/thirdparty/recast/Detour/Source/DetourNode.cpp +++ b/src/thirdparty/recast/Detour/Source/DetourNode.cpp @@ -20,7 +20,6 @@ #include "Shared/Include/SharedAlloc.h" #include "Shared/Include/SharedAssert.h" #include "Shared/Include/SharedCommon.h" -#include #ifdef DT_POLYREF64 // From Thomas Wang, https://gist.github.com/badboy/6267743 diff --git a/src/thirdparty/recast/DetourCrowd/Include/DetourCrowd.h b/src/thirdparty/recast/DetourCrowd/Include/DetourCrowd.h index 772047c2..be4458f3 100644 --- a/src/thirdparty/recast/DetourCrowd/Include/DetourCrowd.h +++ b/src/thirdparty/recast/DetourCrowd/Include/DetourCrowd.h @@ -26,6 +26,10 @@ #include "DetourProximityGrid.h" #include "DetourPathQueue.h" +#ifndef V_ARRAYSIZE // Required for the game header below. +#define V_ARRAYSIZE(A) (sizeof(A)/sizeof((A)[0])) +#endif // !V_ARRAYSIZE + #include "game/server/ai_navmesh.h" /// The maximum number of neighbors that a crowd agent can take into account diff --git a/src/thirdparty/recast/DetourCrowd/Source/DetourCrowd.cpp b/src/thirdparty/recast/DetourCrowd/Source/DetourCrowd.cpp index 63f8d11c..c679804c 100644 --- a/src/thirdparty/recast/DetourCrowd/Source/DetourCrowd.cpp +++ b/src/thirdparty/recast/DetourCrowd/Source/DetourCrowd.cpp @@ -16,11 +16,6 @@ // 3. This notice may not be removed or altered from any source distribution. // -#define _USE_MATH_DEFINES -#include -#include -#include -#include #include "DetourCrowd\Include\DetourCrowd.h" #include "DetourCrowd\Include\DetourCrowdInternal.h" #include "DetourCrowd\Include\DetourObstacleAvoidance.h" diff --git a/src/thirdparty/recast/DetourCrowd/Source/DetourCrowdInternal.cpp b/src/thirdparty/recast/DetourCrowd/Source/DetourCrowdInternal.cpp index 3026243f..95268d7e 100644 --- a/src/thirdparty/recast/DetourCrowd/Source/DetourCrowdInternal.cpp +++ b/src/thirdparty/recast/DetourCrowd/Source/DetourCrowdInternal.cpp @@ -16,11 +16,6 @@ // 3. This notice may not be removed or altered from any source distribution. // -#define _USE_MATH_DEFINES -#include -#include -#include -#include #include "DetourCrowd\Include\DetourCrowd.h" #include "DetourCrowd\Include\DetourCrowdInternal.h" #include "DetourCrowd\Include\DetourObstacleAvoidance.h" diff --git a/src/thirdparty/recast/DetourCrowd/Source/DetourLocalBoundary.cpp b/src/thirdparty/recast/DetourCrowd/Source/DetourLocalBoundary.cpp index 16a35bc9..f8a8f1a7 100644 --- a/src/thirdparty/recast/DetourCrowd/Source/DetourLocalBoundary.cpp +++ b/src/thirdparty/recast/DetourCrowd/Source/DetourLocalBoundary.cpp @@ -16,8 +16,6 @@ // 3. This notice may not be removed or altered from any source distribution. // -#include -#include #include "DetourCrowd\Include\DetourLocalBoundary.h" #include "Detour\Include\DetourNavMeshQuery.h" #include "Shared\Include\SharedCommon.h" diff --git a/src/thirdparty/recast/DetourCrowd/Source/DetourObstacleAvoidance.cpp b/src/thirdparty/recast/DetourCrowd/Source/DetourObstacleAvoidance.cpp index 4a51aaeb..15a579f3 100644 --- a/src/thirdparty/recast/DetourCrowd/Source/DetourObstacleAvoidance.cpp +++ b/src/thirdparty/recast/DetourCrowd/Source/DetourObstacleAvoidance.cpp @@ -21,9 +21,6 @@ #include "Shared\Include\SharedMath.h" #include "Shared\Include\SharedAlloc.h" #include "Shared\Include\SharedAssert.h" -#include -#include -#include static int sweepCircleCircle(const float* c0, const float r0, const float* v, const float* c1, const float r1, diff --git a/src/thirdparty/recast/DetourCrowd/Source/DetourPathCorridor.cpp b/src/thirdparty/recast/DetourCrowd/Source/DetourPathCorridor.cpp index 9cd0e400..f6c2b9fb 100644 --- a/src/thirdparty/recast/DetourCrowd/Source/DetourPathCorridor.cpp +++ b/src/thirdparty/recast/DetourCrowd/Source/DetourPathCorridor.cpp @@ -16,7 +16,6 @@ // 3. This notice may not be removed or altered from any source distribution. // -#include #include "DetourCrowd\Include\DetourPathCorridor.h" #include "Detour\Include\DetourNavMeshQuery.h" #include "Shared\Include\SharedCommon.h" diff --git a/src/thirdparty/recast/DetourCrowd/Source/DetourPathQueue.cpp b/src/thirdparty/recast/DetourCrowd/Source/DetourPathQueue.cpp index efa98c66..99428b3b 100644 --- a/src/thirdparty/recast/DetourCrowd/Source/DetourPathQueue.cpp +++ b/src/thirdparty/recast/DetourCrowd/Source/DetourPathQueue.cpp @@ -16,7 +16,6 @@ // 3. This notice may not be removed or altered from any source distribution. // -#include #include "DetourCrowd\Include\DetourPathQueue.h" #include "Detour\Include\DetourNavMesh.h" #include "Detour\Include\DetourNavMeshQuery.h" diff --git a/src/thirdparty/recast/DetourCrowd/Source/DetourProximityGrid.cpp b/src/thirdparty/recast/DetourCrowd/Source/DetourProximityGrid.cpp index 2814109d..4ba88960 100644 --- a/src/thirdparty/recast/DetourCrowd/Source/DetourProximityGrid.cpp +++ b/src/thirdparty/recast/DetourCrowd/Source/DetourProximityGrid.cpp @@ -16,8 +16,6 @@ // 3. This notice may not be removed or altered from any source distribution. // -#include -#include #include "Shared\Include\SharedMath.h" #include "Shared\Include\SharedCommon.h" #include "DetourCrowd\Include\DetourProximityGrid.h" diff --git a/src/thirdparty/recast/Recast/Source/Recast.cpp b/src/thirdparty/recast/Recast/Source/Recast.cpp index 55615292..0772ede4 100644 --- a/src/thirdparty/recast/Recast/Source/Recast.cpp +++ b/src/thirdparty/recast/Recast/Source/Recast.cpp @@ -20,11 +20,6 @@ #include "Shared/Include/SharedAlloc.h" #include "Shared/Include/SharedAssert.h" -#include -#include -#include -#include - namespace { /// Allocates and constructs an object of the given type, returning a pointer. diff --git a/src/thirdparty/recast/Recast/Source/RecastArea.cpp b/src/thirdparty/recast/Recast/Source/RecastArea.cpp index 7d8e4568..48d2bd33 100644 --- a/src/thirdparty/recast/Recast/Source/RecastArea.cpp +++ b/src/thirdparty/recast/Recast/Source/RecastArea.cpp @@ -16,12 +16,6 @@ // 3. This notice may not be removed or altered from any source distribution. // -#include -#define _USE_MATH_DEFINES -#include -#include -#include -#include #include "Recast/Include/Recast.h" #include "Shared/Include/SharedAlloc.h" #include "Shared/Include/SharedAssert.h" diff --git a/src/thirdparty/recast/Recast/Source/RecastContour.cpp b/src/thirdparty/recast/Recast/Source/RecastContour.cpp index 1aa92421..87ed0cfa 100644 --- a/src/thirdparty/recast/Recast/Source/RecastContour.cpp +++ b/src/thirdparty/recast/Recast/Source/RecastContour.cpp @@ -16,10 +16,6 @@ // 3. This notice may not be removed or altered from any source distribution. // -#include -#include -#include -#include #include "Recast/Include/Recast.h" #include "Shared/Include/SharedAlloc.h" #include "Shared/Include/SharedAssert.h" diff --git a/src/thirdparty/recast/Recast/Source/RecastFilter.cpp b/src/thirdparty/recast/Recast/Source/RecastFilter.cpp index 621546b6..08290fc7 100644 --- a/src/thirdparty/recast/Recast/Source/RecastFilter.cpp +++ b/src/thirdparty/recast/Recast/Source/RecastFilter.cpp @@ -19,8 +19,6 @@ #include "Recast/Include/Recast.h" #include "Shared/Include/SharedAssert.h" -#include - void rcFilterLowHangingWalkableObstacles(rcContext* context, const int walkableClimb, rcHeightfield& heightfield) { rdAssert(context); diff --git a/src/thirdparty/recast/Recast/Source/RecastLayers.cpp b/src/thirdparty/recast/Recast/Source/RecastLayers.cpp index 2daec63b..9f4389c2 100644 --- a/src/thirdparty/recast/Recast/Source/RecastLayers.cpp +++ b/src/thirdparty/recast/Recast/Source/RecastLayers.cpp @@ -16,12 +16,6 @@ // 3. This notice may not be removed or altered from any source distribution. // -#include -#define _USE_MATH_DEFINES -#include -#include -#include -#include #include "Recast/Include/Recast.h" #include "Shared/Include/SharedAlloc.h" #include "Shared/Include/SharedAssert.h" diff --git a/src/thirdparty/recast/Recast/Source/RecastMesh.cpp b/src/thirdparty/recast/Recast/Source/RecastMesh.cpp index 928726ba..9d257553 100644 --- a/src/thirdparty/recast/Recast/Source/RecastMesh.cpp +++ b/src/thirdparty/recast/Recast/Source/RecastMesh.cpp @@ -16,14 +16,9 @@ // 3. This notice may not be removed or altered from any source distribution. // -#define _USE_MATH_DEFINES -#include -#include -#include #include "Recast/Include/Recast.h" #include "Shared/Include/SharedAlloc.h" #include "Shared/Include/SharedAssert.h" -#include struct rcEdge { unsigned short vert[2]; diff --git a/src/thirdparty/recast/Recast/Source/RecastMeshDetail.cpp b/src/thirdparty/recast/Recast/Source/RecastMeshDetail.cpp index 906389d4..88a6a19b 100644 --- a/src/thirdparty/recast/Recast/Source/RecastMeshDetail.cpp +++ b/src/thirdparty/recast/Recast/Source/RecastMeshDetail.cpp @@ -16,16 +16,9 @@ // 3. This notice may not be removed or altered from any source distribution. // -#include -#define _USE_MATH_DEFINES -#include -#include -#include -#include #include "Recast/Include/Recast.h" #include "Shared/Include/SharedAlloc.h" #include "Shared/Include/SharedAssert.h" -#include static const unsigned RC_UNSET_HEIGHT = 0xffff; #define REVERSE_DIRECTION 1 diff --git a/src/thirdparty/recast/Recast/Source/RecastRasterization.cpp b/src/thirdparty/recast/Recast/Source/RecastRasterization.cpp index ff1d4c52..496081d1 100644 --- a/src/thirdparty/recast/Recast/Source/RecastRasterization.cpp +++ b/src/thirdparty/recast/Recast/Source/RecastRasterization.cpp @@ -16,8 +16,6 @@ // 3. This notice may not be removed or altered from any source distribution. // -#include -#include #include "Recast/Include/Recast.h" #include "Shared/Include/SharedAlloc.h" #include "Shared/Include/SharedAssert.h" diff --git a/src/thirdparty/recast/Recast/Source/RecastRegion.cpp b/src/thirdparty/recast/Recast/Source/RecastRegion.cpp index 95e82f11..1848fdc6 100644 --- a/src/thirdparty/recast/Recast/Source/RecastRegion.cpp +++ b/src/thirdparty/recast/Recast/Source/RecastRegion.cpp @@ -16,12 +16,6 @@ // 3. This notice may not be removed or altered from any source distribution. // -#include -#define _USE_MATH_DEFINES -#include -#include -#include -#include #include "Recast/Include/Recast.h" #include "Shared/Include/SharedAlloc.h" #include "Shared/Include/SharedAssert.h" diff --git a/src/thirdparty/recast/Shared/Include/Pch.h b/src/thirdparty/recast/Shared/Include/Pch.h new file mode 100644 index 00000000..ab15a23d --- /dev/null +++ b/src/thirdparty/recast/Shared/Include/Pch.h @@ -0,0 +1,29 @@ +#ifndef RDPCH_H +#define RDPCH_H + +#define _USE_MATH_DEFINES +#include +#include +#include +#include +#include +#include + +#include +#include + +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +#include "thirdparty/fastlz/fastlz.h" + +#endif // RDPCH_H diff --git a/src/thirdparty/recast/Shared/Source/Pch.cpp b/src/thirdparty/recast/Shared/Source/Pch.cpp new file mode 100644 index 00000000..13a61d91 --- /dev/null +++ b/src/thirdparty/recast/Shared/Source/Pch.cpp @@ -0,0 +1,8 @@ +// Pch.cpp : source file that includes just the standard includes +// *.pch will be the pre-compiled header +// Pch.obj will contain the pre-compiled type information + +#include "Shared/Include/Pch.h" + +// TODO: reference any additional headers you need in PCH.H +// and not in this file diff --git a/src/thirdparty/recast/Shared/Source/SharedAlloc.cpp b/src/thirdparty/recast/Shared/Source/SharedAlloc.cpp index 7438cf19..2f2277ee 100644 --- a/src/thirdparty/recast/Shared/Source/SharedAlloc.cpp +++ b/src/thirdparty/recast/Shared/Source/SharedAlloc.cpp @@ -16,7 +16,6 @@ // 3. This notice may not be removed or altered from any source distribution. // -#include #include "Shared/Include/SharedAlloc.h" static void *rdAllocDefault(size_t size, rdAllocHint)