This patch solves several problems introducing the possibility to
specify a row stride bigger than the width (visible pixels) on each
image row. Useful in case that we want to align the initial pixel
address of each row (if DOC_USE_ALIGNED_PIXELS is defined).
This allows us to use some SIMD intrinsics (e.g. SSE2) for some image
functions in the future (right now implemented only in the new
is_same_image_simd_templ() for is_same_image()).
Anyway to avoid breaking some existing code, by default we'll still
keep the old behavior: row stride bytes = width bytes (so
DOC_USE_ALIGNED_PIXELS is undefined).
New json.decode(jsonText) and json.encode(luaTable) functions.
In this way we don't depend on third-party libraries to decode/encode
JSON text which is a quite common task (in tests and export scripts).
This is the first attempt to finally implement the require() function
on Lua. The main problem was how to solve conflicts between plugins
that use the same library name. Here we separate each plugin like in a
namespace, so require(name) inside a plugin will save the module in
_LOADED["pluginName/libraryName"] to avoid conflicts with other
libraryName from other plugins.
We can use:
Image:clear()
Image:clear(color)
Image:clear(rectangle)
Image:clear(rectangle, color)
If the color is not specified it will be the transparent color of the
image.
Co-authored-by: David Capello <david@igara.com>
* Now a Cel has a z-index property to change the order of layers per frame
* A new doc::RenderPlan class can calculate the order of cels to be rendered
* z-index is saved as a int16_t in the .aseprite files
* This new field can be set/get from Lua with Cel.zIndex
Now the equivalent was "{tag}_{frame1}.png", but it looks like a
regression reported here https://community.aseprite.org/t/17253 were
it was possible to just specify the frame number as in "{tag}_1.png"
Added a Sprite.tileManagementPlugin property for plugins that want to
replace the standard tilemap/tileset interface. This includes a new
external file field in .aseprite files to specify that the sprite
tiles are controlled by a specific plugin.
Once this property is set, the standard tilemap/tileset modes
selectors will disappear and the only way to make then available will
be setting this property to nil/empty string again.
Fix https://github.com/aseprite/Attachment-System/issues/21
Actually it looks like a long-standing bug in the write/read_tileset()
functions where tileset names aren't saved (so another bug fixed with
this change is that restoring a tileset from a crashes session/file,
will restore the tileset name correctly).