home · contact · privacy
Added #include guards.
[plomrogue] / src / roguelike.h
index 2ae0c88cec69cd65776a91e2d8a6defdc3eeab05..9ecd71a890f9f90a3153a0a45862dee88002eddd 100644 (file)
@@ -1,3 +1,6 @@
+#ifndef ROGUELIKE_H
+#define ROGUELIKE_H
+
 struct World {
   char interactive;
   struct KeyBinding * keybindings;
@@ -17,19 +20,18 @@ struct Map {
   char * cells; };
 
 struct Player {
-  uint16_t y;
-  uint16_t x; };
+  struct yx_uint16 pos; };
 
 struct Monster {
   struct Monster * next;
   char name;
-  uint16_t y;
-  uint16_t x; };
+  struct yx_uint16 pos; };
 
 uint16_t rrand(char, uint32_t);
 struct Map init_map ();
 void save_game(struct World *);
 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);
@@ -40,3 +42,5 @@ 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