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_pal
 The palette index containing the color to be linked.
 
Rgba32 source_color
 The color in source_pal that should follow the reference.
 
std::size_t ref_pal
 The palette index containing the reference color.
 
Rgba32 ref_color
 The color in ref_pal 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_pal should occupy the same slot as ref_color in palette ref_pal." During palette construction, this translates to setting source_color's position to IndirectPosition{ref_pal, ref_color}. When resolved, both colors end up at the same slot index in their respective palettes, enabling tile sharing.

Invariant
source_pal != ref_pal (links always cross palette boundaries)

Definition at line 78 of file color_position.hpp.

Member Data Documentation

◆ ref_color

Rgba32 porytiles::IndirectLink::ref_color

The color in ref_pal whose slot position should be followed.

Definition at line 97 of file color_position.hpp.

◆ ref_pal

std::size_t porytiles::IndirectLink::ref_pal

The palette index containing the reference color.

Definition at line 92 of file color_position.hpp.

◆ source_color

Rgba32 porytiles::IndirectLink::source_color

The color in source_pal that should follow the reference.

Definition at line 87 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 102 of file color_position.hpp.

◆ source_pal

std::size_t porytiles::IndirectLink::source_pal

The palette index containing the color to be linked.

Definition at line 82 of file color_position.hpp.


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