mirror of
https://github.com/FunKey-Project/picodrive-irixxxx.git
synced 2026-02-02 04:55:30 +01:00
vdp sprite rendering fixes
This commit is contained in:
parent
c1d5d254e9
commit
e7fec045a7
14
pico/draw.c
14
pico/draw.c
@ -333,7 +333,7 @@ static void DrawStripVSRam(struct TileStrip *ts, int plane_sh, int cellskip)
|
||||
}
|
||||
|
||||
code=PicoMem.vram[ts->nametab+nametabadd+(tilex&ts->xmask)];
|
||||
if (code==blank) continue;
|
||||
if ((code<<16|ty)==blank) continue;
|
||||
if (code>>15) { // high priority tile
|
||||
int cval = code | (dx<<16) | (ty<<25);
|
||||
if(code&0x1000) cval^=7<<26;
|
||||
@ -353,7 +353,7 @@ static void DrawStripVSRam(struct TileStrip *ts, int plane_sh, int cellskip)
|
||||
pack = *(unsigned int *)(PicoMem.vram + addr+ty);
|
||||
|
||||
if (!pack) {
|
||||
blank = code;
|
||||
blank = code<<16|ty;
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -638,7 +638,7 @@ static void DrawTilesFromCache(int *hc, int sh, int rlim, struct PicoEState *est
|
||||
{
|
||||
int blank=-1; // The tile we know is blank
|
||||
while ((code=*hc++)) {
|
||||
if (!(code & 0x8000) || (unsigned short)code == blank)
|
||||
if ((code<<16|code>>25) == blank)
|
||||
continue;
|
||||
// Get tile address/2:
|
||||
addr = (code & 0x7ff) << 4;
|
||||
@ -646,7 +646,7 @@ static void DrawTilesFromCache(int *hc, int sh, int rlim, struct PicoEState *est
|
||||
|
||||
pack = *(unsigned int *)(PicoMem.vram + addr);
|
||||
if (!pack) {
|
||||
blank = (unsigned short)code;
|
||||
blank = code<<16|code>>25;
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -1026,7 +1026,8 @@ static void DrawSpritesHiAS(unsigned char *sprited, int sh)
|
||||
delta<<=4; // Delta of address
|
||||
|
||||
if (entry+1 == cnt) width = p[entry+1]; // last sprite width limited?
|
||||
for (; width; width--,sx+=8,tile+=delta)
|
||||
mp = mb+(sx>>3);
|
||||
for (m = *mp << 8; width; width--, sx+=8, *mp++ = m, tile+=delta)
|
||||
{
|
||||
unsigned int pack;
|
||||
|
||||
@ -1090,8 +1091,7 @@ static void DrawSpritesForced(unsigned char *sprited)
|
||||
delta<<=4; // Delta of address
|
||||
|
||||
if (entry+1 == cnt) width = p[entry+1]; // last sprite width limited?
|
||||
mp = mb+(sx>>3);
|
||||
for (m = *mp << 8; width; width--, sx+=8, *mp++ = m, tile+=delta)
|
||||
for (; width; width--,sx+=8,tile+=delta)
|
||||
{
|
||||
unsigned int pack;
|
||||
|
||||
|
||||
@ -796,8 +796,6 @@ DrawTilesFromCache:
|
||||
bic r4, r1, #0xfe00
|
||||
add r1, r11, r4 @ r1=pdest
|
||||
|
||||
movs r7, r6, lsl #16
|
||||
bpl .dtfc_loop @ !(code & 0x8000)
|
||||
cmp r5, r7, lsr #16
|
||||
beq .dtfc_samecode @ if (code==prevcode)
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user