X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Finit.c;h=29f59e295375df4880caf064ef3e918bdc9cd125;hb=38c26472a6e9f0f037ddfe535d3919c00772b26f;hp=c25ded7716ddd8d0e1b251f69e131cfad253d7e3;hpb=8e3182237ca8dd04d3e1330a1beec784814f5005;p=rocksndiamonds.git diff --git a/src/init.c b/src/init.c index c25ded77..29f59e29 100644 --- a/src/init.c +++ b/src/init.c @@ -2260,6 +2260,18 @@ void Execute_Command(char *command) exit(0); } + else if (strncmp(command, "dump level ", 11) == 0) + { + char *filename = &command[11]; + + if (access(filename, F_OK) != 0) + Error(ERR_EXIT, "cannot open file '%s'", filename); + + LoadLevelFromFilename(filename); + DumpLevel(&level); + + exit(0); + } else if (strncmp(command, "dump tape ", 10) == 0) { char *filename = &command[10];