MCPcopy Create free account
hub / github.com/TASEmulators/fceux / CopySprites

Function CopySprites

src/ppu.cpp:1675–1696  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1673}
1674
1675static void CopySprites(uint8 *target) {
1676 uint8 *P = target;
1677
1678 if (!spork) return;
1679 spork = 0;
1680
1681 if (!rendersprites) return; //User asked to not display sprites.
1682
1683 if(!SpriteON) return;
1684
1685 int start=8;
1686 if(PPU[1] & 0x04)
1687 start = 0;
1688
1689 for(int i=start;i<256;i++)
1690 {
1691 uint8 t = sprlinebuf[i];
1692 if(!(t&0x80))
1693 if (!(t & 0x40) || (P[i] & 0x40)) // Normal sprite || behind bg sprite
1694 P[i] = t;
1695 }
1696}
1697
1698void FCEUPPU_SetVideoSystem(int w) {
1699 if (w) {

Callers 1

DoLineFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected