diff options
Diffstat (limited to 'src/engine/map.c')
| -rw-r--r-- | src/engine/map.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/engine/map.c b/src/engine/map.c index 53ade00a..dfb8b691 100644 --- a/src/engine/map.c +++ b/src/engine/map.c @@ -1,7 +1,7 @@ #include <stdio.h> #include "datafile.h" -static DATAFILE *map; +static DATAFILE *map = 0; void *map_get_data(int index) { @@ -51,3 +51,10 @@ int map_load(const char *mapname) map = datafile_load(buf); return map != 0; } + +void map_set(void *m) +{ + if(map) + map_unload(); + map = (DATAFILE*)m; +} |