I hate my life
This commit is contained in:
46
tools/vn/character_generator.c
Normal file
46
tools/vn/character_generator.c
Normal file
@ -0,0 +1,46 @@
|
||||
/**
|
||||
* Copyright (c) 2021 Dominic Masters
|
||||
*
|
||||
* This software is released under the MIT License.
|
||||
* https://opensource.org/licenses/MIT
|
||||
*/
|
||||
|
||||
#include "../utils/common.h"
|
||||
#include "../utils/file.h"
|
||||
#include "../utils/image.h"
|
||||
#include "../utils/xml.h"
|
||||
|
||||
int main(int argc, char *argv[]) {
|
||||
FILE *file;
|
||||
char *in;
|
||||
char *out;
|
||||
char xmlBuffer[2048];
|
||||
|
||||
if(argc != 3) {
|
||||
printf("Invalid number of arguments\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
// Set up strings
|
||||
in = argv[1];
|
||||
out = argv[2];
|
||||
|
||||
// Normalize slashes
|
||||
fileNormalizeSlashes(in);
|
||||
fileNormalizeSlashes(out);
|
||||
|
||||
|
||||
// Read in XML file
|
||||
file = fopen(in, "rb");
|
||||
if(file == NULL) {
|
||||
printf("Failed to open file!\n");
|
||||
return 1;
|
||||
}
|
||||
assetReadString(file, xmlBuffer);
|
||||
|
||||
xmlnode_t node;
|
||||
xmlParseElement(&node, xmlBuffer);
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
Reference in New Issue
Block a user