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

📄 mapeditdlg.h

📁 一个类似坦克大战的小小游戏
💻 H
字号:

/**************************************************************************************
	Project  Name			: Map Edit of my game
	Module Name				: Main UI
	File Name				: MapEditDlg.h 
	Create					: 2007-7-5, by Vigame
	Completed				: 2007-7-12, by Vigame
	Update					: 
	Copyright				: o(∩_∩)o
	Reference				: 
	Abstrct					: You may do whatever you want with this code, as long as 
							 you include this copyright notice in your implementation
							 files.Comments and bug Reports: vigor1985@gmail.com,
							  QQ:15061260, I'll right here wait for you, ^_^
																by Vigame, 2007-7-12
 **************************************************************************************/

#if !defined(AFX_MAPEDITDLG_H__E53EABEB_2532_4E65_B253_2AA35B59D485__INCLUDED_)
#define AFX_MAPEDITDLG_H__E53EABEB_2532_4E65_B253_2AA35B59D485__INCLUDED_

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

#include "Graphics.h"
#include "GameResource.h"
#include "GameMap.h"


#include <list>
using namespace std;

/////////////////////////////////////////////////////////////////////////////
// CMapEditDlg dialog

//class CGameResource;
class CMapEditDlg : public CDialog
{
// Construction
public:
	CMapEditDlg(CWnd* pParent = NULL);	// standard constructor

	void Refresh();
	void DrawSea();
	void DrawScenery();
	void DrawSelectGridding();
	void DrawSelectSquare();
	void FlagObjectSelected();
	void FillSelectBox();	// Draw pics in select box
	void DeleteObject();
	void Reset();
	void CreateNewMap();

// Dialog Data
	//{{AFX_DATA(CMapEditDlg)
	enum { IDD = IDD_MAPEDIT_DIALOG };
		// NOTE: the ClassWizard will add data members here
	//}}AFX_DATA

	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CMapEditDlg)
	public:
	virtual BOOL PreTranslateMessage(MSG* pMsg);

	protected:
	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV support
	//}}AFX_VIRTUAL

// Implementation
protected:
	HICON m_hIcon;

	// Generated message map functions
	//{{AFX_MSG(CMapEditDlg)
	virtual BOOL OnInitDialog();
	afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
	afx_msg void OnPaint();
	afx_msg HCURSOR OnQueryDragIcon();
	afx_msg void OnNewmap();
	afx_msg void OnLoadmap();
	afx_msg void OnSavemap();
	afx_msg void OnTimer(UINT nIDEvent);
	afx_msg void OnCancelMode();
	afx_msg void OnFense();
	afx_msg void OnBarbette();
	afx_msg void OnWall();
	afx_msg void OnIsaland();
	afx_msg void OnReef();
	afx_msg void OnSeaweed();
	afx_msg void OnMouseMove(UINT nFlags, CPoint point);
	afx_msg void OnCaptureChanged(CWnd *pWnd);
	afx_msg void OnLButtonDblClk(UINT nFlags, CPoint point);
	afx_msg void OnChar(UINT nChar, UINT nRepCnt, UINT nFlags);
	afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
	afx_msg int OnCharToItem(UINT nChar, CListBox* pListBox, UINT nIndex);
	afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
	afx_msg void OnClose();
	afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
	afx_msg int OnCompareItem(int nIDCtl, LPCOMPAREITEMSTRUCT lpCompareItemStruct);
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()

private:
	// Used for map viewing
	CGraphics m_gameGraphics;			
	CGameResource m_gameResource;

	// Used for select box
	CGraphics m_selectGraphics;			
	CGameResource m_selectResource;
	
	CGameMap m_gameMap;
	CMenu m_menu;

	list<CGameObject> m_listSea;	
	list<CGameObject> m_listMapObject;			// Scenery object list
	list<CGameObject>::iterator m_itrSelected;	// The iterator of the object which 
												// had been selected
	bool m_bLButtonDown;
	bool m_bSelected;
	CPoint m_offset;

	DWORD m_timeNew;	// Game time
	DWORD m_timeOld;	// Old time
	int m_nChange;
	enum _SELECT_TYPE
	{
		ST_Fense,
		ST_Barbette,
		ST_Wall,
		ST_Island,
		ST_Reef,
		ST_Seaweed
	} m_selectType;

	afx_msg void OnExit();
	afx_msg void OnHelp();
};

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

#endif // !defined(AFX_MAPEDITDLG_H__E53EABEB_2532_4E65_B253_2AA35B59D485__INCLUDED_)

⌨️ 快捷键说明

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