}\r
\r
code=PicoMem.vram[ts->nametab+nametabadd+(tilex&ts->xmask)];\r
- if (code==blank) continue;\r
+ if ((code<<16|ty)==blank) continue;\r
if (code>>15) { // high priority tile\r
int cval = code | (dx<<16) | (ty<<25);\r
if(code&0x1000) cval^=7<<26;\r
pack = *(unsigned int *)(PicoMem.vram + addr+ty);\r
\r
if (!pack) {\r
- blank = code;\r
+ blank = code<<16|ty;\r
continue;\r
}\r
\r
{\r
int blank=-1; // The tile we know is blank\r
while ((code=*hc++)) {\r
- if (!(code & 0x8000) || (unsigned short)code == blank)\r
+ if ((code<<16|code>>25) == blank)\r
continue;\r
// Get tile address/2:\r
addr = (code & 0x7ff) << 4;\r
\r
pack = *(unsigned int *)(PicoMem.vram + addr);\r
if (!pack) {\r
- blank = (unsigned short)code;\r
+ blank = code<<16|code>>25;\r
continue;\r
}\r
\r
delta<<=4; // Delta of address\r
\r
if (entry+1 == cnt) width = p[entry+1]; // last sprite width limited?\r
- for (; width; width--,sx+=8,tile+=delta)\r
+ mp = mb+(sx>>3);\r
+ for (m = *mp << 8; width; width--, sx+=8, *mp++ = m, tile+=delta)\r
{\r
unsigned int pack;\r
\r
delta<<=4; // Delta of address\r
\r
if (entry+1 == cnt) width = p[entry+1]; // last sprite width limited?\r
- mp = mb+(sx>>3);\r
- for (m = *mp << 8; width; width--, sx+=8, *mp++ = m, tile+=delta)\r
+ for (; width; width--,sx+=8,tile+=delta)\r
{\r
unsigned int pack;\r
\r