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 /* Directions available for movement. */
34 /* Return 1 if two yx_uint16 coordinates at "a" and "b" are equal, else 0. */
35 extern uint8_t yx_uint16_cmp(struct yx_uint16 * a, struct yx_uint16 * b);
39 /* Return yx_uint16 coordinate one step from coordinate yx in direction dir.
41 * If an invalid dir "d" is passed, "yx" remains unchanged.
43 extern struct yx_uint16 mv_yx_in_dir(enum dir d, struct yx_uint16 yx);