Skip to content

Pure C exporter

Output

Packrat writes a C99-compatible header and one image per atlas page:

text
atlas.h
atlas.png

The header provides static frame arrays, image filenames, atlas page dimensions, original frame size, trim offsets, and animation indices. It does not load images or provide a renderer.

Integrate

Include the header in your own C loader. Load the image named by packrat_sheet_N_image, select a PackratFrame, and sample its packed rectangle on the atlas page. Apply offset_x/offset_y relative to the original frame dimensions when drawing trimmed frames.

Packrat documentation