const int px=x+page->dx;\r
const int py=y+page->dy;\r
const int prw = rw/4;\r
+ int prh;\r
\r
//fine tuning\r
rx+=1;\r
//^^;\r
#define PEEE rx-prw\r
#define PE (p->pwidth)\r
- #define PEEEE (PE*(ry))\r
+ if(rh<p->height) prh = (PE*(ry-4));\r
+ else if(rh==p->height) prh = (PE*(ry));\r
y=py;\r
x=px;\r
//printf("%d,%d p(%d,%d) r(%d,%d) rwh(%d,%d)\n", x, y, px, py, rx, ry, rw, rh);\r
for(plane=0; plane < 4; plane++) {\r
- i=PEEE+PEEEE;\r
+ i=PEEE+prh;\r
modexSelectPlane(PLANE(plane-1));\r
for(; y < py+rh; y++) {\r
_fmemcpy(page->data + (((page->width/4) * (y)) + ((x) / 4)), &(p->plane[plane][i]), prw);\r