Tiled 1.9 Compatibility Update

This commit is contained in:
Darren Eberly
2022-08-02 20:28:19 -04:00
parent ddf314e4f0
commit 54ad83245f
107 changed files with 549 additions and 425 deletions

View File

@@ -43,6 +43,7 @@ class Layer:
size: Ordered pair of size of map in tiles.
properties: Properties for the layer.
tint_color: Tint color that is multiplied with any graphics in this layer.
class_: The Tiled class of this Layer.
"""
name: str
@@ -54,6 +55,7 @@ class Layer:
offset: OrderedPair = OrderedPair(0, 0)
id: Optional[int] = None
class_: Optional[str] = None
size: Optional[Size] = None
properties: Optional[Properties] = None
tint_color: Optional[Color] = None

View File

@@ -40,51 +40,55 @@ else:
zstd = None
class RawChunk(TypedDict):
"""The keys and their types that appear in a Tiled JSON Chunk Object.
RawChunk = TypedDict("RawChunk", {
"data": Union[List[int], str],
"height": int,
"width": int,
"x": int,
"y": int
})
RawChunk.__doc__ = """
The keys and their types that appear in a Tiled JSON Chunk Object.
Tiled Doc: https://doc.mapeditor.org/en/stable/reference/json-map-format/#chunk
"""
data: Union[List[int], str]
height: int
width: int
x: int
y: int
"""
class RawLayer(TypedDict):
"""The keys and their types that appear in a Tiled JSON Layer Object.
RawLayer = TypedDict("RawLayer", {
"chunks": List[RawChunk],
"compression": str,
"data": Union[List[int], str],
"draworder": str,
"encoding": str,
"height": int,
"id": int,
"image": str,
"layers": List[Any],
"name": str,
"objects": List[RawObject],
"offsetx": float,
"offsety": float,
"parallaxx": float,
"parallaxy": float,
"opacity": float,
"properties": List[RawProperty],
"startx": int,
"starty": int,
"tintcolor": str,
"transparentcolor": str,
"class": str,
"type": str,
"visible": bool,
"width": int,
"x": int,
"y": int
})
RawLayer.__doc__ = """
The keys and their types that appear in a Tiled JSON Layer Object.
Tiled Doc: https://doc.mapeditor.org/en/stable/reference/json-map-format/#layer
"""
chunks: List[RawChunk]
compression: str
data: Union[List[int], str]
draworder: str
encoding: str
height: int
id: int
image: str
layers: List[Any]
name: str
objects: List[RawObject]
offsetx: float
offsety: float
parallaxx: float
parallaxy: float
opacity: float
properties: List[RawProperty]
startx: int
starty: int
tintcolor: str
transparentcolor: str
type: str
visible: bool
width: int
x: int
y: int
"""
def _convert_raw_tile_layer_data(data: List[int], layer_width: int) -> List[List[int]]:
@@ -229,6 +233,9 @@ def _parse_common(raw_layer: RawLayer) -> Layer:
if raw_layer.get("properties") is not None:
common.properties = parse_properties(raw_layer["properties"])
if raw_layer.get("class") is not None:
common.class_ = raw_layer["class"]
parallax = [1.0, 1.0]
if raw_layer.get("parallaxx") is not None:

View File

@@ -17,39 +17,40 @@ from pytiled_parser.parsers.tmx.tileset import parse as parse_tmx_tileset
from pytiled_parser.tiled_map import TiledMap, TilesetDict
from pytiled_parser.util import check_format, parse_color
class RawTilesetMapping(TypedDict):
firstgid: int
source: str
RawTilesetMapping = TypedDict("RawTilesetMapping", {
"firstgid": int,
"source": str
})
class RawTiledMap(TypedDict):
"""The keys and their types that appear in a Tiled JSON Map Object.
RawTiledMap = TypedDict("RawTiledMap", {
"backgroundcolor": str,
"compressionlevel": int,
"height": int,
"hexsidelength": int,
"infinite": bool,
"layers": List[RawLayer],
"nextlayerid": int,
"nextobjectid": int,
"orientation": str,
"properties": List[RawProperty],
"renderorder": str,
"staggeraxis": str,
"staggerindex": str,
"tiledversion": str,
"tileheight": int,
"tilesets": List[RawTilesetMapping],
"tilewidth": int,
"class": str,
"type": str,
"version": Union[str, float],
"width": int
})
RawTiledMap.__doc__ = """
The keys and their types that appear in a Tiled JSON Map Object.
Tiled Docs: https://doc.mapeditor.org/en/stable/reference/json-map-format/#map
"""
backgroundcolor: str
compressionlevel: int
height: int
hexsidelength: int
infinite: bool
layers: List[RawLayer]
nextlayerid: int
nextobjectid: int
orientation: str
properties: List[RawProperty]
renderorder: str
staggeraxis: str
staggerindex: str
tiledversion: str
tileheight: int
tilesets: List[RawTilesetMapping]
tilewidth: int
type: str
version: Union[str, float]
width: int
"""
def parse(file: Path) -> TiledMap:
@@ -152,6 +153,9 @@ def parse(file: Path) -> TiledMap:
tiled_object.new_tileset = None
tiled_object.new_tileset_path = None
if raw_tiled_map.get("class") is not None:
map_.class_ = raw_tiled_map["class"]
if raw_tiled_map.get("backgroundcolor") is not None:
map_.background_color = parse_color(raw_tiled_map["backgroundcolor"])

View File

@@ -22,53 +22,52 @@ from pytiled_parser.tiled_object import (
)
from pytiled_parser.util import load_object_template, parse_color
class RawText(TypedDict):
"""The keys and their types that appear in a Tiled JSON Text Object.
RawText = TypedDict("RawText", {
"text": str,
"color": str,
"fontfamily": str,
"pixelsize": float, # this is `font_size` in Text
"bold": bool,
"italic": bool,
"strikeout": bool,
"underline": bool,
"kerning": bool,
"halign": str,
"valign": str,
"wrap": bool
})
RawText.__doc__ = """
The keys and their types that appear in a Tiled JSON Text Object.
Tiled Doc: https://doc.mapeditor.org/en/stable/reference/json-map-format/#text-example
"""
text: str
color: str
fontfamily: str
pixelsize: float # this is `font_size` in Text
bold: bool
italic: bool
strikeout: bool
underline: bool
kerning: bool
halign: str
valign: str
wrap: bool
"""
class RawObject(TypedDict):
"""The keys and their types that appear in a Tiled JSON Object.
RawObject = TypedDict("RawObject", {
"id": int,
"gid": int,
"template": str,
"x": float,
"y": float,
"width": float,
"height": float,
"rotation": float,
"visible": bool,
"name": str,
"class": str,
"type": str,
"properties": List[RawProperty],
"ellipse": bool,
"point": bool,
"polygon": List[Dict[str, float]],
"polyline": List[Dict[str, float]],
"text": RawText
})
RawObject.__doc__ = """
The keys and their types that appear in a Tiled JSON Object.
Tiled Doc: https://doc.mapeditor.org/en/stable/reference/json-map-format/#object
"""
id: int
gid: int
template: str
x: float
y: float
width: float
height: float
rotation: float
visible: bool
name: str
type: str
properties: List[RawProperty]
ellipse: bool
point: bool
polygon: List[Dict[str, float]]
polyline: List[Dict[str, float]]
text: RawText
"""
def _parse_common(raw_object: RawObject) -> TiledObject:
@@ -88,9 +87,14 @@ def _parse_common(raw_object: RawObject) -> TiledObject:
size=Size(raw_object["width"], raw_object["height"]),
rotation=raw_object["rotation"],
name=raw_object["name"],
type=raw_object["type"],
)
if raw_object.get("type") is not None:
common.class_ = raw_object["type"]
if raw_object.get("class") is not None:
common.class_ = raw_object["class"]
if raw_object.get("properties") is not None:
common.properties = parse_properties(raw_object["properties"])

View File

@@ -13,78 +13,91 @@ from pytiled_parser.parsers.json.wang_set import parse as parse_wangset
from pytiled_parser.tileset import Frame, Grid, Tile, Tileset, Transformations
from pytiled_parser.util import parse_color
class RawFrame(TypedDict):
"""The keys and their types that appear in a Frame JSON Object."""
duration: int
tileid: int
RawFrame = TypedDict("RawFrame", {
"duration": int,
"tileid": int
})
RawFrame.__doc__ = """
The keys and their types that appear in a Frame JSON Object.
"""
class RawTileOffset(TypedDict):
"""The keys and their types that appear in a TileOffset JSON Object."""
x: int
y: int
RawTileOffset = TypedDict("RawTileOffset", {
"x": int,
"y": int
})
RawTileOffset.__doc__ = """
The keys and their types that appear in a TileOffset JSON Object.
"""
class RawTransformations(TypedDict):
"""The keys and their types that appear in a Transformations JSON Object."""
hflip: bool
vflip: bool
rotate: bool
preferuntransformed: bool
RawTransformations = TypedDict("RawTransformations", {
"hflip": bool,
"vflip": bool,
"rotate": bool,
"preferuntransformed": bool
})
RawTransformations.__doc__ = """
The keys and their types that appear in a Transformations JSON Object.
"""
class RawTile(TypedDict):
"""The keys and their types that appear in a Tile JSON Object."""
animation: List[RawFrame]
id: int
image: str
imageheight: int
imagewidth: int
opacity: float
properties: List[RawProperty]
objectgroup: RawLayer
type: str
RawTile = TypedDict("RawTile", {
"animation": List[RawFrame],
"class": str,
"id": int,
"image": str,
"imageheight": int,
"imagewidth": int,
"opacity": float,
"type": str,
"properties": List[RawProperty],
"objectgroup": RawLayer,
})
RawTile.__docs__ = """
The keys and their types that appear in a Tile JSON Object.
"""
class RawGrid(TypedDict):
"""The keys and their types that appear in a Grid JSON Object."""
height: int
width: int
orientation: str
RawGrid = TypedDict("RawGrid", {
"height": int,
"width": int,
"orientation": str
})
RawGrid.__doc__ = """
The keys and their types that appear in a Grid JSON Object.
"""
class RawTileSet(TypedDict):
"""The keys and their types that appear in a TileSet JSON Object."""
backgroundcolor: str
columns: int
firstgid: int
grid: RawGrid
image: str
imageheight: int
imagewidth: int
margin: int
name: str
properties: List[RawProperty]
objectalignment: str
source: str
spacing: int
tilecount: int
tiledversion: str
tileheight: int
tileoffset: RawTileOffset
tiles: List[RawTile]
tilewidth: int
transparentcolor: str
transformations: RawTransformations
version: Union[str, float]
wangsets: List[RawWangSet]
RawTileSet = TypedDict("RawTileSet", {
"backgroundcolor": str,
"class": str,
"columns": int,
"firstgid": int,
"grid": RawGrid,
"image": str,
"imageheight": int,
"imagewidth": int,
"margin": int,
"name": str,
"properties": List[RawProperty],
"objectalignment": str,
"source": str,
"spacing": int,
"tilecount": int,
"tiledversion": str,
"tileheight": int,
"tileoffset": RawTileOffset,
"tiles": List[RawTile],
"tilewidth": int,
"transparentcolor": str,
"transformations": RawTransformations,
"version": Union[str, float],
"wangsets": List[RawWangSet]
})
RawTileSet.__doc__ = """
The keys and their types that appear in a TileSet JSON Object.
"""
def _parse_frame(raw_frame: RawFrame) -> Frame:
@@ -189,7 +202,10 @@ def _parse_tile(raw_tile: RawTile, external_path: Optional[Path] = None) -> Tile
tile.image_height = raw_tile["imageheight"]
if raw_tile.get("type") is not None:
tile.type = raw_tile["type"]
tile.class_ = raw_tile["type"]
if raw_tile.get("class") is not None:
tile.class_ = raw_tile["class"]
return tile
@@ -283,4 +299,7 @@ def parse(
if raw_tileset.get("transformations") is not None:
tileset.transformations = _parse_transformations(raw_tileset["transformations"])
if raw_tileset.get("class") is not None:
tileset.class_ = raw_tileset["class"]
return tileset

View File

@@ -7,35 +7,42 @@ from pytiled_parser.parsers.json.properties import parse as parse_properties
from pytiled_parser.util import parse_color
from pytiled_parser.wang_set import WangColor, WangSet, WangTile
class RawWangTile(TypedDict):
"""The keys and their types that appear in a Wang Tile JSON Object."""
tileid: int
RawWangTile = TypedDict("RawWangTile", {
"tileid": int,
# 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]
"wangid": List[int]
})
RawWangTile.__doc__ = """
The keys and their types that appear in a Wang Tile JSON Object.
"""
class RawWangColor(TypedDict):
"""The keys and their types that appear in a Wang Color JSON Object."""
color: str
name: str
probability: float
tile: int
properties: List[RawProperty]
RawWangColor = TypedDict("RawWangColor", {
"color": str,
"class": str,
"name": str,
"probability": float,
"tile": int,
"properties": List[RawProperty]
})
RawWangColor.__doc__ = """
The keys and their types that appear in a Wang Color JSON Object.
"""
class RawWangSet(TypedDict):
"""The keys and their types that appear in a Wang Set JSON Object."""
colors: List[RawWangColor]
name: str
properties: List[RawProperty]
tile: int
type: str
wangtiles: List[RawWangTile]
RawWangSet = TypedDict("RawWangSet", {
"colors": List[RawWangColor],
"class": str,
"name": str,
"properties": List[RawProperty],
"tile": int,
"type": str,
"wangtiles": List[RawWangTile]
})
RawWangSet.__doc__ = """
The keys and their types that appear in a Wang Set JSON Object.
"""
def _parse_wang_tile(raw_wang_tile: RawWangTile) -> WangTile:

View File

@@ -192,6 +192,9 @@ def _parse_common(raw_layer: etree.Element) -> Layer:
if raw_layer.attrib.get("tintcolor") is not None:
common.tint_color = parse_color(raw_layer.attrib["tintcolor"])
if raw_layer.attrib.get("class") is not None:
common.class_ = raw_layer.attrib["class"]
return common

View File

@@ -129,4 +129,7 @@ def parse(file: Path) -> TiledMap:
if raw_map.attrib.get("staggerindex") is not None:
map_.stagger_index = raw_map.attrib["staggerindex"]
if raw_map.attrib.get("class") is not None:
map_.class_ = raw_map.attrib["class"]
return map_

View File

@@ -50,7 +50,10 @@ def _parse_common(raw_object: etree.Element) -> TiledObject:
common.name = raw_object.attrib["name"]
if raw_object.attrib.get("type") is not None:
common.type = raw_object.attrib["type"]
common.class_ = raw_object.attrib["type"]
if raw_object.attrib.get("class") is not None:
common.class_ = raw_object.attrib["class"]
properties_element = raw_object.find("./properties")
if properties_element:

View File

@@ -76,7 +76,10 @@ def _parse_tile(raw_tile: etree.Element, external_path: Optional[Path] = None) -
tile = Tile(id=int(raw_tile.attrib["id"]))
if raw_tile.attrib.get("type") is not None:
tile.type = raw_tile.attrib["type"]
tile.class_ = raw_tile.attrib["type"]
if raw_tile.attrib.get("class") is not None:
tile.class_ = raw_tile.attrib["class"]
animation_element = raw_tile.find("./animation")
if animation_element is not None:
@@ -141,6 +144,9 @@ def parse(
if raw_tileset.attrib.get("objectalignment") is not None:
tileset.alignment = raw_tileset.attrib["objectalignment"]
if raw_tileset.attrib.get("class") is not None:
tileset.class_ = raw_tileset.attrib["class"]
image_element = raw_tileset.find("image")
if image_element is not None:
if external_path:

View File

@@ -34,6 +34,9 @@ def _parse_wang_color(raw_wang_color: etree.Element) -> WangColor:
probability=float(raw_wang_color.attrib["probability"]),
)
if raw_wang_color.attrib.get("class") is not None:
wang_color.class_ = raw_wang_color.attrib["class"]
properties = raw_wang_color.find("./properties")
if properties:
wang_color.properties = parse_properties(properties)
@@ -67,6 +70,9 @@ def parse(raw_wangset: etree.Element) -> WangSet:
wang_tiles=tiles,
)
if raw_wangset.attrib.get("class") is not None:
wangset.class_ = raw_wangset.attrib["class"]
properties = raw_wangset.find("./properties")
if properties:
wangset.properties = parse_properties(properties)

View File

@@ -51,6 +51,7 @@ class TiledMap:
"y") is staggered.
stagger_index: For staggered and hexagonal maps, determines whether the "even"
or "odd" indexes along the staggered axis are shifted.
class_: The Tiled class of this Map.
"""
infinite: bool
@@ -66,6 +67,7 @@ class TiledMap:
version: str
map_file: Optional[Path] = None
class_: Optional[str] = None
background_color: Optional[Color] = None
properties: Optional[Properties] = None
hex_side_length: Optional[int] = None

