// Index + 0 : hhhhvvvv ----hhvv yyyyyyyy yyyyyyyy // v, h: vert./horiz. size\r
// Index + 4 : xxxxxxxx xxxxxxxx pccvhnnn nnnnnnnn // x: x coord + 8\r
\r
-void PrepareSprites(int full)\r
+static NOINLINE void PrepareSprites(int full)\r
{\r
const struct PicoVideo *pvid=&Pico.video;\r
const struct PicoEState *est=&Pico.est;\r
static void DrawAllSprites(unsigned char *sprited, int prio, int sh,\r
struct PicoEState *est)\r
{\r
- int rs = est->rendstatus;\r
unsigned char *p;\r
int cnt;\r
\r
- if (rs & (PDRAW_SPRITES_MOVED|PDRAW_DIRTY_SPRITES)) {\r
- //elprintf(EL_STATUS, "PrepareSprites(%i)", (rs>>4)&1);\r
- PrepareSprites(rs & PDRAW_DIRTY_SPRITES);\r
- est->rendstatus = rs & ~(PDRAW_SPRITES_MOVED|PDRAW_DIRTY_SPRITES);\r
- }\r
-\r
cnt = sprited[0] & 0x7f;\r
if (cnt == 0) return;\r
\r
int win=0,edge=0,hvwind=0;\r
int maxw,maxcells;\r
\r
+ if (est->rendstatus & (PDRAW_SPRITES_MOVED|PDRAW_DIRTY_SPRITES)) {\r
+ // elprintf(EL_STATUS, "PrepareSprites(%i)", (est->rendstatus>>4)&1);\r
+ PrepareSprites(est->rendstatus & PDRAW_DIRTY_SPRITES);\r
+ est->rendstatus &= ~(PDRAW_SPRITES_MOVED|PDRAW_DIRTY_SPRITES);\r
+ }\r
+\r
est->rendstatus &= ~(PDRAW_SHHI_DONE|PDRAW_PLANE_HI_PRIO);\r
\r
if (pvid->reg[12]&1) {\r
DrawLayer(0|(sh<<1), HighCacheA, 0, maxcells, est);\r
/* - sprites low - */\r
if (!(PicoDrawMask & PDRAW_SPRITES_LOW_ON));\r
- else if (Pico.est.rendstatus & PDRAW_INTERLACE)\r
+ else if (est->rendstatus & PDRAW_INTERLACE)\r
DrawAllSpritesInterlace(0, sh);\r
else if (sprited[1] & SPRL_HAVE_LO)\r
DrawAllSprites(sprited, 0, sh, est);\r
DrawTilesFromCache(HighCacheA, sh, maxw, est);\r
/* - sprites hi - */\r
if (!(PicoDrawMask & PDRAW_SPRITES_HI_ON));\r
- else if (Pico.est.rendstatus & PDRAW_INTERLACE)\r
+ else if (est->rendstatus & PDRAW_INTERLACE)\r
DrawAllSpritesInterlace(1, sh);\r
// have sprites without layer pri bit ontop of sprites with that bit\r
else if ((sprited[1] & 0xd0) == 0xd0 && (PicoOpt & POPT_ACC_SPRITES))\r
\r
DrawAllSprites:\r
orr r1, r2, r1, lsl #1\r
- ldr r12,[r3, #OFS_rendstatus]\r
- tst r12,#(PDRAW_DIRTY_SPRITES|PDRAW_SPRITES_MOVED)\r
- beq das_no_prep\r
- stmfd sp!, {r0,r1,r3,lr}\r
- and r0, r12,#PDRAW_DIRTY_SPRITES\r
- bic r12,r12,#(PDRAW_DIRTY_SPRITES|PDRAW_SPRITES_MOVED)\r
- str r12,[r3, #OFS_rendstatus]\r
- bl PrepareSprites\r
- ldmfd sp!, {r0,r1,r3,lr}\r
-\r
-das_no_prep:\r
ldr r2, [r0]\r
ands r2, r2, #0x7f\r
bxeq lr\r