Compare commits

..

12 commits

Author SHA1 Message Date
Daniel Cronqvist
5703b4a2a7 Add documentation Raylib example project and link from official docs 2025-04-26 01:06:44 +02:00
Daniel Cronqvist
57b903bea1 Add MonoGame example project 2025-04-26 01:06:43 +02:00
Daniel Cronqvist
6191498618 Add Raylib example project and helper methods for resolving tilesets and finding source rectangles of tiles 2025-04-26 01:06:43 +02:00
Daniel Cronqvist
36c6f4dd12 Prepare an example world to be used in Raylib example project 2025-04-25 21:40:23 +02:00
dcronqvist
d20aff1d66
Merge pull request #86 from dcronqvist/tmj-image-props
Parse new image size properties in ImageLayers in `tmj`
2025-04-25 21:25:02 +02:00
Daniel Cronqvist
a98d45bfee Bump upcoming version number and add to representaion model table 2025-04-25 21:21:45 +02:00
Daniel Cronqvist
b133e31429 Remove warning from docs about missing image properties in tmj 2025-04-25 21:21:45 +02:00
Daniel Cronqvist
58bb446e2b Read new image size properties in tmj from Tiled 1.11.1 2025-04-25 21:21:42 +02:00
dcronqvist
c27049780a
Merge pull request #84 from dcronqvist/tiled-color
Rename Color to TiledColor
2025-04-25 21:19:32 +02:00
Daniel Cronqvist
77d4e38a2c Rename Color to TiledColor 2025-04-25 21:15:26 +02:00
dcronqvist
961b3293d7
Merge pull request #85 from dcronqvist/uint-to-int
Use signed integers instead of unsigned
2025-04-25 21:12:44 +02:00
Daniel Cronqvist
ae2e70a223 Change common parts of model API to use signed integers rather than unsigned for less casting 2025-04-25 21:09:48 +02:00
66 changed files with 1149 additions and 211 deletions

View file

@ -5,13 +5,10 @@ Loading maps with DotTiled is very flexible and allows you as a developer to fre
> [!TIP] > [!TIP]
> For a quick and easy way to load maps from the filesystem, please refer to the [quickstart guide](../quickstart.md). > For a quick and easy way to load maps from the filesystem, please refer to the [quickstart guide](../quickstart.md).
## File format caveats ## File formats
The <xref:DotTiled.Map> class is a representation of a Tiled map, mimicking the structure of a Tiled XML map file. Map files can either be in the [`.tmx`/XML](https://doc.mapeditor.org/en/stable/reference/tmx-map-format/) or [`.tmj`/json](https://doc.mapeditor.org/en/stable/reference/json-map-format/) format. DotTiled supports **both** formats fully. The <xref:DotTiled.Map> class is a representation of a Tiled map, mimicking the structure of a Tiled XML map file. Map files can either be in the [`.tmx`/XML](https://doc.mapeditor.org/en/stable/reference/tmx-map-format/) or [`.tmj`/json](https://doc.mapeditor.org/en/stable/reference/json-map-format/) format. DotTiled supports **both** formats fully.
> [!WARNING]
> Using the `.tmj` file format will result in <xref:DotTiled.ImageLayer.Image> (the source image for image layers) not having the same amount of information as for the `.tmx` format. This is due to the fact that the `.tmj` format does not include the full information that the `.tmx` format does. This is not a problem with DotTiled, but rather a limitation of the `.tmj` format.
## The process of loading a map ## The process of loading a map
Loading a map with DotTiled is not a complex process, but one that at least demands a basic understanding of how Tiled maps are structured. The process can be broken down into the following flow(-ish) chart: Loading a map with DotTiled is not a complex process, but one that at least demands a basic understanding of how Tiled maps are structured. The process can be broken down into the following flow(-ish) chart:

View file

@ -12,6 +12,9 @@ Certain properties throughout the representation model are marked as *optional*
The representation model is designed to be compatible with the latest version of Tiled. This means that it may not be able to read files from older versions of Tiled, or files that use features that are not yet supported by the representation model. However, here is a table of which versions of Tiled are supported by which versions of DotTiled. The representation model is designed to be compatible with the latest version of Tiled. This means that it may not be able to read files from older versions of Tiled, or files that use features that are not yet supported by the representation model. However, here is a table of which versions of Tiled are supported by which versions of DotTiled.
You should use one of the versions of DotTiled that is compatible with the version of Tiled you are using.
| Tiled version | Compatible DotTiled version(s) | | Tiled version | Compatible DotTiled version(s) |
|---------------|--------------------------------| |----------------|--------------------------------|
| 1.11.1, 1.11.2 | 0.4.0 |
| 1.11 | 0.1.0, 0.2.0, 0.2.1, 0.3.0 | | 1.11 | 0.1.0, 0.2.0, 0.2.1, 0.3.0 |

View file

@ -0,0 +1,36 @@
{
"version": 1,
"isRoot": true,
"tools": {
"dotnet-mgcb": {
"version": "3.8.3",
"commands": [
"mgcb"
]
},
"dotnet-mgcb-editor": {
"version": "3.8.3",
"commands": [
"mgcb-editor"
]
},
"dotnet-mgcb-editor-linux": {
"version": "3.8.3",
"commands": [
"mgcb-editor-linux"
]
},
"dotnet-mgcb-editor-windows": {
"version": "3.8.3",
"commands": [
"mgcb-editor-windows"
]
},
"dotnet-mgcb-editor-mac": {
"version": "3.8.3",
"commands": [
"mgcb-editor-mac"
]
}
}
}

View file

@ -0,0 +1,52 @@
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
namespace DotTiled.Example.MonoGame;
public class Camera2D
{
public float Zoom { get; set; }
public Vector2 Position { get; set; }
public Rectangle Bounds { get; protected set; }
public Rectangle VisibleArea { get; protected set; }
public Matrix Transform { get; protected set; }
public Camera2D(Viewport viewport)
{
Bounds = viewport.Bounds;
Zoom = 1f;
Position = Vector2.Zero;
}
private void UpdateVisibleArea()
{
var inverseViewMatrix = Matrix.Invert(Transform);
var tl = Vector2.Transform(Vector2.Zero, inverseViewMatrix);
var tr = Vector2.Transform(new Vector2(Bounds.X, 0), inverseViewMatrix);
var bl = Vector2.Transform(new Vector2(0, Bounds.Y), inverseViewMatrix);
var br = Vector2.Transform(new Vector2(Bounds.Width, Bounds.Height), inverseViewMatrix);
var min = new Vector2(
MathHelper.Min(tl.X, MathHelper.Min(tr.X, MathHelper.Min(bl.X, br.X))),
MathHelper.Min(tl.Y, MathHelper.Min(tr.Y, MathHelper.Min(bl.Y, br.Y))));
var max = new Vector2(
MathHelper.Max(tl.X, MathHelper.Max(tr.X, MathHelper.Max(bl.X, br.X))),
MathHelper.Max(tl.Y, MathHelper.Max(tr.Y, MathHelper.Max(bl.Y, br.Y))));
VisibleArea = new Rectangle((int)min.X, (int)min.Y, (int)(max.X - min.X), (int)(max.Y - min.Y));
}
private void UpdateMatrix()
{
Transform = Matrix.CreateTranslation(new Vector3(-Position.X, -Position.Y, 0)) *
Matrix.CreateScale(Zoom) *
Matrix.CreateTranslation(new Vector3(Bounds.Width * 0.5f, Bounds.Height * 0.5f, 0));
UpdateVisibleArea();
}
public void UpdateCamera(Viewport bounds)
{
Bounds = bounds.Bounds;
UpdateMatrix();
}
}

View file

@ -0,0 +1,33 @@
#----------------------------- Global Properties ----------------------------#
/outputDir:bin/$(Platform)
/intermediateDir:obj/$(Platform)
/platform:DesktopGL
/config:
/profile:Reach
/compress:False
#-------------------------------- References --------------------------------#
#---------------------------------- Content ---------------------------------#
#begin kenney_roguelike-rpg-pack/roguelikeSheet_transparent.png
/importer:TextureImporter
/processor:TextureProcessor
/processorParam:ColorKeyColor=255,0,255,255
/processorParam:ColorKeyEnabled=True
/processorParam:GenerateMipmaps=False
/processorParam:PremultiplyAlpha=True
/processorParam:ResizeToPowerOfTwo=False
/processorParam:MakeSquare=False
/processorParam:TextureFormat=Color
/build:kenney_roguelike-rpg-pack/roguelikeSheet_transparent.png
#begin world-tileset.tsx
/copy:world-tileset.tsx
#begin world.tmx
/copy:world.tmx

View file

@ -0,0 +1,23 @@
###############################################################################
Roguelike pack
by Kenney Vleugels for Kenney (www.kenney.nl)
with help by Lynn Evers (Twitter: @EversLynn)
------------------------------
License (Creative Commons Zero, CC0)
http://creativecommons.org/publicdomain/zero/1.0/
You may use these graphics in personal and commercial projects.
Credit (Kenney or www.kenney.nl) would be nice but is not mandatory.
------------------------------
Donate: http://donate.kenney.nl/
Request: http://request.kenney.nl/
###############################################################################

Binary file not shown.

After

Width:  |  Height:  |  Size: 92 KiB

View file

@ -0,0 +1,38 @@
<?xml version="1.0" encoding="UTF-8"?>
<tileset version="1.10" tiledversion="1.11.2" name="roguelikeSheet_transparent" tilewidth="16" tileheight="16" spacing="1" tilecount="1767" columns="57">
<image source="kenney_roguelike-rpg-pack/roguelikeSheet_transparent.png" width="968" height="526"/>
<wangsets>
<wangset name="Stuff" type="mixed" tile="-1">
<wangcolor name="Brown path" color="#ff0000" tile="692" probability="1"/>
<wangcolor name="Water" color="#00ff00" tile="-1" probability="1"/>
<wangtile tileid="2" wangid="0,0,2,2,2,0,0,0"/>
<wangtile tileid="3" wangid="0,0,2,2,2,2,2,0"/>
<wangtile tileid="4" wangid="0,0,0,0,2,2,2,0"/>
<wangtile tileid="57" wangid="2,2,2,0,2,2,2,2"/>
<wangtile tileid="58" wangid="2,2,2,2,2,0,2,2"/>
<wangtile tileid="59" wangid="2,2,2,2,2,0,0,0"/>
<wangtile tileid="60" wangid="2,2,2,2,2,2,2,2"/>
<wangtile tileid="61" wangid="2,0,0,0,2,2,2,2"/>
<wangtile tileid="114" wangid="2,0,2,2,2,2,2,2"/>
<wangtile tileid="115" wangid="2,2,2,2,2,2,2,0"/>
<wangtile tileid="116" wangid="2,2,2,0,0,0,0,0"/>
<wangtile tileid="117" wangid="2,2,2,0,0,0,2,2"/>
<wangtile tileid="118" wangid="2,0,0,0,0,0,2,2"/>
<wangtile tileid="404" wangid="0,0,1,0,1,0,1,0"/>
<wangtile tileid="405" wangid="1,0,0,0,1,0,1,0"/>
<wangtile tileid="406" wangid="0,0,1,0,1,0,0,0"/>
<wangtile tileid="407" wangid="0,0,0,0,1,0,1,0"/>
<wangtile tileid="408" wangid="1,0,0,0,1,0,0,0"/>
<wangtile tileid="461" wangid="1,0,1,0,1,0,0,0"/>
<wangtile tileid="462" wangid="1,0,1,0,0,0,1,0"/>
<wangtile tileid="463" wangid="1,0,1,0,0,0,0,0"/>
<wangtile tileid="464" wangid="1,0,0,0,0,0,1,0"/>
<wangtile tileid="465" wangid="0,0,1,0,0,0,1,0"/>
<wangtile tileid="632" wangid="1,0,0,0,0,0,0,0"/>
<wangtile tileid="633" wangid="0,0,0,0,1,0,0,0"/>
<wangtile tileid="689" wangid="0,0,0,0,0,0,1,0"/>
<wangtile tileid="690" wangid="0,0,1,0,0,0,0,0"/>
<wangtile tileid="691" wangid="1,0,1,0,1,0,1,0"/>
</wangset>
</wangsets>
</tileset>

View file

@ -0,0 +1,434 @@
<?xml version="1.0" encoding="UTF-8"?>
<map version="1.10" tiledversion="1.11.2" orientation="orthogonal" renderorder="right-down" width="50" height="50" tilewidth="16" tileheight="16" infinite="0" nextlayerid="13" next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61,61,61,58,118,118,59,61,61,61,61,115,5,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,60,61,61,61,58,118,119,0,0,117,118,59,61,61,61,62,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,60,61,61,58,119,0,0,0,0,0,0,60,61,61,61,62,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,116,61,61,62,0,0,0,0,0,0,3,116,61,61,61,62,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,60,61,61,61,115,5,0,0,0,0,0,60,61,61,61,61,62,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,60,61,61,61,61,115,4,4,4,4,4,116,61,61,61,61,62,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,60,61,61,61,61,61,61,61,61,61,61,61,61,61,61,58,119,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,117,59,61,61,61,61,61,61,61,61,61,61,61,61,61,62,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,60,61,61,61,61,61,61,61,61,61,61,61,58,118,119,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,117,118,118,118,118,118,118,118,118,118,118,118,119,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,3,4,4,4,4,4,4,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,60,61,61,61,61,61,61,115,4,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,3,116,61,61,61,61,61,61,61,61,115,4,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,60,61,61,61,61,61,61,61,61,61,61,61,115,4,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,3,116,61,61,61,61,61,61,61,61,61,61,61,61,61,115,4,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,60,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,115,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,60,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,62,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,3,116,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,58,119,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,60,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,58,119,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,3,116,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,58,119,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,60,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,58,119,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,60,61,61,61,61,61,61,61,61,61,61,61,61,61,58,118,119,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,117,59,61,61,61,61,61,61,61,61,61,58,118,118,119,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,117,118,118,59,61,61,61,58,118,118,119,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,117,118,118,118,119,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0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,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,462,466,466,466,466,465,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,407,466,466,465,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,407,466,466,466,466,465,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,407,466,466,466,466,465,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,407,466,405,465,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,407,466,465,0,409,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,407,465,0,0,0,409,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,407,466,465,0,0,0,0,409,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,407,466,465,0,0,0,0,0,0,409,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,407,466,466,466,466,466,466,466,466,466,466,466,466,466,466,466,465,0,0,0,0,0,0,0,0,464,408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,409,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,464,408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,409,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,464,408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,409,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,464,466,408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,409,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,464,466,408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,409,0,0,634,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,464,466,466,466,466,466,466,690,0,0,0,0,0,0,0,
0,0,0,464,466,466,465,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
</data>
</layer>
<layer id="5" name="HouseWalls" width="50" height="50">
<data encoding="csv">
0,0,0,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48"/>
<object id="2" x="496" y="480" width="48" height="48"/>
<object id="3" x="576" y="464" width="48" height="48"/>
<object id="4" x="608" y="656" width="48" height="48"/>
<object id="5" x="736" y="416" width="48" height="48"/>
<object id="6" x="368" y="240" width="48" height="48"/>
<object id="7" x="272" y="208" width="48" height="48"/>
<object id="10" x="144" y="640" width="128" height="16"/>
<object id="11" x="352" y="608" width="32" height="16"/>
<object id="12" x="336" y="576" width="32" height="16"/>
<object id="13" x="432" y="528" width="32" height="16"/>
<object id="14" x="444.826" y="576" width="3.17391" height="48"/>
<object id="15" x="464" y="560" width="3.17391" height="48"/>
<object id="16" x="668.875" y="432" width="3.125" height="48"/>
<object id="17" x="688" y="448" width="3.25" height="16"/>
<object id="19" x="704" y="496" width="48" height="16"/>
<object id="20" x="464" y="368" width="128" height="16"/>
<object id="21" x="160" y="96" width="128" height="16"/>
<object id="24" x="80" y="496" width="240" height="64"/>
<object id="25" x="96" y="560" width="176" height="16"/>
<object id="26" x="144" y="576" width="80" height="16"/>
<object id="28" x="144" y="352" width="128" height="144"/>
<object id="29" x="128" y="384" width="16" height="112"/>
<object id="30" x="112" y="416" width="16" height="80"/>
<object id="31" x="96" y="464" width="16" height="32"/>
<object id="32" x="272" y="368" width="32" height="128"/>
<object id="33" x="304" y="384" width="32" height="112"/>
<object id="35" x="336" y="400" width="32" height="128"/>
<object id="36" x="368" y="416" width="16" height="96"/>
<object id="37" x="384" y="416" width="16" height="80"/>
<object id="38" x="400" y="432" width="16" height="48"/>
<object id="39" x="320" y="496" width="16" height="48"/>
<object id="40" x="336" y="528" width="16" height="16"/>
<object id="41" x="464" y="224" width="208" height="80"/>
<object id="42" x="544" y="96" width="128" height="128"/>
<object id="43" x="448" y="192" width="16" height="80"/>
<object id="44" x="464" y="144" width="80" height="80"/>
<object id="45" x="496" y="112" width="48" height="32"/>
<object id="46" x="480" y="128" width="16" height="16"/>
<object id="47" x="608" y="80" width="64" height="16"/>
<object id="48" x="672" y="96" width="16" height="192"/>
<object id="49" x="688" y="112" width="16" height="176"/>
<object id="50" x="704" y="144" width="16" height="112"/>
</objectgroup>
<objectgroup id="12" name="PointsOfInterest">
<object id="8" name="PlayerSpawn" x="425" y="343.5">
<point/>
</object>
</objectgroup>
</map>

View file

@ -0,0 +1,36 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<RollForward>Major</RollForward>
<PublishReadyToRun>false</PublishReadyToRun>
<TieredCompilation>false</TieredCompilation>
</PropertyGroup>
<PropertyGroup>
<ApplicationManifest>app.manifest</ApplicationManifest>
<ApplicationIcon>Icon.ico</ApplicationIcon>
</PropertyGroup>
<ItemGroup>
<None Remove="Icon.ico" />
<None Remove="Icon.bmp" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Icon.ico">
<LogicalName>Icon.ico</LogicalName>
</EmbeddedResource>
<EmbeddedResource Include="Icon.bmp">
<LogicalName>Icon.bmp</LogicalName>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<PackageReference Include="MonoGame.Framework.DesktopGL" Version="3.8.*" />
<PackageReference Include="MonoGame.Content.Builder.Task" Version="3.8.*" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\DotTiled\DotTiled.csproj" />
</ItemGroup>
<Target Name="RestoreDotnetTools" BeforeTargets="Restore">
<Message Text="Restoring dotnet tools" Importance="High" />
<Exec Command="dotnet tool restore" />
</Target>
</Project>

View file

@ -0,0 +1,231 @@
using System.Collections.Generic;
using System.IO;
using System.Linq;
using DotTiled.Serialization;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
namespace DotTiled.Example.MonoGame;
/// <summary>
/// A beginner-friendly example of using DotTiled with MonoGame.
/// Loads a Tiled map, renders its layers, and allows basic player movement with collision.
/// </summary>
public class Game1 : Game
{
private readonly GraphicsDeviceManager _graphics;
private SpriteBatch _spriteBatch;
// Camera for following the player
private Camera2D _camera;
// DotTiled map and tileset textures
private Map _map;
private Dictionary<string, Texture2D> _tilesetTextures;
// Layers for collisions and points of interest
private ObjectLayer _collisionLayer;
private ObjectLayer _pointsOfInterestLayer;
// Player state
private Vector2 _playerPosition;
private Texture2D _playerTexture;
// Used for drawing rectangles (player)
private Texture2D _whitePixel;
public Game1()
{
_graphics = new GraphicsDeviceManager(this)
{
PreferredBackBufferWidth = 1280,
PreferredBackBufferHeight = 720
};
Content.RootDirectory = "Content";
IsMouseVisible = true;
}
/// <summary>
/// MonoGame initialization.
/// </summary>
protected override void Initialize() => base.Initialize();
/// <summary>
/// Load map, textures, and initialize player/camera.
/// </summary>
protected override void LoadContent()
{
_spriteBatch = new SpriteBatch(GraphicsDevice);
// Used for drawing rectangles (player)
_whitePixel = new Texture2D(GraphicsDevice, 1, 1);
_whitePixel.SetData(new[] { Color.White });
// Load the Tiled map using DotTiled
var loader = Loader.Default();
_map = loader.LoadMap(Path.Combine(Content.RootDirectory, "world.tmx"));
// Load all tileset textures referenced by the map
_tilesetTextures = LoadTilesetTextures(_map);
// Extract layers for collisions and points of interest
_collisionLayer = _map.Layers.OfType<ObjectLayer>().Single(l => l.Name == "Collisions");
_pointsOfInterestLayer = (ObjectLayer)_map.Layers.Single(l => l.Name == "PointsOfInterest");
// Get the player's spawn point from the PointsOfInterest layer
var playerSpawn = _pointsOfInterestLayer.Objects.Single(obj => obj.Name == "PlayerSpawn");
_playerPosition = new Vector2(playerSpawn.X, playerSpawn.Y);
// Set up the camera to follow the player
_camera = new Camera2D(GraphicsDevice.Viewport);
// Optionally, create a simple player texture (blue rectangle)
_playerTexture = new Texture2D(GraphicsDevice, 1, 1);
_playerTexture.SetData(new[] { Color.Blue });
}
/// <summary>
/// Loads all tileset textures referenced by the map.
/// </summary>
private Dictionary<string, Texture2D> LoadTilesetTextures(Map map)
{
// Remove ".png" for MonoGame Content Pipeline compatibility
return map.Tilesets.ToDictionary(
tileset => tileset.Image.Value.Source.Value,
tileset => Content.Load<Texture2D>(Path.GetDirectoryName(tileset.Image.Value.Source.Value) + "/" + Path.GetFileNameWithoutExtension(tileset.Image.Value.Source.Value))
);
}
/// <summary>
/// Handles player input and updates game logic.
/// </summary>
protected override void Update(GameTime gameTime)
{
// Exit on Escape
if (Keyboard.GetState().IsKeyDown(Keys.Escape))
Exit();
_camera.UpdateCamera(GraphicsDevice.Viewport);
// Handle player movement input
var move = HandlePlayerInput(gameTime);
// Define the player's collision rectangle
var playerRect = new Rectangle((int)_playerPosition.X, (int)_playerPosition.Y, 12, 12);
// Collision detection with rectangles in the collision layer
foreach (var obj in _collisionLayer.Objects.OfType<RectangleObject>())
{
var objRect = new Rectangle((int)obj.X, (int)obj.Y, (int)obj.Width, (int)obj.Height);
// Horizontal collision
var movePlayerHRect = new Rectangle(playerRect.X + (int)move.X, playerRect.Y, playerRect.Width, playerRect.Height);
if (move.X != 0 && movePlayerHRect.Intersects(objRect))
move.X = 0;
// Vertical collision
var movePlayerVRect = new Rectangle(playerRect.X, playerRect.Y + (int)move.Y, playerRect.Width, playerRect.Height);
if (move.Y != 0 && movePlayerVRect.Intersects(objRect))
move.Y = 0;
}
// Update player position
_playerPosition += move;
// Smoothly update the camera to follow the player
var newCameraTarget = new Vector2(_playerPosition.X, _playerPosition.Y);
_camera.Position += (newCameraTarget - _camera.Position) * 15f * (float)gameTime.ElapsedGameTime.TotalSeconds;
base.Update(gameTime);
}
/// <summary>
/// Handles WASD input for player movement.
/// </summary>
private static Vector2 HandlePlayerInput(GameTime gameTime)
{
var move = Vector2.Zero;
var speed = 150f * (float)gameTime.ElapsedGameTime.TotalSeconds;
var state = Keyboard.GetState();
if (state.IsKeyDown(Keys.W)) move.Y -= speed;
if (state.IsKeyDown(Keys.S)) move.Y += speed;
if (state.IsKeyDown(Keys.A)) move.X -= speed;
if (state.IsKeyDown(Keys.D)) move.X += speed;
return move;
}
/// <summary>
/// Draws the map, player, and handles layer ordering.
/// </summary>
protected override void Draw(GameTime gameTime)
{
GraphicsDevice.Clear(Color.Black);
_spriteBatch.Begin(transformMatrix: _camera.Transform);
// Get all visual tile layers from the "Visuals" group
var visualLayers = _map.Layers.OfType<Group>().Single(l => l.Name == "Visuals").Layers.OfType<TileLayer>();
// Render layers below the player
RenderLayers(_map, visualLayers, _tilesetTextures, ["Ground", "Ponds", "Paths", "HouseWalls", "HouseDoors", "FencesBushes"]);
// Draw the player as a blue rectangle (centered on tile)
var playerVisualRect = new Rectangle((int)_playerPosition.X, (int)_playerPosition.Y - 12, 12, 24);
_spriteBatch.Draw(_playerTexture, playerVisualRect, Color.White);
// Render layers above the player
RenderLayers(_map, visualLayers, _tilesetTextures, ["HouseRoofs"]);
_spriteBatch.End();
base.Draw(gameTime);
}
/// <summary>
/// Renders specific named layers from the map.
/// </summary>
private void RenderLayers(Map map, IEnumerable<TileLayer> visualLayers, Dictionary<string, Texture2D> tilesetTextures, string[] layerNames)
{
foreach (var layerName in layerNames)
{
var layer = visualLayers.Single(l => l.Name == layerName);
RenderLayer(map, layer, tilesetTextures);
}
}
/// <summary>
/// Renders a single tile layer.
/// </summary>
private void RenderLayer(Map map, TileLayer layer, Dictionary<string, Texture2D> tilesetTextures)
{
for (var y = 0; y < layer.Height; y++)
{
for (var x = 0; x < layer.Width; x++)
{
var tileGID = layer.GetGlobalTileIDAtCoord(x, y);
if (tileGID == 0) continue;
var tileset = map.ResolveTilesetForGlobalTileID(tileGID, out var localTileID);
var sourceRect = tileset.GetSourceRectangleForLocalTileID(localTileID);
var destination = new Vector2(x * tileset.TileWidth, y * tileset.TileHeight);
var sourceRectangle = new Rectangle(sourceRect.X + 1, sourceRect.Y + 1, sourceRect.Width - 2, sourceRect.Height - 2);
_spriteBatch.Draw(
tilesetTextures[tileset.Image.Value.Source.Value],
destination,
sourceRectangle,
Color.White,
0f,
Vector2.Zero,
Vector2.One * (1f / (14f / 16f)), // Shrink by a tiny amount to avoid seams (not a perfect solution)
SpriteEffects.None,
0f
);
}
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 256 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 144 KiB

View file

@ -0,0 +1,2 @@
using var game = new DotTiled.Example.MonoGame.Game1();
game.Run();

View file

@ -0,0 +1,43 @@
<?xml version="1.0" encoding="utf-8"?>
<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1">
<assemblyIdentity version="1.0.0.0" name="DotTiled.Example.MonoGame"/>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
<security>
<requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
<requestedExecutionLevel level="asInvoker" uiAccess="false" />
</requestedPrivileges>
</security>
</trustInfo>
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
<application>
<!-- A list of the Windows versions that this application has been tested on and is
is designed to work with. Uncomment the appropriate elements and Windows will
automatically selected the most compatible environment. -->
<!-- Windows Vista -->
<supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}" />
<!-- Windows 7 -->
<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}" />
<!-- Windows 8 -->
<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}" />
<!-- Windows 8.1 -->
<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}" />
<!-- Windows 10 -->
<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}" />
</application>
</compatibility>
<application xmlns="urn:schemas-microsoft-com:asm.v3">
<windowsSettings>
<dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true/pm</dpiAware>
<dpiAwareness xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">permonitorv2,permonitor</dpiAwareness>
</windowsSettings>
</application>
</assembly>

