




已阅读5页,还剩10页未读, 继续免费阅读
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
#define LEFT 0x4b #define RIGHT 0x4d #define DOWN 0x50 #define CHANGE 0x20 #define ESC 0x1b #define INTR 0x1C #define DefaultX 5 #define DefaultY 1 static unsigned counter=0; static unsigned shape7444= 0,1,1,0,0,1,1,0,0,0,0,0,0,0,0,0, 0,1,1,0,0,1,1,0,0,0,0,0,0,0,0,0, 0,1,1,0,0,1,1,0,0,0,0,0,0,0,0,0, 0,1,1,0,0,1,1,0,0,0,0,0,0,0,0,0, , 0,0,0,0,1,1,1,1,0,0,0,0,0,0,0,0, 0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0, 0,0,0,0,1,1,1,1,0,0,0,0,0,0,0,0, 0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0, , 0,1,0,0,1,1,1,0,0,0,0,0,0,0,0,0, 0,1,0,0,0,1,1,0,0,1,0,0,0,0,0,0, 0,0,0,0,1,1,1,0,0,1,0,0,0,0,0,0, 0,1,0,0,1,1,0,0,0,1,0,0,0,0,0,0, , 1,0,0,0,1,1,0,0,0,1,0,0,0,0,0,0, 0,0,0,0,0,1,1,0,1,1,0,0,0,0,0,0, 1,0,0,0,1,1,0,0,0,1,0,0,0,0,0,0, 0,0,0,0,0,1,1,0,1,1,0,0,0,0,0,0, , 0,1,0,0,1,1,0,0,1,0,0,0,0,0,0,0, 0,0,0,0,1,1,0,0,0,1,1,0,0,0,0,0, 0,1,0,0,1,1,0,0,1,0,0,0,0,0,0,0, 0,0,0,0,1,1,0,0,0,1,1,0,0,0,0,0, , 1,0,0,0,1,0,0,0,1,1,0,0,0,0,0,0, 0,0,0,0,1,1,1,0,1,0,0,0,0,0,0,0, 1,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0, 0,0,0,0,0,0,1,0,1,1,1,0,0,0,0,0, , 0,1,0,0,0,1,0,0,1,1,0,0,0,0,0,0, 0,0,0,0,1,0,0,0,1,1,1,0,0,0,0,0, 1,1,0,0,1,0,0,0,1,0,0,0,0,0,0,0, 0,0,0,0,1,1,1,0,0,0,1,0,0,0,0,0, , ; unsigned back2214 =1,1,0,0,0,0,0,0,0,0,0,0,1,1, 1,1,0,0,0,0,0,0,0,0,0,0,1,1, 1,1,0,0,0,0,0,0,0,0,0,0,1,1, 1,1,0,0,0,0,0,0,0,0,0,0,1,1, 1,1,0,0,0,0,0,0,0,0,0,0,1,1, 1,1,0,0,0,0,0,0,0,0,0,0,1,1, 1,1,0,0,0,0,0,0,0,0,0,0,1,1, 1,1,0,0,0,0,0,0,0,0,0,0,1,1, 1,1,0,0,0,0,0,0,0,0,0,0,1,1, 1,1,0,0,0,0,0,0,0,0,0,0,1,1, 1,1,0,0,0,0,0,0,0,0,0,0,1,1, 1,1,0,0,0,0,0,0,0,0,0,0,1,1, 1,1,0,0,0,0,0,0,0,0,0,0,1,1, 1,1,0,0,0,0,0,0,0,0,0,0,1,1, 1,1,0,0,0,0,0,0,0,0,0,0,1,1, 1,1,0,0,0,0,0,0,0,0,0,0,1,1, 1,1,0,0,0,0,0,0,0,0,0,0,1,1, 1,1,0,0,0,0,0,0,0,0,0,0,1,1, 1,1,0,0,0,0,0,0,0,0,0,0,1,1, 1,1,0,0,0,0,0,0,0,0,0,0,1,1, 1,1,1,1,1,1,1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1,1,1,1,1,1,1; char ShapeColor7=8,10,11,12,13,14,15; char DigitalShape10=128+119,3,62,31,128+75,128+93,128+125,19,128+127,128+95; char ZodiacBack11=4,6,12,13,11,10,2,3,9,1,8; char ZodiacSoft1814=0,0,0,0,96,0,0,0,0,0,0,0,60,0, 255,248,0,0,96,0,0,0,0,248,0,0,124,0, 255,248,0,0,97,128,0,0,3,248,0,0,192,0, 0,112,0,0,97,128,0,0,7,0,0,1,128,48, 0,224,0,0,96,0,0,0,14,0,0,1,128,48, 1,192,0,0,96,0,0,0,12,0,0,1,128,48, 3,128,120,15,97,128,240,60,12,0,15,15,249,255, 7,0,252,31,225,131,248,127,14,0,31,143,249,255, 7,1,142,48,225,135,24,227,7,240,49,193,128,48, 14,3,134,96,97,142,24,192,3,252,112,193,128,48, 28,3,6,96,97,140,25,192,0,28,96,193,128,48, 56,3,6,96,97,140,25,128,0,6,96,193,128,48, 56,3,6,96,97,140,25,128,0,6,96,193,128,48, 120,3,6,96,97,140,25,128,0,6,96,193,128,48, 224,1,140,48,225,142,25,195,24,14,49,129,128,48, 255,249,252,63,225,135,252,255,28,28,63,129,128,48, 255,248,240,15,97,131,236,60,15,248,30,1,128,48, 0,0,0,0,0,0,0,0,7,224,0,1,128,0; unsigned long TotalMark=0; unsigned int Erasered=0,ETimes=0; int Speed=0; int CEr=0; int NumOfLev5=0,0,0,0,0; int TimeDelay10=21,18,17,15,13,11,9,7,5,3; char NewShape2; unsigned PerOnce4; void interrupt ( *oldhandler)(_CPPARGS); void interrupt handler(_CPPARGS) +counter; oldhandler(); /*void DrawBackground() /setlinestyle void DrawDigital(int x,int y,int a) int i=7; setcolor(DigitalShapeai)&1)*7+4); /printf(%d,(DigitalShapeai)&1); i-; line(x,y+1,x,y+15); line(x+1,y+2,x+1,y+14); line(x+2,y+3,x+2,y+13); setcolor(DigitalShapeai)&1)*7+4); i-; line(x,y+17,x,y+31); line(x+1,y+18,x+1,y+30); line(x+2,y+19,x+2,y+29); setcolor(DigitalShapeai)&1)*7+4); i-; line(x,y+17,x,y+31); line(x+1,y+18,x+1,y+30); line(x+2,y+19,x+2,y+29); setcolor(DigitalShapeai)&1)*7+4); i-; line(x+1,y,x+16,y); line(x+2,y+1,x+15,y+1); line(x+3,y+2,x+14,y+2); setcolor(DigitalShapeai)&1)*7+4); i-; line(x+2,y+15,x+15,y+15); line(x+1,y+16,x+16,y+16); line(x+2,y+17,x+15,y+17); setcolor(DigitalShapeai)&1)*7+4); i-; line(x+3,y+30,x+14,y+30); line(x+2,y+31,x+15,y+31); line(x+1,y+32,x+16,y+32); setcolor(DigitalShapeai)&1)*7+4); i-; line(x+15,y+3,x+15,y+13); line(x+16,y+2,x+16,y+14); line(x+17,y+1,x+17,y+15); setcolor(DigitalShapeai)&1)*7+4); line(x+15,y+19,x+15,y+29); line(x+16,y+18,x+16,y+30); line(x+17,y+17,x+17,y+31); /*void ArtClear() for(int i=480;i=0;i-=2) setcolor(3); line(0,i-6,639,i-6); setcolor(9); line(0,i-4,639,i-4); setcolor(1); line(0,i-2,639,i-2); setcolor(getbkcolor(); line(0,i,639,i); delay(1); for(i=1;i480;i+=2) setcolor(3); line(0,i+6,639,i+6); setcolor(9); line(0,i+4,639,i+4); setcolor(1); line(0,i+2,639,i+2); setcolor(getbkcolor(); line(0,i,639,i); delay(1); /*void end() for(int j=0;j4;j+) for(int i=j;i480;i+=4) setcolor(3); line(0,i+8,639,i+8); setcolor(9); line(0,i+4,639,i+4); setcolor(1); line(0,i,639,i); setcolor(getbkcolor(); line(0,i,639,i); delay(1); delay(5); setcolor(YELLOW); outtextxy(260,200, Game Over ); gotoxy(14,16); printf(This freeware is written by Daniel.Qu ZodiacSoft 2000); gotoxy(12,17); printf(Please e-mail to or visit my homepage at); gotoxy(12,18); printf( if you have question.); gotoxy(14,20); printf(I will soon provide something new,please wait.); gotoxy(14,22); printf(We hold these truths to be self-evident,that all codes); gotoxy(12,23); printf(are created FREE.); getch(); clrscr(); closegraph(); exit(0); /*void ShowTitle() int gdriver=DETECT,gmode,errorcode,i,j,k; initgraph(&gdriver,&gmode,); errorcode=graphresult(); if (errorcode!=grOk) printf(Graphics error: %sn007,grapherrormsg(errorcode); exit(1); setbkcolor(9);/This line needs to be changed for(i=0;i11;i+) setcolor(ZodiacBacki); line(200,i*8+100,440,i*8+100); delay(1000); for(j=0;j17;j+) for(i=0;i11;i+) setcolor(ZodiacBack(i+j)%16); line(200,i*8+100,440,i*8+100); delay(4); for(j=0;j18;j+) for(i=0;i=0;k-) if(ZodiacSoftjik)&1) putpixel(i*8-k+271,j+122,14); delay(10); for(j=17;j=0;j-) for(i=0;i=0;k-) if(ZodiacSoftjik)&1) putpixel(i*8-k+271,158-j,5); delay(10); setcolor(15); outtextxy(295,171,Present); getch(); ArtClear(); /*void DrawShape(int x,int y,int color) /if(x12|y19) / return; setcolor(color); /*line(x4,y4,x4,(y4)+14); line(x4,(y4)+14,(x4)+14,(y4)+14); line(x4)+14,(y4)+14,(x4)+14,y*16); line(x4)+14,y4,x4,y*16); line(x4)+1,y4,(x4)+1,(y4)+14); line(x4)+1,(y4)+13,(x4)+14,(y4)+13); line(x4)+13,(y4)+13,(x4)+13,(y4)+1); line(x4)+13,(y4)+1,x4,(y4)+1); */ for(int i=0;i15;i+) line(x4,(y4)+i,(x4)+14,(y4)+i); setcolor(8); line(x4)+15, y4)+1,(x4)+15,(y4)+15); line(x4)+1,(y4)+15,(x4)+15,(y4)+15); setcolor(color-8); line(x4)+2,(y4)+2,(x4)+12,(y4)+2); line(x4)+2,(y4)+2,(x4)+2,(y4)+12); /*void DrawNull(int x,int y) setcolor(getbkcolor(); for(int i=0;i16;i+) line(x4,(y4)+i,(x4)+15,(y4)+i); /*void show(int x,int y,int CurrentShape,int Status) int temp; for(int i=0;i20;i+) for(int j=2;j12;j+) if(backij=1) DrawShape(6+j,4+i,8); else DrawNull(6+j,4+i); /no matter what the status be,I will draw the background for(int l=0;l4;l+) for(int p=0;p4;p+) if(l+x11|p+y19) continue; /if(shapeCurrentShapeStatuspl+backy+px+l=1) / DrawShape(3+l+x,3+p+y,8+CurrentShape); /else /coutO; / DrawNull(3+j,3+i); if(shapeCurrentShapeStatuspl=1) DrawShape(6+l+x,4+p+y,ShapeColorCurrentShape); if(backy+px+l=1) DrawShape(6+l+x,4+p+y,8); /*void DrawScore() int temp=TotalMark; for(int i=0;i7;i+) DrawDigital(477-i*20,65,temp%10); temp/=10; temp=Erasered; for(i=0;i4;i+) DrawDigital(491-i*20,111,temp%10); temp/=10; if(Erasered=0) return; for(i=1;i5;i+) setfillstyle(1,8); bar(378,163+i*14,508,170+i*14); setfillstyle(1,5); bar(378,163+i*14,378+130*NumOfLevi/ETimes,170+i*14); DrawDigital(466,293,Speed); return; /*int CreateNewShape() NewShape1=NewShape0; NewShape0=rand()%7; setfillstyle(1,0); bar(447,240,514,288); for(int l=0;l4;l+) for(int p=0;p4;p+) if(shapeNewShape00pl=1) DrawShape(28+l,15+p,ShapeColor7); return NewShape1; /*int Possible(int x,int y,int CurrentShape,int Status) for(int i=0;i4;i+) for(int j=0;j4;j+) if(shapeCurrentShapeStatusij+backy+ix+j=2) /this line can also write as the following type: /if(shapeCurrentShapeStatusij&backy+ix+j) return 0; return 1; /*void GoLeft(int&x,int&y,int&CurrentShape,int&Status) if(Possible(x-1,y,CurrentShape,Status) x-; show(x,y,CurrentShape,Status); /*void GoRight(int&x,int&y,int&CurrentShape,int&Status) if(Possible(x+1,y,CurrentShape,Status) x+; show(x,y,CurrentShape,Status); /*void GoDown(int&x,int&y,int&CurrentShape,int&Status) int AllAreOne=1,temp=0; if(Possible(x,y+1,CurrentShape,Status) y+; show(x,y,CurrentShape,Status); return; TotalMark+=3*CurrentShape; for(int i=0;i4;i+) for(int j=0;j4;j+) backi+yj+x+=shapeCurrentShapeStatusij; for(int r=1;r20;r+) for(int l=2;l0;rr-) for(int ll=2;ll=30) Speed=(Speed+1)%10; CEr/=30; if(temp) ETimes+; DrawScore(); return; void ChageShape(int&x,int&y,int&CurrentShape,int&Status) if(Possible(x,y,CurrentShape,(Status+1)%4) Status=(Status+1)%4; show(x,y,CurrentShape,Status); /*void DrawFace() int temp; setcolor(15); line(351,59,519,59); line(351,60,518,60); line(351,59,351,156); line(352,59,352,155); setcolor(7); line(518,61,518,154); ine(519,60,519,154); line(353,155,519,155); line(352,156,519,156); setcolor(8); for(int i=61;i155;i+) line(353,i,517,i); setcolor(7); line(427,106,512,106); line(428,107,511,107); line(427,106,427,147); line(428,106,428,146); setcolor(15); line(512,106,512,147); line(511,107,511,146); line(428,146,511,146); line(427,147,512,147); settextstyle(DEFAULT_FONT,HORIZ_DIR,1); setcolor(14); outtextxy(357,119,Erasered); outtextxy(370,130,Level:); setcolor(15); line(352,167,519,167); line(352,168,518,168); line(352,169,352,407); line(353,169,353,406); setcolor(7); line(519,167,519,407); line(518,168,518,406); line(352,407,519,407); line(353,406,519,406); line(524,55,89,55); /outter border 1st line(524,55,524,411); line(89,411,524,411); line(89,55,89,411); line(524,56,89,56); /outter border 2nd line(525,55,525,411); line(89,410,524,410); line(88,55,88,411); setfillstyle(8,7); bar(94,59,336,406); /setfillstyle(1,3); /bar(128,78,296,386); for(i=0;i8;i+) DrawDigital(357+i*20,65,0); for(i=0;i4;i+) DrawDigital(431+i*20,111,0); setfillstyle(1,8); setcolor(12); for(i=0;i4;i+) temp=i+1; outtextxy(364,177+14*i,(char*)&temp); bar(378,177+i*14,508,184+i*14); setcolor(14); outtextxy(366,250,Next Shape); setcolor(10); outtextxy(366,294,Current); outtextxy(382,309,Level); setcolor(6); outtextxy(366,334,Message:); bar(362,348,509,398); DrawDigital(466,293,Speed); /*void WannaQuit() int choise=0,temp; setfillstyle(1,8);
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 纪委监委舆情管理办法
- 企业安全知识培训讲师课件
- 2025年深入贯彻中央八项规定精神学习教育应知应会试题及答案
- 出租屋灭火安全培训课件
- 企业安全工作培训会课件
- 出海安全培训课件
- 无人机信号安全管控技术-洞察及研究
- 2025国家能源集团内蒙古上海庙发电有限公司煤炭买卖合同
- 企业安全培训资料模板课件
- 出口退税课件介绍
- 给纪检委的招投标违规举报信范文
- 胶质细胞瘤课件
- 校外培训消防安全知识课件
- 2025年高级执法资格考试真题及答案
- 2025浙教版(2024)八年级上册科学教学计划(三篇)
- 发热护理课件
- 2025年行政许可法知识竞赛题库及答案
- 库房管理基础知识培训课件
- 1.2《我们都是社会的一员》教学设计 2025-2026学年统编版道德与法治八年级上册
- 2024年劳动争议调解仲裁法知识竞赛题库与答案
- 劳动与技术小学开学第一课
评论
0/150
提交评论