mirror of
https://github.com/RaySollium99/picodrive.git
synced 2025-09-05 15:27:46 -04:00
vdp rendering, fix sprite masking and interlace layer priority
This commit is contained in:
parent
6bfa97ff78
commit
8e4ab3c62c
1 changed files with 3 additions and 3 deletions
|
@ -418,7 +418,6 @@ void DrawStripInterlace(struct TileStrip *ts, int plane_sh)
|
||||||
unsigned int pack;
|
unsigned int pack;
|
||||||
|
|
||||||
code = PicoMem.vram[ts->nametab + (tilex & ts->xmask)];
|
code = PicoMem.vram[ts->nametab + (tilex & ts->xmask)];
|
||||||
if (code==blank) continue;
|
|
||||||
if (code>>15) { // high priority tile
|
if (code>>15) { // high priority tile
|
||||||
int cval = (code&0xfc00) | (dx<<16) | (ty<<25);
|
int cval = (code&0xfc00) | (dx<<16) | (ty<<25);
|
||||||
cval|=(code&0x3ff)<<1;
|
cval|=(code&0x3ff)<<1;
|
||||||
|
@ -426,6 +425,7 @@ void DrawStripInterlace(struct TileStrip *ts, int plane_sh)
|
||||||
*ts->hc++ = cval; // cache it
|
*ts->hc++ = cval; // cache it
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
if (code==blank) continue;
|
||||||
|
|
||||||
if (code!=oldcode) {
|
if (code!=oldcode) {
|
||||||
oldcode = code;
|
oldcode = code;
|
||||||
|
@ -1358,7 +1358,7 @@ static NOINLINE void PrepareSprites(int max_lines)
|
||||||
unsigned char *p = &HighLnSpr[y][0];
|
unsigned char *p = &HighLnSpr[y][0];
|
||||||
int cnt = p[0];
|
int cnt = p[0];
|
||||||
if (p[3] >= max_line_sprites) continue; // sprite limit?
|
if (p[3] >= max_line_sprites) continue; // sprite limit?
|
||||||
if ((p[1] & SPRL_MASKED) && !(entry & 0x80)) continue; // masked?
|
if (p[1] & SPRL_MASKED) continue; // masked?
|
||||||
|
|
||||||
w = width;
|
w = width;
|
||||||
if (p[2] + width > max_line_sprites*2) { // tile limit?
|
if (p[2] + width > max_line_sprites*2) { // tile limit?
|
||||||
|
@ -1371,7 +1371,7 @@ static NOINLINE void PrepareSprites(int max_lines)
|
||||||
|
|
||||||
if (sx == -0x78) {
|
if (sx == -0x78) {
|
||||||
if (p[1] & (SPRL_HAVE_X|SPRL_TILE_OVFL))
|
if (p[1] & (SPRL_HAVE_X|SPRL_TILE_OVFL))
|
||||||
p[1] |= SPRL_MASKED; // masked, no more low sprites for this line
|
p[1] |= SPRL_MASKED; // masked, no more sprites for this line
|
||||||
if (!(p[1] & SPRL_HAVE_X) && cnt == 0)
|
if (!(p[1] & SPRL_HAVE_X) && cnt == 0)
|
||||||
p[1] |= SPRL_HAVE_MASK0; // 1st sprite is masking
|
p[1] |= SPRL_HAVE_MASK0; // 1st sprite is masking
|
||||||
} else
|
} else
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue