TinyCircuits Forum

TinyCircuits Products => Thumby => Topic started by: Windows Vista on November 06, 2021, 11:57:01 PM

Title: Sprite not being completely mirrored?
Post by: Windows Vista on November 06, 2021, 11:57:01 PM
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!
Title: Re: Sprite not being completely mirrored?
Post by: Jason on November 08, 2021, 10:41:52 AM
There is an issue with sprite mirroring in the
Code: [Select]
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.
Title: Re: Sprite not being completely mirrored?
Post by: Windows Vista on November 08, 2021, 11:40:46 AM
That's cool, I was just worried I was missing something basic :D
Thanks for the response!
Title: Re: Sprite not being completely mirrored?
Post by: CoolieCoolster on November 09, 2021, 07:40:31 PM
While it only works with flipping across the x-axis due to how the bitmap data values are ordered, until mirroring is fixed
Code: [Select]
thumby.display.blit(list(reversed(bitmapname)) appears to be a functional alternative that works with the default Python functions.