pckr entry points
This commit is contained in:
parent
ea19c2767f
commit
e162e078c5
8
include/pckr.h
Normal file
8
include/pckr.h
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
#ifndef PCKR_H
|
||||||
|
#define PCKR_H
|
||||||
|
|
||||||
|
#include "aliases.h"
|
||||||
|
|
||||||
|
i32 run_pckr(i32 argc, char *argv[]);
|
||||||
|
|
||||||
|
#endif // !PCKR_H
|
4
src/main.c
Normal file
4
src/main.c
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
#include "aliases.h"
|
||||||
|
#include "pckr.h"
|
||||||
|
|
||||||
|
i32 main(i32 argc, char *argv[]) { return run_pckr(argc, argv); }
|
24
src/pckr.c
Normal file
24
src/pckr.c
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
#include "pckr.h"
|
||||||
|
#include "aliases.h"
|
||||||
|
#include "argparse.h"
|
||||||
|
#include "pak.h"
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
|
||||||
|
i32 run_pckr(i32 argc, char *argv[]) {
|
||||||
|
argparser_t parser = parse_args(argc, argv);
|
||||||
|
if (!parser.succeeded) {
|
||||||
|
printf("Usage: pckr ASSETS_DIR OUTPUT_FILE\n");
|
||||||
|
|
||||||
|
return EXIT_FAILURE;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool created = create_asset_pack(parser.args.dir, parser.args.output);
|
||||||
|
|
||||||
|
if (!created) {
|
||||||
|
printf("Failed to create pack\n");
|
||||||
|
return EXIT_FAILURE;
|
||||||
|
}
|
||||||
|
|
||||||
|
return EXIT_SUCCESS;
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user