35 #include "Portability.h" 42 #ifndef DOXYGEN_SHOULD_SKIP_THIS 96 void addStringProperty(std::string name, std::string value);
104 void addIntProperty(std::string name,
int value);
112 void addFloatProperty(std::string name,
double value);
120 void addBoolProperty(std::string name,
bool value);
128 void addColorProperty(std::string name,
Color4u value);
136 void addFileProperty(std::string name,
Path value);
145 std::string getStringProperty(
const std::string& name,
const std::string& def)
const;
154 int getIntProperty(
const std::string& name,
int def)
const;
163 double getFloatProperty(
const std::string& name,
double def)
const;
172 bool getBoolProperty(
const std::string& name,
bool def)
const;
181 Color4u getColorProperty(
const std::string& name,
const Color4u& def)
const;
190 Path getFileProperty(
const std::string& name,
const Path& def)
const;
193 std::map<std::string, std::string> m_stringProps;
194 std::map<std::string, int> m_intProps;
195 std::map<std::string, double> m_floatProps;
196 std::map<std::string, bool> m_boolProps;
197 std::map<std::string, Color4u> m_colorProps;
198 std::map<std::string, Path> m_fileProps;
472 std::vector<std::unique_ptr<TmxObject>>
objects;
504 std::vector<std::unique_ptr<TmxLayer>>
layers;
586 const TmxTile *getTile(
int id)
const noexcept;
623 std::vector<std::unique_ptr<TmxLayer>>
layers;
632 const TmxTileset *getTileSetFromGID(
int gid)
const noexcept;
646 bool loadFromFile(
const Path& filename);
649 #ifndef DOXYGEN_SHOULD_SKIP_THIS
double opacity
The opacity of the layer.
Definition: Tmx.h:282
VAlign valign
The vertical alignment of the text.
Definition: Tmx.h:455
Vector2i tileSize
The size of a tile in the tileset.
Definition: Tmx.h:567
Flags< Flip > flip
Definition: Tmx.h:395
A layer with an image.
Definition: Tmx.h:492
Vector2i size
Definition: Tmx.h:302
bool bold
Is the text in bold?
Definition: Tmx.h:429
int spacing
The spacing between tiles (in pixels)
Definition: Tmx.h:568
StaggerAxis staggerAxis
The stagger axis for hexagonal map.
Definition: Tmx.h:615
int gid
The global id of the tile.
Definition: Tmx.h:292
A visitor for layers in the visitor pattern.
Definition: Tmx.h:215
TmxProperties properties
The properties of the terrain.
Definition: Tmx.h:535
bool wrap
The wrap mode.
Definition: Tmx.h:427
std::string text
The text of the object.
Definition: Tmx.h:423
std::vector< TmxTerrain > terrains
The terrains of the tileset.
Definition: Tmx.h:576
A rectangle object.
Definition: Tmx.h:377
std::string name
The name of the object.
Definition: Tmx.h:366
A chunk in a tile layer (for infinite maps)
Definition: Tmx.h:300
std::vector< Vector2f > points
The points of the polygon.
Definition: Tmx.h:415
std::vector< TmxFrame > frames
The frames of the animation.
Definition: Tmx.h:525
Color4u backgroundColor
The background color.
Definition: Tmx.h:618
std::vector< std::unique_ptr< TmxObject > > objects
The objects of the layer.
Definition: Tmx.h:472
TmxDrawOrder
The draw order of the objects.
Definition: Tmx.h:321
std::unique_ptr< TmxImage > image
The image of the layer.
Definition: Tmx.h:493
An ellipse object.
Definition: Tmx.h:385
Vector2i mapSize
The size of the map.
Definition: Tmx.h:611
TmxDrawOrder drawOrder
The draw order of the objects.
Definition: Tmx.h:471
double rotation
The rotation of the object.
Definition: Tmx.h:369
std::vector< Vector2f > points
The points of the polyline.
Definition: Tmx.h:405
A layer with objects.
Definition: Tmx.h:469
StaggerAxis
Stagger axis in a staggered or hexagonal map.
Definition: Stagger.h:48
An ellipse object.
Definition: Tmx.h:353
A layer in the whole map.
Definition: Tmx.h:264
Path source
The path to the image.
Definition: Tmx.h:483
std::string tiledVersion
The tiled version of the map.
Definition: Tmx.h:606
std::string name
The name of the tileset.
Definition: Tmx.h:566
A tile animation.
Definition: Tmx.h:524
A TMX map.
Definition: Tmx.h:602
bool kerning
Is the text using kerning?
Definition: Tmx.h:433
A tile object.
Definition: Tmx.h:356
std::vector< TmxTileset > tilesets
The tilesets used in the map.
Definition: Tmx.h:622
Represents a time value.
Definition: Time.h:74
int sizeInPixels
The size of the text in pixel.
Definition: Tmx.h:426
std::unique_ptr< TmxAnimation > animation
The animation data of the tile.
Definition: Tmx.h:555
std::vector< TmxTile > tiles
The tiles of the tileset.
Definition: Tmx.h:577
int id
The id of the object.
Definition: Tmx.h:365
int probability
The probability of the tile.
Definition: Tmx.h:551
Vector2i position
Definition: Tmx.h:301
std::string fontFamily
The font family.
Definition: Tmx.h:425
Color4u transparent
The transparent color.
Definition: Tmx.h:484
Vector2i offset
The offset of the layer.
Definition: Tmx.h:284
int tileCount
The number of tiles.
Definition: Tmx.h:570
A text object.
Definition: Tmx.h:422
HAlign halign
The horizontal alignment of the text.
Definition: Tmx.h:444
std::string type
The type of the object.
Definition: Tmx.h:367
std::vector< std::unique_ptr< TmxLayer > > layers
The layers of the map.
Definition: Tmx.h:623
std::string name
The name of the terrain.
Definition: Tmx.h:536
std::string version
The version of the map.
Definition: Tmx.h:605
std::vector< std::unique_ptr< TmxLayer > > layers
The other layers.
Definition: Tmx.h:504
TmxRenderOrder renderOrder
The render order of the map.
Definition: Tmx.h:608
Kind
The kind of object.
Definition: Tmx.h:351
int tileId
Definition: Tmx.h:516
A point object.
Definition: Tmx.h:462
int nextObjectId
The next object id.
Definition: Tmx.h:620
The namespace for gf classes.
Definition: Action.h:35
A polyline object.
Definition: Tmx.h:404
TmxProperties properties
The properties of the tile.
Definition: Tmx.h:547
std::unique_ptr< TmxObjectLayer > objects
The objects in the tile.
Definition: Tmx.h:554
int firstGid
The first global id of the tileset.
Definition: Tmx.h:565
A frame in a tile animation.
Definition: Tmx.h:515
Vector2i offset
The offset of the tileset.
Definition: Tmx.h:573
TmxProperties properties
The properties of the tileset.
Definition: Tmx.h:563
TmxProperties properties
The properties of the map.
Definition: Tmx.h:603
Kind kind
The kind of the object.
Definition: Tmx.h:361
std::string type
The type of the tile.
Definition: Tmx.h:549
int gid
Definition: Tmx.h:394
A 4D vector.
Definition: Vector.h:838
TmxOrientation orientation
The orientation of the map.
Definition: Tmx.h:607
Color4u color
The color of the text.
Definition: Tmx.h:428
int margin
The margin around tiles (in pixels)
Definition: Tmx.h:569
std::array< int, 4 > terrain
The terrain if the corners (top-left, top-right, bottom-left, bottom-right)
Definition: Tmx.h:550
A description of a kind of terrain on the map.
Definition: Tmx.h:534
A rectangle object.
Definition: Tmx.h:352
The properties for TMX entities.
Definition: Tmx.h:73
bool visible
The visibility of the object.
Definition: Tmx.h:370
VAlign
A vertical alignment.
Definition: Tmx.h:449
An isometric orientation.
A rectangular part of a tileset.
Definition: Tmx.h:546
StaggerIndex staggerIndex
The stagger index for hexagonal map.
Definition: Tmx.h:616
TmxRenderOrder
the render order of the tiles.
Definition: Tmx.h:61
std::string format
The format of the image.
Definition: Tmx.h:482
int id
The local id of the tile.
Definition: Tmx.h:548
HAlign
A horizontal alignment.
Definition: Tmx.h:438
boost::filesystem::path Path
A path in the filesystem.
Definition: Path.h:44
Color4u color
The color of the objects.
Definition: Tmx.h:470
A polygon object.
Definition: Tmx.h:355
A geometrical object.
Definition: Tmx.h:342
A cell in a tile layer.
Definition: Tmx.h:291
std::unique_ptr< TmxImage > image
The image of this tile.
Definition: Tmx.h:553
A text object.
Definition: Tmx.h:357
Vector2f size
The size of the rectangle.
Definition: Tmx.h:378
TmxOrientation
The orientation of the map.
Definition: Tmx.h:49
TmxProperties properties
The properties of the object.
Definition: Tmx.h:363
A set of tiles in a single file (image or TSX file)
Definition: Tmx.h:562
int hexSideLength
The length of the side for hexagonal map.
Definition: Tmx.h:614
An image put in the map identified by its global id.
Definition: Tmx.h:393
int columnCount
The number of columns.
Definition: Tmx.h:571
Vector2f size
The size of the ellipse.
Definition: Tmx.h:386
bool italic
Is the text in italic?
Definition: Tmx.h:430
A layer with tiles in cells.
Definition: Tmx.h:310
std::unique_ptr< TmxImage > image
The image of the tileset.
Definition: Tmx.h:575
std::vector< TmxCell > cells
The cells of the layer.
Definition: Tmx.h:311
A polyline object.
Definition: Tmx.h:354
A layer with other layers.
Definition: Tmx.h:503
bool strikeout
Is the text striked out?
Definition: Tmx.h:432
Vector2i tileSize
The size of the tiles.
Definition: Tmx.h:612
StaggerIndex
Stagger index in a staggered or hexagonal map.
Definition: Stagger.h:37
std::vector< TmxCell > cells
Definition: Tmx.h:303
Time duration
Definition: Tmx.h:517
std::string name
The name of the layer.
Definition: Tmx.h:281
bool infinite
Is the map infinite?
Definition: Tmx.h:610
A point object.
Definition: Tmx.h:358
A polygon object.
Definition: Tmx.h:414
int tile
The representing tile for the terrain.
Definition: Tmx.h:537
bool visible
The visibility of the layer.
Definition: Tmx.h:283
std::vector< TmxChunk > chunks
The chunks of the layer.
Definition: Tmx.h:312
TmxProperties properties
The properties of the layer.
Definition: Tmx.h:280
bool underline
Is the text underlined?
Definition: Tmx.h:431
Vector2f position
The position of the object.
Definition: Tmx.h:368
An orthogonal orientation.
Vector2i size
The size of the image.
Definition: Tmx.h:485
A reference to an image.
Definition: Tmx.h:481