adding define to clarify

This commit is contained in:
Clément Le Bihan
2021-02-01 15:43:14 +01:00
parent 873efa99a7
commit e1f1990402
2 changed files with 3 additions and 1 deletions
+1 -1
View File
@@ -59,7 +59,7 @@ namespace ComSquare::PPU
palette = getPalette(tileData.palette);
// X horizontal
// Y vertical
graphicAddress = this->_tilesetAddress + (tileData.posY * 16 * this->_bpp * 8) + (tileData.posX * this->_bpp * 8);
graphicAddress = this->_tilesetAddress + (tileData.posY * NB_TILE_PER_ROW * this->_bpp * TILE_SIZE) + (tileData.posX * this->_bpp * TILE_SIZE);
for (int i = 0; i < this->_characterSize.y; i++) {
index = i * this->_characterSize.x;
if (tileData.verticalFlip)
+2
View File
@@ -23,6 +23,8 @@ namespace ComSquare::PPU
#define NB_CHARACTER_HEIGHT 32
#define TILE_PIXEL_WIDTH 8U
#define TILE_PIXEL_HEIGHT 8U
#define TILE_SIZE 8
#define NB_TILE_PER_ROW 16
private:
Vector2<int> _tileMaps;
Vector2<int> _characterSize;