예제 #1
0
파일: Matrix.cpp 프로젝트: 110h18/Wiring
/*
|| @description
|| | Buffers and writes to screen
|| #
*/
void Matrix::write(int x, int y, byte value)
{
  buffer(x, y, value);
  
  // update affected row
  syncRow(y);
}
예제 #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);
}
예제 #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);
  }
}
예제 #4
0
파일: Matrix.cpp 프로젝트: 110h18/Wiring
/*
|| @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);
  }
}
예제 #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);
  }
}
예제 #6
0
파일: Matrix.cpp 프로젝트: 110h18/Wiring
/*
|| @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);
  }
}