fixing getCharacterSize marge bg and reference color when it is 0

This commit is contained in:
Clément Le Bihan
2020-05-28 14:14:35 +02:00
parent 409b6fefd6
commit 18757bbfa4
2 changed files with 14 additions and 12 deletions
+1 -1
View File
@@ -61,7 +61,7 @@ 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)
if (tileData.tilePriority == this->priority && reference != 0) // reference 0 is considered as transparency
this->buffer[pos.x][pos.y] = color;
if (j == 7) {
index = -1;