Skip to content

Commit 647e595

Browse files
Merge pull request #758 from GriffinRichards/metatile-layers
New metatile export options, metatile/tile image fixes
2 parents 4ea92dd + be97285 commit 647e595

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+2417
-979
lines changed

docsrc/manual/scripting-capabilities.rst

Lines changed: 72 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1222,6 +1222,58 @@ All tileset functions are callable via the global ``map`` object.
12221222
:returns: the pixel data
12231223
:rtype: array
12241224

1225+
.. |describe-metatile-layer-order|
1226+
replace:: where ``0`` is the bottom layer, ``1`` is the middle layer, and ``2`` is the top layer. The default order is ``[0, 1, 2]``
1227+
1228+
.. |describe-metatile-layer-order-handling|
1229+
replace:: If no elements are provided the layer order will be reset to the default. Any layer not listed in the provided ``order`` will not be rendered. Any additional elements after the first 3 are ignored
1230+
1231+
.. js:function:: map.getMetatileLayerOrder()
1232+
1233+
Gets the order that metatile layers are rendered for the current layout, |describe-metatile-layer-order|.
1234+
1235+
If you'd like to get the default metatile layer order for all layouts, see :js:func:`utility.getMetatileLayerOrder` instead.
1236+
1237+
:returns: array of layers
1238+
:rtype: array
1239+
1240+
.. js:function:: map.setMetatileLayerOrder(order)
1241+
1242+
Sets the order that metatile layers are rendered for the current layout, |describe-metatile-layer-order|.
1243+
1244+
|describe-metatile-layer-order-handling|.
1245+
1246+
If you'd like to set the default metatile layer order for all layouts, see :js:func:`utility.setMetatileLayerOrder` instead.
1247+
1248+
:param order: array of layers
1249+
:type order: array
1250+
1251+
.. |describe-metatile-layer-opacity|
1252+
replace:: where the first element is the bottom layer, the second element is the middle layer, and the third element is the top layer. The default opacities are ``[1.0, 1.0, 1.0]``
1253+
1254+
.. |describe-metatile-layer-opacity-handling|
1255+
replace:: Any additional elements after the first 3 are ignored. Any elements not provided will be rendered with opacity ``1.0``
1256+
1257+
.. js:function:: map.getMetatileLayerOpacity()
1258+
1259+
Gets the opacities that metatile layers are rendered with for the current layout, |describe-metatile-layer-opacity|.
1260+
1261+
If you'd like to get the default metatile layer opacities for all layouts, see :js:func:`utility.getMetatileLayerOpacity` instead.
1262+
1263+
:returns: array of opacities for each layer
1264+
:rtype: array
1265+
1266+
.. js:function:: map.setMetatileLayerOpacity(opacities)
1267+
1268+
Sets the opacities that metatile layers are rendered with for the current layout, |describe-metatile-layer-opacity|.
1269+
1270+
|describe-metatile-layer-opacity-handling|.
1271+
1272+
If you'd like to set the default metatile layer opacities for all layouts, see :js:func:`utility.setMetatileLayerOpacity` instead.
1273+
1274+
:param opacities: array of opacities for each layer
1275+
:type opacities: array
1276+
12251277
Overlay Functions
12261278
^^^^^^^^^^^^^^^^^
12271279

@@ -1811,30 +1863,42 @@ All settings functions are callable via the global ``utility`` object.
18111863

18121864
.. js:function:: utility.getMetatileLayerOrder()
18131865

1814-
Gets the order that metatile layers are rendered.
1866+
Gets the order that metatile layers are rendered by default, |describe-metatile-layer-order|.
18151867

1816-
:returns: array of layers. The bottom layer is represented as 0.
1868+
If you'd like to get the metatile layer order for only the current layout, see :js:func:`map.getMetatileLayerOrder` instead.
1869+
1870+
:returns: array of layers
18171871
:rtype: array
18181872

18191873
.. js:function:: utility.setMetatileLayerOrder(order)
18201874

1821-
Sets the order that metatile layers are rendered.
1875+
Sets the order that metatile layers are rendered by default, |describe-metatile-layer-order|.
1876+
1877+
|describe-metatile-layer-order-handling|.
18221878

1823-
:param order: array of layers. The bottom layer is represented as 0.
1879+
If you'd like to set the metatile layer order for only the current layout, see :js:func:`map.setMetatileLayerOrder` instead.
1880+
1881+
:param order: array of layers
18241882
:type order: array
18251883

18261884
.. js:function:: utility.getMetatileLayerOpacity()
18271885

1828-
Gets the opacities that metatile layers are rendered with.
1886+
Gets the opacities that metatile layers are rendered with by default, |describe-metatile-layer-opacity|.
1887+
1888+
If you'd like to get the metatile layer opacities for only the current layout, see :js:func:`map.getMetatileLayerOpacity` instead.
18291889

1830-
:returns: array of opacities for each layer. The bottom layer is the first element.
1890+
:returns: array of opacities for each layer
18311891
:rtype: array
18321892

18331893
.. js:function:: utility.setMetatileLayerOpacity(opacities)
18341894

1835-
Sets the opacities that metatile layers are rendered with.
1895+
Sets the opacities that metatile layers are rendered with by default, |describe-metatile-layer-opacity|.
1896+
1897+
|describe-metatile-layer-opacity-handling|.
1898+
1899+
If you'd like to set the metatile layer opacities for only the current layout, see :js:func:`map.setMetatileLayerOpacity` instead.
18361900

1837-
:param opacities: array of opacities for each layer. The bottom layer is the first element.
1901+
:param opacities: array of opacities for each layer
18381902
:type opacities: array
18391903

18401904

0 commit comments

Comments
 (0)