xxxx18一60岁hd中国/日韩女同互慰一区二区/西西人体扒开双腿无遮挡/日韩欧美黄色一级片 - 色护士精品影院www

  • 大小: 1.64MB
    文件類型: .rar
    金幣: 2
    下載: 0 次
    發(fā)布日期: 2024-02-02
  • 語言: C/C++
  • 標(biāo)簽: C++??Win32??Game??Car??

資源簡介

去年大三電子游戲設(shè)計(jì)課程設(shè)計(jì)寫的C++賽車游戲,要畢業(yè)了,今天突然翻出來給大家參考一下。本人系PHPer,對于C++稱不上熟悉,基本是用面向過程的思想完成了此游戲,讓各位見笑了。有興趣的做朋友的歡迎訪問我的博客liuboye.com

資源截圖

代碼片段和文件信息

#include?“stdafx.h“
#include?
#include??
#include?
#pragma?comment(lib?“WINMM.LIB“)

#define?MAX_LOADSTRING?100

//定義結(jié)構(gòu)體
struct?BULLET???????//bullet結(jié)構(gòu)體代表賽車導(dǎo)彈
{
int?xy;????????//子彈坐標(biāo)
bool?exist;?????//子彈是否存在
};

struct?OBSTACLE{
int?xy;
bool?exist;
};

struct?PRODUCT{
int?xy;
int?flag;?//1代表加子彈?2代表energy?3代表加速?4代表延長時(shí)間?
bool?exist;
};

//全局變量聲明
HINSTANCE?hInst;
HBITMAP?bgcarbulletbulletshowobstacleexplosionroadlifegameovergamewinenergyammotimequickdirectionlightstatusshowplaneplanelifeplaneammoplanetimeplanequick;?????//存儲(chǔ)背景圖,賽車圖,子彈圖,路,生命,彈藥,時(shí)間,加速,終點(diǎn)
HDC hdcmdcbufdcexplosionDC;
HWND hWnd;
DWORD tPretNow;????????//前一時(shí)刻的時(shí)間,當(dāng)前時(shí)刻的時(shí)間
int nowXnowY;????//nowX,nowY代表賽車坐標(biāo)
int?????ocount=0explosionNum=-1explosionLocXexplosionLocY;????//滾動(dòng)背景偏移量,子彈計(jì)數(shù)器
int cutHeight=0dirHeight=0bcount=0bnum=10lnum=5pnum=0;???????//cutHeight為滾動(dòng)背景所要裁剪的區(qū)域?qū)挾龋琤count記錄賽車現(xiàn)有子彈數(shù)目,bnum記錄當(dāng)前剩余彈藥數(shù)目,lnum記錄生命值pnum記錄生成物數(shù)目
int totalTime=30totalLength=43000raceTime=0raceLength=0;???????//時(shí)間,駕駛距離,賽道長
BULLET??b[10];???????????//聲明一個(gè)“bullet”類型的數(shù)組,用來存儲(chǔ)賽車發(fā)出的子彈
const?int?obstacleLevel=3;
OBSTACLE?o[obstacleLevel];
PRODUCT??p[10];
int?startNum=0;
bool?iStart=false;//是否開始比賽
bool?explosionflag=false;?//是否爆炸
bool?createObstacleFlag=false;//是否創(chuàng)建障礙物
bool?speedUp=false;?//前移動(dòng)同時(shí)加速
bool?speedDown=false;?//下移動(dòng)同時(shí)減速
bool?speedLeft=false;?//左移動(dòng)
bool?speedRight=false;//右移動(dòng)
bool?isMoving?=?false;?//是否在移動(dòng)
int?leftBorder=140;//左邊界
int?rightBorder=410;//左邊界
int?upBorder=300;//上邊界
int?downBorder=400;//下邊界
int?velocity=0;????//速度
int?accSpeed=1;????//加速度
int?maxVelocity=70;?//最大速度,直接影響游戲的操作難度
int?minVelocity=-20;?//最小速度
int?slideVelocity=5;?//左右滑動(dòng)速度
int?convertRate=4;???//速度畫面換算比率
int?sleepTime=50;????//暫停時(shí)間
int?lifeFlag=0;
int?bulletFlag=0;
bool?planeLifeFlag=false;
bool?planeLifeNum=0;
bool?planeAmmoFlag=false;
bool?planeAmmoNum=0;
bool?planeTimeFlag=false;
bool?planeTimeNum=0;
bool?planeQuickFlag=false;
bool?planeQuickNum=0;




