Skip to content

Commit 9ea7ae0

Browse files
committed
update examples to new api
1 parent e2a9443 commit 9ea7ae0

File tree

8 files changed

+24
-24
lines changed

8 files changed

+24
-24
lines changed

README.md

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Tiled tmx map loader for SFML 2.0.0
44

55
/*********************************************************************
66

7-
Matt Marchant 2013 - 2016
7+
Matt Marchant 2013 - 2016
88
SFML Tiled Map Loader - https://github.com/bjorn/tiled/wiki/TMX-Map-Format
99

1010
Zlib License:
@@ -39,33 +39,33 @@ http://trederia.blogspot.co.uk/2013/05/tiled-map-loader-for-sfml.html
3939
What's Supported
4040
----------------
4141

42-
Uses pugixml (included) to parse xml
43-
Supports orthogonal maps
44-
Supports isometric maps
45-
Supports conversion between orthogonal and isometric world coords
46-
Parses all types of layers (normal, object and image), layer properties
47-
Parses all types of object, object shapes, types, properties
48-
Option to draw debug output of objects and tile grid
49-
Supports multiple tile sets, including tsx files and collections of images
50-
Supports all layer encoding and compression: base64, csv, zlib, gzip and xml (requires zlib library, see /lib directory)
51-
Quad tree partitioning / querying of map object data
52-
Optional utility functions for converting tmx map objects into box2D body data
42+
Uses pugixml (included) to parse xml
43+
Supports orthogonal maps
44+
Supports isometric maps
45+
Supports conversion between orthogonal and isometric world coords
46+
Parses all types of layers (normal, object and image), layer properties
47+
Parses all types of object, object shapes, types, properties
48+
Option to draw debug output of objects and tile grid
49+
Supports multiple tile sets, including tsx files and collections of images
50+
Supports all layer encoding and compression: base64, csv, zlib, gzip and xml (requires zlib library, see /lib directory)
51+
Quad tree partitioning / querying of map object data
52+
Optional utility functions for converting tmx map objects into box2D body data
5353

5454

5555
What's not supported / limitations
5656
----------------------------------
5757

58-
Parsing of individual tile properties
58+
Parsing of individual tile properties
5959
Staggered isometric maps
6060

6161

6262
Requirements
6363
------------
6464

65-
pugixml (included)
66-
zlib (http://zlib.net/)
67-
SFML 2.x (http://sfml-dev.org)
68-
Minimal C++11 compiler support (tested with VS11 and GCC4.7)
65+
pugixml (included)
66+
zlib (http://zlib.net/)
67+
SFML 2.x (http://sfml-dev.org)
68+
Minimal C++11 compiler support (tested with VS11 and GCC4.7)
6969

7070

7171
Usage

build/VS2013/Example.vcxproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
</ProjectConfiguration>
2020
</ItemGroup>
2121
<ItemGroup>
22-
<ClCompile Include="..\..\examples\Benchmark.cpp" />
22+
<ClCompile Include="..\..\examples\ShaderEffects.cpp" />
2323
</ItemGroup>
2424
<PropertyGroup Label="Globals">
2525
<ProjectGuid>{7EDA038A-8CCC-492E-8E6F-56782E3A562E}</ProjectGuid>

build/VS2013/Example.vcxproj.filters

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
</Filter>
1616
</ItemGroup>
1717
<ItemGroup>
18-
<ClCompile Include="..\..\examples\Benchmark.cpp">
18+
<ClCompile Include="..\..\examples\ShaderEffects.cpp">
1919
<Filter>Source Files</Filter>
2020
</ClCompile>
2121
</ItemGroup>

examples/AddRemoveObjects.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ int main()
123123
//draw
124124
renderWindow.clear();
125125
renderWindow.draw(ml);
126-
ml.draw(renderWindow, tmx::MapLayer::Debug);
126+
ml.drawLayer(renderWindow, tmx::MapLayer::Debug);
127127
renderWindow.display();
128128

129129
const float time = 1.f / frameClock.getElapsedTime().asSeconds();

examples/DrawMapWithDebug.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ int main()
9090
frameClock.restart();
9191
renderWindow.clear();
9292
renderWindow.draw(ml);
93-
if(showDebug) ml.draw(renderWindow, tmx::MapLayer::Debug);//draw with debug information shown
93+
if(showDebug) ml.drawLayer(renderWindow, tmx::MapLayer::Debug);//draw with debug information shown
9494
renderWindow.display();
9595

9696
renderWindow.setTitle("Press D to Toggle debug shapes. " + std::to_string(1.f / frameClock.getElapsedTime().asSeconds()));

examples/IsometricWithConvertCoords.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ int main()
6767
//draw map
6868
renderWindow.clear();
6969
renderWindow.draw(ml);
70-
if(debug)ml.draw(renderWindow, tmx::MapLayer::Debug);
70+
if(debug)ml.drawLayer(renderWindow, tmx::MapLayer::Debug);
7171
renderWindow.display();
7272

7373
//print mouse coords to orthographic (screen) coords and world (isometric) coords

examples/MapWithQuadTree.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ int main()
6969
//draw
7070
renderWindow.clear();
7171
renderWindow.draw(ml);
72-
ml.draw(renderWindow, tmx::MapLayer::Debug); //draw with debug information shown
72+
ml.drawLayer(renderWindow, tmx::MapLayer::Debug); //draw with debug information shown
7373
renderWindow.display();
7474
}
7575

examples/ShaderEffects.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ int main()
212212
frameClock.restart();
213213
renderWindow.clear();
214214
renderWindow.draw(ml);
215-
if(showDebug) ml.draw(renderWindow, tmx::MapLayer::Debug);//draw with debug information shown
215+
if(showDebug) ml.drawLayer(renderWindow, tmx::MapLayer::Debug);//draw with debug information shown
216216
renderWindow.display();
217217

218218
renderWindow.setTitle("Press D to Toggle debug shapes. " + std::to_string(1.f / frameClock.getElapsedTime().asSeconds()));

0 commit comments

Comments
 (0)