diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml
index 03558dd446..59a2c257b1 100644
--- a/.github/workflows/docs.yml
+++ b/.github/workflows/docs.yml
@@ -17,7 +17,7 @@ jobs:
docs-folder: "docs/"
- name: Upload documentation
- uses: actions/upload-artifact@v5
+ uses: actions/upload-artifact@v6
with:
name: Tiled-Manual-HTML
path: docs/_build/html/
diff --git a/.github/workflows/macos-latest.yml b/.github/workflows/macos-latest.yml
index c196567a45..dcace2ae7d 100644
--- a/.github/workflows/macos-latest.yml
+++ b/.github/workflows/macos-latest.yml
@@ -55,7 +55,7 @@ jobs:
popd
- name: Upload artifact
- uses: actions/upload-artifact@v5
+ uses: actions/upload-artifact@v6
with:
name: Tiled.app
path: Tiled-*-macos.zip
diff --git a/.github/workflows/packages.yml b/.github/workflows/packages.yml
index ccd8a8fe3a..96330ebdbe 100644
--- a/.github/workflows/packages.yml
+++ b/.github/workflows/packages.yml
@@ -154,7 +154,7 @@ jobs:
./linuxdeploy-x86_64.AppImage --appdir AppDir --custom-apprun=dist/linux/AppRun --exclude-library "*libpython3*" --plugin qt --output appimage
- name: Upload Tiled.AppImage
- uses: actions/upload-artifact@v5
+ uses: actions/upload-artifact@v6
with:
name: Tiled-${{ needs.version.outputs.version }}_Linux_x86_64.AppImage
path: Tiled-${{ needs.version.outputs.version }}_Linux_x86_64.AppImage
@@ -184,7 +184,7 @@ jobs:
uses: snapcore/action-build@v1
- name: Upload snap artifact
- uses: actions/upload-artifact@v5
+ uses: actions/upload-artifact@v6
with:
name: tiled_amd64.snap
path: tiled_*_amd64.snap
@@ -318,7 +318,7 @@ jobs:
ditto -c -k --sequesterRsrc --keepParent install/Tiled.app Tiled-${{ needs.version.outputs.version }}_macOS-${{ matrix.version_suffix }}.zip
- name: Upload Tiled.app
- uses: actions/upload-artifact@v5
+ uses: actions/upload-artifact@v6
with:
name: Tiled-${{ needs.version.outputs.version }}_macOS-${{ matrix.version_suffix }}.app
path: Tiled-${{ needs.version.outputs.version }}_macOS-${{ matrix.version_suffix }}.zip
@@ -426,13 +426,13 @@ jobs:
mv release/installer*/Tiled-*.msi ./Tiled-${{ needs.version.outputs.version }}_${{ matrix.filename_suffix }}.msi
- name: Upload Tiled installer
- uses: actions/upload-artifact@v5
+ uses: actions/upload-artifact@v6
with:
name: Tiled-${{ needs.version.outputs.version }}_${{ matrix.filename_suffix }}.msi
path: Tiled-${{ needs.version.outputs.version }}_*.msi
- name: Upload Tiled archive
- uses: actions/upload-artifact@v5
+ uses: actions/upload-artifact@v6
with:
name: Tiled-${{ needs.version.outputs.version }}_${{ matrix.filename_suffix }}.zip
path: release/install-root/*
@@ -448,7 +448,7 @@ jobs:
steps:
- name: Download all artifacts
- uses: actions/download-artifact@v6
+ uses: actions/download-artifact@v7
- name: Create release
id: create_release
diff --git a/NEWS.md b/NEWS.md
index 2c588a27ee..8057430e32 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -3,6 +3,7 @@
* Rewritten Properties view to enable direct widget interaction (#4045)
* Added support for lists in custom properties (#1493)
* Added capsule object shape (by Jocelyn, #2153)
+* Added Oblique map orientation, skewing X and/or Y axis (#2917)
* Allow filtering tilesets by name in the tileset dock (with dogboydog, #4239)
* Allow changing the values of number inputs using expressions (with dogboydog, #4234)
* Added support for SVG 1.2 / CSS blending modes to layers (#3932)
diff --git a/docs/index.rst b/docs/index.rst
index 6c2f7675c2..f59d675e85 100644
--- a/docs/index.rst
+++ b/docs/index.rst
@@ -13,6 +13,7 @@ Tiled Documentation
manual/introduction
manual/projects
+ manual/maps
manual/layers
manual/editing-tile-layers
manual/objects
diff --git a/docs/manual/automapping.md b/docs/manual/automapping.md
index 319c5f7d01..9af935cf2e 100644
--- a/docs/manual/automapping.md
+++ b/docs/manual/automapping.md
@@ -230,7 +230,7 @@ IgnoreHexRotate120
: This boolean layer property can be added to `input` and `inputnot` layers to also match 120-degree rotated tiles on hexagonal maps. However, note that Automapping currently does not really work for hexagonal maps since it does not take into account the staggered axis.
(outputProbability)=
-Probability {bdg-primary}`New in Tiled 1.10`
+Probability {bdg-secondary-line}`Since Tiled 1.10`
: This float layer property can be added to `output` layers to control the probability that a given output index will be chosen. The probabilities for each output index are relative to one another, and default to 1.0. For example, if you have outputA with probability 2 and outputB with probability 0.5, A will be chosen four times as often as B. If multiple output layers with the same index have their **Probability** set, the last (top-most) layer's probability will be used.
{bdg-secondary-line}`Since Tiled 1.9`
@@ -265,7 +265,7 @@ NoOverlappingOutput
: When set to `true`, the output of a rule is not allowed to overlap other outputs of the same rule (defaults to `false`).
(IgnoreLock)=
-IgnoreLock {bdg-primary}`New in Tiled 1.10`
+IgnoreLock {bdg-secondary-line}`Since Tiled 1.10`
: Since Tiled 1.10, Automapping rules no longer modify locked layers. Set this property to `true` to ignore the lock. This can be useful when you have layers that are only changed by rules and want to keep them locked.
All these options can also be set on the rule map itself, in which case they apply as defaults for all rules, which can then be overridden for specific rules by placing rectangle objects.
diff --git a/docs/manual/custom-properties.rst b/docs/manual/custom-properties.rst
index b20379ff5d..e00d40cb01 100644
--- a/docs/manual/custom-properties.rst
+++ b/docs/manual/custom-properties.rst
@@ -51,7 +51,7 @@ quickly jump to the referenced object.
.. raw:: html
-
New in Tiled 1.8
+ Since Tiled 1.8
.. _custom-property-types:
@@ -105,7 +105,7 @@ names. Classes can have members referring to other classes.
.. raw:: html
- New in Tiled 1.9
+ Since Tiled 1.9
Each data type has a "Class" property, which can be used to refer to a custom
class. The members of this class will then be directly available as custom
diff --git a/docs/manual/editing-tile-layers.rst b/docs/manual/editing-tile-layers.rst
index eb019d91e0..9967b929af 100644
--- a/docs/manual/editing-tile-layers.rst
+++ b/docs/manual/editing-tile-layers.rst
@@ -116,7 +116,7 @@ tile or pattern.
.. raw:: html
- Since Tiled 1.10.2
+ Since Tiled 1.10.2
- Holding ``Alt`` draws the rectangle or ellipse centered around the starting
location.
@@ -170,7 +170,7 @@ by clicking on one of the tool buttons in the Tool Options toolbar.
.. raw:: html
- Since Tiled 1.12
+ New in Tiled 1.12
While selecting an area, the following modifiers can be used:
diff --git a/docs/manual/export-defold.rst b/docs/manual/export-defold.rst
index 9b798d9e2b..a57f081078 100644
--- a/docs/manual/export-defold.rst
+++ b/docs/manual/export-defold.rst
@@ -12,7 +12,7 @@ It only supports tile layers and only a single tileset may be used.
.. raw:: html
- New in Tiled 1.9.2
+ Since Tiled 1.9.2
Custom Properties
^^^^^^^^^^^^^^^^^
@@ -69,7 +69,7 @@ Custom Properties
.. raw:: html
- New in Tiled 1.10
+ Since Tiled 1.10
* A custom float property named "z" can be added to tile layers to manually
specify their ``z`` value.
diff --git a/docs/manual/export-tscn.rst b/docs/manual/export-tscn.rst
index 40453b4b86..27c3a5c992 100644
--- a/docs/manual/export-tscn.rst
+++ b/docs/manual/export-tscn.rst
@@ -2,7 +2,7 @@
.. raw:: html
- New in Tiled 1.10
+ Since Tiled 1.10
Godot 4
=======
@@ -64,7 +64,7 @@ Tile Properties
.. raw:: html
- New in Tiled 1.10.2
+ Since Tiled 1.10.2
All custom properties set on tiles will get exported as `Custom Data Layers
`__
@@ -93,7 +93,7 @@ overwritten every time the map is exported.
.. raw:: html
- Since Tiled 1.11
+ New in Tiled 1.11
Object Properties
~~~~~~~~~~~~~~~~~
diff --git a/docs/manual/introduction.rst b/docs/manual/introduction.rst
index 6ccf3b2840..809828097d 100644
--- a/docs/manual/introduction.rst
+++ b/docs/manual/introduction.rst
@@ -11,8 +11,8 @@ your level with extra information used by the game. Tiled focuses on
general flexibility while trying to stay intuitive.**
In terms of tile maps, it supports straight rectangular tile layers, but
-also projected isometric, staggered isometric and staggered hexagonal
-layers. A tileset can be either a single image containing many tiles, or
+also projected isometric, staggered isometric, staggered hexagonal and
+oblique layers. A tileset can be either a single image containing many tiles, or
it can be a collection of individual images. In order to support certain
depth faking techniques, tiles and layers can be offset by a custom
distance and their rendering order can be configured.
@@ -93,10 +93,11 @@ following dialog will pop up:
New Map
Here, we choose the initial map size, tile size, orientation, tile layer
-format, tile render order (only supported for *Orthogonal* maps) and whether
-the map is :doc:`infinite ` or not. All of these things
-can be changed later as needed, so it's not important to get it all right the
-first time.
+format, tile render order (only supported for *Orthogonal* and *Oblique* maps)
+and whether the map is :doc:`infinite ` or not. For more
+details on map orientations and related options, see :doc:`maps `. All of
+these things can be changed later as needed, so it's not important to get it
+all right the first time.
.. note::
diff --git a/docs/manual/maps.rst b/docs/manual/maps.rst
new file mode 100644
index 0000000000..929ceb3907
--- /dev/null
+++ b/docs/manual/maps.rst
@@ -0,0 +1,126 @@
+Editing Maps
+============
+
+A map is a top-level asset file that contains :doc:`layers ` and references :doc:`tileset
+files ` (which can optionally be embedded). It defines the coordinate system, tile
+size, orientation, render order and other map-wide configuration options that affect how the content
+is displayed and exported.
+
+Creating a Map
+--------------
+
+You can create a new map via *File -> New -> New Map…*. The New Map dialog
+lets you set:
+
+- **Orientation** (see :ref:`map-orientations`)
+- **Tile Layer Format** (the storage format for tile data)
+- **Render Order** (only for orthogonal and oblique maps)
+- **Map Size** (fixed width/height or infinite)
+- **Tile Size** (tile width/height in pixels)
+
+All of these options can be changed later in the **Properties** panel, via
+*Map -> Map Properties…*.
+
+.. _map-orientations:
+
+Map Orientations
+----------------
+
+The map orientation controls how the tile grid is projected and how tiles are
+positioned relative to each other. Tiled supports the following orientations.
+
+Orthogonal
+~~~~~~~~~~
+
+The classic top-down grid where rectangular tiles are arranged in straight rows
+and columns. This is the most straightforward orientation.
+
+Isometric
+~~~~~~~~~
+
+Isometric maps are projected to give a 3D-like appearance. Tiles are still arranged in a grid, but
+are drawn as diamonds (though Tiled doesn't transform your art, you'll need to provide the diamond
+shaped tiles). Object positions are stored in a projected coordinate space (see
+:ref:`object-layer-introduction`).
+
+Isometric (Staggered)
+~~~~~~~~~~~~~~~~~~~~~
+
+Staggered isometric maps also use diamond-shaped tiles, but the grid is
+staggered every other row or column. The exact staggering is controlled by the
+**Stagger Axis** and **Stagger Index** map properties.
+
+This orientation allows a map based on isometric tiles to still have an overall rectangular shape.
+
+Hexagonal (Staggered)
+~~~~~~~~~~~~~~~~~~~~~
+
+Hexagonal maps use hex tiles arranged in a staggered grid. Like staggered
+isometric maps, the staggering is controlled by **Stagger Axis** and
+**Stagger Index**. Hexagonal maps also support a **Hex Side Length** that
+defines the length of the straight edges of the hex tile.
+
+The following table shows how **Stagger Axis** relates to the two common hex
+tile orientations:
+
+.. list-table::
+ :header-rows: 1
+ :widths: 30 70
+
+ * - Stagger Axis
+ - Hex Tile Orientation
+ * - X
+ - Pointy-top
+ * - Y
+ - Straight-top
+
+
+.. raw:: html
+
+ New in Tiled 1.12
+
+Oblique
+~~~~~~~
+
+Oblique maps apply a skew transform to achieve a pseudo-3D projection. The amount of skew is
+controlled by the **Skew** map property, in pixels.
+
+**Skew X** determines the horizontal offset applied for each row, while **Skew Y** determines the
+vertical offset applied for each column.
+
+Map Properties
+--------------
+
+The following properties are especially relevant when configuring a map.
+
+Map Size (Fixed vs. Infinite)
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Maps can be **fixed size** or **infinite**. A fixed map has a set width and
+height in tiles, while an infinite map has an auto-growing canvas that expands
+as you paint. The choice impacts how tile layers are stored.
+
+For details on working with infinite maps and converting between the two, see
+:doc:`using-infinite-maps`.
+
+Tile Size
+~~~~~~~~~
+
+The tile width and height define the size of each tile in pixels. These values affect the tile grid
+and the map bounds, but does not affect the size at which tiles are rendered (unless the relevant
+tileset has **Tile Render Size** set to **Map Grid Size**).
+
+Parallax Origin
+~~~~~~~~~~~~~~~
+
+The parallax origin defines the reference point for :ref:`parallax scrolling
+factor ` on layers. It is stored per map and defaults to
+(0, 0), which is the top-left of the map's bounding box.
+
+Tile Layer Format
+~~~~~~~~~~~~~~~~~
+
+The tile layer format determines how tile data is stored when saving or
+exporting the map. Some formats are more compact or faster to parse than
+others. You can change the format at any time in the **Properties** panel,
+via *Map -> Map Properties…*.
diff --git a/docs/manual/objects.rst b/docs/manual/objects.rst
index 3a391bf436..039b35589c 100644
--- a/docs/manual/objects.rst
+++ b/docs/manual/objects.rst
@@ -81,7 +81,7 @@ collision shape needs to represent a circle or ellipse.
.. raw:: html
- Since Tiled 1.12
+ New in Tiled 1.12
.. _insert-capsule-tool:
diff --git a/docs/manual/preferences.rst b/docs/manual/preferences.rst
index d82bfbf461..322f824ef2 100644
--- a/docs/manual/preferences.rst
+++ b/docs/manual/preferences.rst
@@ -206,7 +206,7 @@ as they depend on the system.
.. raw:: html
- New in Tiled 1.10
+ Since Tiled 1.10
Custom Interface Font
~~~~~~~~~~~~~~~~~~~~~
diff --git a/docs/manual/scripting.rst b/docs/manual/scripting.rst
index 7e7b5cddc3..4c4c54d27f 100644
--- a/docs/manual/scripting.rst
+++ b/docs/manual/scripting.rst
@@ -80,7 +80,7 @@ startup.
.. raw:: html
- Since Tiled 1.8
+ Since Tiled 1.8
When using the ``.mjs`` extension, script files are loaded as `JavaScript
modules`_. They will then be able to use the `import`_ and `export`_ statements
@@ -110,7 +110,7 @@ script expressions.
.. raw:: html
- Since Tiled 1.9
+ Since Tiled 1.9
.. _script-cli:
diff --git a/docs/manual/using-commands.rst b/docs/manual/using-commands.rst
index 0623c880cb..700902d8fd 100644
--- a/docs/manual/using-commands.rst
+++ b/docs/manual/using-commands.rst
@@ -4,9 +4,9 @@ Using Commands
The Command Button allows you to create and run shell commands (other
programs) from Tiled.
-You may setup as many commands as you like. This is useful if you edit
+You may set up as many commands as you like. This is useful if you edit
maps for multiple games and you want to set up a command for each game.
-Or you could setup multiple commands for the same game that load
+Or you could set up multiple commands for the same game that load
different checkpoints or configurations.
The Command Button
@@ -100,7 +100,7 @@ the following variables:
.. raw:: html
- New in Tiled 1.9
+ Since Tiled 1.9
``%worldfile``
the full path of the world the current map is part of, if any.
diff --git a/docs/map.dtd b/docs/map.dtd
index c64372921d..25274591aa 100644
--- a/docs/map.dtd
+++ b/docs/map.dtd
@@ -17,12 +17,14 @@
xmlns:xsi CDATA #IMPLIED
xsi:schemaLocation CDATA #IMPLIED
version CDATA #REQUIRED
- orientation (orthogonal | isometric | staggered | hexagonal | shifted) #REQUIRED
+ orientation (orthogonal | isometric | oblique | staggered | hexagonal | shifted) #REQUIRED
renderorder (right-down | right-up | left-down | left-up)
width CDATA #REQUIRED
height CDATA #REQUIRED
tilewidth CDATA #REQUIRED
tileheight CDATA #REQUIRED
+ skewx CDATA #IMPLIED
+ skewy CDATA #IMPLIED
>
diff --git a/docs/map.xsd b/docs/map.xsd
index 0d649d7f74..02741d933c 100644
--- a/docs/map.xsd
+++ b/docs/map.xsd
@@ -104,6 +104,7 @@
+
@@ -362,6 +363,8 @@
+
+
diff --git a/docs/reference/json-map-format.rst b/docs/reference/json-map-format.rst
index 3b316854f1..7651e94246 100644
--- a/docs/reference/json-map-format.rst
+++ b/docs/reference/json-map-format.rst
@@ -28,11 +28,13 @@ Map
layers, array, "Array of :ref:`Layers `"
nextlayerid, int, "Auto-increments for each layer"
nextobjectid, int, "Auto-increments for each placed object"
- orientation, string, "``orthogonal``, ``isometric``, ``staggered`` or ``hexagonal``"
+ orientation, string, "``orthogonal``, ``isometric``, ``oblique``, ``staggered`` or ``hexagonal``"
parallaxoriginx, double, "X coordinate of the parallax origin in pixels (since 1.8, default: 0)"
parallaxoriginy, double, "Y coordinate of the parallax origin in pixels (since 1.8, default: 0)"
properties, array, "Array of :ref:`Properties `"
renderorder, string, "``right-down`` (the default), ``right-up``, ``left-down`` or ``left-up`` (currently only supported for orthogonal maps)"
+ skewx, int, "X offset applied per tile row (oblique maps only)"
+ skewy, int, "Y offset applied per tile column (oblique maps only)"
staggeraxis, string, "``x`` or ``y`` (staggered / hexagonal maps only)"
staggerindex, string, "``odd`` or ``even`` (staggered / hexagonal maps only)"
tiledversion, string, "The Tiled version used to save the file"
diff --git a/docs/reference/tmx-changelog.rst b/docs/reference/tmx-changelog.rst
index 3855063b1a..a05f370c76 100644
--- a/docs/reference/tmx-changelog.rst
+++ b/docs/reference/tmx-changelog.rst
@@ -9,6 +9,10 @@ Tiled 1.12
- Added ``mode`` attribute on :ref:`tmx-layer` to specific its blend mode.
+- Added ``oblique`` to the supported values for the ``orientation`` attribute
+ on the :ref:`tmx-map` element, along with the ``skewx`` and ``skewy``
+ attributes for configuring the per-row/column skew in pixels.
+
- Added capsule object shape. Same parameters as rectangular objects,
but marked as capsule with a child element:
diff --git a/docs/reference/tmx-map-format.rst b/docs/reference/tmx-map-format.rst
index df50932cd0..96e1464210 100644
--- a/docs/reference/tmx-map-format.rst
+++ b/docs/reference/tmx-map-format.rst
@@ -48,7 +48,7 @@ in what changed between Tiled versions.
1.0.1). May be a date (for snapshot builds). (optional)
- **class:** The class of this map (since 1.9, defaults to "").
- **orientation:** Map orientation. Tiled supports "orthogonal",
- "isometric", "staggered" and "hexagonal" (since 0.11).
+ "isometric", "oblique", "staggered" and "hexagonal" (since 0.11).
- **renderorder:** The order in which tiles on tile layers are rendered.
Valid values are ``right-down`` (the default), ``right-up``,
``left-down`` and ``left-up``. In all cases, the map is drawn
@@ -59,6 +59,8 @@ in what changed between Tiled versions.
- **height:** The map height in tiles.
- **tilewidth:** The width of a tile.
- **tileheight:** The height of a tile.
+- **skewx:** For oblique maps, the pixel offset per tile row.
+- **skewy:** For oblique maps, the pixel offset per tile column.
- **hexsidelength:** Only for hexagonal maps. Determines the width or
height (depending on the staggered axis) of the tile's edge, in
pixels.
@@ -98,7 +100,8 @@ order in which these layers appear is the order in which the layers are
rendered by Tiled.
The ``staggered`` orientation refers to an isometric map using staggered
-axes.
+axes. The ``oblique`` orientation uses a skewed grid of parallelogram-shaped
+tiles.
The tilesets used by the map should always be listed before the layers.
diff --git a/src/libtiled/isometricrenderer.cpp b/src/libtiled/isometricrenderer.cpp
index 3f85f3feec..16cc1f10b9 100644
--- a/src/libtiled/isometricrenderer.cpp
+++ b/src/libtiled/isometricrenderer.cpp
@@ -30,9 +30,9 @@
#include "map.h"
#include "mapobject.h"
+#include "objectgroup.h"
#include "tile.h"
#include "tilelayer.h"
-#include "objectgroup.h"
#include
diff --git a/src/libtiled/libtiled.qbs b/src/libtiled/libtiled.qbs
index 06db522c02..cf7d9a0772 100644
--- a/src/libtiled/libtiled.qbs
+++ b/src/libtiled/libtiled.qbs
@@ -138,6 +138,8 @@ DynamicLibrary {
"mapwriter.h",
"minimaprenderer.cpp",
"minimaprenderer.h",
+ "obliquerenderer.cpp",
+ "obliquerenderer.h",
"object.cpp",
"object.h",
"objectgroup.cpp",
diff --git a/src/libtiled/map.cpp b/src/libtiled/map.cpp
index 45fc178d61..1726f4555b 100644
--- a/src/libtiled/map.cpp
+++ b/src/libtiled/map.cpp
@@ -578,6 +578,8 @@ QString Tiled::orientationToString(Map::Orientation orientation)
return QStringLiteral("staggered");
case Map::Hexagonal:
return QStringLiteral("hexagonal");
+ case Map::Oblique:
+ return QStringLiteral("oblique");
}
return QString();
}
@@ -593,6 +595,8 @@ Map::Orientation Tiled::orientationFromString(const QString &string)
orientation = Map::Staggered;
} else if (string == QLatin1String("hexagonal")) {
orientation = Map::Hexagonal;
+ } else if (string == QLatin1String("oblique")) {
+ orientation = Map::Oblique;
}
return orientation;
}
diff --git a/src/libtiled/map.h b/src/libtiled/map.h
index 5e4ddd3833..f4f96c553b 100644
--- a/src/libtiled/map.h
+++ b/src/libtiled/map.h
@@ -83,6 +83,7 @@ class TILEDSHARED_EXPORT Map : public Object
HexSideLengthProperty,
StaggerAxisProperty,
StaggerIndexProperty,
+ SkewProperty,
ParallaxOriginProperty,
OrientationProperty,
RenderOrderProperty,
@@ -97,14 +98,16 @@ class TILEDSHARED_EXPORT Map : public Object
* Orthogonal map is using rectangular tiles that are aligned on a
* straight grid. An Isometric map uses diamond shaped tiles that are
* aligned on an isometric projected grid. A Hexagonal map uses hexagon
- * shaped tiles that fit into each other by shifting every other row.
+ * shaped tiles that fit into each other by shifting every other row. An
+ * Oblique map uses a skewed grid of parallelogram-shaped tiles.
*/
enum Orientation {
Unknown,
Orthogonal,
Isometric,
Staggered,
- Hexagonal
+ Hexagonal,
+ Oblique
};
/**
@@ -160,6 +163,8 @@ class TILEDSHARED_EXPORT Map : public Object
int hexSideLength = 0;
StaggerAxis staggerAxis = StaggerY;
StaggerIndex staggerIndex = StaggerOdd;
+ int skewX = 0;
+ int skewY = 0;
QPointF parallaxOrigin;
QColor backgroundColor;
};
@@ -226,6 +231,12 @@ class TILEDSHARED_EXPORT Map : public Object
void setStaggerIndex(StaggerIndex staggerIndex);
void invertStaggerIndex();
+ int skewX() const;
+ void setSkewX(int skewX);
+
+ int skewY() const;
+ void setSkewY(int skewY);
+
QPointF parallaxOrigin() const;
void setParallaxOrigin(const QPointF ¶llaxOrigin);
@@ -506,6 +517,26 @@ inline void Map::invertStaggerIndex()
mParameters.staggerIndex = static_cast(!mParameters.staggerIndex);
}
+inline int Map::skewX() const
+{
+ return mParameters.skewX;
+}
+
+inline void Map::setSkewX(int skewX)
+{
+ mParameters.skewX = skewX;
+}
+
+inline int Map::skewY() const
+{
+ return mParameters.skewY;
+}
+
+inline void Map::setSkewY(int skewY)
+{
+ mParameters.skewY = skewY;
+}
+
inline QPointF Map::parallaxOrigin() const
{
return mParameters.parallaxOrigin;
diff --git a/src/libtiled/mapreader.cpp b/src/libtiled/mapreader.cpp
index ee58d5708a..2d0bad71d9 100644
--- a/src/libtiled/mapreader.cpp
+++ b/src/libtiled/mapreader.cpp
@@ -270,6 +270,10 @@ std::unique_ptr