標題: 基于VC++的推箱子游戲 [打印本頁]

作者: lzr123LL    時間: 2017-6-6 18:23
標題: 基于VC++的推箱子游戲
推箱子


vc++源主程序如下:
  1. #include "StdAfx.h"
  2. #include "MapManager.h"


  3. MapManager::MapManager()
  4. {

  5. }

  6. MapManager::~MapManager()
  7. {

  8. }

  9. void MapManager::GetMap(int map[][CX],int index)
  10. {
  11.         char ch;
  12.         char path[200];
  13.         int err;
  14.         ::GetModuleFileName(NULL,path,200);
  15.         (::_tcsrchr(path,'\\'))[1]='\0';
  16.         strcat(path,"map\\abc.txt");
  17.         err=file.Open(path,CFile::modeRead);
  18.         if(err!=0)
  19.         {

  20.         }
  21.         for(int k=0;k<index-1;k++)
  22.         {
  23.                 for(int i=0;i<CY;i++)
  24.                 {
  25.                         for(int j=0;j<CX;j++)
  26.                         {
  27.                                 file.Read(&ch,1);
  28.                         }
  29.                         file.Read(&ch,1);
  30.                 }
  31.         }
  32.         for(int i=0;i<CY;i++)
  33.         {
  34.                 for(int j=0;j<CX;j++)
  35.                 {
  36. ……………………

  37. …………限于本文篇幅 余下代碼請從51黑下載附件…………
復(fù)制代碼

所有資料51hei提供下載:
51CTO下載-VC開發(fā)的推箱子游戲.rar (2.08 MB, 下載次數(shù): 14)







歡迎光臨 (http://www.torrancerestoration.com/bbs/) Powered by Discuz! X3.1