From dfb6adbcbcc7d50b770b6d5ea82efdd8f8c32e25 Mon Sep 17 00:00:00 2001 From: omniscient <17525998+omnisci3nce@users.noreply.github.com> Date: Sat, 5 Oct 2024 12:48:05 +1000 Subject: delete documentation workflow --- archive/src/core/vfs.h | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 archive/src/core/vfs.h (limited to 'archive/src/core/vfs.h') diff --git a/archive/src/core/vfs.h b/archive/src/core/vfs.h new file mode 100644 index 0000000..41033f5 --- /dev/null +++ b/archive/src/core/vfs.h @@ -0,0 +1,38 @@ +#pragma once +#include "defines.h" + +#define MAX_VIRTUAL_FILENAME_LEN 256 + +typedef struct VFS_Pack VFS_Pack; + +const char VFS_OpenErr_DoesNotExist[] = "PATH DOES NOT EXIST"; + +typedef struct VFS_File { + size_t n_bytes; + void* data; +} VFS_File; + +// virtual file open result +typedef struct VFS_FileRes { + bool success; + const char* error_reason; + VFS_File file; +} VFS_FileRes; + +VFS_Pack* VFS_Open(const char* filepath); + +bool VFS_Close(VFS_Pack*); + +VFS_FileRes VFS_VirtualRead(VFS_Pack* vfs, const char* unique_path); + +typedef struct VFS_PackBuilder { + const char* pack_filename; +} VFS_PackBuilder; + +typedef struct VFS_FileEntry { + char filename[MAX_VIRTUAL_FILENAME_LEN]; + size_t offset; + size_t size; +} VFS_FileEntry; + +VFS_PackBuilder VFS_Pack_Create(); \ No newline at end of file -- cgit v1.2.3-70-g09d2