X-Git-Url: https://plomlompom.com/repos/berlin_corona.txt?a=blobdiff_plain;f=src%2Froguelike.h;h=45e63b9ae0d97573a43592fa38d6e9499eb338fe;hb=c23b884c2b47fffde180af8179cd8ede5ff67241;hp=d82313e62d6aadcd81b7a3846651c9f78aaad95f;hpb=e9d8b1aca776341c9cdaa2ea6406336661d82a76;p=plomrogue diff --git a/src/roguelike.h b/src/roguelike.h index d82313e..45e63b9 100644 --- a/src/roguelike.h +++ b/src/roguelike.h @@ -1,3 +1,14 @@ +#ifndef ROGUELIKE_H +#define ROGUELIKE_H + +#include +#include "yx_uint16.h" + +struct WinMeta; +struct Win; +struct KeyBinding; +struct KeysWinData; + struct World { char interactive; struct KeyBinding * keybindings; @@ -10,31 +21,23 @@ struct World { struct Player * player; }; struct Map { - uint16_t width; - uint16_t height; - uint16_t offset_x; - uint16_t offset_y; + struct yx_uint16 size; + struct yx_uint16 offset; char * cells; }; -struct Player { - uint16_t y; - uint16_t x; }; +uint16_t rrand(char, uint32_t); +void update_log (struct World *, char *); -struct Monster { - uint16_t y; - uint16_t x; }; +struct Map init_map (); +void map_scroll (struct Map *, char); -uint16_t rrand(char, uint32_t); +void turn_over (struct World *, char); void save_game(struct World *); + void toggle_window (struct WinMeta *, struct Win *); void scroll_pad (struct WinMeta *, char); void growshrink_active_window (struct WinMeta *, char); -struct Map init_map (); -void map_scroll (struct Map *, char); -void next_turn (struct World *); -void update_log (struct World *, char *); -char is_passable (struct Map *, uint16_t, uint16_t); -void record_action (char); -void move_player (struct World *, char); -void player_wait(struct World *); + unsigned char meta_keys(int, struct World *, struct WinMeta *, struct Win *, struct Win *, struct Win *, struct Win *); + +#endif