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

📄 45mapmakerview.h

📁 一款45度2D游戏地图编辑器和大家一起分享啊!
💻 H
字号:
// 45MapMakerView.h : interface of the CMy45MapMakerView class
//
/////////////////////////////////////////////////////////////////////////////

#if !defined(AFX_45MAPMAKERVIEW_H__D2C16E74_0152_4647_A547_47D8E58FC3BE__INCLUDED_)
#define AFX_45MAPMAKERVIEW_H__D2C16E74_0152_4647_A547_47D8E58FC3BE__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include ".\src\dxutil.h"
#include ".\src\ddutil.h"
#include "45MapMakerDoc.h"
#define DDRAW_WIDTH 1046
#define DDRAW_HEIGHT 687
class CMy45MapMakerView : public CView
{
protected: // create from serialization only
	CMy45MapMakerView();
	DECLARE_DYNCREATE(CMy45MapMakerView)

// Attributes
public:
	HRESULT InitDirectDraw(HWND hWnd );  //创建DirectDraw
	CMy45MapMakerDoc* GetDocument();
	void DrawFront(CRect* rt);           //画地表
		void DrawSecond(CRect* rt);          //画建筑物
	void DrawProject(CRect* rt);
	void DrawObject();
	int mouse;
// Operations
public:
	
	CSurface* test;
	int mapWidth,mapHeight;//地图的宽度和高度,基本单位是图块的宽高度
	int mapBeginx,mapBeginy;//显示地图的开始位置
	int tileWidth,tileHeight;//地图Tile的宽度和高度
	
	int editarry;            //选择要修改的数组位置
	int editx,edity;
	int curBeginx,curBeginy;//选择模式下面的起点位置
	int curEndx,curEndy;//选择模式下面的终点位置
	bool brushed;       //画刷

	////////////////////////MapClubDlg///////////////////////////
	bool ViewEditSecond;     //察看前景图块中心点
	bool viewFront;
	bool viewSecond;
	bool viewBlock;
	bool editMode;           //true表示画刷模式,false表示选择模式
	bool editFront;
	bool editSecond;
	bool editBlock;
	bool viewNet;            //察看网格
	
// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CMy45MapMakerView)
	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:
	virtual ~CMy45MapMakerView();
#ifdef _DEBUG
	virtual void AssertValid() const;
	virtual void Dump(CDumpContext& dc) const;
#endif

protected:

// Generated message map functions
protected:
	//{{AFX_MSG(CMy45MapMakerView)
		// NOTE - the ClassWizard will add and remove member functions here.
		//    DO NOT EDIT what you see in these blocks of generated code !
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
public:
	afx_msg BOOL OnEraseBkgnd(CDC* pDC);
//	afx_msg void OnFileNew();
protected:
	virtual void OnUpdate(CView* /*pSender*/, LPARAM /*lHint*/, CObject* /*pHint*/);
public:
	afx_msg void OnMouseMove(UINT nFlags, CPoint point);
	afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
	afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
	virtual BOOL Create(LPCTSTR lpszClassName, LPCTSTR lpszWindowName, DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID, CCreateContext* pContext = NULL);
	afx_msg void OnSize(UINT nType, int cx, int cy);
	afx_msg void OnVScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar);
	afx_msg void OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar);
	afx_msg void OnRButtonDown(UINT nFlags, CPoint point);
	afx_msg void OnViewfront();
	afx_msg void OnUpdateViewfront(CCmdUI *pCmdUI);
	afx_msg void OnViewsecond();
	afx_msg void OnUpdateViewsecond(CCmdUI *pCmdUI);
	afx_msg void OnViewblock();
	afx_msg void OnUpdateViewblock(CCmdUI *pCmdUI);
	afx_msg void OnViewnet();
	afx_msg void OnUpdateViewnet(CCmdUI *pCmdUI);
	afx_msg void OnEditfront();
	afx_msg void OnEditsecond();
	afx_msg void OnEditblock();
	afx_msg void OnUpdateEditfront(CCmdUI *pCmdUI);
	afx_msg void OnUpdateEditsecond(CCmdUI *pCmdUI);
	afx_msg void OnUpdateEditblock(CCmdUI *pCmdUI);
	afx_msg void OnSelectmode();
	afx_msg void OnBrushmode();
	afx_msg void OnUpdateSelectmode(CCmdUI *pCmdUI);
	afx_msg void OnUpdateBrushmode(CCmdUI *pCmdUI);
	afx_msg void OnViewsecondtarg();
	afx_msg void OnUpdateViewsecondtarg(CCmdUI *pCmdUI);
};

#ifndef _DEBUG  // debug version in 45MapMakerView.cpp
inline CMy45MapMakerDoc* CMy45MapMakerView::GetDocument()
   { return (CMy45MapMakerDoc*)m_pDocument; }
#endif

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

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

#endif // !defined(AFX_45MAPMAKERVIEW_H__D2C16E74_0152_4647_A547_47D8E58FC3BE__INCLUDED_)

⌨️ 快捷键说明

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