53 lines
2.4 KiB
Markdown
53 lines
2.4 KiB
Markdown
# 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 |
|
|
| ... | |
|
|
| ... | |
|