17 #ifndef HEADER_SUPERTUX_SUPERTUX_AUTOTILE_HPP 18 #define HEADER_SUPERTUX_SUPERTUX_AUTOTILE_HPP 31 bool matches(uint8_t mask,
bool center)
const;
33 uint8_t get_mask()
const {
return m_mask; }
44 const std::vector<std::pair<uint32_t, float>>& alt_tiles,
45 const std::vector<AutotileMask>& masks,
48 bool matches(uint8_t mask,
bool center)
const;
54 uint32_t pick_tile(
int x,
int y)
const;
57 bool is_amongst(uint32_t tile)
const;
60 uint8_t get_first_mask()
const;
63 const std::vector<std::pair<uint32_t, float>>&
get_all_tile_ids()
const {
return m_alt_tiles; }
70 std::vector<std::pair<uint32_t, float>> m_alt_tiles;
71 std::vector<AutotileMask> m_masks;
86 AutotileSet(
const std::vector<Autotile*>& autotiles, uint32_t default_tile,
const std::string& name,
bool corner);
93 uint32_t get_autotile(uint32_t tile_id,
94 bool top_left,
bool top,
bool top_right,
95 bool left,
bool center,
bool right,
96 bool bottom_left,
bool bottom,
bool bottom_right,
104 bool is_member(uint32_t tile_id)
const;
107 bool is_solid(uint32_t tile_id)
const;
115 uint8_t get_mask_from_tile(uint32_t tile)
const;
119 void validate()
const;
122 static std::vector<std::unique_ptr<AutotileSet>> m_autotilesets;
125 std::vector<Autotile*> m_autotiles;
uint32_t get_default_tile() const
Returns the id of the first block in the autotileset.
Definition: autotile.hpp:101
Definition: autotile.hpp:40
bool is_solid() const
Returns true if the "center" bool of masks are true.
Definition: autotile.hpp:66
bool is_corner() const
true if this is a corner-based autotileset
Definition: autotile.hpp:110
uint32_t get_tile_id() const
Definition: autotile.hpp:51
Definition: autotile.hpp:26
const std::vector< std::pair< uint32_t, float > > & get_all_tile_ids() const
Returns all possible tiles for this autotile.
Definition: autotile.hpp:63
Definition: autotile.hpp:79