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

Instruction linking a source color to a reference color in another palette. More...

#include <color_position.hpp>

Collaboration diagram for porytiles::IndirectLink:
[legend]

Public Attributes

std::size_t source_palette
 The palette index containing the color to be linked.
 
Rgba32 source_color
 The color in source_palette that should follow the reference.
 
std::size_t ref_palette
 The palette index containing the reference color.
 
Rgba32 ref_color
 The color in ref_palette whose slot position should be followed.
 
std::size_t source_group_index
 The shape group index that generated this link (for diagnostic tracing).
 

Detailed Description

Instruction linking a source color to a reference color in another palette.

An IndirectLink says: "source_color in palette source_palette should occupy the same slot as ref_color in palette ref_palette." During palette construction, this translates to setting source_color's position to IndirectPosition{ref_palette, ref_color}. When resolved, both colors end up at the same slot index in their respective palettes, enabling tile sharing.

Invariant
source_palette != ref_palette (links always cross palette boundaries)

Definition at line 68 of file color_position.hpp.

Member Data Documentation

◆ ref_color

Rgba32 porytiles::IndirectLink::ref_color

The color in ref_palette whose slot position should be followed.

Definition at line 79 of file color_position.hpp.

◆ ref_palette

std::size_t porytiles::IndirectLink::ref_palette

The palette index containing the reference color.

Definition at line 76 of file color_position.hpp.

◆ source_color

Rgba32 porytiles::IndirectLink::source_color

The color in source_palette that should follow the reference.

Definition at line 73 of file color_position.hpp.

◆ source_group_index

std::size_t porytiles::IndirectLink::source_group_index

The shape group index that generated this link (for diagnostic tracing).

Definition at line 82 of file color_position.hpp.

◆ source_palette

std::size_t porytiles::IndirectLink::source_palette

The palette index containing the color to be linked.

Definition at line 70 of file color_position.hpp.


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