asm for DrawStripVSRam
[picodrive.git] / Pico / Draw.c
index 2eed289..582c8cb 100644 (file)
@@ -34,7 +34,7 @@ static int SpriteBlocks;
 struct TileStrip\r
 {\r
   int nametab; // Position in VRAM of name table (for this tile line)\r
-  int line;    // Line number in pixels 0x000-0x3ff within the virtual tilemap \r
+  int line;    // Line number in pixels 0x000-0x3ff within the virtual tilemap\r
   int hscroll; // Horizontal scroll value in pixels for the line\r
   int xmask;   // X-Mask (0x1f - 0x7f) for horizontal wraparound in the tilemap\r
   int *hc;     // cache for high tile codes and their positions\r
@@ -317,12 +317,8 @@ static void DrawStrip(struct TileStrip *ts, int sh)
   // terminate the cache list\r
   *ts->hc = 0;\r
 }\r
-#endif\r
 \r
 // this is messy\r
-#ifndef _ASM_DRAW_C\r
-static\r
-#endif\r
 void DrawStripVSRam(struct TileStrip *ts, int plane)\r
 {\r
   int tilex=0,dx=0,ty=0,code=0,addr=0,cell=0,nametabadd=0;\r
@@ -386,6 +382,7 @@ void DrawStripVSRam(struct TileStrip *ts, int plane)
   // terminate the cache list\r
   *ts->hc = 0;\r
 }\r
+#endif\r
 \r
 #ifndef _ASM_DRAW_C\r
 static\r
@@ -921,13 +918,13 @@ static void PrepareSprites(int full)
       height = (hv&3)+1;\r
 \r
       if(sy > 240 || sy + (height<<3) <= 0) skip|=1<<22;\r
-      \r
+\r
       width  = (hv>>2)+1;\r
       code2 = sprite[1];\r
       sx = (code2>>16)&0x1ff;\r
       sx -= 0x78; // Get X coordinate + 8\r
       sx_min = 8-(width<<3);\r
-    \r
+\r
       if((sx <= sx_min && sx >= -0x76) || sx >= 328) skip|=1<<23;\r
       else if (sx > sx_min && !skip) {\r
         int sbl = (2<<height)-1;\r
@@ -935,10 +932,10 @@ static void PrepareSprites(int full)
         if(shi < 0) shi=0; // negative sy\r
         sblocks |= sbl<<shi;\r
       }\r
-    \r
+\r
       *pd++ = (width<<28)|(height<<24)|skip|(hv<<16)|((unsigned short)sy);\r
       *pd++ = (sx<<16)|((unsigned short)code2);\r
-    \r
+\r
       // Find next sprite\r
       link=(code>>16)&0x7f;\r
       if(!link) break; // End of sprites\r
@@ -1205,7 +1202,7 @@ static int DrawDisplay(int sh)
   if (win&0x80) { if (Scanline>=edge) hvwind=1; }\r
   else          { if (Scanline< edge) hvwind=1; }\r
 \r
-  if(!hvwind) { // we might have a vertical window here \r
+  if(!hvwind) { // we might have a vertical window here\r
     win=pvid->reg[0x11];\r
     edge=win&0x1f;\r
     if(win&0x80) {\r