Esempio n. 1
0
/*
|| @description
|| | Buffers and writes to screen
|| #
*/
void Matrix::write(int x, int y, byte value)
{
  buffer(x, y, value);
  
  // update affected row
  syncRow(y);
}
Esempio n. 2
0
// 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);
}
Esempio n. 3
0
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);
  }
}
Esempio n. 4
0
/*
|| @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);
  }
}
Esempio n. 5
0
// 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);
  }
}
Esempio n. 6
0
/*
|| @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);
  }
}