Apri bombayku kalla vandi keri,mumbai police choodyam cheytha shesham vittayachuTP location changedkoziyude eduthu kaalinu mukalilude ALTO car keri irangi

Tuesday, September 21, 2010


#include
#include
#include
#include
#include

void *bitmap;

void draw_car()
{
int size;
setcolor(RED);
line(0,300,getmaxx(),300);

circle(20,289,10);
circle(60,289,10);

rectangle(0,249,80,279);

rectangle(20,229,60,249);

size=imagesize(0,229,80,299);
bitmap=malloc(size);
getimage(0,229,80,289,bitmap);
}


void redraw(int x)
{
int flag=0;
while(1)
{
if(kbhit())
{
char ch=getch();
cleardevice();

if(ch=='a')
{
x+=2;
flag++;
line(0,300,getmaxx(),300);
}
if(ch=='d')
{
x-=2;
flag++;
}
if(ch=='r')
{
x=0;
}
if(ch=='h')
{
putimage(0+x,229,bitmap,COPY_PUT);
line(0,300,getmaxx(),300);
circle(20+x,289,10);
circle(60+x,289,10);
setfillstyle(1,BLUE);
pieslice(20+x,289,0,90,10);
pieslice(20+x,289,180,270,10);
pieslice(60+x,289,0,90,10);
pieslice(60+x,289,180,270,10);

sound(800);
delay(40);
nosound();
}
if(ch=='q')
break;
}
if(flag%2==0)
{
putimage(0+x,229,bitmap,COPY_PUT);
line(0,300,getmaxx(),300);
circle(20+x,289,10);
circle(60+x,289,10);
setfillstyle(1,BLUE);
pieslice(20+x,289,0,90,10);
pieslice(20+x,289,180,270,10);
pieslice(60+x,289,0,90,10);
pieslice(60+x,289,180,270,10);
}
else
{
putimage(0+x,229,bitmap,COPY_PUT);
line(0,300,getmaxx(),300);
circle(20+x,289,10);
circle(60+x,289,10);
pieslice(20+x,289,90,180,10);
pieslice(20+x,289,270,360,10);
pieslice(60+x,289,90,180,10);
pieslice(60+x,289,270,360,10);
}

delay(100);

if(x<=0)
x=0;
if(x==640)
x-=10;

}
}


int main()
{
int gd=DETECT,gm,x=0,choice;
void *bitmap;
initgraph(&gd,&gm,"..//bgi");
draw_car();
redraw(x);
return 1;
}



No comments: