renamming _tileMapsConfig to _tileMapMirroring

This commit is contained in:
Clément Le Bihan
2021-07-06 22:14:54 +02:00
parent e0d46121a8
commit f8a500972a
2 changed files with 7 additions and 7 deletions
+6 -6
View File
@@ -14,7 +14,7 @@ namespace ComSquare::PPU
{
Background::Background(ComSquare::PPU::PPU &ppu, int backGroundNumber, bool hasPriority):
_ppu(ppu),
_tileMapsConfig(ppu.getBackgroundMirroring(backGroundNumber)),
_tileMapMirroring(ppu.getBackgroundMirroring(backGroundNumber)),
_characterNbPixels(ppu.getCharacterSize(backGroundNumber)),
_bpp(ppu.getBPP(backGroundNumber)),
_directColor(false),
@@ -37,9 +37,9 @@ namespace ComSquare::PPU
uint16_t vramAddress = this->_tileMapStartAddress;
Vector2<int> offset = this->_ppu.getBgScroll(this->_bgNumber);
this->backgroundSize.x =
(static_cast<int>(this->_tileMapsConfig.x) + 1) * this->_characterNbPixels.x * NbCharacterWidth;
(static_cast<int>(this->_tileMapMirroring.x) + 1) * this->_characterNbPixels.x * NbCharacterWidth;
this->backgroundSize.y =
(static_cast<int>(this->_tileMapsConfig.y) + 1) * this->_characterNbPixels.y * NbCharacterHeight;
(static_cast<int>(this->_tileMapMirroring.y) + 1) * this->_characterNbPixels.y * NbCharacterHeight;
this->_drawBasicTileMap(vramAddress, offset);
for (int i = 1; i < 4; i++) {
@@ -49,9 +49,9 @@ namespace ComSquare::PPU
offset.x = 0;
offset.y += NbCharacterHeight * this->_characterNbPixels.y;
}
if (i > 1 && !this->_tileMapsConfig.y)
if (i > 1 && !this->_tileMapMirroring.y)
break;
if ((i == 1 || i == 3) && !this->_tileMapsConfig.x)
if ((i == 1 || i == 3) && !this->_tileMapMirroring.x)
continue;
this->_drawBasicTileMap(vramAddress, offset);
}
@@ -145,7 +145,7 @@ namespace ComSquare::PPU
void Background::setTilemaps(Vector2<bool> tileMaps)
{
this->_tileMapsConfig = tileMaps;
this->_tileMapMirroring = tileMaps;
}
int Background::getBgNumber() const
+1 -1
View File
@@ -32,7 +32,7 @@ namespace ComSquare::PPU
ComSquare::PPU::PPU &_ppu;
//! @brief The tilemap configuration nb of tileMap vertically and horizontally
//! @note members are set to true if the tilemap is expended in their direction
Vector2<bool> _tileMapsConfig;
Vector2<bool> _tileMapMirroring;
//! @brief The number of pixels of a character (x: width, y:height)
Vector2<int> _characterNbPixels;
//! @brief The number of bits per pixels to currently look for each pixel