merge
This commit is contained in:
commit
1112601048
1 changed files with 6 additions and 6 deletions
|
@ -165,7 +165,7 @@ drawbg(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
drawsprites(void)
|
drawsprites(int show)
|
||||||
{
|
{
|
||||||
uchar *p;
|
uchar *p;
|
||||||
int big, dx, dy, i, x, cc, pri;
|
int big, dx, dy, i, x, cc, pri;
|
||||||
|
@ -209,7 +209,7 @@ drawsprites(void)
|
||||||
x = ppux - 2;
|
x = ppux - 2;
|
||||||
dx = x - t[0].x;
|
dx = x - t[0].x;
|
||||||
if(t0 && dx >= 0 && dx < 8 && ppux != 257){
|
if(t0 && dx >= 0 && dx < 8 && ppux != 257){
|
||||||
if((nz & 1) != 0 && iscolor(x, ppuy))
|
if((nz & 1) != 0 && iscolor(x, ppuy) && show)
|
||||||
mem[PPUSTATUS] |= SPRITE0HIT;
|
mem[PPUSTATUS] |= SPRITE0HIT;
|
||||||
nz >>= 1;
|
nz >>= 1;
|
||||||
}
|
}
|
||||||
|
@ -227,7 +227,7 @@ drawsprites(void)
|
||||||
t[i].r1 >>= 1;
|
t[i].r1 >>= 1;
|
||||||
t[i].r2 >>= 1;
|
t[i].r2 >>= 1;
|
||||||
}
|
}
|
||||||
if(cc != -1 && (pri || !iscolor(x, ppuy)))
|
if(cc != -1 && show && (pri || !iscolor(x, ppuy)))
|
||||||
pixel(x, ppuy, cc, 0);
|
pixel(x, ppuy, cc, 0);
|
||||||
}
|
}
|
||||||
if(ppux == 257){
|
if(ppux == 257){
|
||||||
|
@ -310,10 +310,10 @@ ppustep(void)
|
||||||
mask = mem[PPUMASK];
|
mask = mem[PPUMASK];
|
||||||
if((mask & BGDISP) != 0)
|
if((mask & BGDISP) != 0)
|
||||||
drawbg();
|
drawbg();
|
||||||
if(((mask & BGDISP) == 0 && ppux <= 257 || ppux <= 10 && (mask & BG8DISP) == 0) && ppux >= 2)
|
if(((mask & BGDISP) == 0 && ppux <= 257 || ppux < 10 && (mask & BG8DISP) == 0) && ppux >= 2)
|
||||||
pixel(ppux - 2, ppuy, ppuread(0x3F00), 1);
|
pixel(ppux - 2, ppuy, ppuread(0x3F00), 1);
|
||||||
if((mask & SPRITEDISP) != 0 && ppuy != 261 && (ppux > 10 || (mask & SPRITE8DISP) != 0))
|
if((mask & SPRITEDISP) != 0 && ppuy != 261)
|
||||||
drawsprites();
|
drawsprites(ppux >= 10 || (mask & SPRITE8DISP) != 0);
|
||||||
if(ppux == 240 && (mask & SPRITEDISP) != 0)
|
if(ppux == 240 && (mask & SPRITEDISP) != 0)
|
||||||
mapper[map](SCAN, 0);
|
mapper[map](SCAN, 0);
|
||||||
if(ppuy == 261){
|
if(ppuy == 261){
|
||||||
|
|
Loading…
Reference in a new issue