3 * Structs and routines for coordinates and movement in 2-dimensional space
4 * (such as the ncurses screen and game maps).
10 #include <stdint.h> /* for uint8_t, uint16_t */
14 /* Coordinates for maps of max. 65536x65536 cells. */
23 /* Return 1 if two yx_uint16 coordinates at "a" and "b" are equal, else 0. */
24 extern uint8_t yx_uint16_cmp(struct yx_uint16 * a, struct yx_uint16 * b);
26 /* Return yx_uint16 coordinate one step from "yx" in direction "dir" (east: 'E',
27 * west: 'W', north: 'N', south: 'S'). If "dir" is invalid or would wrap the
28 * move around the edge of a 2^16x2^16 cells field, "yx" remains unchanged.
30 extern struct yx_uint16 mv_yx_in_dir(char dir, struct yx_uint16 yx);