Sprite not being completely mirrored?

Started by Windows Vista, November 06, 2021, 11:57:01 PM

Previous topic - Next topic

Windows Vista

**
Jr. Member
Posts: 6
Logged
Please see attached screenshot.  In the screenshot, the two feet of the monster sprite, on the right, aren't mirrored.
I'm trying to mirror this sprite but it's only mirroring most of it. What did I miss or am doing wrong?

# BITMAP: width: 20, height: 27
evilMon_sprite = (0,0,0,128,192,64,200,152,48,32,0,0,16,152,72,76,64,128,0,0,
           0,128,6,31,16,18,22,16,27,14,0,228,143,8,8,9,10,15,128,0,
           0,10,7,2,2,2,0,32,50,22,20,20,51,32,2,2,2,7,10,0,
           0,0,0,0,0,0,0,0,7,4,4,0,7,4,4,0,0,0,0,0)

thumby.display.drawSprite(evilMon_sprite, 25, 0, 20, 27, 1, 0, 0)

Thanks for your time!

Jason

Administrator
*****
Hero Member
Posts: 107
TinyCircuits Employee
Logged
There is an issue with sprite mirroring in the drawSprite(...) function. We are looking into a fix.

For now, you could draw the sprite in an image editor (GIMP, etc), draw one version, mirror it, export from the program, and import both versions into the bitmap Builder. We know this is ugly, but it is a quick fix for now.

Windows Vista

**
Jr. Member
Posts: 6
Logged
That's cool, I was just worried I was missing something basic :D
Thanks for the response!

CoolieCoolster

***
Full Member
Posts: 30
Logged
While it only works with flipping across the x-axis due to how the bitmap data values are ordered, until mirroring is fixed thumby.display.blit(list(reversed(bitmapname)) appears to be a functional alternative that works with the default Python functions.

SMF spam blocked by CleanTalk