mirror of
https://github.com/ondra-novak/gates_of_skeldal.git
synced 2025-07-04 21:50:38 -04:00
31 lines
511 B
C
31 lines
511 B
C
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
|
|
#include "memman.h"
|
|
|
|
void help()
|
|
{
|
|
puts("Usage: Extract skeldal.ddl source.ext target.ext");
|
|
exit(1);
|
|
}
|
|
|
|
main(int argc,char **argv)
|
|
{
|
|
void *z;int32_t s;
|
|
FILE *f;
|
|
|
|
if (argc!=4) help();
|
|
OPEN_LOG("");
|
|
init_manager(argv[1],NULL);
|
|
z=afile(argv[2],read_group(0),&s);
|
|
if (z==NULL)
|
|
{
|
|
puts("File not found");
|
|
return 1;
|
|
}
|
|
f=fopen_icase(argv[3],"w");
|
|
fwrite(z,1,s,f);
|
|
fclose(f);
|
|
puts("File successfuly expanded");
|
|
return 0;
|
|
}
|