X-Git-Url: https://plomlompom.com/repos/foo.html?a=blobdiff_plain;ds=sidebyside;f=src%2Froguelike.h;h=cf9d5cc634a6df00011ea7b5eb7ae1d0a0953192;hb=320b8c4e907fd6be633b68c5c8c7785eadf76b4e;hp=a6c154a8cc5c1343d89c2f56aec87b3fe664aa7e;hpb=64e1bc2a874308530b7b45c33ed5d37f34f5f8be;p=plomrogue
diff --git a/src/roguelike.h b/src/roguelike.h
index a6c154a..cf9d5cc 100644
--- a/src/roguelike.h
+++ b/src/roguelike.h
@@ -1,3 +1,6 @@
+#ifndef ROGUELIKE_H
+#define ROGUELIKE_H
+
struct World {
char interactive;
struct KeyBinding * keybindings;
@@ -10,10 +13,8 @@ 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 {
@@ -25,17 +26,25 @@ struct Monster {
struct yx_uint16 pos; };
uint16_t rrand(char, uint32_t);
+void update_log (struct World *, char *);
+
struct Map init_map ();
-void save_game(struct World *);
+void map_scroll (struct Map *, char);
+
void record_action (char);
-struct yx_uint16 mv_yx_in_dir (char, struct yx_uint16);
void next_turn (struct World *);
-void update_log (struct World *, char *);
-void move_player (struct World *, char);
+void save_game(struct World *);
+
char is_passable (struct Map *, uint16_t, uint16_t);
+struct yx_uint16 mv_yx_in_dir (char, struct yx_uint16);
+void move_monster (struct World *, struct Monster *);
+void move_player (struct World *, char);
void player_wait(struct World *);
+
void toggle_window (struct WinMeta *, struct Win *);
void scroll_pad (struct WinMeta *, char);
void growshrink_active_window (struct WinMeta *, char);
-void map_scroll (struct Map *, char);
+
unsigned char meta_keys(int, struct World *, struct WinMeta *, struct Win *, struct Win *, struct Win *, struct Win *);
+
+#endif