There is a flip sprite horizontal and or vertical in the library but it only works on 8x8 sprites. To flip the 16x16 sprites you have to flip the 4 8x8 sections of the 16x16 sprite separately. I was fooling with it and was unhappy with it.
I found it easier to just load a new pattern into the sprite definition on the fly.
You can make it seemless if you want to by using 2 different alternating sprites for odd or even frames.
i use a game counter 0-9 (10 total frames) to organize when things update.
On the even frames (0,2,4,6,8) use sprite pattern 0 & redraw the pattern in 1 once you swap
On the odd frames (1,3,5,7,9) use sprite pattern 1 & redraw the pattern in 0 once you swap
example. bat can use sprite pattern 0 or sprite pattern 1 depending on odd or even frame.
if bat is currently using sprite pattern 0 on and even frame then you can change the pattern in sprite pattern 1 without if being notice.
then on the odd frame (game loop counter ) you use pattern 1 and can replace the pattern in sprite pattern 0
you can also just replace the current sprite directly but you might notice glitches because it redraws the sprite pattern directly on screen. Sometimes its unnoticeable.
here is the code: (1*32) is sprite 1 (0*32) is sprite 0 and 32 bytes of data blocks
Here is the 32 byte sprite data to replace the pattern with: Obviously replace the sprite data with your sprite data.
const byte upperbody=