Added new assets Loaded all texture assets into game state Loaded the basic pipeline Setup a hard-coded quad to test drawing Created a very jank vertex struct Added ReadEntireFile for filesystem Added getting file size from file handle Added a descriptor pool to each in flight frame Changed Vk_BufferCreate to handle multiple uses Added shader building to the windows.bat build script
50 lines
950 B
C
50 lines
950 B
C
#if !defined(LD_OS_FILESYSTEM_H_)
|
|
#define LD_OS_FILESYSTEM_H_
|
|
|
|
typedef U32 FS_AccessFlags;
|
|
enum {
|
|
FS_ACCESS_READ = (1 << 0),
|
|
FS_ACCESS_WRITE = (1 << 1)
|
|
};
|
|
|
|
function OS_Handle FS_FileOpen(Str8 path, FS_AccessFlags access);
|
|
function void FS_FileClose(OS_Handle file);
|
|
|
|
function void FS_FileRead(OS_Handle file, void *ptr, U64 size, U64 offset);
|
|
function void FS_FileWrite(OS_Handle file, void *ptr, U64 size, U64 offset);
|
|
|
|
function U64 FS_FileSize(OS_Handle file);
|
|
|
|
typedef U32 FS_EntryType;
|
|
enum {
|
|
FS_ENTRY_TYPE_FILE = 0,
|
|
FS_ENTRY_TYPE_DIR
|
|
};
|
|
|
|
typedef struct FS_Entry FS_Entry;
|
|
struct FS_Entry {
|
|
FS_Entry *next;
|
|
|
|
FS_EntryType type;
|
|
|
|
Str8 path;
|
|
Str8 basename;
|
|
|
|
U64 time;
|
|
U64 size;
|
|
};
|
|
|
|
typedef struct FS_List FS_List;
|
|
struct FS_List {
|
|
FS_Entry *first;
|
|
FS_Entry *last;
|
|
|
|
U32 count;
|
|
};
|
|
|
|
function FS_List FS_PathList(M_Arena *arena, Str8 path);
|
|
|
|
function Str8 FS_ReadEntireFile(M_Arena *arena, Str8 path);
|
|
|
|
#endif // LD_OS_FILESYSTEM_H_
|