下载此文档

是男人就下层C编程实例大作业.docx


文档分类:IT计算机 | 页数:约15页 举报非法文档有奖
1/15
下载提示
  • 1.该资料是网友上传的,本站提供全文预览,预览什么样,下载就什么样。
  • 2.下载该文档所得收入归上传者、原创者。
  • 3.下载的文档,不会出现我们的网址水印。
1/15 下载此文档
文档列表 文档介绍
Document serial number【KKGB-LBS98YT-BS8CB-BSUT-BST108】
是男人就下层C编程实例大作业
C++大作业
是男人就下100层编程实例
打开VC++,创建一个win32application工程,名字随便取,新建一个C++sourcefile文件复选添加到工程选项
在C++sourcefile添加如下代码
#include<>
#include<>
#include<>
#include<>
HINSTANCEhInst;
constintDLou=6;//楼层数
intCJieTi[DLou+1]={1,2,3,3,4,4,2};//阶梯类型
intLJieTi[DLou+1];//阶梯左边距
intHJieTi[DLou+1];//阶梯高度
intWJieTi[DLou+1];//阶梯宽度
intXJieTi[DLou+1];//阶梯左上脚X坐标
intYJieTi[DLou+1];//阶梯左上脚Y坐标
intTJieTi[DLou+1];//阶梯的个性数据
constintVY_JieTi=5;
constintRefreshTime=100;//刷新时间
constintAY_Num=5;
constintVX_Num=20;
constintVY_TH=26;
intzt=0;//游戏是否开始=0等待开始=1正在进行中=2结束了
staticcharText[100];
constintFixTime=12;//计算时间片
intVX=0;//X方向速度
intVY=-VY_JieTi;//Y方向速度
intAY=0;//Y方向的加速度
intManX;//角色的X坐标
intManY;//角色的Y坐标
intOManX,OManY;
intpz;
intpztime;
constintGameWindowWidth=411;//游戏窗口的有效区域宽度
constintGameWindowHeight=535;//游戏窗口的有效区域高度
constintGameTopHeight=23;//游戏的有效区域上部提示信息区宽度
constintGameMainHeight=495;//游戏主区域高度
constintGameMainWidth=376;//游戏主区域宽度
constintManWidth=16;//角色的宽度
constintManHeight=16;//角色的高度
constintDYLou=5;//楼层Y方向均分数
constintDJieTi=10;//每层分数
constintDXJieTi=3;//阶梯X方向均分数
constintVX_TS=3;
intvx_ts=0;
intLife=10;//角色的生命值
intNum=0;
intNum_time;
staticHBITMAPRoleBmp;
staticHBITMAPDingZiBmp;
staticHBITMAPLCBmp;
staticHBITMAPJieTiBmp[6];
staticHBITMAPhMemBmp;//图像缓存
LRESULTCALLBACKWndProc(HWND,UINT,WPARAM,LPARAM);
intIsJiaCeng();//判断是否需要加一层阶梯
inton(int);
intInit();
intFixMan();//处理人物的函数
HWNDhwnd;
intWINAPIWinMain(HINSTANCEhInstance,HINSTANCEhPrevInstance,
LPSTRlpcmdLine,intnCmdShow)
{
hInst=hInstance;
staticTCHARszAppName[]=TEXT("DisplayWithScrollBar");
staticTCHARszClassName[]=TEXT("DisplayWithscrlBarClass");
MSGmsg;
WNDCLASSwndclass;
=CS_HREDRAW|CS_VREDRAW;
=WndProc;
=0;
=0;
=hInstance;
=LoadIcon(NULL,IDI_APPLICATION);
wn

是男人就下层C编程实例大作业 来自淘豆网www.taodocs.com转载请标明出处.

相关文档 更多>>
非法内容举报中心
文档信息
  • 页数15
  • 收藏数0 收藏
  • 顶次数0
  • 上传人Duan760501
  • 文件大小44 KB
  • 时间2021-06-18