mirror of
https://github.com/OMGeeky/pytiled_parser.git
synced 2026-01-04 10:32:18 +01:00
Changes to API
Should make integration with game engines easier in general. Puts the burden of color parsing on Pytiled. As well as formatting layer data into a two dimensional list from a straight one dimensional.
This commit is contained in:
@@ -15,106 +15,115 @@ EXPECTED = tiled_map.TiledMap(
|
||||
size=common_types.Size(10, 10),
|
||||
id=1,
|
||||
data=[
|
||||
3,
|
||||
3,
|
||||
3,
|
||||
3,
|
||||
9,
|
||||
9,
|
||||
9,
|
||||
9,
|
||||
17,
|
||||
17,
|
||||
3,
|
||||
3,
|
||||
3,
|
||||
9,
|
||||
9,
|
||||
9,
|
||||
9,
|
||||
17,
|
||||
17,
|
||||
17,
|
||||
3,
|
||||
3,
|
||||
3,
|
||||
9,
|
||||
9,
|
||||
9,
|
||||
9,
|
||||
9,
|
||||
17,
|
||||
17,
|
||||
3,
|
||||
3,
|
||||
1,
|
||||
7,
|
||||
9,
|
||||
9,
|
||||
9,
|
||||
15,
|
||||
17,
|
||||
17,
|
||||
1,
|
||||
1,
|
||||
12,
|
||||
5,
|
||||
7,
|
||||
7,
|
||||
7,
|
||||
15,
|
||||
15,
|
||||
15,
|
||||
12,
|
||||
1,
|
||||
5,
|
||||
5,
|
||||
7,
|
||||
7,
|
||||
7,
|
||||
15,
|
||||
15,
|
||||
15,
|
||||
2,
|
||||
2,
|
||||
5,
|
||||
5,
|
||||
5,
|
||||
5,
|
||||
4,
|
||||
14,
|
||||
14,
|
||||
14,
|
||||
2,
|
||||
2,
|
||||
5,
|
||||
5,
|
||||
5,
|
||||
4,
|
||||
14,
|
||||
14,
|
||||
14,
|
||||
14,
|
||||
2,
|
||||
2,
|
||||
2,
|
||||
5,
|
||||
5,
|
||||
5,
|
||||
4,
|
||||
14,
|
||||
14,
|
||||
14,
|
||||
2,
|
||||
2,
|
||||
2,
|
||||
2,
|
||||
5,
|
||||
5,
|
||||
4,
|
||||
4,
|
||||
14,
|
||||
14,
|
||||
[
|
||||
3,
|
||||
3,
|
||||
3,
|
||||
3,
|
||||
9,
|
||||
9,
|
||||
9,
|
||||
9,
|
||||
17,
|
||||
17,
|
||||
],
|
||||
[
|
||||
3,
|
||||
3,
|
||||
3,
|
||||
9,
|
||||
9,
|
||||
9,
|
||||
9,
|
||||
17,
|
||||
17,
|
||||
17,
|
||||
],
|
||||
[
|
||||
3,
|
||||
3,
|
||||
3,
|
||||
9,
|
||||
9,
|
||||
9,
|
||||
9,
|
||||
9,
|
||||
17,
|
||||
17,
|
||||
],
|
||||
[3, 3, 1, 7, 9, 9, 9, 15, 17, 17],
|
||||
[
|
||||
1,
|
||||
1,
|
||||
12,
|
||||
5,
|
||||
7,
|
||||
7,
|
||||
7,
|
||||
15,
|
||||
15,
|
||||
15,
|
||||
],
|
||||
[
|
||||
12,
|
||||
1,
|
||||
5,
|
||||
5,
|
||||
7,
|
||||
7,
|
||||
7,
|
||||
15,
|
||||
15,
|
||||
15,
|
||||
],
|
||||
[
|
||||
2,
|
||||
2,
|
||||
5,
|
||||
5,
|
||||
5,
|
||||
5,
|
||||
4,
|
||||
14,
|
||||
14,
|
||||
14,
|
||||
],
|
||||
[
|
||||
2,
|
||||
2,
|
||||
5,
|
||||
5,
|
||||
5,
|
||||
4,
|
||||
14,
|
||||
14,
|
||||
14,
|
||||
14,
|
||||
],
|
||||
[
|
||||
2,
|
||||
2,
|
||||
2,
|
||||
5,
|
||||
5,
|
||||
5,
|
||||
4,
|
||||
14,
|
||||
14,
|
||||
14,
|
||||
],
|
||||
[
|
||||
2,
|
||||
2,
|
||||
2,
|
||||
2,
|
||||
5,
|
||||
5,
|
||||
4,
|
||||
4,
|
||||
14,
|
||||
14,
|
||||
],
|
||||
],
|
||||
)
|
||||
],
|
||||
|
||||
@@ -13,7 +13,7 @@ EXPECTED = tiled_map.TiledMap(
|
||||
tiled_version="1.4.1",
|
||||
tile_size=common_types.Size(32, 32),
|
||||
version=1.4,
|
||||
background_color=common_types.Color("#ff0004"),
|
||||
background_color=common_types.Color(255, 0, 4, 255),
|
||||
tilesets={
|
||||
1: tileset.Tileset(
|
||||
columns=8,
|
||||
@@ -33,7 +33,7 @@ EXPECTED = tiled_map.TiledMap(
|
||||
},
|
||||
properties={
|
||||
"bool property - true": True,
|
||||
"color property": common_types.Color("#ff49fcff"),
|
||||
"color property": common_types.Color(255, 73, 252, 255),
|
||||
"file property": Path("../../../../../../var/log/syslog"),
|
||||
"float property": 1.23456789,
|
||||
"int property": 13,
|
||||
|
||||
Reference in New Issue
Block a user