home · contact · privacy
Made single World struct a global variable, fitted a lot of code to this change,...
[plomrogue] / src / map.c
index 92d1558bae9bbdd8d727cd914e51f15f8c0c507c..629e813a1d2089621d5d525330d824bbe201469a 100644 (file)
--- a/src/map.c
+++ b/src/map.c
@@ -5,18 +5,17 @@
 #include "yx_uint16.h"   /* for yx_uint16 and dir enums */
 #include "rrand.h"       /* for rrand() */
 #include "windows.h"     /* for struct Win */
-struct World;
 
 
 
-struct Map init_map(struct World * world)
+extern struct Map init_map()
 {
     char * f_name = "init_map()";
     struct Map map;
     map.size.x = 64;
     map.size.y = 64;
     uint32_t size = map.size.x * map.size.y;
-    map.cells = try_malloc(size, world, f_name);
+    map.cells = try_malloc(size, f_name);
     uint16_t y, x;
     for (y = 0; y < map.size.y; y++)
     {
@@ -54,7 +53,7 @@ struct Map init_map(struct World * world)
 
 
 
-void map_scroll(struct Win * win, struct yx_uint16 map_size, enum dir d)
+extern void map_scroll(struct Win * win, struct yx_uint16 map_size, enum dir d)
 {
     uint16_t offset;
     if ((NORTH == d || SOUTH == d) && map_size.y > win->framesize.y)