if(objwidth>1 && objheight>1){
for(int h=0; h<objheight; h++){
for(int w=0; w<objwidth; w++){
if(w==0 && h==0){
tiletopleft.paintIcon(c, g, x-Level.sx, y-Level.sy);
}
if(w==objwidth-1 && h==0){
tiletopright.paintIcon(c, g, x-Level.sx+(w*tilesizex), y-Level.sy);
}
if(w==0 && h==objheight-1){
tilebottomleft.paintIcon(c, g, x-Level.sx, y-Level.sy+(h*tilesizey));
}
if(w==objwidth-1 && h==objheight-1){
tilebottomright.paintIcon(c, g, x-Level.sx+(w*tilesizex), y-Level.sy+(h*tilesizey));
}
if(w<objwidth-1 && w>0 && h==0){
tiletop.paintIcon(c, g, x-Level.sx+(w*tilesizex), y-Level.sy);
}
if(w<objwidth-1 && w>0 && h==objheight-1){
tilebottom.paintIcon(c, g, x-Level.sx+(w*tilesizex), y-Level.sy+(h*tilesizey));
}
if(w==0 && h<objheight-1 && h>0){
tileleft.paintIcon(c, g, x-Level.sx, y-Level.sy+(h*tilesizey));
}
if(w==objwidth-1 && h<objheight-1 && h>0){
tileright.paintIcon(c, g, x-Level.sx+(w*tilesizex), y-Level.sy+(h*tilesizey));
}
if(w>0 && h>0 && w<objwidth-1 && h<objheight-1){
tile.paintIcon(c, g, x+(w*tilesizex)-Level.sx, y+(h*tilesizey)-Level.sy);
}
}
}
return;
}