#include "stdio.h"
#include "graphics.h"
#include "stdlib.h"
#define DV delay(100000000);
#define CH bar(370,376,378,384);
void main()
{
int gdriver=DETECT,gdmove;
void *bmw;
int x,y,maxy;
unsigned int size;
int car[]={260.144,352,252.144,344,266,336,266,300,253.144,292,266,284,274,284,282,270.144,
290,270.144,298,284,314,284,322,270.144,330,270.144,338,284,346,284,359.856,292,
347,300,347,336,360.856,344,352.856,352,
359.856,384,352.856,392,266,392,253.144,384,260.144,352}; /*我的车外形采集点*/
initgraph(&gdriver,&gdmove,"c://JMSOFT//DRV");
setbkcolor(5);
setwritemode(XOR_PUT);/*异或方式显示*/
setcolor(YELLOW);
outtextxy(88,88,"HELLO!");
outtextxy(88,104,"WATCH MY CAR!");
outtextxy(88,288,"PLAYER:YP");
outtextxy(88,302,"MAN");
outtextxy(88,318,"BMW CAR CLUB");
outtextxy(88,334,"3 YEARS");
outtextxy(88,376,"GOOD LUCK MY FRIEND!");
outtextxy(88,392,"09/7/26");
circle(288,338,18);
circle(324,338,18);
line(306,284,306,392);
line(272.412,329,288,338);
line(303.588,329,288,338);
line(288,338,288,354);
drawpoly(25,car);/*画车轮廓*/
arc(324,329,0,90,9);
arc(324,329,270,360,9);
line(324,320,324,356);
circle(306,300,8);/*车标志开始*/
sector(306,300,0,90,8,8);
sector(306,300,180,270,8,8);
setfillstyle(1,BLUE);
sector(306,300,90,180,8,8);
sector(306,300,270,360,8,8);/*车标志完成*/
maxy=getmaxy();
x=252;y=274;
size=imagesize(x,y-10,x+108,y+118);
bmw=malloc(size);
getimage(x,y-10,x+108,y+118,bmw);
setfillstyle(SOLID_FILL,5);
outtextxy(370,376,"10"); CH DV
outtextxy(370,376,"9");DV CH
outtextxy(370,376,"8");DV CH
outtextxy(370,376,"7");DV CH
outtextxy(370,376,"6");DV CH
outtextxy(370,376,"5");DV CH
outtextxy(370,376,"4");DV CH
outtextxy(370,376,"3");DV CH
outtextxy(370,376,"2");DV CH
outtextxy(370,376,"1");DV CH
outtextxy(370,376,"0");
while(!kbhit())/*运动过程*/
{
bar(x,y-10,x+108,y+118);
y-=10;
if(y<0)y=maxy;
putimage(x,y-10,bmw,COPY_PUT);
delay(10000);
}
free(bmw);
getch();
closegraph();
}