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
20template <typename PixelType>
22 std::size_t tile_index;
23
24 std::map<ShapeMask, PixelType> colors;
25
26 bool h_flip;
27
28 bool v_flip;
29};
30
43template <typename PixelType>
44struct ShapeGroup {
46
47 std::vector<ShapeGroupMember<PixelType>> members;
48};
49
50} // 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