thumby-grayscale
thumby-grayscale copied to clipboard
A library to easily use grayscale on the Thumby
In the current version the ghost blocks are drawn over the falling piece. This PR puts them beneath.
This allows the display pipeline to have an optimised update process: - show_async() - do some game logic & draw to a temp buffer - show_wait() - copy to display...
I got a thumby a couple weeks ago and when using the grayscale library, the image either flickers between two positions, or is just monochrome. It gives different results randomly,...
Starting the BrightnessTest, at least in Fast Execute (menu launch not tested) will have a bright horizontal artifact roll down the screen and then become stable.
For that device, 0 is off and 1 is lowest brightness. Thanks to Unimatrix0 for sharing fix: "... the low brightness being broken can be fixed by simply changing brightnessVals=[0,28,127]...
thumbyGraphics: ``` def drawSprite(self, s): self.blit(s.bitmap, int(s.x), int(s.y), s.width, s.height, s.key, s.mirrorX, s.mirrorY) ``` thumbyGrayscale: ``` @micropython.native def drawSprite(self, s): self.blit(s.bitmap, s.x, s.y, s.width, s.height, s.key, s.mirrorX, s.mirrorY) ``` Thanks...
When using a grayscale `Sprite` with `thumbyGraphics`, it would be nice if it would just show the black and white version of the image. We've lost that compatibility in #5