mirror of
https://github.com/zoriya/ComSquare.git
synced 2026-05-30 01:05:34 +00:00
misc fixes
This commit is contained in:
@@ -10,22 +10,22 @@
|
||||
|
||||
namespace ComSquare::PPU
|
||||
{
|
||||
Background::Background(ComSquare::PPU::PPU &ppu, int backGroundNumber, bool hasPriority)
|
||||
Background::Background(ComSquare::PPU::PPU &ppu, int backgroundNumber)
|
||||
: _ppu(ppu),
|
||||
_tileMapMirroring(ppu.getBackgroundMirroring(backGroundNumber)),
|
||||
_characterNbPixels(ppu.getCharacterSize(backGroundNumber)),
|
||||
_bpp(ppu.getBPP(backGroundNumber)),
|
||||
_tileMapMirroring(ppu.getBackgroundMirroring(backgroundNumber)),
|
||||
_characterNbPixels(ppu.getCharacterSize(backgroundNumber)),
|
||||
_bpp(ppu.getBPP(backgroundNumber)),
|
||||
_directColor(false),
|
||||
_highRes(false),
|
||||
_tileMapStartAddress(ppu.getTileMapStartAddress(backGroundNumber)),
|
||||
_tilesetAddress(ppu.getTilesetAddress(backGroundNumber)),
|
||||
_priority(hasPriority),
|
||||
_bgNumber(backGroundNumber),
|
||||
_tileMapStartAddress(ppu.getTileMapStartAddress(backgroundNumber)),
|
||||
_tilesetAddress(ppu.getTilesetAddress(backgroundNumber)),
|
||||
_bgNumber(backgroundNumber),
|
||||
_tileBuffer({{{0}}}),
|
||||
_vram(ppu.vram),
|
||||
_cgram(ppu.cgram),
|
||||
_tileRenderer(this->_vram, this->_cgram),
|
||||
buffer({{{0}}})
|
||||
buffer({{{0}}}),
|
||||
tilesPriority({{{false}}})
|
||||
{}
|
||||
|
||||
void Background::renderBackground()
|
||||
@@ -155,16 +155,6 @@ namespace ComSquare::PPU
|
||||
return this->_bgNumber;
|
||||
}
|
||||
|
||||
void Background::setPriority(bool priority)
|
||||
{
|
||||
this->_priority = priority;
|
||||
}
|
||||
|
||||
bool Background::getPriority() const
|
||||
{
|
||||
return this->_priority;
|
||||
}
|
||||
|
||||
bool Background::isPriorityPixel(int y, int x) const
|
||||
{
|
||||
return this->tilesPriority[y / this->_characterNbPixels.y][x / this->_characterNbPixels.x];
|
||||
|
||||
Reference in New Issue
Block a user