Merge pull request #38 from Beefy-Swain/development

Merge development for v1.5.0
This commit is contained in:
Darren Eberly
2021-05-16 00:54:38 -04:00
committed by GitHub
93 changed files with 1880 additions and 2484 deletions

3
.gitignore vendored
View File

@@ -1,3 +1,6 @@
# Tiled Session file from using a project file
*.tiled-session
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]

View File

@@ -6,6 +6,22 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
## [Unreleased]
## [1.5.0] - 2021-05-16
This release contains several new features. As of this release pytiled-parser supports 100% of Tiled's feature-set as of Tiled 1.6.
As of version 1.5.0 of pytiled-parser, we are supporting a minimum version of Tiled 1.5. Many features will still work with older versions, but we cannot guarantee functionality with those versions.
### Additions
- Added support for object template files
- Added `World` object to support loading Tiled `.world` files.
- Full support for Wang Sets/Terrains
### Changes
- The `version` attribute of `TiledMap` and `TileSet` is now a string with Tiled major/minor version. For example `"1.6"`. It used to be a float like `1.6`. This is due to Tiled changing that on their side. pytiled-parser will still load in the value regardless if it is a number or string in the JSON, but it will be converted to a string within pytiled-parser if it comes in as a float.
## [1.4.0] - 2021-04-25
- Fixes issues with image loading for external tilesets. Previously, if an external tileset was in a different directory than the map file, image paths for the tileset would be incorrect. This was due to all images being given relative paths to the map file, regardless of if they were for an external tileset. This has been solved by giving absolute paths for images from external tilesets. Relative paths for embedded tilesets is still fine as the tileset is part of the map file.

View File

@@ -402,7 +402,9 @@ def _cast_tile_layer(raw_layer: RawLayer) -> TileLayer:
return tile_layer
def _cast_object_layer(raw_layer: RawLayer) -> ObjectLayer:
def _cast_object_layer(
raw_layer: RawLayer, parent_dir: Optional[Path] = None
) -> ObjectLayer:
"""Cast the raw_layer to an ObjectLayer.
Args:
@@ -413,7 +415,7 @@ def _cast_object_layer(raw_layer: RawLayer) -> ObjectLayer:
tiled_objects = []
for tiled_object_ in raw_layer["objects"]:
tiled_objects.append(tiled_object.cast(tiled_object_))
tiled_objects.append(tiled_object.cast(tiled_object_, parent_dir))
return ObjectLayer(
tiled_objects=tiled_objects,
@@ -441,7 +443,9 @@ def _cast_image_layer(raw_layer: RawLayer) -> ImageLayer:
return image_layer
def _cast_group_layer(raw_layer: RawLayer) -> LayerGroup:
def _cast_group_layer(
raw_layer: RawLayer, parent_dir: Optional[Path] = None
) -> LayerGroup:
"""Cast the raw_layer to a LayerGroup.
Args:
@@ -454,7 +458,7 @@ def _cast_group_layer(raw_layer: RawLayer) -> LayerGroup:
layers = []
for layer in raw_layer["layers"]:
layers.append(cast(layer))
layers.append(cast(layer, parent_dir))
return LayerGroup(layers=layers, **_get_common_attributes(raw_layer).__dict__)
@@ -477,7 +481,7 @@ def _get_caster(type_: str) -> Callable[[RawLayer], Layer]:
return casters[type_]
def cast(raw_layer: RawLayer) -> Layer:
def cast(raw_layer: RawLayer, parent_dir: Optional[Path] = None) -> Layer:
"""Cast a raw Tiled layer into a pytiled_parser type.
This function will determine the type of layer and cast accordingly.
@@ -490,4 +494,10 @@ def cast(raw_layer: RawLayer) -> Layer:
"""
caster = _get_caster(raw_layer["type"])
return caster(raw_layer)
if (
caster.__name__ == "_cast_object_layer"
or caster.__name__ == "_cast_group_layer"
):
return caster(raw_layer, parent_dir)
else:
return caster(raw_layer)

View File

@@ -1,8 +0,0 @@
# pylint: disable=too-few-public-methods
import attr
@attr.s(auto_attribs=True)
class Template:
"""FIXME TODO"""

View File

@@ -60,7 +60,7 @@ class TiledMap:
tiled_version: str
tile_size: Size
tilesets: TilesetDict
version: float
version: str
map_file: Optional[Path] = None
background_color: Optional[Color] = None
@@ -102,7 +102,7 @@ class _RawTiledMap(TypedDict):
tilesets: List[_RawTilesetMapping]
tilewidth: int
type: str
version: float
version: Union[str, float]
width: int
@@ -139,11 +139,16 @@ def parse_map(file: Path) -> TiledMap:
raw_tileset = typing_cast(RawTileSet, raw_tileset)
tilesets[raw_tileset["firstgid"]] = tileset.cast(raw_tileset)
if isinstance(raw_tiled_map["version"], float):
version = str(raw_tiled_map["version"])
else:
version = raw_tiled_map["version"]
# `map` is a built-in function
map_ = TiledMap(
map_file=file,
infinite=raw_tiled_map["infinite"],
layers=[layer.cast(layer_) for layer_ in raw_tiled_map["layers"]],
layers=[layer.cast(layer_, parent_dir) for layer_ in raw_tiled_map["layers"]],
map_size=Size(raw_tiled_map["width"], raw_tiled_map["height"]),
next_layer_id=raw_tiled_map["nextlayerid"],
next_object_id=raw_tiled_map["nextobjectid"],
@@ -152,7 +157,7 @@ def parse_map(file: Path) -> TiledMap:
tiled_version=raw_tiled_map["tiledversion"],
tile_size=Size(raw_tiled_map["tilewidth"], raw_tiled_map["tileheight"]),
tilesets=tilesets,
version=raw_tiled_map["version"],
version=version,
)
if raw_tiled_map.get("backgroundcolor") is not None:

View File

