giz menu works
[picodrive.git] / Pico / Draw2.c
index 5037e2f..9fc413b 100644 (file)
@@ -21,7 +21,6 @@
 #define USE_CACHE\r
 \r
 \r
-extern unsigned char *framebuff; // in format (8+320)x(8+224+8) (eights for borders)\r
 int currpri = 0;\r
 \r
 static int HighCache2A[41*(TILE_ROWS+1)+1+1]; // caches for high layers\r
@@ -139,7 +138,7 @@ static void DrawWindowFull(int start, int end, int prio)
 {\r
        struct PicoVideo *pvid=&Pico.video;\r
        int nametab, nametab_step, trow, tilex, blank=-1, code;\r
-       unsigned char *scrpos = framebuff;\r
+       unsigned char *scrpos = PicoDraw2FB;\r
        int tile_start, tile_end; // in cells\r
 \r
        // parse ranges\r
@@ -239,7 +238,7 @@ static void DrawLayerFull(int plane, int *hcache, int planestart, int planeend)
        if (plane==0) nametab=(pvid->reg[2]&0x38)<< 9; // A\r
        else          nametab=(pvid->reg[4]&0x07)<<12; // B\r
 \r
-       scrpos = framebuff;\r
+       scrpos = PicoDraw2FB;\r
        scrpos+=8*328*(planestart-START_ROW);\r
 \r
        // Get vertical scroll value:\r
@@ -317,7 +316,7 @@ static void DrawTilesFromCacheF(int *hc)
 //     unsigned short *pal;\r
        unsigned char pal;\r
        short blank=-1; // The tile we know is blank\r
-       unsigned char *scrpos = framebuff, *pd = 0;\r
+       unsigned char *scrpos = PicoDraw2FB, *pd = 0;\r
 \r
        // *hcache++ = code|(dx<<16)|(trow<<27); // cache it\r
        scrpos+=(*hc++)*328 - START_ROW*328*8;\r
@@ -380,7 +379,7 @@ static void DrawSpriteFull(unsigned int *sprite)
        // goto first vertically visible tile\r
        while(sy <= START_ROW*8) { sy+=8; tile+=tdeltay; height--; }\r
 \r
-       scrpos = framebuff;\r
+       scrpos = PicoDraw2FB;\r
        scrpos+=(sy-START_ROW*8)*328;\r
 \r
        for (; height > 0; height--, sy+=8, tile+=tdeltay)\r
@@ -481,7 +480,7 @@ static void DrawAllSpritesFull(int prio, int maxwidth)
 static void BackFillFull(int reg7)\r
 {\r
        unsigned int back, i;\r
-       unsigned int *p=(unsigned int *)framebuff;\r
+       unsigned int *p=(unsigned int *)PicoDraw2FB;\r
 \r
        // Start with a background color:\r
 //     back=PicoCramHigh[reg7&0x3f];\r