⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 catcatchratview.h

📁 猫捉老鼠小游戏 把回忆带到我们的小时候
💻 H
字号:
// CatCatchRatView.h : interface of the CCatCatchRatView class
//
/////////////////////////////////////////////////////////////////////////////

#if !defined(AFX_CATCATCHRATVIEW_H__A1301BC4_99CF_4C0D_A21D_32871AD7E668__INCLUDED_)
#define AFX_CATCATCHRATVIEW_H__A1301BC4_99CF_4C0D_A21D_32871AD7E668__INCLUDED_

#include "GameSlectDlg.h"	// Added by ClassView
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
//#include "GameSlectDlg.h"
//#define RATMAX 5



class CCatCatchRatView : public CView
{
protected: // create from serialization only
	CCatCatchRatView();
	DECLARE_DYNCREATE(CCatCatchRatView)

		


// Attributes


	public:
	CCatCatchRatDoc* GetDocument();
	CBitmap m_bmCat[4],m_bmRat[4];                 ///猫与老鼠的位图
	int StartFlag;                                 ///程序运行状态标志
	//bool m_bRatLive[RATMAX];
    bool*m_bRatLive;                               ///老鼠存活标志
	int m_nCatw,m_nCath;                           ///猫位图的宽与高
    int m_nCatx,m_nCaty;                           ///猫位图的左上角坐标
	//int m_nRatDirection[RATMAX],m_nCatDirection;
	int *m_nRatDirection,m_nCatDirection;          /// 猫和老鼠的运动方向
	int m_nRatw,m_nRath;                           ///老鼠位图的宽和高
    //int m_nRatx[RATMAX],m_nRaty[RATMAX];
	int *m_nRatx,*m_nRaty;                         ///老鼠位图的左上角坐标
	CRect m_rectClient;                            ///场地知矩形
	//CRect m_rectRat[RATMAX],m_rectCat;
	CRect *m_rectRat,m_rectCat;                    ///猫和老鼠的位图矩形                  
	int m_nRat;                                    //////待抓老鼠数
	int m_nRatSpeed,m_nCatSpeed;                   ///运动速度
	CTime m_timeStart,m_timeEnd;                   ///游戏开始和结束时间
	CTimeSpan m_timeWork,m_timeSet;                ///游戏剩余和设定时间
	int m_nDifficulty;                             ///难度标志
	


// Operations
public:

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CCatCatchRatView)
	public:
	virtual void OnDraw(CDC* pDC);  // overridden to draw this view
	virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
	protected:
	virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
	virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
	virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
	//}}AFX_VIRTUAL

// Implementation
public:
	bool game_music;
	void LevelIncrease();
	void SetGameLevel();
	virtual ~CCatCatchRatView();
#ifdef _DEBUG
	virtual void AssertValid() const;
	virtual void Dump(CDumpContext& dc) const;
#endif

protected:

// Generated message map functions
protected:
	//{{AFX_MSG(CCatCatchRatView)
	afx_msg void OnHard();
	afx_msg void OnStart();
	afx_msg void OnStop();
	afx_msg void OnRestart();
	afx_msg void OnNormal();
	afx_msg void OnEasy();
	afx_msg void OnUpdateEasy(CCmdUI* pCmdUI);
	afx_msg void OnUpdateNormal(CCmdUI* pCmdUI);
	afx_msg void OnUpdateRestart(CCmdUI* pCmdUI);
	afx_msg void OnUpdateStop(CCmdUI* pCmdUI);
	afx_msg void OnUpdateHard(CCmdUI* pCmdUI);
	afx_msg void OnUpdateStart(CCmdUI* pCmdUI);
	afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
	afx_msg void OnTimer(UINT nIDEvent);
	afx_msg void OnGaSel();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()



	

private:
	void OnOpiontMusic(void);
	int RATMAX;
};

#ifndef _DEBUG  // debug version in CatCatchRatView.cpp
inline CCatCatchRatDoc* CCatCatchRatView::GetDocument()
   { return (CCatCatchRatDoc*)m_pDocument; }
#endif

/////////////////////////////////////////////////////////////////////////////

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_CATCATCHRATVIEW_H__A1301BC4_99CF_4C0D_A21D_32871AD7E668__INCLUDED_)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -