fixing some registers and update registers related to backgrounds

This commit is contained in:
Clément Le Bihan
2020-05-28 14:35:06 +02:00
parent 18757bbfa4
commit 0933a9803e
2 changed files with 9 additions and 3 deletions

View File

@@ -61,8 +61,8 @@ namespace ComSquare::PPU
for (int j = 0; j < this->_characterSize.x; j++) {
reference = getTilePixelReference(graphicAddress, index);
color = getRealColor(palette[reference]);
if (tileData.tilePriority == this->priority && reference != 0) // reference 0 is considered as transparency
this->buffer[pos.x][pos.y] = color;
if (tileData.tilePriority == this->priority) // reference 0 is considered as transparency
this->buffer[pos.x][pos.y] = (reference) ? color : 0;
if (j == 7) {
index = -1;
// to go to the tile to the right