From 5b027914d5f8175880fdf1a27488085a0ea5046a Mon Sep 17 00:00:00 2001 From: King_DuckZ Date: Thu, 30 Jul 2015 01:16:33 +0200 Subject: [PATCH] Add distance typedef. --- include/doorkeeper/implem/configuration.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/include/doorkeeper/implem/configuration.h b/include/doorkeeper/implem/configuration.h index 19a68ea..98d88e4 100644 --- a/include/doorkeeper/implem/configuration.h +++ b/include/doorkeeper/implem/configuration.h @@ -1,11 +1,20 @@ #ifndef id2E81C803F1B94170B2C61A63D5020E08 #define id2E81C803F1B94170B2C61A63D5020E08 +#if defined(__cplusplus) +# include +#else +# include +#endif + #if !defined(DK_COORD_SCALAR_TYPE) /* this type represent tiles' coordinates, so it should be an integer type */ /* so it's not the tile position in your game world */ # define DK_COORD_SCALAR_TYPE int #endif +#if !defined(DK_COORD_DISTANCE_TYPE) +# define DK_COORD_DISTANCE_TYPE int64_t +#endif #if defined(__cplusplus) # define MAKE_DK_NAME(a) a @@ -15,12 +24,14 @@ namespace dk { #endif typedef DK_COORD_SCALAR_TYPE MAKE_DK_NAME(CoordinateScalarType); +typedef DK_COORD_DISTANCE_TYPE MAKE_DK_NAME(CoordinateDistType); #if defined(__cplusplus) } //namespace dk #endif #undef DK_COORD_SCALAR_TYPE +#undef DK_COORD_DISTANCE_TYPE #undef MAKE_DK_NAME #if !defined(NDEBUG) && !defined(NO_DK_ASSERTIONS)