}\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
+//void\r
+//modexDrawBmpRegion (page_t *page, int x, int y, int rx, int ry, int rw, int rh, bitmap_t *bmp)\r
+void modexDrawPBufRegion (page_t *page, int x, int y, int rx, int ry, int rw, int rh, planar_buf_t *p, boolean sprite)\r
{\r
int plane;\r
int px, py, i;\r
// }\r
// }\r
for(plane=0; plane < 4; plane++) {\r
- i=0;\r
+ i=(rx/4)+((rx/4)*ry);\r
modexSelectPlane(PLANE(plane+x));\r
for(; y < py+p->height; y++) {\r
//for(px=0; px < p->width; px++) {\r
// _nfree(buff);\r
}\r
\r
-void\r
+/*void\r
DrawPBuf(page_t *page, int x, int y, planar_buf_t *p, boolean sprite)\r
{\r
int plane;\r
y=py;\r
}\r
// _nfree(buff);\r
-}\r
+}*/\r
\r
void\r
oldDrawBmp(byte far* page, int x, int y, bitmap_t *bmp, byte sprite)\r
}\r
}\r
\r
-void\r
-CDrawBmp(byte far* vgamem, page_t* page, int x, int y, bitmap_t *bmp, byte sprite)\r
-{\r
- byte plane;\r
- word px, py;\r
- word offset=0;\r
-\r
-\r
- /* TODO Make this fast. It's SLOOOOOOW */\r
- for(plane=0; plane < 4; plane++) {\r
- modexSelectPlane(PLANE(plane+x));\r
- for(px = plane; px < bmp->width; px+=4) {\r
- offset=px;\r
- for(py=0; py<bmp->height; py++) {\r
- if(!sprite || bmp->data[offset])\r
- //modexputPixel(page, x+px, y+py, bmp->data[offset]);\r
- vgamem[PAGE_OFFSET(x+px, y+py)] = bmp->data[offset];\r
- offset+=bmp->width;\r
- }\r
- }\r
- }\r
-}\r
-\r
void\r
modexDrawBmp(page_t *page, int x, int y, bitmap_t *bmp) {\r
/* draw the region (the entire freakin bitmap) */\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 modexDrawPBufRegion(page_t *page, int x, int y, int rx, int ry, int rw, int rh, planar_buf_t *p, boolean sprite);
+void modexDrawPBuf(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);
void modexDrawBmp(page_t *page, int x, int y, bitmap_t *bmp);
void modexDrawBmpRegion(page_t *page, int x, int y, int rx, int ry, int rw, int rh, bitmap_t *bmp);
void modexDrawPlanarBuf(page_t *page, int x, int y, planar_buf_t *bmp);
// t2 = (*clockw-start)/18.2;\r
start = *clockw;\r
for(i=0; i<100 ;i++) {\r
- DrawPBuf(&gvar.video.page[0], 0, 0, p, 0);\r
+ //DrawPBuf(&gvar.video.page[0], 0, 0, p, 0);\r
}\r
t2 = (*clockw-start) /18.2;\r
while(!kbhit())\r