@@ -1,5 +1,6 @@
# pylint: disable=too-few-public-methods
import json
from pathlib import Path
from typing import Callable, Dict, List, Optional, Union
import attr
@@ -174,6 +175,7 @@ class RawTiledObject(TypedDict):
id: int
gid: int
template: str
x: float
y: float
width: float
@@ -390,7 +392,9 @@ def _get_caster(
return _cast_rectangle
def cast(raw_tiled_object: RawTiledObject) -> TiledObject:
def cast(
raw_tiled_object: RawTiledObject, parent_dir: Optional[Path] = None
) -> TiledObject:
"""Cast the raw tiled object into a pytiled_parser type
Args:
@@ -399,6 +403,18 @@ def cast(raw_tiled_object: RawTiledObject) -> TiledObject:
Returns:
TiledObject: a properly typed Tiled object.
"""
if raw_tiled_object.get("template"):
if not parent_dir:
raise RuntimeError(
"A parent directory must be specified when using object templates"
)
template_path = Path(parent_dir / raw_tiled_object["template"])
with open(template_path) as raw_template_file:
loaded_template = json.load(raw_template_file)["object"]
for key in loaded_template:
if key != "id":
raw_tiled_object[key] = loaded_template[key] # type: ignore
caster = _get_caster(raw_tiled_object)
tiled_object = caster(raw_tiled_object)

View File

@@ -1,6 +1,6 @@
# pylint: disable=too-few-public-methods
from pathlib import Path
from typing import Dict, List, NamedTuple, Optional
from typing import Dict, List, NamedTuple, Optional, Union
import attr
from typing_extensions import TypedDict
@@ -9,6 +9,8 @@ from . import layer
from . import properties as properties_
from .common_types import Color, OrderedPair
from .util import parse_color
from .wang_set import RawWangSet, WangSet
from .wang_set import cast as cast_wangset
class Grid(NamedTuple):
@@ -29,39 +31,6 @@ class Grid(NamedTuple):
height: int
class Terrain(NamedTuple):
"""Terrain object.
Args:
name: The name of the terrain type.
tile: The local tile-id of the tile that represents the terrain visually.
"""
name: str
tile: int
properties: Optional[properties_.Properties] = None
@attr.s(auto_attribs=True)
class TileTerrain:
"""Defines each corner of a tile by Terrain index in
'TileSet.terrain_types'.
Defaults to 'None'. 'None' means that corner has no terrain.
Attributes:
top_left: Top left terrain type.
top_right: Top right terrain type.
bottom_left: Bottom left terrain type.
bottom_right: Bottom right terrain type.
"""
top_left: Optional[int] = None
top_right: Optional[int] = None
bottom_left: Optional[int] = None
bottom_right: Optional[int] = None
class Frame(NamedTuple):
"""Animation Frame object.
@@ -77,6 +46,27 @@ class Frame(NamedTuple):
duration: int
@attr.s(auto_attribs=True, kw_only=True)
class Transformations:
"""Transformations Object.
This is used to store what transformations may be performed on Tiles
within a tileset. (This is primarily used with wang sets, however could
be used for any means a game wants really.)
Args:
hflip: Allow horizontal flip?
vflip: Allow vertical flip?
rotate: Allow rotation?
prefer_untransformed: Should untransformed tiles be preferred?
"""
hflip: Optional[bool] = None
vflip: Optional[bool] = None
rotate: Optional[bool] = None
prefer_untransformed: Optional[bool] = None
@attr.s(auto_attribs=True, kw_only=True)
class Tile:
# FIXME: args
@@ -95,7 +85,6 @@ class Tile:
id: int
opacity: int = 1
type: Optional[str] = None
terrain: Optional[TileTerrain] = None
animation: Optional[List[Frame]] = None
objects: Optional[layer.Layer] = None
image: Optional[Path] = None
@@ -127,9 +116,6 @@ class Tileset:
tileoffset: Used to specify an offset in pixels when drawing a tile from the
tileset. When not present, no offset is applied.
image: Used for spritesheet tile sets.
terrain_types: List of of terrain types which can be referenced from the
terrain attribute of the tile object. Ordered according to the terrain
element's appearance in the TSX file.
tiles: Dict of Tile objects by Tile.id.
tsx_file: Path of the file containing the tileset, None if loaded internally
from a map
@@ -144,26 +130,28 @@ class Tileset:
tile_count: int
columns: int
type: str = "tileset"
spacing: int = 0
margin: int = 0
type: Optional[str] = None
tiled_version: Optional[str] = None
version: Optional[float] = None
version: Optional[str] = None
image: Optional[Path] = None
image_width: Optional[int] = None
image_height: Optional[int] = None
transformations: Optional[Transformations] = None
firstgid: Optional[int] = None
background_color: Optional[Color] = None
tile_offset: Optional[OrderedPair] = None
transparent_color: Optional[Color] = None
grid: Optional[Grid] = None
properties: Optional[properties_.Properties] = None
terrain_types: Optional[List[Terrain]] = None
tiles: Optional[Dict[int, Tile]] = None
wang_sets: Optional[List[WangSet]] = None
class RawFrame(TypedDict):
@@ -180,12 +168,13 @@ class RawTileOffset(TypedDict):
y: int
class RawTerrain(TypedDict):
""" The keys and their types that appear in a Terrain JSON Object."""
class RawTransformations(TypedDict):
""" The keys and their types that appear in a Transformations JSON Object."""
name: str
properties: List[properties_.RawProperty]
tile: int
hflip: bool
vflip: bool
rotate: bool
preferuntransformed: bool
class RawTile(TypedDict):
@@ -199,7 +188,6 @@ class RawTile(TypedDict):
opacity: float
properties: List[properties_.RawProperty]
objectgroup: layer.RawLayer
terrain: List[int]
type: str
@@ -226,7 +214,6 @@ class RawTileSet(TypedDict):
properties: List[properties_.RawProperty]
source: str
spacing: int
terrains: List[RawTerrain]
tilecount: int
tiledversion: str
tileheight: int
@@ -234,8 +221,9 @@ class RawTileSet(TypedDict):
tiles: List[RawTile]
tilewidth: int
transparentcolor: str
type: str
version: float
transformations: RawTransformations
version: Union[str, float]
wangsets: List[RawWangSet]
def _cast_frame(raw_frame: RawFrame) -> Frame:
@@ -264,29 +252,6 @@ def _cast_tile_offset(raw_tile_offset: RawTileOffset) -> OrderedPair:
return OrderedPair(raw_tile_offset["x"], raw_tile_offset["y"])
def _cast_terrain(raw_terrain: RawTerrain) -> Terrain:
"""Cast the raw_terrain to a Terrain object.
Args:
raw_terrain: RawTerrain to be casted to a Terrain
Returns:
Terrain: The Terrain created from the raw_terrain
"""
if raw_terrain.get("properties") is not None:
return Terrain(
name=raw_terrain["name"],
tile=raw_terrain["tile"],
properties=properties_.cast(raw_terrain["properties"]),
)
else:
return Terrain(
name=raw_terrain["name"],
tile=raw_terrain["tile"],
)
def _cast_tile(raw_tile: RawTile, external_path: Optional[Path] = None) -> Tile:
"""Cast the raw_tile to a Tile object.
@@ -323,22 +288,30 @@ def _cast_tile(raw_tile: RawTile, external_path: Optional[Path] = None) -> Tile:
if raw_tile.get("imageheight") is not None:
tile.image_height = raw_tile["imageheight"]
if raw_tile.get("terrain") is not None:
raw_terrain = raw_tile["terrain"]
terrain = TileTerrain(
top_left=raw_terrain[0],
top_right=raw_terrain[1],
bottom_left=raw_terrain[2],
bottom_right=raw_terrain[3],
)
tile.terrain = terrain
if raw_tile.get("type") is not None:
tile.type = raw_tile["type"]
return tile
def _cast_transformations(raw_transformations: RawTransformations) -> Transformations:
"""Cast the raw_transformations to a Transformations object.
Args:
raw_transformations: RawTransformations to be casted to a Transformations
Returns:
Transformations: The Transformations created from the raw_transformations
"""
return Transformations(
hflip=raw_transformations["hflip"],
vflip=raw_transformations["vflip"],
rotate=raw_transformations["rotate"],
prefer_untransformed=raw_transformations["preferuntransformed"],
)
def _cast_grid(raw_grid: RawGrid) -> Grid:
"""Cast the raw_grid to a Grid object.
@@ -361,6 +334,7 @@ def cast(raw_tileset: RawTileSet, external_path: Optional[Path] = None) -> Tiles
Args:
raw_tileset: Raw Tileset to be cast.
external_path: The path to the tileset if it is not an embedded one.
Returns:
TileSet: a properly typed TileSet.
@@ -376,11 +350,11 @@ def cast(raw_tileset: RawTileSet, external_path: Optional[Path] = None) -> Tiles
margin=raw_tileset["margin"],
)
if raw_tileset.get("type") is not None:
tileset.type = raw_tileset["type"]
if raw_tileset.get("version") is not None:
tileset.version = raw_tileset["version"]
if isinstance(raw_tileset["version"], float):
tileset.version = str(raw_tileset["version"])
else:
tileset.version = raw_tileset["version"]
if raw_tileset.get("tiledversion") is not None:
tileset.tiled_version = raw_tileset["tiledversion"]
@@ -417,16 +391,19 @@ def cast(raw_tileset: RawTileSet, external_path: Optional[Path] = None) -> Tiles
if raw_tileset.get("properties") is not None:
tileset.properties = properties_.cast(raw_tileset["properties"])
if raw_tileset.get("terrains") is not None:
terrains = []
for raw_terrain in raw_tileset["terrains"]:
terrains.append(_cast_terrain(raw_terrain))
tileset.terrain_types = terrains
if raw_tileset.get("tiles") is not None:
tiles = {}
for raw_tile in raw_tileset["tiles"]:
tiles[raw_tile["id"]] = _cast_tile(raw_tile, external_path=external_path)
tileset.tiles = tiles
if raw_tileset.get("wangsets") is not None:
wangsets = []
for raw_wangset in raw_tileset["wangsets"]:
wangsets.append(cast_wangset(raw_wangset))
tileset.wang_sets = wangsets
if raw_tileset.get("transformations") is not None:
tileset.transformations = _cast_transformations(raw_tileset["transformations"])
return tileset

View File

@@ -1,3 +1,3 @@
"""pytiled_parser version"""
__version__ = "1.4.0"
__version__ = "1.5.0"

View File

@@ -1,36 +1,38 @@
from typing import List, NamedTuple, Optional
from typing import Dict, List, Optional
import attr
from typing_extensions import TypedDict
from . import properties as properties_
from .common_types import Color, OrderedPair
from .common_types import Color
from .util import parse_color
class WangTile(NamedTuple):
@attr.s(auto_attribs=True)
class WangTile:
id: int
dflip: bool = False
hflip: bool = False
vflip: bool = False
wang_ids: List[int] = []
tile_id: int
wang_id: List[int]
class WangColor(NamedTuple):
@attr.s(auto_attribs=True)
class WangColor:
color: Color
name: str
probability: float
tile: int
properties: Optional[properties_.Properties] = None
class WangSet(NamedTuple):
@attr.s(auto_attribs=True)
class WangSet:
cornercolors: List[WangColor]
edgecolors: List[WangColor]
name: str
tile: int
wang_tiles: List[WangTile]
wang_type: str
wang_tiles: Dict[int, WangTile]
wang_colors: List[WangColor]
properties: Optional[properties_.Properties] = None
@@ -38,9 +40,8 @@ class RawWangTile(TypedDict):
""" The keys and their types that appear in a Wang Tile JSON Object."""
tileid: int
dflip: bool
hflip: bool
vflip: bool
# Tiled stores these IDs as a list represented like so:
# [top, top_right, right, bottom_right, bottom, bottom_left, left, top_left]
wangid: List[int]
@@ -51,7 +52,81 @@ class RawWangColor(TypedDict):
name: str
probability: float
tile: int
properties: List[properties_.RawProperty]
class RawWangSet(TypedDict):
""" The keys and their types that appear in a Wang Set JSON Object."""
colors: List[RawWangColor]
name: str
properties: List[properties_.RawProperty]
tile: int
type: str
wangtiles: List[RawWangTile]
def _cast_wang_tile(raw_wang_tile: RawWangTile) -> WangTile:
"""Cast the raw wang tile into a pytiled_parser type
Args:
raw_wang_tile: RawWangTile to be cast.
Returns:
WangTile: A properly typed WangTile.
"""
return WangTile(tile_id=raw_wang_tile["tileid"], wang_id=raw_wang_tile["wangid"])
def _cast_wang_color(raw_wang_color: RawWangColor) -> WangColor:
"""Cast the raw wang color into a pytiled_parser type
Args:
raw_wang_color: RawWangColor to be cast.
Returns:
WangColor: A properly typed WangColor.
"""
wang_color = WangColor(
name=raw_wang_color["name"],
color=parse_color(raw_wang_color["color"]),
tile=raw_wang_color["tile"],
probability=raw_wang_color["probability"],
)
if raw_wang_color.get("properties") is not None:
wang_color.properties = properties_.cast(raw_wang_color["properties"])
return wang_color
def cast(raw_wangset: RawWangSet) -> WangSet:
"""Cast the raw wangset into a pytiled_parser type
Args:
raw_wangset: Raw Wangset to be cast.
Returns:
WangSet: A properly typed WangSet.
"""
colors = []
for raw_wang_color in raw_wangset["colors"]:
colors.append(_cast_wang_color(raw_wang_color))
tiles = {}
for raw_wang_tile in raw_wangset["wangtiles"]:
tiles[raw_wang_tile["tileid"]] = _cast_wang_tile(raw_wang_tile)
wangset = WangSet(
name=raw_wangset["name"],
tile=raw_wangset["tile"],
wang_type=raw_wangset["type"],
wang_colors=colors,
wang_tiles=tiles,
)
if raw_wangset.get("properties") is not None:
wangset.properties = properties_.cast(raw_wangset["properties"])
return wangset

141
pytiled_parser/world.py Normal file
View File

@@ -0,0 +1,141 @@
import json
import re
from os import listdir
from os.path import isfile, join
from pathlib import Path
from typing import List
import attr
from typing_extensions import TypedDict
from .common_types import OrderedPair, Size
from .tiled_map import TiledMap, parse_map
@attr.s(auto_attribs=True)
class WorldMap:
tiled_map: TiledMap
size: Size
coordinates: OrderedPair
@attr.s(auto_attribs=True)
class World:
maps: List[WorldMap]
only_show_adjacent: bool = False
class RawPattern(TypedDict):
"""The keys and their types that appear in a Pattern JSON Object."""
regexp: str
multiplierX: float
multiplierY: float
offsetX: float
offsetY: float
class RawWorldMap(TypedDict):
"""The keys and their types that appear in a WorldMap JSON Object."""
fileName: str
height: float
width: float
x: float
y: float
class RawWorld(TypedDict):
"""The keys and their types that appear in a World JSON Object."""
maps: List[RawWorldMap]
patterns: List[RawPattern]
onlyShowAdjacentMaps: bool
def _cast_world_map(raw_world_map: RawWorldMap, map_file: Path) -> WorldMap:
"""Parse the RawWorldMap into a WorldMap.
Args:
raw_world_map: The RawWorldMap to parse
map_file: The file of tiled_map to parse
Returns:
WorldMap: The parsed WorldMap object
"""
tiled_map = parse_map(map_file)
return WorldMap(
tiled_map=tiled_map,
size=Size(raw_world_map["width"], raw_world_map["height"]),
coordinates=OrderedPair(raw_world_map["x"], raw_world_map["y"]),
)
def parse_world(file: Path) -> World:
"""Parse the raw world into a pytiled_parser type
Args:
file: Path to the world's file
Returns:
World: A properly parsed World
"""
with open(file) as world_file:
raw_world = json.load(world_file)
parent_dir = file.parent
maps: List[WorldMap] = []
if raw_world.get("maps"):
for raw_map in raw_world["maps"]:
map_path = Path(parent_dir / raw_map["fileName"])
maps.append(_cast_world_map(raw_map, map_path))
if raw_world.get("patterns"):
for raw_pattern in raw_world["patterns"]:
regex = re.compile(raw_pattern["regexp"])
map_files = [
f
for f in listdir(parent_dir)
if isfile(join(parent_dir, f)) and regex.match(f)
]
for map_file in map_files:
search = regex.search(map_file)
if search:
width = raw_pattern["multiplierX"]
height = raw_pattern["multiplierY"]
offset_x = 0
offset_y = 0
if raw_pattern.get("offsetX"):
offset_x = raw_pattern["offsetX"]
if raw_pattern.get("offsetY"):
offset_y = raw_pattern["offsetY"]
x = (float(search.group(1)) * width) + offset_x
y = (float(search.group(2)) * height) + offset_y
raw_world_map: RawWorldMap = {
"fileName": map_file,
"width": width,
"height": height,
"x": x,
"y": y,
}
map_path = Path(parent_dir / map_file)
maps.append(_cast_world_map(raw_world_map, map_path))
world = World(maps=maps)
if raw_world.get("onlyShowAdjacentMaps"):
world.only_show_adjacent = raw_world["onlyShowAdjacentMaps"]
return world

View File

@@ -1,649 +0,0 @@
{
"compressionlevel": 0,
"editorsettings": {
"export": {
"target": "."
}
},
"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
},
{
"draworder": "topdown",
"id": 2,
"name": "Object Layer 1",
"objects": [
{
"height": 41.4686825053996,
"id": 1,
"name": "name: rectangle",
"rotation": 0,
"type": "rectangle",
"visible": true,
"width": 45.3972945322269,
"x": 27.7185404115039,
"y": 23.571672160964
},
{
"height": 0,
"id": 2,
"name": "name: point",
"point": true,
"rotation": 0,
"type": "point",
"visible": true,
"width": 0,
"x": 159.981811981357,
"y": 82.9373650107991
},
{
"height": 0,
"id": 3,
"name": "name: point invisible",
"point": true,
"rotation": 0,
"type": "point",
"visible": false,
"width": 0,
"x": 109.346368080027,
"y": 95.8144822098443
},
{
"height": 32.7384335568944,
"id": 4,
"name": "name: rectangle - invisible",
"rotation": 0,
"type": "rectangle",
"visible": false,
"width": 30.9923837671934,
"x": 163.910424008185,
"y": 91.0128452881664
},
{
"height": 22,
"id": 5,
"name": "name: rectangle - rotated",
"rotation": 10,
"type": "rectangle",
"visible": true,
"width": 10,
"x": 183.335227918609,
"y": 23.3534159372513
},
{
"ellipse": true,
"height": 18.5517790155735,
"id": 6,
"name": "name: ellipse",
"rotation": 0,
"type": "ellipse",
"visible": true,
"width": 57.4013868364215,
"x": 37.5400704785722,
"y": 81.1913152210981
},
{
"ellipse": true,
"height": 31.4288962146186,
"id": 7,
"name": "name: ellipse - invisible",
"rotation": 0,
"type": "ellipse",
"visible": false,
"width": 6.32943048766625,
"x": 22.6986472661134,
"y": 53.9092872570194
},
{
"ellipse": true,
"height": 24.2264408321018,
"id": 8,
"name": "name: ellipse - rotated",
"rotation": 111,
"type": "ellipse",
"visible": true,
"width": 29.6828464249176,
"x": 35.7940206888712,
"y": 120.040923041946
},
{
"height": 0,
"id": 9,
"name": "name: polygon",
"polygon": [
{
"x": 0,
"y": 0
},
{
"x": 19.424803910424,
"y": 27.063771740366
},
{
"x": 19.6430601341366,
"y": 3.05558713197681
},
{
"x": -2.61907468455156,
"y": 15.9327043310219
},
{
"x": 25.317721950665,
"y": 16.3692167784472
}
],
"rotation": 0,
"type": "polygon",
"visible": true,
"width": 0,
"x": 89.485051722178,
"y": 38.6313515971354
},
{
"height": 0,
"id": 10,
"name": "name: polygon - invisible",
"polygon": [
{
"x": 0,
"y": 0
},
{
"x": -12.8771171990451,
"y": 7.63896782994203
},
{
"x": -14.8414232124588,
"y": -10.2580425144936
}
],
"rotation": 0,
"type": "polygon",
"visible": false,
"width": 0,
"x": 133.791065135842,
"y": 24.4446970558145
},
{
"height": 0,
"id": 11,
"name": "name: polygon - rotated",
"polygon": [
{
"x": 0,
"y": 0
},
{
"x": -12.8771171990451,
"y": 0
},
{
"x": -6.98419915880413,
"y": 7.63896782994203
},
{
"x": -13.9683983176083,
"y": 16.8057292258725
},
{
"x": 3.71035580311468,
"y": 15.277935659884
},
{
"x": -3.71035580311471,
"y": 8.29373650107991
}
],
"rotation": 123,
"type": "polygon",
"visible": true,
"width": 0,
"x": 152.779356598841,
"y": 19.8613163578493
},
{
"height": 0,
"id": 12,
"name": "name: polyline",
"polyline": [
{
"x": 0,
"y": 0
},
{
"x": -13.3136296464704,
"y": 41.0321700579743
},
{
"x": 21.3891099238377,
"y": 16.8057292258725
}
],
"rotation": 0,
"type": "polyline",
"visible": true,
"width": 0,
"x": 124.187791292486,
"y": 90.1398203933159
},
{
"height": 0,
"id": 31,
"name": "name: polyline - invisible",
"polyline": [
{
"x": 0,
"y": 0
},
{
"x": -9,
"y": 20.3333333333333
},
{
"x": 5,
"y": 23.6666666666667
}
],
"rotation": 0,
"type": "polyline",
"visible": false,
"width": 0,
"x": 140,
"y": 163.333333333333
},
{
"height": 0,
"id": 32,
"name": "name: polyline - rotated",
"polyline": [
{
"x": 0,
"y": 0
},
{
"x": 10.3333333333333,
"y": 13
},
{
"x": -5.33333333333331,
"y": 19.6666666666667
}
],
"rotation": 0,
"type": "polyline",
"visible": true,
"width": 0,
"x": 192.333333333333,
"y": 128.666666666667
},
{
"gid": 79,
"height": 32,
"id": 13,
"name": "name: tile",
"rotation": 0,
"type": "tile",
"visible": true,
"width": 32,
"x": 111.898147095601,
"y": 48.3019211094691
},
{
"gid": 80,
"height": 32,
"id": 14,
"name": "name: tile - invisible",
"rotation": 0,
"type": "tile",
"visible": false,
"width": 32,
"x": 41.1831306127089,
"y": 168.779356598841
},
{
"gid": 2147483742,
"height": 32,
"id": 15,
"name": "name: tile - horizontal flipped",
"rotation": 0,
"type": "tile",
"visible": true,
"width": 32,
"x": 197.236330567239,
"y": 59.8695009662385
},
{
"gid": 1073741918,
"height": 32,
"id": 16,
"name": "name: tile - vertical flipped",
"rotation": 0,
"type": "tile",
"visible": true,
"width": 32,
"x": 32.4528816642037,
"y": 60.742525861089
},
{
"gid": 3221225558,
"height": 32,
"id": 17,
"name": "name: tile - both flipped",
"rotation": 0,
"type": "tile",
"visible": true,
"width": 32,
"x": 167.553484142321,
"y": 95.6635216551097
},
{
"gid": 86,
"height": 32,
"id": 18,
"name": "name: tile - rotated",
"rotation": 89,
"type": "tile",
"visible": true,
"width": 32,
"x": 85.65,
"y": 142.62
},
{
"height": 19,
"id": 19,
"name": "name: text",
"rotation": 0,
"text": {
"text": "Hello World",
"wrap": true
},
"type": "text",
"visible": true,
"width": 92.375,
"x": 81.7106470956008,
"y": 93.2986813686484
},
{
"height": 19,
"id": 20,
"name": "name: text - invisible",
"rotation": 0,
"text": {
"text": "Hello World",
"wrap": true
},
"type": "text",
"visible": false,
"width": 92.375,
"x": 8.37655592815732,
"y": 112.068716607935
},
{
"height": 19,
"id": 21,
"name": "name: text - rotated",
"rotation": 19,
"text": {
"text": "Hello World",
"wrap": true
},
"type": "text",
"visible": true,
"width": 92.375,
"x": 157.882069171308,
"y": 78.4572581561896
},
{
"height": 19,
"id": 22,
"name": "name: text - different font",
"rotation": 0,
"text": {
"bold": true,
"fontfamily": "DejaVu Sans",
"pixelsize": 19,
"text": "Hello World",
"wrap": true
},
"type": "text",
"visible": true,
"width": 92.375,
"x": 2.70189411162896,
"y": 101.592417869728
},
{
"height": 19,
"id": 23,
"name": "name: text - no word wrap",
"rotation": 0,
"text": {
"text": "Hello World"
},
"type": "text",
"visible": true,
"width": 92.375,
"x": 9.90434949414573,
"y": 154.192167784472
},
{
"height": 19,
"id": 24,
"name": "name: text - right bottom align",
"rotation": 0,
"text": {
"halign": "right",
"text": "Hello World",
"valign": "bottom",
"wrap": true
},
"type": "text",
"visible": true,
"width": 92.375,
"x": 151.989151131067,
"y": 1.19455496191883
},
{
"height": 19,
"id": 25,
"name": "text: center center align",
"rotation": 0,
"text": {
"halign": "center",
"text": "Hello World",
"valign": "center",
"wrap": true
},
"type": "text",
"visible": true,
"width": 92.375,
"x": 4.22968767761736,
"y": 3.81362964647039
},
{
"height": 19,
"id": 26,
"name": "name: text - justified",
"rotation": 0,
"text": {
"halign": "justify",
"text": "Hello World",
"wrap": true
},
"type": "text",
"visible": true,
"width": 92.375,
"x": 13.8329615209731,
"y": 60.7785040354666
},
{
"height": 19,
"id": 27,
"name": "name: text - red",
"rotation": 0,
"text": {
"color": "#aa0000",
"text": "Hello World",
"wrap": true
},
"type": "text",
"visible": true,
"width": 92.375,
"x": 96.3338140843469,
"y": 130.620495623508
},
{
"height": 0,
"id": 28,
"name": "name: rectangle - no width or height",
"rotation": 0,
"type": "rectangle",
"visible": true,
"width": 0,
"x": 131.17199045129,
"y": 53.4727748095942
},
{
"ellipse": true,
"height": 0,
"id": 29,
"name": "name: ellipse - no width or height",
"rotation": 0,
"type": "ellipse",
"visible": true,
"width": 0,
"x": 72.4610662725929,
"y": 127.679890871888
},
{
"height": 13.7501420938956,
"id": 30,
"name": "name: rectangle - properties",
"properties": [
{
"name": "bool property",
"type": "bool",
"value": false
},
{
"name": "color property",
"type": "color",
"value": "#ffaa0000"
},
{
"name": "file property",
"type": "file",
"value": "../../../../../../dev/null"
},
{
"name": "float property",
"type": "float",
"value": 42.1
},
{
"name": "int property",
"type": "int",
"value": 8675309
},
{
"name": "string property",
"type": "string",
"value": "pytiled_parser rulez!1!!"
}
],
"rotation": 0,
"type": "rectangle",
"visible": true,
"width": 21.170853700125,
"x": 39.0678640445606,
"y": 131.826759122428
}
],
"opacity": 1,
"type": "objectgroup",
"visible": true,
"x": 0,
"y": 0
}
],
"nextlayerid": 3,
"nextobjectid": 33,
"orientation": "orthogonal",
"renderorder": "right-down",
"tiledversion": "1.3.5",
"tileheight": 32,
"tilesets": [
{
"firstgid": 1,
"source": "tileset_image_objects.json"
},
{
"firstgid": 49,
"source": "tileset_image.json"
}
],
"tilewidth": 32,
"type": "map",
"version": 1.2,
"width": 8
}

View File

@@ -1,192 +0,0 @@
{ "columns":8,
"image":"..\/..\/images\/tmw_desert_spacing.png",
"imageheight":199,
"imagewidth":265,
"margin":1,
"name":"tile_set_image",
"spacing":1,
"tilecount":5,
"tiledversion":"1.3.1",
"tileheight":32,
"tiles":[
{
"id":9,
"objectgroup":
{
"draworder":"index",
"name":"",
"objects":[
{
"height":32,
"id":2,
"name":"wall",
"rotation":1,
"type":"rectangle type",
"visible":true,
"width":32,
"x":1,
"y":1
}],
"opacity":1,
"type":"objectgroup",
"visible":true,
"x":0,
"y":0
}
},
{
"id":19,
"objectgroup":
{
"draworder":"index",
"name":"",
"objects":[
{
"height":0,
"id":1,
"name":"wall corner",
"polygon":[
{
"x":0,
"y":0
},
{
"x":-32,
"y":0
},
{
"x":-32,
"y":32
},
{
"x":-16,
"y":32.1818
},
{
"x":-15.8182,
"y":16.9091
},
{
"x":0.181818,
"y":17.0909
}],
"rotation":1,
"type":"polygon type",
"visible":true,
"width":0,
"x":32,
"y":1
}],
"opacity":1,
"type":"objectgroup",
"visible":true,
"x":0,
"y":0
}
},
{
"id":20,
"objectgroup":
{
"draworder":"index",
"name":"",
"objects":[
{
"height":0,
"id":1,
"name":"polyline",
"polyline":[
{
"x":0,
"y":0
},
{
"x":25.0909,
"y":21.2727
},
{
"x":9.63636,
"y":28.3636
}],
"rotation":1,
"type":"polyline type",
"visible":true,
"width":0,
"x":1.45455,
"y":1.45455
}],
"opacity":1,
"type":"objectgroup",
"visible":true,
"x":0,
"y":0
}
},
{
"id":31,
"objectgroup":
{
"draworder":"index",
"name":"",
"objects":[
{
"ellipse":true,
"height":19.2727,
"id":1,
"name":"rock 1",
"rotation":1,
"type":"elipse type",
"visible":true,
"width":19.6364,
"x":5.09091,
"y":2.54545
},
{
"ellipse":true,
"height":8.36364,
"id":2,
"name":"rock 2",
"rotation":-1,
"type":"elipse type",
"visible":true,
"width":8.54545,
"x":16.1818,
"y":22
}],
"opacity":1,
"type":"objectgroup",
"visible":true,
"x":0,
"y":0
}
},
{
"id":45,
"objectgroup":
{
"draworder":"index",
"name":"",
"objects":[
{
"height":0,
"id":1,
"name":"sign",
"point":true,
"rotation":0,
"type":"point type",
"visible":true,
"width":0,
"x":14.7273,
"y":26.3636
}],
"opacity":1,
"type":"objectgroup",
"visible":true,
"x":0,
"y":0
}
}],
"tilewidth":32,
"type":"tileset",
"version":1.2
}

View File

@@ -1,195 +0,0 @@
{ "compressionlevel":0,
"height":6,
"infinite":true,
"layers":[
{
"chunks":[
{
"data":[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, 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, 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, 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, 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, 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, 30, 30, 30, 30],
"height":16,
"width":16,
"x":-32,
"y":-32
},
{
"data":[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, 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, 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, 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, 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, 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, 30, 30, 30, 30],
"height":16,
"width":16,
"x":-16,
"y":-32
},
{
"data":[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, 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, 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, 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, 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, 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, 30, 30, 30, 30],
"height":16,
"width":16,
"x":0,
"y":-32
},
{
"data":[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, 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, 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, 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, 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, 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, 30, 30, 30, 30],
"height":16,
"width":16,
"x":16,
"y":-32
},
{
"data":[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, 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, 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, 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, 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, 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, 30, 30, 30, 30],
"height":16,
"width":16,
"x":-32,
"y":-16
},
{
"data":[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, 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, 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, 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, 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, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 1, 2, 3, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 9, 10, 11, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 17, 18, 19],
"height":16,
"width":16,
"x":-16,
"y":-16
},
{
"data":[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, 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, 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, 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, 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, 4, 5, 6, 7, 8, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 12, 13, 14, 15, 16, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 20, 21, 22, 23, 24, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30],
"height":16,
"width":16,
"x":0,
"y":-16
},
{
"data":[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, 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, 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, 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, 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, 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, 30, 30, 30, 30],
"height":16,
"width":16,
"x":16,
"y":-16
},
{
"data":[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, 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, 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, 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, 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, 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, 30, 30, 30, 30],
"height":16,
"width":16,
"x":-32,
"y":0
},
{
"data":[30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 25, 26, 27, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 33, 34, 35, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 41, 42, 43, 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, 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, 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, 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, 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":16,
"width":16,
"x":-16,
"y":0
},
{
"data":[28, 29, 30, 31, 32, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 36, 37, 38, 39, 40, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 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, 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, 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, 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, 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, 30, 30, 30, 30, 30, 30, 30, 30, 30],
"height":16,
"width":16,
"x":0,
"y":0
},
{
"data":[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, 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, 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, 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, 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, 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, 30, 30, 30, 30],
"height":16,
"width":16,
"x":16,
"y":0
},
{
"data":[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, 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, 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, 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, 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, 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, 30, 30, 30, 30],
"height":16,
"width":16,
"x":-32,
"y":16
},
{
"data":[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, 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, 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, 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, 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, 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, 30, 30, 30, 30],
"height":16,
"width":16,
"x":-16,
"y":16
},
{
"data":[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, 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, 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, 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, 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, 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, 30, 30, 30, 30],
"height":16,
"width":16,
"x":0,
"y":16
},
{
"data":[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, 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, 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, 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, 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, 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, 30, 30, 30, 30],
"height":16,
"width":16,
"x":16,
"y":16
}],
"height":64,
"id":1,
"name":"Tile Layer 1",
"opacity":1,
"startx":-32,
"starty":-32,
"type":"tilelayer",
"visible":true,
"width":64,
"x":0,
"y":0
},
{
"chunks":[
{
"data":[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 21, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 28, 29, 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, 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, 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],
"height":16,
"width":16,
"x":-32,
"y":-16
},
{
"data":[0, 0, 20, 21, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 28, 29, 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, 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, 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],
"height":16,
"width":16,
"x":16,
"y":-16
},
{
"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, 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, 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, 20, 21, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
"height":16,
"width":16,
"x":-16,
"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, 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, 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, 20, 21, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 28, 29, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
"height":16,
"width":16,
"x":16,
"y":0
},
{
"data":[28, 29, 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, 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, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
"height":16,
"width":16,
"x":-16,
"y":16
}],
"height":48,
"id":2,
"name":"Tile Layer 2",
"opacity":1,
"startx":-32,
"starty":-16,
"type":"tilelayer",
"visible":true,
"width":64,
"x":0,
"y":0
}],
"nextlayerid":3,
"nextobjectid":1,
"orientation":"orthogonal",
"renderorder":"right-down",
"tiledversion":"1.3.1",
"tileheight":32,
"tilesets":[
{
"firstgid":1,
"source":"tileset_image.json"
}],
"tilewidth":32,
"type":"map",
"version":1.2,
"width":8
}

View File

@@ -1,80 +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",
"offsetx":16,
"offsety":-16.42,
"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":"empty file",
"type":"file",
"value":""
},
{
"name":"empty string",
"type":"string",
"value":""
},
{
"name":"file_property",
"type":"file",
"value":"test_map_simple_offset.json"
},
{
"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":"tileset_image.json"
}],
"tilewidth":32,
"type":"map",
"version":1.2,
"width":8
}

View File

@@ -88,7 +88,7 @@
"nextobjectid":3,
"orientation":"orthogonal",
"renderorder":"right-down",
"tiledversion":"1.5.0",
"tiledversion":"1.6.0",
"tileheight":32,
"tilesets":[
{
@@ -97,6 +97,6 @@
}],
"tilewidth":32,
"type":"map",
"version":1.5,
"version":"1.6",
"width":8
}

View File

@@ -1,12 +1,4 @@
{ "columns":8,
"editorsettings":
{
"export":
{
"format":"",
"target":"."
}
},
"image":"..\/..\/images\/tmw_desert_spacing.png",
"imageheight":199,
"imagewidth":265,
@@ -14,9 +6,9 @@
"name":"tile_set_image",
"spacing":1,
"tilecount":48,
"tiledversion":"1.3.5",
"tiledversion":"1.6.0",
"tileheight":32,
"tilewidth":32,
"type":"tileset",
"version":1.2
"version":"1.6"
}

View File

@@ -63,7 +63,7 @@
"nextobjectid":3,
"orientation":"orthogonal",
"renderorder":"right-down",
"tiledversion":"1.4.1",
"tiledversion":"1.6.0",
"tileheight":32,
"tilesets":[
{
@@ -72,6 +72,6 @@
}],
"tilewidth":32,
"type":"map",
"version":1.4,
"version":"1.6",
"width":8
}

View File

@@ -1,12 +1,4 @@
{ "columns":8,
"editorsettings":
{
"export":
{
"format":"",
"target":"."
}
},
"image":"..\/..\/images\/tmw_desert_spacing.png",
"imageheight":199,
"imagewidth":265,
@@ -14,9 +6,9 @@
"name":"tile_set_image",
"spacing":1,
"tilecount":48,
"tiledversion":"1.3.5",
"tiledversion":"1.6.0",
"tileheight":32,
"tilewidth":32,
"type":"tileset",
"version":1.2
"version":"1.6"
}

View File

@@ -63,7 +63,7 @@
"nextobjectid":3,
"orientation":"orthogonal",
"renderorder":"right-down",
"tiledversion":"1.4.1",
"tiledversion":"1.6.0",
"tileheight":32,
"tilesets":[
{
@@ -72,6 +72,6 @@
}],
"tilewidth":32,
"type":"map",
"version":1.4,
"version":"1.6",
"width":8
}

View File

@@ -1,12 +1,4 @@
{ "columns":8,
"editorsettings":
{
"export":
{
"format":"",
"target":"."
}
},
"image":"..\/..\/images\/tmw_desert_spacing.png",
"imageheight":199,
"imagewidth":265,
@@ -14,9 +6,9 @@
"name":"tile_set_image",
"spacing":1,
"tilecount":48,
"tiledversion":"1.3.5",
"tiledversion":"1.6.0",
"tileheight":32,
"tilewidth":32,
"type":"tileset",
"version":1.2
"version":"1.6"
}

View File

@@ -63,7 +63,7 @@
"nextobjectid":3,
"orientation":"orthogonal",
"renderorder":"right-down",
"tiledversion":"1.4.1",
"tiledversion":"1.6.0",
"tileheight":32,
"tilesets":[
{
@@ -72,6 +72,6 @@
}],
"tilewidth":32,
"type":"map",
"version":1.4,
"version":"1.6",
"width":8
}

View File

@@ -1,12 +1,4 @@
{ "columns":8,
"editorsettings":
{
"export":
{
"format":"",
"target":"."
}
},
"image":"..\/..\/images\/tmw_desert_spacing.png",
"imageheight":199,
"imagewidth":265,
@@ -14,9 +6,9 @@
"name":"tile_set_image",
"spacing":1,
"tilecount":48,
"tiledversion":"1.3.5",
"tiledversion":"1.6.0",
"tileheight":32,
"tilewidth":32,
"type":"tileset",
"version":1.2
"version":"1.6"
}

View File

@@ -1,109 +0,0 @@
from pathlib import Path
from pytiled_parser import common_types, layer, tiled_object
EXPECTED = [
layer.TileLayer(
name="Tile Layer 1",
opacity=1,
visible=True,
id=1,
size=common_types.Size(8, 6),
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,
],
],
),
layer.LayerGroup(
name="Group 1",
opacity=1,
visible=True,
id=4,
layers=[
layer.ObjectLayer(
name="Object Layer 1",
opacity=1,
visible=True,
id=2,
draw_order="topdown",
tiled_objects=[
tiled_object.Rectangle(
id=1,
name="",
rotation=0,
size=common_types.Size(69.3333333333333, 52.6666666666667),
coordinates=common_types.OrderedPair(46.3333333333333, 39),
visible=True,
type="",
)
],
),
],
),
layer.ImageLayer(
name="Image Layer 1",
opacity=1,
visible=True,
id=3,
image=Path("../../images/tile_04.png"),
transparent_color=common_types.Color(0, 0, 0, 255),
),
]

View File

@@ -1,11 +1,4 @@
{ "compressionlevel":-1,
"editorsettings":
{
"export":
{
"target":"."
}
},
"height":6,
"infinite":false,
"layers":[
@@ -57,7 +50,7 @@
},
{
"id":3,
"image":"..\/..\/images\/tile_04.png",
"image":"..\/tests\/test_data\/layer_tests\/tests\/test_data\/layer_tests\/tests\/test_data\/layer_tests\/tests\/test_data\/layer_tests\/tests\/test_data\/layer_tests\/tests\/test_data\/layer_tests\/tests\/test_data\/layer_tests\/tests\/test_data\/layer_tests\/tests\/test_data\/layer_tests\/tests\/test_data\/layer_tests\/tests\/test_data\/layer_tests\/tests\/test_data\/layer_tests\/tests\/test_data\/layer_tests\/tests\/test_data\/layer_tests\/tests\/test_data\/layer_tests\/tests\/test_data\/layer_tests\/tests\/test_data\/layer_tests\/tests\/test_data\/images\/tile_04.png",
"name":"Image Layer 1",
"opacity":1,
"transparentcolor":"#000000",
@@ -70,7 +63,7 @@
"nextobjectid":3,
"orientation":"orthogonal",
"renderorder":"right-down",
"tiledversion":"1.4.3",
"tiledversion":"1.6.0",
"tileheight":32,
"tilesets":[
{
@@ -79,6 +72,6 @@
}],
"tilewidth":32,
"type":"map",
"version":1.4,
"version":"1.6",
"width":8
}

View File

@@ -1,22 +1,14 @@
{ "columns":8,
"editorsettings":
{
"export":
{
"format":"",
"target":"."
}
},
"image":"..\/..\/images\/tmw_desert_spacing.png",
"imageheight":199,
"imagewidth":265,
"margin":1,
"name":"tile_set_image",
"spacing":1,
"tilecount":48,
"tiledversion":"1.3.5",
"tileheight":32,
"tilewidth":32,
"type":"tileset",
"version":1.2
}
"image":"..\/..\/images\/tmw_desert_spacing.png",
"imageheight":199,
"imagewidth":265,
"margin":1,
"name":"tile_set_image",
"spacing":1,
"tilecount":48,
"tiledversion":"1.6.0",
"tileheight":32,
"tilewidth":32,
"type":"tileset",
"version":"1.6"
}

View File

@@ -8,7 +8,7 @@
},
"export":
{
"target":"..\/all_layer_types"
"target":"..\/tests\/test_data\/layer_tests\/tests\/test_data\/layer_tests\/tests\/test_data\/layer_tests\/tests\/test_data\/layer_tests\/tests\/test_data\/layer_tests\/tests\/test_data\/layer_tests\/tests\/test_data\/layer_tests\/tests\/test_data\/layer_tests\/tests\/test_data\/layer_tests\/tests\/test_data\/layer_tests\/tests\/test_data\/layer_tests\/tests\/test_data\/layer_tests\/tests\/test_data\/layer_tests\/tests\/test_data\/layer_tests\/tests\/test_data\/layer_tests\/tests\/test_data\/layer_tests\/tests\/test_data\/layer_tests\/tests\/test_data\/layer_tests\/all_layer_types"
}
},
"height":6,
@@ -54,7 +54,7 @@
"nextobjectid":3,
"orientation":"orthogonal",
"renderorder":"right-down",
"tiledversion":"1.4.1",
"tiledversion":"1.6.0",
"tileheight":32,
"tilesets":[
{
@@ -63,6 +63,6 @@
}],
"tilewidth":32,
"type":"map",
"version":1.4,
"version":"1.6",
"width":8
}

View File

@@ -37,7 +37,7 @@
"nextobjectid":3,
"orientation":"orthogonal",
"renderorder":"right-down",
"tiledversion":"1.4.1",
"tiledversion":"1.6.0",
"tileheight":32,
"tilesets":[
{
@@ -46,6 +46,6 @@
}],
"tilewidth":32,
"type":"map",
"version":1.4,
"version":"1.6",
"width":8
}

View File

@@ -1,11 +1,4 @@
{ "compressionlevel":0,
"editorsettings":
{
"export":
{
"target":"."
}
},
"height":6,
"infinite":false,
"layers":[],
@@ -31,7 +24,7 @@
{
"name":"file property",
"type":"file",
"value":"..\/..\/..\/..\/..\/..\/var\/log\/syslog"
"value":"..\/tests\/test_data\/layer_tests\/tests\/test_data\/layer_tests\/tests\/test_data\/layer_tests\/tests\/test_data\/layer_tests\/tests\/test_data\/layer_tests\/tests\/test_data\/layer_tests\/tests\/test_data\/layer_tests\/tests\/test_data\/layer_tests\/tests\/test_data\/layer_tests\/tests\/test_data\/layer_tests\/tests\/test_data\/layer_tests\/tests\/test_data\/layer_tests\/tests\/test_data\/layer_tests\/tests\/test_data\/layer_tests\/tests\/test_data\/layer_tests\/tests\/test_data\/layer_tests\/tests\/var\/log\/syslog"
},
{
"name":"float property",
@@ -49,15 +42,15 @@
"value":"Hello, World!!"
}],
"renderorder":"right-down",
"tiledversion":"1.4.1",
"tiledversion":"1.6.0",
"tileheight":32,
"tilesets":[
{
"firstgid":1,
"source":"tileset_image.json"
"source":"tileset.json"
}],
"tilewidth":32,
"type":"map",
"version":1.4,
"version":"1.6",
"width":8
}

View File

@@ -6,9 +6,9 @@
"name":"tile_set_image",
"spacing":1,
"tilecount":48,
"tiledversion":"1.3.1",
"tiledversion":"1.6.0",
"tileheight":32,
"tilewidth":32,
"type":"tileset",
"version":1.2
}
"version":"1.6"
}

View File

@@ -1,14 +0,0 @@
{ "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

@@ -10,9 +10,9 @@ EXPECTED = tiled_map.TiledMap(
next_object_id=1,
orientation="orthogonal",
render_order="right-down",
tiled_version="1.4.1",
tiled_version="1.6.0",
tile_size=common_types.Size(32, 32),
version=1.4,
version="1.6",
tilesets={
1: tileset.Tileset(
columns=8,

View File

@@ -1,11 +1,4 @@
{ "compressionlevel":0,
"editorsettings":
{
"export":
{
"target":"."
}
},
"height":6,
"infinite":false,
"layers":[],
@@ -13,7 +6,7 @@
"nextobjectid":1,
"orientation":"orthogonal",
"renderorder":"right-down",
"tiledversion":"1.4.1",
"tiledversion":"1.6.0",
"tileheight":32,
"tilesets":[
{
@@ -31,6 +24,6 @@
}],
"tilewidth":32,
"type":"map",
"version":1.4,
"version":"1.6",
"width":8
}

View File

@@ -9,9 +9,9 @@ EXPECTED = tiled_map.TiledMap(
next_object_id=1,
orientation="orthogonal",
render_order="right-down",
tiled_version="1.5.0",
tiled_version="1.6.0",
tile_size=common_types.Size(32, 32),
version=1.5,
version="1.6",
background_color=common_types.Color(255, 0, 4, 255),
layers=[
layer.TileLayer(
@@ -82,10 +82,10 @@ EXPECTED = tiled_map.TiledMap(
spacing=0,
name="tileset",
tile_count=4,
tiled_version="1.3.5",
tiled_version="1.6.0",
tile_height=32,
tile_width=32,
version=1.2,
version="1.6",
type="tileset",
grid=tileset.Grid(orientation="orthogonal", width=1, height=1),
tiles={

View File

@@ -52,7 +52,7 @@
"value":"Hello, World!!"
}],
"renderorder":"right-down",
"tiledversion":"1.5.0",
"tiledversion":"1.6.0",
"tileheight":32,
"tilesets":[
{
@@ -61,6 +61,6 @@
}],
"tilewidth":32,
"type":"map",
"version":1.5,
"version":"1.6",
"width":8
}

View File

@@ -1,124 +1,115 @@
{ "columns":0,
"editorsettings":
{
"export":
{
"format":"",
"target":"."
}
},
"grid":
{
"height":1,
"orientation":"orthogonal",
"width":1
},
"margin":0,
"name":"tileset",
"spacing":0,
"tilecount":4,
"tiledversion":"1.3.5",
"tileheight":32,
"tiles":[
{
"animation":[
{
"duration":100,
"tileid":0
},
{
"duration":100,
"tileid":1
},
{
"duration":100,
"tileid":2
},
{
"duration":100,
"tileid":3
}],
"id":0,
"image":"..\/..\/..\/images\/tile_01.png",
"imageheight":32,
"imagewidth":32,
"properties":[
{
"name":"float property",
"type":"float",
"value":2.2
}],
"type":"tile"
},
{
"id":1,
"image":"..\/..\/..\/images\/tile_02.png",
"imageheight":32,
"imagewidth":32,
"objectgroup":
{
"draworder":"index",
"name":"",
"objects":[
{
"height":13.7196924896511,
"id":2,
"name":"",
"rotation":0,
"type":"",
"visible":true,
"width":14.4766410408043,
"x":13.4358367829687,
"y":13.5304553518628
},
{
"ellipse":true,
"height":11.070372560615,
"id":3,
"name":"",
"rotation":0,
"type":"",
"visible":true,
"width":14.287403903016,
"x":13.8143110585452,
"y":1.98698994677705
}],
"opacity":1,
"type":"objectgroup",
"visible":true,
"x":0,
"y":0
},
"properties":[
{
"name":"string property",
"type":"string",
"value":"testing"
}],
"type":"tile"
},
{
"id":2,
"image":"..\/..\/..\/images\/tile_03.png",
"imageheight":32,
"imagewidth":32,
"properties":[
{
"name":"bool property",
"type":"bool",
"value":true
}],
"type":"tile"
},
{
"id":3,
"image":"..\/..\/..\/images\/tile_04.png",
"imageheight":32,
"imagewidth":32,
"type":"tile"
}],
"tilewidth":32,
"type":"tileset",
"version":1.2
}
"grid":
{
"height":1,
"orientation":"orthogonal",
"width":1
},
"margin":0,
"name":"tileset",
"spacing":0,
"tilecount":4,
"tiledversion":"1.6.0",
"tileheight":32,
"tiles":[
{
"animation":[
{
"duration":100,
"tileid":0
},
{
"duration":100,
"tileid":1
},
{
"duration":100,
"tileid":2
},
{
"duration":100,
"tileid":3
}],
"id":0,
"image":"..\/..\/..\/images\/tile_01.png",
"imageheight":32,
"imagewidth":32,
"properties":[
{
"name":"float property",
"type":"float",
"value":2.2
}],
"type":"tile"
},
{
"id":1,
"image":"..\/..\/..\/images\/tile_02.png",
"imageheight":32,
"imagewidth":32,
"objectgroup":
{
"draworder":"index",
"name":"",
"objects":[
{
"height":13.7196924896511,
"id":2,
"name":"",
"rotation":0,
"type":"",
"visible":true,
"width":14.4766410408043,
"x":13.4358367829687,
"y":13.5304553518628
},
{
"ellipse":true,
"height":11.070372560615,
"id":3,
"name":"",
"rotation":0,
"type":"",
"visible":true,
"width":14.287403903016,
"x":13.8143110585452,
"y":1.98698994677705
}],
"opacity":1,
"type":"objectgroup",
"visible":true,
"x":0,
"y":0
},
"properties":[
{
"name":"string property",
"type":"string",
"value":"testing"
}],
"type":"tile"
},
{
"id":2,
"image":"..\/..\/..\/images\/tile_03.png",
"imageheight":32,
"imagewidth":32,
"properties":[
{
"name":"bool property",
"type":"bool",
"value":true
}],
"type":"tile"
},
{
"id":3,
"image":"..\/..\/..\/images\/tile_04.png",
"imageheight":32,
"imagewidth":32,
"type":"tile"
}],
"tilewidth":32,
"type":"tileset",
"version":"1.6"
}

View File

@@ -132,9 +132,9 @@ EXPECTED = tiled_map.TiledMap(
next_object_id=1,
orientation="hexagonal",
render_order="right-down",
tiled_version="1.4.1",
tiled_version="1.6.0",
tile_size=common_types.Size(14, 12),
version=1.4,
version="1.6",
tilesets={
1: tileset.Tileset(
columns=5,
@@ -147,10 +147,10 @@ EXPECTED = tiled_map.TiledMap(
spacing=0,
name="tileset",
tile_count=20,
tiled_version="1.4.1",
tiled_version="1.6.0",
tile_height=18,
tile_width=18,
version=1.4,
version="1.6",
type="tileset",
tile_offset=common_types.OrderedPair(0, 1),
)

View File

@@ -21,7 +21,7 @@
"renderorder":"right-down",
"staggeraxis":"y",
"staggerindex":"odd",
"tiledversion":"1.4.1",
"tiledversion":"1.6.0",
"tileheight":12,
"tilesets":[
{
@@ -30,6 +30,6 @@
}],
"tilewidth":14,
"type":"map",
"version":1.4,
"version":"1.6",
"width":10
}

View File

@@ -6,7 +6,7 @@
"name":"tileset",
"spacing":0,
"tilecount":20,
"tiledversion":"1.4.1",
"tiledversion":"1.6.0",
"tileheight":18,
"tileoffset":
{
@@ -15,5 +15,5 @@
},
"tilewidth":18,
"type":"tileset",
"version":1.4
"version":"1.6"
}

View File

@@ -10,9 +10,9 @@ EXPECTED = tiled_map.TiledMap(
next_object_id=1,
orientation="orthogonal",
render_order="right-down",
tiled_version="1.4.1",
tiled_version="1.6.0",
tile_size=common_types.Size(32, 32),
version=1.4,
version="1.6",
tilesets={
1: tileset.Tileset(
columns=8,
@@ -25,10 +25,10 @@ EXPECTED = tiled_map.TiledMap(
spacing=1,
name="tile_set_image",
tile_count=48,
tiled_version="1.3.1",
tiled_version="1.6.0",
tile_height=32,
tile_width=32,
version=1.2,
version="1.6",
type="tileset",
)
},

View File

@@ -1,11 +1,4 @@
{ "compressionlevel":0,
"editorsettings":
{
"export":
{
"target":"."
}
},
"height":6,
"infinite":false,
"layers":[],
@@ -13,15 +6,15 @@
"nextobjectid":1,
"orientation":"orthogonal",
"renderorder":"right-down",
"tiledversion":"1.4.1",
"tiledversion":"1.6.0",
"tileheight":32,
"tilesets":[
{
"firstgid":1,
"source":"tileset_image.json"
"source":"tileset.json"
}],
"tilewidth":32,
"type":"map",
"version":1.4,
"version":"1.6",
"width":8
}

View File

@@ -6,9 +6,9 @@
"name":"tile_set_image",
"spacing":1,
"tilecount":48,
"tiledversion":"1.3.1",
"tiledversion":"1.6.0",
"tileheight":32,
"tilewidth":32,
"type":"tileset",
"version":1.2
}
"version":"1.6"
}

View File

@@ -1,14 +0,0 @@
{ "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

@@ -10,9 +10,9 @@ EXPECTED = tiled_map.TiledMap(
next_object_id=1,
orientation="orthogonal",
render_order="right-down",
tiled_version="1.4.1",
tiled_version="1.6.0",
tile_size=common_types.Size(32, 32),
version=1.4,
version="1.6",
background_color=common_types.Color(255, 0, 4, 255),
tilesets={
1: tileset.Tileset(
@@ -26,10 +26,10 @@ EXPECTED = tiled_map.TiledMap(
spacing=1,
name="tile_set_image",
tile_count=48,
tiled_version="1.3.1",
tiled_version="1.6.0",
tile_height=32,
tile_width=32,
version=1.2,
version="1.6",
type="tileset",
)
},

View File

@@ -1,12 +1,5 @@
{ "backgroundcolor":"#ff0004",
"compressionlevel":0,
"editorsettings":
{
"export":
{
"target":"."
}
},
"height":6,
"infinite":false,
"layers":[],
@@ -45,15 +38,15 @@
"value":"Hello, World!!"
}],
"renderorder":"right-down",
"tiledversion":"1.4.1",
"tiledversion":"1.6.0",
"tileheight":32,
"tilesets":[
{
"firstgid":1,
"source":"tileset_image.json"
"source":"tileset.json"
}],
"tilewidth":32,
"type":"map",
"version":1.4,
"version":"1.6",
"width":8
}

View File

@@ -6,9 +6,9 @@
"name":"tile_set_image",
"spacing":1,
"tilecount":48,
"tiledversion":"1.3.1",
"tiledversion":"1.6.0",
"tileheight":32,
"tilewidth":32,
"type":"tileset",
"version":1.2
}
"version":"1.6"
}

View File

@@ -1,14 +0,0 @@
{ "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

@@ -0,0 +1,77 @@
from pathlib import Path
from pytiled_parser import common_types, layer, tiled_map, tiled_object, tileset
EXPECTED = tiled_map.TiledMap(
infinite=False,
layers=[
layer.ObjectLayer(
name="Object Layer 1",
opacity=1,
visible=True,
id=2,
draw_order="topdown",
tiled_objects=[
tiled_object.Rectangle(
id=2,
name="",
rotation=0,
size=common_types.Size(63.6585878103079, 38.2811778048473),
coordinates=common_types.OrderedPair(
98.4987608686521, 46.2385012811358
),
visible=True,
type="",
),
tiled_object.Tile(
id=3,
coordinates=common_types.OrderedPair(
46.3682110303692, 112.993321292057
),
name="",
rotation=0,
type="",
visible=True,
size=common_types.Size(32, 32),
gid=30,
),
],
)
],
map_size=common_types.Size(8, 6),
next_layer_id=3,
next_object_id=4,
orientation="orthogonal",
render_order="right-down",
tiled_version="1.6.0",
tile_size=common_types.Size(32, 32),
version="1.6",
background_color=common_types.Color(255, 0, 4, 255),
tilesets={
1: tileset.Tileset(
columns=8,
image=Path(Path(__file__).parent / "../../images/tmw_desert_spacing.png")
.absolute()
.resolve(),
image_width=265,
image_height=199,
margin=1,
spacing=1,
name="tile_set_image",
tile_count=48,
tiled_version="1.6.0",
tile_height=32,
tile_width=32,
version="1.6",
type="tileset",
)
},
properties={
"bool property - true": True,
"color property": common_types.Color(255, 73, 252, 255),
"file property": Path("../../../../../../var/log/syslog"),
"float property": 1.23456789,
"int property": 13,
"string property": "Hello, World!!",
},
)

View File

@@ -1,28 +1,35 @@
{ "compressionlevel":0,
{ "backgroundcolor":"#ff0004",
"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",
"draworder":"topdown",
"id":2,
"name":"Object Layer 1",
"objects":[
{
"id":2,
"template":"template.json",
"x":98.4987608686521,
"y":46.2385012811358
},
{
"id":3,
"template":"template_tile.json",
"x":46.3682110303692,
"y":112.993321292057
}],
"opacity":1,
"type":"tilelayer",
"type":"objectgroup",
"visible":true,
"width":8,
"x":0,
"y":0
}],
"nextlayerid":2,
"nextobjectid":1,
"nextlayerid":3,
"nextobjectid":4,
"orientation":"orthogonal",
"properties":[
{
"name":"bool property - false",
"type":"bool",
"value":false
},
{
"name":"bool property - true",
"type":"bool",
@@ -54,15 +61,15 @@
"value":"Hello, World!!"
}],
"renderorder":"right-down",
"tiledversion":"1.3.1",
"tiledversion":"1.6.0",
"tileheight":32,
"tilesets":[
{
"firstgid":1,
"source":"tileset_image.json"
"source":"tileset.json"
}],
"tilewidth":32,
"type":"map",
"version":1.2,
"version":"1.6",
"width":8
}
}

View File

@@ -0,0 +1,12 @@
{ "object":
{
"height":38.2811778048473,
"id":1,
"name":"",
"rotation":0,
"type":"",
"visible":true,
"width":63.6585878103079
},
"type":"template"
}

View File

@@ -0,0 +1,18 @@
{ "object":
{
"gid":30,
"height":32,
"id":3,
"name":"",
"rotation":0,
"type":"",
"visible":true,
"width":32
},
"tileset":
{
"firstgid":1,
"source":"tileset.json"
},
"type":"template"
}

View File

@@ -6,9 +6,9 @@
"name":"tile_set_image",
"spacing":1,
"tilecount":48,
"tiledversion":"1.3.1",
"tiledversion":"1.6.0",
"tileheight":32,
"tilewidth":32,
"type":"tileset",
"version":1.2
}
"version":"1.6"
}

View File

@@ -0,0 +1,10 @@
{
"automappingRulesFile": "",
"commands": [
],
"extensionsPath": "extensions",
"folders": [
"."
],
"objectTypesFile": ""
}

View File

@@ -11,9 +11,9 @@ EXPECTED = tileset.Tileset(
spacing=1,
name="tile_set_image",
tile_count=48,
tiled_version="1.3.5",
tiled_version="1.6.0",
tile_height=32,
tile_width=32,
version=1.2,
version="1.6",
type="tileset",
)

View File

@@ -1,12 +1,4 @@
{ "columns":8,
"editorsettings":
{
"export":
{
"format":"",
"target":"."
}
},
"image":"..\/..\/images\/tmw_desert_spacing.png",
"imageheight":199,
"imagewidth":265,
@@ -14,9 +6,9 @@
"name":"tile_set_image",
"spacing":1,
"tilecount":48,
"tiledversion":"1.3.5",
"tiledversion":"1.6.0",
"tileheight":32,
"tilewidth":32,
"type":"tileset",
"version":1.2
"version":"1.6"
}

View File

@@ -12,10 +12,10 @@ EXPECTED = tileset.Tileset(
spacing=1,
name="tile_set_image",
tile_count=48,
tiled_version="1.3.5",
tiled_version="1.6.0",
tile_height=32,
tile_width=32,
version=1.2,
version="1.6",
background_color=Color(85, 0, 255, 255),
type="tileset",
)

View File

@@ -1,13 +1,5 @@
{ "backgroundcolor":"#5500ff",
"columns":8,
"editorsettings":
{
"export":
{
"format":"",
"target":"."
}
},
"image":"..\/..\/images\/tmw_desert_spacing.png",
"imageheight":199,
"imagewidth":265,
@@ -15,9 +7,9 @@
"name":"tile_set_image",
"spacing":1,
"tilecount":48,
"tiledversion":"1.3.5",
"tiledversion":"1.6.0",
"tileheight":32,
"tilewidth":32,
"type":"tileset",
"version":1.2
"version":"1.6"
}

View File

@@ -11,10 +11,10 @@ EXPECTED = tileset.Tileset(
spacing=1,
name="tile_set_image",
tile_count=48,
tiled_version="1.3.5",
tiled_version="1.6.0",
tile_height=32,
tile_width=32,
version=1.2,
version="1.6",
grid=tileset.Grid(orientation="isometric", width=32, height=32),
type="tileset",
)

View File

@@ -1,26 +1,28 @@
{
"columns": 8,
"editorsettings": {
"export": {
"format": "",
"target": "../image"
}
},
"grid": {
"height": 32,
"orientation": "isometric",
"width": 32
},
"image": "../../images/tmw_desert_spacing.png",
"imageheight": 199,
"imagewidth": 265,
"margin": 1,
"name": "tile_set_image",
"spacing": 1,
"tilecount": 48,
"tiledversion": "1.3.5",
"tileheight": 32,
"tilewidth": 32,
"type": "tileset",
"version": 1.2
}
{ "columns":8,
"editorsettings":
{
"export":
{
"format":"",
"target":"..\/tests\/test_data\/tilesets\/tests\/test_data\/tilesets\/tests\/test_data\/tilesets\/tests\/test_data\/tilesets\/tests\/test_data\/tilesets\/tests\/test_data\/tilesets\/tests\/test_data\/tilesets\/tests\/test_data\/tilesets\/tests\/test_data\/tilesets\/tests\/test_data\/tilesets\/tests\/test_data\/tilesets\/tests\/test_data\/tilesets\/tests\/test_data\/tilesets\/tests\/test_data\/tilesets\/tests\/test_data\/tilesets\/tests\/test_data\/tilesets\/tests\/test_data\/tilesets\/tests\/test_data\/tilesets\/image"
}
},
"grid":
{
"height":32,
"orientation":"isometric",
"width":32
},
"image":"..\/..\/images\/tmw_desert_spacing.png",
"imageheight":199,
"imagewidth":265,
"margin":1,
"name":"tile_set_image",
"spacing":1,
"tilecount":48,
"tiledversion":"1.6.0",
"tileheight":32,
"tilewidth":32,
"type":"tileset",
"version":"1.6"
}

View File

@@ -12,10 +12,10 @@ EXPECTED = tileset.Tileset(
spacing=1,
name="tile_set_image",
tile_count=48,
tiled_version="1.3.5",
tiled_version="1.6.0",
tile_height=32,
tile_width=32,
version=1.2,
version="1.6",
properties={
"bool property": True,
"color property": Color(255, 0, 0, 255),

View File

@@ -4,7 +4,7 @@
"export":
{
"format":"",
"target":"..\/image"
"target":"..\/tests\/test_data\/tilesets\/tests\/test_data\/tilesets\/tests\/test_data\/tilesets\/tests\/test_data\/tilesets\/tests\/test_data\/tilesets\/tests\/test_data\/tilesets\/tests\/test_data\/tilesets\/tests\/test_data\/tilesets\/tests\/test_data\/tilesets\/tests\/test_data\/tilesets\/tests\/test_data\/tilesets\/tests\/test_data\/tilesets\/tests\/test_data\/tilesets\/tests\/test_data\/tilesets\/tests\/test_data\/tilesets\/tests\/test_data\/tilesets\/tests\/test_data\/tilesets\/tests\/test_data\/tilesets\/image"
}
},
"image":"..\/..\/images\/tmw_desert_spacing.png",
@@ -40,9 +40,9 @@
}],
"spacing":1,
"tilecount":48,
"tiledversion":"1.3.5",
"tiledversion":"1.6.0",
"tileheight":32,
"tilewidth":32,
"type":"tileset",
"version":1.2
"version":"1.6"
}

View File

@@ -12,10 +12,10 @@ EXPECTED = tileset.Tileset(
spacing=1,
name="tile_set_image",
tile_count=48,
tiled_version="1.3.5",
tiled_version="1.6.0",
tile_height=32,
tile_width=32,
version=1.2,
version="1.6",
tile_offset=OrderedPair(3, 5),
type="tileset",
)

View File

@@ -4,7 +4,7 @@
"export":
{
"format":"",
"target":"..\/image"
"target":"..\/tests\/test_data\/tilesets\/tests\/test_data\/tilesets\/tests\/test_data\/tilesets\/tests\/test_data\/tilesets\/tests\/test_data\/tilesets\/tests\/test_data\/tilesets\/tests\/test_data\/tilesets\/tests\/test_data\/tilesets\/tests\/test_data\/tilesets\/tests\/test_data\/tilesets\/tests\/test_data\/tilesets\/tests\/test_data\/tilesets\/tests\/test_data\/tilesets\/tests\/test_data\/tilesets\/tests\/test_data\/tilesets\/tests\/test_data\/tilesets\/tests\/test_data\/tilesets\/tests\/test_data\/tilesets\/image"
}
},
"image":"..\/..\/images\/tmw_desert_spacing.png",
@@ -14,7 +14,7 @@
"name":"tile_set_image",
"spacing":1,
"tilecount":48,
"tiledversion":"1.3.5",
"tiledversion":"1.6.0",
"tileheight":32,
"tileoffset":
{
@@ -23,5 +23,5 @@
},
"tilewidth":32,
"type":"tileset",
"version":1.2
"version":"1.6"
}

View File

@@ -0,0 +1,25 @@
from pathlib import Path
from pytiled_parser import tileset
EXPECTED = tileset.Tileset(
columns=8,
image=Path("../../images/tmw_desert_spacing.png"),
image_height=199,
image_width=265,
margin=1,
spacing=1,
name="tile_set_image",
tile_count=48,
tiled_version="1.6.0",
tile_height=32,
tile_width=32,
transformations=tileset.Transformations(
hflip=True,
vflip=False,
prefer_untransformed=False,
rotate=False,
),
version="1.6",
type="tileset",
)

View File

@@ -0,0 +1,21 @@
{ "columns":8,
"image":"..\/..\/images\/tmw_desert_spacing.png",
"imageheight":199,
"imagewidth":265,
"margin":1,
"name":"tile_set_image",
"spacing":1,
"tilecount":48,
"tiledversion":"1.6.0",
"tileheight":32,
"tilewidth":32,
"transformations":
{
"hflip":true,
"preferuntransformed":false,
"rotate":false,
"vflip":false
},
"type":"tileset",
"version":"1.6"
}

View File

@@ -12,10 +12,10 @@ EXPECTED = tileset.Tileset(
spacing=1,
name="tileset",
tile_count=48,
tiled_version="1.3.5",
tiled_version="1.6.0",
tile_height=32,
tile_width=32,
version=1.2,
version="1.6",
transparent_color=Color(255, 0, 255, 255),
type="tileset",
)

View File

@@ -1,12 +1,4 @@
{ "columns":8,
"editorsettings":
{
"export":
{
"format":"",
"target":"."
}
},
"image":"..\/..\/images\/tmw_desert_spacing.png",
"imageheight":199,
"imagewidth":265,
@@ -14,10 +6,10 @@
"name":"tileset",
"spacing":1,
"tilecount":48,
"tiledversion":"1.3.5",
"tiledversion":"1.6.0",
"tileheight":32,
"tilewidth":32,
"transparentcolor":"#ff00ff",
"type":"tileset",
"version":1.2
"version":"1.6"
}

View File

@@ -8,10 +8,10 @@ EXPECTED = tileset.Tileset(
spacing=0,
name="tileset",
tile_count=4,
tiled_version="1.3.5",
tiled_version="1.6.0",
tile_height=32,
tile_width=32,
version=1.2,
version="1.6",
type="tileset",
grid=tileset.Grid(orientation="orthogonal", width=1, height=1),
tiles={

View File

@@ -1,12 +1,4 @@
{ "columns":0,
"editorsettings":
{
"export":
{
"format":"",
"target":"."
}
},
"grid":
{
"height":1,
@@ -17,7 +9,7 @@
"name":"tileset",
"spacing":0,
"tilecount":4,
"tiledversion":"1.3.5",
"tiledversion":"1.6.0",
"tileheight":32,
"tiles":[
{
@@ -119,5 +111,5 @@
}],
"tilewidth":32,
"type":"tileset",
"version":1.2
}
"version":"1.6"
}

View File

@@ -1,6 +1,6 @@
from pathlib import Path
from pytiled_parser import common_types, layer, tileset
from pytiled_parser import common_types, tileset, wang_set
EXPECTED = tileset.Tileset(
columns=8,
@@ -11,261 +11,84 @@ EXPECTED = tileset.Tileset(
image_height=199,
image_width=265,
tile_count=48,
tiled_version="1.3.5",
tiled_version="1.6.0",
tile_height=32,
tile_width=32,
version=1.2,
version="1.6",
type="tileset",
terrain_types=[
tileset.Terrain(
name="Sand",
tile=29,
properties={"terrain property": "test terrain property"},
),
tileset.Terrain(name="Cobblestone", tile=29),
tileset.Terrain(name="Pavement", tile=29),
tileset.Terrain(name="Dirt", tile=29),
wang_sets=[
wang_set.WangSet(
name="Terrains",
tile=-1,
wang_type="mixed",
wang_colors=[
wang_set.WangColor(
name="Sand",
probability=1,
tile=-1,
color=common_types.Color(255, 0, 0, 255),
),
wang_set.WangColor(
name="Cobblestone",
probability=1,
tile=-1,
color=common_types.Color(0, 255, 0, 255),
),
wang_set.WangColor(
name="Pavement",
probability=1,
tile=-1,
color=common_types.Color(0, 0, 255, 255),
),
wang_set.WangColor(
name="Dirt",
probability=1,
tile=-1,
color=common_types.Color(255, 119, 0, 255),
),
],
wang_tiles={
0: wang_set.WangTile(tile_id=0, wang_id=[1, 1, 0, 2, 0, 1, 1, 1]),
1: wang_set.WangTile(tile_id=1, wang_id=[1, 1, 0, 2, 2, 2, 0, 1]),
2: wang_set.WangTile(tile_id=2, wang_id=[1, 1, 1, 1, 0, 2, 0, 1]),
3: wang_set.WangTile(tile_id=3, wang_id=[4, 4, 0, 1, 0, 4, 4, 4]),
4: wang_set.WangTile(tile_id=4, wang_id=[4, 4, 4, 4, 0, 1, 0, 4]),
5: wang_set.WangTile(tile_id=5, wang_id=[1, 1, 0, 4, 0, 1, 1, 1]),
6: wang_set.WangTile(tile_id=6, wang_id=[1, 1, 0, 4, 4, 4, 0, 1]),
7: wang_set.WangTile(tile_id=7, wang_id=[1, 1, 1, 1, 0, 4, 0, 1]),
8: wang_set.WangTile(tile_id=8, wang_id=[0, 2, 2, 2, 0, 1, 1, 1]),
9: wang_set.WangTile(tile_id=9, wang_id=[2, 2, 2, 2, 2, 2, 2, 2]),
10: wang_set.WangTile(tile_id=10, wang_id=[0, 1, 1, 1, 0, 2, 2, 2]),
11: wang_set.WangTile(tile_id=11, wang_id=[0, 1, 0, 4, 4, 4, 4, 4]),
12: wang_set.WangTile(tile_id=12, wang_id=[0, 4, 4, 4, 4, 4, 0, 1]),
13: wang_set.WangTile(tile_id=13, wang_id=[0, 4, 4, 4, 0, 1, 1, 1]),
14: wang_set.WangTile(tile_id=14, wang_id=[4, 4, 4, 4, 4, 4, 4, 4]),
15: wang_set.WangTile(tile_id=15, wang_id=[0, 1, 1, 1, 0, 4, 4, 4]),
16: wang_set.WangTile(tile_id=16, wang_id=[0, 2, 0, 1, 1, 1, 1, 1]),
17: wang_set.WangTile(tile_id=17, wang_id=[2, 2, 0, 1, 1, 1, 0, 2]),
18: wang_set.WangTile(tile_id=18, wang_id=[0, 1, 1, 1, 1, 1, 0, 2]),
19: wang_set.WangTile(tile_id=19, wang_id=[2, 2, 0, 1, 0, 2, 2, 2]),
20: wang_set.WangTile(tile_id=20, wang_id=[2, 2, 2, 2, 0, 1, 0, 2]),
21: wang_set.WangTile(tile_id=21, wang_id=[0, 4, 0, 1, 1, 1, 1, 1]),
22: wang_set.WangTile(tile_id=22, wang_id=[4, 4, 0, 1, 1, 1, 0, 4]),
23: wang_set.WangTile(tile_id=23, wang_id=[0, 1, 1, 1, 1, 1, 0, 4]),
24: wang_set.WangTile(tile_id=24, wang_id=[1, 1, 0, 3, 0, 1, 1, 1]),
25: wang_set.WangTile(tile_id=25, wang_id=[1, 1, 0, 3, 3, 3, 0, 1]),
26: wang_set.WangTile(tile_id=26, wang_id=[1, 1, 1, 1, 0, 3, 0, 1]),
27: wang_set.WangTile(tile_id=27, wang_id=[0, 1, 0, 2, 2, 2, 2, 2]),
28: wang_set.WangTile(tile_id=28, wang_id=[0, 2, 2, 2, 2, 2, 0, 1]),
29: wang_set.WangTile(tile_id=29, wang_id=[1, 1, 1, 1, 1, 1, 1, 1]),
32: wang_set.WangTile(tile_id=32, wang_id=[0, 3, 3, 3, 0, 1, 1, 1]),
33: wang_set.WangTile(tile_id=33, wang_id=[3, 3, 3, 3, 3, 3, 3, 3]),
34: wang_set.WangTile(tile_id=34, wang_id=[0, 1, 1, 1, 0, 3, 3, 3]),
35: wang_set.WangTile(tile_id=35, wang_id=[3, 3, 0, 1, 0, 3, 3, 3]),
36: wang_set.WangTile(tile_id=36, wang_id=[3, 3, 3, 3, 0, 1, 0, 3]),
40: wang_set.WangTile(tile_id=40, wang_id=[0, 3, 0, 1, 1, 1, 1, 1]),
41: wang_set.WangTile(tile_id=41, wang_id=[3, 3, 0, 1, 1, 1, 0, 3]),
42: wang_set.WangTile(tile_id=42, wang_id=[0, 1, 1, 1, 1, 1, 0, 3]),
43: wang_set.WangTile(tile_id=43, wang_id=[0, 1, 0, 3, 3, 3, 3, 3]),
44: wang_set.WangTile(tile_id=44, wang_id=[0, 3, 3, 3, 3, 3, 0, 1]),
},
)
],
tiles={
0: tileset.Tile(
id=0,
terrain=tileset.TileTerrain(
top_left=0, top_right=0, bottom_left=0, bottom_right=1
),
),
1: tileset.Tile(
id=1,
terrain=tileset.TileTerrain(
top_left=0, top_right=0, bottom_left=1, bottom_right=1
),
),
2: tileset.Tile(
id=2,
terrain=tileset.TileTerrain(
top_left=0, top_right=0, bottom_left=1, bottom_right=0
),
),
3: tileset.Tile(
id=3,
terrain=tileset.TileTerrain(
top_left=3, top_right=3, bottom_left=3, bottom_right=0
),
),
4: tileset.Tile(
id=4,
terrain=tileset.TileTerrain(
top_left=3, top_right=3, bottom_left=0, bottom_right=3
),
),
5: tileset.Tile(
id=5,
terrain=tileset.TileTerrain(
top_left=0, top_right=0, bottom_left=0, bottom_right=3
),
),
6: tileset.Tile(
id=6,
terrain=tileset.TileTerrain(
top_left=0, top_right=0, bottom_left=3, bottom_right=3
),
),
7: tileset.Tile(
id=7,
terrain=tileset.TileTerrain(
top_left=0, top_right=0, bottom_left=3, bottom_right=0
),
),
8: tileset.Tile(
id=8,
terrain=tileset.TileTerrain(
top_left=0, top_right=1, bottom_left=0, bottom_right=1
),
),
9: tileset.Tile(
id=9,
terrain=tileset.TileTerrain(
top_left=1, top_right=1, bottom_left=1, bottom_right=1
),
),
10: tileset.Tile(
id=10,
terrain=tileset.TileTerrain(
top_left=1, top_right=0, bottom_left=1, bottom_right=0
),
),
11: tileset.Tile(
id=11,
terrain=tileset.TileTerrain(
top_left=3, top_right=0, bottom_left=3, bottom_right=3
),
),
12: tileset.Tile(
id=12,
terrain=tileset.TileTerrain(
top_left=0, top_right=3, bottom_left=3, bottom_right=3
),
),
13: tileset.Tile(
id=13,
terrain=tileset.TileTerrain(
top_left=0, top_right=3, bottom_left=0, bottom_right=3
),
),
14: tileset.Tile(
id=14,
terrain=tileset.TileTerrain(
top_left=3, top_right=3, bottom_left=3, bottom_right=3
),
),
15: tileset.Tile(
id=15,
terrain=tileset.TileTerrain(
top_left=3, top_right=0, bottom_left=3, bottom_right=0
),
),
16: tileset.Tile(
id=16,
terrain=tileset.TileTerrain(
top_left=0, top_right=1, bottom_left=0, bottom_right=0
),
),
17: tileset.Tile(
id=17,
terrain=tileset.TileTerrain(
top_left=1, top_right=1, bottom_left=0, bottom_right=0
),
),
18: tileset.Tile(
id=18,
terrain=tileset.TileTerrain(
top_left=1, top_right=0, bottom_left=0, bottom_right=0
),
),
19: tileset.Tile(
id=19,
terrain=tileset.TileTerrain(
top_left=1, top_right=1, bottom_left=1, bottom_right=0
),
),
20: tileset.Tile(
id=20,
terrain=tileset.TileTerrain(
top_left=1, top_right=1, bottom_left=0, bottom_right=1
),
),
21: tileset.Tile(
id=21,
terrain=tileset.TileTerrain(
top_left=0, top_right=3, bottom_left=0, bottom_right=0
),
),
22: tileset.Tile(
id=22,
terrain=tileset.TileTerrain(
top_left=3, top_right=3, bottom_left=0, bottom_right=0
),
),
23: tileset.Tile(
id=23,
terrain=tileset.TileTerrain(
top_left=3, top_right=0, bottom_left=0, bottom_right=0
),
),
24: tileset.Tile(
id=24,
terrain=tileset.TileTerrain(
top_left=0, top_right=0, bottom_left=0, bottom_right=2
),
),
25: tileset.Tile(
id=25,
terrain=tileset.TileTerrain(
top_left=0, top_right=0, bottom_left=2, bottom_right=2
),
),
26: tileset.Tile(
id=26,
terrain=tileset.TileTerrain(
top_left=0, top_right=0, bottom_left=2, bottom_right=0
),
),
27: tileset.Tile(
id=27,
terrain=tileset.TileTerrain(
top_left=1, top_right=0, bottom_left=1, bottom_right=1
),
),
28: tileset.Tile(
id=28,
terrain=tileset.TileTerrain(
top_left=0, top_right=1, bottom_left=1, bottom_right=1
),
),
29: tileset.Tile(
id=29,
terrain=tileset.TileTerrain(
top_left=0, top_right=0, bottom_left=0, bottom_right=0
),
),
32: tileset.Tile(
id=32,
terrain=tileset.TileTerrain(
top_left=0, top_right=2, bottom_left=0, bottom_right=2
),
),
33: tileset.Tile(
id=33,
terrain=tileset.TileTerrain(
top_left=2, top_right=2, bottom_left=2, bottom_right=2
),
),
34: tileset.Tile(
id=34,
terrain=tileset.TileTerrain(
top_left=2, top_right=0, bottom_left=2, bottom_right=0
),
),
35: tileset.Tile(
id=35,
terrain=tileset.TileTerrain(
top_left=2, top_right=2, bottom_left=2, bottom_right=0
),
),
36: tileset.Tile(
id=36,
terrain=tileset.TileTerrain(
top_left=2, top_right=2, bottom_left=0, bottom_right=2
),
),
40: tileset.Tile(
id=40,
terrain=tileset.TileTerrain(
top_left=0, top_right=2, bottom_left=0, bottom_right=0
),
),
41: tileset.Tile(
id=41,
terrain=tileset.TileTerrain(
top_left=2, top_right=2, bottom_left=0, bottom_right=0
),
),
42: tileset.Tile(
id=42,
terrain=tileset.TileTerrain(
top_left=2, top_right=0, bottom_left=0, bottom_right=0
),
),
43: tileset.Tile(
id=43,
terrain=tileset.TileTerrain(
top_left=2, top_right=0, bottom_left=2, bottom_right=2
),
),
44: tileset.Tile(
id=44,
terrain=tileset.TileTerrain(
top_left=0, top_right=2, bottom_left=2, bottom_right=2
),
),
},
)

View File

@@ -1,206 +1,206 @@
{ "columns":8,
"editorsettings":
{
"export":
{
"format":"",
"target":"."
}
},
"image":"..\/..\/images\/tmw_desert_spacing.png",
"imageheight":199,
"imagewidth":265,
"margin":1,
"name":"tileset",
"spacing":1,
"terrains":[
{
"name":"Sand",
"properties":[
{
"name":"terrain property",
"type":"string",
"value":"test terrain property"
}],
"tile":29
},
{
"name":"Cobblestone",
"tile":29
},
{
"name":"Pavement",
"tile":29
},
{
"name":"Dirt",
"tile":29
}],
"tilecount":48,
"tiledversion":"1.3.5",
"tiledversion":"1.6.0",
"tileheight":32,
"tiles":[
{
"id":0,
"terrain":[0, 0, 0, 1]
},
{
"id":1,
"terrain":[0, 0, 1, 1]
},
{
"id":2,
"terrain":[0, 0, 1, 0]
},
{
"id":3,
"terrain":[3, 3, 3, 0]
},
{
"id":4,
"terrain":[3, 3, 0, 3]
},
{
"id":5,
"terrain":[0, 0, 0, 3]
},
{
"id":6,
"terrain":[0, 0, 3, 3]
},
{
"id":7,
"terrain":[0, 0, 3, 0]
},
{
"id":8,
"terrain":[0, 1, 0, 1]
},
{
"id":9,
"terrain":[1, 1, 1, 1]
},
{
"id":10,
"terrain":[1, 0, 1, 0]
},
{
"id":11,
"terrain":[3, 0, 3, 3]
},
{
"id":12,
"terrain":[0, 3, 3, 3]
},
{
"id":13,
"terrain":[0, 3, 0, 3]
},
{
"id":14,
"terrain":[3, 3, 3, 3]
},
{
"id":15,
"terrain":[3, 0, 3, 0]
},
{
"id":16,
"terrain":[0, 1, 0, 0]
},
{
"id":17,
"terrain":[1, 1, 0, 0]
},
{
"id":18,
"terrain":[1, 0, 0, 0]
},
{
"id":19,
"terrain":[1, 1, 1, 0]
},
{
"id":20,
"terrain":[1, 1, 0, 1]
},
{
"id":21,
"terrain":[0, 3, 0, 0]
},
{
"id":22,
"terrain":[3, 3, 0, 0]
},
{
"id":23,
"terrain":[3, 0, 0, 0]
},
{
"id":24,
"terrain":[0, 0, 0, 2]
},
{
"id":25,
"terrain":[0, 0, 2, 2]
},
{
"id":26,
"terrain":[0, 0, 2, 0]
},
{
"id":27,
"terrain":[1, 0, 1, 1]
},
{
"id":28,
"terrain":[0, 1, 1, 1]
},
{
"id":29,
"terrain":[0, 0, 0, 0]
},
{
"id":32,
"terrain":[0, 2, 0, 2]
},
{
"id":33,
"terrain":[2, 2, 2, 2]
},
{
"id":34,
"terrain":[2, 0, 2, 0]
},
{
"id":35,
"terrain":[2, 2, 2, 0]
},
{
"id":36,
"terrain":[2, 2, 0, 2]
},
{
"id":40,
"terrain":[0, 2, 0, 0]
},
{
"id":41,
"terrain":[2, 2, 0, 0]
},
{
"id":42,
"terrain":[2, 0, 0, 0]
},
{
"id":43,
"terrain":[2, 0, 2, 2]
},
{
"id":44,
"terrain":[0, 2, 2, 2]
}],
"tilewidth":32,
"type":"tileset",
"version":1.2
"version":"1.6",
"wangsets":[
{
"colors":[
{
"color":"#ff0000",
"name":"Sand",
"probability":1,
"tile":-1
},
{
"color":"#00ff00",
"name":"Cobblestone",
"probability":1,
"tile":-1
},
{
"color":"#0000ff",
"name":"Pavement",
"probability":1,
"tile":-1
},
{
"color":"#ff7700",
"name":"Dirt",
"probability":1,
"tile":-1
}],
"name":"Terrains",
"tile":-1,
"type":"mixed",
"wangtiles":[
{
"tileid":0,
"wangid":[1, 1, 0, 2, 0, 1, 1, 1]
},
{
"tileid":1,
"wangid":[1, 1, 0, 2, 2, 2, 0, 1]
},
{
"tileid":2,
"wangid":[1, 1, 1, 1, 0, 2, 0, 1]
},
{
"tileid":3,
"wangid":[4, 4, 0, 1, 0, 4, 4, 4]
},
{
"tileid":4,
"wangid":[4, 4, 4, 4, 0, 1, 0, 4]
},
{
"tileid":5,
"wangid":[1, 1, 0, 4, 0, 1, 1, 1]
},
{
"tileid":6,
"wangid":[1, 1, 0, 4, 4, 4, 0, 1]
},
{
"tileid":7,
"wangid":[1, 1, 1, 1, 0, 4, 0, 1]
},
{
"tileid":8,
"wangid":[0, 2, 2, 2, 0, 1, 1, 1]
},
{
"tileid":9,
"wangid":[2, 2, 2, 2, 2, 2, 2, 2]
},
{
"tileid":10,
"wangid":[0, 1, 1, 1, 0, 2, 2, 2]
},
{
"tileid":11,
"wangid":[0, 1, 0, 4, 4, 4, 4, 4]
},
{
"tileid":12,
"wangid":[0, 4, 4, 4, 4, 4, 0, 1]
},
{
"tileid":13,
"wangid":[0, 4, 4, 4, 0, 1, 1, 1]
},
{
"tileid":14,
"wangid":[4, 4, 4, 4, 4, 4, 4, 4]
},
{
"tileid":15,
"wangid":[0, 1, 1, 1, 0, 4, 4, 4]
},
{
"tileid":16,
"wangid":[0, 2, 0, 1, 1, 1, 1, 1]
},
{
"tileid":17,
"wangid":[2, 2, 0, 1, 1, 1, 0, 2]
},
{
"tileid":18,
"wangid":[0, 1, 1, 1, 1, 1, 0, 2]
},
{
"tileid":19,
"wangid":[2, 2, 0, 1, 0, 2, 2, 2]
},
{
"tileid":20,
"wangid":[2, 2, 2, 2, 0, 1, 0, 2]
},
{
"tileid":21,
"wangid":[0, 4, 0, 1, 1, 1, 1, 1]
},
{
"tileid":22,
"wangid":[4, 4, 0, 1, 1, 1, 0, 4]
},
{
"tileid":23,
"wangid":[0, 1, 1, 1, 1, 1, 0, 4]
},
{
"tileid":24,
"wangid":[1, 1, 0, 3, 0, 1, 1, 1]
},
{
"tileid":25,
"wangid":[1, 1, 0, 3, 3, 3, 0, 1]
},
{
"tileid":26,
"wangid":[1, 1, 1, 1, 0, 3, 0, 1]
},
{
"tileid":27,
"wangid":[0, 1, 0, 2, 2, 2, 2, 2]
},
{
"tileid":28,
"wangid":[0, 2, 2, 2, 2, 2, 0, 1]
},
{
"tileid":29,
"wangid":[1, 1, 1, 1, 1, 1, 1, 1]
},
{
"tileid":32,
"wangid":[0, 3, 3, 3, 0, 1, 1, 1]
},
{
"tileid":33,
"wangid":[3, 3, 3, 3, 3, 3, 3, 3]
},
{
"tileid":34,
"wangid":[0, 1, 1, 1, 0, 3, 3, 3]
},
{
"tileid":35,
"wangid":[3, 3, 0, 1, 0, 3, 3, 3]
},
{
"tileid":36,
"wangid":[3, 3, 3, 3, 0, 1, 0, 3]
},
{
"tileid":40,
"wangid":[0, 3, 0, 1, 1, 1, 1, 1]
},
{
"tileid":41,
"wangid":[3, 3, 0, 1, 1, 1, 0, 3]
},
{
"tileid":42,
"wangid":[0, 1, 1, 1, 1, 1, 0, 3]
},
{
"tileid":43,
"wangid":[0, 1, 0, 3, 3, 3, 3, 3]
},
{
"tileid":44,
"wangid":[0, 3, 3, 3, 3, 3, 0, 1]
}]
}]
}

View File

@@ -18,7 +18,7 @@
"nextobjectid":1,
"orientation":"orthogonal",
"renderorder":"right-down",
"tiledversion":"1.3.5",
"tiledversion":"1.6.0",
"tileheight":32,
"tilesets":[
{
@@ -27,6 +27,6 @@
}],
"tilewidth":32,
"type":"map",
"version":1.2,
"version":"1.6",
"width":20
}

View File

@@ -6,15 +6,14 @@
"name":"tileset",
"spacing":0,
"tilecount":81,
"tiledversion":"1.3.5",
"tiledversion":"1.6.0",
"tileheight":32,
"tilewidth":32,
"type":"tileset",
"version":1.2,
"version":"1.6",
"wangsets":[
{
"cornercolors":[],
"edgecolors":[
"colors":[
{
"color":"#ff0000",
"name":"Path",
@@ -35,572 +34,330 @@
}],
"name":"My Wang Set",
"tile":-1,
"type":"edge",
"wangtiles":[
{
"dflip":false,
"hflip":false,
"tileid":0,
"vflip":false,
"wangid":[2, 0, 3, 0, 3, 0, 2, 0]
},
{
"dflip":false,
"hflip":false,
"tileid":1,
"vflip":false,
"wangid":[2, 0, 3, 0, 3, 0, 3, 0]
},
{
"dflip":false,
"hflip":false,
"tileid":2,
"vflip":false,
"wangid":[2, 0, 1, 0, 3, 0, 3, 0]
},
{
"dflip":false,
"hflip":false,
"tileid":3,
"vflip":false,
"wangid":[2, 0, 3, 0, 3, 0, 1, 0]
},
{
"dflip":false,
"hflip":false,
"tileid":4,
"vflip":false,
"wangid":[2, 0, 2, 0, 3, 0, 3, 0]
},
{
"dflip":false,
"hflip":false,
"tileid":5,
"vflip":false,
"wangid":[2, 0, 1, 0, 3, 0, 2, 0]
},
{
"dflip":false,
"hflip":false,
"tileid":6,
"vflip":false,
"wangid":[2, 0, 1, 0, 3, 0, 1, 0]
},
{
"dflip":false,
"hflip":false,
"tileid":7,
"vflip":false,
"wangid":[2, 0, 2, 0, 3, 0, 1, 0]
},
{
"dflip":false,
"hflip":false,
"tileid":8,
"vflip":false,
"wangid":[2, 0, 2, 0, 3, 0, 2, 0]
},
{
"dflip":false,
"hflip":false,
"tileid":9,
"vflip":false,
"wangid":[3, 0, 3, 0, 3, 0, 2, 0]
},
{
"dflip":false,
"hflip":false,
"tileid":10,
"vflip":false,
"wangid":[3, 0, 3, 0, 3, 0, 3, 0]
},
{
"dflip":false,
"hflip":false,
"tileid":11,
"vflip":false,
"wangid":[3, 0, 1, 0, 3, 0, 3, 0]
},
{
"dflip":false,
"hflip":false,
"tileid":12,
"vflip":false,
"wangid":[3, 0, 3, 0, 3, 0, 1, 0]
},
{
"dflip":false,
"hflip":false,
"tileid":13,
"vflip":false,
"wangid":[3, 0, 2, 0, 3, 0, 3, 0]
},
{
"dflip":false,
"hflip":false,
"tileid":14,
"vflip":false,
"wangid":[3, 0, 1, 0, 3, 0, 2, 0]
},
{
"dflip":false,
"hflip":false,
"tileid":15,
"vflip":false,
"wangid":[3, 0, 1, 0, 3, 0, 1, 0]
},
{
"dflip":false,
"hflip":false,
"tileid":16,
"vflip":false,
"wangid":[3, 0, 2, 0, 3, 0, 1, 0]
},
{
"dflip":false,
"hflip":false,
"tileid":17,
"vflip":false,
"wangid":[3, 0, 2, 0, 3, 0, 2, 0]
},
{
"dflip":false,
"hflip":false,
"tileid":18,
"vflip":false,
"wangid":[3, 0, 3, 0, 1, 0, 2, 0]
},
{
"dflip":false,
"hflip":false,
"tileid":19,
"vflip":false,
"wangid":[3, 0, 3, 0, 1, 0, 3, 0]
},
{
"dflip":false,
"hflip":false,
"tileid":20,
"vflip":false,
"wangid":[3, 0, 1, 0, 1, 0, 3, 0]
},
{
"dflip":false,
"hflip":false,
"tileid":21,
"vflip":false,
"wangid":[3, 0, 3, 0, 1, 0, 1, 0]
},
{
"dflip":false,
"hflip":false,
"tileid":22,
"vflip":false,
"wangid":[3, 0, 2, 0, 1, 0, 3, 0]
},
{
"dflip":false,
"hflip":false,
"tileid":23,
"vflip":false,
"wangid":[3, 0, 1, 0, 1, 0, 2, 0]
},
{
"dflip":false,
"hflip":false,
"tileid":24,
"vflip":false,
"wangid":[3, 0, 1, 0, 1, 0, 1, 0]
},
{
"dflip":false,
"hflip":false,
"tileid":25,
"vflip":false,
"wangid":[3, 0, 2, 0, 1, 0, 1, 0]
},
{
"dflip":false,
"hflip":false,
"tileid":26,
"vflip":false,
"wangid":[3, 0, 2, 0, 1, 0, 2, 0]
},
{
"dflip":false,
"hflip":false,
"tileid":27,
"vflip":false,
"wangid":[1, 0, 3, 0, 3, 0, 2, 0]
},
{
"dflip":false,
"hflip":false,
"tileid":28,
"vflip":false,
"wangid":[1, 0, 3, 0, 3, 0, 3, 0]
},
{
"dflip":false,
"hflip":false,
"tileid":29,
"vflip":false,
"wangid":[1, 0, 1, 0, 3, 0, 3, 0]
},
{
"dflip":false,
"hflip":false,
"tileid":30,
"vflip":false,
"wangid":[1, 0, 3, 0, 3, 0, 1, 0]
},
{
"dflip":false,
"hflip":false,
"tileid":31,
"vflip":false,
"wangid":[1, 0, 2, 0, 3, 0, 3, 0]
},
{
"dflip":false,
"hflip":false,
"tileid":32,
"vflip":false,
"wangid":[1, 0, 1, 0, 3, 0, 2, 0]
},
{
"dflip":false,
"hflip":false,
"tileid":33,
"vflip":false,
"wangid":[1, 0, 1, 0, 3, 0, 1, 0]
},
{
"dflip":false,
"hflip":false,
"tileid":34,
"vflip":false,
"wangid":[1, 0, 2, 0, 3, 0, 1, 0]
},
{
"dflip":false,
"hflip":false,
"tileid":35,
"vflip":false,
"wangid":[1, 0, 2, 0, 3, 0, 2, 0]
},
{
"dflip":false,
"hflip":false,
"tileid":36,
"vflip":false,
"wangid":[3, 0, 3, 0, 2, 0, 2, 0]
},
{
"dflip":false,
"hflip":false,
"tileid":37,
"vflip":false,
"wangid":[3, 0, 3, 0, 2, 0, 3, 0]
},
{
"dflip":false,
"hflip":false,
"tileid":38,
"vflip":false,
"wangid":[3, 0, 1, 0, 2, 0, 3, 0]
},
{
"dflip":false,
"hflip":false,
"tileid":39,
"vflip":false,
"wangid":[3, 0, 3, 0, 2, 0, 1, 0]
},
{
"dflip":false,
"hflip":false,
"tileid":40,
"vflip":false,
"wangid":[3, 0, 2, 0, 2, 0, 3, 0]
},
{
"dflip":false,
"hflip":false,
"tileid":41,
"vflip":false,
"wangid":[3, 0, 1, 0, 2, 0, 2, 0]
},
{
"dflip":false,
"hflip":false,
"tileid":42,
"vflip":false,
"wangid":[3, 0, 1, 0, 2, 0, 1, 0]
},
{
"dflip":false,
"hflip":false,
"tileid":43,
"vflip":false,
"wangid":[3, 0, 2, 0, 2, 0, 1, 0]
},
{
"dflip":false,
"hflip":false,
"tileid":44,
"vflip":false,
"wangid":[3, 0, 2, 0, 2, 0, 2, 0]
},
{
"dflip":false,
"hflip":false,
"tileid":45,
"vflip":false,
"wangid":[2, 0, 3, 0, 1, 0, 2, 0]
},
{
"dflip":false,
"hflip":false,
"tileid":46,
"vflip":false,
"wangid":[2, 0, 3, 0, 1, 0, 3, 0]
},
{
"dflip":false,
"hflip":false,
"tileid":47,
"vflip":false,
"wangid":[2, 0, 1, 0, 1, 0, 3, 0]
},
{
"dflip":false,
"hflip":false,
"tileid":48,
"vflip":false,
"wangid":[2, 0, 3, 0, 1, 0, 1, 0]
},
{
"dflip":false,
"hflip":false,
"tileid":49,
"vflip":false,
"wangid":[2, 0, 2, 0, 1, 0, 3, 0]
},
{
"dflip":false,
"hflip":false,
"tileid":50,
"vflip":false,
"wangid":[2, 0, 1, 0, 1, 0, 2, 0]
},
{
"dflip":false,
"hflip":false,
"tileid":51,
"vflip":false,
"wangid":[2, 0, 1, 0, 1, 0, 1, 0]
},
{
"dflip":false,
"hflip":false,
"tileid":52,
"vflip":false,
"wangid":[2, 0, 2, 0, 1, 0, 1, 0]
},
{
"dflip":false,
"hflip":false,
"tileid":53,
"vflip":false,
"wangid":[2, 0, 2, 0, 1, 0, 2, 0]
},
{
"dflip":false,
"hflip":false,
"tileid":54,
"vflip":false,
"wangid":[1, 0, 3, 0, 1, 0, 2, 0]
},
{
"dflip":false,
"hflip":false,
"tileid":55,
"vflip":false,
"wangid":[1, 0, 3, 0, 1, 0, 3, 0]
},
{
"dflip":false,
"hflip":false,
"tileid":56,
"vflip":false,
"wangid":[1, 0, 1, 0, 1, 0, 3, 0]
},
{
"dflip":false,
"hflip":false,
"tileid":57,
"vflip":false,
"wangid":[1, 0, 3, 0, 1, 0, 1, 0]
},
{
"dflip":false,
"hflip":false,
"tileid":58,
"vflip":false,
"wangid":[1, 0, 2, 0, 1, 0, 3, 0]
},
{
"dflip":false,
"hflip":false,
"tileid":59,
"vflip":false,
"wangid":[1, 0, 1, 0, 1, 0, 2, 0]
},
{
"dflip":false,
"hflip":false,
"tileid":60,
"vflip":false,
"wangid":[1, 0, 1, 0, 1, 0, 1, 0]
},
{
"dflip":false,
"hflip":false,
"tileid":61,
"vflip":false,
"wangid":[1, 0, 2, 0, 1, 0, 1, 0]
},
{
"dflip":false,
"hflip":false,
"tileid":62,
"vflip":false,
"wangid":[1, 0, 2, 0, 1, 0, 2, 0]
},
{
"dflip":false,
"hflip":false,
"tileid":63,
"vflip":false,
"wangid":[1, 0, 3, 0, 2, 0, 2, 0]
},
{
"dflip":false,
"hflip":false,
"tileid":64,
"vflip":false,
"wangid":[1, 0, 3, 0, 2, 0, 3, 0]
},
{
"dflip":false,
"hflip":false,
"tileid":65,
"vflip":false,
"wangid":[1, 0, 1, 0, 2, 0, 3, 0]
},
{
"dflip":false,
"hflip":false,
"tileid":66,
"vflip":false,
"wangid":[1, 0, 3, 0, 2, 0, 1, 0]
},
{
"dflip":false,
"hflip":false,
"tileid":67,
"vflip":false,
"wangid":[1, 0, 2, 0, 2, 0, 3, 0]
},
{
"dflip":false,
"hflip":false,
"tileid":68,
"vflip":false,
"wangid":[1, 0, 1, 0, 2, 0, 2, 0]
},
{
"dflip":false,
"hflip":false,
"tileid":69,
"vflip":false,
"wangid":[1, 0, 1, 0, 2, 0, 1, 0]
},
{
"dflip":false,
"hflip":false,
"tileid":70,
"vflip":false,
"wangid":[1, 0, 2, 0, 2, 0, 1, 0]
},
{
"dflip":false,
"hflip":false,
"tileid":71,
"vflip":false,
"wangid":[1, 0, 2, 0, 2, 0, 2, 0]
},
{
"dflip":false,
"hflip":false,
"tileid":72,
"vflip":false,
"wangid":[2, 0, 3, 0, 2, 0, 2, 0]
},
{
"dflip":false,
"hflip":false,
"tileid":73,
"vflip":false,
"wangid":[2, 0, 3, 0, 2, 0, 3, 0]
},
{
"dflip":false,
"hflip":false,
"tileid":74,
"vflip":false,
"wangid":[2, 0, 1, 0, 2, 0, 3, 0]
},
{
"dflip":false,
"hflip":false,
"tileid":75,
"vflip":false,
"wangid":[2, 0, 3, 0, 2, 0, 1, 0]
},
{
"dflip":false,
"hflip":false,
"tileid":76,
"vflip":false,
"wangid":[2, 0, 2, 0, 2, 0, 3, 0]
},
{
"dflip":false,
"hflip":false,
"tileid":77,
"vflip":false,
"wangid":[2, 0, 1, 0, 2, 0, 2, 0]
},
{
"dflip":false,
"hflip":false,
"tileid":78,
"vflip":false,
"wangid":[2, 0, 1, 0, 2, 0, 1, 0]
},
{
"dflip":false,
"hflip":false,
"tileid":79,
"vflip":false,
"wangid":[2, 0, 2, 0, 2, 0, 1, 0]
},
{
"dflip":false,
"hflip":false,
"tileid":80,
"vflip":false,
"wangid":[2, 0, 2, 0, 2, 0, 2, 0]
}]
}]

View File

@@ -0,0 +1,177 @@
from pathlib import Path
from pytiled_parser import common_types, layer, tiled_map, tileset, world
EXPECTED = world.World(
only_show_adjacent=False,
maps=[
world.WorldMap(
size=common_types.Size(160, 160),
coordinates=common_types.OrderedPair(-160, 0),
tiled_map=tiled_map.TiledMap(
map_file=Path(Path(__file__).parent / "map_manual_one.json")
.absolute()
.resolve(),
infinite=False,
map_size=common_types.Size(5, 5),
next_layer_id=2,
next_object_id=1,
orientation="orthogonal",
render_order="right-down",
tiled_version="1.6.0",
tile_size=common_types.Size(32, 32),
version="1.6",
tilesets={
1: tileset.Tileset(
columns=8,
image=Path(
Path(__file__).parent
/ "../../images/tmw_desert_spacing.png"
)
.absolute()
.resolve(),
image_width=265,
image_height=199,
margin=1,
spacing=1,
name="tileset",
tile_count=48,
tiled_version="1.6.0",
tile_height=32,
tile_width=32,
version="1.6",
type="tileset",
)
},
layers=[
layer.TileLayer(
name="Tile Layer 1",
opacity=1,
visible=True,
id=1,
size=common_types.Size(5, 5),
data=[
[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],
],
)
],
),
),
world.WorldMap(
size=common_types.Size(160, 160),
coordinates=common_types.OrderedPair(0, 0),
tiled_map=tiled_map.TiledMap(
map_file=Path(Path(__file__).parent / "map_p0-n0.json")
.absolute()
.resolve(),
infinite=False,
map_size=common_types.Size(5, 5),
next_layer_id=2,
next_object_id=1,
orientation="orthogonal",
render_order="right-down",
tiled_version="1.6.0",
tile_size=common_types.Size(32, 32),
version="1.6",
tilesets={
1: tileset.Tileset(
columns=8,
image=Path(
Path(__file__).parent
/ "../../images/tmw_desert_spacing.png"
)
.absolute()
.resolve(),
image_width=265,
image_height=199,
margin=1,
spacing=1,
name="tileset",
tile_count=48,
tiled_version="1.6.0",
tile_height=32,
tile_width=32,
version="1.6",
type="tileset",
)
},
layers=[
layer.TileLayer(
name="Tile Layer 1",
opacity=1,
visible=True,
id=1,
size=common_types.Size(5, 5),
data=[
[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],
],
)
],
),
),
world.WorldMap(
size=common_types.Size(160, 160),
coordinates=common_types.OrderedPair(0, 160),
tiled_map=tiled_map.TiledMap(
map_file=Path(Path(__file__).parent / "map_p0-n1.json")
.absolute()
.resolve(),
infinite=False,
map_size=common_types.Size(5, 5),
next_layer_id=2,
next_object_id=1,
orientation="orthogonal",
render_order="right-down",
tiled_version="1.6.0",
tile_size=common_types.Size(32, 32),
version="1.6",
tilesets={
1: tileset.Tileset(
columns=8,
image=Path(
Path(__file__).parent
/ "../../images/tmw_desert_spacing.png"
)
.absolute()
.resolve(),
image_width=265,
image_height=199,
margin=1,
spacing=1,
name="tileset",
tile_count=48,
tiled_version="1.6.0",
tile_height=32,
tile_width=32,
version="1.6",
type="tileset",
)
},
layers=[
layer.TileLayer(
name="Tile Layer 1",
opacity=1,
visible=True,
id=1,
size=common_types.Size(5, 5),
data=[
[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],
],
)
],
),
),
],
)

View File

@@ -0,0 +1,32 @@
{ "compressionlevel":-1,
"height":5,
"infinite":false,
"layers":[
{
"data":[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":5,
"id":1,
"name":"Tile Layer 1",
"opacity":1,
"type":"tilelayer",
"visible":true,
"width":5,
"x":0,
"y":0
}],
"nextlayerid":2,
"nextobjectid":1,
"orientation":"orthogonal",
"renderorder":"right-down",
"tiledversion":"1.6.0",
"tileheight":32,
"tilesets":[
{
"firstgid":1,
"source":"tileset.json"
}],
"tilewidth":32,
"type":"map",
"version":"1.6",
"width":5
}

View File

@@ -0,0 +1,32 @@
{ "compressionlevel":-1,
"height":5,
"infinite":false,
"layers":[
{
"data":[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":5,
"id":1,
"name":"Tile Layer 1",
"opacity":1,
"type":"tilelayer",
"visible":true,
"width":5,
"x":0,
"y":0
}],
"nextlayerid":2,
"nextobjectid":1,
"orientation":"orthogonal",
"renderorder":"right-down",
"tiledversion":"1.6.0",
"tileheight":32,
"tilesets":[
{
"firstgid":1,
"source":"tileset.json"
}],
"tilewidth":32,
"type":"map",
"version":"1.6",
"width":5
}

View File

@@ -0,0 +1,32 @@
{ "compressionlevel":-1,
"height":5,
"infinite":false,
"layers":[
{
"data":[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":5,
"id":1,
"name":"Tile Layer 1",
"opacity":1,
"type":"tilelayer",
"visible":true,
"width":5,
"x":0,
"y":0
}],
"nextlayerid":2,
"nextobjectid":1,
"orientation":"orthogonal",
"renderorder":"right-down",
"tiledversion":"1.6.0",
"tileheight":32,
"tilesets":[
{
"firstgid":1,
"source":"tileset.json"
}],
"tilewidth":32,
"type":"map",
"version":"1.6",
"width":5
}

View File

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

View File

@@ -0,0 +1,22 @@
{
"maps": [
{
"fileName": "map_manual_one.json",
"height": 160,
"width": 160,
"x": -160,
"y": 0
}
],
"patterns": [
{
"regexp": "map_p(\\d+)-n(\\d+)\\.json",
"multiplierX": 160,
"multiplierY": 160,
"offsetX": 0,
"offsetY": 0
}
],
"onlyShowAdjacentMaps": false,
"type": "world"
}

View File

@@ -0,0 +1,121 @@
from pathlib import Path
from pytiled_parser import common_types, layer, tiled_map, tileset, world
EXPECTED = world.World(
only_show_adjacent=False,
maps=[
world.WorldMap(
size=common_types.Size(160, 160),
coordinates=common_types.OrderedPair(0, 0),
tiled_map=tiled_map.TiledMap(
map_file=Path(Path(__file__).parent / "map_p0-n0.json")
.absolute()
.resolve(),
infinite=False,
map_size=common_types.Size(5, 5),
next_layer_id=2,
next_object_id=1,
orientation="orthogonal",
render_order="right-down",
tiled_version="1.6.0",
tile_size=common_types.Size(32, 32),
version="1.6",
tilesets={
1: tileset.Tileset(
columns=8,
image=Path(
Path(__file__).parent
/ "../../images/tmw_desert_spacing.png"
)
.absolute()
.resolve(),
image_width=265,
image_height=199,
margin=1,
spacing=1,
name="tileset",
tile_count=48,
tiled_version="1.6.0",
tile_height=32,
tile_width=32,
version="1.6",
type="tileset",
)
},
layers=[
layer.TileLayer(
name="Tile Layer 1",
opacity=1,
visible=True,
id=1,
size=common_types.Size(5, 5),
data=[
[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],
],
)
],
),
),
world.WorldMap(
size=common_types.Size(160, 160),
coordinates=common_types.OrderedPair(0, 160),
tiled_map=tiled_map.TiledMap(
map_file=Path(Path(__file__).parent / "map_p0-n1.json")
.absolute()
.resolve(),
infinite=False,
map_size=common_types.Size(5, 5),
next_layer_id=2,
next_object_id=1,
orientation="orthogonal",
render_order="right-down",
tiled_version="1.6.0",
tile_size=common_types.Size(32, 32),
version="1.6",
tilesets={
1: tileset.Tileset(
columns=8,
image=Path(
Path(__file__).parent
/ "../../images/tmw_desert_spacing.png"
)
.absolute()
.resolve(),
image_width=265,
image_height=199,
margin=1,
spacing=1,
name="tileset",
tile_count=48,
tiled_version="1.6.0",
tile_height=32,
tile_width=32,
version="1.6",
type="tileset",
)
},
layers=[
layer.TileLayer(
name="Tile Layer 1",
opacity=1,
visible=True,
id=1,
size=common_types.Size(5, 5),
data=[
[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],
],
)
],
),
),
],
)

View File

@@ -0,0 +1,32 @@
{ "compressionlevel":-1,
"height":5,
"infinite":false,
"layers":[
{
"data":[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":5,
"id":1,
"name":"Tile Layer 1",
"opacity":1,
"type":"tilelayer",
"visible":true,
"width":5,
"x":0,
"y":0
}],
"nextlayerid":2,
"nextobjectid":1,
"orientation":"orthogonal",
"renderorder":"right-down",
"tiledversion":"1.6.0",
"tileheight":32,
"tilesets":[
{
"firstgid":1,
"source":"tileset.json"
}],
"tilewidth":32,
"type":"map",
"version":"1.6",
"width":5
}

View File

@@ -0,0 +1,32 @@
{ "compressionlevel":-1,
"height":5,
"infinite":false,
"layers":[
{
"data":[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":5,
"id":1,
"name":"Tile Layer 1",
"opacity":1,
"type":"tilelayer",
"visible":true,
"width":5,
"x":0,
"y":0
}],
"nextlayerid":2,
"nextobjectid":1,
"orientation":"orthogonal",
"renderorder":"right-down",
"tiledversion":"1.6.0",
"tileheight":32,
"tilesets":[
{
"firstgid":1,
"source":"tileset.json"
}],
"tilewidth":32,
"type":"map",
"version":"1.6",
"width":5
}

View File

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

View File

@@ -0,0 +1,12 @@
{
"patterns": [
{
"regexp": "map_p(\\d+)-n(\\d+)\\.json",
"multiplierX": 160,
"multiplierY": 160,
"offsetX": 0,
"offsetY": 0
}
],
"type": "world"
}

View File

@@ -0,0 +1,121 @@
from pathlib import Path
from pytiled_parser import common_types, layer, tiled_map, tileset, world
EXPECTED = world.World(
only_show_adjacent=False,
maps=[
world.WorldMap(
size=common_types.Size(160, 160),
coordinates=common_types.OrderedPair(0, 0),
tiled_map=tiled_map.TiledMap(
map_file=Path(Path(__file__).parent / "map_01.json")
.absolute()
.resolve(),
infinite=False,
map_size=common_types.Size(5, 5),
next_layer_id=2,
next_object_id=1,
orientation="orthogonal",
render_order="right-down",
tiled_version="1.6.0",
tile_size=common_types.Size(32, 32),
version="1.6",
tilesets={
1: tileset.Tileset(
columns=8,
image=Path(
Path(__file__).parent
/ "../../images/tmw_desert_spacing.png"
)
.absolute()
.resolve(),
image_width=265,
image_height=199,
margin=1,
spacing=1,
name="tileset",
tile_count=48,
tiled_version="1.6.0",
tile_height=32,
tile_width=32,
version="1.6",
type="tileset",
)
},
layers=[
layer.TileLayer(
name="Tile Layer 1",
opacity=1,
visible=True,
id=1,
size=common_types.Size(5, 5),
data=[
[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],
],
)
],
),
),
world.WorldMap(
size=common_types.Size(160, 160),
coordinates=common_types.OrderedPair(160, 0),
tiled_map=tiled_map.TiledMap(
map_file=Path(Path(__file__).parent / "map_02.json")
.absolute()
.resolve(),
infinite=False,
map_size=common_types.Size(5, 5),
next_layer_id=2,
next_object_id=1,
orientation="orthogonal",
render_order="right-down",
tiled_version="1.6.0",
tile_size=common_types.Size(32, 32),
version="1.6",
tilesets={
1: tileset.Tileset(
columns=8,
image=Path(
Path(__file__).parent
/ "../../images/tmw_desert_spacing.png"
)
.absolute()
.resolve(),
image_width=265,
image_height=199,
margin=1,
spacing=1,
name="tileset",
tile_count=48,
tiled_version="1.6.0",
tile_height=32,
tile_width=32,
version="1.6",
type="tileset",
)
},
layers=[
layer.TileLayer(
name="Tile Layer 1",
opacity=1,
visible=True,
id=1,
size=common_types.Size(5, 5),
data=[
[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],
],
)
],
),
),
],
)

View File

@@ -0,0 +1,32 @@
{ "compressionlevel":-1,
"height":5,
"infinite":false,
"layers":[
{
"data":[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":5,
"id":1,
"name":"Tile Layer 1",
"opacity":1,
"type":"tilelayer",
"visible":true,
"width":5,
"x":0,
"y":0
}],
"nextlayerid":2,
"nextobjectid":1,
"orientation":"orthogonal",
"renderorder":"right-down",
"tiledversion":"1.6.0",
"tileheight":32,
"tilesets":[
{
"firstgid":1,
"source":"tileset.json"
}],
"tilewidth":32,
"type":"map",
"version":"1.6",
"width":5
}

View File

@@ -0,0 +1,32 @@
{ "compressionlevel":-1,
"height":5,
"infinite":false,
"layers":[
{
"data":[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":5,
"id":1,
"name":"Tile Layer 1",
"opacity":1,
"type":"tilelayer",
"visible":true,
"width":5,
"x":0,
"y":0
}],
"nextlayerid":2,
"nextobjectid":1,
"orientation":"orthogonal",
"renderorder":"right-down",
"tiledversion":"1.6.0",
"tileheight":32,
"tilesets":[
{
"firstgid":1,
"source":"tileset.json"
}],
"tilewidth":32,
"type":"map",
"version":"1.6",
"width":5
}

View File

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

View File

@@ -0,0 +1,20 @@
{
"maps": [
{
"fileName": "map_01.json",
"height": 160,
"width": 160,
"x": 0,
"y": 0
},
{
"fileName": "map_02.json",
"height": 160,
"width": 160,
"x": 160,
"y": 0
}
],
"onlyShowAdjacentMaps": false,
"type": "world"
}

View File

@@ -18,7 +18,7 @@ ALL_LAYER_TESTS = [
LAYER_TESTS / "b64",
LAYER_TESTS / "b64_gzip",
LAYER_TESTS / "b64_zlib",
LAYER_TESTS / "b64_zstd",
# LAYER_TESTS / "b64_zstd",
LAYER_TESTS / "no_layers",
LAYER_TESTS / "infinite_map",
LAYER_TESTS / "infinite_map_b64",

View File

@@ -17,6 +17,7 @@ ALL_MAP_TESTS = [
MAP_TESTS / "no_background_color",
MAP_TESTS / "hexagonal",
MAP_TESTS / "embedded_tileset",
MAP_TESTS / "template",
]

View File

@@ -1103,3 +1103,19 @@ def test_parse_layer(raw_object_json, expected):
result = tiled_object.cast(raw_object)
assert result == expected
def test_parse_no_parent_dir():
raw_object = """
{
"id":1,
"template": "mytemplate.json",
"x":27.7185404115039,
"y":23.571672160964
}
"""
json_object = json.loads(raw_object)
with pytest.raises(RuntimeError):
tiled_object.cast(json_object)

View File

@@ -20,6 +20,7 @@ ALL_TILESET_DIRS = [
TILE_SETS / "image_properties",
TILE_SETS / "image_transparent_color",
TILE_SETS / "image_tile_offset",
TILE_SETS / "image_transformations",
TILE_SETS / "individual_images",
TILE_SETS / "terrain",
]

35
tests/test_world.py Normal file
View File

@@ -0,0 +1,35 @@
"""Tests for worlds"""
import importlib.util
import os
from pathlib import Path
import pytest
from pytiled_parser import world
TESTS_DIR = Path(os.path.dirname(os.path.abspath(__file__)))
TEST_DATA = TESTS_DIR / "test_data"
WORLD_TESTS = TEST_DATA / "world_tests"
ALL_WORLD_TESTS = [
WORLD_TESTS / "static_defined",
WORLD_TESTS / "pattern_matched",
WORLD_TESTS / "both",
]
@pytest.mark.parametrize("world_test", ALL_WORLD_TESTS)
def test_world_integration(world_test):
# it's a PITA to import like this, don't do it
# https://stackoverflow.com/a/67692/1342874
spec = importlib.util.spec_from_file_location(
"expected", world_test / "expected.py"
)
expected = importlib.util.module_from_spec(spec)
spec.loader.exec_module(expected)
raw_world_path = world_test / "world.world"
casted_world = world.parse_world(raw_world_path)
assert casted_world == expected.EXPECTED