initial commit

This commit is contained in:
asrael 2025-08-13 15:04:49 -05:00
commit c18896def0
No known key found for this signature in database
GPG key ID: 2786557804DFAE24
30 changed files with 4183 additions and 0 deletions

31
src/pxl8_io.h Normal file
View file

@ -0,0 +1,31 @@
#pragma once
#include <stdio.h>
#include <sys/stat.h>
#include <SDL3/SDL_stdinc.h>
#include "pxl8_types.h"
#ifdef __cplusplus
extern "C" {
#endif
pxl8_result pxl8_io_read_file(const char* path, char** content, size_t* size);
pxl8_result pxl8_io_write_file(const char* path, const char* content, size_t size);
pxl8_result pxl8_io_read_binary_file(const char* path, u8** data, size_t* size);
pxl8_result pxl8_io_write_binary_file(const char* path, const u8* data, size_t size);
bool pxl8_io_file_exists(const char* path);
f64 pxl8_io_get_file_modified_time(const char* path);
pxl8_result pxl8_io_create_directory(const char* path);
void pxl8_io_free_file_content(char* content);
void pxl8_io_free_binary_data(u8* data);
bool pxl8_key_down(const pxl8_input_state* input, i32 key);
bool pxl8_key_pressed(const pxl8_input_state* input, i32 key);
#ifdef __cplusplus
}
#endif