View file

@ -48,7 +48,7 @@ public class FromTypeUsedInLoaderTests
ParallaxOriginY = 0, ParallaxOriginY = 0,
RenderOrder = RenderOrder.RightDown, RenderOrder = RenderOrder.RightDown,
CompressionLevel = -1, CompressionLevel = -1,
BackgroundColor = new Color { R = 0, G = 0, B = 0, A = 0 }, BackgroundColor = new TiledColor { R = 0, G = 0, B = 0, A = 0 },
Version = "1.10", Version = "1.10",
TiledVersion = "1.11.0", TiledVersion = "1.11.0",
NextLayerID = 2, NextLayerID = 2,
@ -133,7 +133,7 @@ public class FromTypeUsedInLoaderTests
ParallaxOriginY = 0, ParallaxOriginY = 0,
RenderOrder = RenderOrder.RightDown, RenderOrder = RenderOrder.RightDown,
CompressionLevel = -1, CompressionLevel = -1,
BackgroundColor = new Color { R = 0, G = 0, B = 0, A = 0 }, BackgroundColor = new TiledColor { R = 0, G = 0, B = 0, A = 0 },
Version = "1.10", Version = "1.10",
TiledVersion = "1.11.0", TiledVersion = "1.11.0",
NextLayerID = 2, NextLayerID = 2,
@ -226,7 +226,7 @@ public class FromTypeUsedInLoaderTests
ParallaxOriginY = 0, ParallaxOriginY = 0,
RenderOrder = RenderOrder.RightDown, RenderOrder = RenderOrder.RightDown,
CompressionLevel = -1, CompressionLevel = -1,
BackgroundColor = new Color { R = 0, G = 0, B = 0, A = 0 }, BackgroundColor = new TiledColor { R = 0, G = 0, B = 0, A = 0 },
Version = "1.10", Version = "1.10",
TiledVersion = "1.11.0", TiledVersion = "1.11.0",
NextLayerID = 2, NextLayerID = 2,

View file

@ -15,7 +15,7 @@ public partial class TestData
ParallaxOriginY = 0, ParallaxOriginY = 0,
RenderOrder = RenderOrder.RightDown, RenderOrder = RenderOrder.RightDown,
CompressionLevel = -1, CompressionLevel = -1,
BackgroundColor = new Color { R = 0, G = 0, B = 0, A = 0 }, BackgroundColor = new TiledColor { R = 0, G = 0, B = 0, A = 0 },
Version = "1.10", Version = "1.10",
TiledVersion = "1.11.0", TiledVersion = "1.11.0",
NextLayerID = 2, NextLayerID = 2,

View file

@ -17,7 +17,7 @@ public partial class TestData
ParallaxOriginY = 0, ParallaxOriginY = 0,
RenderOrder = RenderOrder.RightDown, RenderOrder = RenderOrder.RightDown,
CompressionLevel = -1, CompressionLevel = -1,
BackgroundColor = Color.Parse("#00000000", CultureInfo.InvariantCulture), BackgroundColor = TiledColor.Parse("#00000000", CultureInfo.InvariantCulture),
Version = "1.10", Version = "1.10",
TiledVersion = "1.11.0", TiledVersion = "1.11.0",
NextLayerID = 2, NextLayerID = 2,
@ -47,7 +47,7 @@ public partial class TestData
}, },
Properties = [ Properties = [
new BoolProperty { Name = "tilesetbool", Value = true }, new BoolProperty { Name = "tilesetbool", Value = true },
new ColorProperty { Name = "tilesetcolor", Value = Color.Parse("#ffff0000", CultureInfo.InvariantCulture) }, new ColorProperty { Name = "tilesetcolor", Value = TiledColor.Parse("#ffff0000", CultureInfo.InvariantCulture) },
new FileProperty { Name = "tilesetfile", Value = "" }, new FileProperty { Name = "tilesetfile", Value = "" },
new FloatProperty { Name = "tilesetfloat", Value = 5.2f }, new FloatProperty { Name = "tilesetfloat", Value = 5.2f },
new IntProperty { Name = "tilesetint", Value = 9 }, new IntProperty { Name = "tilesetint", Value = 9 },

View file

@ -17,7 +17,7 @@ public partial class TestData
ParallaxOriginY = 0, ParallaxOriginY = 0,
RenderOrder = RenderOrder.RightDown, RenderOrder = RenderOrder.RightDown,
CompressionLevel = -1, CompressionLevel = -1,
BackgroundColor = Color.Parse("#00000000", CultureInfo.InvariantCulture), BackgroundColor = TiledColor.Parse("#00000000", CultureInfo.InvariantCulture),
Version = "1.10", Version = "1.10",
TiledVersion = "1.11.0", TiledVersion = "1.11.0",
NextLayerID = 2, NextLayerID = 2,
@ -63,21 +63,21 @@ public partial class TestData
new WangColor new WangColor
{ {
Name = "Water", Name = "Water",
Color = Color.Parse("#ff0000", CultureInfo.InvariantCulture), Color = TiledColor.Parse("#ff0000", CultureInfo.InvariantCulture),
Tile = 0, Tile = 0,
Probability = 1 Probability = 1
}, },
new WangColor new WangColor
{ {
Name = "Grass", Name = "Grass",
Color = Color.Parse("#00ff00", CultureInfo.InvariantCulture), Color = TiledColor.Parse("#00ff00", CultureInfo.InvariantCulture),
Tile = -1, Tile = -1,
Probability = 1 Probability = 1
}, },
new WangColor new WangColor
{ {
Name = "Stone", Name = "Stone",
Color = Color.Parse("#0000ff", CultureInfo.InvariantCulture), Color = TiledColor.Parse("#0000ff", CultureInfo.InvariantCulture),
Tile = 29, Tile = 29,
Probability = 1 Probability = 1
} }

View file

@ -17,7 +17,7 @@ public partial class TestData
ParallaxOriginY = 0, ParallaxOriginY = 0,
RenderOrder = RenderOrder.RightDown, RenderOrder = RenderOrder.RightDown,
CompressionLevel = -1, CompressionLevel = -1,
BackgroundColor = new Color { R = 0, G = 0, B = 0, A = 0 }, BackgroundColor = new TiledColor { R = 0, G = 0, B = 0, A = 0 },
Version = "1.10", Version = "1.10",
TiledVersion = "1.11.0", TiledVersion = "1.11.0",
NextLayerID = 8, NextLayerID = 8,
@ -181,8 +181,8 @@ public partial class TestData
{ {
Format = ImageFormat.Png, Format = ImageFormat.Png,
Source = "tileset.png", Source = "tileset.png",
Width = fileExt == "tmx" ? 256u : 0, // Currently, json format does not Width = fileExt == "tmx" ? 256 : 0, // Currently, json format does not
Height = fileExt == "tmx" ? 96u : 0 // include image dimensions in image layer https://github.com/mapeditor/tiled/issues/4028 Height = fileExt == "tmx" ? 96 : 0 // include image dimensions in image layer https://github.com/mapeditor/tiled/issues/4028
}, },
RepeatX = true RepeatX = true
}, },

