diff options
| author | johannes <johannes.herman@gmail.com> | 2024-04-06 13:09:04 +0200 |
|---|---|---|
| committer | johannes <johannes.herman@gmail.com> | 2024-04-06 13:09:04 +0200 |
| commit | 8de23299d96c642ec39ec73d12322cc78865136c (patch) | |
| tree | c0daa8d95e97890f22d33c8ae6139ecd8a2e5149 /src/commands.c | |
| parent | 150790c84f1773cfc82b13953d7894cd25474a83 (diff) | |
implemented extract map
Diffstat (limited to 'src/commands.c')
| -rw-r--r-- | src/commands.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/commands.c b/src/commands.c index 752b451..337b0d3 100644 --- a/src/commands.c +++ b/src/commands.c @@ -171,6 +171,14 @@ int changemap(FILE *map, char *mapname, demo *demo) return 1; } +int exportmap(FILE *out, demo *demo) +{ + if (fwrite(demo->map.data, 1, demo->header.mapsize, out) < (unsigned int) demo->header.mapsize) + return -1; + + return 1; +} + void runcommand(cmdinput *cmd, demo *demo) { switch (cmd->cmdtype) |
