1
0
Fork 0
This commit is contained in:
Pedro de Oliveira 2017-03-24 23:51:38 +00:00
parent 033861af9e
commit 6e311342dd
2 changed files with 19 additions and 15 deletions

View File

@ -1,13 +1,18 @@
#include "stm32f4xx_hal.h" #include "stm32f4xx_hal.h"
typedef struct { typedef struct {
const uint8_t width; const uint8_t width;
const uint8_t height; const uint8_t height;
const uint8_t *buffer; const uint8_t *buffer;
} SpriteDef; } SpriteDef;
extern SpriteDef sprite_0; typedef struct {
extern SpriteDef sprite_1; uint8_t frames;
extern SpriteDef sprite_2; SpriteDef sprite[];
extern SpriteDef sprite_3; } AnimationDef;
extern SpriteDef sprite_4;
extern SpriteDef sprite_0;
extern SpriteDef sprite_1;
extern SpriteDef sprite_2;
extern SpriteDef sprite_3;
extern SpriteDef sprite_4;

View File

@ -58,12 +58,11 @@ void drawLine(int16_t x0, int16_t y0, int16_t x1, int16_t y1)
} }
static int anim = 1; static int anim = 1;
static x = 0; static int x = 0;
void ssd1306_LoadImage(void) { void ssd1306_LoadImage(void) {
//memcpy(SSD1306_Buffer, image, 1024); //memcpy(SSD1306_Buffer, image, 1024);
fastlz_decompress(image, 1024, SSD1306_Buffer, 1024); fastlz_decompress(image, 1024, SSD1306_Buffer, 1024);
//size = fastlz_compress(a, 1024, b);
} }
void ssd1306_DrawSprite(SpriteDef *sprite, int8_t x, int8_t y) { void ssd1306_DrawSprite(SpriteDef *sprite, int8_t x, int8_t y) {