}\r
}\r
\r
+//TODO!\r
+void\r
+modexDrawPBufregion(page_t *page, int x, int y, int sx, int sy, int fx, int fy planar_buf_t *p, boolean sprite)\r
+{\r
+ int plane;\r
+ int px, py, i;\r
+// byte near *buff;\r
+ px=x;\r
+ py=y;\r
+// buff = _nmalloc(p->pwidth+1);\r
+ // TODO Make this fast. It's SLOOOOOOW\r
+// for(plane=0; plane < 4; plane++) {\r
+// i=0;\r
+// modexSelectPlane(PLANE(plane+x));\r
+// for(px = plane; px < p->width; px+=4) {\r
+// offset=px;\r
+// for(py=0; py<p->height/2; py++) {\r
+// //SELECT_ALL_PLANES();\r
+// if(!sprite || p->plane[offset])\r
+// page->data = &(p->plane[offset][i++]);\r
+// offset+=p->width;\r
+// offset++;\r
+// }\r
+// }\r
+// }\r
+ for(plane=0; plane < 4; plane++) {\r
+ i=0;\r
+ modexSelectPlane(PLANE(plane+x));\r
+ for(; y < py+p->height; y++) {\r
+ //for(px=0; px < p->width; px++) {\r
+ //printf("%02X ", (int) p->plane[plane][i++]);\r
+// _fmemcpy(buff, &(p->plane[plane][i+=p->pwidth]), p->pwidth);\r
+// printf("buff %u==%s\n", y, *buff);\r
+// _fmemcpy(page->data + (((page->width/4) * (y+page->dy)) + ((x+page->dx) / 4)), buff, p->pwidth);\r
+ _fmemcpy(page->data + (((page->width/4) * (y+page->dy)) + ((x+page->dx) / 4)), &(p->plane[plane][i+=p->pwidth]), p->pwidth);\r
+ //}\r
+ }\r
+ x=px;\r
+ y=py;\r
+ }\r
+// _nfree(buff);\r
+}\r
+\r
void\r
DrawPBuf(page_t *page, int x, int y, planar_buf_t *p, boolean sprite)\r
{\r
void modexPanPage(page_t *page, int dx, int dy);
void modexSelectPlane(byte plane);
void modexClearRegion(page_t *page, int x, int y, int w, int h, byte color);
+void modexDrawPBufregion(page_t *page, int x, int y, int sx, int sy, int fx, int fy planar_buf_t *p, boolean sprite);
void DrawPBuf(page_t *page, int x, int y, planar_buf_t *p, boolean sprite);
void oldDrawBmp(byte far* page, int x, int y, bitmap_t *bmp, byte sprite);
//void CDrawBmp(byte far* vgamem, page_t* page, int x, int y, bitmap_t *bmp, byte sprite);