Porytiles
Loading...
Searching...
No Matches
shape_group.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <cstddef>
4#include <map>
5#include <vector>
6
9
10namespace porytiles {
11
22template <typename PixelType>
24 std::size_t tile_index;
25
26 std::map<ShapeMask, PixelType> colors;
27
28 bool h_flip;
29
30 bool v_flip;
31};
32
47template <typename PixelType>
48struct ShapeGroup {
50
51 std::vector<ShapeGroupMember<PixelType>> members;
52};
53
54} // namespace porytiles
An 8x8 tile backed by mask-based storage that maps shape regions to pixel values.
A member of a ShapeGroup, representing one tile that shares a canonical shape with other members.
std::map< ShapeMask, PixelType > colors
A group of tiles that share the same canonical shape but have different color assignments.
std::vector< ShapeGroupMember< PixelType > > members
ShapeTile< PixelType > canonical_shape