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:
Darren Eberly
2021-02-21 00:58:30 -05:00
parent ed825c5b71
commit 674b4b50c4
24 changed files with 700 additions and 738 deletions

View File

@@ -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,