2D_Engine_C/assets/asset_builder
Ulysse Cura ae3e040fac Moved to uint32_t for asset file and corrected memory allocations form and errors. 2026-08-15 14:21:10 +02:00
..
src Moved to uint32_t for asset file and corrected memory allocations form and errors. 2026-08-15 14:21:10 +02:00
README.md Moved to uint32_t for asset file and corrected memory allocations form and errors. 2026-08-15 14:21:10 +02:00

README.md

Asset file structure

Description Length
Assets number unsigned int (32 bits)
...
Asset name const char * (variable length)
Asset start index unsigned int (32 bits)
...
Asset data depend on assets content and number

Image (.png)

Convert RGBA to RGB with #FF00FF as the transparent color. If alpha null then the color of the pixel will be replaced with this.

Image data is in RGB 565.

Image asset data structure

Description Length
Image width unsigned int (32 bits)
Image height unsigned int (32 bits)
Image data depend on image size, pixel short (16 bits)

Maps (.map)

Maps asset data structure

Description Length
Map width int (32 bits)
Map height int (32 bits)
Map background layer 1 data depend on map size, tile short (16 bit)
Map background layer 2 data depend on map size, tile short (16 bit)
Map background layer 3 data depend on map size, tile short (16 bit)
Map foreground layer data depend on map size, tile short (16 bit)
Entities number int (32 bits)
...
Entity ID int (32 bits)
Entity component number int (32 bits)
...
Component type int (32 bits)
...
Component attributes depend on attribute type
...
...