adding getter setter for public vars of Background Class and norm fixes

This commit is contained in:
Clément Le Bihan
2021-02-01 15:20:07 +01:00
parent 1c3cfb232b
commit 16c41b528e
4 changed files with 54 additions and 19 deletions
+2 -2
View File
@@ -750,9 +750,9 @@ namespace ComSquare::PPU
void PPU::addToMainSubScreen(Background &bg)
{
if (this->_registers._t[0].raw & (1U << (bg.bgNumber - 1U)))
if (this->_registers._t[0].raw & (1U << (bg.getBgNumber() - 1U)))
this->add_buffer(this->_mainScreen, bg.buffer);
if (this->_registers._t[1].raw & (1U << (bg.bgNumber - 1U)))
if (this->_registers._t[1].raw & (1U << (bg.getBgNumber() - 1U)))
this->add_buffer(this->_subScreen, bg.buffer);
}
}