Blame |
Last modification |
View Log
| Download
| RSS feed
/*
* splash.c
*
* Created on: 5 Dec 2020
* Author: mike
*/
const
#include "res/bouncy1.xbm"
#include "libOLED/displayClass.H"
#include "splash.H"
void
displaySplash (display_t &display)
{
int cnt = 0;
display.setPixelMode (colour_t::WHITE); // the bitmap is inverted
for (int y = 0; y < bouncy1_height; y++)
{
for (int x = 0; x < bouncy1_width; x++)
{
int index = (y * bouncy1_width + x) / 8;
uint8_t pixel = ((bouncy1_bits[index]) >> (x & 7)) & 1;
display.drawPixel (x, y, !pixel);
if(!pixel && ++cnt==10) { display.display(); cnt = 0; }
}
}
}