diff options
| author | Magnus Auvinen <magnus.auvinen@gmail.com> | 2007-09-23 22:54:31 +0000 |
|---|---|---|
| committer | Magnus Auvinen <magnus.auvinen@gmail.com> | 2007-09-23 22:54:31 +0000 |
| commit | 06c341be51a75fd8a24f2441654e184fd3fdefcd (patch) | |
| tree | 6531724f2acaf5a56fdb9af0f8a0c9271467848b /src/engine/map.c | |
| parent | e55ba53ba7aa993279bf3f6a21b1e771fda74f1d (diff) | |
| download | zcatch-06c341be51a75fd8a24f2441654e184fd3fdefcd.tar.gz zcatch-06c341be51a75fd8a24f2441654e184fd3fdefcd.zip | |
dynamic map change
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; +} |