3 * Structs and routines for coordinates and movement in 2-dimensional space
4 * (such as the ncurses screen and game maps).
12 #include <stdint.h> /* for uint8_t, uint16_t */
16 /* Coordinates for maps of max. 65536x65536 cells. */
25 /* Directions available for movement. */
36 /* Return 1 if two yx_uint16 coordinates at "a" and "b" are equal, else 0. */
37 extern uint8_t yx_uint16_cmp(struct yx_uint16 * a, struct yx_uint16 * b);
41 /* Return yx_uint16 coordinate one step from coordinate yx in direction dir.
43 * If an invalid dir "d" is passed, "yx" remains unchanged.
45 extern struct yx_uint16 mv_yx_in_dir(enum dir d, struct yx_uint16 yx);