pxl8/src/pxl8_cart.h

30 lines
729 B
C
Raw Normal View History

2025-09-27 11:03:36 -05:00
#pragma once
#include "pxl8_types.h"
typedef struct pxl8_cart {
void* archive_data;
size_t archive_size;
2025-09-28 13:10:29 -05:00
char* base_path;
2025-09-27 11:03:36 -05:00
bool is_folder;
bool is_mounted;
2025-09-28 13:10:29 -05:00
char* name;
2025-09-27 11:03:36 -05:00
} pxl8_cart;
#ifdef __cplusplus
extern "C" {
#endif
2025-09-28 13:10:29 -05:00
pxl8_cart* pxl8_cart_current(void);
bool pxl8_cart_file_exists(const pxl8_cart* cart, const char* path);
2025-09-27 11:03:36 -05:00
pxl8_result pxl8_cart_load(pxl8_cart* cart, const char* path);
pxl8_result pxl8_cart_mount(pxl8_cart* cart);
pxl8_result pxl8_cart_pack(const char* folder_path, const char* output_path);
2025-09-28 13:10:29 -05:00
char* pxl8_cart_resolve_path(const pxl8_cart* cart, const char* relative_path);
void pxl8_cart_unload(pxl8_cart* cart);
void pxl8_cart_unmount(pxl8_cart* cart);
2025-09-27 11:03:36 -05:00
#ifdef __cplusplus
}
#endif