src/sdl/hardware_renderer.cc
/*
 * Draws the given array of pixels to the given location in the pixel
 * buffer.
 *
 * Assumes the row and column are in range of the buffer size.
 * Assumes the number of pixels will fit within the bounds of the specified
 * location.
 */
Draws the given array of pixels to the given location in the pixel
buffer.

Assumes the row and column are in range of the buffer size.
Assumes the number of pixels will fit within the bounds of the specified
location.
Draws the given array of pixels to the given location in the pixel buffer . Assumes the row and column are in range of the buffer size . Assumes the number of pixels will fit within the bounds of the specified location .
void HardwareRenderer::DrawPixels(size_t row, size_t col,
                                  DataWord *tiles, size_t num) {
  CONTRACT(row < static_cast<size_t>(NES_HEIGHT));
  CONTRACT(col < static_cast<size_t>(NES_WIDTH));
  CONTRACT((row * NES_WIDTH + col + num) < (NES_WIDTH * NES_HEIGHT));
  size_t index = row * NES_WIDTH + col;
  for (size_t i = 0; i < num; i++) {
    pixel_buffer_[index + i] = pixels_->emu[tiles[i]];
  }
  return;
}
void HardwareRenderer :: DrawPixels ( size_t row , size_t col , DataWord * tiles , size_t num ) { CONTRACT ( row < static_cast < size_t > ( NES_HEIGHT ) ) ; CONTRACT ( col < static_cast < size_t > ( NES_WIDTH ) ) ; CONTRACT ( ( row * NES_WIDTH + col + num ) < ( NES_WIDTH * NES_HEIGHT ) ) ; size_t index = row * NES_WIDTH + col ; for ( size_t i = 0 ; i < num ; i ++ ) { pixel_buffer_ [ index + i ] = pixels_ -> emu [ tiles [ i ] ] ; } return ; }
Draws the given array of pixels to the given location in the pixel
 buffer.
Draws the given array of pixels to the given location in the pixel buffer .
// Draw the given pixels to the given location.