/* || @description || | Buffers and writes to screen || # */ void Matrix::write(int x, int y, byte value) { buffer(x, y, value); // update affected row syncRow(y); }
// buffers and writes to screen void Matrix::write(uint8_t x, uint8_t y, uint8_t value) { buffer(x, y, value); // update affected row syncRow(y); }
void Matrix::write(uint8_t x, uint8_t y, Sprite sprite) { for (uint8_t i = 0; i < sprite.height(); i++){ for (uint8_t j = 0; j < sprite.width(); j++) buffer(x + j, y + i, sprite.read(j, i)); syncRow(y + i); } }
/* || @description || | Buffers and writes to screen using the Sprite library || # */ void Matrix::write(int x, int y, Sprite sprite) { for (byte i = 0; i < sprite.height(); i++) { for (byte j = 0; j < sprite.width(); j++) { buffer(x + j, y + i, sprite.read(j, i)); } syncRow(y + i); } }
// clears screens and buffers void Matrix::clear(void) { if (!_buffer) return; // clear buffer for(uint8_t i = 0; i < 8; ++i){ for(uint8_t j = 0; j < _screens; ++j){ _buffer[i + (8 * j)] = 0x00; } } // clear registers for(uint8_t i = 0; i < 8; ++i){ syncRow(i); } }
/* || @description || | Clears the screens and buffers || # */ void Matrix::clear(void) { if (!buf) return; // clear buffer for(byte i = 0; i < 8; ++i) { for(byte j = 0; j < numberOfScreens; ++j) { buf[i + (8 * j)] = 0x00; } } // clear registers for(byte i = 0; i < 8; ++i) { syncRow(i); } }