HD Packs: Fixed issue when multiple background priority sprites were stacked
This commit is contained in:
parent
6b9182f63d
commit
1c2fb33688
1 changed files with 2 additions and 2 deletions
|
@ -256,7 +256,7 @@ void HdNesPack::GetPixels(HdPpuPixelInfo *screenTiles, uint32_t x, uint32_t y, H
|
||||||
if(pixelInfo.Tile.BgColorIndex == 0) {
|
if(pixelInfo.Tile.BgColorIndex == 0) {
|
||||||
hdPackSpriteInfo = GetMatchingTile(screenTiles, x, y, pixelInfo.Sprite[k]);
|
hdPackSpriteInfo = GetMatchingTile(screenTiles, x, y, pixelInfo.Sprite[k]);
|
||||||
if(hdPackSpriteInfo) {
|
if(hdPackSpriteInfo) {
|
||||||
needBg &= !DrawTile(pixelInfo.Sprite[k], *hdPackSpriteInfo, outputBuffer, screenWidth, true);
|
needBg &= !DrawTile(pixelInfo.Sprite[k], *hdPackSpriteInfo, outputBuffer, screenWidth, needBg);
|
||||||
} else if(pixelInfo.Sprite[k].SpriteColorIndex != 0) {
|
} else if(pixelInfo.Sprite[k].SpriteColorIndex != 0) {
|
||||||
DrawColor(EmulationSettings::GetRgbPalette()[pixelInfo.Sprite[k].SpriteColor], outputBuffer, hdData->Scale, screenWidth);
|
DrawColor(EmulationSettings::GetRgbPalette()[pixelInfo.Sprite[k].SpriteColor], outputBuffer, hdData->Scale, screenWidth);
|
||||||
needBg = false;
|
needBg = false;
|
||||||
|
@ -275,7 +275,7 @@ void HdNesPack::GetPixels(HdPpuPixelInfo *screenTiles, uint32_t x, uint32_t y, H
|
||||||
bool drawBg = !hasBgSprite || pixelInfo.Tile.BgColorIndex != 0 || needBg;
|
bool drawBg = !hasBgSprite || pixelInfo.Tile.BgColorIndex != 0 || needBg;
|
||||||
if(drawBg) {
|
if(drawBg) {
|
||||||
if(hdPackTileInfo) {
|
if(hdPackTileInfo) {
|
||||||
DrawTile(pixelInfo.Tile, *hdPackTileInfo, outputBuffer, screenWidth, drawBg);
|
DrawTile(pixelInfo.Tile, *hdPackTileInfo, outputBuffer, screenWidth, true);
|
||||||
} else {
|
} else {
|
||||||
//Draw regular SD background tile
|
//Draw regular SD background tile
|
||||||
bool useCustomBackground = !hasNonBackgroundSurrounding && hasCustomBackground && pixelInfo.Tile.BgColorIndex == 0;
|
bool useCustomBackground = !hasNonBackgroundSurrounding && hasCustomBackground && pixelInfo.Tile.BgColorIndex == 0;
|
||||||
|
|
Loading…
Add table
Reference in a new issue