Porytiles
Loading...
Searching...
No Matches
porytiles::PackingParams Struct Reference

The input parameters for a packing operation. More...

#include <palette_packer.hpp>

Collaboration diagram for porytiles::PackingParams:
[legend]

Classes

struct  PrimaryTileRef
 A reconstructed RGBA tile from a compiled primary tileset, tagged with its first metatile slot location. More...
 

Public Attributes

std::vector< PixelTile< Rgba32 > > tiles_
 Raw pixel tiles to pack into palettes.
 
std::map< std::string, Animation< Rgba32 > > anims_
 RGBA animations to pack into palettes.
 
ColorIndexMap< Rgba32color_map_
 Bidirectional mapping between Rgba32 colors and ColorIndex.
 
Rgba32 extrinsic_transparency_
 The extrinsic transparency color (e.g., rgba_magenta)
 
std::array< std::optional< Palette< Rgba32, pal::max_size > >, pal::num_palsprefilled_pals_
 Existing palettes with locked and wildcarded colors (from PorytilesTilesetComponent)
 
std::vector< PaletteHinthints_
 Priority tiles that guide packing (e.g., ensure certain colors group together)
 
std::bitset< pal::num_palsavailable_pals_
 Bitset specifying which hardware palettes are available for packing.
 
std::vector< PrimaryTileRefprimary_tiles_
 Reconstructed RGBA tiles from a compiled primary tileset for cross-tileset shape group analysis.
 
ConfigValue< TileSharingPackingtile_sharing_packing_
 Controls whether the packer considers shape group membership during packing.
 
ConfigValue< TileSharingAlignmenttile_sharing_alignment_
 Controls palette slot alignment strategy for tile sharing deduplication.
 

Detailed Description

The input parameters for a packing operation.

Definition at line 33 of file palette_packer.hpp.

Member Data Documentation

◆ anims_

std::map<std::string, Animation<Rgba32> > porytiles::PackingParams::anims_

RGBA animations to pack into palettes.

Definition at line 42 of file palette_packer.hpp.

◆ available_pals_

std::bitset<pal::num_pals> porytiles::PackingParams::available_pals_

Bitset specifying which hardware palettes are available for packing.

Definition at line 67 of file palette_packer.hpp.

◆ color_map_

ColorIndexMap<Rgba32> porytiles::PackingParams::color_map_

Bidirectional mapping between Rgba32 colors and ColorIndex.

Definition at line 47 of file palette_packer.hpp.

◆ extrinsic_transparency_

Rgba32 porytiles::PackingParams::extrinsic_transparency_

The extrinsic transparency color (e.g., rgba_magenta)

Definition at line 52 of file palette_packer.hpp.

◆ hints_

std::vector<PaletteHint> porytiles::PackingParams::hints_

Priority tiles that guide packing (e.g., ensure certain colors group together)

Definition at line 62 of file palette_packer.hpp.

◆ prefilled_pals_

std::array<std::optional<Palette<Rgba32, pal::max_size> >, pal::num_pals> porytiles::PackingParams::prefilled_pals_

Existing palettes with locked and wildcarded colors (from PorytilesTilesetComponent)

Definition at line 57 of file palette_packer.hpp.

◆ primary_tiles_

std::vector<PrimaryTileRef> porytiles::PackingParams::primary_tiles_

Reconstructed RGBA tiles from a compiled primary tileset for cross-tileset shape group analysis.

Each entry is a PrimaryTileRef describing a decoded pixel tile and its first metatile slot. These tiles participate in shape group analysis to detect cross-tileset sharing opportunities, but are never packed by the packer (their palette assignments are fixed). Empty for primary compilation or standalone secondary compilation without a paired primary.

Definition at line 95 of file palette_packer.hpp.

◆ tile_sharing_alignment_

ConfigValue<TileSharingAlignment> porytiles::PackingParams::tile_sharing_alignment_

Controls palette slot alignment strategy for tile sharing deduplication.

When set to greedy, indirect links align palette slot indices for color-isomorphic tiles. When off (default), palettes are filled sequentially with no sharing alignment. Wrapped in ConfigValue to carry source information for diagnostic caveat messages.

Definition at line 115 of file palette_packer.hpp.

◆ tile_sharing_packing_

ConfigValue<TileSharingPacking> porytiles::PackingParams::tile_sharing_packing_

Controls whether the packer considers shape group membership during packing.

When set to biased, a soft cost penalty steers shape group siblings toward different palettes. When off (default), the packer ignores shape groups entirely. Wrapped in ConfigValue to carry source information for diagnostic caveat messages.

Definition at line 105 of file palette_packer.hpp.

◆ tiles_

std::vector<PixelTile<Rgba32> > porytiles::PackingParams::tiles_

Raw pixel tiles to pack into palettes.

Definition at line 37 of file palette_packer.hpp.


The documentation for this struct was generated from the following file: