Subversion Repositories DashDisplay

Rev

Rev 59 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
50 mjames 1
/*
2
 * splash.c
3
 *
4
 *  Created on: 5 Dec 2020
5
 *      Author: mike
6
 */
7
const
8
#include "res/bouncy1.xbm"
9
#include "libOLED/displayClass.H"
10
#include "splash.H"
11
 
12
void
13
displaySplash (display_t &display)
14
{
15
  int cnt = 0;
16
  display.setPixelMode (colour_t::WHITE); // the bitmap is inverted
17
  for (int y = 0; y < bouncy1_height; y++)
18
  {
19
          for (int x = 0; x < bouncy1_width; x++)
20
        {
21
          int index = (y * bouncy1_width + x) / 8;
22
          uint8_t pixel = ((bouncy1_bits[index]) >> (x & 7)) & 1;
23
          display.drawPixel (x, y, !pixel);
59 mjames 24
 
25
          if(!pixel && ++cnt==4) { display.display(); cnt = 0; }
50 mjames 26
        }
27
    }
28
}
29