From 9d6f0cce50cb2cde4eb558bac73277eb5395cfcf Mon Sep 17 00:00:00 2001 From: Julian Date: Mon, 5 Nov 2018 08:03:05 +0100 Subject: Added display drivers, and simple demo --- sprites.h | 62 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 sprites.h (limited to 'sprites.h') diff --git a/sprites.h b/sprites.h new file mode 100644 index 0000000..5aceee4 --- /dev/null +++ b/sprites.h @@ -0,0 +1,62 @@ +#ifndef sprites +#define sprites + +struct Sprite { + uint8_t buff[8]; + uint8_t width; + uint8_t height; +}; + +const Sprite smiley = { + { + 0b11001100, + 0b11001100, + 0b00000000, + 0b00110000, + 0b10000000, + 0b11111100, + 0b00000000, + 0b00000000 + }, 6, 6 +}; + +const Sprite checker = { + { + 0b10101010, + 0b01010101, + 0b10101010, + 0b01010101, + 0b10101010, + 0b01010101, + 0b10101010, + 0b01010101 + }, 8, 8 +}; + +const Sprite ball = { + { + 0b11100000, + 0b10100000, + 0b11100000, + 0b00000000, + 0b00000000, + 0b00000000, + 0b00000000, + 0b00000000 + }, 3, 3 +}; + +const Sprite miniSmiley = { + { + 0b01010000, + 0b10000000, + 0b11110000, + 0b00000000, + 0b00000000, + 0b00000000, + 0b00000000, + 0b00000000 + }, 4, 3 +}; + +#endif -- cgit v1.2.3