diff options
Diffstat (limited to 'src/xd.c')
| -rw-r--r-- | src/xd.c | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/src/xd.c b/src/xd.c deleted file mode 100644 index 32cc83e..0000000 --- a/src/xd.c +++ /dev/null @@ -1,35 +0,0 @@ -#include "xd.h" - -#include <raylib.h> -#include <stdio.h> -#include <stdlib.h> - -XdData Xd_LoadFromFile(const char *filePath) { - FILE *file = fopen(filePath, "rb"); - - XdData data; - fread(&data, sizeof(XdData), 1, file); - printf("1 %s\n", data.name); - - fclose(file); - return data; -} - -void Xd_SaveFile(const char *filePath, XdData *data) { - if (data == NULL) { - printf("data is null\n"); - return; - } - - FILE *file = fopen(filePath, "wb"); - - if (file == NULL) { - perror("Failed to open a file"); - return; - } - - fwrite(data, sizeof(XdData), 1, file); - - fclose(file); - printf("saved\n"); -} |
