From a15f24294d5113fec767fb9007d906f534dc0485 Mon Sep 17 00:00:00 2001 From: ilotterytea Date: Fri, 31 Jan 2025 00:33:53 +0500 Subject: upd: moved some editor logic to tileset and floor files --- src/xd.c | 35 ----------------------------------- 1 file changed, 35 deletions(-) delete mode 100644 src/xd.c (limited to 'src/xd.c') 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 -#include -#include - -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"); -} -- cgit v1.2.3