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

📄 mine.h

📁 这是一个关于扫雷游戏的代码
💻 H
字号:
// Mine.h : main header file for the MINE application
//

#if !defined(AFX_MINE_H__E0280A86_EE73_41AC_899F_6D7FA8400F69__INCLUDED_)
#define AFX_MINE_H__E0280A86_EE73_41AC_899F_6D7FA8400F69__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#ifndef __AFXWIN_H__
	#error include 'stdafx.h' before including this file for PCH
#endif

#include "resource.h"		// main symbols
#include "MineWnd.h"

#define STR_NUM                         10
#define STR_BUF_MAX                     256

#define DEFAULT_RECORD                  999

#define PRIMARY_WIDTH                   9 
#define PRIMARY_HEIGHT                  9 
#define PRIMARY_MINE_NUM                10 
#define SECONDARY_WIDTH                 16 
#define SECONDARY_HEIGHT                16 
#define SECONDARY_MINE_NUM              40 
#define ADVANCED_WIDTH                  30 
#define ADVANCED_HEIGHT                 16 
#define ADVANCED_MINE_NUM               99 

#define MAX_WIDTH                       30
#define MAX_HEIGHT                      24
#define MIN_MINE_NUM                    10 
#define MIN_WIDTH                       9 
#define MIN_HEIGHT                      9

#define LEVEL_PRIMARY                   8001
#define LEVEL_SECONDARY                 8002
#define LEVEL_ADVANCED                  8003
#define LEVEL_CUSTOM                    8004

const TCHAR gcszWndClass[] = _T("MineWndClass");
const TCHAR gcszSetting[] = _T("GameInfo");
const TCHAR gcszGameLevel[] = _T("GameLevel");
const TCHAR gcszCustomWidth[] = _T("CustomWidth");
const TCHAR gcszCustomHeight[] = _T("CustomHeight");
const TCHAR gcszCustomMineNum[] = _T("CustomMineNum");
const TCHAR gcszColor[] = _T("Color");
const TCHAR gcszSound[] = _T("Sound");
const TCHAR gcszMarked[] = _T("Marked");
const TCHAR gcszPrimaryRecord[] = _T("PrimaryRecord");
const TCHAR gcszSecondaryRecord[] = _T("SecondaryRecord");
const TCHAR gcszAdvancedRecord[] = _T("AdvancedRecord");
const TCHAR gcszPrimaryRecordHolder[] = _T("PrimaryRecordHolder");
const TCHAR gcszSecondaryRecordHolder[] = _T("SecondaryRecordHolder");
const TCHAR gcszAdvancedRecordHolder[]   = _T("AdvancedRecordHolder");

/////////////////////////////////////////////////////////////////////////////
// CMineApp:
// See Mine.cpp for the implementation of this class
//


class CMineApp : public CWinApp
{
public:	
	CMineWnd* pWnd;
	UINT uCustomWidth;
	UINT uCustomHeight;
	UINT uCustomMineNum;
	UINT uGameLevel;
	
	BOOL bColor;
	BOOL bSound;
	BOOL bMarked;
	
	UINT uPrimaryRecord;
	UINT uSecondaryRecord;
	UINT uAdvancedRecord;
	
	CString sPrimaryRecordHolder;
	CString sSecondaryRecordHolder;
	CString sAdvancedRecordHolder;
	
	CHAR sResource[STR_NUM][STR_BUF_MAX]; 
	
	UINT uSecends;
	int  uRemainMines;
	UINT uFrameWidth;
	UINT uFrameHeight;
	
public:
	CMineApp();
    BOOL LoadGameInfo();
	BOOL SaveGameInfo();

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CMineApp)
	public:
	virtual BOOL InitInstance();
	virtual int ExitInstance();
	//}}AFX_VIRTUAL

// Implementation	
	//{{AFX_MSG(CMineApp)	
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};


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

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

#endif // !defined(AFX_MINE_H__E0280A86_EE73_41AC_899F_6D7FA8400F69__INCLUDED_)

⌨️ 快捷键说明

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