View file

@ -15,7 +15,7 @@ public partial class TestData
ParallaxOriginY = 0, ParallaxOriginY = 0,
RenderOrder = RenderOrder.RightDown, RenderOrder = RenderOrder.RightDown,
CompressionLevel = -1, CompressionLevel = -1,
BackgroundColor = new Color { R = 0, G = 0, B = 0, A = 0 }, BackgroundColor = new TiledColor { R = 0, G = 0, B = 0, A = 0 },
Version = "1.10", Version = "1.10",
TiledVersion = "1.11.0", TiledVersion = "1.11.0",
NextLayerID = 2, NextLayerID = 2,

View file

@ -15,7 +15,7 @@ public partial class TestData
ParallaxOriginY = 0, ParallaxOriginY = 0,
RenderOrder = RenderOrder.RightDown, RenderOrder = RenderOrder.RightDown,
CompressionLevel = -1, CompressionLevel = -1,
BackgroundColor = new Color { R = 0, G = 0, B = 0, A = 0 }, BackgroundColor = new TiledColor { R = 0, G = 0, B = 0, A = 0 },
Version = "1.10", Version = "1.10",
TiledVersion = "1.11.0", TiledVersion = "1.11.0",
NextLayerID = 2, NextLayerID = 2,

View file

@ -17,7 +17,7 @@ public partial class TestData
ParallaxOriginY = 0, ParallaxOriginY = 0,
RenderOrder = RenderOrder.RightDown, RenderOrder = RenderOrder.RightDown,
CompressionLevel = -1, CompressionLevel = -1,
BackgroundColor = Color.Parse("#00ff00", CultureInfo.InvariantCulture), BackgroundColor = TiledColor.Parse("#00ff00", CultureInfo.InvariantCulture),
Version = "1.10", Version = "1.10",
TiledVersion = "1.11.0", TiledVersion = "1.11.0",
NextLayerID = 2, NextLayerID = 2,
@ -52,13 +52,13 @@ public partial class TestData
Properties = Properties =
[ [
new BoolProperty { Name = "boolprop", Value = true }, new BoolProperty { Name = "boolprop", Value = true },
new ColorProperty { Name = "colorprop", Value = Color.Parse("#ff55ffff", CultureInfo.InvariantCulture) }, new ColorProperty { Name = "colorprop", Value = TiledColor.Parse("#ff55ffff", CultureInfo.InvariantCulture) },
new FileProperty { Name = "fileprop", Value = "file.txt" }, new FileProperty { Name = "fileprop", Value = "file.txt" },
new FloatProperty { Name = "floatprop", Value = 4.2f }, new FloatProperty { Name = "floatprop", Value = 4.2f },
new IntProperty { Name = "intprop", Value = 8 }, new IntProperty { Name = "intprop", Value = 8 },
new ObjectProperty { Name = "objectprop", Value = 5 }, new ObjectProperty { Name = "objectprop", Value = 5 },
new StringProperty { Name = "stringprop", Value = "This is a string, hello world!" }, new StringProperty { Name = "stringprop", Value = "This is a string, hello world!" },
new ColorProperty { Name = "unsetcolorprop", Value = Optional<Color>.Empty } new ColorProperty { Name = "unsetcolorprop", Value = Optional<TiledColor>.Empty }
] ]
}; };
} }

View file

@ -17,7 +17,7 @@ public partial class TestData
ParallaxOriginY = 0, ParallaxOriginY = 0,
RenderOrder = RenderOrder.RightDown, RenderOrder = RenderOrder.RightDown,
CompressionLevel = -1, CompressionLevel = -1,
BackgroundColor = Color.Parse("#00000000", CultureInfo.InvariantCulture), BackgroundColor = TiledColor.Parse("#00000000", CultureInfo.InvariantCulture),
Version = "1.10", Version = "1.10",
TiledVersion = "1.11.0", TiledVersion = "1.11.0",
NextLayerID = 2, NextLayerID = 2,

View file

