diff --git a/Inc/image.h b/Inc/image.h index 1b9ce67..ba41ce6 100644 --- a/Inc/image.h +++ b/Inc/image.h @@ -1,3 +1,3 @@ -#include "stm32f4xx_hal.h" - -extern uint8_t image[]; \ No newline at end of file +#include "stm32f4xx_hal.h" + +extern uint8_t image[]; diff --git a/Inc/sprites.h b/Inc/sprites.h index be75989..427dfb3 100644 --- a/Inc/sprites.h +++ b/Inc/sprites.h @@ -1,9 +1,9 @@ #include "stm32f4xx_hal.h" typedef struct { - const uint8_t width; - const uint8_t height; - const uint8_t *buffer; + uint8_t width; + uint8_t height; + uint8_t *buffer; } SpriteDef; typedef struct { diff --git a/Inc/ssd1306.h b/Inc/ssd1306.h index b58a02e..de16a81 100644 --- a/Inc/ssd1306.h +++ b/Inc/ssd1306.h @@ -96,8 +96,7 @@ char ssd1306_WriteString(char* str, FontDef Font, SSD1306_COLOR color); void ssd1306_SetCursor(uint8_t x, uint8_t y); void ssd1306_WriteCommand(uint8_t command); -//void ssd1306_ScrollUp(unsigned int pixels, unsigned int delay); -void ssd1306_ScrollUp(unsigned int pixels, unsigned int delay, UART_HandleTypeDef uart); +void ssd1306_ScrollUp(uint8_t pixels, uint8_t delay); void startscrollright(uint8_t start, uint8_t stop); void drawLine(int16_t x0, int16_t y0, int16_t x1, int16_t y1); void ssd1306_LoadImage(void); diff --git a/Src/image.c b/Src/image.c index b0bf6de..720e0bd 100644 --- a/Src/image.c +++ b/Src/image.c @@ -1,191 +1,5 @@ #include "image.h" -/* -uint8_t image[1024] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x20, 0x20, 0xe0, 0x20, 0x20, 0x00, - 0xe0, 0xe0, 0x40, 0x40, 0x40, 0xe0, 0xf8, 0xf8, 0xf8, 0xf8, - 0xf8, 0x78, 0x38, 0x38, 0x38, 0x38, 0x38, 0x38, 0x38, 0x38, - 0x38, 0x38, 0x38, 0x38, 0x38, 0x38, 0x78, 0xf8, 0xf8, 0xf8, - 0xf8, 0xf8, 0x00, 0x00, 0x00, 0xf8, 0xf8, 0xf8, 0xf8, 0x38, - 0x38, 0x38, 0x78, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, - 0xf8, 0xf8, 0xf8, 0xf8, 0x38, 0x38, 0x38, 0xf8, 0xf8, 0xf8, - 0xf8, 0x00, 0x00, 0x00, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, - 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0x78, 0x38, 0x38, 0x38, 0xf8, - 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, - 0x00, 0x00, 0x00, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, - 0xf8, 0xf8, 0xf8, 0xf8, 0x78, 0x38, 0x38, 0x38, 0xf8, 0xf8, - 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x03, - 0x00, 0x00, 0x00, 0x07, 0xff, 0xff, 0xff, 0xff, 0x01, 0x00, - 0x00, 0x00, 0xfc, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, - 0xfe, 0xfc, 0xe0, 0xc0, 0xc0, 0xc1, 0xff, 0xff, 0xff, 0xff, - 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, - 0x00, 0xe1, 0xc3, 0x87, 0x0f, 0x1f, 0x3f, 0x7f, 0xff, 0xff, - 0xff, 0xff, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, - 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0x3f, 0x0f, 0x03, 0x00, 0xc0, 0xe0, 0x80, 0x01, 0x07, 0x1f, - 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, - 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, - 0x0f, 0x03, 0x00, 0xc0, 0xe0, 0x80, 0x01, 0x07, 0x1f, 0x7f, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, - 0x7f, 0x7f, 0x7f, 0x77, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, - 0x03, 0x03, 0x03, 0x03, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, - 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, - 0xff, 0xff, 0xfe, 0xfc, 0xf8, 0xf0, 0xe1, 0xc3, 0x87, 0x07, - 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, - 0xff, 0xff, 0xff, 0xff, 0x7f, 0x1f, 0x07, 0x01, 0x80, 0x80, - 0x98, 0x9e, 0x9f, 0x9f, 0x9f, 0x9c, 0x80, 0x80, 0x00, 0x03, - 0x1f, 0x7f, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0xff, - 0xff, 0xff, 0xff, 0xff, 0x1f, 0x07, 0x01, 0x80, 0x80, 0x88, - 0x9e, 0x9f, 0x9f, 0x9f, 0x9c, 0x80, 0x80, 0x00, 0x03, 0x0f, - 0x3f, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xff, 0xff, 0xff, 0xff, 0xfe, 0xfe, 0xfc, 0xfc, 0xfc, 0xfc, - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, - 0xfe, 0xfe, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0xff, - 0xff, 0xff, 0xff, 0xfc, 0xf8, 0xfc, 0xfe, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0xfc, 0xfc, - 0xfc, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0xff, 0xff, - 0xff, 0xff, 0xfc, 0xfc, 0xfc, 0xfc, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0xfc, 0xfc, 0xfc, - 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, - 0xff, 0xfd, 0xfc, 0xfc, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0xfc, 0xfc, 0xfc, 0xff, - 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x07, 0x07, 0x07, - 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, - 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, - 0x07, 0x07, 0x00, 0x00, 0x00, 0x07, 0x07, 0x07, 0x07, 0x07, - 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, - 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, - 0x07, 0x00, 0x00, 0x00, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, - 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, - 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, - 0x00, 0x00, 0x00, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, - 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, - 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, -}; -*/ - -/* -uint8_t image[340] = { - 0x01, 0x00, 0x00, 0xe0, 0xe9, 0x01, 0x0c, 0x20, - 0x20, 0xe0, 0x20, 0x20, 0x00, 0xe0, 0xe0, 0x40, - 0x40, 0x40, 0xe0, 0xf8, 0x40, 0x00, 0x01, 0x78, - 0x38, 0xe0, 0x04, 0x00, 0x01, 0x78, 0xf8, 0x40, - 0x00, 0x02, 0x00, 0x00, 0x00, 0x40, 0x06, 0x01, - 0x38, 0x38, 0xa0, 0x0f, 0x80, 0x00, 0x03, 0x38, - 0x38, 0x38, 0xf8, 0x20, 0x00, 0xa0, 0x1c, 0xa0, - 0x00, 0x40, 0x3f, 0x00, 0xf8, 0xe0, 0x01, 0x00, - 0xe0, 0x17, 0x1c, 0x02, 0x00, 0x00, 0x07, 0x40, - 0x03, 0x00, 0x03, 0x40, 0x04, 0x00, 0xff, 0x20, - 0x00, 0x00, 0x01, 0x20, 0x08, 0x01, 0xfc, 0xfe, - 0xa0, 0x00, 0x04, 0xfc, 0xe0, 0xc0, 0xc0, 0xc1, - 0x20, 0x14, 0x00, 0xff, 0x20, 0x14, 0x20, 0x05, - 0x40, 0x06, 0x07, 0x00, 0xe1, 0xc3, 0x87, 0x0f, - 0x1f, 0x3f, 0x7f, 0x20, 0x0d, 0x40, 0x0e, 0x20, - 0x05, 0xc0, 0x06, 0x40, 0x00, 0x09, 0x3f, 0x0f, - 0x03, 0x00, 0xc0, 0xe0, 0x80, 0x01, 0x07, 0x1f, - 0x60, 0x20, 0x20, 0x00, 0x20, 0x31, 0x20, 0x05, - 0x60, 0x00, 0xe0, 0x0c, 0x1c, 0xe0, 0x03, 0x00, - 0x00, 0xff, 0x20, 0x00, 0x40, 0x0f, 0x04, 0x7f, - 0x7f, 0x7f, 0x77, 0x73, 0x60, 0x00, 0x00, 0x03, - 0x20, 0x00, 0x20, 0x14, 0x40, 0x15, 0x20, 0x05, - 0x40, 0x06, 0x40, 0x07, 0x03, 0xfe, 0xfc, 0xf8, - 0xf0, 0x20, 0x86, 0x40, 0xb8, 0x20, 0x14, 0x40, - 0x15, 0x20, 0x05, 0x10, 0xff, 0x7f, 0x1f, 0x07, - 0x01, 0x80, 0x80, 0x98, 0x9e, 0x9f, 0x9f, 0x9f, - 0x9c, 0x80, 0x80, 0x00, 0x03, 0x80, 0x82, 0x80, - 0x31, 0x01, 0xff, 0xff, 0x60, 0x1c, 0x00, 0x88, - 0xe0, 0x00, 0x1c, 0x02, 0x0f, 0x3f, 0xff, 0x20, - 0x00, 0x20, 0x1c, 0xe0, 0x03, 0x00, 0x20, 0x11, - 0x00, 0xff, 0x20, 0xf4, 0xe0, 0x04, 0x00, 0x01, - 0xfe, 0xfe, 0x20, 0x14, 0x40, 0x28, 0x20, 0x05, - 0x03, 0xff, 0xfc, 0xf8, 0xfc, 0x60, 0x0e, 0x80, - 0x00, 0x40, 0x29, 0x40, 0x09, 0x20, 0x42, 0x40, - 0x06, 0x40, 0x36, 0x40, 0x07, 0x80, 0x00, 0xe0, - 0x06, 0x1c, 0x00, 0xfd, 0x20, 0x1d, 0x80, 0x18, - 0x40, 0x00, 0xe0, 0x02, 0x1c, 0xe0, 0x03, 0x00, - 0x40, 0x1a, 0xe0, 0x0d, 0x00, 0x20, 0x25, 0xe0, - 0x0d, 0x18, 0x40, 0x00, 0xe0, 0x34, 0x1c, 0xe0, - 0x03, 0x00, 0x00, 0x07, 0xe0, 0x10, 0x00, 0x20, - 0x25, 0xe0, 0x10, 0x1b, 0xe0, 0x35, 0x1c, 0x0b, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, -}; -*/ - -/* -uint8_t image[196] = { - 0x78, 0x01, 0xe5, 0x8f, 0x31, 0x12, 0x82, 0x30, - 0x10, 0x45, 0x97, 0x49, 0x91, 0x92, 0x23, 0x24, - 0xc7, 0xb0, 0x83, 0x3b, 0x59, 0x48, 0x97, 0x74, - 0x5a, 0x5a, 0x5a, 0x38, 0x72, 0x15, 0x1c, 0x2f, - 0x12, 0x6f, 0x60, 0x49, 0x11, 0x13, 0x37, 0xb8, - 0x32, 0x1b, 0x06, 0x86, 0x8a, 0xca, 0x37, 0x03, - 0x9b, 0xfd, 0x2f, 0x93, 0x4d, 0x00, 0xfe, 0x0f, - 0xad, 0x9d, 0xd6, 0xe0, 0x5c, 0x5d, 0xd7, 0xae, - 0x4f, 0x34, 0xbb, 0x8c, 0x66, 0x08, 0x71, 0x63, - 0x2a, 0x63, 0xff, 0x05, 0x5b, 0x26, 0x89, 0x86, - 0x52, 0x62, 0x4d, 0x02, 0xc8, 0xf4, 0x89, 0xf4, - 0x8b, 0x48, 0x81, 0x0b, 0x1f, 0x08, 0xef, 0xba, - 0xee, 0x9e, 0x52, 0x0c, 0xa9, 0xc0, 0xf3, 0x71, - 0x2c, 0x55, 0x65, 0xf2, 0x34, 0x12, 0x55, 0x29, - 0xa0, 0x73, 0xb6, 0x90, 0xca, 0x50, 0xb2, 0x26, - 0x39, 0xbf, 0xc8, 0x18, 0x73, 0xd8, 0x0f, 0x08, - 0x64, 0x32, 0x1f, 0x4b, 0xf0, 0xfd, 0x0b, 0xaf, - 0x21, 0xf3, 0xf9, 0x46, 0xc9, 0xc2, 0xda, 0xcb, - 0xad, 0x6d, 0xdb, 0xab, 0xb5, 0x20, 0x14, 0xbf, - 0x63, 0x1c, 0xe4, 0x69, 0x94, 0x65, 0xb5, 0x30, - 0x1f, 0x1f, 0x9d, 0x11, 0x02, 0x3b, 0xc5, 0xf7, - 0x3e, 0xc4, 0x91, 0xb4, 0x93, 0x4b, 0x6a, 0x67, - 0xe5, 0x7b, 0x49, 0x4e, 0xe7, 0xcf, 0xb3, 0x9d, - 0xe4, 0xc8, 0x45, 0xb6, 0x93, 0x9c, 0xf3, 0x07, - 0x85, 0xf0, 0xa9, 0x9b, -}; -*/ - uint8_t image[506] = { 0x78, 0x9c, 0x8d, 0x52, 0xbf, 0x6b, 0xd5, 0x40, 0x1c, 0xbf, 0xbb, 0xa4, 0x4d, 0xd4, 0xd0, 0x3c, 0xa4, 0x43, 0x50, 0xf1, @@ -239,4 +53,3 @@ uint8_t image[506] = { 0xbc, 0x59, 0x68, 0xf3, 0xc0, 0xe6, 0x80, 0x4d, 0xac, 0x3b, 0xfc, 0x05, 0x6e, 0x37, 0xf3, 0xe4, }; - diff --git a/Src/main.c b/Src/main.c index 15f92ef..d2e3e8f 100644 --- a/Src/main.c +++ b/Src/main.c @@ -92,11 +92,12 @@ int main(void) ssd1306_Init(); //starfield_Init(); //cube_Init(); - //DHT22_Init(); + HAL_UART_Receive_IT(&huart1, (uint8_t*) &UART1_Data, 1); //drawLine(0,2, 150, 2); //drawLine(0,4, 150, 4); + ssd1306_LoadImage(); ssd1306_UpdateScreen(); /* USER CODE END 2 */ @@ -107,14 +108,14 @@ int main(void) { /* USER CODE END WHILE */ + //ssd1306_ScrollUp(64, 0); /* USER CODE BEGIN 3 */ //ssd1306_Fill(Black); - //ssd1306_Fill(White); -/* + + /* int x, msg; //ssd1306_ScrollUp(64, 0); - ssd1306_ScrollUp(1, 50, huart1); x = rand() % 60 + 1; msg = rand() % 2 + 1; @@ -123,9 +124,10 @@ int main(void) //starfield_Update(); //cube_Update(60); -*/ + */ + //ssd1306_Anim(); - //ssd1306_UpdateScreen(); + ssd1306_UpdateScreen(); //HAL_Delay(100); } /* USER CODE END 3 */ diff --git a/Src/sprites.c b/Src/sprites.c index 2db46f2..189cd8f 100644 --- a/Src/sprites.c +++ b/Src/sprites.c @@ -1,278 +1,102 @@ #include "sprites.h" -static const uint8_t sprite_0_Buf[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, - 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, - 0x80, 0x80, 0x80, 0x98, 0x98, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, - 0xe0, 0xe0, 0xe0, 0xe0, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0xc1, 0xc1, 0xc1, 0xff, 0xff, 0xfe, 0xfe, 0xfe, 0xfe, - 0xfe, 0xfe, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0xff, 0xff, - 0xf8, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xcf, 0xcf, - 0xff, 0xff, 0xff, 0xff, 0xcf, 0xcf, 0xcf, 0x03, 0x03, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x0c, 0x0c, 0x00, 0x00, - 0x30, 0x30, 0xc0, 0xc0, 0x3f, 0x3f, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xe0, 0x18, 0x18, - 0x18, 0x18, 0x18, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, - 0x86, 0x86, 0x81, 0x81, 0x81, 0x81, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xfe, 0xfe, 0xf8, 0xf8, 0xf8, 0xf8, 0xe0, 0xe0, 0x60, - 0x60, 0x60, 0x98, 0x98, 0x06, 0x06, 0x01, 0x01, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x01, 0x01, 0x0e, 0x0e, 0x0e, 0x0e, 0x0e, 0x01, 0x01, 0x01, - 0x01, 0xf1, 0xf1, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xc1, 0xc1, 0xc0, 0xc0, 0xc0, 0x0f, 0x0f, 0x30, 0x30, - 0x30, 0x30, 0x0e, 0x0e, 0xfe, 0xfe, 0xfe, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x70, - 0x70, 0x0c, 0x0c, 0x03, 0x03, 0x0f, 0x0f, 0x7f, 0x7f, 0x7f, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xf0, 0xf0, 0xff, 0xff, 0x80, 0x80, 0x00, 0x00, 0x00, - 0x03, 0x03, 0x83, 0x83, 0x83, 0x83, 0x03, 0x03, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x78, 0x86, 0x86, - 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x60, 0x60, 0x98, - 0x98, 0x06, 0x06, 0x06, 0x07, 0x07, 0x07, 0x07, 0x1f, 0x1f, - 0x1f, 0x1f, 0x1f, 0x7f, 0x7f, 0x7f, 0x7f, 0xff, 0xff, 0xff, - 0xff, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xff, 0xff, 0x7f, 0x7f, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x03, 0x03, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, - 0x0c, 0x0c, 0x0c, 0x03, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x03, 0x03, 0x03, 0x03, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, - 0x03, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, +static const uint8_t sprite_0_Buf[185] = { + 0x78, 0x9c, 0x8d, 0xd0, 0xbb, 0x0d, 0x83, 0x30, 0x10, 0x00, + 0xd0, 0xb3, 0x4e, 0x22, 0x8d, 0x85, 0xdb, 0x74, 0x59, 0x81, + 0x0d, 0x58, 0x85, 0x11, 0x28, 0xe9, 0x4c, 0x14, 0x89, 0x19, + 0x3c, 0x8e, 0x3d, 0x81, 0x57, 0xf0, 0x08, 0xd0, 0x51, 0x71, + 0x39, 0x63, 0x1c, 0xa1, 0x60, 0x45, 0x79, 0x95, 0x75, 0xf2, + 0x7d, 0x01, 0xbe, 0x8c, 0xd1, 0xe9, 0x6d, 0x4c, 0xc8, 0x3e, + 0xf1, 0x5f, 0x9c, 0x73, 0x44, 0x5b, 0x42, 0xbb, 0x36, 0x23, + 0x5a, 0xd7, 0x3f, 0x2a, 0x80, 0xf7, 0x31, 0xcd, 0x7b, 0x8f, + 0x98, 0x02, 0x52, 0x4a, 0x80, 0xa6, 0xb1, 0xb6, 0x6d, 0x4b, + 0xff, 0x43, 0xb8, 0x47, 0x53, 0xf6, 0x64, 0x7b, 0xe7, 0x6d, + 0x5b, 0x59, 0x08, 0x5d, 0xd7, 0x19, 0x53, 0x55, 0x42, 0x94, + 0xfb, 0x09, 0x51, 0x47, 0x82, 0x2d, 0x0b, 0x5d, 0x38, 0x67, + 0xad, 0x55, 0xaa, 0x61, 0x75, 0xcd, 0x5b, 0x15, 0x2a, 0xf0, + 0x9d, 0xfa, 0x5e, 0x4a, 0x44, 0xa5, 0xb4, 0xd6, 0xa7, 0xdc, + 0x79, 0x26, 0xda, 0xcf, 0x86, 0xf8, 0x62, 0x79, 0xa1, 0xb3, + 0x61, 0x98, 0x26, 0x91, 0x46, 0x4b, 0x63, 0x56, 0x37, 0xf6, + 0x88, 0xf4, 0x51, 0xec, 0x38, 0xa6, 0xd6, 0xe5, 0xf9, 0x11, + 0x65, 0x76, 0x6d, 0x80, 0x18, 0xa7, 0x62, 0xa5, 0xde, 0x00, + 0x6f, 0x90, 0x66, 0x8d, 0xa6, }; -static const uint8_t sprite_1_Buf[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x30, 0x30, - 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xfc, - 0xfc, 0xfc, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xfc, 0xfc, 0xc0, 0xc0, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x06, 0x06, 0x06, 0x7f, 0x7f, 0xff, 0xff, 0xff, 0xff, - 0x7f, 0x7f, 0x7f, 0x1f, 0x1f, 0x07, 0x07, 0x07, 0x07, 0x01, - 0x01, 0x61, 0x61, 0x61, 0x01, 0x01, 0x81, 0x81, 0x07, 0x07, - 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xf0, 0xf0, 0x3e, 0x3e, - 0x0f, 0x0f, 0x0f, 0x0f, 0x3e, 0x3e, 0x3e, 0xf0, 0xf0, 0xc0, - 0xc0, 0xc0, 0xc0, 0x00, 0x00, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, - 0x31, 0x31, 0x0e, 0x0e, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xf0, 0x7f, - 0x7f, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0xfc, 0xfc, - 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0x7f, 0x0f, - 0x0f, 0x0f, 0x70, 0x70, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, - 0xfe, 0x1f, 0x1f, 0x60, 0x60, 0x60, 0xe0, 0xe0, 0xf8, 0xf8, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1f, 0x1f, 0x1f, - 0x1f, 0xf8, 0xf8, 0x18, 0x18, 0x18, 0x18, 0x18, 0x07, 0x07, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x0f, 0x0f, 0x30, 0x30, 0xf0, 0xf0, 0xf0, - 0xf3, 0xf3, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0x0c, 0x0c, 0x0c, 0x0c, 0x03, 0x03, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, - 0x7f, 0x7f, 0x7f, 0x7c, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, +static const uint8_t sprite_1_Buf[152] = { + 0x78, 0x9c, 0xb5, 0xd0, 0x31, 0x0e, 0x84, 0x20, 0x10, 0x05, + 0x50, 0x27, 0x26, 0xd0, 0x6c, 0xa4, 0xb5, 0xe3, 0x0a, 0x78, + 0x01, 0xce, 0x02, 0x37, 0xf0, 0x00, 0x26, 0x83, 0x37, 0xe3, + 0x28, 0x1e, 0x81, 0xc4, 0x86, 0x82, 0xc8, 0x0e, 0x66, 0xd7, + 0xb5, 0xda, 0xa9, 0x7c, 0x05, 0xa1, 0x98, 0xcf, 0x07, 0xba, + 0xee, 0x11, 0xc6, 0x98, 0xf4, 0x55, 0x48, 0xfd, 0x29, 0x25, + 0x46, 0x36, 0x2f, 0x84, 0x40, 0x6c, 0xd3, 0x88, 0xa8, 0xb5, + 0x24, 0x00, 0xde, 0x7b, 0x80, 0x75, 0x95, 0xb2, 0x56, 0x36, + 0x4f, 0xb5, 0xd6, 0x2a, 0x62, 0xad, 0x4d, 0x29, 0xc6, 0x56, + 0xd9, 0xd6, 0x38, 0x4d, 0xc3, 0x00, 0xc0, 0xa6, 0xa9, 0xb6, + 0x6d, 0x42, 0xb8, 0xee, 0x8e, 0x48, 0xa7, 0xcd, 0x73, 0x08, + 0x6c, 0xf7, 0x71, 0x68, 0xed, 0x9c, 0xdb, 0xb6, 0x9c, 0x3f, + 0x4f, 0xd6, 0x24, 0xe7, 0xb1, 0x91, 0x92, 0xcd, 0x2b, 0x75, + 0x7e, 0xde, 0xbe, 0x5f, 0x5f, 0xf6, 0x22, 0x7d, 0xcf, 0x06, + 0x6f, 0xf0, 0x66, 0x59, 0xfe, 0x0c, 0xbe, 0x01, 0xd8, 0x2e, + 0x6a, 0x70, }; -static const uint8_t sprite_2_Buf[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, - 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x0c, 0x0c, - 0xfc, 0xfc, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xfc, - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xfc, 0xfc, 0xf0, 0xf0, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x06, 0x06, 0x06, 0x7f, 0x7f, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0x7f, 0x7f, 0x1f, 0x1f, 0x07, 0x07, 0x07, - 0x07, 0x01, 0x01, 0x01, 0x61, 0x61, 0x01, 0x01, 0x01, 0x01, - 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xc0, 0xc0, 0xf0, 0xf0, - 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0xf0, 0xf0, 0xc0, - 0xc0, 0xc0, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xc0, - 0x30, 0x30, 0x0e, 0x0e, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xf0, 0xf0, 0x80, 0x80, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x7f, 0x7f, 0x70, 0x70, 0x73, 0x73, 0x7f, - 0x7f, 0x7f, 0xf0, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0xe0, 0xe0, 0xf8, - 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xfe, 0xfe, 0xfe, 0x78, 0x78, 0x18, 0x18, 0x18, - 0x18, 0x18, 0x18, 0x9e, 0x9e, 0x9e, 0x7f, 0x7f, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0xc0, 0xc0, 0xf0, 0xf0, 0xfc, 0xfc, 0xfc, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x0f, 0x0f, 0x3f, 0x3f, 0xc3, 0xc3, 0xc3, 0xc0, - 0xc0, 0xc0, 0xc0, 0xf0, 0xf0, 0x0c, 0x0c, 0x03, 0x03, 0x03, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x1f, 0x1f, 0x7f, 0x7f, 0x7f, 0x7f, - 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x03, 0x03, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, +static const uint8_t sprite_2_Buf[156] = { + 0x78, 0x9c, 0x8d, 0xd0, 0xb1, 0x09, 0xc5, 0x20, 0x10, 0x06, + 0xe0, 0x48, 0xc0, 0xd7, 0x48, 0x6c, 0x5f, 0xe7, 0x0a, 0xd9, + 0xc0, 0x59, 0xb2, 0x41, 0x20, 0x4d, 0xba, 0x73, 0x12, 0x67, + 0x11, 0x5c, 0x24, 0x23, 0x5c, 0x99, 0x42, 0xf4, 0x99, 0x4b, + 0x24, 0xcd, 0x13, 0xfd, 0x0a, 0xe1, 0x8e, 0xfb, 0xf1, 0x74, + 0x18, 0xba, 0x38, 0xd7, 0x37, 0x57, 0x08, 0x21, 0x42, 0xc0, + 0x5b, 0x20, 0xa9, 0xb8, 0xfa, 0xcd, 0x3c, 0xe7, 0x1c, 0xe0, + 0x09, 0x00, 0x28, 0xf5, 0xc9, 0x18, 0x63, 0xcb, 0x92, 0x0f, + 0x96, 0x52, 0xc7, 0xbe, 0x0e, 0x51, 0xde, 0x10, 0x73, 0xe5, + 0x9e, 0xf6, 0x3c, 0x4f, 0x13, 0x63, 0x8d, 0xb4, 0x31, 0x74, + 0x31, 0xa2, 0x31, 0x54, 0x03, 0xac, 0xeb, 0xb6, 0x01, 0x40, + 0x73, 0x73, 0x63, 0x8e, 0xe3, 0x3c, 0xd3, 0x2b, 0xc6, 0xb8, + 0xef, 0x5f, 0x62, 0xad, 0x05, 0xa8, 0x2f, 0x4c, 0x1f, 0x55, + 0x62, 0xfa, 0x22, 0xa5, 0xd6, 0xde, 0x7b, 0x47, 0x8f, 0x11, + 0x62, 0x1c, 0xc7, 0x5a, 0x5a, 0x29, 0x78, 0xd5, 0xc7, 0xfe, + 0xf8, 0x01, 0x4a, 0xd2, 0x77, 0x8c, }; -static const uint8_t sprite_3_Buf[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x30, 0x30, - 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xfc, - 0xfc, 0xfc, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xfc, 0xfc, 0xf0, 0xf0, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x06, 0x06, 0x06, 0x7f, 0x7f, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0x7f, 0x7f, 0x1f, 0x1f, 0x07, 0x07, 0x07, - 0x07, 0x01, 0x01, 0x01, 0x61, 0x61, 0x01, 0x01, 0x01, 0x01, - 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, - 0xc0, 0x30, 0x30, 0x0e, 0x0e, 0xce, 0xce, 0xce, 0xfe, 0xfe, - 0xff, 0xff, 0x3f, 0x3f, 0x0f, 0x0f, 0x0f, 0x30, 0x30, 0xc0, - 0xc0, 0xc0, 0xc0, 0x00, 0x00, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, - 0x30, 0x30, 0x0e, 0x0e, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0x7c, - 0x7c, 0x83, 0x83, 0x70, 0x70, 0x0c, 0x0c, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0xf0, 0xf0, 0xf0, - 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0x80, 0x80, 0x03, 0x03, 0x0f, - 0x0f, 0x0f, 0x0c, 0x0c, 0x83, 0x83, 0x73, 0x73, 0x0c, 0x0c, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x80, - 0x80, 0x9f, 0x9f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, - 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xe6, 0xe6, 0x06, 0x06, 0x06, 0x06, 0x06, 0x01, 0x01, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0xf0, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xfc, 0xfc, 0xfc, - 0x3c, 0x3c, 0x3c, 0x3c, 0x3c, 0x3c, 0x3c, 0x3c, 0x3c, 0xff, - 0xff, 0x3f, 0x3f, 0x0f, 0x0f, 0x03, 0x03, 0x0c, 0x0c, 0x0c, - 0x30, 0x30, 0xc0, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x03, 0x03, 0x03, 0x03, - 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x03, 0x1c, 0x1c, 0x60, - 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x63, 0x63, - 0x7f, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, +static const uint8_t sprite_3_Buf[171] = { + 0x78, 0x9c, 0xb5, 0xd0, 0xd1, 0x09, 0x83, 0x30, 0x10, 0x06, + 0x60, 0x43, 0x20, 0x7d, 0x39, 0x74, 0x01, 0xc1, 0x15, 0x6e, + 0x80, 0x82, 0xab, 0x54, 0x5c, 0x40, 0xf0, 0x55, 0xb8, 0x40, + 0x06, 0x71, 0x95, 0x4c, 0xe0, 0x18, 0x3e, 0x67, 0x80, 0x60, + 0x9a, 0x98, 0x26, 0x96, 0x52, 0xeb, 0x53, 0xbf, 0x87, 0x3c, + 0xe4, 0xf8, 0xef, 0x72, 0x29, 0x8a, 0xbf, 0x40, 0x44, 0x93, + 0x58, 0xcf, 0x1d, 0xac, 0x35, 0xe6, 0x32, 0x2f, 0x84, 0x20, + 0x7a, 0x05, 0x88, 0x9a, 0xe6, 0xe6, 0x31, 0xc6, 0xba, 0xce, + 0x1f, 0xcc, 0xb9, 0x1f, 0x49, 0xad, 0x11, 0xcb, 0x72, 0x59, + 0x96, 0x6d, 0x73, 0xae, 0x6d, 0xab, 0xaa, 0x42, 0xd4, 0x5e, + 0xa8, 0xe8, 0x58, 0x64, 0xec, 0x7b, 0x74, 0x9a, 0x26, 0xa5, + 0x86, 0x01, 0x20, 0xbf, 0x35, 0xef, 0x20, 0x25, 0xe7, 0xbe, + 0x15, 0x80, 0x52, 0xe3, 0x08, 0x70, 0x3a, 0x3d, 0xb4, 0x96, + 0x72, 0x9e, 0xe9, 0x4d, 0x6c, 0xb5, 0xae, 0x22, 0x38, 0x9b, + 0x9d, 0x19, 0x13, 0x3f, 0xc9, 0xde, 0x93, 0xb8, 0x06, 0xe7, + 0x00, 0x10, 0x56, 0xb9, 0xc8, 0xf3, 0xdd, 0xe7, 0x5d, 0x5d, + 0x3f, 0x92, 0xbe, 0x27, 0x3a, 0x4a, 0x4f, 0x63, 0xe8, 0x75, + 0xd5, }; -static const uint8_t sprite_4_Buf[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, - 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x0c, 0x0c, - 0xfc, 0xfc, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xfc, - 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xfc, 0xfc, 0xc0, 0xc0, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x06, 0x06, 0x06, 0x7f, 0x7f, 0xff, 0xff, 0xff, 0xff, - 0x7f, 0x7f, 0x7f, 0x1f, 0x1f, 0x07, 0x07, 0x07, 0x07, 0x01, - 0x01, 0x61, 0x61, 0x61, 0x01, 0x01, 0x81, 0x81, 0x01, 0x01, - 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xf0, 0xf0, 0x3e, 0x3e, - 0x0f, 0x0f, 0x0f, 0x0f, 0x3e, 0x3e, 0x3e, 0xf0, 0xf0, 0xc0, - 0xc0, 0xc0, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xc0, - 0x31, 0x31, 0x0e, 0x0e, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xfc, 0xfc, 0x80, 0x80, 0x80, 0x80, 0x00, 0x00, - 0x00, 0x03, 0x03, 0x0f, 0x0f, 0x0f, 0x0f, 0xff, 0xff, 0xff, - 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x1f, 0x1f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, - 0x7f, 0x7f, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0x9e, - 0x9e, 0x07, 0x07, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xf0, 0xf0, - 0x3c, 0x3c, 0x3c, 0x3c, 0xfc, 0xfc, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0x3f, 0x3f, 0x3c, 0x3c, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x7f, 0x7f, 0x7f, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, - 0x63, 0x63, 0x63, 0x7f, 0x7f, 0x03, 0x03, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, +static const uint8_t sprite_4_Buf[143] = { + 0x78, 0x9c, 0x8d, 0xd0, 0xc1, 0x0d, 0xc3, 0x20, 0x0c, 0x05, + 0xd0, 0x58, 0x48, 0xf4, 0x82, 0xd2, 0x11, 0x98, 0x21, 0x77, + 0x44, 0x56, 0x29, 0x62, 0x10, 0x37, 0x8b, 0x64, 0x16, 0x8f, + 0xc4, 0x00, 0x56, 0xa9, 0x81, 0x10, 0xa9, 0x87, 0x0a, 0xde, + 0x0d, 0x64, 0xfb, 0x1b, 0x96, 0x65, 0x0a, 0xd1, 0x5c, 0x5d, + 0x67, 0x8c, 0x61, 0x4e, 0x0d, 0x57, 0xb9, 0x63, 0x9e, 0x18, + 0xa6, 0xb5, 0x46, 0x2c, 0xd5, 0x88, 0x68, 0xed, 0x43, 0x00, + 0x84, 0x10, 0x00, 0x8e, 0x03, 0x20, 0xe7, 0x61, 0xbf, 0xc4, + 0x7a, 0xff, 0x14, 0xde, 0xfb, 0x94, 0x88, 0xae, 0x48, 0xa2, + 0x6d, 0x5b, 0x57, 0x80, 0x41, 0xf7, 0xb5, 0xe7, 0x5b, 0xc8, + 0x49, 0xa9, 0x32, 0xa8, 0xde, 0x0d, 0x73, 0x1b, 0x6b, 0xb1, + 0xfb, 0x34, 0xe7, 0x59, 0x5e, 0x30, 0xca, 0xfd, 0xd9, 0xdf, + 0x89, 0xfb, 0xdb, 0xf6, 0xdd, 0xb9, 0xe9, 0x66, 0x21, 0xc9, + 0xaf, 0x2a, 0xc6, 0x88, 0xa8, 0xd4, 0xdf, 0xc2, 0x2f, 0xb5, + 0x13, 0x61, 0x67, }; SpriteDef sprite_0 = {64, 64, sprite_0_Buf}; diff --git a/Src/ssd1306.c b/Src/ssd1306.c index 4051c69..a4617d7 100644 --- a/Src/ssd1306.c +++ b/Src/ssd1306.c @@ -57,44 +57,53 @@ void drawLine(int16_t x0, int16_t y0, int16_t x1, int16_t y1) } } -static int anim = 1; -static int x = -64; +static uint8_t anim = 1; +static int16_t x = -64; -void ssd1306_LoadImage(void) { - //memcpy(SSD1306_Buffer, image, 1024); - //fastlz_decompress(image, 1024, SSD1306_Buffer, 1024); - +/** + * [ssd1306_Decompress description] + * @param input [description] + * @param output [description] + * @param output_size [description] + */ +void ssd1306_Decompress(uint8_t *input, uint8_t *output, uint16_t output_size) { z_stream infstream; + infstream.zalloc = Z_NULL; infstream.zfree = Z_NULL; infstream.opaque = Z_NULL; + infstream.avail_in = 0; + infstream.next_in = Z_NULL; + + infstream.next_in = (Bytef *)input; + infstream.avail_in = output_size; + infstream.avail_out = (uInt)output_size; + infstream.next_out = (Bytef *)output; - // setup "b" as the input and "c" as the compressed output - //infstream.avail_in = (uInt)((char*)defstream.next_out - image); // size of input - infstream.next_in = (Bytef *)image; // input char array - infstream.avail_out = (uInt)sizeof(SSD1306_Buffer); // size of output - infstream.next_out = (Bytef *)SSD1306_Buffer; // output char array - - // the actual DE-compression work. inflateInit(&infstream); - inflate(&infstream, Z_NO_FLUSH); + inflate(&infstream, Z_FINISH); inflateEnd(&infstream); } -void ssd1306_DrawSprite(SpriteDef *sprite, int x, int y) { - int spriteAddr = 0; - int currX, currY = y; +void ssd1306_LoadImage(void) { + //memcpy(SSD1306_Buffer, image, 1024); + ssd1306_Decompress(image, SSD1306_Buffer, sizeof(SSD1306_Buffer)); +} - for(int bank = currY / 8; bank < sprite->height / 8; bank++) { +void ssd1306_DrawSprite(SpriteDef sprite, int16_t x, int16_t y) { + uint16_t spriteAddr = 0; + int16_t currX, currY = y; + + for(int16_t bank = currY / 8; bank < sprite.height / 8; bank++) { currX = x; - int start = (bank * sprite->width) + (bank * sprite->height) + (x); - int end = start + sprite->width; + int16_t start = (bank * sprite.width) + (bank * sprite.height) + x; + int16_t end = start + sprite.width; - for(int addr = start; addr < end; addr++) { - if (spriteAddr < (sprite->height * sprite->width / 8) ) { - for(int bit = 0; bit < 8; bit++) { - if ((sprite->buffer[spriteAddr] >> bit) & 0x01) { - int16_t newY = bit + currY; + for(int16_t addr = start; addr < end; addr++) { + if (spriteAddr < (sprite.height * sprite.width / 8) ) { + for(uint8_t bit = 0; bit < 8; bit++) { + if ((sprite.buffer[spriteAddr] >> bit) & 0x01) { + uint8_t newY = bit + currY; if (currX >= 0 && newY >= 0 && currX < SSD1306_WIDTH && newY < SSD1306_HEIGHT) { ssd1306_DrawPixel(currX, newY, White); } @@ -110,32 +119,42 @@ void ssd1306_DrawSprite(SpriteDef *sprite, int x, int y) { } void ssd1306_Anim(void) { - SpriteDef *sprite; + SpriteDef *srcSprite; + SpriteDef dstSprite; + uint16_t dstSize; switch(anim) { case 0: - sprite = &sprite_0; + srcSprite = &sprite_0; break; case 1: - sprite = &sprite_1; + srcSprite = &sprite_1; break; case 2: - sprite = &sprite_2; + srcSprite = &sprite_2; break; case 3: - sprite = &sprite_3; + srcSprite = &sprite_3; break; case 4: - sprite = &sprite_4; + srcSprite = &sprite_4; break; } - ssd1306_DrawSprite(sprite, x, 0); - //ssd1306_DrawSprite(sprite, x, -50, 1); + dstSize = srcSprite->height * srcSprite->width / 8; + + dstSprite.width = srcSprite->width; + dstSprite.height = srcSprite->height; + dstSprite.buffer = malloc(sizeof(uint8_t) * (dstSize)); + + ssd1306_Decompress(srcSprite->buffer, dstSprite.buffer, dstSize); + + ssd1306_DrawSprite(dstSprite, x, 0); + + free(dstSprite.buffer); anim++; - //x += 15; - x += 1; + x++; if (anim == 5) { anim = 1; @@ -152,20 +171,13 @@ void ssd1306_Anim(void) { * @param delay [Delay between refresh] */ //void ssd1306_ScrollUp(unsigned int pixels, unsigned int delay, ) -void ssd1306_ScrollUp(unsigned int pixels, unsigned int delay, UART_HandleTypeDef uart) +void ssd1306_ScrollUp(uint8_t pixels, uint8_t delay) { - static uint32_t end_addr = SSD1306_WIDTH * 8; + uint32_t end_addr = SSD1306_WIDTH * 8; char lost_bit = 0; - //char buffer[64]; for(uint8_t times = 0; times < pixels; times++) { - for(uint32_t addr = 0; addr < end_addr; addr++) { - //char binary[33]; - //itoa(SSD1306_Buffer[addr], binary, 2); - //sprintf(buffer, "addr: %x : %s\n\r", addr, binary); - //HAL_UART_Transmit(&uart, (uint8_t*)buffer, strlen(buffer), 0xFFFF); - - + for(uint16_t addr = 0; addr < end_addr; addr++) { // In the first bank we dont need to keep the lost bit if (addr > 0x7f) { lost_bit = SSD1306_Buffer[addr] & 0x01; diff --git a/anim/sprite.py b/anim/sprite.py index e5b4d51..706fdb2 100755 --- a/anim/sprite.py +++ b/anim/sprite.py @@ -8,6 +8,7 @@ from PIL import Image import sys import math +import zlib #import zlib @@ -81,7 +82,7 @@ if __name__ == "__main__": buf.append(value) #buffer = zlib.compress(bytes(buffer)) - frames.append({'name': 'sprite_' + str(counter), 'buf': buf}) + frames.append({'name': 'sprite_' + str(counter), 'buf': zlib.compress(bytes(buf))}) counter = counter + 1