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;
478 std::vector<std::unique_ptr<TmxObject>>
objects;
510 std::vector<std::unique_ptr<TmxLayer>>
layers;
592 const TmxTile *getTile(
unsigned id)
const noexcept;
601 RectU getSubTexture(
unsigned id,
Vector2u size)
const noexcept;
629 std::vector<std::unique_ptr<TmxLayer>>
layers;
639 const TmxTileset *getTileSetFromGID(
unsigned gid)
const noexcept;
653 bool loadFromFile(
const Path& filename);
657 #ifndef DOXYGEN_SHOULD_SKIP_THIS Vector2u size
The size of the image.
Definition: Tmx.h:491
unsigned tileCount
The number of tiles.
Definition: Tmx.h:576
double opacity
The opacity of the layer.
Definition: Tmx.h:299
VAlign valign
The vertical alignment of the text.
Definition: Tmx.h:461
Flags< Flip > flip
Definition: Tmx.h:401
A layer with an image.
Definition: Tmx.h:498
bool bold
Is the text in bold?
Definition: Tmx.h:435
TmxStaggerIndex
Stagger index of the hexagonal map.
Definition: Tmx.h:60
unsigned columnCount
The number of columns.
Definition: Tmx.h:577
A visitor for layers in the visitor pattern.
Definition: Tmx.h:232
TmxProperties properties
The properties of the terrain.
Definition: Tmx.h:541
bool wrap
The wrap mode.
Definition: Tmx.h:433
std::string text
The text of the object.
Definition: Tmx.h:429
std::vector< TmxTerrain > terrains
The terrains of the tileset.
Definition: Tmx.h:582
A rectangle object.
Definition: Tmx.h:383
std::string name
The name of the object.
Definition: Tmx.h:372
std::vector< Vector2f > points
The points of the polygon.
Definition: Tmx.h:421
std::vector< TmxFrame > frames
The frames of the animation.
Definition: Tmx.h:531
unsigned gid
The global id of the tile.
Definition: Tmx.h:309
unsigned sizeInPixels
The size of the text in pixel.
Definition: Tmx.h:432
Color4u backgroundColor
The background color.
Definition: Tmx.h:624
std::vector< std::unique_ptr< TmxObject > > objects
The objects of the layer.
Definition: Tmx.h:478
TmxDrawOrder
The draw order of the objects.
Definition: Tmx.h:327
TmxStaggerAxis staggerAxis
The stagger axis for hexagonal map.
Definition: Tmx.h:621
std::unique_ptr< TmxImage > image
The image of the layer.
Definition: Tmx.h:499
An ellipse object.
Definition: Tmx.h:391
TmxDrawOrder drawOrder
The draw order of the objects.
Definition: Tmx.h:477
double rotation
The rotation of the object.
Definition: Tmx.h:375
unsigned spacing
The spacing between tiles (in pixels)
Definition: Tmx.h:574
unsigned tile
The representing tile for the terrain.
Definition: Tmx.h:543
std::vector< Vector2f > points
The points of the polyline.
Definition: Tmx.h:411
A layer with objects.
Definition: Tmx.h:475
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:489
std::string tiledVersion
The tiled version of the map.
Definition: Tmx.h:613
std::string name
The name of the tileset.
Definition: Tmx.h:572
A tile animation.
Definition: Tmx.h:530
A TMX map.
Definition: Tmx.h:609
bool kerning
Is the text using kerning?
Definition: Tmx.h:439
A tile object.
Definition: Tmx.h:362
std::vector< TmxTileset > tilesets
The tilesets used in the map.
Definition: Tmx.h:628
Represents a time value.
Definition: Time.h:74
std::unique_ptr< TmxAnimation > animation
The animation data of the tile.
Definition: Tmx.h:561
std::vector< TmxTile > tiles
The tiles of the tileset.
Definition: Tmx.h:583
int id
The id of the object.
Definition: Tmx.h:371
std::string fontFamily
The font family.
Definition: Tmx.h:431
Color4u transparent
The transparent color.
Definition: Tmx.h:490
Vector2i offset
The offset of the layer.
Definition: Tmx.h:301
A text object.
Definition: Tmx.h:428
HAlign halign
The horizontal alignment of the text.
Definition: Tmx.h:450
std::string type
The type of the object.
Definition: Tmx.h:373
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:629
std::string name
The name of the terrain.
Definition: Tmx.h:542
std::string version
The version of the map.
Definition: Tmx.h:612
unsigned id
The local id of the tile.
Definition: Tmx.h:554
std::vector< std::unique_ptr< TmxLayer > > layers
The other layers.
Definition: Tmx.h:510
TmxRenderOrder renderOrder
The render order of the map.
Definition: Tmx.h:615
Kind
The kind of object.
Definition: Tmx.h:357
A point object.
Definition: Tmx.h:468
Vector2u mapSize
The size of the map.
Definition: Tmx.h:617
The namespace for gf classes.
Definition: Action.h:35
A polyline object.
Definition: Tmx.h:410
unsigned hexSideLength
The length of the side for hexagonal map.
Definition: Tmx.h:620
TmxProperties properties
The properties of the tile.
Definition: Tmx.h:553
unsigned probability
The probability of the tile.
Definition: Tmx.h:557
std::unique_ptr< TmxObjectLayer > objects
The objects in the tile.
Definition: Tmx.h:560
A frame in a tile animation.
Definition: Tmx.h:521
Vector2i offset
The offset of the tileset.
Definition: Tmx.h:579
TmxProperties properties
The properties of the tileset.
Definition: Tmx.h:569
TmxProperties properties
The properties of the map.
Definition: Tmx.h:610
Kind kind
The kind of the object.
Definition: Tmx.h:367
std::string type
The type of the tile.
Definition: Tmx.h:555
Vector2u tileSize
The size of the tileset.
Definition: Tmx.h:573
TmxOrientation orientation
The orientation of the map.
Definition: Tmx.h:614
Color4u color
The color of the text.
Definition: Tmx.h:434
A description of a kind of terrain on the map.
Definition: Tmx.h:540
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:376
VAlign
A vertical alignment.
Definition: Tmx.h:455
An isometric orientation.
A rectangular part of a tileset.
Definition: Tmx.h:552
TmxRenderOrder
the render order of the tiles.
Definition: Tmx.h:78
std::string format
The format of the image.
Definition: Tmx.h:488
HAlign
A horizontal alignment.
Definition: Tmx.h:444
boost::filesystem::path Path
A path in the filesystem.
Definition: Path.h:44
TmxStaggerIndex staggerIndex
The stagger index for hexagonal map.
Definition: Tmx.h:622
Color4u color
The color of the objects.
Definition: Tmx.h:476
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:559
A text object.
Definition: Tmx.h:363
Vector2f size
The size of the rectangle.
Definition: Tmx.h:384
unsigned margin
The margin around tiles (in pixels)
Definition: Tmx.h:575
unsigned tileId
Definition: Tmx.h:522
TmxOrientation
The orientation of the map.
Definition: Tmx.h:48
TmxProperties properties
The properties of the object.
Definition: Tmx.h:369
A set of tiles in a single file (image or TSX file)
Definition: Tmx.h:568
unsigned nextObjectId
The next object id.
Definition: Tmx.h:626
unsigned firstGid
The first global id of the tileset.
Definition: Tmx.h:571
unsigned gid
Definition: Tmx.h:400
An image put in the map identified by its global id.
Definition: Tmx.h:399
Vector2f size
The size of the ellipse.
Definition: Tmx.h:392
Vector2u tileSize
The size of the tiles.
Definition: Tmx.h:618
bool italic
Is the text in italic?
Definition: Tmx.h:436
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:556
std::unique_ptr< TmxImage > image
The image of the tileset.
Definition: Tmx.h:581
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:509
bool strikeout
Is the text striked out?
Definition: Tmx.h:438
Time duration
Definition: Tmx.h:523
std::string name
The name of the layer.
Definition: Tmx.h:298
A point object.
Definition: Tmx.h:364
A polygon object.
Definition: Tmx.h:420
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:437
Vector2f position
The position of the object.
Definition: Tmx.h:374
An orthogonal orientation.
A reference to an image.
Definition: Tmx.h:487