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 coordinate yx in direction "dir"
27 * (east: 'E', west: 'W', north: 'N', south: 'S').
29 * If an invalid dir "d" is passed, "yx" remains unchanged.
31 extern struct yx_uint16 mv_yx_in_dir(char dir, struct yx_uint16 yx);