Merge branch 'rf/caster' of https://github.com/Beefy-Swain/pytiled_parser into rf/caster

This commit is contained in:
Darren Eberly
2020-06-02 20:45:35 -04:00
13 changed files with 41 additions and 406 deletions

View File

@@ -113,8 +113,8 @@ class Tile:
animation: Each tile can have exactly one animation associated with it.
"""
id_: int
type_: Optional[str] = None
id: int
type: Optional[str] = None
terrain: Optional[TileTerrain] = None
animation: Optional[List[Frame]] = None
objectgroup: Optional[List[TiledObject]] = None

View File

@@ -635,11 +635,11 @@
"tilesets": [
{
"firstgid": 1,
"source": "../../old_tests/test_data/tile_set_image_objects.tsx"
"source": "tileset_image_objects.json"
},
{
"firstgid": 49,
"source": "../../old_tests/test_data/tile_set_image.tsx"
"source": "tileset_image.json"
}
],
"tilewidth": 32,

View File

@@ -11,4 +11,4 @@
"tilewidth":32,
"type":"tileset",
"version":1.2
}
}

View File

@@ -1,11 +1,11 @@
{ "columns":8,
"image":"images\/tmw_desert_spacing.png",
"image":"..\/images\/tmw_desert_spacing.png",
"imageheight":199,
"imagewidth":265,
"margin":1,
"name":"tile_set_image",
"spacing":1,
"tilecount":48,
"tilecount":5,
"tiledversion":"1.3.1",
"tileheight":32,
"tiles":[
@@ -189,4 +189,4 @@
"tilewidth":32,
"type":"tileset",
"version":1.2
}
}

View File

@@ -1,68 +0,0 @@
{ "compressionlevel":0,
"height":6,
"infinite":false,
"layers":[
{
"data":[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48],
"height":6,
"id":1,
"name":"Tile Layer 1",
"opacity":1,
"type":"tilelayer",
"visible":true,
"width":8,
"x":0,
"y":0
}],
"nextlayerid":2,
"nextobjectid":1,
"orientation":"orthogonal",
"properties":[
{
"name":"bool property - false",
"type":"bool",
"value":false
},
{
"name":"bool property - true",
"type":"bool",
"value":true
},
{
"name":"color property",
"type":"color",
"value":"#ff49fcff"
},
{
"name":"file property",
"type":"file",
"value":"..\/..\/..\/..\/..\/..\/..\/var\/log\/syslog"
},
{
"name":"float property",
"type":"float",
"value":1.23456789
},
{
"name":"int property",
"type":"int",
"value":13
},
{
"name":"string property",
"type":"string",
"value":"Hello, World!!"
}],
"renderorder":"right-down",
"tiledversion":"1.3.1",
"tileheight":32,
"tilesets":[
{
"firstgid":1,
"source":"tile_set.json"
}],
"tilewidth":32,
"type":"map",
"version":1.2,
"width":8
}

View File

@@ -59,7 +59,7 @@
"tilesets":[
{
"firstgid":1,
"source":"tile_set_image.json"
"source":"tileset_image.json"
}],
"tilewidth":32,
"type":"map",

View File

@@ -1,5 +1,5 @@
{ "columns":8,
"image":"images\/tmw_desert_spacing.png",
"image":"..\/images\/tmw_desert_spacing.png",
"imageheight":199,
"imagewidth":265,
"margin":1,
@@ -11,4 +11,4 @@
"tilewidth":32,
"type":"tileset",
"version":1.2
}
}

View File

@@ -186,7 +186,7 @@
"tilesets":[
{
"firstgid":1,
"source":"tile_set_image.json"
"source":"tileset_image.json"
}],
"tilewidth":32,
"type":"map",

View File

@@ -0,0 +1,14 @@
{ "columns":8,
"image":"..\/images\/tmw_desert_spacing.png",
"imageheight":199,
"imagewidth":265,
"margin":1,
"name":"tile_set_image",
"spacing":1,
"tilecount":48,
"tiledversion":"1.3.1",
"tileheight":32,
"tilewidth":32,
"type":"tileset",
"version":1.2
}

View File

@@ -71,7 +71,7 @@
"tilesets":[
{
"firstgid":1,
"source":"tile_set_image.json"
"source":"tileset_image.json"
}],
"tilewidth":32,
"type":"map",

View File

@@ -0,0 +1,14 @@
{ "columns":8,
"image":"..\/images\/tmw_desert_spacing.png",
"imageheight":199,
"imagewidth":265,
"margin":1,
"name":"tile_set_image",
"spacing":1,
"tilecount":48,
"tiledversion":"1.3.1",
"tileheight":32,
"tilewidth":32,
"type":"tileset",
"version":1.2
}

View File

@@ -1,255 +0,0 @@
{ "compressionlevel":0,
"height":10,
"infinite":false,
"layers":[
{
"data":[1, 2, 3, 4, 5, 6, 7, 8, 30, 30, 9, 10, 11, 12, 13, 14, 15, 16, 30, 30, 17, 18, 19, 20, 21, 22, 23, 24, 30, 30, 25, 26, 27, 28, 29, 30, 31, 32, 30, 30, 33, 34, 35, 36, 37, 38, 39, 40, 30, 30, 41, 42, 43, 44, 45, 46, 47, 48, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30],
"height":10,
"id":1,
"name":"Tile Layer 1",
"opacity":1,
"type":"tilelayer",
"visible":true,
"width":10,
"x":0,
"y":0
},
{
"data":[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 46, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7, 7, 7, 7, 7, 8, 0, 0, 0, 14, 15, 15, 15, 15, 15, 16, 0, 0, 0, 22, 23, 23, 23, 23, 23, 24, 0],
"height":10,
"id":2,
"name":"Tile Layer 2",
"opacity":0.5,
"type":"tilelayer",
"visible":true,
"width":10,
"x":0,
"y":0
},
{
"id":3,
"layers":[
{
"data":[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 31, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
"height":10,
"id":5,
"name":"Tile Layer 4",
"offsetx":49,
"offsety":-50,
"opacity":1,
"type":"tilelayer",
"visible":true,
"width":10,
"x":0,
"y":0
},
{
"data":[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 9, 10, 11, 0, 0, 0, 0, 0, 0, 0, 17, 18, 19, 0, 0, 0, 0, 0, 0, 0],
"height":10,
"id":4,
"name":"Tile Layer 3",
"opacity":1,
"type":"tilelayer",
"visible":true,
"width":10,
"x":0,
"y":0
}],
"name":"Group 1",
"opacity":1,
"properties":[
{
"name":"bool property",
"type":"bool",
"value":true
}],
"type":"group",
"visible":true,
"x":0,
"y":0
},
{
"color":"#000000",
"draworder":"index",
"id":6,
"name":"Object Layer 1",
"objects":[
{
"height":25,
"id":1,
"name":"rectangle 1",
"rotation":15,
"type":"rectangle type",
"visible":true,
"width":47.25,
"x":200.25,
"y":210.75
},
{
"height":0,
"id":2,
"name":"polygon 1",
"polygon":[
{
"x":0,
"y":0
},
{
"x":-41.25,
"y":24.25
},
{
"x":-11,
"y":67.25
},
{
"x":25.75,
"y":39.75
},
{
"x":-9,
"y":37.75
}],
"rotation":-21,
"type":"polygon type",
"visible":true,
"width":0,
"x":252.5,
"y":87.75
},
{
"ellipse":true,
"height":14.25,
"id":3,
"name":"elipse 1",
"rotation":0,
"type":"elipse type",
"visible":true,
"width":17.75,
"x":198.75,
"y":102.5
},
{
"height":0,
"id":4,
"name":"point 1",
"point":true,
"rotation":0,
"type":"point type",
"visible":true,
"width":0,
"x":174.25,
"y":186
},
{
"height":27.25,
"id":7,
"name":"insert text 1",
"rotation":0,
"text":
{
"color":"#b40303",
"fontfamily":"Sans Serif",
"italic":true,
"pixelsize":17,
"strikeout":true,
"text":"Hello World",
"underline":true,
"wrap":true
},
"type":"insert text type",
"visible":true,
"width":107.625,
"x":11.3958,
"y":48.5833
},
{
"gid":3221225503,
"height":53,
"id":6,
"name":"inserted tile 1",
"properties":[
{
"name":"tile property bool",
"type":"bool",
"value":true
}],
"rotation":31,
"type":"inserted tile type",
"visible":true,
"width":47,
"x":47.25,
"y":72.5
},
{
"height":0,
"id":8,
"name":"polyline 1",
"polyline":[
{
"x":0,
"y":0
},
{
"x":-14.3333,
"y":35.6667
},
{
"x":15.3333,
"y":18.3333
}],
"rotation":0,
"type":"polyline type",
"visible":true,
"width":0,
"x":144.667,
"y":112
},
{
"height":0,
"id":9,
"name":"polygon 2",
"polygon":[
{
"x":-3.25,
"y":-17.25
},
{
"x":-15,
"y":10.75
},
{
"x":20.75,
"y":4.5
}],
"rotation":0,
"type":"polygon type",
"visible":true,
"width":0,
"x":69.8333,
"y":168.333
}],
"offsetx":4.66667,
"offsety":-4.33333,
"opacity":0.9,
"type":"objectgroup",
"visible":true,
"x":0,
"y":0
}],
"nextlayerid":16,
"nextobjectid":10,
"orientation":"orthogonal",
"renderorder":"right-down",
"tiledversion":"1.3.1",
"tileheight":32,
"tilesets":[
{
"firstgid":1,
"source":"tile_set_image.json"
}],
"tilewidth":32,
"type":"map",
"version":1.2,
"width":10
}

View File

@@ -1,70 +0,0 @@
{ "compressionlevel":0,
"height":6,
"infinite":false,
"layers":[
{
"compression":"gzip",
"data":"H4sIAAAAAAAEAw3DBRKCQAAAwDMRA7BQLMTE9v+vY3dmWyGEth279uwbOTB26MixExNTM6fOnLtwae7KtYUbt+7ce7D0aOXJsxev3rxb+\/Dpy7cfv\/782wAcvDirwAAAAA==",
"encoding":"base64",
"height":6,
"id":1,
"name":"Tile Layer 1",
"opacity":1,
"type":"tilelayer",
"visible":true,
"width":8,
"x":0,
"y":0
}],
"nextlayerid":2,
"nextobjectid":1,
"orientation":"orthogonal",
"properties":[
{
"name":"bool property - false",
"type":"bool",
"value":false
},
{
"name":"bool property - true",
"type":"bool",
"value":true
},
{
"name":"color property",
"type":"color",
"value":"#ff49fcff"
},
{
"name":"file property",
"type":"file",
"value":"..\/..\/..\/..\/..\/..\/..\/..\/var\/log\/syslog"
},
{
"name":"float property",
"type":"float",
"value":1.23456789
},
{
"name":"int property",
"type":"int",
"value":13
},
{
"name":"string property",
"type":"string",
"value":"Hello, World!!"
}],
"renderorder":"right-down",
"tiledversion":"1.3.1",
"tileheight":32,
"tilesets":[
{
"firstgid":1,
"source":"tile_set_image.json"
}],
"tilewidth":32,
"type":"map",
"version":1.2,
"width":8
}