#ifndef _UBOX_ASSETS_H #define _UBOX_ASSETS_H /* Simple asset manager supporting pak file (a ZIP file). * * 1. call ubox_assets_init using a directory name DIR * If a "DIR.pak" file exists, it will be opened and any call to read will * check on the pak file (unless the file exists in DIR, in which case it takes * priority). * 2. call ubox_assets_read to read assets; allocated memory MUST be freed with free. * 3. call ubox_assets_free to discard the DIR (and pak file if exists). */ uint8_t ubox_assets_init(const char *dirname); uint8_t ubox_assets_read(const char *name, char **data, size_t *data_size); void ubox_assets_free(); #endif /* _UBOX_ASSETS_H */