starting implementing bg scroll

This commit is contained in:
Clément Le Bihan
2021-02-04 19:06:54 +01:00
parent 58fd02c8ec
commit d5af9fe98a
3 changed files with 14 additions and 2 deletions

View File

@@ -30,7 +30,7 @@ namespace ComSquare::PPU
void Background::renderBackground()
{
uint16_t vramAddress = this->_tileMapStartAddress;
Vector2<int> offset(0, 0);
Vector2<int> offset = this->_ppu.getBgScroll(this->_bgNumber);
this->backgroundSize.x = this->_tileMaps.x * this->_characterSize.x * NB_CHARACTER_WIDTH;
this->backgroundSize.y = this->_tileMaps.y * this->_characterSize.y * NB_CHARACTER_HEIGHT;