HD Packs: Fixed CHR RAM packs not working (caused by refactoring)

This commit is contained in:
Sour 2018-07-03 22:48:28 -04:00
parent f6f089dce5
commit 08aa617a91
2 changed files with 6 additions and 5 deletions

View file

@ -119,18 +119,18 @@ struct HdScreenInfo
HdScreenInfo(const HdScreenInfo& that) = delete;
HdScreenInfo()
HdScreenInfo(bool isChrRamGame)
{
ScreenTiles = new HdPpuPixelInfo[PPU::PixelCount];
for(int i = 0; i < PPU::PixelCount; i++) {
ScreenTiles[i].Tile.BackgroundPriority = false;
ScreenTiles[i].Tile.IsChrRamTile = false;
ScreenTiles[i].Tile.IsChrRamTile = isChrRamGame;
ScreenTiles[i].Tile.HorizontalMirroring = false;
ScreenTiles[i].Tile.VerticalMirroring = false;
for(int j = 0; j < 4; j++) {
ScreenTiles[i].Sprite[j].IsChrRamTile = false;
ScreenTiles[i].Sprite[j].IsChrRamTile = isChrRamGame;
}
}
}

View file

@ -125,8 +125,9 @@ HdPpu::HdPpu(shared_ptr<Console> console, HdPackData * hdData) : PPU(console)
_hdData = hdData;
_version = _hdData->Version;
_screenInfo[0] = new HdScreenInfo();
_screenInfo[1] = new HdScreenInfo();
bool isChrRamGame = !console->GetMapper()->HasChrRom();
_screenInfo[0] = new HdScreenInfo(isChrRamGame);
_screenInfo[1] = new HdScreenInfo(isChrRamGame);
_info = _screenInfo[0];
}