@ -17,7 +17,7 @@ public partial class TestData
ParallaxOriginY = 0, ParallaxOriginY = 0,
RenderOrder = RenderOrder.RightDown, RenderOrder = RenderOrder.RightDown,
CompressionLevel = -1, CompressionLevel = -1,
BackgroundColor = Color.Parse("#00000000", CultureInfo.InvariantCulture), BackgroundColor = TiledColor.Parse("#00000000", CultureInfo.InvariantCulture),
Version = "1.10", Version = "1.10",
TiledVersion = "1.11.0", TiledVersion = "1.11.0",
NextLayerID = 2, NextLayerID = 2,
@ -56,7 +56,7 @@ public partial class TestData
PropertyType = "CustomClass", PropertyType = "CustomClass",
Value = [ Value = [
new BoolProperty { Name = "boolinclass", Value = true }, new BoolProperty { Name = "boolinclass", Value = true },
new ColorProperty { Name = "colorinclass", Value = Color.Parse("#000000ff", CultureInfo.InvariantCulture) }, new ColorProperty { Name = "colorinclass", Value = TiledColor.Parse("#000000ff", CultureInfo.InvariantCulture) },
new FileProperty { Name = "fileinclass", Value = "" }, new FileProperty { Name = "fileinclass", Value = "" },
new FloatProperty { Name = "floatinclass", Value = 13.37f }, new FloatProperty { Name = "floatinclass", Value = 13.37f },
new IntProperty { Name = "intinclass", Value = 0 }, new IntProperty { Name = "intinclass", Value = 0 },
@ -106,7 +106,7 @@ public partial class TestData
new ColorProperty new ColorProperty
{ {
Name = "colorinclass", Name = "colorinclass",
Value = Color.Parse("#000000ff", CultureInfo.InvariantCulture) Value = TiledColor.Parse("#000000ff", CultureInfo.InvariantCulture)
}, },
new FileProperty new FileProperty
{ {

View file

@ -17,7 +17,7 @@ public partial class TestData
ParallaxOriginY = 0, ParallaxOriginY = 0,
RenderOrder = RenderOrder.RightDown, RenderOrder = RenderOrder.RightDown,
CompressionLevel = -1, CompressionLevel = -1,
BackgroundColor = Color.Parse("#00000000", CultureInfo.InvariantCulture), BackgroundColor = TiledColor.Parse("#00000000", CultureInfo.InvariantCulture),
Version = "1.10", Version = "1.10",
TiledVersion = "1.11.0", TiledVersion = "1.11.0",
NextLayerID = 2, NextLayerID = 2,
@ -61,7 +61,7 @@ public partial class TestData
PropertyType = "CustomClass", PropertyType = "CustomClass",
Value = [ Value = [
new BoolProperty { Name = "boolinclass", Value = false }, new BoolProperty { Name = "boolinclass", Value = false },
new ColorProperty { Name = "colorinclass", Value = Color.Parse("#000000ff", CultureInfo.InvariantCulture) }, new ColorProperty { Name = "colorinclass", Value = TiledColor.Parse("#000000ff", CultureInfo.InvariantCulture) },
new FileProperty { Name = "fileinclass", Value = "" }, new FileProperty { Name = "fileinclass", Value = "" },
new FloatProperty { Name = "floatinclass", Value = 0f }, new FloatProperty { Name = "floatinclass", Value = 0f },
new IntProperty { Name = "intinclass", Value = 0 }, new IntProperty { Name = "intinclass", Value = 0 },
@ -82,7 +82,7 @@ public partial class TestData
PropertyType = "CustomClass", PropertyType = "CustomClass",
Value = [ Value = [
new BoolProperty { Name = "boolinclass", Value = true }, new BoolProperty { Name = "boolinclass", Value = true },
new ColorProperty { Name = "colorinclass", Value = Color.Parse("#000000ff", CultureInfo.InvariantCulture) }, new ColorProperty { Name = "colorinclass", Value = TiledColor.Parse("#000000ff", CultureInfo.InvariantCulture) },
new FileProperty { Name = "fileinclass", Value = "" }, new FileProperty { Name = "fileinclass", Value = "" },
new FloatProperty { Name = "floatinclass", Value = 13.37f }, new FloatProperty { Name = "floatinclass", Value = 13.37f },
new IntProperty { Name = "intinclass", Value = 0 }, new IntProperty { Name = "intinclass", Value = 0 },
@ -109,7 +109,7 @@ public partial class TestData
new ColorProperty new ColorProperty
{ {
Name = "colorinclass", Name = "colorinclass",
Value = Color.Parse("#000000ff", CultureInfo.InvariantCulture) Value = TiledColor.Parse("#000000ff", CultureInfo.InvariantCulture)
}, },
new FileProperty new FileProperty
{ {

View file

@ -17,7 +17,7 @@ public partial class TestData
ParallaxOriginY = 0, ParallaxOriginY = 0,
RenderOrder = RenderOrder.RightDown, RenderOrder = RenderOrder.RightDown,
CompressionLevel = -1, CompressionLevel = -1,
BackgroundColor = Color.Parse("#00000000", CultureInfo.InvariantCulture), BackgroundColor = TiledColor.Parse("#00000000", CultureInfo.InvariantCulture),
Version = "1.10", Version = "1.10",
TiledVersion = "1.11.0", TiledVersion = "1.11.0",
NextLayerID = 2, NextLayerID = 2,

View file

@ -17,7 +17,7 @@ public partial class TestData
ParallaxOriginY = 0, ParallaxOriginY = 0,
RenderOrder = RenderOrder.RightDown, RenderOrder = RenderOrder.RightDown,
CompressionLevel = -1, CompressionLevel = -1,
BackgroundColor = Color.Parse("#00000000", CultureInfo.InvariantCulture), BackgroundColor = TiledColor.Parse("#00000000", CultureInfo.InvariantCulture),
Version = "1.10", Version = "1.10",
TiledVersion = "1.11.0", TiledVersion = "1.11.0",
NextLayerID = 2, NextLayerID = 2,

View file

@ -17,7 +17,7 @@ public partial class TestData
ParallaxOriginY = 0, ParallaxOriginY = 0,
RenderOrder = RenderOrder.RightDown, RenderOrder = RenderOrder.RightDown,
CompressionLevel = -1, CompressionLevel = -1,
BackgroundColor = Color.Parse("#00000000", CultureInfo.InvariantCulture), BackgroundColor = TiledColor.Parse("#00000000", CultureInfo.InvariantCulture),
Version = "1.10", Version = "1.10",
TiledVersion = "1.11.0", TiledVersion = "1.11.0",
NextLayerID = 3, NextLayerID = 3,

View file

@ -17,9 +17,9 @@ public partial class TestData
ParallaxOriginY = 0, ParallaxOriginY = 0,
RenderOrder = RenderOrder.RightDown, RenderOrder = RenderOrder.RightDown,
CompressionLevel = -1, CompressionLevel = -1,
BackgroundColor = new Color { R = 0, G = 0, B = 0, A = 0 }, BackgroundColor = new TiledColor { R = 0, G = 0, B = 0, A = 0 },
Version = "1.10", Version = "1.10",
TiledVersion = "1.11.0", TiledVersion = "1.11.2",
NextLayerID = 8, NextLayerID = 8,
NextObjectID = 7, NextObjectID = 7,
Tilesets = [ Tilesets = [
@ -172,8 +172,8 @@ public partial class TestData
{ {
Format = ImageFormat.Png, Format = ImageFormat.Png,
Source = "tileset.png", Source = "tileset.png",
Width = fileExt == "tmx" ? 256u : 0, // Currently, json format does not Width = 256,
Height = fileExt == "tmx" ? 96u : 0 // include image dimensions in image layer https://github.com/mapeditor/tiled/issues/4028 Height = 96
}, },
RepeatX = true RepeatX = true
}, },

View file

@ -114,6 +114,8 @@
{ {
"id":4, "id":4,
"image":"tileset.png", "image":"tileset.png",
"imageheight":96,
"imagewidth":256,
"name":"ImageLayer", "name":"ImageLayer",
"opacity":1, "opacity":1,
"repeatx":true, "repeatx":true,
@ -149,7 +151,7 @@
"nextobjectid":7, "nextobjectid":7,
"orientation":"orthogonal", "orientation":"orthogonal",
"renderorder":"right-down", "renderorder":"right-down",
"tiledversion":"1.11.0", "tiledversion":"1.11.2",
"tileheight":32, "tileheight":32,
"tilesets":[ "tilesets":[
{ {

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<map version="1.10" tiledversion="1.11.0" orientation="orthogonal" renderorder="right-down" width="5" height="5" tilewidth="32" tileheight="32" infinite="0" nextlayerid="8" nextobjectid="7"> <map version="1.10" tiledversion="1.11.2" orientation="orthogonal" renderorder="right-down" width="5" height="5" tilewidth="32" tileheight="32" infinite="0" nextlayerid="8" nextobjectid="7">
<tileset firstgid="1" source="tileset.tsx"/> <tileset firstgid="1" source="tileset.tsx"/>
<group id="2" name="Root"> <group id="2" name="Root">
<objectgroup id="3" name="Objects"> <objectgroup id="3" name="Objects">

View file

@ -17,7 +17,7 @@ public partial class TestData
ParallaxOriginY = 0, ParallaxOriginY = 0,
RenderOrder = RenderOrder.RightDown, RenderOrder = RenderOrder.RightDown,
CompressionLevel = -1, CompressionLevel = -1,
BackgroundColor = Color.Parse("#00ff00", CultureInfo.InvariantCulture), BackgroundColor = TiledColor.Parse("#00ff00", CultureInfo.InvariantCulture),
Version = "1.10", Version = "1.10",
TiledVersion = "1.11.0", TiledVersion = "1.11.0",
NextLayerID = 2, NextLayerID = 2,
@ -52,7 +52,7 @@ public partial class TestData
Properties = Properties =
[ [
new BoolProperty { Name = "boolprop", Value = true }, new BoolProperty { Name = "boolprop", Value = true },
new ColorProperty { Name = "colorprop", Value = Color.Parse("#ff55ffff", CultureInfo.InvariantCulture) }, new ColorProperty { Name = "colorprop", Value = TiledColor.Parse("#ff55ffff", CultureInfo.InvariantCulture) },
new FileProperty { Name = "fileprop", Value = "file.txt" }, new FileProperty { Name = "fileprop", Value = "file.txt" },
new FloatProperty { Name = "floatprop", Value = 4.2f }, new FloatProperty { Name = "floatprop", Value = 4.2f },
new IntProperty { Name = "intprop", Value = 8 }, new IntProperty { Name = "intprop", Value = 8 },

View file

@ -80,7 +80,7 @@ public class HasPropertiesBaseTests
private sealed class MapTo private sealed class MapTo
{ {
public bool MapToBool { get; set; } = false; public bool MapToBool { get; set; } = false;
public Color MapToColor { get; set; } = Color.Parse("#00000000", CultureInfo.InvariantCulture); public TiledColor MapToColor { get; set; } = TiledColor.Parse("#00000000", CultureInfo.InvariantCulture);
public float MapToFloat { get; set; } = 0.0f; public float MapToFloat { get; set; } = 0.0f;
public string MapToFile { get; set; } = ""; public string MapToFile { get; set; } = "";
public int MapToInt { get; set; } = 0; public int MapToInt { get; set; } = 0;
@ -130,7 +130,7 @@ public class HasPropertiesBaseTests
PropertyType = "MapTo", PropertyType = "MapTo",
Value = [ Value = [
new BoolProperty { Name = "MapToBool", Value = true }, new BoolProperty { Name = "MapToBool", Value = true },
new ColorProperty { Name = "MapToColor", Value = Color.Parse("#FF0000FF", CultureInfo.InvariantCulture) }, new ColorProperty { Name = "MapToColor", Value = TiledColor.Parse("#FF0000FF", CultureInfo.InvariantCulture) },
new FloatProperty { Name = "MapToFloat", Value = 1.0f }, new FloatProperty { Name = "MapToFloat", Value = 1.0f },
new StringProperty { Name = "MapToFile", Value = "Test" }, new StringProperty { Name = "MapToFile", Value = "Test" },
new IntProperty { Name = "MapToInt", Value = 1 }, new IntProperty { Name = "MapToInt", Value = 1 },
@ -146,7 +146,7 @@ public class HasPropertiesBaseTests
// Assert // Assert
Assert.True(mappedProperty.MapToBool); Assert.True(mappedProperty.MapToBool);
Assert.Equal(Color.Parse("#FF0000FF", CultureInfo.InvariantCulture), mappedProperty.MapToColor); Assert.Equal(TiledColor.Parse("#FF0000FF", CultureInfo.InvariantCulture), mappedProperty.MapToColor);
Assert.Equal(1.0f, mappedProperty.MapToFloat); Assert.Equal(1.0f, mappedProperty.MapToFloat);
Assert.Equal("Test", mappedProperty.MapToFile); Assert.Equal("Test", mappedProperty.MapToFile);
Assert.Equal(1, mappedProperty.MapToInt); Assert.Equal(1, mappedProperty.MapToInt);
@ -175,7 +175,7 @@ public class HasPropertiesBaseTests
PropertyType = "MapTo", PropertyType = "MapTo",
Value = [ Value = [
new BoolProperty { Name = "MapToBool", Value = true }, new BoolProperty { Name = "MapToBool", Value = true },
new ColorProperty { Name = "MapToColor", Value = Color.Parse("#FF0000FF", CultureInfo.InvariantCulture) }, new ColorProperty { Name = "MapToColor", Value = TiledColor.Parse("#FF0000FF", CultureInfo.InvariantCulture) },
new FloatProperty { Name = "MapToFloat", Value = 1.0f }, new FloatProperty { Name = "MapToFloat", Value = 1.0f },
new StringProperty { Name = "MapToFile", Value = "Test" }, new StringProperty { Name = "MapToFile", Value = "Test" },
new IntProperty { Name = "MapToInt", Value = 1 }, new IntProperty { Name = "MapToInt", Value = 1 },
@ -194,7 +194,7 @@ public class HasPropertiesBaseTests
// Assert // Assert
Assert.Equal("Test", mappedProperty.NestedMapToString); Assert.Equal("Test", mappedProperty.NestedMapToString);
Assert.True(mappedProperty.MapToInNested.MapToBool); Assert.True(mappedProperty.MapToInNested.MapToBool);
Assert.Equal(Color.Parse("#FF0000FF", CultureInfo.InvariantCulture), mappedProperty.MapToInNested.MapToColor); Assert.Equal(TiledColor.Parse("#FF0000FF", CultureInfo.InvariantCulture), mappedProperty.MapToInNested.MapToColor);
Assert.Equal(1.0f, mappedProperty.MapToInNested.MapToFloat); Assert.Equal(1.0f, mappedProperty.MapToInNested.MapToFloat);
Assert.Equal("Test", mappedProperty.MapToInNested.MapToFile); Assert.Equal("Test", mappedProperty.MapToInNested.MapToFile);
Assert.Equal(1, mappedProperty.MapToInNested.MapToInt); Assert.Equal(1, mappedProperty.MapToInNested.MapToInt);
@ -276,7 +276,7 @@ public class HasPropertiesBaseTests
// Arrange // Arrange
List<IProperty> props = [ List<IProperty> props = [
new BoolProperty { Name = "MapToBool", Value = true }, new BoolProperty { Name = "MapToBool", Value = true },
new ColorProperty { Name = "MapToColor", Value = Color.Parse("#FF0000FF", CultureInfo.InvariantCulture) }, new ColorProperty { Name = "MapToColor", Value = TiledColor.Parse("#FF0000FF", CultureInfo.InvariantCulture) },
new FloatProperty { Name = "MapToFloat", Value = 1.0f }, new FloatProperty { Name = "MapToFloat", Value = 1.0f },
new StringProperty { Name = "MapToFile", Value = "Test" }, new StringProperty { Name = "MapToFile", Value = "Test" },
new IntProperty { Name = "MapToInt", Value = 1 }, new IntProperty { Name = "MapToInt", Value = 1 },
@ -290,7 +290,7 @@ public class HasPropertiesBaseTests
// Assert // Assert
Assert.True(mappedProperty.MapToBool); Assert.True(mappedProperty.MapToBool);
Assert.Equal(Color.Parse("#FF0000FF", CultureInfo.InvariantCulture), mappedProperty.MapToColor); Assert.Equal(TiledColor.Parse("#FF0000FF", CultureInfo.InvariantCulture), mappedProperty.MapToColor);
Assert.Equal(1.0f, mappedProperty.MapToFloat); Assert.Equal(1.0f, mappedProperty.MapToFloat);
Assert.Equal("Test", mappedProperty.MapToFile); Assert.Equal("Test", mappedProperty.MapToFile);
Assert.Equal(1, mappedProperty.MapToInt); Assert.Equal(1, mappedProperty.MapToInt);

View file

@ -19,6 +19,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "DotTiled.Examples", "DotTil
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DotTiled.Example.Raylib", "DotTiled.Examples\DotTiled.Example.Raylib\DotTiled.Example.Raylib.csproj", "{53585FB8-6E94-46F0-87E2-9692874E1714}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DotTiled.Example.Raylib", "DotTiled.Examples\DotTiled.Example.Raylib\DotTiled.Example.Raylib.csproj", "{53585FB8-6E94-46F0-87E2-9692874E1714}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DotTiled.Example.MonoGame", "DotTiled.Examples\DotTiled.Example.MonoGame\DotTiled.Example.MonoGame.csproj", "{F074756C-F84C-4F50-AE42-01017CD68AF7}"
EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU Debug|Any CPU = Debug|Any CPU
@ -52,10 +54,15 @@ Global
{53585FB8-6E94-46F0-87E2-9692874E1714}.Debug|Any CPU.Build.0 = Debug|Any CPU {53585FB8-6E94-46F0-87E2-9692874E1714}.Debug|Any CPU.Build.0 = Debug|Any CPU
{53585FB8-6E94-46F0-87E2-9692874E1714}.Release|Any CPU.ActiveCfg = Release|Any CPU {53585FB8-6E94-46F0-87E2-9692874E1714}.Release|Any CPU.ActiveCfg = Release|Any CPU
{53585FB8-6E94-46F0-87E2-9692874E1714}.Release|Any CPU.Build.0 = Release|Any CPU {53585FB8-6E94-46F0-87E2-9692874E1714}.Release|Any CPU.Build.0 = Release|Any CPU
{F074756C-F84C-4F50-AE42-01017CD68AF7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F074756C-F84C-4F50-AE42-01017CD68AF7}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F074756C-F84C-4F50-AE42-01017CD68AF7}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F074756C-F84C-4F50-AE42-01017CD68AF7}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection EndGlobalSection
GlobalSection(NestedProjects) = preSolution GlobalSection(NestedProjects) = preSolution
{F9892295-6C2C-4ABD-9D6F-2AC81D2C6E67} = {8C54542E-3C2C-486C-9BEF-4C510391AFDA} {F9892295-6C2C-4ABD-9D6F-2AC81D2C6E67} = {8C54542E-3C2C-486C-9BEF-4C510391AFDA}
{7541A9B3-43A5-45A7-939E-6F542319D990} = {8C54542E-3C2C-486C-9BEF-4C510391AFDA} {7541A9B3-43A5-45A7-939E-6F542319D990} = {8C54542E-3C2C-486C-9BEF-4C510391AFDA}
{53585FB8-6E94-46F0-87E2-9692874E1714} = {F3D6E648-AF8F-4EC9-A810-8C348DBB9924} {53585FB8-6E94-46F0-87E2-9692874E1714} = {F3D6E648-AF8F-4EC9-A810-8C348DBB9924}
{F074756C-F84C-4F50-AE42-01017CD68AF7} = {F3D6E648-AF8F-4EC9-A810-8C348DBB9924}
EndGlobalSection EndGlobalSection
EndGlobal EndGlobal

View file

@ -18,7 +18,7 @@
<GenerateDocumentationFile>true</GenerateDocumentationFile> <GenerateDocumentationFile>true</GenerateDocumentationFile>
<Copyright>Copyright © 2024 dcronqvist</Copyright> <Copyright>Copyright © 2024 dcronqvist</Copyright>
<PackageLicenseFile>LICENSE</PackageLicenseFile> <PackageLicenseFile>LICENSE</PackageLicenseFile>
<Version>0.3.0</Version> <Version>0.4.0</Version>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>

View file

@ -37,7 +37,7 @@ public abstract class BaseLayer : HasPropertiesBase
/// <summary> /// <summary>
/// A tint color that is multiplied with any tiles drawn by this layer. /// A tint color that is multiplied with any tiles drawn by this layer.
/// </summary> /// </summary>
public Optional<Color> TintColor { get; set; } = Optional<Color>.Empty; public Optional<TiledColor> TintColor { get; set; } = Optional<TiledColor>.Empty;
/// <summary> /// <summary>
/// Horizontal offset for this layer in pixels. /// Horizontal offset for this layer in pixels.

View file

@ -90,12 +90,12 @@ public class Chunk
/// <summary> /// <summary>
/// The width of the chunk in tiles. /// The width of the chunk in tiles.
/// </summary> /// </summary>
public required uint Width { get; set; } public required int Width { get; set; }
/// <summary> /// <summary>
/// The height of the chunk in tiles. /// The height of the chunk in tiles.
/// </summary> /// </summary>
public required uint Height { get; set; } public required int Height { get; set; }
/// <summary> /// <summary>
/// The parsed chunk data, as a list of tile GIDs. /// The parsed chunk data, as a list of tile GIDs.

View file

@ -8,12 +8,12 @@ public class ImageLayer : BaseLayer
/// <summary> /// <summary>
/// The X position of the image layer in pixels. /// The X position of the image layer in pixels.
/// </summary> /// </summary>
public uint X { get; set; } = 0; public int X { get; set; } = 0;
/// <summary> /// <summary>
/// The Y position of the image layer in pixels. /// The Y position of the image layer in pixels.
/// </summary> /// </summary>
public Optional<uint> Y { get; set; } = 0; public int Y { get; set; } = 0;
/// <summary> /// <summary>
/// Whether the image drawn by this layer is repeated along the X axis. /// Whether the image drawn by this layer is repeated along the X axis.

View file

@ -26,27 +26,27 @@ public class ObjectLayer : BaseLayer
/// <summary> /// <summary>
/// The X coordinate of the object layer in tiles. /// The X coordinate of the object layer in tiles.
/// </summary> /// </summary>
public uint X { get; set; } = 0; public int X { get; set; } = 0;
/// <summary> /// <summary>
/// The Y coordinate of the object layer in tiles. /// The Y coordinate of the object layer in tiles.
/// </summary> /// </summary>
public uint Y { get; set; } = 0; public int Y { get; set; } = 0;
/// <summary> /// <summary>
/// The width of the object layer in tiles. Meaningless. /// The width of the object layer in tiles. Meaningless.
/// </summary> /// </summary>
public uint Width { get; set; } = 0; public int Width { get; set; } = 0;
/// <summary> /// <summary>
/// The height of the object layer in tiles. Meaningless. /// The height of the object layer in tiles. Meaningless.
/// </summary> /// </summary>
public uint Height { get; set; } = 0; public int Height { get; set; } = 0;
/// <summary> /// <summary>
/// A color that is multiplied with any tile objects drawn by this layer. /// A color that is multiplied with any tile objects drawn by this layer.
/// </summary> /// </summary>
public Optional<Color> Color { get; set; } = Optional<Color>.Empty; public Optional<TiledColor> Color { get; set; } = Optional<TiledColor>.Empty;
/// <summary> /// <summary>
/// Whether the objects are drawn according to the order of appearance (<see cref="DrawOrder.Index"/>) or sorted by their Y coordinate (<see cref="DrawOrder.TopDown"/>). /// Whether the objects are drawn according to the order of appearance (<see cref="DrawOrder.Index"/>) or sorted by their Y coordinate (<see cref="DrawOrder.TopDown"/>).

View file

@ -72,7 +72,7 @@ public class TextObject : Object
/// <summary> /// <summary>
/// The color of the text. /// The color of the text.
/// </summary> /// </summary>
public Color Color { get; set; } = Color.Parse("#000000", CultureInfo.InvariantCulture); public TiledColor Color { get; set; } = TiledColor.Parse("#000000", CultureInfo.InvariantCulture);
/// <summary> /// <summary>
/// Whether the text is bold. /// Whether the text is bold.

View file

@ -10,22 +10,22 @@ public class TileLayer : BaseLayer
/// <summary> /// <summary>
/// The X coordinate of the layer in tiles. /// The X coordinate of the layer in tiles.
/// </summary> /// </summary>
public uint X { get; set; } = 0; public int X { get; set; } = 0;
/// <summary> /// <summary>
/// The Y coordinate of the layer in tiles. /// The Y coordinate of the layer in tiles.
/// </summary> /// </summary>
public uint Y { get; set; } = 0; public int Y { get; set; } = 0;
/// <summary> /// <summary>
/// The width of the layer in tiles. Always the same as the map width for fixed-size maps. /// The width of the layer in tiles. Always the same as the map width for fixed-size maps.
/// </summary> /// </summary>
public required uint Width { get; set; } public required int Width { get; set; }
/// <summary> /// <summary>
/// The height of the layer in tiles. Always the same as the map height for fixed-size maps. /// The height of the layer in tiles. Always the same as the map height for fixed-size maps.
/// </summary> /// </summary>
public required uint Height { get; set; } public required int Height { get; set; }
/// <summary> /// <summary>
/// The tile layer data. /// The tile layer data.

View file

@ -127,27 +127,27 @@ public class Map : HasPropertiesBase
/// <summary> /// <summary>
/// The width of the map in tiles. /// The width of the map in tiles.
/// </summary> /// </summary>
public required uint Width { get; set; } public required int Width { get; set; }
/// <summary> /// <summary>
/// The height of the map in tiles. /// The height of the map in tiles.
/// </summary> /// </summary>
public required uint Height { get; set; } public required int Height { get; set; }
/// <summary> /// <summary>
/// The width of a tile. /// The width of a tile.
/// </summary> /// </summary>
public required uint TileWidth { get; set; } public required int TileWidth { get; set; }
/// <summary> /// <summary>
/// The height of a tile. /// The height of a tile.
/// </summary> /// </summary>
public required uint TileHeight { get; set; } public required int TileHeight { get; set; }
/// <summary> /// <summary>
/// Only for hexagonal maps. Determines the width or height (depending on the staggered axis) of the tile's edge, in pixels. /// Only for hexagonal maps. Determines the width or height (depending on the staggered axis) of the tile's edge, in pixels.
/// </summary> /// </summary>
public Optional<uint> HexSideLength { get; set; } = Optional<uint>.Empty; public Optional<int> HexSideLength { get; set; } = Optional<int>.Empty;
/// <summary> /// <summary>
/// For staggered and hexagonal maps, determines which axis (X or Y) is staggered. /// For staggered and hexagonal maps, determines which axis (X or Y) is staggered.
@ -172,7 +172,7 @@ public class Map : HasPropertiesBase
/// <summary> /// <summary>
/// The background color of the map. /// The background color of the map.
/// </summary> /// </summary>
public Color BackgroundColor { get; set; } = Color.Parse("#00000000", CultureInfo.InvariantCulture); public TiledColor BackgroundColor { get; set; } = TiledColor.Parse("#00000000", CultureInfo.InvariantCulture);
/// <summary> /// <summary>
/// Stores the next available ID for new layers. This number is used to prevent reuse of the same ID after layers have been removed. /// Stores the next available ID for new layers. This number is used to prevent reuse of the same ID after layers have been removed.

View file

@ -3,7 +3,7 @@ namespace DotTiled;
/// <summary> /// <summary>
/// Represents a color property. /// Represents a color property.
/// </summary> /// </summary>
public class ColorProperty : IProperty<Optional<Color>> public class ColorProperty : IProperty<Optional<TiledColor>>
{ {
/// <inheritdoc/> /// <inheritdoc/>
public required string Name { get; set; } public required string Name { get; set; }
@ -14,7 +14,7 @@ public class ColorProperty : IProperty<Optional<Color>>
/// <summary> /// <summary>
/// The color value of the property. /// The color value of the property.
/// </summary> /// </summary>
public required Optional<Color> Value { get; set; } public required Optional<TiledColor> Value { get; set; }
/// <inheritdoc/> /// <inheritdoc/>
public IProperty Clone() => new ColorProperty public IProperty Clone() => new ColorProperty

View file

@ -78,7 +78,7 @@ public class CustomClassDefinition : HasPropertiesBase, ICustomTypeDefinition
/// <summary> /// <summary>
/// The color of the custom class inside the Tiled editor. /// The color of the custom class inside the Tiled editor.
/// </summary> /// </summary>
public Color Color { get; set; } public TiledColor Color { get; set; }
/// <summary> /// <summary>
/// Whether the custom class should be drawn with a fill color. /// Whether the custom class should be drawn with a fill color.
@ -155,8 +155,8 @@ public class CustomClassDefinition : HasPropertiesBase, ICustomTypeDefinition
{ {
case Type t when t == typeof(bool): case Type t when t == typeof(bool):
return new BoolProperty { Name = propertyInfo.Name, Value = (bool)propertyInfo.GetValue(instance) }; return new BoolProperty { Name = propertyInfo.Name, Value = (bool)propertyInfo.GetValue(instance) };
case Type t when t == typeof(Color): case Type t when t == typeof(TiledColor):
return new ColorProperty { Name = propertyInfo.Name, Value = (Color)propertyInfo.GetValue(instance) }; return new ColorProperty { Name = propertyInfo.Name, Value = (TiledColor)propertyInfo.GetValue(instance) };
case Type t when t == typeof(float): case Type t when t == typeof(float):
return new FloatProperty { Name = propertyInfo.Name, Value = (float)propertyInfo.GetValue(instance) }; return new FloatProperty { Name = propertyInfo.Name, Value = (float)propertyInfo.GetValue(instance) };
case Type t when t == typeof(string): case Type t when t == typeof(string):

View file

@ -7,7 +7,7 @@ namespace DotTiled;
/// <summary> /// <summary>
/// Represents a Tiled color. /// Represents a Tiled color.
/// </summary> /// </summary>
public class Color : IParsable<Color>, IEquatable<Color> public class TiledColor : IParsable<TiledColor>, IEquatable<TiledColor>
{ {
/// <summary> /// <summary>
/// The red component of the color. /// The red component of the color.
@ -30,31 +30,31 @@ public class Color : IParsable<Color>, IEquatable<Color>
public byte A { get; set; } = 255; public byte A { get; set; } = 255;
/// <summary> /// <summary>
/// Attempts to parse the specified string into a <see cref="Color"/>. Expects strings in the format <c>#RRGGBB</c> or <c>#AARRGGBB</c>. /// Attempts to parse the specified string into a <see cref="TiledColor"/>. Expects strings in the format <c>#RRGGBB</c> or <c>#AARRGGBB</c>.
/// The leading <c>#</c> is optional. /// The leading <c>#</c> is optional.
/// </summary> /// </summary>
/// <param name="s">A string value to parse into a <see cref="Color"/></param> /// <param name="s">A string value to parse into a <see cref="TiledColor"/></param>
/// <param name="provider">An object that supplies culture-specific information about the format of s.</param> /// <param name="provider">An object that supplies culture-specific information about the format of s.</param>
/// <returns>The parsed <see cref="Color"/></returns> /// <returns>The parsed <see cref="TiledColor"/></returns>
/// <exception cref="FormatException">Thrown in case the provided string <paramref name="s"/> is not in a valid format.</exception> /// <exception cref="FormatException">Thrown in case the provided string <paramref name="s"/> is not in a valid format.</exception>
public static Color Parse(string s, IFormatProvider provider) public static TiledColor Parse(string s, IFormatProvider provider)
{ {
_ = TryParse(s, provider, out var result); _ = TryParse(s, provider, out var result);
return result ?? throw new FormatException($"Invalid format for TiledColor: {s}"); return result ?? throw new FormatException($"Invalid format for TiledColor: {s}");
} }
/// <summary> /// <summary>
/// Attempts to parse the specified string into a <see cref="Color"/>. Expects strings in the format <c>#RRGGBB</c> or <c>#AARRGGBB</c>. /// Attempts to parse the specified string into a <see cref="TiledColor"/>. Expects strings in the format <c>#RRGGBB</c> or <c>#AARRGGBB</c>.
/// The leading <c>#</c> is optional. /// The leading <c>#</c> is optional.
/// </summary> /// </summary>
/// <param name="s">A string value to parse into a <see cref="Color"/></param> /// <param name="s">A string value to parse into a <see cref="TiledColor"/></param>
/// <param name="provider">An object that supplies culture-specific information about the format of s.</param> /// <param name="provider">An object that supplies culture-specific information about the format of s.</param>
/// <param name="result">When this method returns, contains the parsed <see cref="Color"/> or <c>null</c> on failure.</param> /// <param name="result">When this method returns, contains the parsed <see cref="TiledColor"/> or <c>null</c> on failure.</param>
/// <returns><c>true</c> if <paramref name="s"/> was successfully parsed; otherwise, <c>false</c>.</returns> /// <returns><c>true</c> if <paramref name="s"/> was successfully parsed; otherwise, <c>false</c>.</returns>
public static bool TryParse( public static bool TryParse(
[NotNullWhen(true)] string s, [NotNullWhen(true)] string s,
IFormatProvider provider, IFormatProvider provider,
[MaybeNullWhen(false)] out Color result) [MaybeNullWhen(false)] out TiledColor result)
{ {
if (s is not null && !s.StartsWith('#')) if (s is not null && !s.StartsWith('#'))
return TryParse($"#{s}", provider, out result); return TryParse($"#{s}", provider, out result);
@ -68,7 +68,7 @@ public class Color : IParsable<Color>, IEquatable<Color>
if (s.Length == 7) if (s.Length == 7)
{ {
result = new Color result = new TiledColor
{ {
R = byte.Parse(s[1..3], NumberStyles.HexNumber, provider), R = byte.Parse(s[1..3], NumberStyles.HexNumber, provider),
G = byte.Parse(s[3..5], NumberStyles.HexNumber, provider), G = byte.Parse(s[3..5], NumberStyles.HexNumber, provider),
@ -77,7 +77,7 @@ public class Color : IParsable<Color>, IEquatable<Color>
} }
else else
{ {
result = new Color result = new TiledColor
{ {
A = byte.Parse(s[1..3], NumberStyles.HexNumber, provider), A = byte.Parse(s[1..3], NumberStyles.HexNumber, provider),
R = byte.Parse(s[3..5], NumberStyles.HexNumber, provider), R = byte.Parse(s[3..5], NumberStyles.HexNumber, provider),
@ -90,7 +90,7 @@ public class Color : IParsable<Color>, IEquatable<Color>
} }
/// <inheritdoc/> /// <inheritdoc/>
public bool Equals(Color other) public bool Equals(TiledColor other)
{ {
if (other is null) if (other is null)
return false; return false;
@ -99,7 +99,7 @@ public class Color : IParsable<Color>, IEquatable<Color>
} }
/// <inheritdoc/> /// <inheritdoc/>
public override bool Equals(object obj) => obj is Color other && Equals(other); public override bool Equals(object obj) => obj is TiledColor other && Equals(other);
/// <inheritdoc/> /// <inheritdoc/>
public override int GetHashCode() => HashCode.Combine(R, G, B, A); public override int GetHashCode() => HashCode.Combine(R, G, B, A);

View file

@ -23,8 +23,8 @@ public abstract partial class TmjReaderBase
var x = element.GetRequiredProperty<int>("x"); var x = element.GetRequiredProperty<int>("x");
var y = element.GetRequiredProperty<int>("y"); var y = element.GetRequiredProperty<int>("y");
var width = element.GetRequiredProperty<uint>("width"); var width = element.GetRequiredProperty<int>("width");
var height = element.GetRequiredProperty<uint>("height"); var height = element.GetRequiredProperty<int>("height");
return new Chunk return new Chunk
{ {

View file

@ -12,7 +12,7 @@ public abstract partial class TmjReaderBase
var @class = element.GetOptionalProperty<string>("class").GetValueOr(""); var @class = element.GetOptionalProperty<string>("class").GetValueOr("");
var opacity = element.GetOptionalProperty<float>("opacity").GetValueOr(1.0f); var opacity = element.GetOptionalProperty<float>("opacity").GetValueOr(1.0f);
var visible = element.GetOptionalProperty<bool>("visible").GetValueOr(true); var visible = element.GetOptionalProperty<bool>("visible").GetValueOr(true);
var tintColor = element.GetOptionalPropertyParseable<Color>("tintcolor"); var tintColor = element.GetOptionalPropertyParseable<TiledColor>("tintcolor");
var offsetX = element.GetOptionalProperty<float>("offsetx").GetValueOr(0.0f); var offsetX = element.GetOptionalProperty<float>("offsetx").GetValueOr(0.0f);
var offsetY = element.GetOptionalProperty<float>("offsety").GetValueOr(0.0f); var offsetY = element.GetOptionalProperty<float>("offsety").GetValueOr(0.0f);
var parallaxX = element.GetOptionalProperty<float>("parallaxx").GetValueOr(1.0f); var parallaxX = element.GetOptionalProperty<float>("parallaxx").GetValueOr(1.0f);

View file

@ -11,7 +11,7 @@ public abstract partial class TmjReaderBase
var @class = element.GetOptionalProperty<string>("class").GetValueOr(""); var @class = element.GetOptionalProperty<string>("class").GetValueOr("");
var opacity = element.GetOptionalProperty<float>("opacity").GetValueOr(1.0f); var opacity = element.GetOptionalProperty<float>("opacity").GetValueOr(1.0f);
var visible = element.GetOptionalProperty<bool>("visible").GetValueOr(true); var visible = element.GetOptionalProperty<bool>("visible").GetValueOr(true);
var tintColor = element.GetOptionalPropertyParseable<Color>("tintcolor"); var tintColor = element.GetOptionalPropertyParseable<TiledColor>("tintcolor");
var offsetX = element.GetOptionalProperty<float>("offsetx").GetValueOr(0.0f); var offsetX = element.GetOptionalProperty<float>("offsetx").GetValueOr(0.0f);
var offsetY = element.GetOptionalProperty<float>("offsety").GetValueOr(0.0f); var offsetY = element.GetOptionalProperty<float>("offsety").GetValueOr(0.0f);
var parallaxX = element.GetOptionalProperty<float>("parallaxx").GetValueOr(1.0f); var parallaxX = element.GetOptionalProperty<float>("parallaxx").GetValueOr(1.0f);
@ -19,17 +19,19 @@ public abstract partial class TmjReaderBase
var properties = ResolveAndMergeProperties(@class, element.GetOptionalPropertyCustom("properties", ReadProperties).GetValueOr([])); var properties = ResolveAndMergeProperties(@class, element.GetOptionalPropertyCustom("properties", ReadProperties).GetValueOr([]));
var image = element.GetRequiredProperty<string>("image"); var image = element.GetRequiredProperty<string>("image");
var imageWidth = element.GetOptionalProperty<int>("imagewidth").GetValueOr(0);
var imageHeight = element.GetOptionalProperty<int>("imageheight").GetValueOr(0);
var repeatX = element.GetOptionalProperty<bool>("repeatx").GetValueOr(false); var repeatX = element.GetOptionalProperty<bool>("repeatx").GetValueOr(false);
var repeatY = element.GetOptionalProperty<bool>("repeaty").GetValueOr(false); var repeatY = element.GetOptionalProperty<bool>("repeaty").GetValueOr(false);
var transparentColor = element.GetOptionalPropertyParseable<Color>("transparentcolor"); var transparentColor = element.GetOptionalPropertyParseable<TiledColor>("transparentcolor");
var x = element.GetOptionalProperty<uint>("x").GetValueOr(0); var x = element.GetOptionalProperty<int>("x").GetValueOr(0);
var y = element.GetOptionalProperty<uint>("y").GetValueOr(0); var y = element.GetOptionalProperty<int>("y").GetValueOr(0);
var imgModel = new Image var imgModel = new Image
{ {
Format = Helpers.ParseImageFormatFromSource(image), Format = Helpers.ParseImageFormatFromSource(image),
Height = 0, Height = imageHeight,
Width = 0, Width = imageWidth,
Source = image, Source = image,
TransparentColor = transparentColor TransparentColor = transparentColor
}; };

View file

@ -28,11 +28,11 @@ public abstract partial class TmjReaderBase
_ => throw new JsonException($"Unknown render order '{s}'") _ => throw new JsonException($"Unknown render order '{s}'")
}).GetValueOr(RenderOrder.RightDown); }).GetValueOr(RenderOrder.RightDown);
var compressionLevel = element.GetOptionalProperty<int>("compressionlevel").GetValueOr(-1); var compressionLevel = element.GetOptionalProperty<int>("compressionlevel").GetValueOr(-1);
var width = element.GetRequiredProperty<uint>("width"); var width = element.GetRequiredProperty<int>("width");
var height = element.GetRequiredProperty<uint>("height"); var height = element.GetRequiredProperty<int>("height");
var tileWidth = element.GetRequiredProperty<uint>("tilewidth"); var tileWidth = element.GetRequiredProperty<int>("tilewidth");
var tileHeight = element.GetRequiredProperty<uint>("tileheight"); var tileHeight = element.GetRequiredProperty<int>("tileheight");
var hexSideLength = element.GetOptionalProperty<uint>("hexsidelength"); var hexSideLength = element.GetOptionalProperty<int>("hexsidelength");
var staggerAxis = element.GetOptionalPropertyParseable<StaggerAxis>("staggeraxis", s => s switch var staggerAxis = element.GetOptionalPropertyParseable<StaggerAxis>("staggeraxis", s => s switch
{ {
"x" => StaggerAxis.X, "x" => StaggerAxis.X,
@ -47,7 +47,7 @@ public abstract partial class TmjReaderBase
}); });
var parallaxOriginX = element.GetOptionalProperty<float>("parallaxoriginx").GetValueOr(0f); var parallaxOriginX = element.GetOptionalProperty<float>("parallaxoriginx").GetValueOr(0f);
var parallaxOriginY = element.GetOptionalProperty<float>("parallaxoriginy").GetValueOr(0f); var parallaxOriginY = element.GetOptionalProperty<float>("parallaxoriginy").GetValueOr(0f);
var backgroundColor = element.GetOptionalPropertyParseable<Color>("backgroundcolor").GetValueOr(Color.Parse("#00000000", CultureInfo.InvariantCulture)); var backgroundColor = element.GetOptionalPropertyParseable<TiledColor>("backgroundcolor").GetValueOr(TiledColor.Parse("#00000000", CultureInfo.InvariantCulture));
var nextLayerID = element.GetRequiredProperty<uint>("nextlayerid"); var nextLayerID = element.GetRequiredProperty<uint>("nextlayerid");
var nextObjectID = element.GetRequiredProperty<uint>("nextobjectid"); var nextObjectID = element.GetRequiredProperty<uint>("nextobjectid");
var infinite = element.GetOptionalProperty<bool>("infinite").GetValueOr(false); var infinite = element.GetOptionalProperty<bool>("infinite").GetValueOr(false);

View file

@ -15,18 +15,18 @@ public abstract partial class TmjReaderBase
var @class = element.GetOptionalProperty<string>("class").GetValueOr(""); var @class = element.GetOptionalProperty<string>("class").GetValueOr("");
var opacity = element.GetOptionalProperty<float>("opacity").GetValueOr(1.0f); var opacity = element.GetOptionalProperty<float>("opacity").GetValueOr(1.0f);
var visible = element.GetOptionalProperty<bool>("visible").GetValueOr(true); var visible = element.GetOptionalProperty<bool>("visible").GetValueOr(true);
var tintColor = element.GetOptionalPropertyParseable<Color>("tintcolor"); var tintColor = element.GetOptionalPropertyParseable<TiledColor>("tintcolor");
var offsetX = element.GetOptionalProperty<float>("offsetx").GetValueOr(0.0f); var offsetX = element.GetOptionalProperty<float>("offsetx").GetValueOr(0.0f);
var offsetY = element.GetOptionalProperty<float>("offsety").GetValueOr(0.0f); var offsetY = element.GetOptionalProperty<float>("offsety").GetValueOr(0.0f);
var parallaxX = element.GetOptionalProperty<float>("parallaxx").GetValueOr(1.0f); var parallaxX = element.GetOptionalProperty<float>("parallaxx").GetValueOr(1.0f);
var parallaxY = element.GetOptionalProperty<float>("parallaxy").GetValueOr(1.0f); var parallaxY = element.GetOptionalProperty<float>("parallaxy").GetValueOr(1.0f);
var properties = ResolveAndMergeProperties(@class, element.GetOptionalPropertyCustom("properties", ReadProperties).GetValueOr([])); var properties = ResolveAndMergeProperties(@class, element.GetOptionalPropertyCustom("properties", ReadProperties).GetValueOr([]));
var x = element.GetOptionalProperty<uint>("x").GetValueOr(0); var x = element.GetOptionalProperty<int>("x").GetValueOr(0);
var y = element.GetOptionalProperty<uint>("y").GetValueOr(0); var y = element.GetOptionalProperty<int>("y").GetValueOr(0);
var width = element.GetOptionalProperty<uint>("width").GetValueOr(0); var width = element.GetOptionalProperty<int>("width").GetValueOr(0);
var height = element.GetOptionalProperty<uint>("height").GetValueOr(0); var height = element.GetOptionalProperty<int>("height").GetValueOr(0);
var color = element.GetOptionalPropertyParseable<Color>("color"); var color = element.GetOptionalPropertyParseable<TiledColor>("color");
var drawOrder = element.GetOptionalPropertyParseable<DrawOrder>("draworder", s => s switch var drawOrder = element.GetOptionalPropertyParseable<DrawOrder>("draworder", s => s switch
{ {
"topdown" => DrawOrder.TopDown, "topdown" => DrawOrder.TopDown,
@ -255,7 +255,7 @@ public abstract partial class TmjReaderBase
internal static TextObject ReadText(JsonElement element) internal static TextObject ReadText(JsonElement element)
{ {
var bold = element.GetOptionalProperty<bool>("bold").GetValueOr(false); var bold = element.GetOptionalProperty<bool>("bold").GetValueOr(false);
var color = element.GetOptionalPropertyParseable<Color>("color").GetValueOr(Color.Parse("#00000000", CultureInfo.InvariantCulture)); var color = element.GetOptionalPropertyParseable<TiledColor>("color").GetValueOr(TiledColor.Parse("#00000000", CultureInfo.InvariantCulture));
var fontfamily = element.GetOptionalProperty<string>("fontfamily").GetValueOr("sans-serif"); var fontfamily = element.GetOptionalProperty<string>("fontfamily").GetValueOr("sans-serif");
var halign = element.GetOptionalPropertyParseable<TextHorizontalAlignment>("halign", s => s switch var halign = element.GetOptionalPropertyParseable<TextHorizontalAlignment>("halign", s => s switch
{ {

View file

@ -36,7 +36,7 @@ public abstract partial class TmjReaderBase
PropertyType.Int => new IntProperty { Name = name, Value = e.GetRequiredProperty<int>("value") }, PropertyType.Int => new IntProperty { Name = name, Value = e.GetRequiredProperty<int>("value") },
PropertyType.Float => new FloatProperty { Name = name, Value = e.GetRequiredProperty<float>("value") }, PropertyType.Float => new FloatProperty { Name = name, Value = e.GetRequiredProperty<float>("value") },
PropertyType.Bool => new BoolProperty { Name = name, Value = e.GetRequiredProperty<bool>("value") }, PropertyType.Bool => new BoolProperty { Name = name, Value = e.GetRequiredProperty<bool>("value") },
PropertyType.Color => new ColorProperty { Name = name, Value = e.GetRequiredPropertyParseable<Color>("value", s => s == "" ? default : Color.Parse(s, CultureInfo.InvariantCulture)) }, PropertyType.Color => new ColorProperty { Name = name, Value = e.GetRequiredPropertyParseable<TiledColor>("value", s => s == "" ? default : TiledColor.Parse(s, CultureInfo.InvariantCulture)) },
PropertyType.File => new FileProperty { Name = name, Value = e.GetRequiredProperty<string>("value") }, PropertyType.File => new FileProperty { Name = name, Value = e.GetRequiredProperty<string>("value") },
PropertyType.Object => new ObjectProperty { Name = name, Value = e.GetRequiredProperty<uint>("value") }, PropertyType.Object => new ObjectProperty { Name = name, Value = e.GetRequiredProperty<uint>("value") },
PropertyType.Class => throw new JsonException("Class property must have a property type"), PropertyType.Class => throw new JsonException("Class property must have a property type"),
@ -163,7 +163,7 @@ public abstract partial class TmjReaderBase
PropertyType.Int => new IntProperty { Name = prop.Name, Value = propElement.GetValueAs<int>() }, PropertyType.Int => new IntProperty { Name = prop.Name, Value = propElement.GetValueAs<int>() },
PropertyType.Float => new FloatProperty { Name = prop.Name, Value = propElement.GetValueAs<float>() }, PropertyType.Float => new FloatProperty { Name = prop.Name, Value = propElement.GetValueAs<float>() },
PropertyType.Bool => new BoolProperty { Name = prop.Name, Value = propElement.GetValueAs<bool>() }, PropertyType.Bool => new BoolProperty { Name = prop.Name, Value = propElement.GetValueAs<bool>() },
PropertyType.Color => new ColorProperty { Name = prop.Name, Value = Color.Parse(propElement.GetValueAs<string>(), CultureInfo.InvariantCulture) }, PropertyType.Color => new ColorProperty { Name = prop.Name, Value = TiledColor.Parse(propElement.GetValueAs<string>(), CultureInfo.InvariantCulture) },
PropertyType.File => new FileProperty { Name = prop.Name, Value = propElement.GetValueAs<string>() }, PropertyType.File => new FileProperty { Name = prop.Name, Value = propElement.GetValueAs<string>() },
PropertyType.Object => new ObjectProperty { Name = prop.Name, Value = propElement.GetValueAs<uint>() }, PropertyType.Object => new ObjectProperty { Name = prop.Name, Value = propElement.GetValueAs<uint>() },
PropertyType.Enum => ReadEnumProperty(propElement), PropertyType.Enum => ReadEnumProperty(propElement),

View file

@ -22,7 +22,7 @@ public abstract partial class TmjReaderBase
var chunks = element.GetOptionalPropertyCustom<Data>("chunks", e => ReadDataAsChunks(e, compression, encoding)); var chunks = element.GetOptionalPropertyCustom<Data>("chunks", e => ReadDataAsChunks(e, compression, encoding));
var @class = element.GetOptionalProperty<string>("class").GetValueOr(""); var @class = element.GetOptionalProperty<string>("class").GetValueOr("");
var data = element.GetOptionalPropertyCustom<Data>("data", e => ReadDataWithoutChunks(e, compression, encoding)); var data = element.GetOptionalPropertyCustom<Data>("data", e => ReadDataWithoutChunks(e, compression, encoding));
var height = element.GetRequiredProperty<uint>("height"); var height = element.GetRequiredProperty<int>("height");
var id = element.GetRequiredProperty<uint>("id"); var id = element.GetRequiredProperty<uint>("id");
var name = element.GetRequiredProperty<string>("name"); var name = element.GetRequiredProperty<string>("name");
var offsetX = element.GetOptionalProperty<float>("offsetx").GetValueOr(0.0f); var offsetX = element.GetOptionalProperty<float>("offsetx").GetValueOr(0.0f);
@ -35,12 +35,12 @@ public abstract partial class TmjReaderBase
var repeatY = element.GetOptionalProperty<bool>("repeaty").GetValueOr(false); var repeatY = element.GetOptionalProperty<bool>("repeaty").GetValueOr(false);
var startX = element.GetOptionalProperty<int>("startx").GetValueOr(0); var startX = element.GetOptionalProperty<int>("startx").GetValueOr(0);
var startY = element.GetOptionalProperty<int>("starty").GetValueOr(0); var startY = element.GetOptionalProperty<int>("starty").GetValueOr(0);
var tintColor = element.GetOptionalPropertyParseable<Color>("tintcolor"); var tintColor = element.GetOptionalPropertyParseable<TiledColor>("tintcolor");
var transparentColor = element.GetOptionalPropertyParseable<Color>("transparentcolor"); var transparentColor = element.GetOptionalPropertyParseable<TiledColor>("transparentcolor");
var visible = element.GetOptionalProperty<bool>("visible").GetValueOr(true); var visible = element.GetOptionalProperty<bool>("visible").GetValueOr(true);
var width = element.GetRequiredProperty<uint>("width"); var width = element.GetRequiredProperty<int>("width");
var x = element.GetRequiredProperty<uint>("x"); var x = element.GetRequiredProperty<int>("x");
var y = element.GetRequiredProperty<uint>("y"); var y = element.GetRequiredProperty<int>("y");
if (!data.HasValue && !chunks.HasValue) if (!data.HasValue && !chunks.HasValue)
throw new JsonException("Tile layer does not contain data."); throw new JsonException("Tile layer does not contain data.");

View file

@ -10,9 +10,9 @@ public abstract partial class TmjReaderBase
Optional<string> parentVersion = null, Optional<string> parentVersion = null,
Optional<string> parentTiledVersion = null) Optional<string> parentTiledVersion = null)
{ {
var backgroundColor = element.GetOptionalPropertyParseable<Color>("backgroundcolor"); var backgroundColor = element.GetOptionalPropertyParseable<TiledColor>("backgroundcolor");
var @class = element.GetOptionalProperty<string>("class").GetValueOr(""); var @class = element.GetOptionalProperty<string>("class").GetValueOr("");
var columns = element.GetOptionalProperty<uint>("columns"); var columns = element.GetOptionalProperty<int>("columns");
var fillMode = element.GetOptionalPropertyParseable<FillMode>("fillmode", s => s switch var fillMode = element.GetOptionalPropertyParseable<FillMode>("fillmode", s => s switch
{ {
"stretch" => FillMode.Stretch, "stretch" => FillMode.Stretch,
@ -22,9 +22,9 @@ public abstract partial class TmjReaderBase
var firstGID = element.GetOptionalProperty<uint>("firstgid"); var firstGID = element.GetOptionalProperty<uint>("firstgid");
var grid = element.GetOptionalPropertyCustom<Grid>("grid", ReadGrid); var grid = element.GetOptionalPropertyCustom<Grid>("grid", ReadGrid);
var image = element.GetOptionalProperty<string>("image"); var image = element.GetOptionalProperty<string>("image");
var imageHeight = element.GetOptionalProperty<uint>("imageheight"); var imageHeight = element.GetOptionalProperty<int>("imageheight");
var imageWidth = element.GetOptionalProperty<uint>("imagewidth"); var imageWidth = element.GetOptionalProperty<int>("imagewidth");
var margin = element.GetOptionalProperty<uint>("margin"); var margin = element.GetOptionalProperty<int>("margin");
var name = element.GetOptionalProperty<string>("name"); var name = element.GetOptionalProperty<string>("name");
var objectAlignment = element.GetOptionalPropertyParseable<ObjectAlignment>("objectalignment", s => s switch var objectAlignment = element.GetOptionalPropertyParseable<ObjectAlignment>("objectalignment", s => s switch
{ {
@ -42,10 +42,10 @@ public abstract partial class TmjReaderBase
}).GetValueOr(ObjectAlignment.Unspecified); }).GetValueOr(ObjectAlignment.Unspecified);
var properties = ResolveAndMergeProperties(@class, element.GetOptionalPropertyCustom("properties", ReadProperties).GetValueOr([])); var properties = ResolveAndMergeProperties(@class, element.GetOptionalPropertyCustom("properties", ReadProperties).GetValueOr([]));
var source = element.GetOptionalProperty<string>("source"); var source = element.GetOptionalProperty<string>("source");
var spacing = element.GetOptionalProperty<uint>("spacing"); var spacing = element.GetOptionalProperty<int>("spacing");
var tileCount = element.GetOptionalProperty<uint>("tilecount"); var tileCount = element.GetOptionalProperty<int>("tilecount");
var tiledVersion = element.GetOptionalProperty<string>("tiledversion").GetValueOrOptional(parentTiledVersion); var tiledVersion = element.GetOptionalProperty<string>("tiledversion").GetValueOrOptional(parentTiledVersion);
var tileHeight = element.GetOptionalProperty<uint>("tileheight"); var tileHeight = element.GetOptionalProperty<int>("tileheight");
var tileOffset = element.GetOptionalPropertyCustom<TileOffset>("tileoffset", ReadTileOffset); var tileOffset = element.GetOptionalPropertyCustom<TileOffset>("tileoffset", ReadTileOffset);
var tileRenderSize = element.GetOptionalPropertyParseable<TileRenderSize>("tilerendersize", s => s switch var tileRenderSize = element.GetOptionalPropertyParseable<TileRenderSize>("tilerendersize", s => s switch
{ {
@ -54,9 +54,8 @@ public abstract partial class TmjReaderBase
_ => throw new JsonException($"Unknown tile render size '{s}'") _ => throw new JsonException($"Unknown tile render size '{s}'")
}).GetValueOr(TileRenderSize.Tile); }).GetValueOr(TileRenderSize.Tile);
var tiles = element.GetOptionalPropertyCustom<List<Tile>>("tiles", ReadTiles).GetValueOr([]); var tiles = element.GetOptionalPropertyCustom<List<Tile>>("tiles", ReadTiles).GetValueOr([]);
var tileWidth = element.GetOptionalProperty<uint>("tilewidth"); var tileWidth = element.GetOptionalProperty<int>("tilewidth");
var transparentColor = element.GetOptionalPropertyParseable<Color>("transparentcolor"); var transparentColor = element.GetOptionalPropertyParseable<TiledColor>("transparentcolor");
var type = element.GetOptionalProperty<string>("type");
var version = element.GetOptionalProperty<string>("version").GetValueOrOptional(parentVersion); var version = element.GetOptionalProperty<string>("version").GetValueOrOptional(parentVersion);
var transformations = element.GetOptionalPropertyCustom<Transformations>("transformations", ReadTransformations); var transformations = element.GetOptionalPropertyCustom<Transformations>("transformations", ReadTransformations);
var wangsets = element.GetOptionalPropertyCustom<List<Wangset>>("wangsets", el => el.GetValueAsList<Wangset>(e => ReadWangset(e))).GetValueOr([]); var wangsets = element.GetOptionalPropertyCustom<List<Wangset>>("wangsets", el => el.GetValueAsList<Wangset>(e => ReadWangset(e))).GetValueOr([]);
@ -129,8 +128,8 @@ public abstract partial class TmjReaderBase
"isometric" => GridOrientation.Isometric, "isometric" => GridOrientation.Isometric,
_ => throw new JsonException($"Unknown grid orientation '{s}'") _ => throw new JsonException($"Unknown grid orientation '{s}'")
}).GetValueOr(GridOrientation.Orthogonal); }).GetValueOr(GridOrientation.Orthogonal);
var height = element.GetRequiredProperty<uint>("height"); var height = element.GetRequiredProperty<int>("height");
var width = element.GetRequiredProperty<uint>("width"); var width = element.GetRequiredProperty<int>("width");
return new Grid return new Grid
{ {
@ -158,12 +157,12 @@ public abstract partial class TmjReaderBase
var animation = e.GetOptionalPropertyCustom<List<Frame>>("animation", e => e.GetValueAsList<Frame>(ReadFrame)).GetValueOr([]); var animation = e.GetOptionalPropertyCustom<List<Frame>>("animation", e => e.GetValueAsList<Frame>(ReadFrame)).GetValueOr([]);
var id = e.GetRequiredProperty<uint>("id"); var id = e.GetRequiredProperty<uint>("id");
var image = e.GetOptionalProperty<string>("image"); var image = e.GetOptionalProperty<string>("image");
var imageHeight = e.GetOptionalProperty<uint>("imageheight"); var imageHeight = e.GetOptionalProperty<int>("imageheight");
var imageWidth = e.GetOptionalProperty<uint>("imagewidth"); var imageWidth = e.GetOptionalProperty<int>("imagewidth");
var x = e.GetOptionalProperty<uint>("x").GetValueOr(0); var x = e.GetOptionalProperty<int>("x").GetValueOr(0);
var y = e.GetOptionalProperty<uint>("y").GetValueOr(0); var y = e.GetOptionalProperty<int>("y").GetValueOr(0);
var width = e.GetOptionalProperty<uint>("width").GetValueOr(imageWidth.GetValueOr(0)); var width = e.GetOptionalProperty<int>("width").GetValueOr(imageWidth.GetValueOr(0));
var height = e.GetOptionalProperty<uint>("height").GetValueOr(imageHeight.GetValueOr(0)); var height = e.GetOptionalProperty<int>("height").GetValueOr(imageHeight.GetValueOr(0));
var objectGroup = e.GetOptionalPropertyCustom<ObjectLayer>("objectgroup", e => ReadObjectLayer(e)); var objectGroup = e.GetOptionalPropertyCustom<ObjectLayer>("objectgroup", e => ReadObjectLayer(e));
var probability = e.GetOptionalProperty<float>("probability").GetValueOr(0.0f); var probability = e.GetOptionalProperty<float>("probability").GetValueOr(0.0f);
var type = e.GetOptionalProperty<string>("type").GetValueOr(""); var type = e.GetOptionalProperty<string>("type").GetValueOr("");
@ -195,7 +194,7 @@ public abstract partial class TmjReaderBase
internal static Frame ReadFrame(JsonElement element) internal static Frame ReadFrame(JsonElement element)
{ {
var duration = element.GetRequiredProperty<uint>("duration"); var duration = element.GetRequiredProperty<int>("duration");
var tileID = element.GetRequiredProperty<uint>("tileid"); var tileID = element.GetRequiredProperty<uint>("tileid");
return new Frame return new Frame
@ -229,7 +228,7 @@ public abstract partial class TmjReaderBase
internal WangColor ReadWangColor(JsonElement element) internal WangColor ReadWangColor(JsonElement element)
{ {
var @class = element.GetOptionalProperty<string>("class").GetValueOr(""); var @class = element.GetOptionalProperty<string>("class").GetValueOr("");
var color = element.GetRequiredPropertyParseable<Color>("color"); var color = element.GetRequiredPropertyParseable<TiledColor>("color");
var name = element.GetRequiredProperty<string>("name"); var name = element.GetRequiredProperty<string>("name");
var probability = element.GetOptionalProperty<float>("probability").GetValueOr(1.0f); var probability = element.GetOptionalProperty<float>("probability").GetValueOr(1.0f);
var properties = ResolveAndMergeProperties(@class, element.GetOptionalPropertyCustom("properties", ReadProperties).GetValueOr([])); var properties = ResolveAndMergeProperties(@class, element.GetOptionalPropertyCustom("properties", ReadProperties).GetValueOr([]));

View file

@ -6,8 +6,8 @@ public abstract partial class TmxReaderBase
{ {
var x = _reader.GetRequiredAttributeParseable<int>("x"); var x = _reader.GetRequiredAttributeParseable<int>("x");
var y = _reader.GetRequiredAttributeParseable<int>("y"); var y = _reader.GetRequiredAttributeParseable<int>("y");
var width = _reader.GetRequiredAttributeParseable<uint>("width"); var width = _reader.GetRequiredAttributeParseable<int>("width");
var height = _reader.GetRequiredAttributeParseable<uint>("height"); var height = _reader.GetRequiredAttributeParseable<int>("height");
var usesTileChildrenInsteadOfRawData = !encoding.HasValue; var usesTileChildrenInsteadOfRawData = !encoding.HasValue;
if (usesTileChildrenInsteadOfRawData) if (usesTileChildrenInsteadOfRawData)

View file

@ -32,11 +32,11 @@ public abstract partial class TmxReaderBase
_ => throw new InvalidOperationException($"Unknown render order '{s}'") _ => throw new InvalidOperationException($"Unknown render order '{s}'")
}).GetValueOr(RenderOrder.RightDown); }).GetValueOr(RenderOrder.RightDown);
var compressionLevel = _reader.GetOptionalAttributeParseable<int>("compressionlevel").GetValueOr(-1); var compressionLevel = _reader.GetOptionalAttributeParseable<int>("compressionlevel").GetValueOr(-1);
var width = _reader.GetRequiredAttributeParseable<uint>("width"); var width = _reader.GetRequiredAttributeParseable<int>("width");
var height = _reader.GetRequiredAttributeParseable<uint>("height"); var height = _reader.GetRequiredAttributeParseable<int>("height");
var tileWidth = _reader.GetRequiredAttributeParseable<uint>("tilewidth"); var tileWidth = _reader.GetRequiredAttributeParseable<int>("tilewidth");
var tileHeight = _reader.GetRequiredAttributeParseable<uint>("tileheight"); var tileHeight = _reader.GetRequiredAttributeParseable<int>("tileheight");
var hexSideLength = _reader.GetOptionalAttributeParseable<uint>("hexsidelength"); var hexSideLength = _reader.GetOptionalAttributeParseable<int>("hexsidelength");
var staggerAxis = _reader.GetOptionalAttributeEnum<StaggerAxis>("staggeraxis", s => s switch var staggerAxis = _reader.GetOptionalAttributeEnum<StaggerAxis>("staggeraxis", s => s switch
{ {
"x" => StaggerAxis.X, "x" => StaggerAxis.X,
@ -51,7 +51,7 @@ public abstract partial class TmxReaderBase
}); });
var parallaxOriginX = _reader.GetOptionalAttributeParseable<float>("parallaxoriginx").GetValueOr(0.0f); var parallaxOriginX = _reader.GetOptionalAttributeParseable<float>("parallaxoriginx").GetValueOr(0.0f);
var parallaxOriginY = _reader.GetOptionalAttributeParseable<float>("parallaxoriginy").GetValueOr(0.0f); var parallaxOriginY = _reader.GetOptionalAttributeParseable<float>("parallaxoriginy").GetValueOr(0.0f);
var backgroundColor = _reader.GetOptionalAttributeClass<Color>("backgroundcolor").GetValueOr(Color.Parse("#00000000", CultureInfo.InvariantCulture)); var backgroundColor = _reader.GetOptionalAttributeClass<TiledColor>("backgroundcolor").GetValueOr(TiledColor.Parse("#00000000", CultureInfo.InvariantCulture));
var nextLayerID = _reader.GetRequiredAttributeParseable<uint>("nextlayerid"); var nextLayerID = _reader.GetRequiredAttributeParseable<uint>("nextlayerid");
var nextObjectID = _reader.GetRequiredAttributeParseable<uint>("nextobjectid"); var nextObjectID = _reader.GetRequiredAttributeParseable<uint>("nextobjectid");
var infinite = _reader.GetOptionalAttributeParseable<uint>("infinite").GetValueOr(0) == 1; var infinite = _reader.GetOptionalAttributeParseable<uint>("infinite").GetValueOr(0) == 1;

View file

@ -14,18 +14,18 @@ public abstract partial class TmxReaderBase
var id = _reader.GetRequiredAttributeParseable<uint>("id"); var id = _reader.GetRequiredAttributeParseable<uint>("id");
var name = _reader.GetOptionalAttribute("name").GetValueOr(""); var name = _reader.GetOptionalAttribute("name").GetValueOr("");
var @class = _reader.GetOptionalAttribute("class").GetValueOr(""); var @class = _reader.GetOptionalAttribute("class").GetValueOr("");
var x = _reader.GetOptionalAttributeParseable<uint>("x").GetValueOr(0); var x = _reader.GetOptionalAttributeParseable<int>("x").GetValueOr(0);
var y = _reader.GetOptionalAttributeParseable<uint>("y").GetValueOr(0); var y = _reader.GetOptionalAttributeParseable<int>("y").GetValueOr(0);
var width = _reader.GetOptionalAttributeParseable<uint>("width").GetValueOr(0); var width = _reader.GetOptionalAttributeParseable<int>("width").GetValueOr(0);
var height = _reader.GetOptionalAttributeParseable<uint>("height").GetValueOr(0); var height = _reader.GetOptionalAttributeParseable<int>("height").GetValueOr(0);
var opacity = _reader.GetOptionalAttributeParseable<float>("opacity").GetValueOr(1.0f); var opacity = _reader.GetOptionalAttributeParseable<float>("opacity").GetValueOr(1.0f);
var visible = _reader.GetOptionalAttributeParseable<uint>("visible").GetValueOr(1) == 1; var visible = _reader.GetOptionalAttributeParseable<uint>("visible").GetValueOr(1) == 1;
var tintColor = _reader.GetOptionalAttributeClass<Color>("tintcolor"); var tintColor = _reader.GetOptionalAttributeClass<TiledColor>("tintcolor");
var offsetX = _reader.GetOptionalAttributeParseable<float>("offsetx").GetValueOr(0.0f); var offsetX = _reader.GetOptionalAttributeParseable<float>("offsetx").GetValueOr(0.0f);
var offsetY = _reader.GetOptionalAttributeParseable<float>("offsety").GetValueOr(0.0f); var offsetY = _reader.GetOptionalAttributeParseable<float>("offsety").GetValueOr(0.0f);
var parallaxX = _reader.GetOptionalAttributeParseable<float>("parallaxx").GetValueOr(1.0f); var parallaxX = _reader.GetOptionalAttributeParseable<float>("parallaxx").GetValueOr(1.0f);
var parallaxY = _reader.GetOptionalAttributeParseable<float>("parallaxy").GetValueOr(1.0f); var parallaxY = _reader.GetOptionalAttributeParseable<float>("parallaxy").GetValueOr(1.0f);
var color = _reader.GetOptionalAttributeClass<Color>("color"); var color = _reader.GetOptionalAttributeClass<TiledColor>("color");
var drawOrder = _reader.GetOptionalAttributeEnum<DrawOrder>("draworder", s => s switch var drawOrder = _reader.GetOptionalAttributeEnum<DrawOrder>("draworder", s => s switch
{ {
"topdown" => DrawOrder.TopDown, "topdown" => DrawOrder.TopDown,
@ -245,7 +245,7 @@ public abstract partial class TmxReaderBase
var fontFamily = _reader.GetOptionalAttribute("fontfamily") ?? "sans-serif"; var fontFamily = _reader.GetOptionalAttribute("fontfamily") ?? "sans-serif";
var pixelSize = _reader.GetOptionalAttributeParseable<int>("pixelsize") ?? 16; var pixelSize = _reader.GetOptionalAttributeParseable<int>("pixelsize") ?? 16;
var wrap = _reader.GetOptionalAttributeParseable<bool>("wrap") ?? false; var wrap = _reader.GetOptionalAttributeParseable<bool>("wrap") ?? false;
var color = _reader.GetOptionalAttributeClass<Color>("color") ?? Color.Parse("#000000", CultureInfo.InvariantCulture); var color = _reader.GetOptionalAttributeClass<TiledColor>("color") ?? TiledColor.Parse("#000000", CultureInfo.InvariantCulture);
var bold = _reader.GetOptionalAttributeParseable<bool>("bold") ?? false; var bold = _reader.GetOptionalAttributeParseable<bool>("bold") ?? false;
var italic = _reader.GetOptionalAttributeParseable<bool>("italic") ?? false; var italic = _reader.GetOptionalAttributeParseable<bool>("italic") ?? false;
var underline = _reader.GetOptionalAttributeParseable<bool>("underline") ?? false; var underline = _reader.GetOptionalAttributeParseable<bool>("underline") ?? false;

View file

@ -45,7 +45,7 @@ public abstract partial class TmxReaderBase
PropertyType.Int => new IntProperty { Name = name, Value = r.GetRequiredAttributeParseable<int>("value") }, PropertyType.Int => new IntProperty { Name = name, Value = r.GetRequiredAttributeParseable<int>("value") },
PropertyType.Float => new FloatProperty { Name = name, Value = r.GetRequiredAttributeParseable<float>("value") }, PropertyType.Float => new FloatProperty { Name = name, Value = r.GetRequiredAttributeParseable<float>("value") },
PropertyType.Bool => new BoolProperty { Name = name, Value = r.GetRequiredAttributeParseable<bool>("value") }, PropertyType.Bool => new BoolProperty { Name = name, Value = r.GetRequiredAttributeParseable<bool>("value") },
PropertyType.Color => new ColorProperty { Name = name, Value = r.GetRequiredAttributeParseable<Color>("value", s => s == "" ? default : Color.Parse(s, CultureInfo.InvariantCulture)) }, PropertyType.Color => new ColorProperty { Name = name, Value = r.GetRequiredAttributeParseable<TiledColor>("value", s => s == "" ? default : TiledColor.Parse(s, CultureInfo.InvariantCulture)) },
PropertyType.File => new FileProperty { Name = name, Value = r.GetRequiredAttribute("value") }, PropertyType.File => new FileProperty { Name = name, Value = r.GetRequiredAttribute("value") },
PropertyType.Object => new ObjectProperty { Name = name, Value = r.GetRequiredAttributeParseable<uint>("value") }, PropertyType.Object => new ObjectProperty { Name = name, Value = r.GetRequiredAttributeParseable<uint>("value") },
PropertyType.Class => throw new XmlException("Class property must have a property type"), PropertyType.Class => throw new XmlException("Class property must have a property type"),

View file

@ -10,13 +10,13 @@ public abstract partial class TmxReaderBase
var id = _reader.GetRequiredAttributeParseable<uint>("id"); var id = _reader.GetRequiredAttributeParseable<uint>("id");
var name = _reader.GetOptionalAttribute("name").GetValueOr(""); var name = _reader.GetOptionalAttribute("name").GetValueOr("");
var @class = _reader.GetOptionalAttribute("class").GetValueOr(""); var @class = _reader.GetOptionalAttribute("class").GetValueOr("");
var x = _reader.GetOptionalAttributeParseable<uint>("x").GetValueOr(0); var x = _reader.GetOptionalAttributeParseable<int>("x").GetValueOr(0);
var y = _reader.GetOptionalAttributeParseable<uint>("y").GetValueOr(0); var y = _reader.GetOptionalAttributeParseable<int>("y").GetValueOr(0);
var width = _reader.GetRequiredAttributeParseable<uint>("width"); var width = _reader.GetRequiredAttributeParseable<int>("width");
var height = _reader.GetRequiredAttributeParseable<uint>("height"); var height = _reader.GetRequiredAttributeParseable<int>("height");
var opacity = _reader.GetOptionalAttributeParseable<float>("opacity").GetValueOr(1.0f); var opacity = _reader.GetOptionalAttributeParseable<float>("opacity").GetValueOr(1.0f);
var visible = _reader.GetOptionalAttributeParseable<uint>("visible").GetValueOr(1) == 1; var visible = _reader.GetOptionalAttributeParseable<uint>("visible").GetValueOr(1) == 1;
var tintColor = _reader.GetOptionalAttributeClass<Color>("tintcolor"); var tintColor = _reader.GetOptionalAttributeClass<TiledColor>("tintcolor");
var offsetX = _reader.GetOptionalAttributeParseable<float>("offsetx").GetValueOr(0.0f); var offsetX = _reader.GetOptionalAttributeParseable<float>("offsetx").GetValueOr(0.0f);
var offsetY = _reader.GetOptionalAttributeParseable<float>("offsety").GetValueOr(0.0f); var offsetY = _reader.GetOptionalAttributeParseable<float>("offsety").GetValueOr(0.0f);
var parallaxX = _reader.GetOptionalAttributeParseable<float>("parallaxx").GetValueOr(1.0f); var parallaxX = _reader.GetOptionalAttributeParseable<float>("parallaxx").GetValueOr(1.0f);
@ -59,11 +59,11 @@ public abstract partial class TmxReaderBase
var id = _reader.GetRequiredAttributeParseable<uint>("id"); var id = _reader.GetRequiredAttributeParseable<uint>("id");
var name = _reader.GetOptionalAttribute("name").GetValueOr(""); var name = _reader.GetOptionalAttribute("name").GetValueOr("");
var @class = _reader.GetOptionalAttribute("class").GetValueOr(""); var @class = _reader.GetOptionalAttribute("class").GetValueOr("");
var x = _reader.GetOptionalAttributeParseable<uint>("x").GetValueOr(0); var x = _reader.GetOptionalAttributeParseable<int>("x").GetValueOr(0);
var y = _reader.GetOptionalAttributeParseable<uint>("y").GetValueOr(0); var y = _reader.GetOptionalAttributeParseable<int>("y").GetValueOr(0);
var opacity = _reader.GetOptionalAttributeParseable<float>("opacity").GetValueOr(1f); var opacity = _reader.GetOptionalAttributeParseable<float>("opacity").GetValueOr(1f);
var visible = _reader.GetOptionalAttributeParseable<bool>("visible").GetValueOr(true); var visible = _reader.GetOptionalAttributeParseable<bool>("visible").GetValueOr(true);
var tintColor = _reader.GetOptionalAttributeClass<Color>("tintcolor"); var tintColor = _reader.GetOptionalAttributeClass<TiledColor>("tintcolor");
var offsetX = _reader.GetOptionalAttributeParseable<float>("offsetx").GetValueOr(0.0f); var offsetX = _reader.GetOptionalAttributeParseable<float>("offsetx").GetValueOr(0.0f);
var offsetY = _reader.GetOptionalAttributeParseable<float>("offsety").GetValueOr(0.0f); var offsetY = _reader.GetOptionalAttributeParseable<float>("offsety").GetValueOr(0.0f);
var parallaxX = _reader.GetOptionalAttributeParseable<float>("parallaxx").GetValueOr(1.0f); var parallaxX = _reader.GetOptionalAttributeParseable<float>("parallaxx").GetValueOr(1.0f);
@ -110,7 +110,7 @@ public abstract partial class TmxReaderBase
var @class = _reader.GetOptionalAttribute("class").GetValueOr(""); var @class = _reader.GetOptionalAttribute("class").GetValueOr("");
var opacity = _reader.GetOptionalAttributeParseable<float>("opacity").GetValueOr(1.0f); var opacity = _reader.GetOptionalAttributeParseable<float>("opacity").GetValueOr(1.0f);
var visible = _reader.GetOptionalAttributeParseable<uint>("visible").GetValueOr(1) == 1; var visible = _reader.GetOptionalAttributeParseable<uint>("visible").GetValueOr(1) == 1;
var tintColor = _reader.GetOptionalAttributeClass<Color>("tintcolor"); var tintColor = _reader.GetOptionalAttributeClass<TiledColor>("tintcolor");
var offsetX = _reader.GetOptionalAttributeParseable<float>("offsetx").GetValueOr(0f); var offsetX = _reader.GetOptionalAttributeParseable<float>("offsetx").GetValueOr(0f);
var offsetY = _reader.GetOptionalAttributeParseable<float>("offsety").GetValueOr(0f); var offsetY = _reader.GetOptionalAttributeParseable<float>("offsety").GetValueOr(0f);
var parallaxX = _reader.GetOptionalAttributeParseable<float>("parallaxx").GetValueOr(1f); var parallaxX = _reader.GetOptionalAttributeParseable<float>("parallaxx").GetValueOr(1f);

View file

@ -31,12 +31,12 @@ public abstract partial class TmxReaderBase
var tiledVersion = _reader.GetOptionalAttribute("tiledversion").GetValueOrOptional(parentTiledVersion); var tiledVersion = _reader.GetOptionalAttribute("tiledversion").GetValueOrOptional(parentTiledVersion);
var name = _reader.GetRequiredAttribute("name"); var name = _reader.GetRequiredAttribute("name");
var @class = _reader.GetOptionalAttribute("class").GetValueOr(""); var @class = _reader.GetOptionalAttribute("class").GetValueOr("");
var tileWidth = _reader.GetRequiredAttributeParseable<uint>("tilewidth"); var tileWidth = _reader.GetRequiredAttributeParseable<int>("tilewidth");
var tileHeight = _reader.GetRequiredAttributeParseable<uint>("tileheight"); var tileHeight = _reader.GetRequiredAttributeParseable<int>("tileheight");
var spacing = _reader.GetOptionalAttributeParseable<uint>("spacing").GetValueOr(0); var spacing = _reader.GetOptionalAttributeParseable<int>("spacing").GetValueOr(0);
var margin = _reader.GetOptionalAttributeParseable<uint>("margin").GetValueOr(0); var margin = _reader.GetOptionalAttributeParseable<int>("margin").GetValueOr(0);
var tileCount = _reader.GetRequiredAttributeParseable<uint>("tilecount"); var tileCount = _reader.GetRequiredAttributeParseable<int>("tilecount");
var columns = _reader.GetRequiredAttributeParseable<uint>("columns"); var columns = _reader.GetRequiredAttributeParseable<int>("columns");
var objectAlignment = _reader.GetOptionalAttributeEnum<ObjectAlignment>("objectalignment", s => s switch var objectAlignment = _reader.GetOptionalAttributeEnum<ObjectAlignment>("objectalignment", s => s switch
{ {
"unspecified" => ObjectAlignment.Unspecified, "unspecified" => ObjectAlignment.Unspecified,
@ -125,9 +125,9 @@ public abstract partial class TmxReaderBase
_ => throw new InvalidOperationException($"Unknown image format '{s}'") _ => throw new InvalidOperationException($"Unknown image format '{s}'")
}); });
var source = _reader.GetOptionalAttribute("source"); var source = _reader.GetOptionalAttribute("source");
var transparentColor = _reader.GetOptionalAttributeClass<Color>("trans"); var transparentColor = _reader.GetOptionalAttributeClass<TiledColor>("trans");
var width = _reader.GetOptionalAttributeParseable<uint>("width"); var width = _reader.GetOptionalAttributeParseable<int>("width");
var height = _reader.GetOptionalAttributeParseable<uint>("height"); var height = _reader.GetOptionalAttributeParseable<int>("height");
_reader.ProcessChildren("image", (r, elementName) => elementName switch _reader.ProcessChildren("image", (r, elementName) => elementName switch
{ {
@ -167,8 +167,8 @@ public abstract partial class TmxReaderBase
"isometric" => GridOrientation.Isometric, "isometric" => GridOrientation.Isometric,
_ => throw new InvalidOperationException($"Unknown orientation '{s}'") _ => throw new InvalidOperationException($"Unknown orientation '{s}'")
}).GetValueOr(GridOrientation.Orthogonal); }).GetValueOr(GridOrientation.Orthogonal);
var width = _reader.GetRequiredAttributeParseable<uint>("width"); var width = _reader.GetRequiredAttributeParseable<int>("width");
var height = _reader.GetRequiredAttributeParseable<uint>("height"); var height = _reader.GetRequiredAttributeParseable<int>("height");
_reader.ReadStartElement("grid"); _reader.ReadStartElement("grid");
return new Grid { Orientation = orientation, Width = width, Height = height }; return new Grid { Orientation = orientation, Width = width, Height = height };
@ -192,10 +192,10 @@ public abstract partial class TmxReaderBase
var id = _reader.GetRequiredAttributeParseable<uint>("id"); var id = _reader.GetRequiredAttributeParseable<uint>("id");
var type = _reader.GetOptionalAttribute("type").GetValueOr(""); var type = _reader.GetOptionalAttribute("type").GetValueOr("");
var probability = _reader.GetOptionalAttributeParseable<float>("probability").GetValueOr(0f); var probability = _reader.GetOptionalAttributeParseable<float>("probability").GetValueOr(0f);
var x = _reader.GetOptionalAttributeParseable<uint>("x").GetValueOr(0); var x = _reader.GetOptionalAttributeParseable<int>("x").GetValueOr(0);
var y = _reader.GetOptionalAttributeParseable<uint>("y").GetValueOr(0); var y = _reader.GetOptionalAttributeParseable<int>("y").GetValueOr(0);
var width = _reader.GetOptionalAttributeParseable<uint>("width"); var width = _reader.GetOptionalAttributeParseable<int>("width");
var height = _reader.GetOptionalAttributeParseable<uint>("height"); var height = _reader.GetOptionalAttributeParseable<int>("height");
// Elements // Elements
var propertiesCounter = 0; var propertiesCounter = 0;
@ -212,7 +212,7 @@ public abstract partial class TmxReaderBase
"animation" => () => Helpers.SetAtMostOnce(ref animation, r.ReadList<Frame>("animation", "frame", (ar) => "animation" => () => Helpers.SetAtMostOnce(ref animation, r.ReadList<Frame>("animation", "frame", (ar) =>
{ {
var tileID = ar.GetRequiredAttributeParseable<uint>("tileid"); var tileID = ar.GetRequiredAttributeParseable<uint>("tileid");
var duration = ar.GetRequiredAttributeParseable<uint>("duration"); var duration = ar.GetRequiredAttributeParseable<int>("duration");
return new Frame { TileID = tileID, Duration = duration }; return new Frame { TileID = tileID, Duration = duration };
}), "Animation"), }), "Animation"),
_ => r.Skip _ => r.Skip
@ -277,7 +277,7 @@ public abstract partial class TmxReaderBase
// Attributes // Attributes
var name = _reader.GetRequiredAttribute("name"); var name = _reader.GetRequiredAttribute("name");
var @class = _reader.GetOptionalAttribute("class").GetValueOr(""); var @class = _reader.GetOptionalAttribute("class").GetValueOr("");
var color = _reader.GetRequiredAttributeParseable<Color>("color"); var color = _reader.GetRequiredAttributeParseable<TiledColor>("color");
var tile = _reader.GetRequiredAttributeParseable<int>("tile"); var tile = _reader.GetRequiredAttributeParseable<int>("tile");
var probability = _reader.GetOptionalAttributeParseable<float>("probability").GetValueOr(0f); var probability = _reader.GetOptionalAttributeParseable<float>("probability").GetValueOr(0f);

View file

@ -13,5 +13,5 @@ public class Frame
/// <summary> /// <summary>
/// How long (in milliseconds) this frame should be displayed before advancing to the next frame. /// How long (in milliseconds) this frame should be displayed before advancing to the next frame.
/// </summary> /// </summary>
public required uint Duration { get; set; } public required int Duration { get; set; }
} }

View file

@ -29,10 +29,10 @@ public class Grid
/// <summary> /// <summary>
/// Width of a grid cell. /// Width of a grid cell.
/// </summary> /// </summary>
public required uint Width { get; set; } public required int Width { get; set; }
/// <summary> /// <summary>
/// Height of a grid cell. /// Height of a grid cell.
/// </summary> /// </summary>
public required uint Height { get; set; } public required int Height { get; set; }
} }

View file

@ -44,15 +44,15 @@ public class Image
/// <summary> /// <summary>
/// Defines a specific color that is treated as transparent. /// Defines a specific color that is treated as transparent.
/// </summary> /// </summary>
public Optional<Color> TransparentColor { get; set; } = Optional<Color>.Empty; public Optional<TiledColor> TransparentColor { get; set; } = Optional<TiledColor>.Empty;
/// <summary> /// <summary>
/// The image width in pixels, used for tile index correction when the image changes. /// The image width in pixels, used for tile index correction when the image changes.
/// </summary> /// </summary>
public Optional<uint> Width { get; set; } = Optional<uint>.Empty; public Optional<int> Width { get; set; } = Optional<int>.Empty;
/// <summary> /// <summary>
/// The image height in pixels, used for tile index correction when the image changes. /// The image height in pixels, used for tile index correction when the image changes.
/// </summary> /// </summary>
public Optional<uint> Height { get; set; } = Optional<uint>.Empty; public Optional<int> Height { get; set; } = Optional<int>.Empty;
} }

View file

@ -26,22 +26,22 @@ public class Tile : HasPropertiesBase
/// <summary> /// <summary>
/// The X position of the sub-rectangle representing this tile within the tileset image. /// The X position of the sub-rectangle representing this tile within the tileset image.
/// </summary> /// </summary>
public uint X { get; set; } = 0; public int X { get; set; } = 0;
/// <summary> /// <summary>
/// The Y position of the sub-rectangle representing this tile within the tileset image. /// The Y position of the sub-rectangle representing this tile within the tileset image.
/// </summary> /// </summary>
public uint Y { get; set; } = 0; public int Y { get; set; } = 0;
/// <summary> /// <summary>
/// The width of the sub-rectangle representing this tile within the tileset image. /// The width of the sub-rectangle representing this tile within the tileset image.
/// </summary> /// </summary>
public required uint Width { get; set; } public required int Width { get; set; }
/// <summary> /// <summary>
/// The height of the sub-rectangle representing this tile within the tileset image. /// The height of the sub-rectangle representing this tile within the tileset image.
/// </summary> /// </summary>
public required uint Height { get; set; } public required int Height { get; set; }
/// <summary> /// <summary>
/// Tile properties. /// Tile properties.

View file

@ -156,32 +156,32 @@ public class Tileset : HasPropertiesBase
/// <summary> /// <summary>
/// The width of the tiles in this tileset, which should be at least 1 (non-zero) except in the case of image collection tilesets (in which case it stores the maximum tile width). /// The width of the tiles in this tileset, which should be at least 1 (non-zero) except in the case of image collection tilesets (in which case it stores the maximum tile width).
/// </summary> /// </summary>
public required uint TileWidth { get; set; } public required int TileWidth { get; set; }
/// <summary> /// <summary>
/// The height of the tiles in this tileset, which should be at least 1 (non-zero) except in the case of image collection tilesets (in which case it stores the maximum tile height). /// The height of the tiles in this tileset, which should be at least 1 (non-zero) except in the case of image collection tilesets (in which case it stores the maximum tile height).
/// </summary> /// </summary>
public required uint TileHeight { get; set; } public required int TileHeight { get; set; }
/// <summary> /// <summary>
/// The spacing in pixels between the tiles in this tileset (applies to the tileset image). Irrelevant for image collection tilesets. /// The spacing in pixels between the tiles in this tileset (applies to the tileset image). Irrelevant for image collection tilesets.
/// </summary> /// </summary>
public uint Spacing { get; set; } = 0; public int Spacing { get; set; } = 0;
/// <summary> /// <summary>
/// The margin around the tiles in this tileset (applies to the tileset image). Irrelevant for image collection tilesets. /// The margin around the tiles in this tileset (applies to the tileset image). Irrelevant for image collection tilesets.
/// </summary> /// </summary>
public uint Margin { get; set; } = 0; public int Margin { get; set; } = 0;
/// <summary> /// <summary>
/// The number of tiles in this tileset. /// The number of tiles in this tileset.
/// </summary> /// </summary>
public required uint TileCount { get; set; } public required int TileCount { get; set; }
/// <summary> /// <summary>
/// The number of tile columns in the tileset. /// The number of tile columns in the tileset.
/// </summary> /// </summary>
public required uint Columns { get; set; } public required int Columns { get; set; }
/// <summary> /// <summary>
/// Controls the aligntment for tile objects. /// Controls the aligntment for tile objects.
@ -254,25 +254,25 @@ public class Tileset : HasPropertiesBase
{ {
return new SourceRectangle return new SourceRectangle
{ {
X = (int)tileInTiles.X, X = tileInTiles.X,
Y = (int)tileInTiles.Y, Y = tileInTiles.Y,
Width = (int)tileInTiles.Width, Width = tileInTiles.Width,
Height = (int)tileInTiles.Height Height = tileInTiles.Height
}; };
} }
var column = localTileID % Columns; var column = (int)(localTileID % Columns);
var row = localTileID / Columns; var row = (int)(localTileID / Columns);
var x = Margin + ((TileWidth + Spacing) * column); var x = Margin + ((TileWidth + Spacing) * column);
var y = Margin + ((TileHeight + Spacing) * row); var y = Margin + ((TileHeight + Spacing) * row);
return new SourceRectangle return new SourceRectangle
{ {
X = (int)x, X = x,
Y = (int)y, Y = y,
Width = (int)TileWidth, Width = TileWidth,
Height = (int)TileHeight Height = TileHeight
}; };
} }
} }

View file

@ -20,7 +20,7 @@ public class WangColor : HasPropertiesBase
/// <summary> /// <summary>
/// The color of the Wang color. /// The color of the Wang color.
/// </summary> /// </summary>
public required Color Color { get; set; } public required TiledColor Color { get; set; }
/// <summary> /// <summary>
/// The tile ID of the tile representing this color. /// The tile ID of the tile representing this color.