\r
\r
#include "PicoInt.h"\r
-#ifndef __GNUC__\r
-#pragma warning (disable:4706) // Disable assignment within conditional\r
-#endif\r
\r
int (*PicoScan)(unsigned int num, void *data)=NULL;\r
\r
-unsigned short DefOutBuff[320*2];\r
+#if OVERRIDE_HIGHCOL\r
+static unsigned char DefHighCol[8+320+8];\r
+unsigned char *HighCol=DefHighCol;\r
+#else\r
unsigned char HighCol[8+320+8];\r
+#endif\r
+unsigned short DefOutBuff[320*2];\r
+void *DrawLineDest=DefOutBuff; // pointer to dest buffer where to draw this line to\r
+\r
static int HighCacheA[41+1]; // caches for high layers\r
static int HighCacheB[41+1];\r
static int HighCacheS[80+1]; // and sprites\r
// lsb->msb: moved sprites, not all window tiles use same priority, accurate sprites (copied from PicoOpt), interlace\r
// dirty sprites, sonic mode, have layer with all hi prio tiles (mk3), layer sh/hi already processed\r
int rendstatus;\r
-void *DrawLineDest=DefOutBuff; // pointer to dest buffer where to draw this line to\r
int Scanline=0; // Scanline\r
\r
static int SpriteBlocks;\r
}\r
}\r
\r
-void (*FinalizeLine)(int sh) = FinalizeLineBGR444;\r
+static void (*FinalizeLine)(int sh) = FinalizeLineBGR444;\r
\r
// --------------------------------------------\r
\r
if (Pico.video.reg[1]&0x40)\r
DrawDisplay(sh);\r
\r
- FinalizeLine(sh);\r
- //if (SpriteBlocks & (1<<(scan>>3))) for (sh=0; sh < 30; sh++) DrawLineDest[sh] = 0xf;\r
+ if (FinalizeLine != NULL)\r
+ FinalizeLine(sh);\r
\r
Skip=PicoScan(Scanline,DrawLineDest);\r
\r
\r
void PicoDrawSetColorFormat(int which)\r
{\r
- if (which == 2)\r
- FinalizeLine = FinalizeLine8bit;\r
- else if (which == 1)\r
- FinalizeLine = FinalizeLineRGB555;\r
- else FinalizeLine = FinalizeLineBGR444;\r
+ switch (which)\r
+ {\r
+ case 2: FinalizeLine = FinalizeLine8bit; break;\r
+ case 1: FinalizeLine = FinalizeLineRGB555; break;\r
+ case 0: FinalizeLine = FinalizeLineBGR444; break;\r
+ default:FinalizeLine = NULL; break;\r
+ }\r
}\r
+\r