#include<stdio.h> #include<dos.h> #include<string.h> #include<stdlib.h> #include<bios.h> #include<graphics.h> #include<conio.h> #include <alloc.h> #include<time.h> #include <math.h> #define MAX 3 #define STEPMAX 3 #define Key_R 0x1372 #define Key_Up 0x4800 #define Key_Enter 0x1c0d #define Key_Down 0x5000 #define Key_P 0x1970 #define Key_Esc 0x11b #define Key_Right 0x4d00 #define Key_Left 0x4b00 #define BKCOLOR GREEN #define STARTX 40 #define STARTY 80 int ghose[10][10]; int BOXNUM; int MISSIONNUM; int Key; int STEPNUM; int DIRECTIONKEY; int BOXMOVE[STEPMAX]; int STEP[STEPMAX]; typedef struct CURRENT { int x; int y; }PLAYER; PLAYER p; typedef struct ADD { int x; int y; }ADD; typedef struct STAR { int x; int y; int c; } STAR; STAR s[300]; DRAWSTAR1() {int i,j,m,n,dotx,doty,color,maxcolor; m=getmaxx(); n=getmaxy(); maxcolor=getmaxcolor(); for(i=0;i<300;i++) { s[i].x=random(m+1); s[i].y=random(n+1); s[i].c=random(maxcolor); putpixel(s[i].x,s[i].y,s[i].c);}} DRAWSTAR()
#include<dos.h>
#include<string.h>
#include<stdlib.h>
#include<bios.h>
#include<graphics.h>
#include<conio.h>
#include <alloc.h>
#include<time.h>
#include <math.h>
#define MAX 3
#define STEPMAX 3
#define Key_R 0x1372
#define Key_Up 0x4800
#define Key_Enter 0x1c0d
#define Key_Down 0x5000
#define Key_P 0x1970
#define Key_Esc 0x11b
#define Key_Right 0x4d00
#define Key_Left 0x4b00
#define BKCOLOR GREEN
#define STARTX 40
#define STARTY 80
int ghose[10][10];
int BOXNUM;
int MISSIONNUM;
int Key;
int STEPNUM;
int DIRECTIONKEY;
int BOXMOVE[STEPMAX];
typedef struct CURRENT
{ int x;
int y;
}PLAYER;
PLAYER p;
typedef struct ADD
{ int x;
int y;
}ADD;
typedef struct STAR
{ int x;
int y;
int c;
} STAR;
STAR s[300];
DRAWSTAR1()
{int i,j,m,n,dotx,doty,color,maxcolor;
m=getmaxx();
n=getmaxy();
maxcolor=getmaxcolor();
for(i=0;i<300;i++)
{ s[i].x=random(m+1);
s[i].y=random(n+1);
s[i].c=random(maxcolor);
putpixel(s[i].x,s[i].y,s[i].c);}}
DRAWSTAR()
{int i,j,m,n,dotx,doty,color,maxcolor;
m=getmaxx();
n=getmaxy();
剩余23页未读,继续阅读






- cherryCHERRY121382015-01-23里面使用到的头文件有的没有哦。不过还是很感谢分享思路~
- 吃葡萄不吐皮2014-05-25不错,编译通过,期末课程设计用
- hxch12342012-10-15我是新手~ 对我来说有点难~
- 粉丝: 12
- 资源: 41

我的内容管理 展开
我的资源 快来上传第一个资源
我的收益
登录查看自己的收益我的积分 登录查看自己的积分
我的C币 登录后查看C币余额
我的收藏
已下载
下载帮助

