35 #include "Portability.h" 41 #ifndef DOXYGEN_SHOULD_SKIP_THIS 113 void addStringProperty(std::string name, std::string value);
121 void addIntProperty(std::string name,
int value);
129 void addFloatProperty(std::string name,
double value);
137 void addBoolProperty(std::string name,
bool value);
145 void addColorProperty(std::string name,
Color4u value);
153 void addFileProperty(std::string name,
Path value);
162 std::string getStringProperty(
const std::string& name,
const std::string& def)
const;
171 int getIntProperty(
const std::string& name,
int def)
const;
180 double getFloatProperty(
const std::string& name,
double def)
const;
189 bool getBoolProperty(
const std::string& name,
bool def)
const;
198 Color4u getColorProperty(
const std::string& name,
const Color4u& def)
const;
207 Path getFileProperty(
const std::string& name,
const Path& def)
const;
210 std::map<std::string, std::string> m_stringProps;
211 std::map<std::string, int> m_intProps;
212 std::map<std::string, double> m_floatProps;
213 std::map<std::string, bool> m_boolProps;
214 std::map<std::string, Color4u> m_colorProps;
215 std::map<std::string, Path> m_fileProps;
470 std::vector<std::unique_ptr<TmxObject>>
objects;
502 std::vector<std::unique_ptr<TmxLayer>>
layers;
584 const TmxTile *getTile(
unsigned id)
const noexcept;
593 RectU getSubTexture(
unsigned id,
Vector2u size)
const noexcept;
621 std::vector<std::unique_ptr<TmxLayer>>
layers;
631 const TmxTileset *getTileSetFromGID(
unsigned gid)
const noexcept;
645 bool loadFromFile(
const Path& filename);
649 #ifndef DOXYGEN_SHOULD_SKIP_THIS Vector2u size
The size of the image.
Definition: Tmx.h:483
unsigned tileCount
The number of tiles.
Definition: Tmx.h:568
double opacity
The opacity of the layer.
Definition: Tmx.h:299
VAlign valign
The vertical alignment of the text.
Definition: Tmx.h:460
Flags< Flip > flip
Definition: Tmx.h:400
Vector2u size
The size of the ellipse.
Definition: Tmx.h:391
A layer with an image.
Definition: Tmx.h:490
bool bold
Is the text in bold?
Definition: Tmx.h:434
TmxStaggerIndex
Stagger index of the hexagonal map.
Definition: Tmx.h:60
unsigned columnCount
The number of columns.
Definition: Tmx.h:569
A visitor for layers in the visitor pattern.
Definition: Tmx.h:232
TmxProperties properties
The properties of the terrain.
Definition: Tmx.h:533
bool wrap
The wrap mode.
Definition: Tmx.h:432
std::string text
The text of the object.
Definition: Tmx.h:428
std::vector< TmxTerrain > terrains
The terrains of the tileset.
Definition: Tmx.h:574
A rectangle object.
Definition: Tmx.h:382
std::string name
The name of the object.
Definition: Tmx.h:371
std::vector< TmxFrame > frames
The frames of the animation.
Definition: Tmx.h:523
unsigned gid
The global id of the tile.
Definition: Tmx.h:309
unsigned sizeInPixels
The size of the text in pixel.
Definition: Tmx.h:431
Color4u backgroundColor
The background color.
Definition: Tmx.h:616
std::vector< std::unique_ptr< TmxObject > > objects
The objects of the layer.
Definition: Tmx.h:470
TmxDrawOrder
The draw order of the objects.
Definition: Tmx.h:327
Vector2u size
The size of the rectangle.
Definition: Tmx.h:383
Id id
The id of the object.
Definition: Tmx.h:370
TmxStaggerAxis staggerAxis
The stagger axis for hexagonal map.
Definition: Tmx.h:613
std::unique_ptr< TmxImage > image
The image of the layer.
Definition: Tmx.h:491
An ellipse object.
Definition: Tmx.h:390
TmxDrawOrder drawOrder
The draw order of the objects.
Definition: Tmx.h:469
double rotation
The rotation of the object.
Definition: Tmx.h:374
unsigned spacing
The spacing between tiles (in pixels)
Definition: Tmx.h:566
uint64_t Id
An identifier.
Definition: Id.h:39
unsigned tile
The representing tile for the terrain.
Definition: Tmx.h:535
A layer with objects.
Definition: Tmx.h:467
An ellipse object.
Definition: Tmx.h:359
A layer in the whole map.
Definition: Tmx.h:281
Path source
The path to the image.
Definition: Tmx.h:481
std::string tiledVersion
The tiled version of the map.
Definition: Tmx.h:605
std::string name
The name of the tileset.
Definition: Tmx.h:564
A tile animation.
Definition: Tmx.h:522
A TMX map.
Definition: Tmx.h:601
bool kerning
Is the text using kerning?
Definition: Tmx.h:438
A tile object.
Definition: Tmx.h:362
std::vector< TmxTileset > tilesets
The tilesets used in the map.
Definition: Tmx.h:620
Represents a time value.
Definition: Time.h:74
std::unique_ptr< TmxAnimation > animation
The animation data of the tile.
Definition: Tmx.h:553
std::vector< TmxTile > tiles
The tiles of the tileset.
Definition: Tmx.h:575
Vector2u position
The position of the object.
Definition: Tmx.h:373
std::string fontFamily
The font family.
Definition: Tmx.h:430
Color4u transparent
The transparent color.
Definition: Tmx.h:482
Vector2i offset
The offset of the layer.
Definition: Tmx.h:301
A text object.
Definition: Tmx.h:427
HAlign halign
The horizontal alignment of the text.
Definition: Tmx.h:449
std::string type
The type of the object.
Definition: Tmx.h:372
TmxStaggerAxis
Stagger axis of the hexagonal map.
Definition: Tmx.h:69
std::vector< std::unique_ptr< TmxLayer > > layers
The layers of the map.
Definition: Tmx.h:621
std::string name
The name of the terrain.
Definition: Tmx.h:534
std::string version
The version of the map.
Definition: Tmx.h:604
unsigned id
The local id of the tile.
Definition: Tmx.h:546
std::vector< std::unique_ptr< TmxLayer > > layers
The other layers.
Definition: Tmx.h:502
TmxRenderOrder renderOrder
The render order of the map.
Definition: Tmx.h:607
Kind
The kind of object.
Definition: Tmx.h:357
Vector2u mapSize
The size of the map.
Definition: Tmx.h:609
The namespace for gf classes.
Definition: Action.h:34
A polyline object.
Definition: Tmx.h:409
unsigned hexSideLength
The length of the side for hexagonal map.
Definition: Tmx.h:612
TmxProperties properties
The properties of the tile.
Definition: Tmx.h:545
unsigned probability
The probability of the tile.
Definition: Tmx.h:549
std::unique_ptr< TmxObjectLayer > objects
The objects in the tile.
Definition: Tmx.h:552
A frame in a tile animation.
Definition: Tmx.h:513
Vector2i offset
The offset of the tileset.
Definition: Tmx.h:571
TmxProperties properties
The properties of the tileset.
Definition: Tmx.h:561
TmxProperties properties
The properties of the map.
Definition: Tmx.h:602
Kind kind
The kind of the object.
Definition: Tmx.h:366
std::string type
The type of the tile.
Definition: Tmx.h:547
std::vector< Vector2i > points
The points of the polygon.
Definition: Tmx.h:420
Vector2u tileSize
The size of the tileset.
Definition: Tmx.h:565
TmxOrientation orientation
The orientation of the map.
Definition: Tmx.h:606
Color4u color
The color of the text.
Definition: Tmx.h:433
A description of a kind of terrain on the map.
Definition: Tmx.h:532
A rectangle object.
Definition: Tmx.h:358
The properties for TMX entities.
Definition: Tmx.h:90
bool visible
The visibility of the object.
Definition: Tmx.h:375
VAlign
A vertical alignment.
Definition: Tmx.h:454
An isometric orientation.
A rectangular part of a tileset.
Definition: Tmx.h:544
TmxRenderOrder
the render order of the tiles.
Definition: Tmx.h:78
std::string format
The format of the image.
Definition: Tmx.h:480
HAlign
A horizontal alignment.
Definition: Tmx.h:443
boost::filesystem::path Path
A path in the filesystem.
Definition: Path.h:41
TmxStaggerIndex staggerIndex
The stagger index for hexagonal map.
Definition: Tmx.h:614
Color4u color
The color of the objects.
Definition: Tmx.h:468
A polygon object.
Definition: Tmx.h:361
A geometrical object.
Definition: Tmx.h:348
A cell in a tile layer.
Definition: Tmx.h:308
std::unique_ptr< TmxImage > image
The image of this tile.
Definition: Tmx.h:551
A text object.
Definition: Tmx.h:363
unsigned margin
The margin around tiles (in pixels)
Definition: Tmx.h:567
unsigned tileId
Definition: Tmx.h:514
TmxOrientation
The orientation of the map.
Definition: Tmx.h:48
TmxProperties properties
The properties of the object.
Definition: Tmx.h:368
A set of tiles in a single file (image or TSX file)
Definition: Tmx.h:560
unsigned nextObjectId
The next object id.
Definition: Tmx.h:618
unsigned firstGid
The first global id of the tileset.
Definition: Tmx.h:563
unsigned gid
Definition: Tmx.h:399
An image put in the map identified by its global id.
Definition: Tmx.h:398
Vector2u tileSize
The size of the tiles.
Definition: Tmx.h:610
bool italic
Is the text in italic?
Definition: Tmx.h:435
A layer with tiles in cells.
Definition: Tmx.h:317
std::array< unsigned, 4 > terrain
The terrain if the corners (top-left, top-right, bottom-left, bottom-right)
Definition: Tmx.h:548
std::unique_ptr< TmxImage > image
The image of the tileset.
Definition: Tmx.h:573
std::vector< TmxCell > cells
The cells of the layer.
Definition: Tmx.h:318
A polyline object.
Definition: Tmx.h:360
A layer with other layers.
Definition: Tmx.h:501
bool strikeout
Is the text striked out?
Definition: Tmx.h:437
Time duration
Definition: Tmx.h:515
std::string name
The name of the layer.
Definition: Tmx.h:298
A polygon object.
Definition: Tmx.h:419
bool visible
The visibility of the layer.
Definition: Tmx.h:300
TmxProperties properties
The properties of the layer.
Definition: Tmx.h:297
bool underline
Is the text underlined?
Definition: Tmx.h:436
std::vector< Vector2i > points
The points of the polyline.
Definition: Tmx.h:410
An orthogonal orientation.
A reference to an image.
Definition: Tmx.h:479