The following code compiles but ball does not move what's the problem?
is any problem with getimage or putimage?Code:# include<graphics.h> # include<conio.h> # include<alloc.h> int main() { int gd=DETECT,gm,mx,my,radius,area,x,y; char *buff; initgraph(&gd,&gm,""); mx=getmaxx(); my=getmaxy(); radius=4; rectangle(0,0,mx,my); bar(253,450,317,454); setcolor(RED); setfillstyle(SOLID_FILL,RED); circle(304,404,radius); floodfill(304,404,RED); area=imagesize(6,6,30,30); buff= malloc(area); getimage(6,6,30,30,buff); x=25; y=25; while(!kbhit()) { putimage(x,y,buff,XOR_PUT); x=x*20; y=y*20; putimage(x,y,buff,XOR_PUT); } getch(); return; }



LinkBack URL
About LinkBacks


