|
Porytiles
|
Input data aggregate for the low-level palette packing algorithm. More...
#include <packing_strategy.hpp>
Public Attributes | |
| std::vector< PackableTile > | tiles_ {} |
| Regular tiles to pack into palettes. | |
| std::vector< PackableTile > | hints_ {} |
| Priority "hint" tiles that can be assigned before regular tiles. | |
| std::set< PrefilledPalette > | prefilled_pals_ {} |
| Pre-assigned palettes with fixed colors. | |
| PalettePool | pal_pool_ |
| A bitset marking which palettes are available for editing. | |
| std::size_t | pal_capacity_ = pal::max_size - 1 |
| Maximum number of colors per palette. | |
| std::optional< ShapeGroupMetadata > | shape_group_metadata_ {} |
| Optional shape group metadata for sharing-aware packing. | |
Input data aggregate for the low-level palette packing algorithm.
Definition at line 21 of file packing_strategy.hpp.
| std::vector<PackableTile> porytiles::PackingInput::hints_ {} |
Priority "hint" tiles that can be assigned before regular tiles.
Hints can optionally be processed first by the packing algorithm. This allows users to ensure certain colors group together during packing.
Definition at line 34 of file packing_strategy.hpp.
| std::size_t porytiles::PackingInput::pal_capacity_ = pal::max_size - 1 |
Maximum number of colors per palette.
GBA hardware palettes have 16 slots, but slot 0 is transparency, leaving 15 usable color slots. Default is 15.
Definition at line 65 of file packing_strategy.hpp.
| PalettePool porytiles::PackingInput::pal_pool_ |
A bitset marking which palettes are available for editing.
For primary tilesets, typically the first six bits (bits 0 through 5) should be set. For secondary tilesets, this is typically bits 0 through 12, with the first six palettes fully locked as PrefilledPalettes.
In some configurations, out-of-band palettes may be enabled for packing. This corresponds to the "Primary Palette Fixing" case (see topic_staging_area.md), a technique used in the community to expand available primary tileset colors without modifying fieldmap parameters.
Definition at line 57 of file packing_strategy.hpp.
| std::set<PrefilledPalette> porytiles::PackingInput::prefilled_pals_ {} |
Pre-assigned palettes with fixed colors.
These palettes represent hardware palettes that already have some colors assigned. The packer must work around these constraints when assigning tiles.
Definition at line 43 of file packing_strategy.hpp.
| std::optional<ShapeGroupMetadata> porytiles::PackingInput::shape_group_metadata_ {} |
Optional shape group metadata for sharing-aware packing.
When present, strategies should prefer placing shape group siblings in different palettes to maximize tile sharing opportunities. Each strategy applies sharing awareness differently:
When std::nullopt, strategy behavior is identical to non-sharing-aware packing.
Definition at line 78 of file packing_strategy.hpp.
| std::vector<PackableTile> porytiles::PackingInput::tiles_ {} |
Regular tiles to pack into palettes.
Definition at line 25 of file packing_strategy.hpp.