All righty, so the first thing you'll want to do is grab the latest convimg from here:
https://github.com/mateoconlechuga/convimg/releases/latest
PT_ hasn't told me what the output for tilemaps should look like, so you have to store the tileset into an AppVar and use it from there. I'm sure there's some guide out there on this, but who knows.
Anyway, the convimg.yaml you would use to create this tileset appvar is shown below:
Code: palettes:
- name: global_palette
images: automatic
fixed-entries:
- color: {index: 0, r: 255, g: 255, b: 255}
- color: {index: 1, r: 0, g: 0, b: 0 }
converts:
- name: tileset
palette: global_palette
tilesets:
tile-width: 32
tile-height: 32
images:
- tileset.png
outputs:
- type: appvar
source-format: ice
name: tileset
header-string: MY_AWESOME_TILESET
palettes:
- global_palette
converts:
- tileset
When you run convimg on this file, you will get a tileset.8xv appvar. Note that it uses a custom palette; if you prefer to use the xlibc palette feel free; just remove the respective references in convimg.yaml. If you use the xlibc palette, the palette will not be stored in the appvar.
As for the location in the appvar where the images and palettes are; right now ICE format just places them in the order that they are defined. First, the header string "MY_AWESOME_TILESET" is found, followed directly by any palettes. Sprites are then found directly after the palettes. Each tile is a sprite that is (tile-width * tile-height + 2) bytes in size, and the tile sprite is mapped to the tileset by working from the top left to the bottom right of the input image.
Since the palette may be variable size, I might recommend using the convimg command prepend-palette-sizes so you can know the sizes of the palette from the appvar, or use the undocumented command output-first: converts in the appvar section to output the tiles first instead of the palette in the appvar. The first one is probably easier.
Let me know if you need any more help