View File

@@ -26,7 +26,7 @@ class TiledObject:
rotation: The rotation of the tiled object in degrees clockwise (default: 0).
opacity: The opacity of the tiled object. (default: 1)
name: The name of the tiled object.
type: The type of the tiled object.
class_: The Tiled class of the tiled object.
properties: The properties of the TiledObject.
"""
@@ -37,11 +37,10 @@ class TiledObject:
rotation: float = 0
visible: bool = True
name: str = ""
type: str = ""
class_: str = ""
properties: properties_.Properties = {}
@attr.s()
class Ellipse(TiledObject):
"""Elipse shape defined by a point, width, height, and rotation.

View File

@@ -114,11 +114,12 @@ class Tile:
flipped_horizontally: Should this Tile be flipped horizontally?
flipped_diagonally: Should this Tile be flipped diagonally?
flipped_vertically: Should this Tile be flipped vertically?
class_: The Tiled class of this Tile.
"""
id: int
opacity: int = 1
type: Optional[str] = None
class_: Optional[str] = None
animation: Optional[List[Frame]] = None
objects: Optional[layer.Layer] = None
image: Optional[Path] = None
@@ -181,6 +182,7 @@ class Tileset:
wang_sets: List of WangSets, this is used by the terrain system in Tiled. It is unlikely an
implementation in a game engine would need to use these values.
alignment: Which alignment to use for tile objects from this tileset.
class_: The Tiled class of this TileSet.
"""
name: str
@@ -206,6 +208,7 @@ class Tileset:
transformations: Optional[Transformations] = None
class_: Optional[str] = None
background_color: Optional[Color] = None
tile_offset: Optional[OrderedPair] = None
transparent_color: Optional[Color] = None

