没有合适的资源?快使用搜索试试~ 我知道了~
Win-Tc(C语言)小游戏编程实例(扫雷游戏升级版).docx
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 90 浏览量
2022-12-17
14:44:03
上传
评论
收藏 563KB DOCX 举报
温馨提示
![preview](https://dl-preview.csdnimg.cn/87306284/0001-72cadd13c7f582b73450d61bf8f220a1_thumbnail-wide.jpeg)
![preview-icon](https://csdnimg.cn/release/downloadcmsfe/public/img/scale.ab9e0183.png)
试读
23页
..
资源推荐
资源详情
资源评论
![docx](https://img-home.csdnimg.cn/images/20210720083331.png)
![docx](https://img-home.csdnimg.cn/images/20210720083331.png)
![docx](https://img-home.csdnimg.cn/images/20210720083331.png)
![docx](https://img-home.csdnimg.cn/images/20210720083331.png)
![docx](https://img-home.csdnimg.cn/images/20210720083331.png)
![docx](https://img-home.csdnimg.cn/images/20210720083331.png)
![docx](https://img-home.csdnimg.cn/images/20210720083331.png)
![docx](https://img-home.csdnimg.cn/images/20210720083331.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![exe](https://img-home.csdnimg.cn/images/20210720083343.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![](https://csdnimg.cn/release/download_crawler_static/87306284/bg1.jpg)
Win-Tc (C��) ����������������
����������� 3D �������������������
���3D ��������
������������
����
����������������������������������������
�����������������������������������������
���������������������������������������
����������������������������������������
������������������������������ 999 ��������
����������
� 3��������
Game ������
� 4��� Game �����
������ Game �������������������������������
����������������������
![](https://csdnimg.cn/release/download_crawler_static/87306284/bg2.jpg)
BEGIN ��―――――――��������
PRIMARY ��―――――――������
INTERMEDIATE―――――――������
HIGH ��――――――――――������
EXIT――――――――――――���������������
���������
��――����������������――�������――�������
��――���������������������������Game ������
���――�����������������Game ���������――Close ���
���������������
� 5��������
�������������
#include <graphics.h>
� 6������������
#include <stdlib.h>
#include <bios.h>
#include <dos.h>
#define PRIMARY
1 /*�����*/
#define PRIMARYCOLUMN
#define PRIMARYROW
#define PRIMARYMINE
#define INTERMEDIATE
9 /*�������*/
9 /*�������*/
10 /*���������*/
2 /*�����*/
#define INTERMEDIATECOLUMN 16 /*�������*/
#define INTERMEDIATEROW 16 /*�������*/
#define INTERMEDIATEMINE 40 /*���������*/
#define HIGH
3 /*�����*/
#define HIGHCOLUMN
30 /*�������*/
![](https://csdnimg.cn/release/download_crawler_static/87306284/bg3.jpg)
#define HIGHROW
#define HIGHMINE
#define GAMEOVER
/*��������*/
typedef struct MOUSE
{
16 /*�������*/
99 /*���������*/
1 /*�������*/
int mx; /*�� x ���*/
int my; /*�� y ���*/
int mkey;/*������*/
char fillcolor[16][16];/*��������*/
}Mouseh;
/*��������*/
typedef struct BUTTON
{
int left;
int top;
int right;
int down;
char *caption;/*������*/
char table[100];/*��������*/
int fillcolor;/*�������*/
int fontcolor;/*���������*/
}BUTTON;
/*��������*/
typedef struct WINDOW
{
int left;
int top;
int width;
int height;
int backcolor;/*������*/
char *caption;/*����*/
BUTTON close;/*������*/
BUTTON game;/*����*/
BUTTON help;/*����*/
BUTTON settime;/*������*/
BUTTON minenumber;/*������������*/
}Hwnd;
/*���������*/
typedef struct MINEFIELD
{
int left;
int top;
int right;
![](https://csdnimg.cn/release/download_crawler_static/87306284/bg4.jpg)
int down;
int status; /*����������*/
int openst; /*����������*/
int minenumbers;/*������������*/
}MINEFIELD;
/*-=-=-=-=-=-=-= ���� -=-=-=-=-=-=-=-=-*/
/*������*/
char MouseMask[]={
0x00,0x00,0x40,0x00,0x60,0x00,0x70,0x00,
0x78,0x00,0x7c,0x00,0x7e,0x00,0x7f,0x00,
0x7f,0x80,0x7f,0xc0,0x6c,0x00,0x46,0x00,
0x06,0x00,0x03,0x00,0x01,0x80,0x00,0x00
};
/*���������*/
char MouseMaskE[]={
0xc0,0x00,0xa0,0x00,0x90,0x00,0x88,0x00,
0x84,0x00,0x82,0x00,0x81,0x00,0x80,0x80,
0x80,0x40,0x80,0x20,0x93,0xf0,0xa9,0x00,
0xc9,0x00,0x04,0x80,0x02,0x40,0x01,0xc0
};
int newx=0,newy=0;/*����(x,y)������*/
MINEFIELD Mine[HIGHROW][HIGHCOLUMN];/*��������*/
Hwnd hWnd;/*����*/
Mouseh *hw;/*����*/
int row;/*�����*/
int column;/*�����*/
int mine;/*������*/
int end;/*������*/
int begin;/*������*/
int mtime;/*������*/
int active;/*��������*/
/*Game ��������*/
static char *MENU[5]={"BEGIN","PRIMARY","INTERMEDIATE","HIGH","EXIT"};
/*���� Select()��*/
void SelectLoop(int r,int c);
/*--------------------- DrawGraph ---------------------*/
/*����*/
void DrawLine(int x1,int y1,int x2,int y2,int color)
{
int dr;
float r,c,k;
k=0;
r=y2-y1;
c=x2-x1;
![](https://csdnimg.cn/release/download_crawler_static/87306284/bg5.jpg)
if(c!=0)
k=r/c;
if(c>0)
{
for(dr=0;dr<=c;dr+=1)
putpixel(x1+dr,y1+dr*k,color);
}
if(c<0)
{
for(dr=c;dr<=0;dr+=1)
putpixel(x1+dr,y1+dr*k,color);
}
if(c==0)
{
if(r>0)
{
for(dr=0;dr<=r;dr+=1)
putpixel(x1,y1+dr,color);
}
if(r<0)
{
for(dr=r;dr<=0;dr+=1)
putpixel(x1,y1+dr,color);
}}
if(r!=0)
k=c/r;
if(r>0)
{
for(dr=0;dr<=r;dr+=1)
putpixel(x1+dr*k,y1+dr,color);
}
if(r<0)
{
for(dr=r;dr<=0;dr+=1)
putpixel(x1+dr*k,y1+dr,color);
}}
/*��������*/
void DrawRectangle(int x1,int y1,int x2,int y2,int color,int fillmode)
{
int r,c;
DrawLine(x1,y1,x2,y1,color);
DrawLine(x1,y2,x2,y2,color);
DrawLine(x1,y1,x1,y2,color);
DrawLine(x2,y1,x2,y2,color);
剩余22页未读,继续阅读
资源评论
![avatar-default](https://csdnimg.cn/release/downloadcmsfe/public/img/lazyLogo2.1882d7f4.png)
![avatar](https://profile-avatar.csdnimg.cn/a71a690a54794121897a1839eb6efba6_g11176593.jpg!1)
G11176593
- 粉丝: 6709
- 资源: 3万+
上传资源 快速赚钱
我的内容管理 展开
我的资源 快来上传第一个资源
我的收益
登录查看自己的收益我的积分 登录查看自己的积分
我的C币 登录后查看C币余额
我的收藏
我的下载
下载帮助
![voice](https://csdnimg.cn/release/downloadcmsfe/public/img/voice.245cc511.png)
![center-task](https://csdnimg.cn/release/downloadcmsfe/public/img/center-task.c2eda91a.png)
安全验证
文档复制为VIP权益,开通VIP直接复制
![dialog-icon](https://csdnimg.cn/release/downloadcmsfe/public/img/green-success.6a4acb44.png)