//全局函數(shù)聲明
ATOM MyRegisterClass(HINSTANCE?hInstance);
BOOL InitInstance(HINSTANCE?int);
LRESULT?CALLBACK WndProc(HWND?UINT?WPARAM?LPARAM);
void MyPaint(HDC?hdc);
bool checkHit(intintintintintintintint);
bool isCollide(RECT?RECT);
void move();
void playMusic(int);
void setCutHeight(int?value);
void setObstaclePos();
void setRaceLength();
void stopCar();
VOID?CALLBACK startGame(HWND?UINT?UINT?DWORD);
VOID?CALLBACK checkExplosion(HWND?UINT?UINT?DWORD);
VOID?CALLBACK createObstacle(HWND?UINT?UINT?DWORD);
VOID?CALLBACK myTimer(HWND?UINT?UINT?DWORD);????????//計(jì)時(shí)
VOID?CALLBACK recoverVelocity(HWND?UINT?UINT?DWORD);????????//恢復(fù)最大速度
VOID?CALLBACK???????recoverAmmo(HWND?UINT?UINT?DWORD);
VOID?CALLBACK???????recoverTime(HWND?UINT?UINT?DWORD);
VOID?CALLBACK???????recoverLife(HWND?UINT?UINT?DWORD);
VOID?CALLBACK???????recoverQuick(HWND?UINT?UINT?DWORD);

?屬性????????????大小?????日期????時(shí)間???名稱
-----------?---------??----------?-----??----

?????文件??????26513??2014-03-07?14:17??crazycar\crazycar.cpp

?????文件???????4192??2013-07-11?16:40??crazycar\crazycar.dsp

?????文件????????522??2013-07-09?21:37??crazycar\crazycar.dsw

?????文件????????326??2013-07-09?19:30??crazycar\crazycar.h

?????文件??????66560??2013-07-18?19:51??crazycar\crazycar.ncb

?????文件??????52736??2013-07-18?19:51??crazycar\crazycar.opt

?????文件???????1162??2013-07-15?09:46??crazycar\crazycar.plg

?????文件?????192566??2013-07-15?09:46??crazycar\Debug\crazycar.exe

?????文件?????352316??2013-07-15?09:46??crazycar\Debug\crazycar.ilk

?????文件??????64023??2013-07-15?09:46??crazycar\Debug\crazycar.obj

?????文件????1876368??2013-07-11?16:40??crazycar\Debug\crazycar.pch

?????文件?????599040??2013-07-15?09:46??crazycar\Debug\crazycar.pdb

?????文件???????5576??2013-07-10?22:03??crazycar\Debug\res\ammo.bmp

?????文件????1259768??2013-07-09?20:11??crazycar\Debug\res\bg.bmp

?????文件???????7656??2013-07-14?15:30??crazycar\Debug\res\blueObs.bmp

?????文件???????1496??2013-07-09?19:57??crazycar\Debug\res\bullet.bmp

?????文件???????1014??2013-07-11?21:42??crazycar\Debug\res\bulletshow.bmp

?????文件???????7656??2013-07-13?22:39??crazycar\Debug\res\car.bmp

?????文件??????36054??2013-07-11?16:03??crazycar\Debug\res\direction.bmp

?????文件???????5576??2013-07-10?19:48??crazycar\Debug\res\energy.bmp

?????文件?????351848??2012-06-04?09:19??crazycar\Debug\res\explosion.bmp

?????文件?????307512??2003-04-09?21:10??crazycar\Debug\res\gameover.bmp

?????文件?????230454??2013-07-14?21:26??crazycar\Debug\res\gamewin.bmp

?????文件????????774??2013-07-11?22:02??crazycar\Debug\res\life.bmp

?????文件???????9656??2013-07-14?16:26??crazycar\Debug\res\obstacle.bmp

?????文件??????87096??2013-07-14?19:25??crazycar\Debug\res\plane.bmp

?????文件??????14456??2013-07-14?20:10??crazycar\Debug\res\planeammo.bmp

?????文件??????14456??2013-07-14?19:42??crazycar\Debug\res\planelife.bmp

?????文件??????14456??2013-07-14?20:07??crazycar\Debug\res\planequick.bmp

?????文件??????14456??2013-07-14?20:04??crazycar\Debug\res\planetime.bmp

............此處省略58個(gè)文件信息

評論

共有 條評論