10 #include <SFML/System/Vector2.hpp> 12 #include <NasNas/core/data/Rect.hpp> 13 #include <NasNas/tilemapping/PropertiesContainer.hpp> 24 void fill(
const pugi::xml_node& xml_node);
26 explicit TileData(std::uint32_t tile_id);
27 const std::uint32_t id;
29 std::vector<AnimFrame> animframes;
33 enum class Flip : std::uint8_t {
38 Rotation90 = HorizontalFlip | DiagonalFlip,
39 Rotation180 = HorizontalFlip | VerticalFlip,
40 Rotation270 = VerticalFlip | DiagonalFlip
42 static std::optional<Tile> None;
43 static std::uint32_t gidmask;
44 static inline auto getFlipFromGid(std::uint32_t gid) -> Flip {
45 return static_cast<Flip
>((gid & ~
Tile::gidmask) >> 28u);
48 Tile(
const TileData& tiledata,
const TilesetData& tilesetdata, std::uint32_t tilegid,
int posx,
int posy, Flip tileflip=Flip::None);
49 auto getTileTexCoo()
const -> std::vector<sf::Vector2f>;
53 const std::uint32_t gid;
59 auto operator&(Tile::Flip lhs, Tile::Flip rhs) -> Tile::Flip;
60 auto operator==(
const std::optional<Tile>& lhs,
const std::optional<Tile>& rhs) -> bool;
61 auto operator!=(
const std::optional<Tile>& lhs,
const std::optional<Tile>& rhs) -> bool;