2025-09-27 11:03:36 -05:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include "pxl8_types.h"
|
|
|
|
|
|
2025-10-04 04:13:48 -05:00
|
|
|
typedef struct pxl8_cart pxl8_cart;
|
2025-09-27 11:03:36 -05:00
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
|
extern "C" {
|
|
|
|
|
#endif
|
|
|
|
|
|
2025-10-04 04:13:48 -05:00
|
|
|
pxl8_cart* pxl8_cart_create(void);
|
2025-09-28 13:10:29 -05:00
|
|
|
pxl8_cart* pxl8_cart_current(void);
|
2025-10-04 04:13:48 -05:00
|
|
|
void pxl8_cart_destroy(pxl8_cart* cart);
|
2025-11-28 23:42:57 -06:00
|
|
|
|
|
|
|
|
pxl8_result pxl8_cart_bundle(const char* input_path, const char* output_path, const char* exe_path);
|
2025-09-27 11:03:36 -05:00
|
|
|
pxl8_result pxl8_cart_pack(const char* folder_path, const char* output_path);
|
2025-11-28 23:42:57 -06:00
|
|
|
|
|
|
|
|
pxl8_result pxl8_cart_load(pxl8_cart* cart, const char* path);
|
|
|
|
|
pxl8_result pxl8_cart_load_embedded(pxl8_cart* cart, const char* exe_path);
|
2025-09-28 13:10:29 -05:00
|
|
|
void pxl8_cart_unload(pxl8_cart* cart);
|
2025-11-28 23:42:57 -06:00
|
|
|
pxl8_result pxl8_cart_mount(pxl8_cart* cart);
|
2025-09-28 13:10:29 -05:00
|
|
|
void pxl8_cart_unmount(pxl8_cart* cart);
|
2025-09-27 11:03:36 -05:00
|
|
|
|
2025-11-28 23:42:57 -06:00
|
|
|
const char* pxl8_cart_get_base_path(const pxl8_cart* cart);
|
2025-12-06 15:04:53 -06:00
|
|
|
const char* pxl8_cart_get_title(const pxl8_cart* cart);
|
|
|
|
|
pxl8_resolution pxl8_cart_get_resolution(const pxl8_cart* cart);
|
|
|
|
|
pxl8_size pxl8_cart_get_window_size(const pxl8_cart* cart);
|
|
|
|
|
pxl8_pixel_mode pxl8_cart_get_pixel_mode(const pxl8_cart* cart);
|
|
|
|
|
void pxl8_cart_set_title(pxl8_cart* cart, const char* title);
|
|
|
|
|
void pxl8_cart_set_resolution(pxl8_cart* cart, pxl8_resolution resolution);
|
|
|
|
|
void pxl8_cart_set_window_size(pxl8_cart* cart, pxl8_size size);
|
|
|
|
|
void pxl8_cart_set_pixel_mode(pxl8_cart* cart, pxl8_pixel_mode mode);
|
2025-11-28 23:42:57 -06:00
|
|
|
bool pxl8_cart_is_packed(const pxl8_cart* cart);
|
|
|
|
|
bool pxl8_cart_has_embedded(const char* exe_path);
|
|
|
|
|
|
|
|
|
|
bool pxl8_cart_file_exists(const pxl8_cart* cart, const char* path);
|
|
|
|
|
bool pxl8_cart_resolve_path(const pxl8_cart* cart, const char* relative_path, char* out_path, size_t out_size);
|
|
|
|
|
pxl8_result pxl8_cart_read_file(const pxl8_cart* cart, const char* path, u8** data_out, u32* size_out);
|
|
|
|
|
void pxl8_cart_free_file(u8* data);
|
|
|
|
|
|
2025-09-27 11:03:36 -05:00
|
|
|
#ifdef __cplusplus
|
|
|
|
|
}
|
|
|
|
|
#endif
|