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

Record of all pixel modifications made to a single tile during mangling. More...

#include <anim_key_frame_mangler.hpp>

Collaboration diagram for porytiles::TileMangleRecord:
[legend]

Public Attributes

std::size_t tile_index {}
 Which tile in the key frame (0-based index, unique across records)
 
std::vector< PixelMangleChangepixel_changes
 One or more pixel modifications applied to this tile.
 

Friends

auto operator<=> (const TileMangleRecord &lhs, const TileMangleRecord &rhs)
 Orders records by tile_index, enabling storage in std::set to enforce the non-overlapping invariant.
 
bool operator== (const TileMangleRecord &lhs, const TileMangleRecord &rhs)
 

Detailed Description

Record of all pixel modifications made to a single tile during mangling.

When a tile is mangled to make it unique, this struct records the exact changes made: which tile was modified and which pixels were changed. This information is needed to backport the changes to the tiles.png image.

Each TileMangleRecord targets a distinct tile_index. No two records share the same tile_index. This invariant is guaranteed by mangle_duplicates, which visits each tile at most once. A record contains one or more pixel changes (single-pixel mangles are most common, but multi-pixel mangles are used as a fallback when single-pixel swaps are insufficient).

Definition at line 46 of file anim_key_frame_mangler.hpp.

Friends And Related Symbol Documentation

◆ operator<=>

auto operator<=> ( const TileMangleRecord lhs,
const TileMangleRecord rhs 
)
friend

Orders records by tile_index, enabling storage in std::set to enforce the non-overlapping invariant.

Definition at line 51 of file anim_key_frame_mangler.hpp.

◆ operator==

bool operator== ( const TileMangleRecord lhs,
const TileMangleRecord rhs 
)
friend

Definition at line 56 of file anim_key_frame_mangler.hpp.

Member Data Documentation

◆ pixel_changes

std::vector<PixelMangleChange> porytiles::TileMangleRecord::pixel_changes

One or more pixel modifications applied to this tile.

Definition at line 48 of file anim_key_frame_mangler.hpp.

◆ tile_index

std::size_t porytiles::TileMangleRecord::tile_index {}

Which tile in the key frame (0-based index, unique across records)

Definition at line 47 of file anim_key_frame_mangler.hpp.


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