From 167710b4b21b2f8c5628d8112c8047d3cf06e670 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Sat, 1 Oct 2022 17:42:53 -0400 Subject: [PATCH] Update manual and changelog --- CHANGELOG.md | 2 +- docsrc/manual/scripting-capabilities.rst | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4ea959bb..3574bd5e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/docsrc/manual/scripting-capabilities.rst b/docsrc/manual/scripting-capabilities.rst index ce8195e8..f1be56c4 100644 --- a/docsrc/manual/scripting-capabilities.rst +++ b/docsrc/manual/scripting-capabilities.rst @@ -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``