NasNas
An intuitive and beginner friendly 2D game framework for C++
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | List of all members
ns::tm::Tile Struct Reference

Public Types

enum  Flip : std::uint8_t {
  None = 0x0, HorizontalFlip = 0x8, VerticalFlip = 0x4, DiagonalFlip = 0x2,
  Rotation90 = HorizontalFlip | DiagonalFlip, Rotation180 = HorizontalFlip | VerticalFlip, Rotation270 = VerticalFlip | DiagonalFlip
}
 

Public Member Functions

 Tile (const TileData &tiledata, const TilesetData &tilesetdata, std::uint32_t tilegid, int posx, int posy, Flip tileflip=Flip::None)
 
auto getTileTexCoo () const -> std::vector< sf::Vector2f >
 
auto getTileTextureRect () const -> ns::FloatRect
 

Static Public Member Functions

static auto getFlipFromGid (std::uint32_t gid) -> Flip
 

Public Attributes

const TileDatadata
 
const TilesetDatatileset
 
const std::uint32_t gid
 
const int x
 
const int y
 
const Flip flip
 

Static Public Attributes

static std::optional< TileNone
 
static std::uint32_t gidmask
 

Detailed Description

Definition at line 32 of file Tile.hpp.


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