// Index + 0 : hhhhvvvv ab--hhvv yyyyyyyy yyyyyyyy // a: offscreen h, b: offs. v, h: horiz. size\r
// Index + 4 : xxxxxxxx xxxxxxxx pccvhnnn nnnnnnnn // x: x coord + 8\r
\r
-static void DrawSprite(int *sprite, int sh, int as)\r
+static void DrawSprite(int *sprite, int sh)\r
{\r
int width=0,height=0;\r
int row=0,code=0;\r
delta<<=4; // Delta of address\r
\r
pal=(code>>9)&0x30;\r
- pal|=((sh|as)<<6);\r
+ pal|=sh<<6;\r
\r
if (sh && (code&0x6000) == 0x6000) {\r
if(code&0x0800) fTileFunc=TileFlipSH_noop;\r
{\r
int rs = rendstatus, scan = DrawScanline;\r
unsigned char *p;\r
- int cnt, as;\r
+ int cnt;\r
\r
if (rs & (PDRAW_SPRITES_MOVED|PDRAW_DIRTY_SPRITES)) {\r
//elprintf(EL_STATUS, "PrepareSprites(%i)", (rs>>4)&1);\r
if (cnt == 0) return;\r
\r
p = &HighLnSpr[scan][2];\r
- as = (rs & PDRAW_ACC_SPRITES) ? 1 : 0;\r
\r
// Go through sprites backwards:\r
for (cnt--; cnt >= 0; cnt--)\r
{\r
int offs;\r
- if ((p[cnt] >> 7) != prio && !as) continue;\r
+ if ((p[cnt] >> 7) != prio) continue;\r
offs = (p[cnt]&0x7f) * 2;\r
- DrawSprite(HighPreSpr + offs, sh, as);\r
+ DrawSprite(HighPreSpr + offs, sh);\r
}\r
}\r
\r
DrawWindow( (win&0x80) ? edge : 0, (win&0x80) ? maxcells>>1 : edge, 0, sh|as);\r
} else\r
DrawLayer(0|((sh|as)<<1), HighCacheA, 0, maxcells);\r
- if ((rendstatus & PDRAW_HAVE_LO_SPR) || as)\r
+ if (rendstatus & PDRAW_HAVE_LO_SPR)\r
DrawAllSpritesLoPri(0, sh);\r
\r
if (HighCacheB[0]) DrawTilesFromCache(HighCacheB, sh, maxw);\r
if (PicoOpt & POPT_ACC_SPRITES)\r
rendstatus |= PDRAW_ACC_SPRITES;\r
\r
- if ((Pico.video.reg[12]&6) == 6) {\r
- rendstatus |= PDRAW_INTERLACE; // interlace mode\r
- DrawAllSpritesLoPri =\r
- DrawAllSpritesHiPri = DrawAllSpritesInterlace;\r
- }\r
- else if (sh)\r
+ if (sh)\r
{\r
DrawAllSpritesLoPri = DrawAllSprites;\r
DrawAllSpritesHiPri = DrawSpritesSHi;\r
}\r
if (rendstatus & PDRAW_ACC_SPRITES)\r
DrawAllSpritesHiPri = DrawSpritesHiAS;\r
+ if ((Pico.video.reg[12]&6) == 6) {\r
+ rendstatus |= PDRAW_INTERLACE; // interlace mode\r
+ DrawAllSpritesLoPri =\r
+ DrawAllSpritesHiPri = DrawAllSpritesInterlace;\r
+ }\r
\r
if (Pico.m.dirtyPal) Pico.m.dirtyPal = 2; // reset dirty if needed\r
\r
\r
@ time to do some real work\r
stmfd sp!, {r4-r11,lr}\r
- ldr r4, =rendstatus\r
mov r12,#0xff\r
- ldr r4, [r4]\r
strb r12,[r2,#1] @ set end marker\r
add r10,r2, #2\r
add r10,r10,r3 @ r10=HighLnSpr end\r
\r
- mov r8, r1, lsl #4\r
- tst r4, #PDRAW_ACC_SPRITES\r
- orrne r8, r8, #1\r
- str r8, [sp, #-4] @ no calls after this point\r
+ str r1, [sp, #-4] @ no calls after this point\r
\r
.if OVERRIDE_HIGHCOL\r
ldr r11,=HighCol\r
mov r2, r0, lsr #7\r
cmp r0, #0xff\r
ldmeqfd sp!, {r4-r11,pc} @ end of list\r
- cmp r2, r8, lsr #5\r
+ cmp r2, r8, lsr #1\r
bne DrawSprite @ wrong priority\r
and r0, r0, #0x7f\r
add r0, r1, r0, lsl #3\r
mov r2, r9, asr #16 @ r2=sx\r
mov r9, r9, lsl #16\r
mov r9, r9, lsr #16\r
- orr r9, r9, r8, lsl #27 @ r9=code|sh[31]|as[27]\r
+ orr r9, r9, r8, lsl #31 @ r9=code|sh[31]\r
\r
tst r9, #0x1000\r
movne r4, r5, lsl #3\r
mov r5, r5, lsl #4 @ delta<<=4; // Delta of address\r
and r4, r9, #0x6000\r
orr r9, r9, r4, lsl #16\r
- orr r9, r9, #0x10000000 @ r9=scc1 a??? ... <code> (s=shadow/hilight, cc=pal, a=acc_spr)\r
+ orrs r9, r9, #0x10000000 @ r9=scc1 ???? ... <code> (s=shadow/hilight, cc=pal)\r
\r
- orrs r3, r9, r9, lsl #4\r
mov r3, r4, lsr #9 @ r3=pal=((code>>9)&0x30);\r
- orrmi r3, r3, #0x40 @ for shadow|as\r
+ orrmi r3, r3, #0x40 @ for sh/hi\r
\r
add r6, r6, #1 @ inc now\r
adds r0, r2, #0 @ mov sx to r0 and set ZV flags\r
else sprites_lo++;\r
\r
dstrp = dstr;\r
- sprintf(dstrp, "mode set 1: %02x spr lo: %2i, spr hi: %2i\n", (r=reg[0]), sprites_lo, sprites_hi);\r
+ sprintf(dstrp, "mode set 1: %02x spr lo[%c]: %2i, spr hi[%c]: %2i\n", (r=reg[0]),\r
+ rendstatus&PDRAW_HAVE_LO_SPR?'y':'n', sprites_lo, rendstatus&PDRAW_HAVE_HI_SPR?'y':'n', sprites_hi);\r
dstrp+=strlen(dstrp);\r
sprintf(dstrp, "display_disable: %i, M3: %i, palette: %i, ?, hints: %i\n", bit(r,0), bit(r,1), bit(r,2), bit(r,4));\r
dstrp+=strlen(dstrp);\r