#ifndef ASE_H #define ASE_H struct ase_error { struct string msg; struct ase_error *next; }; struct ase_error_list { u64 count; struct ase_error *first; struct ase_error *last; }; struct ase_slice { u32 start; i32 x1; i32 y1; i32 x2; i32 y2; struct ase_slice *next; }; struct ase_slice_key { struct string name; u32 num_slices; struct ase_slice *slice_head; struct ase_slice_key *next; }; struct ase_span { struct string name; u32 start; u32 end; struct ase_span *next; }; struct ase_frame { u32 index; u32 x1; u32 y1; u32 x2; u32 y2; f64 duration; struct ase_frame *next; }; struct ase_decode_image_result { struct image_rgba image; struct ase_error_list errors; }; struct ase_decode_sheet_result { struct v2 image_size; struct v2 frame_size; u32 num_frames; u32 num_spans; u32 num_slice_keys; struct ase_frame *frame_head; struct ase_span *span_head; struct ase_slice_key *slice_key_head; struct ase_error_list errors; }; struct ase_decode_image_result ase_decode_image(struct arena *arena, struct buffer encoded); struct ase_decode_sheet_result ase_decode_sheet(struct arena *arena, struct buffer encoded); #endif