Add project files.
This commit is contained in:
29
NavmeshList/main.c
Normal file
29
NavmeshList/main.c
Normal file
@@ -0,0 +1,29 @@
|
||||
#include "ESPReader.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#undef NDEBUG
|
||||
#include <assert.h>
|
||||
|
||||
int main() {
|
||||
FILE *fp;
|
||||
errno_t ret = fopen_s(&fp, "Skyrim.esm", "rb");
|
||||
|
||||
if (ret || !fp)
|
||||
return ret;
|
||||
|
||||
fseek(fp, 0L, SEEK_END);
|
||||
long size = ftell(fp);
|
||||
rewind(fp);
|
||||
|
||||
char *buffer = malloc(size);
|
||||
if (!buffer)
|
||||
return errno;
|
||||
|
||||
size_t read = fread(buffer, sizeof(char), size, fp);
|
||||
assert(read == size);
|
||||
|
||||
walk(buffer, size);
|
||||
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user