home · contact · privacy
Renamed functions to reflect change from seed files system to game save files system.
[plomrogue] / roguelike.h
1 struct World {
2   struct KeyBinding * keybindings;
3   struct KeysWinData * keyswindata;
4   uint32_t seed;
5   uint32_t turn;
6   char * log;
7   struct Map * map;
8   struct Monster * monster;
9   struct Player * player; };
10
11 struct Map {
12   uint16_t width;
13   uint16_t height;
14   uint16_t offset_x;
15   uint16_t offset_y;
16   char * cells; };
17
18 struct Player {
19   uint16_t y;
20   uint16_t x; };
21
22 struct Monster {
23   uint16_t y;
24   uint16_t x; };
25
26 uint16_t rrand(char, uint32_t);
27 uint16_t read_uint16_bigendian(FILE * file);
28 void write_uint16_bigendian(uint16_t x, FILE * file);
29 uint32_t read_uint32_bigendian(FILE * file);
30 void write_uint32_bigendian(uint32_t x, FILE * file);
31 void load_game(struct World *);
32 void save_game(struct World *);
33 void toggle_window (struct WinMeta *, struct Win *);
34 void growshrink_active_window (struct WinMeta *, char);
35 struct Map init_map ();
36 void map_scroll (struct Map *, char);
37 void next_turn (struct World *);
38 void update_log (struct World *, char *);
39 char is_passable (struct World *, uint16_t, uint16_t);
40 void move_player (struct World *, char);
41 void player_wait(struct World *);