25 : m_canvas( 8, 8, m_canvasBuf)
30 (uint8_t)((128>>3) - 1),
41 for (uint8_t i = 0; i < m_count; i++)
43 SPRITE * sprite = m_sprites[i];
50 updateRegion(sprite->
getRect());
53 sprite->
lx = sprite->
x;
54 sprite->
ly = sprite->
y;
68 uint8_t index = m_count;
69 if (index >= MAX_SPRITES)
73 m_sprites[index] = &sprite;
86 for (uint8_t i=0; i<m_count; i++)
88 if (m_sprites[i] == &sprite)
91 for (uint8_t j=i; j<m_count; j++)
93 m_sprites[j] = m_sprites[j+1];
111 for(uint8_t x = ur.
left; x <= ur.
right; x++)
113 for(uint8_t y = ur.
top; y <= ur.
bottom; y++)
116 for (uint8_t i = 0; i < m_count; i++)
119 m_sprites[i]->y - (y << 3),
120 m_sprites[i]->data );
static const uint8_t SP_ERR_NO_SPACE
No free space for new sprite error.
void drawSpritePgm(uint8_t x, uint8_t y, const uint8_t sprite[])
NanoCanvas m_canvas
Canvas used to draw sprites to avoid flickering.
uint8_t ssd1306_displayHeight()
void remove(SPRITE &sprite)
uint8_t add(SPRITE &sprite)
SSD1306_RECT getUpdateRect()
uint8_t y
draw position Y on the screen
uint8_t x
draw position X on the screen
SSD1306_RECT m_rect
Rectangle, which specifies part of the display, used by the sprites.
void blt(uint8_t x, uint8_t y)
uint8_t lx
last draw position X on the screen
virtual void drawBlock(uint8_t blockColumn, uint8_t blockRow)
uint8_t ly
last draw position Y on the screen