-
Notifications
You must be signed in to change notification settings - Fork 28
DataTypes
-
Classes
-
Structs
-
Enums
-
Types
A string that contains file path information.
ldtk::FilePath::FilePath()Default constructor. Constructs an empty FilePath.
ldtk::FilePath::FilePath(const std::string&)Construct a FilePath from a valid provided string.
ldtk::FilePath::directory() const -> std::stringReturns the path to the directory containing the file.
ldtk::FilePath::filename() const -> std::stringReturns the filename (including the extension) of the FilePath.
ldtk::FilePath::extension() const -> std::stringReturns only the extension of the file (e.g. png, json, txt ...).
Represents a two dimentional coordinate.
T can be one of the following types: float, int or unsigned int.
Aliases:
-
ldtk::FloatPoint=ldtk::Point<float> -
ldtk::IntPoint=ldtk::Point<int> -
ldtk::UIntPoint=ldtk::Point<unsigned int>
T ldtk::Point<T>::xX coordinate of the Point.
T ldtk::Point<T>::yY coordinate of the Point.
Represents an axis aligned rectangle.
T can be one of the following types: float or int.
Aliases:
-
ldtk::FloatRect=ldtk::Rect<float> -
ldtk::IntRect=ldtk::Rect<int>
T ldtk::Rect<T>::xX coordinate of the top left corner of the Rect.
T ldtk::Rect<T>::yY coordinate of the top left corner of the Rect.
T ldtk::Rect<T>::widthWidth of the Rect.
T ldtk::Rect<T>::heightHeight of the Rect.
Represents a color value in the 32 bits RGBA format.
std::uint8_t ldtk::Color::rRed component of the Color.
std::uint8_t ldtk::Color::gGreen component of the Color.
std::uint8_t ldtk::Color::nBlue component of the Color.
std::uint8_t ldtk::Color::aAlpha component of the Color (opacity).
Represents a reference to an Entity.
ldtk::EntityRef::operator->() const -> const ldtk::Entity*Returns a pointer to the Entity referenced by the EntityRef.
This operator allows to access the Entity reference like this:
entity_ref->getName(); // returns the name of the referenced EntityRepresents a rectangle of one or multiple tiles. Used in TileField.
const IntRect ldtk::TileRect::boundsldtk::TileRect::getTileset() const -> const Tileset&Returns the Tileset to which the tile belongs.
Represents the dimensions of the 9-slice tile render.
int ldtk::NineSliceBorders::topint ldtk::NineSliceBorders::rightint ldtk::NineSliceBorders::bottomint ldtk::NineSliceBorders::leftRepresents the grid values that can be painted on an IntGrid layer.
const int ldtk::IntGridValue::valueconst std::string ldtk::IntGridValue::nameconst ldtk::Color ldtk::IntGridValue::colorRepresents a vertex composed of a position and a texture coordinate.
The graphic representation of a Tile is composed of 4 vertices.
const ldtk::FloatPoint ldtk::Vertex::posCoordinate of the vertex in pixels, relative to the Level.
const ldtk::IntPoint ldtk::Vertex::texTexture coordinate of the vertex, in pixels.
Contains enum values representing all the possible types of World layouts.
WorldLayout::FreeWorldLayout::GridVaniaWorldLayout::LinearHorizontalWorldLayout::LinearVertical
Contains enum values representing all the possible types of Layers.
LayerType::IntGridLayerType::EntitiesLayerType::TilesLayerType::AutoLayer
Contains enum values representing all the possible types of a Field.
These enum values can be used to get a field from an Entity. For example:
const auto& field_value = entity.getField<ldtk::FieldType::ArrayEntityRef>();
// The type of field_value is ldtk::ArrayField<ldtk::EntityRef>FieldType::IntFieldType::FloatFieldType::BoolFieldType::StringFieldType::ColorFieldType::PointFieldType::EnumFieldType::FilePathFieldType::TileFieldType::EntityRefFieldType::ArrayIntFieldType::ArrayFloatFieldType::ArrayBoolFieldType::ArrayStringFieldType::ArrayColorFieldType::ArrayPointFieldType::ArrayEnumFieldType::ArrayFilePathFieldType::ArrayTileFieldType::ArrayEntityRef
Contains enum values representing all the possible Directions of Level neighbours.
It is used by ldtk::Level::getNeighbours(const ldtk::Dir&) and returned by
ldtk::getNeighbourDirection(const Level&).
Dir::NoneDir::NorthDir::NorthEastDir::EastDir::SouthEastDir::SouthDir::SouthWestDir::WestDir::NorthWest
using ldtk::FileLoader = std::function<std::unique_ptr<std::streambuf>(const std::string&)>FileLoader is the type of a function that takes the path of a file as parameter and returns a unique pointer to a standard stream buffer for that file.
This allows to load a Project from a custom source stream (e.g. from a virtual filesystem).