Update manual and changelog

This commit is contained in:
GriffinR 2022-10-01 17:42:53 -04:00 committed by Marcus Huderle
parent 1b743f9625
commit 167710b4b2
2 changed files with 4 additions and 3 deletions

View file

@ -10,7 +10,7 @@ The **"Breaking Changes"** listed below are changes that have been made in the d
### Breaking Changes
- Proper support for pokefirered's clone objects was added, which requires the changes made in [pokefirered/#484](https://github.com/pret/pokefirered/pull/484).
- Many API functions which were previously accessible via the `map` object are now accessible via one of the new objects `overlay`, `utility`, or `constants`. Some functions were renamed accordingly. See [porymap/#460](https://github.com/huderlem/porymap/pull/460) for a full list of API function name changes.
- The boolean arguments `xflip` and `yflip` in the API function `createImage` have been replaced with arguments for horizontal and vertical scale.
- Arguments for the API function `createImage` have changed: `xflip` and `yflip` have been replaced with `hScale` and `vScale`, and `offset` has been replaced with `xOffset` and `yOffset`.
### Added
- Add prefab support

View file

@ -1130,7 +1130,7 @@ All overlay functions are callable via the global ``overlay`` object.
:param number layer: the layer id. Defaults to ``0``
:param boolean useCache: whether the image should be saved/loaded using the cache. Defaults to ``true``. Reading images from a file is slow. Setting ``useCache`` to ``true`` will save the image to memory so that the next time the filepath is encountered the image can be loaded from memory rather than the file.
.. js:function:: overlay.createImage(x, y, filepath, width = -1, height = -1, offset = 0, hScale = 1, vScale = 1, paletteId = -1, setTransparency = false, layer = 0, useCache = true)
.. js:function:: overlay.createImage(x, y, filepath, width = -1, height = -1, xOffset = 0, yOffset = 0, hScale = 1, vScale = 1, paletteId = -1, setTransparency = false, layer = 0, useCache = true)
Creates an image item on the specified overlay layer. This differs from ``overlay.addImage`` by allowing the new image to be a transformation of the image file.
@ -1139,7 +1139,8 @@ All overlay functions are callable via the global ``overlay`` object.
:param string filepath: the image's filepath
:param number width: the width in pixels of the area to read in the image. If ``-1``, use the full width of the original image. Defaults to ``-1``
:param number height: the height in pixels of the area to read in the image. If ``-1``, use the full height of the original image. Defaults to ``-1``
:param number offset: the pixel offset into the original image where data should be read from. Defaults to ``0``
:param number xOffset: the x pixel coordinate on the original image where data should be read from. Defaults to ``0``
:param number yOffset: the y pixel coordinate on the original image where data should be read from. Defaults to ``0``
:param number hScale: the horizontal scale for the image. Negative values will be a horizontal flip of the original image. Defaults to ``1``
:param number vScale: the vertical scale for the image. Negative values will be a vertical flip of the original image. Defaults to ``1``
:param number paletteId: the id of which currently loaded tileset palette to use for the image. If ``-1``, use the original image's palette. Defaults to ``-1``