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
381 stars 30 forks source link

Feature request: loading palette files #68

Open logicplace opened 2 years ago

logicplace commented 2 years ago

When I use the Image to Tiles tool on a PNG to export either GBC format with (almost) any palette format, it exports the proper palette but doesn't load it into the tool for editing. It "works" for indexed mode, though the actual palette isn't correct (didn't check the export for it, tho). I also don't see any button for loading palettes manually but maybe I'm missing something.

I tried GBA mode and it seems to work fine there, unfortunately this work is for GBC.

It's not that it's unusable without the palette or anything, just a bit harder to differentiate which palette is in use for a tile when placing tiles (have to switch tabs and remember which is which).

tl;dr Expected: load palette from respective file in GBC modes; and/or manual palette load button Actual: no palette loaded, just uses grayscale/bold palette per setting (rainbow doesn't seem to do anything)

Rangi42 commented 2 years ago

There is no feature yet to read palettes. When you generate a palette to be indexed within the tileset PNG, it is all there, but the tiles will all use the first palette. This is based on how multi-palette PNGs in pokeemerald work, like https://github.com/pret/pokeemerald/blob/master/graphics/slot_machine/menu.png and https://github.com/pret/pokeemerald/blob/master/graphics/frontier_pass/bg.png. It's definitely a feature I'd like to add, but would require significant internal changes to work well.

logicplace commented 2 years ago

Since this is now a full feature request, one thing I'd like to add is that, I believe this tool will primarily be for hacking existing games, so it seems reasonable that when doing a Image to Tiles conversion one could restrict the palette to an existing one so that it doesn't change (and thus require you to find and change the palettes in the ROM when doing so is generally unnecessary).

The portions of that request which affect the actual conversion tool can be a separate ticket if you prefer, but I expect it ties into this request a bit, as well.

Rangi42 commented 2 years ago

Yes, #10 already discusses that as "indexed palette input" re: using the indexed palette of the mockup image for the tileset image. When/if I implement reading separate palette files for rendering the tilemap, it would make sense to allow them for inputting a palette too. (Note that [superfamiconv](https://github.com/ISSOtm/SuperFamiconvX can already do this as a command-line program. It also lets you specify a pre-existing tileset image, to just generate the tilemap.)

logicplace commented 2 years ago

Ahh that post makes a lot more sense now. And thanks for the tip!