Sprite not being completely mirrored?

Windows Vista

  • Newbie
  • *
    • Posts: 2
    • View Profile
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!
« Last Edit: November 07, 2021, 12:14:51 AM by Windows Vista »


Jason

  • Administrator
  • Full Member
  • *****
    • Posts: 22
  • TinyCircuits Employee
    • View Profile
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.


Windows Vista

  • Newbie
  • *
    • Posts: 2
    • View Profile
That's cool, I was just worried I was missing something basic :D
Thanks for the response!


CoolieCoolster

  • Full Member
  • ***
    • Posts: 30
    • View Profile
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.


 

SMF spam blocked by CleanTalk