3 * Struct for the game map and routines to create and scroll on it.
9 #include <stdint.h> /* uint8_t */
10 #include "../common/map.h" /* struct Map */
11 #include "../common/yx_uint16.h" /* yx_uint16 struct */
15 /* Initialize island map as 64 x 64 "~" cells representing water and "." cells
16 * representing land. The shape of the island is generated randomly by starting
17 * with a sea containing one land cell in the middle and then going into a cycle
18 * of repeatedly selecting a random cell on the map and transforming it into a
19 * land cell if it is horizontally or vertically neighbor to one; the cycle ends
20 * when a land cell is due to be created right at the border of the map.
22 extern void init_map();
24 /* Check if coordinate "pos" on (or beyond) world.map is accessible to map
27 extern uint8_t is_passable(struct yx_uint16 pos);