RandyGaul / cute_headers

Collection of cross-platform one-file C/C++ libraries with no dependencies, primarily used for games
4.29k stars 267 forks source link

If layer opacity does not have a valid value, use full opacity. #276

Closed jdpalmer closed 2 years ago

jdpalmer commented 2 years ago

I have an older ASE file (circa 2014), which in Aseprite, shows a layer at full opacity. But as written to disk, the "layer opacity has valid value" flag is set to false (0) and the layer opacity is set to zero. The current cute_aseprite code ignores the "Layer opacity has valid value" flag. This patch changes the behavior to match Aseprite.

Note that if I re-save the 2014 file in a current version of Aseprite (1.2.25 or 1.3 beta), the "layer opacity has valid value" flag gets set to 1 and the opacity gets set to 255.

RandyGaul commented 2 years ago

Ahhh, so that's what that layer opacity bit meant. Thank you for the pull request!