資源簡(jiǎn)介
大富翁4 VC 源代碼,大富翁游戲黑盒測(cè)試,實(shí)現(xiàn)《大富翁-4》一些基本功能。如:人物行走、買地、特殊人物實(shí)現(xiàn)、人物投資、股票買賣、各種功能卡片、道具的實(shí)現(xiàn)。
本下載包內(nèi)包括大富翁4 VC 源代碼、測(cè)試報(bào)告、需求分析報(bào)告、大富翁設(shè)計(jì)概要.ppt、類圖.vsd等。為使用VC 開發(fā)游戲的朋友們提供一些游戲編程技巧。
代碼片段和文件信息
//?Bankroll.cpp:?implementation?of?the?CBankroll?class.
//?Download?by?http://www.NewXing.com
//////////////////////////////////////////////////////////////////////
#include?“stdafx.h“
#include?“R4.h“
#include?“Bankroll.h“
#ifdef?_DEBUG
#undef?THIS_FILE
static?char?THIS_FILE[]=__FILE__;
#define?new?DEBUG_NEW
#endif
//////////////////////////////////////////////////////////////////////
//?Construction/Destruction
//////////////////////////////////////////////////////////////////////
CBankroll::CBankroll()
{
m_MyRect.top?=?0;
m_MyRect.bottom?=?280;
m_MyRect.left?=?440;
m_MyRect.right?=?640;
m_ShowType=?My;
}
CBankroll::~CBankroll()
{
m_MyDC.DeleteDC();
m_MyBitmap.Deleteobject();
m_LandDC.DeleteDC();
m_LandBitmap.Deleteobject();
m_StockDC.DeleteDC();
m_StockBitmap.Deleteobject();
m_RestDC.DeleteDC();
m_RestBitmap.Deleteobject();
}
void?CBankroll::Draw(?CDC?*?pDC?)
{
switch(?m_ShowType?)
{
case?My:
theApp.m_TmpScreenDC.BitBlt(?440?0?200?280?&?m_MyDC
0?0?SRCCOPY);
theApp.m_pPer->ShowFundInfo();
break;
case?Land:
theApp.m_TmpScreenDC.BitBlt(?440?0?200?280?&?m_LandDC
0?0?SRCCOPY);
theApp.m_pPer->ShowGelebInfo();
break;
case?Stock:
theApp.m_TmpScreenDC.BitBlt(?440?0?200?280?&?m_StockDC
0?0?SRCCOPY);
theApp.m_pPer->ShowStockInfo();
break;
case?Rest:
theApp.m_TmpScreenDC.BitBlt(?440?0?200?280?&?m_RestDC
0?0?SRCCOPY);
theApp.m_pPer->ShowOtherInfo();
break;
default:
AfxMessageBox(?“CBankroll::Draw消息錯(cuò)誤!“?);
}
}
void?CBankroll::Init_DC_BM(?CDC?*?pDC?)
{
m_MyDC.CreateCompatibleDC(?pDC?);
m_MyBitmap.m_hobject?=?(HBITMAP)::LoadImage(?NULL
“img\\Bankroll.bmp“IMAGE_BITMAP200280LR_LOADFROMFILE);
m_MyDC.Selectobject(?m_MyBitmap?);
m_LandDC.CreateCompatibleDC(?pDC?);
m_LandBitmap.m_hobject?=?(HBITMAP)::LoadImage(?NULL
“img\\Land.bmp“IMAGE_BITMAP200280LR_LOADFROMFILE);
m_LandDC.Selectobject(?m_LandBitmap?);
m_StockDC.CreateCompatibleDC(?pDC?);
m_StockBitmap.m_hobject?=?(HBITMAP)::LoadImage(?NULL
“img\\Stock.bmp“IMAGE_BITMAP200280LR_LOADFROMFILE);
m_StockDC.Selectobject(?m_StockBitmap?);
m_RestDC.CreateCompatibleDC(?pDC?);
m_RestBitmap.m_hobject?=?(HBITMAP)::LoadImage(?NULL
“img\\Rest.bmp“IMAGE_BITMAP200280LR_LOADFROMFILE);
m_RestDC.Selectobject(?m_RestBitmap?);
}
bool?CBankroll::IsOnMe(?CPoint?point?)
{
if(?CTool::PointInRect(point?m_MyRect)?)
{
return?true;
}
return?false;
}
void?CBankroll::ReadFromStream(?CDC?*?pDC?CArchive?&?ar?)
{
ar?>>?m_ShowType;
}
int?CBankroll::ToolName(?CPoint?point?)
{
CRect?rect;
if(?IsOnMe(?point)?)
{
rect.left?=?620;
rect.right?=?640;
rect.top?=?10;
rect.bottom?=?70;
if(?CTool::PointInRect(point?rect)?)
{
m_ShowType?=?My;
}
rect.top?=?80;
rect.bottom?=?140;
if(?CTool::PointInRect(point?rect)?)
?屬性????????????大小?????日期????時(shí)間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2018-10-10?09:36??VC++?大富翁4_大富翁游戲源碼\
?????目錄???????????0??2013-01-15?16:34??VC++?大富翁4_大富翁游戲源碼\R4\
?????目錄???????????0??2013-01-15?16:36??VC++?大富翁4_大富翁游戲源碼\R4\R4\
?????文件??????538895??2005-12-14?20:07??VC++?大富翁4_大富翁游戲源碼\R4\R4\1.wma
?????文件????????3378??2013-12-02?06:18??VC++?大富翁4_大富翁游戲源碼\R4\R4\Bankroll.cpp
?????文件????????1122??2013-12-02?06:18??VC++?大富翁4_大富翁游戲源碼\R4\R4\Bankroll.h
?????文件????????2888??2013-12-02?06:18??VC++?大富翁4_大富翁游戲源碼\R4\R4\BigMap.cpp
?????文件????????1097??2013-12-02?06:18??VC++?大富翁4_大富翁游戲源碼\R4\R4\BigMap.h
?????文件????????3191??2013-12-02?06:18??VC++?大富翁4_大富翁游戲源碼\R4\R4\ButtonToolbar.cpp
?????文件?????????904??2013-12-02?06:18??VC++?大富翁4_大富翁游戲源碼\R4\R4\ButtonToolbar.h
?????文件????????3402??2013-12-02?06:18??VC++?大富翁4_大富翁游戲源碼\R4\R4\Card.cpp
?????文件????????1554??2013-12-02?06:18??VC++?大富翁4_大富翁游戲源碼\R4\R4\Card.h
?????文件????????3422??2013-12-02?06:18??VC++?大富翁4_大富翁游戲源碼\R4\R4\Date.cpp
?????文件????????1101??2013-12-02?06:18??VC++?大富翁4_大富翁游戲源碼\R4\R4\Date.h
?????文件?????????747??2013-12-02?06:18??VC++?大富翁4_大富翁游戲源碼\R4\R4\Entity.cpp
?????文件????????1559??2013-12-02?06:18??VC++?大富翁4_大富翁游戲源碼\R4\R4\Entity.h
?????文件????????6330??2013-12-02?06:18??VC++?大富翁4_大富翁游戲源碼\R4\R4\EntityList.cpp
?????文件????????1300??2013-12-02?06:18??VC++?大富翁4_大富翁游戲源碼\R4\R4\EntityList.h
?????文件????????4020??2013-12-02?06:18??VC++?大富翁4_大富翁游戲源碼\R4\R4\EntityNode.cpp
?????文件????????1439??2013-12-02?06:18??VC++?大富翁4_大富翁游戲源碼\R4\R4\EntityNode.h
?????文件???????37103??2013-12-02?06:18??VC++?大富翁4_大富翁游戲源碼\R4\R4\Glebe.cpp
?????文件????????1579??2013-12-02?06:18??VC++?大富翁4_大富翁游戲源碼\R4\R4\Glebe.h
?????文件???????13130??2013-12-02?06:18??VC++?大富翁4_大富翁游戲源碼\R4\R4\God.cpp
?????文件????????1378??2013-12-02?06:18??VC++?大富翁4_大富翁游戲源碼\R4\R4\God.h
?????目錄???????????0??2013-01-15?16:33??VC++?大富翁4_大富翁游戲源碼\R4\R4\hlp\
?????文件???????80163??2005-11-25?00:47??VC++?大富翁4_大富翁游戲源碼\R4\R4\hlp\AfxCore.rtf
?????文件????????6974??2005-11-25?00:47??VC++?大富翁4_大富翁游戲源碼\R4\R4\hlp\AppExit.bmp
?????文件?????????142??2005-11-25?00:47??VC++?大富翁4_大富翁游戲源碼\R4\R4\hlp\Bullet.bmp
?????文件?????????310??2005-11-25?00:47??VC++?大富翁4_大富翁游戲源碼\R4\R4\hlp\CurArw2.bmp
?????文件?????????566??2005-11-25?00:47??VC++?大富翁4_大富翁游戲源碼\R4\R4\hlp\CurArw4.bmp
?????文件?????????502??2005-11-25?00:47??VC++?大富翁4_大富翁游戲源碼\R4\R4\hlp\CurHelp.bmp
............此處省略205個(gè)文件信息
- 上一篇:C語言簡(jiǎn)易三國殺
- 下一篇:canape教程(ape.docx)
評(píng)論
共有 條評(píng)論