Class TCastleTiledMapData
Unit
Declaration
type TCastleTiledMapData = class(TObject)
Description
Loading and manipulating "Tiled" map files (http://mapeditor.org).
Hierarchy
- TObject
- TCastleTiledMapData
Overview
Nested Classes and Records
TAnimation = class(specialize TObjectList<TFrame>) |
|
TData = class(TObject) |
|
TFrame = class(TObject) |
|
TImage = class(TObject) |
|
TImageLayer = class(TLayer) |
|
TLayer = class(TObject) |
|
TObjectGroupLayer = class(TLayer) |
|
TProperty = class(TObject) |
|
TPropertyList = class(specialize TObjectList<TProperty>) |
|
TTerrain = class(TObject) |
|
TTile = class(TObject) |
|
TTiledObject = class(TObject) |
|
TTileset = class(TObject) |
Nested Types
TCompressionType = (...); |
|
TEncodingType = (...); |
|
TLayerList = specialize TObjectList<TLayer>; |
|
TMapOrientation = (...); |
|
TMapRenderOrder = (...); |
|
TObjectsDrawOrder = (...); |
|
TStaggerAxis = (...); |
|
TStaggerIndex = (...); |
|
TTerrainTypes = specialize TObjectList<TTerrain>; |
|
TTiledObjectList = specialize TObjectList<TTiledObject>; |
|
TTiledObjectPrimitive = (...); |
|
TTileList = specialize TObjectList<TTile>; |
|
TTilesetList = specialize TObjectList<TTileset>; |
Methods
constructor Create(const Stream: TStream; const ABaseUrl: String); overload; |
|
constructor Create(const AUrl: String); overload; |
|
destructor Destroy; override; |
|
function TilePositionValid(const TilePosition: TVector2Integer): Boolean; |
|
function PositionToTile(const Position: TVector2; out TilePosition: TVector2Integer): Boolean; |
|
function TileRenderPosition(const TilePosition: TVector2Integer): TVector2; |
|
function TileRenderData(const TilePosition: TVector2Integer; const Layer: TLayer; out Tileset: TTileset; out Frame: Integer; out HorizontalFlip, VerticalFlip, DiagonalFlip: Boolean): Boolean; |
|
function TileNeighbor(const Tile1, Tile2: TVector2Integer; const CornersAreNeighbors: Boolean): Boolean; |
Properties
property Layers: TLayerList read FLayers; |
|
property Orientation: TMapOrientation read FOrientation; |
|
property Properties: TPropertyList read FProperties; |
|
property Tilesets: TTilesetList read FTilesets; |
|
property Width: Cardinal read FWidth; |
|
property Height: Cardinal read FHeight; |
|
property TileWidth: Cardinal read FTileWidth; |
|
property TileHeight: Cardinal read FTileHeight; |
|
property HexSideLength: Cardinal read FHexSideLength; |
|
property StaggerAxis: TStaggerAxis read FStaggerAxis; |
|
property StaggerIndex: TStaggerIndex read FStaggerIndex; |
|
property BackgroundColor: TCastleColor read FBackgroundColor; |
|
property RenderOrder: TMapRenderOrder read FRenderOrder; |
Description
Nested Types
TCompressionType = (...); |
|
This item has no description. Values
|
TEncodingType = (...); |
|
This item has no description. Values
|
TLayerList = specialize TObjectList<TLayer>; |
|
List of layers. |
TMapOrientation = (...); |
|
This item has no description. Values
|
TMapRenderOrder = (...); |
|
This item has no description. Values
|
TObjectsDrawOrder = (...); |
|
This item has no description. Values
|
TStaggerAxis = (...); |
|
This item has no description. Values
|
TStaggerIndex = (...); |
|
This item has no description. Values
|
TTerrainTypes = specialize TObjectList<TTerrain>; |
|
This element defines an array of terrain types, which can be referenced from the terrain attribute of the tile element. |
TTiledObjectList = specialize TObjectList<TTiledObject>; |
|
This item has no description. |
TTiledObjectPrimitive = (...); |
|
This item has no description. Values
|
TTileList = specialize TObjectList<TTile>; |
|
Tiles list. |
TTilesetList = specialize TObjectList<TTileset>; |
|
List of tilesets. |
Methods
constructor Create(const Stream: TStream; const ABaseUrl: String); overload; |
|
Constructor. Parameters
|
constructor Create(const AUrl: String); overload; |
|
This item has no description. |
destructor Destroy; override; |
|
This item has no description. |
function TilePositionValid(const TilePosition: TVector2Integer): Boolean; |
|
Is the given tile number valid. Valid map tiles are from (0, 0) (lower-left) to (Width - 1, Height - 1) (upper-right). |
function PositionToTile(const Position: TVector2; out TilePosition: TVector2Integer): Boolean; |
|
Detect tile under given position. Input Position is in local map coordinates. Output TilePosition must is a tile coordinate, where map bottom-left corner is (0, 0). This method returns Note: Regardless of the result ( |
function TileRenderPosition(const TilePosition: TVector2Integer): TVector2; |
|
Left-bottom corner where the given tile should be rendered. |
function TileRenderData(const TilePosition: TVector2Integer; const Layer: TLayer; out Tileset: TTileset; out Frame: Integer; out HorizontalFlip, VerticalFlip, DiagonalFlip: Boolean): Boolean; |
|
Information about which image (and how) should be displayed at given map position. |
function TileNeighbor(const Tile1, Tile2: TVector2Integer; const CornersAreNeighbors: Boolean): Boolean; |
|
Are the two given tiles neighbors. Takes into account map Orientation, so it works for hexagonal, orthogonal etc. maps. |
Properties
property Layers: TLayerList read FLayers; |
|
This item has no description. |
property Orientation: TMapOrientation read FOrientation; |
|
Map orientation. |
property Properties: TPropertyList read FProperties; |
|
This item has no description. |
property Tilesets: TTilesetList read FTilesets; |
|
This item has no description. |
property Width: Cardinal read FWidth; |
|
The map width in tiles. |
property Height: Cardinal read FHeight; |
|
The map height in tiles. |
property TileWidth: Cardinal read FTileWidth; |
|
The width of a tile. |
property TileHeight: Cardinal read FTileHeight; |
|
The height of a tile. |
property HexSideLength: Cardinal read FHexSideLength; |
|
The height of a hexagon side. Only relevant when Orientation = moHexagonal. |
property StaggerAxis: TStaggerAxis read FStaggerAxis; |
|
Only relevant when Orientation = moIsometricStaggered or moHexagonal. |
property StaggerIndex: TStaggerIndex read FStaggerIndex; |
|
Which rows are shifted by 1. Only relevant when Orientation = moIsometricStaggered or moHexagonal. |
property BackgroundColor: TCastleColor read FBackgroundColor; |
|
Background color of the map. It may be unset in Tiled, which results in transparent color here. |
property RenderOrder: TMapRenderOrder read FRenderOrder; |
|
The order in which tiles on tile layers are rendered. Valid values are right-down (the default), right-up, left-down and left-up. In all cases, the map is drawn row-by-row. (since 0.10, but only supported for orthogonal maps at the moment) |
Generated by PasDoc 0.16.0-snapshot.