home · contact · privacy
MAJOR re-write. Split plomrogue into a server and a client. Re-wrote large parts
[plomrogue] / src / server / map.h
1 /* src/server/map.h
2  *
3  * Struct for the game map and routines to create and scroll on it.
4  */
5
6 #ifndef MAP_H_SERVER
7 #define MAP_H_SERVER
8
9 #include <stdint.h> /* uint8_t */
10 #include "../common/map.h" /* struct Map */
11 #include "../common/yx_uint16.h" /* yx_uint16 struct */
12
13
14
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.
21  */
22 extern void init_map();
23
24 /* Check if coordinate "pos" on (or beyond) world.map is accessible to map
25  * object movement.
26  */
27 extern uint8_t is_passable(struct yx_uint16 pos);
28
29
30
31 #endif