资源简介

自己模仿PopStar游戏规则编写的MFC小程序。程序已经可以正确运行。适合对MFC有基本基础的同学参考学习。

资源截图

代码片段和文件信息

#include “StdAfx.h“
#include “Popblock.h“
//#include 
//#include 
//#include
//using namespace std;

//blockHalfWidth and blockHalfHeight determine how large the block looks like

Popblock::Popblock(void)
{
m_visible=0;
    m_color=0;
m_centerPoint.SetPoint(00);
m_rowColumn.blockColumn=0;
m_rowColumn.blockRow=0;
}
Popblock::~Popblock(void)
{
}

void Popblock::formGroup()
{
}

void Popblock::drawBlock()
{
}

void Popblock::createBlock(UINT rowUINT columnUINT colorNum) //UINT colorNum
{
m_visible=1;
//UINT tempNum;
//time_t now_time;
//now_time = time(NULL);
//srand(unsigned int(now_time));
//tempNum=(unsigned int)random(1blockColorType+1); //产生随机数
switch(colorNum)
{
case 1: m_color= GREEN; break;
case 2: m_color=RED; break;
case 3: m_color=YELLOW; break;
case 4: m_color=BLUE; break;
case 5: m_color=PURPLE;break;
default: m_color=0x00ffffff; break;
}
m_centerPoint.SetPoint(column*2*blockHalfWidth+blockHalfWidthrow*2*blockHalfHeight+blockHalfHeight);
m_rowColumn.blockColumn=column+1; //calculate the column number of this created block and store in m_rowColumn.blockColumn
m_rowColumn.blockRow=row+1; //calculate the row number of this created block and store in m_rowColumn.blockRow
m_widthHeight.x=blockHalfWidth*2;
m_widthHeight.y=blockHalfHeight*2;
m_leftBottom.x=column*m_widthHeight.x;
m_leftBottom.y=row*m_widthHeight.y;
}

void Popblock::setBlockRowColumn(UINT rowUINT column)
{
m_rowColumn.blockRow=row;
m_rowColumn.blockColumn=column;
}

void Popblock::setBlockCenterPoint(UINT rowUINT column)
{
m_centerPoint.SetPoint(row*2*blockHalfWidth+blockHalfWidthcolumn*2*blockHalfHeight+blockHalfHeight);
}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2013-04-24 10:31  PopStarTrail\
     目录           0  2013-04-24 10:31  PopStarTrail\Debug\
     文件       71680  2013-03-25 22:21  PopStarTrail\Debug\PopStarTrail.exe
     目录           0  2013-04-24 10:30  PopStarTrail\PopStarTrail\
     文件         902  2013-03-19 18:02  PopStarTrail\PopStarTrail.sln
     文件       68096  2013-03-25 23:26  PopStarTrail\PopStarTrail.suo
     文件         212  2013-03-23 21:17  PopStarTrail\PopStarTrail\commonStructure.h
     文件        1762  2013-03-25 17:07  PopStarTrail\PopStarTrail\Popblock.cpp
     文件         942  2013-03-25 17:07  PopStarTrail\PopStarTrail\Popblock.h
     文件        7132  2013-03-23 19:13  PopStarTrail\PopStarTrail\Popgroup.cpp
     文件        1173  2013-03-23 19:31  PopStarTrail\PopStarTrail\Popgroup.h
     文件        6497  2013-03-25 22:21  PopStarTrail\PopStarTrail\Popmap.cpp
     文件        1469  2013-03-25 22:19  PopStarTrail\PopStarTrail\Popmap.h
     文件        1842  2013-03-25 22:09  PopStarTrail\PopStarTrail\Popstage.cpp
     文件         407  2013-03-25 22:07  PopStarTrail\PopStarTrail\Popstage.h
     文件       58732  2013-03-25 22:07  PopStarTrail\PopStarTrail\PopStarTrail.aps
     文件        2162  2013-03-19 18:02  PopStarTrail\PopStarTrail\PopStarTrail.cpp
     文件         540  2013-03-19 18:02  PopStarTrail\PopStarTrail\PopStarTrail.h
     文件        5665  2013-03-25 22:07  PopStarTrail\PopStarTrail\PopStarTrail.rc
     文件        6119  2013-03-23 10:18  PopStarTrail\PopStarTrail\PopStarTrail.vcproj
     文件        1407  2013-03-25 23:26  PopStarTrail\PopStarTrail\PopStarTrail.vcproj.THEMO.Administrator.user
     文件        1407  2013-03-19 20:51  PopStarTrail\PopStarTrail\PopStarTrail.vcproj.themo.themo.user
     文件       13923  2013-03-25 22:19  PopStarTrail\PopStarTrail\PopStarTrailDlg.cpp
     文件        1022  2013-03-25 22:07  PopStarTrail\PopStarTrail\PopStarTrailDlg.h
     文件        4112  2013-03-19 18:02  PopStarTrail\PopStarTrail\ReadMe.txt
     目录           0  2013-03-19 18:02  PopStarTrail\PopStarTrail\res\
     文件         730  2013-03-25 22:07  PopStarTrail\PopStarTrail\resource.h
     文件       21630  2003-07-23 17:52  PopStarTrail\PopStarTrail\res\PopStarTrail.ico
     文件         403  2013-03-19 18:02  PopStarTrail\PopStarTrail\res\PopStarTrail.rc2
     文件         212  2013-03-19 18:02  PopStarTrail\PopStarTrail\stdafx.cpp
     文件        1956  2013-03-19 18:02  PopStarTrail\PopStarTrail\stdafx.h
............此处省略3个文件信息

评论

共有 条评论