資源簡介
該程序為基于Socket的2人對打游戲,圖片為.bmp文件,非MFC模式,是一個相當簡單的局域網網絡游戲的代碼.<br>程序內運用Win32 API,包括:socket系列的API,多線程的API,BitBlt等.<br>參考文獻:《Visual C++游戲編程基礎》,榮欽科技 著<br>歡迎各位對該代碼參考與點評,請多多指教.
代碼片段和文件信息
//?NetGame2.cpp?:?Defines?the?entry?point?for?the?application.
//
#include?“stdafx.h“
#include?
#include?????/*?_beginthread?_endthread?*/
/*角色類..
*/
#define?FULLHP 100
#define?FULLSP 80
#define?LEFTPlayer1_START_X 70
#define?LEFTPlayer1_START_Y 180
#define?RIGHTPlayer1_START_X 500
#define?RIGHTPlayer1_START_Y 180
#define?MESSAGE_START_X 23
#define?MESSAGE_START_Y 320
#define?MESSAGE_LENGTH 562
#define?MESSAGE_HEIGHT 127
#define?BUTTON1_START_X 32
#define?BUTTON2_START_X 126
#define?BUTTON3_START_X 220
#define?BUTTON4_START_X 314
#define?BUTTON5_START_X 408
#define?BUTTON_START_Y 404
#define?BUTTON_LENGTH 90
#define?BUTTON_HEIGHT 37
#define?PINKPlayer_ACT_TIMER 10
#define?GREENPlayer_ACT_TIMER 9
#define?GENER
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件??????30549??2007-12-10?16:02??NetGame2.cpp
?????文件???????4198??2007-12-09?23:19??NetGame2.dsp
?????文件????????541??2007-11-11?23:15??NetGame2.dsw
?????文件??????66560??2007-12-10?16:02??NetGame2.ncb
?????文件??????53760??2007-12-10?16:02??NetGame2.opt
?????文件???????1418??2007-12-10?16:02??NetGame2.plg
?????文件???????1221??2007-11-11?23:15??ReadMe.txt
?????文件????????297??2007-12-07?21:53??StdAfx.cpp
?????文件????????966??2007-12-09?21:21??StdAfx.h
?????文件??????95310??2003-09-19?03:02??Pic\slash.bmp
?????文件?????921654??2003-09-19?02:14??Pic\bg.bmp
?????文件?????236856??2007-12-03?13:55??Pic\recuse.bmp
?????文件?????338696??2007-12-02?21:54??Pic\pinkpla
?????文件?????285552??2007-12-05?09:32??Pic\message.bmp
?????文件??????66656??2007-12-05?10:03??Pic\button.bmp
?????文件?????404552??2007-12-06?08:09??Pic\greenpla
?????文件?????480056??2007-12-07?19:16??Pic\greenmagic1.bmp
?????文件?????480056??2007-12-07?19:20??Pic\greenmagic2.bmp
?????文件?????360056??2007-12-07?19:20??Pic\pinkmagic1.bmp
?????文件?????640056??2007-12-07?19:21??Pic\pinkmagic2.bmp
?????文件?????168004??2007-12-10?16:02??NetGame2.exe
?????目錄??????????0??2007-12-02?21:42??Pic
-----------?---------??----------?-----??----
??????????????4637014????????????????????22
- 上一篇:火車售票系統c++簡單版
- 下一篇:上下文無關文法中求出導空符
評論
共有 條評論