home · contact · privacy
Use own pseudo-random number generator to ensure portable predictability.
[plomrogue] / roguelike.h
1 struct World {
2   struct KeyBinding * keybindings;
3   struct KeysWinData * keyswindata;
4   uint16_t turn;
5   char * log;
6   struct Map * map;
7   struct Monster * monster;
8   struct Player * player; };
9
10 struct Map {
11   uint16_t width;
12   uint16_t height;
13   uint16_t offset_x;
14   uint16_t offset_y;
15   char * cells; };
16
17 struct Player {
18   uint16_t y;
19   uint16_t x; };
20
21 struct Monster {
22   uint16_t y;
23   uint16_t x; };
24
25 uint16_t rrand();
26 void toggle_window (struct WinMeta *, struct Win *);
27 void growshrink_active_window (struct WinMeta *, char);
28 struct Map init_map ();
29 void map_scroll (struct Map *, char);
30 void next_turn (struct World *);
31 void update_log (struct World *, char *);
32 char is_passable (struct World *, uint16_t, uint16_t);
33 void move_player (struct World *, char);
34 void player_wait(struct World *);