home · contact · privacy
Made Map struct use yx_uint16 for 2D coordinates/sizes.
[plomrogue] / src / roguelike.h
index a6c154a8cc5c1343d89c2f56aec87b3fe664aa7e..5dd17f797572af839d76dd3c7bfafab991b856af 100644 (file)
@@ -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 {
@@ -39,3 +40,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