View File

@@ -45,6 +45,7 @@ class WangColor:
name: The name for this color
probability: The probability used when randomizing tiles
properties: The properties for this wang color
class_: The Tiled class of this Wang Color
tile: Tile ID of the tile representing this color
"""
@@ -52,6 +53,7 @@ class WangColor:
name: str
probability: float
tile: int
class_: Optional[str] = None
properties: Optional[Properties] = None
@@ -68,6 +70,7 @@ class WangSet:
Attributes:
name: Name of the WangSet
properties: The properties for this wang set
class_: The Tiled class of this Wang Set
tile: Tile ID of the tile representing this Wang Set
wang_colors: A list of [WangColors][pytiled_parser.wang_set.WangColor]
wang_tiles: A list of [WangTiles][pytiled_parser.wang_set.WangTile]
@@ -79,4 +82,5 @@ class WangSet:
wang_type: str
wang_tiles: Dict[int, WangTile]
wang_colors: List[WangColor]
class_: Optional[str] = None
properties: Optional[Properties] = None

View File

@@ -100,7 +100,7 @@ EXPECTED = [
size=common_types.Size(69.3333333333333, 52.6666666666667),
coordinates=common_types.OrderedPair(46.3333333333333, 39),
visible=True,
type="",
class_="",
)
],
),

View File

@@ -3,7 +3,12 @@
"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],
"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",
@@ -34,11 +39,11 @@
"name":"Object Layer 1",
"objects":[
{
"class":"",
"height":52.6666666666667,
"id":1,
"name":"",
"rotation":0,
"type":"",
"visible":true,
"width":69.3333333333333,
"x":46.3333333333333,
@@ -88,7 +93,7 @@
"nextobjectid":3,
"orientation":"orthogonal",
"renderorder":"right-down",
"tiledversion":"1.7.2",
"tiledversion":"1.9.0",
"tileheight":32,
"tilesets":[
{
@@ -97,6 +102,6 @@
}],
"tilewidth":32,
"type":"map",
"version":"1.6",
"version":"1.9",
"width":8
}

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<map version="1.5" tiledversion="1.7.0" orientation="orthogonal" renderorder="right-down" width="8" height="6" tilewidth="32" tileheight="32" infinite="0" nextlayerid="6" nextobjectid="3">
<map version="1.9" tiledversion="1.9.0" orientation="orthogonal" renderorder="right-down" width="8" height="6" tilewidth="32" tileheight="32" infinite="0" nextlayerid="6" nextobjectid="3">
<tileset firstgid="1" source="tileset.tsx"/>
<layer id="1" name="Tile Layer 1" width="8" height="6" tintcolor="#aaffff" offsetx="1" offsety="3" parallaxx="1.4" parallaxy="1.3">
<properties>

View File

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

View File

@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<tileset version="1.5" tiledversion="1.7.0" name="tile_set_image" tilewidth="32" tileheight="32" spacing="1" margin="1" tilecount="48" columns="8">
<tileset version="1.9" tiledversion="1.9.0" name="tile_set_image" tilewidth="32" tileheight="32" spacing="1" margin="1" tilecount="48" columns="8">
<image source="../../images/tmw_desert_spacing.png" width="265" height="199"/>
</tileset>

View File

@@ -92,7 +92,7 @@ EXPECTED = [
size=common_types.Size(69.3333333333333, 52.6666666666667),
coordinates=common_types.OrderedPair(46.3333333333333, 39),
visible=True,
type="",
class_="",
)
],
),

View File

@@ -25,11 +25,11 @@
"name":"Object Layer 1",
"objects":[
{
"class":"",
"height":52.6666666666667,
"id":1,
"name":"",
"rotation":0,
"type":"",
"visible":true,
"width":69.3333333333333,
"x":46.3333333333333,
@@ -63,7 +63,7 @@
"nextobjectid":3,
"orientation":"orthogonal",
"renderorder":"right-down",
"tiledversion":"1.6.0",
"tiledversion":"1.9.0",
"tileheight":32,
"tilesets":[
{
@@ -72,6 +72,6 @@
}],
"tilewidth":32,
"type":"map",
"version":"1.6",
"version":"1.9",
"width":8
}

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<map version="1.5" tiledversion="1.7.0" orientation="orthogonal" renderorder="right-down" width="8" height="6" tilewidth="32" tileheight="32" infinite="0" nextlayerid="5" nextobjectid="3">
<map version="1.9" tiledversion="1.9.0" orientation="orthogonal" renderorder="right-down" width="8" height="6" tilewidth="32" tileheight="32" infinite="0" nextlayerid="5" nextobjectid="3">
<tileset firstgid="1" source="../all_layer_types/tileset.tsx"/>
<layer id="1" name="Tile Layer 1" width="8" height="6">
<data encoding="base64">

View File

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

View File

@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<tileset version="1.5" tiledversion="1.7.0" name="tile_set_image" tilewidth="32" tileheight="32" spacing="1" margin="1" tilecount="48" columns="8">
<tileset version="1.9" tiledversion="1.9.0" name="tile_set_image" tilewidth="32" tileheight="32" spacing="1" margin="1" tilecount="48" columns="8">
<image source="../../images/tmw_desert_spacing.png" width="265" height="199"/>
</tileset>

View File

@@ -92,7 +92,7 @@ EXPECTED = [
size=common_types.Size(69.3333333333333, 52.6666666666667),
coordinates=common_types.OrderedPair(46.3333333333333, 39),
visible=True,
type="",
class_="",
)
],
),

View File

@@ -25,11 +25,11 @@
"name":"Object Layer 1",
"objects":[
{
"class":"",
"height":52.6666666666667,
"id":1,
"name":"",
"rotation":0,
"type":"",
"visible":true,
"width":69.3333333333333,
"x":46.3333333333333,
@@ -63,7 +63,7 @@
"nextobjectid":3,
"orientation":"orthogonal",
"renderorder":"right-down",
"tiledversion":"1.6.0",
"tiledversion":"1.9.0",
"tileheight":32,
"tilesets":[
{
@@ -72,6 +72,6 @@
}],
"tilewidth":32,
"type":"map",
"version":"1.6",
"version":"1.9",
"width":8
}

View File

@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<map version="1.5" tiledversion="1.7.0" orientation="orthogonal" renderorder="right-down" width="8" height="6" tilewidth="32" tileheight="32" infinite="0" nextlayerid="5" nextobjectid="3">
<map version="1.9" tiledversion="1.9.0" orientation="orthogonal" renderorder="right-down" width="8" height="6" tilewidth="32" tileheight="32" infinite="0" nextlayerid="5" nextobjectid="3">
<tileset firstgid="1" source="../all_layer_types/tileset.tsx"/>
<layer id="1" name="Tile Layer 1" width="8" height="6">
<data encoding="base64" compression="gzip">
H4sIAAAAAAAACg3DBRKCQAAAwDMRA7BQLMTE9v+vY3dmWyGEth279uwbOTB26MixExNTM6fOnLtwae7KtYUbt+7ce7D0aOXJsxev3rxb+/Dpy7cfv/782wAcvDirwAAAAA==
H4sIAAAAAAAAAw3DBRKCQAAAwDMRA7BQLMTE9v+vY3dmWyGEth279uwbOTB26MixExNTM6fOnLtwae7KtYUbt+7ce7D0aOXJsxev3rxb+/Dpy7cfv/782wAcvDirwAAAAA==
</data>
</layer>
<group id="4" name="Group 1">

View File

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

View File

@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<tileset version="1.5" tiledversion="1.7.0" name="tile_set_image" tilewidth="32" tileheight="32" spacing="1" margin="1" tilecount="48" columns="8">
<tileset version="1.9" tiledversion="1.9.0" name="tile_set_image" tilewidth="32" tileheight="32" spacing="1" margin="1" tilecount="48" columns="8">
<image source="../../images/tmw_desert_spacing.png" width="265" height="199"/>
</tileset>

View File

@@ -92,7 +92,7 @@ EXPECTED = [
size=common_types.Size(69.3333333333333, 52.6666666666667),
coordinates=common_types.OrderedPair(46.3333333333333, 39),
visible=True,
type="",
class_="",
)
],
),

View File

@@ -25,11 +25,11 @@
"name":"Object Layer 1",
"objects":[
{
"class":"",
"height":52.6666666666667,
"id":1,
"name":"",
"rotation":0,
"type":"",
"visible":true,
"width":69.3333333333333,
"x":46.3333333333333,
@@ -63,7 +63,7 @@
"nextobjectid":3,
"orientation":"orthogonal",
"renderorder":"right-down",
"tiledversion":"1.6.0",
"tiledversion":"1.9.0",
"tileheight":32,
"tilesets":[
{
@@ -72,6 +72,6 @@
}],
"tilewidth":32,
"type":"map",
"version":"1.6",
"version":"1.9",
"width":8
}

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<map version="1.5" tiledversion="1.7.0" orientation="orthogonal" renderorder="right-down" width="8" height="6" tilewidth="32" tileheight="32" infinite="0" nextlayerid="5" nextobjectid="3">
<map version="1.9" tiledversion="1.9.0" orientation="orthogonal" renderorder="right-down" width="8" height="6" tilewidth="32" tileheight="32" infinite="0" nextlayerid="5" nextobjectid="3">
<tileset firstgid="1" source="../all_layer_types/tileset.tsx"/>
<layer id="1" name="Tile Layer 1" width="8" height="6">
<data encoding="base64" compression="zlib">

View File

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

View File

@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<tileset version="1.5" tiledversion="1.7.0" name="tile_set_image" tilewidth="32" tileheight="32" spacing="1" margin="1" tilecount="48" columns="8">
<tileset version="1.9" tiledversion="1.9.0" name="tile_set_image" tilewidth="32" tileheight="32" spacing="1" margin="1" tilecount="48" columns="8">
<image source="../../images/tmw_desert_spacing.png" width="265" height="199"/>
</tileset>

View File

@@ -25,11 +25,11 @@
"name":"Object Layer 1",
"objects":[
{
"class":"",
"height":52.6666666666667,
"id":1,
"name":"",
"rotation":0,
"type":"",
"visible":true,
"width":69.3333333333333,
"x":46.3333333333333,
@@ -63,7 +63,7 @@
"nextobjectid":3,
"orientation":"orthogonal",
"renderorder":"right-down",
"tiledversion":"1.8.5",
"tiledversion":"1.9.0",
"tileheight":32,
"tilesets":[
{
@@ -72,6 +72,6 @@
}],
"tilewidth":32,
"type":"map",
"version":"1.8",
"version":"1.9",
"width":8
}

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<map version="1.8" tiledversion="1.8.5" orientation="orthogonal" renderorder="right-down" width="8" height="6" tilewidth="32" tileheight="32" infinite="0" nextlayerid="5" nextobjectid="3">
<map version="1.9" tiledversion="1.9.0" orientation="orthogonal" renderorder="right-down" width="8" height="6" tilewidth="32" tileheight="32" infinite="0" nextlayerid="5" nextobjectid="3">
<tileset firstgid="1" source="../all_layer_types/tileset.json"/>
<layer id="1" name="Tile Layer 1" width="8" height="6">
<data encoding="base64" compression="zstd">

View File

@@ -6,7 +6,7 @@
"name":"tile_set_image",
"spacing":1,
"tilecount":48,
"tiledversion":"1.8.5",
"tiledversion":"1.9.0",
"tileheight":32,
"tilewidth":32,
"type":"tileset",

View File

@@ -17,14 +17,28 @@
{
"chunks":[
{
"data":[1, 2, 3, 4, 9, 10, 11, 12, 17, 18, 19, 20, 25, 26, 27, 28, 33, 34, 35, 36, 41, 42, 43, 44, 0, 0, 0, 0, 0, 0, 0, 0],
"data":[1, 2, 3, 4,
9, 10, 11, 12,
17, 18, 19, 20,
25, 26, 27, 28,
33, 34, 35, 36,
41, 42, 43, 44,
0, 0, 0, 0,
0, 0, 0, 0],
"height":8,
"width":4,
"x":0,
"y":0
},
{
"data":[5, 6, 7, 8, 13, 14, 15, 16, 21, 22, 23, 24, 29, 30, 31, 32, 37, 38, 39, 40, 45, 46, 47, 48, 0, 0, 0, 0, 0, 0, 0, 0],
"data":[5, 6, 7, 8,
13, 14, 15, 16,
21, 22, 23, 24,
29, 30, 31, 32,
37, 38, 39, 40,
45, 46, 47, 48,
0, 0, 0, 0,
0, 0, 0, 0],
"height":8,
"width":4,
"x":4,
@@ -54,7 +68,7 @@
"nextobjectid":3,
"orientation":"orthogonal",
"renderorder":"right-down",
"tiledversion":"1.6.0",
"tiledversion":"1.9.0",
"tileheight":32,
"tilesets":[
{
@@ -63,6 +77,6 @@
}],
"tilewidth":32,
"type":"map",
"version":"1.6",
"version":"1.9",
"width":8
}

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<map version="1.5" tiledversion="1.7.0" orientation="orthogonal" renderorder="right-down" width="8" height="6" tilewidth="32" tileheight="32" infinite="1" nextlayerid="6" nextobjectid="3">
<map version="1.9" tiledversion="1.9.0" orientation="orthogonal" renderorder="right-down" width="8" height="6" tilewidth="32" tileheight="32" infinite="1" nextlayerid="6" nextobjectid="3">
<editorsettings>
<chunksize width="4" height="8"/>
<export 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"/>

View File

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

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<map version="1.5" tiledversion="1.7.0" orientation="orthogonal" renderorder="right-down" width="8" height="6" tilewidth="32" tileheight="32" infinite="1" nextlayerid="6" nextobjectid="3">
<map version="1.9" tiledversion="1.9.0" orientation="orthogonal" renderorder="right-down" width="8" height="6" tilewidth="32" tileheight="32" infinite="1" nextlayerid="6" nextobjectid="3">
<tileset firstgid="1" source="../all_layer_types/tileset.tsx"/>
<layer id="1" name="Tile Layer 1" width="16" height="16" offsetx="1" offsety="3">
<properties>

View File

@@ -42,7 +42,7 @@
"value":"Hello, World!!"
}],
"renderorder":"right-down",
"tiledversion":"1.6.0",
"tiledversion":"1.9.0",
"tileheight":32,
"tilesets":[
{
@@ -51,6 +51,6 @@
}],
"tilewidth":32,
"type":"map",
"version":"1.6",
"version":"1.9",
"width":8
}

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<map version="1.5" tiledversion="1.7.0" orientation="orthogonal" renderorder="right-down" compressionlevel="0" width="8" height="6" tilewidth="32" tileheight="32" infinite="0" nextlayerid="2" nextobjectid="1">
<map version="1.9" tiledversion="1.9.0" orientation="orthogonal" renderorder="right-down" compressionlevel="0" width="8" height="6" tilewidth="32" tileheight="32" infinite="0" nextlayerid="2" nextobjectid="1">
<properties>
<property name="bool property - false" type="bool" value="false"/>
<property name="bool property - true" type="bool" value="true"/>

View File

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

View File

@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<tileset version="1.5" tiledversion="1.7.0" name="tile_set_image" tilewidth="32" tileheight="32" spacing="1" margin="1" tilecount="48" columns="8">
<tileset version="1.9" tiledversion="1.9.0" name="tile_set_image" tilewidth="32" tileheight="32" spacing="1" margin="1" tilecount="48" columns="8">
<image source="../../images/tmw_desert_spacing.png" width="265" height="199"/>
</tileset>

View File

@@ -29,7 +29,7 @@
"id":1,
"name":"",
"rotation":0,
"type":"",
"class":"",
"visible":true,
"width":69.3333333333333,
"x":46.3333333333333,

View File

@@ -38,7 +38,7 @@
"value":"Hello, World!!"
}],
"renderorder":"right-down",
"tiledversion":"1.6.0",
"tiledversion":"1.9.0",
"tileheight":32,
"tilesets":[
{
@@ -47,6 +47,6 @@
}],
"tilewidth":32,
"type":"map",
"version":"1.6",
"version":"1.9",
"width":8
}

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<map version="1.5" tiledversion="1.7.0" orientation="orthogonal" renderorder="right-down" compressionlevel="0" width="8" height="6" tilewidth="32" tileheight="32" infinite="0" backgroundcolor="#ff0004" nextlayerid="2" nextobjectid="1">
<map version="1.9" tiledversion="1.9.0" orientation="orthogonal" renderorder="right-down" compressionlevel="0" width="8" height="6" tilewidth="32" tileheight="32" infinite="0" backgroundcolor="#ff0004" nextlayerid="2" nextobjectid="1">
<properties>
<property name="bool property - true" type="bool" value="true"/>
<property name="color property" type="color" value="#ff49fcff"/>

View File

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

View File

@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<tileset version="1.6" tiledversion="1.6.0" name="tile_set_image" tilewidth="32" tileheight="32" spacing="1" margin="1" tilecount="48" columns="8">
<tileset version="1.9" tiledversion="1.9.0" name="tile_set_image" tilewidth="32" tileheight="32" spacing="1" margin="1" tilecount="48" columns="8">
<image source="../../images/tmw_desert_spacing.png" width="265" height="199"/>
</tileset>

View File

@@ -6,7 +6,7 @@
"nextobjectid":1,
"orientation":"orthogonal",
"renderorder":"right-down",
"tiledversion":"1.6.0",
"tiledversion":"1.9.0",
"tileheight":32,
"tilesets":[
{
@@ -24,6 +24,6 @@
}],
"tilewidth":32,
"type":"map",
"version":"1.6",
"version":"1.9",
"width":8
}

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<map version="1.5" tiledversion="1.7.0" orientation="orthogonal" renderorder="right-down" compressionlevel="0" width="8" height="6" tilewidth="32" tileheight="32" infinite="0" nextlayerid="2" nextobjectid="1">
<map version="1.9" tiledversion="1.9.0" orientation="orthogonal" renderorder="right-down" compressionlevel="0" width="8" height="6" tilewidth="32" tileheight="32" infinite="0" nextlayerid="2" nextobjectid="1">
<tileset firstgid="1" name="tileset" tilewidth="32" tileheight="32" spacing="1" margin="1" tilecount="48" columns="8">
<image source="../../images/tmw_desert_spacing.png" width="265" height="199"/>
</tileset>

View File

@@ -104,7 +104,7 @@ EXPECTED = tiled_map.TiledMap(
image_height=32,
image_width=32,
properties={"float property": 2.2},
type="tile",
class_="tile",
),
1: tileset.Tile(
id=1,
@@ -126,7 +126,7 @@ EXPECTED = tiled_map.TiledMap(
14.4766410408043, 13.7196924896511
),
rotation=0,
type="",
class_="",
visible=True,
coordinates=common_types.OrderedPair(
13.4358367829687, 13.5304553518628
@@ -139,7 +139,7 @@ EXPECTED = tiled_map.TiledMap(
14.287403903016, 11.070372560615
),
rotation=0,
type="",
class_="",
visible=True,
coordinates=common_types.OrderedPair(
13.8143110585452, 1.98698994677705
@@ -148,7 +148,7 @@ EXPECTED = tiled_map.TiledMap(
],
),
properties={"string property": "testing"},
type="tile",
class_="tile",
),
2: tileset.Tile(
id=2,
@@ -158,7 +158,7 @@ EXPECTED = tiled_map.TiledMap(
image_height=32,
image_width=32,
properties={"bool property": True},
type="tile",
class_="tile",
),
3: tileset.Tile(
id=3,
@@ -167,7 +167,7 @@ EXPECTED = tiled_map.TiledMap(
.resolve(),
image_height=32,
image_width=32,
type="tile",
class_="tile",
),
},
)

View File

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

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<map version="1.5" tiledversion="1.7.0" orientation="orthogonal" renderorder="right-down" compressionlevel="0" width="8" height="6" tilewidth="32" tileheight="32" infinite="0" backgroundcolor="#ff0004" nextlayerid="3" nextobjectid="1">
<map version="1.9" tiledversion="1.9.0" orientation="orthogonal" renderorder="right-down" compressionlevel="0" width="8" height="6" tilewidth="32" tileheight="32" infinite="0" backgroundcolor="#ff0004" nextlayerid="3" nextobjectid="1">
<properties>
<property name="bool property - true" type="bool" value="true"/>
<property name="color property" type="color" value="#ff49fcff"/>

View File

@@ -9,7 +9,7 @@
"name":"tileset",
"spacing":0,
"tilecount":4,
"tiledversion":"1.6.0",
"tiledversion":"1.9.0",
"tileheight":32,
"tiles":[
{
@@ -30,6 +30,7 @@
"duration":100,
"tileid":3
}],
"class":"tile",
"id":0,
"image":"..\/..\/..\/images\/tile_01.png",
"imageheight":32,
@@ -39,10 +40,10 @@
"name":"float property",
"type":"float",
"value":2.2
}],
"type":"tile"
}]
},
{
"class":"tile",
"id":1,
"image":"..\/..\/..\/images\/tile_02.png",
"imageheight":32,
@@ -53,23 +54,23 @@
"name":"",
"objects":[
{
"class":"",
"height":13.7196924896511,
"id":2,
"name":"",
"rotation":0,
"type":"",
"visible":true,
"width":14.4766410408043,
"x":13.4358367829687,
"y":13.5304553518628
},
{
"class":"",
"ellipse":true,
"height":11.070372560615,
"id":3,
"name":"",
"rotation":0,
"type":"",
"visible":true,
"width":14.287403903016,
"x":13.8143110585452,
@@ -86,10 +87,10 @@
"name":"string property",
"type":"string",
"value":"testing"
}],
"type":"tile"
}]
},
{
"class":"tile",
"id":2,
"image":"..\/..\/..\/images\/tile_03.png",
"imageheight":32,
@@ -99,17 +100,16 @@
"name":"bool property",
"type":"bool",
"value":true
}],
"type":"tile"
}]
},
{
"class":"tile",
"id":3,
"image":"..\/..\/..\/images\/tile_04.png",
"imageheight":32,
"imagewidth":32,
"type":"tile"
"imagewidth":32
}],
"tilewidth":32,
"type":"tileset",
"version":"1.6"
"version":"1.8"
}

View File

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<tileset version="1.5" tiledversion="1.7.0" name="tileset" tilewidth="32" tileheight="32" tilecount="4" columns="0">
<tileset version="1.9" tiledversion="1.9.0" name="tileset" tilewidth="32" tileheight="32" tilecount="4" columns="0">
<grid orientation="orthogonal" width="1" height="1"/>
<tile id="0" type="tile">
<tile id="0" class="tile">
<properties>
<property name="float property" type="float" value="2.2"/>
</properties>
@@ -13,7 +13,7 @@
<frame tileid="3" duration="100"/>
</animation>
</tile>
<tile id="1" type="tile">
<tile id="1" class="tile">
<properties>
<property name="string property" value="testing"/>
</properties>
@@ -25,13 +25,13 @@
</object>
</objectgroup>
</tile>
<tile id="2" type="tile">
<tile id="2" class="tile">
<properties>
<property name="bool property" type="bool" value="true"/>
</properties>
<image width="32" height="32" source="../../../images/tile_03.png"/>
</tile>
<tile id="3" type="tile">
<tile id="3" class="tile">
<image width="32" height="32" source="../../../images/tile_04.png"/>
</tile>
</tileset>

View File

@@ -4,7 +4,16 @@
"infinite":false,
"layers":[
{
"data":[3, 3, 3, 3, 9, 9, 9, 9, 17, 17, 3, 3, 3, 9, 9, 9, 9, 17, 17, 17, 3, 3, 3, 9, 9, 9, 9, 9, 17, 17, 3, 3, 1, 7, 9, 9, 9, 15, 17, 17, 1, 1, 12, 5, 7, 7, 7, 15, 15, 15, 12, 1, 5, 5, 7, 7, 7, 15, 15, 15, 2, 2, 5, 5, 5, 5, 4, 14, 14, 14, 2, 2, 5, 5, 5, 4, 14, 14, 14, 14, 2, 2, 2, 5, 5, 5, 4, 14, 14, 14, 2, 2, 2, 2, 5, 5, 4, 4, 14, 14],
"data":[3, 3, 3, 3, 9, 9, 9, 9, 17, 17,
3, 3, 3, 9, 9, 9, 9, 17, 17, 17,
3, 3, 3, 9, 9, 9, 9, 9, 17, 17,
3, 3, 1, 7, 9, 9, 9, 15, 17, 17,
1, 1, 12, 5, 7, 7, 7, 15, 15, 15,
12, 1, 5, 5, 7, 7, 7, 15, 15, 15,
2, 2, 5, 5, 5, 5, 4, 14, 14, 14,
2, 2, 5, 5, 5, 4, 14, 14, 14, 14,
2, 2, 2, 5, 5, 5, 4, 14, 14, 14,
2, 2, 2, 2, 5, 5, 4, 4, 14, 14],
"height":10,
"id":1,
"name":"Tile Layer 1",
@@ -21,7 +30,7 @@
"renderorder":"right-down",
"staggeraxis":"y",
"staggerindex":"odd",
"tiledversion":"1.6.0",
"tiledversion":"1.9.0",
"tileheight":12,
"tilesets":[
{
@@ -30,6 +39,6 @@
}],
"tilewidth":14,
"type":"map",
"version":"1.6",
"version":"1.9",
"width":10
}

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<map version="1.5" tiledversion="1.7.0" orientation="hexagonal" renderorder="right-down" width="10" height="10" tilewidth="14" tileheight="12" infinite="0" hexsidelength="6" staggeraxis="y" staggerindex="odd" nextlayerid="2" nextobjectid="1">
<map version="1.9" tiledversion="1.9.0" orientation="hexagonal" renderorder="right-down" width="10" height="10" tilewidth="14" tileheight="12" infinite="0" hexsidelength="6" staggeraxis="y" staggerindex="odd" nextlayerid="2" nextobjectid="1">
<tileset firstgid="1" source="tileset.tsx"/>
<layer id="1" name="Tile Layer 1" width="10" height="10">
<data encoding="csv">

View File

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

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<tileset version="1.5" tiledversion="1.7.0" name="tileset" tilewidth="18" tileheight="18" tilecount="20" columns="5">
<tileset version="1.9" tiledversion="1.9.0" name="tileset" tilewidth="18" tileheight="18" tilecount="20" columns="5">
<tileoffset x="0" y="1"/>
<image source="../../images/hexmini.png" width="106" height="72"/>
</tileset>

View File

@@ -38,7 +38,7 @@
"value":"Hello, World!!"
}],
"renderorder":"right-down",
"tiledversion":"1.6.0",
"tiledversion":"1.9.0",
"tileheight":32,
"tilesets":[
{
@@ -47,6 +47,6 @@
}],
"tilewidth":32,
"type":"map",
"version":"1.6",
"version":"1.9",
"width":8
}

View File

@@ -6,7 +6,7 @@
"nextobjectid":1,
"orientation":"orthogonal",
"renderorder":"right-down",
"tiledversion":"1.6.0",
"tiledversion":"1.9.0",
"tileheight":32,
"tilesets":[
{
@@ -15,6 +15,6 @@
}],
"tilewidth":32,
"type":"map",
"version":"1.6",
"version":"1.9",
"width":8
}

View File

@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<map version="1.6" tiledversion="1.6.0" orientation="orthogonal" renderorder="right-down" compressionlevel="0" width="8" height="6" tilewidth="32" tileheight="32" infinite="0" nextlayerid="2" nextobjectid="1">
<map version="1.9" tiledversion="1.9.0" orientation="orthogonal" renderorder="right-down" compressionlevel="0" width="8" height="6" tilewidth="32" tileheight="32" infinite="0" nextlayerid="2" nextobjectid="1">
<tileset firstgid="1" source="tileset.tsx"/>
</map>

View File

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

View File

@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<tileset version="1.6" tiledversion="1.6.0" name="tile_set_image" tilewidth="32" tileheight="32" spacing="1" margin="1" tilecount="48" columns="8">
<tileset version="1.9" tiledversion="1.9.0" name="tile_set_image" tilewidth="32" tileheight="32" spacing="1" margin="1" tilecount="48" columns="8">
<image source="../../images/tmw_desert_spacing.png" width="265" height="199"/>
</tileset>

View File

@@ -38,7 +38,7 @@
"value":"Hello, World!!"
}],
"renderorder":"right-down",
"tiledversion":"1.6.0",
"tiledversion":"1.9.0",
"tileheight":32,
"tilesets":[
{
@@ -47,6 +47,6 @@
}],
"tilewidth":32,
"type":"map",
"version":"1.6",
"version":"1.9",
"width":8
}

View File

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

View File

@@ -21,14 +21,14 @@ EXPECTED = tiled_map.TiledMap(
98.4987608686521, 46.2385012811358
),
visible=True,
type="",
class_="",
),
tiled_object.Tile(
id=6,
coordinates=common_types.OrderedPair(46, 136.666666666667),
name="",
rotation=0,
type="",
class_="",
visible=True,
size=common_types.Size(32, 32),
gid=49,
@@ -38,7 +38,7 @@ EXPECTED = tiled_map.TiledMap(
coordinates=common_types.OrderedPair(141.333333333333, 148),
name="",
rotation=0,
type="",
class_="",
visible=True,
size=common_types.Size(32, 32),
gid=50,

View File

@@ -67,7 +67,7 @@
"value":"Hello, World!!"
}],
"renderorder":"right-down",
"tiledversion":"1.7.1",
"tiledversion":"1.9.0",
"tileheight":32,
"tilesets":[
{
@@ -80,6 +80,6 @@
}],
"tilewidth":32,
"type":"map",
"version":"1.6",
"version":"1.9",
"width":8
}

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<map version="1.5" tiledversion="1.7.0" orientation="orthogonal" renderorder="right-down" compressionlevel="0" width="8" height="6" tilewidth="32" tileheight="32" infinite="0" backgroundcolor="#ff0004" nextlayerid="3" nextobjectid="8">
<map version="1.9" tiledversion="1.9.0" orientation="orthogonal" renderorder="right-down" compressionlevel="0" width="8" height="6" tilewidth="32" tileheight="32" infinite="0" backgroundcolor="#ff0004" nextlayerid="3" nextobjectid="8">
<properties>
<property name="bool property - true" type="bool" value="true"/>
<property name="color property" type="color" value="#ff49fcff"/>

View File

@@ -4,7 +4,7 @@
"id":1,
"name":"",
"rotation":0,
"type":"",
"class":"",
"visible":true,
"width":63.6585878103079
},

View File

@@ -5,7 +5,7 @@
"id":7,
"name":"",
"rotation":0,
"type":"",
"class":"",
"visible":true,
"width":32
},

View File

@@ -5,7 +5,7 @@
"id":6,
"name":"",
"rotation":0,
"type":"",
"class":"",
"visible":true,
"width":32
},

View File

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

View File

@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<tileset version="1.5" tiledversion="1.7.0" name="tile_set_image" tilewidth="32" tileheight="32" spacing="1" margin="1" tilecount="48" columns="8">
<tileset version="1.9" tiledversion="1.9.0" name="tile_set_image" tilewidth="32" tileheight="32" spacing="1" margin="1" tilecount="48" columns="8">
<image source="../../images/tmw_desert_spacing.png" width="265" height="199"/>
</tileset>

View File

@@ -7,7 +7,7 @@
"objectalignment":"topleft",
"spacing":1,
"tilecount":48,
"tiledversion":"1.8.5",
"tiledversion":"1.9.0",
"tileheight":32,
"tilewidth":32,
"type":"tileset",

View File

@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<tileset version="1.8" tiledversion="1.8.5" name="tile_set_image" tilewidth="32" tileheight="32" spacing="1" margin="1" tilecount="48" columns="8" objectalignment="topleft">
<tileset version="1.9" tiledversion="1.9.0" name="tile_set_image" tilewidth="32" tileheight="32" spacing="1" margin="1" tilecount="48" columns="8" objectalignment="topleft">
<image source="../../images/tmw_desert_spacing.png" width="265" height="199"/>
</tileset>

View File

@@ -7,9 +7,9 @@
"name":"tile_set_image",
"spacing":1,
"tilecount":48,
"tiledversion":"1.6.0",
"tiledversion":"1.9.0",
"tileheight":32,
"tilewidth":32,
"type":"tileset",
"version":"1.6"
"version":"1.8"
}

View File

@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<tileset version="1.5" tiledversion="1.7.0" name="tile_set_image" tilewidth="32" tileheight="32" spacing="1" margin="1" tilecount="48" columns="8" backgroundcolor="#5500ff">
<tileset version="1.9" tiledversion="1.9.0" name="tile_set_image" tilewidth="32" tileheight="32" spacing="1" margin="1" tilecount="48" columns="8" backgroundcolor="#5500ff">
<image source="../../images/tmw_desert_spacing.png" width="265" height="199"/>
</tileset>

View File

@@ -20,9 +20,9 @@
"name":"tile_set_image",
"spacing":1,
"tilecount":48,
"tiledversion":"1.6.0",
"tiledversion":"1.9.0",
"tileheight":32,
"tilewidth":32,
"type":"tileset",
"version":"1.6"
"version":"1.8"
}

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<tileset version="1.5" tiledversion="1.7.0" name="tile_set_image" tilewidth="32" tileheight="32" spacing="1" margin="1" tilecount="48" columns="8">
<tileset version="1.9" tiledversion="1.9.0" name="tile_set_image" tilewidth="32" tileheight="32" spacing="1" margin="1" tilecount="48" columns="8">
<editorsettings>
<export 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" format=""/>
</editorsettings>

View File

@@ -40,9 +40,9 @@
}],
"spacing":1,
"tilecount":48,
"tiledversion":"1.6.0",
"tiledversion":"1.9.0",
"tileheight":32,
"tilewidth":32,
"type":"tileset",
"version":"1.6"
"version":"1.8"
}

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<tileset version="1.5" tiledversion="1.7.0" name="tile_set_image" tilewidth="32" tileheight="32" spacing="1" margin="1" tilecount="48" columns="8">
<tileset version="1.9" tiledversion="1.9.0" name="tile_set_image" tilewidth="32" tileheight="32" spacing="1" margin="1" tilecount="48" columns="8">
<editorsettings>
<export 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" format=""/>
</editorsettings>

View File

@@ -14,7 +14,7 @@
"name":"tile_set_image",
"spacing":1,
"tilecount":48,
"tiledversion":"1.6.0",
"tiledversion":"1.9.0",
"tileheight":32,
"tileoffset":
{
@@ -23,5 +23,5 @@
},
"tilewidth":32,
"type":"tileset",
"version":"1.6"
"version":"1.8"
}

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<tileset version="1.5" tiledversion="1.7.0" name="tile_set_image" tilewidth="32" tileheight="32" spacing="1" margin="1" tilecount="48" columns="8">
<tileset version="1.9" tiledversion="1.9.0" name="tile_set_image" tilewidth="32" tileheight="32" spacing="1" margin="1" tilecount="48" columns="8">
<editorsettings>
<export 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" format=""/>
</editorsettings>

View File

@@ -6,7 +6,7 @@
"name":"tile_set_image",
"spacing":1,
"tilecount":48,
"tiledversion":"1.6.0",
"tiledversion":"1.9.0",
"tileheight":32,
"tilewidth":32,
"transformations":
@@ -17,5 +17,5 @@
"vflip":false
},
"type":"tileset",
"version":"1.6"
"version":"1.8"
}

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<tileset version="1.5" tiledversion="1.7.0" name="tile_set_image" tilewidth="32" tileheight="32" spacing="1" margin="1" tilecount="48" columns="8">
<tileset version="1.9" tiledversion="1.9.0" name="tile_set_image" tilewidth="32" tileheight="32" spacing="1" margin="1" tilecount="48" columns="8">
<transformations hflip="1" vflip="0" rotate="0" preferuntransformed="0"/>
<image source="../../images/tmw_desert_spacing.png" width="265" height="199"/>
</tileset>

View File

@@ -6,10 +6,10 @@
"name":"tileset",
"spacing":1,
"tilecount":48,
"tiledversion":"1.6.0",
"tiledversion":"1.9.0",
"tileheight":32,
"tilewidth":32,
"transparentcolor":"#ff00ff",
"type":"tileset",
"version":"1.6"
"version":"1.8"
}

View File

@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<tileset version="1.5" tiledversion="1.7.0" name="tileset" tilewidth="32" tileheight="32" spacing="1" margin="1" tilecount="48" columns="8">
<tileset version="1.9" tiledversion="1.9.0" name="tileset" tilewidth="32" tileheight="32" spacing="1" margin="1" tilecount="48" columns="8">
<image source="../../images/tmw_desert_spacing.png" trans="ff00ff" width="265" height="199"/>
</tileset>

View File

@@ -28,7 +28,7 @@ EXPECTED = tileset.Tileset(
image_height=32,
image_width=32,
properties={"float property": 2.2},
type="tile",
class_="tile",
),
1: tileset.Tile(
id=1,
@@ -46,7 +46,7 @@ EXPECTED = tileset.Tileset(
name="",
size=common_types.Size(14.4766410408043, 13.7196924896511),
rotation=0,
type="",
class_="",
visible=True,
coordinates=common_types.OrderedPair(
13.4358367829687, 13.5304553518628
@@ -57,7 +57,7 @@ EXPECTED = tileset.Tileset(
name="",
size=common_types.Size(14.287403903016, 11.070372560615),
rotation=0,
type="",
class_="",
visible=True,
coordinates=common_types.OrderedPair(
13.8143110585452, 1.98698994677705
@@ -66,7 +66,7 @@ EXPECTED = tileset.Tileset(
],
),
properties={"string property": "testing"},
type="tile",
class_="tile",
),
2: tileset.Tile(
id=2,
@@ -74,14 +74,14 @@ EXPECTED = tileset.Tileset(
image_height=32,
image_width=32,
properties={"bool property": True},
type="tile",
class_="tile",
),
3: tileset.Tile(
id=3,
image=Path("../../images/tile_04.png"),
image_height=32,
image_width=32,
type="tile",
class_="tile",
),
},
)

View File

@@ -9,7 +9,7 @@
"name":"tileset",
"spacing":0,
"tilecount":4,
"tiledversion":"1.6.0",
"tiledversion":"1.9.0",
"tileheight":32,
"tiles":[
{
@@ -30,6 +30,7 @@
"duration":100,
"tileid":3
}],
"class":"tile",
"id":0,
"image":"..\/..\/images\/tile_01.png",
"imageheight":32,
@@ -39,10 +40,10 @@
"name":"float property",
"type":"float",
"value":2.2
}],
"type":"tile"
}]
},
{
"class":"tile",
"id":1,
"image":"..\/..\/images\/tile_02.png",
"imageheight":32,
@@ -53,23 +54,23 @@
"name":"",
"objects":[
{
"class":"",
"height":13.7196924896511,
"id":2,
"name":"",
"rotation":0,
"type":"",
"visible":true,
"width":14.4766410408043,
"x":13.4358367829687,
"y":13.5304553518628
},
{
"class":"",
"ellipse":true,
"height":11.070372560615,
"id":3,
"name":"",
"rotation":0,
"type":"",
"visible":true,
"width":14.287403903016,
"x":13.8143110585452,
@@ -86,10 +87,10 @@
"name":"string property",
"type":"string",
"value":"testing"
}],
"type":"tile"
}]
},
{
"class":"tile",
"id":2,
"image":"..\/..\/images\/tile_03.png",
"imageheight":32,
@@ -99,17 +100,16 @@
"name":"bool property",
"type":"bool",
"value":true
}],
"type":"tile"
}]
},
{
"class":"tile",
"id":3,
"image":"..\/..\/images\/tile_04.png",
"imageheight":32,
"imagewidth":32,
"type":"tile"
"imagewidth":32
}],
"tilewidth":32,
"type":"tileset",
"version":"1.6"
"version":"1.8"
}

View File

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<tileset version="1.5" tiledversion="1.7.0" name="tileset" tilewidth="32" tileheight="32" tilecount="4" columns="0">
<tileset version="1.9" tiledversion="1.9.0" name="tileset" tilewidth="32" tileheight="32" tilecount="4" columns="0">
<grid orientation="orthogonal" width="1" height="1"/>
<tile id="0" type="tile">
<tile id="0" class="tile">
<properties>
<property name="float property" type="float" value="2.2"/>
</properties>
@@ -13,7 +13,7 @@
<frame tileid="3" duration="100"/>
</animation>
</tile>
<tile id="1" type="tile">
<tile id="1" class="tile">
<properties>
<property name="string property" value="testing"/>
</properties>
@@ -25,13 +25,13 @@
</object>
</objectgroup>
</tile>
<tile id="2" type="tile">
<tile id="2" class="tile">
<properties>
<property name="bool property" type="bool" value="true"/>
</properties>
<image width="32" height="32" source="../../images/tile_03.png"/>
</tile>
<tile id="3" type="tile">
<tile id="3" class="tile">
<image width="32" height="32" source="../../images/tile_04.png"/>
</tile>
</tileset>

View File

@@ -6,7 +6,7 @@
"name":"tileset",
"spacing":1,
"tilecount":48,
"tiledversion":"1.8.5",
"tiledversion":"1.9.0",
"tileheight":32,
"tilewidth":32,
"type":"tileset",

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<tileset version="1.8" tiledversion="1.8.5" name="tileset" tilewidth="32" tileheight="32" spacing="1" margin="1" tilecount="48" columns="8">
<tileset version="1.9" tiledversion="1.9.0" name="tileset" tilewidth="32" tileheight="32" spacing="1" margin="1" tilecount="48" columns="8">
<image source="../../images/tmw_desert_spacing.png" width="265" height="199"/>
<wangsets>
<wangset name="Terrains" type="mixed" tile="-1">

View File

@@ -3,7 +3,11 @@
"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],
"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",
@@ -18,7 +22,7 @@
"nextobjectid":1,
"orientation":"orthogonal",
"renderorder":"right-down",
"tiledversion":"1.6.0",
"tiledversion":"1.9.0",
"tileheight":32,
"tilesets":[
{
@@ -27,6 +31,6 @@
}],
"tilewidth":32,
"type":"map",
"version":"1.6",
"version":"1.9",
"width":5
}

View File

@@ -3,7 +3,11 @@
"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],
"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",
@@ -18,7 +22,7 @@
"nextobjectid":1,
"orientation":"orthogonal",
"renderorder":"right-down",
"tiledversion":"1.6.0",
"tiledversion":"1.9.0",
"tileheight":32,
"tilesets":[
{
@@ -27,6 +31,6 @@
}],
"tilewidth":32,
"type":"map",
"version":"1.6",
"version":"1.9",
"width":5
}

View File

@@ -3,7 +3,11 @@
"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],
"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",
@@ -18,7 +22,7 @@
"nextobjectid":1,
"orientation":"orthogonal",
"renderorder":"right-down",
"tiledversion":"1.6.0",
"tiledversion":"1.9.0",
"tileheight":32,
"tilesets":[
{
@@ -27,6 +31,6 @@
}],
"tilewidth":32,
"type":"map",
"version":"1.6",
"version":"1.9",
"width":5
}

View File

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

Some files were not shown because too many files have changed in this diff Show More