38 #include "TileTypes.h" 43 #ifndef DOXYGEN_SHOULD_SKIP_THIS 85 void addStringProperty(std::string name, std::string value);
93 void addIntProperty(std::string name,
int value);
101 void addFloatProperty(std::string name,
double value);
109 void addBoolProperty(std::string name,
bool value);
117 void addColorProperty(std::string name,
Color4u value);
125 void addFileProperty(std::string name,
Path value);
134 std::string getStringProperty(
const std::string& name,
const std::string& def)
const;
143 int getIntProperty(
const std::string& name,
int def)
const;
152 double getFloatProperty(
const std::string& name,
double def)
const;
161 bool getBoolProperty(
const std::string& name,
bool def)
const;
170 Color4u getColorProperty(
const std::string& name,
const Color4u& def)
const;
179 Path getFileProperty(
const std::string& name,
const Path& def)
const;
182 std::map<std::string, std::string> m_stringProps;
183 std::map<std::string, int> m_intProps;
184 std::map<std::string, double> m_floatProps;
185 std::map<std::string, bool> m_boolProps;
186 std::map<std::string, Color4u> m_colorProps;
187 std::map<std::string, Path> m_fileProps;
462 std::vector<std::unique_ptr<TmxObject>>
objects;
494 std::vector<std::unique_ptr<TmxLayer>>
layers;
576 const TmxTile *getTile(
int id)
const noexcept;
613 std::vector<std::unique_ptr<TmxLayer>>
layers;
622 const TmxTileset *getTileSetFromGID(
int gid)
const noexcept;
636 bool loadFromFile(
const Path& filename);
639 #ifndef DOXYGEN_SHOULD_SKIP_THIS MapCellAxis mapCellAxis
The stagger axis for hexagonal map.
Definition: Tmx.h:605
double opacity
The opacity of the layer.
Definition: Tmx.h:271
VAlign valign
The vertical alignment of the text.
Definition: Tmx.h:445
Vector2i tileSize
The size of a tile in the tileset.
Definition: Tmx.h:557
Flags< Flip > flip
Definition: Tmx.h:385
A layer with an image.
Definition: Tmx.h:482
MapCellIndex mapCellIndex
The stagger index for hexagonal map.
Definition: Tmx.h:606
Vector2i size
Definition: Tmx.h:291
bool bold
Is the text in bold?
Definition: Tmx.h:419
int spacing
The spacing between tiles (in pixels)
Definition: Tmx.h:558
int gid
The global id of the tile.
Definition: Tmx.h:281
A visitor for layers in the visitor pattern.
Definition: Tmx.h:204
TmxProperties properties
The properties of the terrain.
Definition: Tmx.h:525
bool wrap
The wrap mode.
Definition: Tmx.h:417
std::string text
The text of the object.
Definition: Tmx.h:413
std::vector< TmxTerrain > terrains
The terrains of the tileset.
Definition: Tmx.h:566
A rectangle object.
Definition: Tmx.h:367
std::string name
The name of the object.
Definition: Tmx.h:356
A chunk in a tile layer (for infinite maps)
Definition: Tmx.h:289
std::vector< Vector2f > points
The points of the polygon.
Definition: Tmx.h:405
std::vector< TmxFrame > frames
The frames of the animation.
Definition: Tmx.h:515
Color4u backgroundColor
The background color.
Definition: Tmx.h:608
std::vector< std::unique_ptr< TmxObject > > objects
The objects of the layer.
Definition: Tmx.h:462
std::unique_ptr< TmxImage > image
The image of the layer.
Definition: Tmx.h:483
An ellipse object.
Definition: Tmx.h:375
Vector2i mapSize
The size of the map.
Definition: Tmx.h:601
TmxDrawOrder drawOrder
The draw order of the objects.
Definition: Tmx.h:461
double rotation
The rotation of the object.
Definition: Tmx.h:359
TileOrientation
The orientation of the tile.
Definition: TileTypes.h:37
std::vector< Vector2f > points
The points of the polyline.
Definition: Tmx.h:395
A layer with objects.
Definition: Tmx.h:459
An ellipse object.
Definition: Tmx.h:343
A layer in the whole map.
Definition: Tmx.h:253
Path source
The path to the image.
Definition: Tmx.h:473
std::string tiledVersion
The tiled version of the map.
Definition: Tmx.h:596
std::string name
The name of the tileset.
Definition: Tmx.h:556
A tile animation.
Definition: Tmx.h:514
A TMX map.
Definition: Tmx.h:592
bool kerning
Is the text using kerning?
Definition: Tmx.h:423
TmxRenderOrder
the render order of the tiles.
Definition: Tmx.h:50
A tile object.
Definition: Tmx.h:346
std::vector< TmxTileset > tilesets
The tilesets used in the map.
Definition: Tmx.h:612
Represents a time value.
Definition: Time.h:65
int sizeInPixels
The size of the text in pixel.
Definition: Tmx.h:416
std::unique_ptr< TmxAnimation > animation
The animation data of the tile.
Definition: Tmx.h:545
std::vector< TmxTile > tiles
The tiles of the tileset.
Definition: Tmx.h:567
int id
The id of the object.
Definition: Tmx.h:355
int probability
The probability of the tile.
Definition: Tmx.h:541
Vector2i position
Definition: Tmx.h:290
std::string fontFamily
The font family.
Definition: Tmx.h:415
Color4u transparent
The transparent color.
Definition: Tmx.h:474
Vector2i offset
The offset of the layer.
Definition: Tmx.h:273
int tileCount
The number of tiles.
Definition: Tmx.h:560
A text object.
Definition: Tmx.h:412
HAlign halign
The horizontal alignment of the text.
Definition: Tmx.h:434
std::filesystem::path Path
A path in the filesystem.
Definition: Path.h:40
std::string type
The type of the object.
Definition: Tmx.h:357
std::vector< std::unique_ptr< TmxLayer > > layers
The layers of the map.
Definition: Tmx.h:613
std::string name
The name of the terrain.
Definition: Tmx.h:526
std::string version
The version of the map.
Definition: Tmx.h:595
std::vector< std::unique_ptr< TmxLayer > > layers
The other layers.
Definition: Tmx.h:494
TmxRenderOrder renderOrder
The render order of the map.
Definition: Tmx.h:598
Kind
The kind of object.
Definition: Tmx.h:341
int tileId
Definition: Tmx.h:506
A point object.
Definition: Tmx.h:452
int nextObjectId
The next object id.
Definition: Tmx.h:610
The namespace for gf classes.
Definition: Action.h:35
A polyline object.
Definition: Tmx.h:394
TmxProperties properties
The properties of the tile.
Definition: Tmx.h:537
std::unique_ptr< TmxObjectLayer > objects
The objects in the tile.
Definition: Tmx.h:544
int firstGid
The first global id of the tileset.
Definition: Tmx.h:555
A frame in a tile animation.
Definition: Tmx.h:505
Vector2i offset
The offset of the tileset.
Definition: Tmx.h:563
TmxProperties properties
The properties of the tileset.
Definition: Tmx.h:553
TmxProperties properties
The properties of the map.
Definition: Tmx.h:593
Kind kind
The kind of the object.
Definition: Tmx.h:351
std::string type
The type of the tile.
Definition: Tmx.h:539
int gid
Definition: Tmx.h:384
A 4D vector.
Definition: Vector.h:852
Color4u color
The color of the text.
Definition: Tmx.h:418
int margin
The margin around tiles (in pixels)
Definition: Tmx.h:559
std::array< int, 4 > terrain
The terrain if the corners (top-left, top-right, bottom-left, bottom-right)
Definition: Tmx.h:540
A description of a kind of terrain on the map.
Definition: Tmx.h:524
A rectangle object.
Definition: Tmx.h:342
The properties for TMX entities.
Definition: Tmx.h:62
bool visible
The visibility of the object.
Definition: Tmx.h:360
VAlign
A vertical alignment.
Definition: Tmx.h:439
A rectangular part of a tileset.
Definition: Tmx.h:536
MapCellIndex
Map cell index in a map celled or hexagonal map.
Definition: MapCell.h:35
std::string format
The format of the image.
Definition: Tmx.h:472
int id
The local id of the tile.
Definition: Tmx.h:538
HAlign
A horizontal alignment.
Definition: Tmx.h:428
Color4u color
The color of the objects.
Definition: Tmx.h:460
TileOrientation orientation
The orientation of the map.
Definition: Tmx.h:597
A polygon object.
Definition: Tmx.h:345
A geometrical object.
Definition: Tmx.h:332
A cell in a tile layer.
Definition: Tmx.h:280
std::unique_ptr< TmxImage > image
The image of this tile.
Definition: Tmx.h:543
A text object.
Definition: Tmx.h:347
Vector2f size
The size of the rectangle.
Definition: Tmx.h:368
MapCellAxis
Map cell axis in a map celled.
Definition: MapCell.h:46
TmxProperties properties
The properties of the object.
Definition: Tmx.h:353
A set of tiles in a single file (image or TSX file)
Definition: Tmx.h:552
int hexSideLength
The length of the side for hexagonal map.
Definition: Tmx.h:604
An image put in the map identified by its global id.
Definition: Tmx.h:383
int columnCount
The number of columns.
Definition: Tmx.h:561
Vector2f size
The size of the ellipse.
Definition: Tmx.h:376
TmxDrawOrder
The draw order of the objects.
Definition: Tmx.h:310
bool italic
Is the text in italic?
Definition: Tmx.h:420
A layer with tiles in cells.
Definition: Tmx.h:299
std::unique_ptr< TmxImage > image
The image of the tileset.
Definition: Tmx.h:565
std::vector< TmxCell > cells
The cells of the layer.
Definition: Tmx.h:300
A polyline object.
Definition: Tmx.h:344
A layer with other layers.
Definition: Tmx.h:493
bool strikeout
Is the text striked out?
Definition: Tmx.h:422
Vector2i tileSize
The size of the tiles.
Definition: Tmx.h:602
std::vector< TmxCell > cells
Definition: Tmx.h:292
Time duration
Definition: Tmx.h:507
std::string name
The name of the layer.
Definition: Tmx.h:270
bool infinite
Is the map infinite?
Definition: Tmx.h:600
A point object.
Definition: Tmx.h:348
A polygon object.
Definition: Tmx.h:404
int tile
The representing tile for the terrain.
Definition: Tmx.h:527
bool visible
The visibility of the layer.
Definition: Tmx.h:272
std::vector< TmxChunk > chunks
The chunks of the layer.
Definition: Tmx.h:301
TmxProperties properties
The properties of the layer.
Definition: Tmx.h:269
bool underline
Is the text underlined?
Definition: Tmx.h:421
Vector2f position
The position of the object.
Definition: Tmx.h:358
Vector2i size
The size of the image.
Definition: Tmx.h:475
A reference to an image.
Definition: Tmx.h:471