[求助]怎么来实现字符或图形的动画效果啊
同上,比如一个矩形,怎么让他移动,来达到动画的效果啊,麻烦高手指教,最好能写一个小例子,多谢了
晕,不会没人知道吧
#include<stdio.h>
#include<graphics.h>
unsigned char *buff;
void screen()
{
int gm=DETECT;
int gd=VGA;
initgraph(&gm,&gd,"\\tc" );
}
main()
{
int i;
screen();
setbkcolor(1);
setcolor(BLUE);
rectangle(100,100,200,200);
setfillstyle(1,2);
floodfill(150,150,BLUE);
buff=malloc(imagesize(100,100,200,200));
getimage(100,100,200,200,buff);
for (i=0;i<300;i++)
putimage(100+i,100,buff,0);
getch();
closegraph();
}
看看这个行不行!!!