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

Function CheckSpriteHit

src/ppu.cpp:1074–1087  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1072static uint8 sphitdata;
1073
1074static void CheckSpriteHit(int p) {
1075 int l = p - 16;
1076 int x;
1077
1078 if (sphitx == 0x100) return;
1079
1080 for (x = sphitx; x < (sphitx + 8) && x < l; x++) {
1081 if ((sphitdata & (0x80 >> (x - sphitx))) && !(Plinef[x] & 64) && x < 255) {
1082 PPU_status |= 0x40;
1083 sphitx = 0x100;
1084 break;
1085 }
1086 }
1087}
1088
1089//spork the world. Any sprites on this line? Then this will be set to 1.
1090//Needed for zapper emulation and *gasp* sprite emulation.

Callers 2

EndRLFunction · 0.85
ppu.cppFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected