Rangi42 / tilemap-studio

A tilemap editor for Game Boy, Color, Advance, DS, and SNES projects. Written in C++ with FLTK.
https://hax.iimarckus.org/topic/7691/
Other
383 stars 30 forks source link

Proposal for indexed palette support #10

Open Rangi42 opened 4 years ago

Rangi42 commented 4 years ago

In the Image to Tiles dialog's Palette Format dropdown, add an Indexed choice. Then instead of outputting a grayscale tileset image and a separate palette file, it will output an indexed-color tileset image.

Edit: This has been implemented.

Rangi42 commented 4 years ago

Independently of indexed palette output is indexed palette input. Have a checkbox like "Use indexed palette from input image", which will attempt to use the palettes defined in the index. (Multiple palettes would just be sequential, e.g. in GBA format, palette 0 uses colors 0-15, palette 1 uses colors 16-31, etc. And in GBC, palette 0 uses colors 0-3, palette 1 uses colors 4-7, etc.) If a tile doesn't fit any palette (for instance, it's technically possibly for one tile to use unique colors from two palettes, because it's all one index), then warn about it just like with the "too many colors in tile (X, Y)" warnings.

Edit: A palette could also be inputted from a separate file (JASC, PAL, etc) although this would require parsing those file formats.

frozenLake commented 3 years ago

It also would be nice to be able to load a series of palettes from a binary file, that automatically switches display based on the palette number in cases like the GBA format.