?? boxman.h
字號(hào):
/*++
Copyright (c) AFE(Active-Free-Elegance)
Module Name:
BoxMan.h
Abstract:
BoxMan Game Class ,solve all the important movment of the man and box,
and some thing refer to them
Author:
Weijian Luo (Arthur Luo) 15-Jun-2005
E-mail: skybluehacker@yahoo.com.cn
Revision History: 1.0
--*/
#if !defined(AFX_BOXMAN_H__6BDB997E_47A5_471A_9589_4BB3B6AFF679__INCLUDED_)
#define AFX_BOXMAN_H__6BDB997E_47A5_471A_9589_4BB3B6AFF679__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include <afxwin.h> //GDI 繪圖CDC
#define M_TAB_WIDTH 20 //橫向方塊數(shù)目寬度
#define M_TAB_HEIGHT 20 //縱向方塊數(shù)目寬度
class CBoxMan
{
public:
CBoxMan();
virtual ~CBoxMan();
public:
BOOL ChangeMissionNum(int iNum);
void KeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
void DrawGameArea(CDC* pDC);
int GetNowMissionNum(void);
void IsSound(BOOL bUse);
protected:
//繪圖操作
void DrawBackGroup(int x, int y, CDC* pDC);
void DrawWhiteWall(int x, int y, CDC* pDC);
void DrawBlueWall(int x, int y, CDC* pDC);
void DrawBall(int x, int y, CDC* pDC);
void DrawYellowBox(int x, int y, CDC* pDC);
void DrawRedBox(int x, int y, CDC* pDC);
void DrawManWall(int x, int y, CDC* pDC);
void DrawManBall(int x, int y, CDC* pDC);
void LoadMap(int iMissionNum);
CPoint GetManPosition();
void DispatchMsg(UINT nChar);
void UpdateMap(int x1, int y1, int x2, int y2, int x3, int y3);
bool IsFinish(void);
void BoxManPlaySound(void);
int LoadMaxMissionNum(void);
protected:
char m_cMap[M_TAB_WIDTH][M_TAB_HEIGHT]; //方塊矩陣
CPoint m_ptManPosition;
int m_iMissionNum;
int m_soundState; //當(dāng)前播音狀態(tài)
int m_bSound; //是否啟用聲音
};
#endif // !defined(AFX_BOXMAN_H__6BDB997E_47A5_471A_9589_4BB3B6AFF679__INCLUDED_)
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -