From d9c6ec778635d4a327012a81d63a2d0652857d67 Mon Sep 17 00:00:00 2001 From: Kawe Mazidjatari <48657826+Mauler125@users.noreply.github.com> Date: Sat, 6 Jul 2024 09:39:37 +0200 Subject: [PATCH] Recast: setup project for using shared sdk code Allows Recast editor to use shared SDK code. --- src/thirdparty/recast/Pch.h | 20 +++++++++++++++++++ .../recast/Shared/Include/SharedAssert.h | 5 +++++ 2 files changed, 25 insertions(+) diff --git a/src/thirdparty/recast/Pch.h b/src/thirdparty/recast/Pch.h index eb861ae9..b31a4ca0 100644 --- a/src/thirdparty/recast/Pch.h +++ b/src/thirdparty/recast/Pch.h @@ -17,9 +17,16 @@ #include #include +#include +#include +#include #include #include +// Required for shared SDK code. +#include +#include + #include "common/experimental.h" #include "thirdparty/fastlz/fastlz.h" @@ -47,4 +54,17 @@ #include "NavEditor/Include/imgui.h" #include "NavEditor/Include/imguiRenderGL.h" +// SDK types +#include "common/sdkdefs.h" + +typedef uint8_t byte; +typedef int8_t int8; +typedef uint8_t uint8; +typedef int16_t int16; +typedef uint16_t uint16; +typedef int32_t int32; +typedef uint32_t uint32; +typedef int64_t int64; +typedef uint64_t uint64; + #endif // DTPCH_H diff --git a/src/thirdparty/recast/Shared/Include/SharedAssert.h b/src/thirdparty/recast/Shared/Include/SharedAssert.h index 0b00663a..db0664c3 100644 --- a/src/thirdparty/recast/Shared/Include/SharedAssert.h +++ b/src/thirdparty/recast/Shared/Include/SharedAssert.h @@ -53,4 +53,9 @@ rdAssertFailFunc* rdAssertFailGetCustom(); #endif +// This is required to make the navmesh editor work with external code. +#ifndef Assert +# define Assert rdAssert +#endif // !Assert + #endif // RECASTDETOURASSERT_H