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

Position state for a color whose slot is determined by another color in another palette. More...

#include <color_position.hpp>

Collaboration diagram for porytiles::IndirectPosition:
[legend]

Public Attributes

std::size_t ref_pal_index
 
Rgba32 ref_color
 
std::size_t source_group_index
 

Detailed Description

Position state for a color whose slot is determined by another color in another palette.

IndirectPosition says "my slot is wherever @c ref_color ends up in palette @c ref_pal_index." This is the key insight from borytiles by ishax-kos (https://github.com/ishax-kos/borytiles): by referencing colors rather than absolute slots, links remain valid even when sequential fill places non-shared colors at different positions than the base palettes. Corresponds to the Indirect(Palette_index,Color_index) variant of borytiles' Position_in_palette enum.

Indirect chains are resolved after sequential fill by following ref_pal_index / ref_color until hitting an AbsolutePosition. Cycle detection caps resolution at pal::num_pals iterations.

Definition at line 49 of file color_position.hpp.

Member Data Documentation

◆ ref_color

Rgba32 porytiles::IndirectPosition::ref_color

Definition at line 51 of file color_position.hpp.

◆ ref_pal_index

std::size_t porytiles::IndirectPosition::ref_pal_index

Definition at line 50 of file color_position.hpp.

◆ source_group_index

std::size_t porytiles::IndirectPosition::source_group_index

Definition at line 52 of file color_position.hpp.


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