下载此文档

推箱子游戏的代码).doc


文档分类:生活休闲 | 页数:约19页 举报非法文档有奖
1/19
下载提示
  • 1.该资料是网友上传的,本站提供全文预览,预览什么样,下载就什么样。
  • 2.下载该文档所得收入归上传者、原创者。
  • 3.下载的文档,不会出现我们的网址水印。
1/19 下载此文档
文档列表 文档介绍
推箱子游戏的代码).txt ——某天你一定会感谢那个遗弃你的人, 感谢那个你曾深爱着却置之你不顾的人。做一个没心没肺的人, 比什么都强。________ 舍不得又怎样到最后还不是说散就散。#include <> #include <> #include <> #include <> #include <> #include <> typedef struct winer { int x,y; struct winer *p; }winer; char status [20][20]; char far *printScreen=(char far* )0xB8000000; void putoutChar(int y,int x,char ch,char fc,char bc); void printWall(int x, int y); void printBox(int x, int y); void printBoxDes(int x, int y); void printDestination(int x, int y); void printDestination1(int x,int y,winer **win,winer **pw); void printMan(int x, int y); void init(); winer *initStep1(); winer *initStep2(); winer *initStep3(); winer *initStep4(); void moveBoxSpacetoSpace(int x ,int y, char a); void moveBoxDestoSpace(int x ,int y, char a); void moveBoxSpacetoDes(int x, int y, char a); void moveBoxDestoDes(int x, int y, char a); int judge(int x, int y); void move(int x, int y, char a); void reset(int i); void putoutChar(int y,int x,char ch,char fc,char bc) { printScreen[(x*160)+(y<<1)+0]=ch; printScreen[(x*160)+(y<<1)+1]=(bc*16)+fc; } void printWall(int x,int y) { putoutChar(y-1,x-1,219,GREEN,BLACK); status[x][y]='w'; } void printBox(int x,int y) { putoutChar(y-1,x-1,10,WHITE,BLACK); status[x][y]='b'; } void printDestination1(int x,int y,winer **win,winer **pw) { winer *qw; putoutChar(y-1,x-1,003,YELLOW,BLACK); status[x][y]='m'; if(*win==NULL) { *win=*pw=qw=(winer* )malloc(sizeof(winer)); (*pw)->x=x; (*pw)->y=y; (*pw)->p=NULL; } else { qw=(winer* )malloc(sizeof(winer)); qw->x=x; qw->y=y; (*pw)->p=qw; (*pw)=qw;qw->p=NULL; }} void printDestination(int x,int y) { putoutChar(y-1,x-1,003,YELLOW,BLACK); status[x][y]='m'; } void printMan(int x,int y) { gotoxy(y,x); _AL=02; _CX=01; _AH=0xa; geninterrupt(0x10); } void printBoxDes(int x,int y) { putoutChar(y-1,x-1,10,YELLOW,BLACK); status[x][y]='i'; } void init() { int i,j; for(i=0;i<20;i++) for(j=0;j<20;j++) status[i][j]=0; _AL=3; _AH=0; geninterrupt(0x10); gotoxy(40,4); printf("e to the

推箱子游戏的代码) 来自淘豆网m.daumloan.com转载请标明出处.

非法内容举报中心
文档信息
  • 页数19
  • 收藏数0 收藏
  • 顶次数0
  • 上传人endfrs
  • 文件大小0 KB
  • 时间2016-06-05