It’s the return of my Totally Non-Infringing Tale of Grelda test project from last year!
Looks like if you apply a non-zero rotation to a sprite (via
playdate.graphics.sprite:setRotation(angle, [scale, [yScale]])), the sprite will draw with a black background.
I’ve attached the project. Use the crank to spin the sword. Relevant code can be seen in
sprite_hero.lua; see references to the
sword sprite property.
Grelda.zip (80.4 KB)
I am also seeing this on my project after updating to SDK v1.2.1
I screwed up big time. I wanted to avoid creating a mask for images rotated a multiple of 90 degrees, but not only did I forget to leave it for images that have a mask I even got the logic backwards.
int needsMask = fabsf(rotation - 90 * roundf(rotation/90)) < 0.01;
We should have had a unit test to catch that. I’m filing an issue to add this to the image drawing test and also add any others that we may have missed. It’s really upsetting that this didn’t get caught before going out.