diff options
Diffstat (limited to 'plat.h')
-rw-r--r-- | plat.h | 23 |
1 files changed, 23 insertions, 0 deletions
@@ -29,6 +29,29 @@ void print_err(const char* fmt, ...); void print_war(const char* fmt, ...); void pbreak(Error code); +typedef struct File File; + +typedef enum { + file_flags_write = 1 << 0, + file_flags_read = 1 << 1, + file_flags_read_write = 1 << 2, + file_flags_create = 1 << 3 +} File_Flags; + +typedef enum { + file_whence_begin, + file_whence_end, + file_whence_cur +} File_Whence; + +File* file_open(const char* name, File_Flags flags); +void file_close(File* file); +void file_read(File* file, void* buffer, int size); +void file_write(File* file, const void* buffer, int size); +void file_seek(File* file, int offset, File_Whence whence); +int file_size(File* file); +int file_exists(const char* name); + typedef struct { int mpf; int fps; |