2015-08-19 19:06:58 +00:00
|
|
|
/* Copyright 2015, Michele Santullo
|
|
|
|
* This file is part of DoorKeeper.
|
|
|
|
*
|
|
|
|
* DoorKeeper is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation, either version 3 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* DoorKeeper is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with DoorKeeper. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
|
2014-12-09 21:30:06 +00:00
|
|
|
#ifndef id2E81C803F1B94170B2C61A63D5020E08
|
|
|
|
#define id2E81C803F1B94170B2C61A63D5020E08
|
|
|
|
|
2015-07-29 23:16:33 +00:00
|
|
|
#if defined(__cplusplus)
|
|
|
|
# include <cstdint>
|
|
|
|
#else
|
|
|
|
# include <stdint.h>
|
|
|
|
#endif
|
|
|
|
|
2014-12-09 21:30:06 +00:00
|
|
|
#if !defined(DK_COORD_SCALAR_TYPE)
|
2014-12-11 22:58:52 +00:00
|
|
|
/* this type represent tiles' coordinates, so it should be an integer type */
|
|
|
|
/* so it's not the tile position in your game world */
|
2015-07-29 23:18:19 +00:00
|
|
|
# define DK_COORD_SCALAR_TYPE int32_t
|
2014-12-09 21:30:06 +00:00
|
|
|
#endif
|
2015-07-29 23:16:33 +00:00
|
|
|
#if !defined(DK_COORD_DISTANCE_TYPE)
|
|
|
|
# define DK_COORD_DISTANCE_TYPE int64_t
|
|
|
|
#endif
|
2015-08-25 20:16:57 +00:00
|
|
|
#if !defined(DK_COORD_ACCUM_TYPE)
|
|
|
|
# define DK_COORD_ACCUM_TYPE float
|
|
|
|
#endif
|
2014-12-09 21:30:06 +00:00
|
|
|
|
|
|
|
#if defined(__cplusplus)
|
|
|
|
# define MAKE_DK_NAME(a) a
|
|
|
|
namespace dk {
|
|
|
|
#else
|
|
|
|
# define MAKE_DK_NAME(a) dk_ ## a
|
|
|
|
#endif
|
|
|
|
|
|
|
|
typedef DK_COORD_SCALAR_TYPE MAKE_DK_NAME(CoordinateScalarType);
|
2015-07-29 23:16:33 +00:00
|
|
|
typedef DK_COORD_DISTANCE_TYPE MAKE_DK_NAME(CoordinateDistType);
|
2015-08-25 20:16:57 +00:00
|
|
|
typedef DK_COORD_ACCUM_TYPE MAKE_DK_NAME(CoordinateAccumType);
|
2014-12-09 21:30:06 +00:00
|
|
|
|
|
|
|
#if defined(__cplusplus)
|
|
|
|
} //namespace dk
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#undef DK_COORD_SCALAR_TYPE
|
2015-07-29 23:16:33 +00:00
|
|
|
#undef DK_COORD_DISTANCE_TYPE
|
2015-08-25 20:16:57 +00:00
|
|
|
#undef DK_COORD_ACCUM_TYPE
|
2014-12-09 21:30:06 +00:00
|
|
|
#undef MAKE_DK_NAME
|
|
|
|
|
2014-12-11 22:58:52 +00:00
|
|
|
#if !defined(NDEBUG) && !defined(NO_DK_ASSERTIONS)
|
|
|
|
# if !defined(DK_ASSERT)
|
|
|
|
# include <cassert>
|
|
|
|
# define DK_ASSERT(a) assert(a)
|
|
|
|
# endif
|
2015-06-07 01:57:18 +00:00
|
|
|
# define DK_ASSERTIONS_ENABLED
|
2014-12-11 22:58:52 +00:00
|
|
|
#else
|
|
|
|
# if !defined(DK_ASSERT)
|
|
|
|
# define DK_ASSERT(a)
|
|
|
|
# endif
|
|
|
|
#endif
|
|
|
|
|
2014-12-09 21:30:06 +00:00
|
|
|
#endif
|