copy
int sx = x*tileW;
int sy = y*tileH;
int sw = tileW;
int sh = tileH;
int dx = sx;
int dy = sy;
int dw = tileW;
int dh = tileH;
copy(pg, sx, sy, sw, sh, dx, dy, dw, dh);
int sx = x*tileW;
int sy = y*tileH;
int sw = tileW;
int sh = tileH;
int dx = sx;
int dy = sy;
int dw = tileW;
int dh = tileH;
copy(pg, sx, sy, sw, sh, dx, dy, dw, dh);