X-Git-Url: https://plomlompom.com/repos/test.html?a=blobdiff_plain;f=src%2Fmap.c;h=629e813a1d2089621d5d525330d824bbe201469a;hb=7290dec4219eaa2325aa00ef6139f715743dba3a;hp=92d1558bae9bbdd8d727cd914e51f15f8c0c507c;hpb=18fefabcc05bb3903384efbcc92f4303d9ac9567;p=plomrogue diff --git a/src/map.c b/src/map.c index 92d1558..629e813 100644 --- 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)