for(;is_run();delay_fps(60))
{
x=(x+20)%800;
int pt[]={400,0+x,420,30+x,480,30+x,500,0+x,500,80+x,400,80+x};
cleardevice();
fillpoly(6,pt);
if(x>=420)
{
int pt[]={400,500,420,30,480,30,500,0,500,80,400,80};
for(;is_run();delay_fps(60))
{
x=(x+20)%800;
int pt[]={0+x,0,20+x,30,80+x,30,100+x,0,100+x,80,0+x,80};
cleardevice();
fillpoly(6,pt);
}
}