mirror of
https://github.com/zoriya/ComSquare.git
synced 2026-06-09 20:59:06 +00:00
cleaning a little bit rendering still some trailing issues
This commit is contained in:
@@ -31,14 +31,26 @@ namespace ComSquare::Debugger
|
|||||||
int bufY = 0;
|
int bufY = 0;
|
||||||
int nbTilesDrawn = 0;
|
int nbTilesDrawn = 0;
|
||||||
int resetX = 0;
|
int resetX = 0;
|
||||||
|
int it = 0;
|
||||||
|
|
||||||
for (uint24_t i = 0; i < this->_ram->getSize(); i += this->_bpp) {
|
for (uint24_t i = 0; i < this->_ram->getSize(); i += this->_bpp, it++) {
|
||||||
if (bufX >= 1024 || bufY >= 1024)
|
if (bufX >= 1024 || bufY >= 1024)
|
||||||
break;
|
break;
|
||||||
|
if (it && it % 8 == 0) {
|
||||||
|
resetX += 8;
|
||||||
|
bufX = resetX;
|
||||||
|
bufY -= 8;
|
||||||
|
nbTilesDrawn++;
|
||||||
|
}
|
||||||
|
if (nbTilesDrawn && nbTilesDrawn % 16 == 0) {
|
||||||
|
resetX = 0;
|
||||||
|
bufX = resetX;
|
||||||
|
bufY += 8;
|
||||||
|
}
|
||||||
for (int j = 0; j < 8; j++) {
|
for (int j = 0; j < 8; j++) {
|
||||||
colorReference = this->getPixelReferenceFromTileRow(i, j);
|
colorReference = this->getPixelReferenceFromTileRow(i, j);
|
||||||
color = PPU::getRealColor(palette[colorReference]);
|
color = PPU::getRealColor(palette[colorReference]);
|
||||||
buffer[bufY][bufX++] = color;
|
buffer[bufX++][bufY] = color;
|
||||||
}
|
}
|
||||||
bufY++;
|
bufY++;
|
||||||
bufX = resetX;
|
bufX = resetX;
|
||||||
|
|||||||
Reference in New Issue
Block a user