34 #include "Portability.h" 37 #include "TileTypes.h" 42 #ifndef DOXYGEN_SHOULD_SKIP_THIS 84 void addStringProperty(std::string name, std::string value);
92 void addIntProperty(std::string name,
int value);
100 void addFloatProperty(std::string name,
double value);
108 void addBoolProperty(std::string name,
bool value);
116 void addColorProperty(std::string name,
Color4u value);
124 void addFileProperty(std::string name,
Path value);
133 std::string getStringProperty(
const std::string& name,
const std::string& def)
const;
142 int getIntProperty(
const std::string& name,
int def)
const;
151 double getFloatProperty(
const std::string& name,
double def)
const;
160 bool getBoolProperty(
const std::string& name,
bool def)
const;
169 Color4u getColorProperty(
const std::string& name,
const Color4u& def)
const;
178 Path getFileProperty(
const std::string& name,
const Path& def)
const;
181 std::map<std::string, std::string> m_stringProps;
182 std::map<std::string, int> m_intProps;
183 std::map<std::string, double> m_floatProps;
184 std::map<std::string, bool> m_boolProps;
185 std::map<std::string, Color4u> m_colorProps;
186 std::map<std::string, Path> m_fileProps;
461 std::vector<std::unique_ptr<TmxObject>>
objects;
493 std::vector<std::unique_ptr<TmxLayer>>
layers;
575 const TmxTile *getTile(
int id)
const noexcept;
612 std::vector<std::unique_ptr<TmxLayer>>
layers;
621 const TmxTileset *getTileSetFromGID(
int gid)
const noexcept;
635 bool loadFromFile(
const Path& filename);
638 #ifndef DOXYGEN_SHOULD_SKIP_THIS MapCellAxis mapCellAxis
The stagger axis for hexagonal map.
Definition: Tmx.h:604
double opacity
The opacity of the layer.
Definition: Tmx.h:270
VAlign valign
The vertical alignment of the text.
Definition: Tmx.h:444
Vector2i tileSize
The size of a tile in the tileset.
Definition: Tmx.h:556
Flags< Flip > flip
Definition: Tmx.h:384
A layer with an image.
Definition: Tmx.h:481
MapCellIndex mapCellIndex
The stagger index for hexagonal map.
Definition: Tmx.h:605
Vector2i size
Definition: Tmx.h:290
bool bold
Is the text in bold?
Definition: Tmx.h:418
int spacing
The spacing between tiles (in pixels)
Definition: Tmx.h:557
int gid
The global id of the tile.
Definition: Tmx.h:280
A visitor for layers in the visitor pattern.
Definition: Tmx.h:203
TmxProperties properties
The properties of the terrain.
Definition: Tmx.h:524
bool wrap
The wrap mode.
Definition: Tmx.h:416
std::string text
The text of the object.
Definition: Tmx.h:412
std::vector< TmxTerrain > terrains
The terrains of the tileset.
Definition: Tmx.h:565
A rectangle object.
Definition: Tmx.h:366
std::string name
The name of the object.
Definition: Tmx.h:355
A chunk in a tile layer (for infinite maps)
Definition: Tmx.h:288
std::vector< Vector2f > points
The points of the polygon.
Definition: Tmx.h:404
std::vector< TmxFrame > frames
The frames of the animation.
Definition: Tmx.h:514
Color4u backgroundColor
The background color.
Definition: Tmx.h:607
std::vector< std::unique_ptr< TmxObject > > objects
The objects of the layer.
Definition: Tmx.h:461
TmxDrawOrder
The draw order of the objects.
Definition: Tmx.h:309
std::unique_ptr< TmxImage > image
The image of the layer.
Definition: Tmx.h:482
An ellipse object.
Definition: Tmx.h:374
Vector2i mapSize
The size of the map.
Definition: Tmx.h:600
TmxDrawOrder drawOrder
The draw order of the objects.
Definition: Tmx.h:460
double rotation
The rotation of the object.
Definition: Tmx.h:358
std::vector< Vector2f > points
The points of the polyline.
Definition: Tmx.h:394
A layer with objects.
Definition: Tmx.h:458
An ellipse object.
Definition: Tmx.h:342
A layer in the whole map.
Definition: Tmx.h:252
Path source
The path to the image.
Definition: Tmx.h:472
std::string tiledVersion
The tiled version of the map.
Definition: Tmx.h:595
std::string name
The name of the tileset.
Definition: Tmx.h:555
A tile animation.
Definition: Tmx.h:513
A TMX map.
Definition: Tmx.h:591
bool kerning
Is the text using kerning?
Definition: Tmx.h:422
A tile object.
Definition: Tmx.h:345
std::vector< TmxTileset > tilesets
The tilesets used in the map.
Definition: Tmx.h:611
Represents a time value.
Definition: Time.h:65
int sizeInPixels
The size of the text in pixel.
Definition: Tmx.h:415
std::unique_ptr< TmxAnimation > animation
The animation data of the tile.
Definition: Tmx.h:544
std::vector< TmxTile > tiles
The tiles of the tileset.
Definition: Tmx.h:566
int id
The id of the object.
Definition: Tmx.h:354
int probability
The probability of the tile.
Definition: Tmx.h:540
Vector2i position
Definition: Tmx.h:289
std::string fontFamily
The font family.
Definition: Tmx.h:414
Color4u transparent
The transparent color.
Definition: Tmx.h:473
Vector2i offset
The offset of the layer.
Definition: Tmx.h:272
int tileCount
The number of tiles.
Definition: Tmx.h:559
A text object.
Definition: Tmx.h:411
HAlign halign
The horizontal alignment of the text.
Definition: Tmx.h:433
std::string type
The type of the object.
Definition: Tmx.h:356
std::vector< std::unique_ptr< TmxLayer > > layers
The layers of the map.
Definition: Tmx.h:612
std::string name
The name of the terrain.
Definition: Tmx.h:525
std::string version
The version of the map.
Definition: Tmx.h:594
std::vector< std::unique_ptr< TmxLayer > > layers
The other layers.
Definition: Tmx.h:493
TmxRenderOrder renderOrder
The render order of the map.
Definition: Tmx.h:597
Kind
The kind of object.
Definition: Tmx.h:340
int tileId
Definition: Tmx.h:505
A point object.
Definition: Tmx.h:451
int nextObjectId
The next object id.
Definition: Tmx.h:609
The namespace for gf classes.
Definition: Action.h:35
A polyline object.
Definition: Tmx.h:393
TmxProperties properties
The properties of the tile.
Definition: Tmx.h:536
std::unique_ptr< TmxObjectLayer > objects
The objects in the tile.
Definition: Tmx.h:543
int firstGid
The first global id of the tileset.
Definition: Tmx.h:554
A frame in a tile animation.
Definition: Tmx.h:504
MapCellIndex
Map cell index in a map celled or hexagonal map.
Definition: MapCell.h:35
Vector2i offset
The offset of the tileset.
Definition: Tmx.h:562
TmxProperties properties
The properties of the tileset.
Definition: Tmx.h:552
TmxProperties properties
The properties of the map.
Definition: Tmx.h:592
Kind kind
The kind of the object.
Definition: Tmx.h:350
std::string type
The type of the tile.
Definition: Tmx.h:538
int gid
Definition: Tmx.h:383
A 4D vector.
Definition: Vector.h:852
Color4u color
The color of the text.
Definition: Tmx.h:417
int margin
The margin around tiles (in pixels)
Definition: Tmx.h:558
std::array< int, 4 > terrain
The terrain if the corners (top-left, top-right, bottom-left, bottom-right)
Definition: Tmx.h:539
A description of a kind of terrain on the map.
Definition: Tmx.h:523
A rectangle object.
Definition: Tmx.h:341
The properties for TMX entities.
Definition: Tmx.h:61
bool visible
The visibility of the object.
Definition: Tmx.h:359
VAlign
A vertical alignment.
Definition: Tmx.h:438
A rectangular part of a tileset.
Definition: Tmx.h:535
TmxRenderOrder
the render order of the tiles.
Definition: Tmx.h:49
std::string format
The format of the image.
Definition: Tmx.h:471
int id
The local id of the tile.
Definition: Tmx.h:537
HAlign
A horizontal alignment.
Definition: Tmx.h:427
boost::filesystem::path Path
A path in the filesystem.
Definition: Path.h:44
Color4u color
The color of the objects.
Definition: Tmx.h:459
TileOrientation orientation
The orientation of the map.
Definition: Tmx.h:596
A polygon object.
Definition: Tmx.h:344
A geometrical object.
Definition: Tmx.h:331
A cell in a tile layer.
Definition: Tmx.h:279
std::unique_ptr< TmxImage > image
The image of this tile.
Definition: Tmx.h:542
A text object.
Definition: Tmx.h:346
Vector2f size
The size of the rectangle.
Definition: Tmx.h:367
TmxProperties properties
The properties of the object.
Definition: Tmx.h:352
A set of tiles in a single file (image or TSX file)
Definition: Tmx.h:551
int hexSideLength
The length of the side for hexagonal map.
Definition: Tmx.h:603
An image put in the map identified by its global id.
Definition: Tmx.h:382
int columnCount
The number of columns.
Definition: Tmx.h:560
Vector2f size
The size of the ellipse.
Definition: Tmx.h:375
bool italic
Is the text in italic?
Definition: Tmx.h:419
A layer with tiles in cells.
Definition: Tmx.h:298
std::unique_ptr< TmxImage > image
The image of the tileset.
Definition: Tmx.h:564
std::vector< TmxCell > cells
The cells of the layer.
Definition: Tmx.h:299
A polyline object.
Definition: Tmx.h:343
A layer with other layers.
Definition: Tmx.h:492
bool strikeout
Is the text striked out?
Definition: Tmx.h:421
Vector2i tileSize
The size of the tiles.
Definition: Tmx.h:601
std::vector< TmxCell > cells
Definition: Tmx.h:291
Time duration
Definition: Tmx.h:506
std::string name
The name of the layer.
Definition: Tmx.h:269
bool infinite
Is the map infinite?
Definition: Tmx.h:599
A point object.
Definition: Tmx.h:347
A polygon object.
Definition: Tmx.h:403
MapCellAxis
Map cell axis in a map celled.
Definition: MapCell.h:46
int tile
The representing tile for the terrain.
Definition: Tmx.h:526
bool visible
The visibility of the layer.
Definition: Tmx.h:271
TileOrientation
The orientation of the tile.
Definition: TileTypes.h:37
std::vector< TmxChunk > chunks
The chunks of the layer.
Definition: Tmx.h:300
TmxProperties properties
The properties of the layer.
Definition: Tmx.h:268
bool underline
Is the text underlined?
Definition: Tmx.h:420
Vector2f position
The position of the object.
Definition: Tmx.h:357
Vector2i size
The size of the image.
Definition: Tmx.h:474
A reference to an image.
Definition: Tmx.h:470