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
- px=x;\r
- py=y;\r
+ //const int px, py;\r
+ int i;\r
+ const int px=x-page->dx;\r
+ const int py=y-page->dy;\r
for(plane=0; plane < 4; plane++) {\r
- i=(rx/4)+((rx/4)*ry);\r
+ i=(rx/4)+((p->pwidth)*ry);\r
modexSelectPlane(PLANE(plane+x));\r
for(; y < py+rh; y++) {\r
//for(px=0; px < p->width; px++) {\r
DrawPBuf(page_t *page, int x, int y, planar_buf_t *p, boolean sprite)\r
{\r
int plane;\r
- int px, py, i;\r
+ int i;\r
// byte near *buff;\r
- px=x;\r
- py=y;\r
+ const int px=x;\r
+ const int py=y;\r
// buff = _nmalloc(p->pwidth+1);\r
// TODO Make this fast. It's SLOOOOOOW\r
// for(plane=0; plane < 4; plane++) {\r
//cannot print number value du to it being slow as bakapee
#else
#ifdef BMPTYPE
+ modexClearRegion(page, x, y, t->tileWidth, t->tileHeight, ((t->debug_data[i])+1)*2);
//modexDrawPBufRegion(page, x, y, rx, ry, t->tileWidth, t->tileHeight, (t->data), 0);
#else
modexDrawBmpRegion(page, x, y, rx, ry, t->tileWidth, t->tileHeight, (t->data));