资源简介

本游戏模仿盛大网络版泡泡堂,使用C和windows api编写完成,使用到了碰撞检测,人工智能技术。而人工智能部分又使用到A寻路算法,有限状态机。

资源截图

代码片段和文件信息


//#include “StdAfx.h“


void InitFile(HDC hdc HDC imageDC)

bBG                 = CreateCompatibleDC(hdc);
cBG                 = CreateCompatibleDC(hdc);
HBITMAP BG                 = (HBITMAP)LoadImage(NULL “Pic\\BG.bmp“ IMAGE_BITMAP 800 

600 LR_LOADFROMFILE);
Selectobject(imageDC BG                );
Selectobject(bBG                 CreateCompatibleBitmap(hdc 800 600));
Selectobject(cBG                 CreateCompatibleBitmap(hdc 800 600));
for(int i=0; i<800; i++)
{
for(int j=0; j<600; j++)
{
if(GetPixel(imageDC i j) != RGB(255 0 255))
BitBlt(bBG                 i j 1 1 imageDC i j 

SRCCOPY);
    else SetPixel(cBG                 i j RGB(255 255 

255));
}
}
bBigPopo            = CreateCompatibleDC(hdc);
cBigPopo            = CreateCompatibleDC(hdc);
HBITMAP BigPopo            = (HBITMAP)LoadImage(NULL “Pic\\BigPopo.bmp“ IMAGE_BITMAP 

648 72 LR_LOADFROMFILE);
Selectobject(imageDC BigPopo           );
Selectobject(bBigPopo            CreateCompatibleBitmap(hdc 648 72));
Selectobject(cBigPopo            CreateCompatibleBitmap(hdc 648 72));
for(i=0; i<648; i++)
{
for(int j=0; j<72; j++)
{
if(GetPixel(imageDC i j) != RGB(255 0 255))
BitBlt(bBigPopo            i j 1 1 imageDC i j 

SRCCOPY);
    else
SetPixel(cBigPopo            i j RGB(255 255 255));
}
}
bDraw               = CreateCompatibleDC(hdc);
cDraw               = CreateCompatibleDC(hdc);
HBITMAP Draw               = (HBITMAP)LoadImage(NULL “Pic\\Draw.bmp“ IMAGE_BITMAP 204 

68 LR_LOADFROMFILE);
Selectobject(imageDC Draw              );
Selectobject(bDraw               CreateCompatibleBitmap(hdc 204 68));
Selectobject(cDraw               CreateCompatibleBitmap(hdc 204 68));
for(i=0; i<204; i++)
{
for(int j=0; j<68; j++)
{
if(GetPixel(imageDC i j) != RGB(255 0 255))
BitBlt(bDraw               i j 1 1 imageDC i j 

SRCCOPY);
    else
SetPixel(cDraw               i j RGB(255 255 255));
}
}
bExplosion          = CreateCompatibleDC(hdc);
cExplosion          = CreateCompatibleDC(hdc);
HBITMAP Explosion          = (HBITMAP)LoadImage(NULL “Pic\\Explosion.bmp“ IMAGE_BITMAP 

560 200 LR_LOADFROMFILE);
Selectobject(imageDC Explosion         );
Selectobject(bExplosion          CreateCompatibleBitmap(hdc 560 200));
Selectobject(cExplosion          CreateCompatibleBitmap(hdc 560 200));
for(i=0; i<560; i++)
{
for(int j=0; j<200; j++)
{
if(GetPixel(imageDC i j) != RGB(255 0 255))
BitBlt(bExplosion          i j 1 1 imageDC i j 

SRCCOPY);
    else
SetPixel(cExplosion          i j RGB(255 255 255));
}
}
bFastTurtle         = CreateCompatibleDC(hdc);
cFastTurtle         = CreateCompatibleDC(hdc);
HBITMAP FastTurtle         = (HBITMAP)LoadImage(NULL “Pic\\FastTurtle.bmp“ IMAGE_BITMAP 

96 128 LR_LOADFROMFILE);
Selectobject(imageDC FastTurtle  

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件      18293  2013-04-09 23:42  PPT\AI.CPP

     文件       2328  2013-04-09 21:24  PPT\AI.h

     文件      50184  2012-04-18 21:43  PPT\File.cpp

     文件         26  2012-04-18 20:50  PPT\File.h

     文件       1854  2013-04-09 23:48  PPT\global.h

     文件          0  2012-04-30 16:51  PPT\ImageDeal.cpp

     文件        401  2012-05-03 15:56  PPT\ini.ini

     文件        401  2012-04-27 21:27  PPT\ini1.ini

     文件    1440054  2006-10-09 22:29  PPT\Pic\BG.bmp

     文件     140022  2006-09-22 11:23  PPT\Pic\BigPopo.bmp

     文件      41670  2006-10-09 19:08  PPT\Pic\Draw.bmp

     文件     336056  2006-09-22 13:48  PPT\Pic\Explosion.bmp

     文件      36918  2006-09-23 13:34  PPT\Pic\FastTurtle.bmp

     文件      38742  2006-09-24 20:58  PPT\Pic\FastUFO.bmp

     文件      17154  2006-09-15 16:08  PPT\Pic\Gift1.bmp

     文件      17156  2006-09-15 20:07  PPT\Pic\Gift2.bmp

     文件      17156  2006-09-15 20:07  PPT\Pic\Gift3.bmp

     文件      17156  2006-09-15 20:08  PPT\Pic\Gift4.bmp

     文件      17156  2006-09-15 20:08  PPT\Pic\Gift5.bmp

     文件      17534  2006-09-21 09:39  PPT\Pic\Gift6.bmp

     文件      12366  2006-09-24 13:33  PPT\Pic\GiftOwl.bmp

     文件      13338  2006-09-24 10:12  PPT\Pic\GiftTurtle.bmp

     文件      14814  2006-09-24 21:05  PPT\Pic\GiftUFO.bmp

     文件      15606  2006-10-09 14:54  PPT\Pic\MapType1.bmp

     文件      20502  2006-10-09 20:38  PPT\Pic\MapType2.bmp

     文件      13878  2006-09-26 11:33  PPT\Pic\MapType3.bmp

     文件       1062  2006-09-26 03:21  PPT\Pic\MapTypeRoot.bmp

     文件       3654  2006-09-29 14:00  PPT\Pic\Number.bmp

     文件      38454  2006-09-24 14:50  PPT\Pic\Owl.bmp

     文件      16654  2006-10-09 17:35  PPT\Pic\Player.bmp

............此处省略147个文件信息

评论

共有 条评论