|
Porytiles
|
Result from the high-level tile packing operation. More...
#include <palette_packer.hpp>
Public Member Functions | |
| PalettePacking ()=default | |
Public Attributes | |
| std::array< std::optional< Palette< Rgba32, pal::max_size > >, pal::num_pals > | pals_ |
| The final hardware palettes with colors assigned. | |
| std::map< std::size_t, std::size_t > | tile_to_pal_ |
| Maps regular tile ids to their assigned hardware palette indices. | |
Result from the high-level tile packing operation.
PalettePacking contains the final hardware palettes and the mapping from tile IDs to their assigned palette indices after a successful packing operation.
Definition at line 125 of file palette_packer.hpp.
|
default |
| std::array<std::optional<Palette<Rgba32, pal::max_size> >, pal::num_pals> porytiles::PalettePacking::pals_ |
The final hardware palettes with colors assigned.
Each palette is indexed by its hardware palette index (0, 1, 2, ...). A std::nullopt entry signifies that the palette packer performed no assignments for that palette index; the corresponding palette in the Porymap component will be left untouched. For populated palettes, slot 0 contains the transparency color (preserved from input or defaulted), remaining slots contain packed colors, and unfilled slots contain Rgba32{0, 0, 0}.
Definition at line 137 of file palette_packer.hpp.
| std::map<std::size_t, std::size_t> porytiles::PalettePacking::tile_to_pal_ |
Maps regular tile ids to their assigned hardware palette indices.
The key is the tile id (index). The value is the hardware palette index to which the tile was assigned.
Definition at line 145 of file palette_packer.hpp.