#ifndef pack_h #define pack_h #include struct Arena; struct Pack_File; typedef struct { char name[56]; uint32_t offset; uint32_t size; } Pack_Entry; typedef struct Pack { char* filename; uint32_t file_count; } Pack; Pack_Entry* pack_find_entry(Pack* p, const char* name); Pack_Entry* get_pack_table(Pack* p); int get_pack_size(int entry_count); Pack* pack_open(const char* filename, struct Arena* a); void pack_close(Pack* p); Pack_Entry* pack_get_entry(Pack* p, const char* name); typedef enum { seek_rel_cur, seek_rel_start, seek_rel_end } Seek_Rel; struct Pack_File* pack_open_file(Pack* p, const char* name); void pack_close_file(struct Pack_File* h); int pack_read(struct Pack_File* f, void* buf, int size); void pack_seek(struct Pack_File* f, int offset, Seek_Rel rel); int pack_tell(struct Pack_File* f); #endif