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

📄 setwallblockdlg.h

📁 一款45度2D游戏地图编辑器和大家一起分享啊!
💻 H
字号:
#pragma once
#include "afxwin.h"
#include ".\\src\\dxutil.h"
#include ".\\src\\ddutil.h"
#include <vector>
#include "afxcmn.h"
#include "MyWall.h"


class CMyScrollBar : public CScrollBar
{

public:
	DECLARE_MESSAGE_MAP()
};
class SetWallBlockDlg : public CDialog
{
	DECLARE_DYNAMIC(SetWallBlockDlg)
public:
	SetWallBlockDlg(CWnd* pParent = NULL);   // 标准构造函数
	SetWallBlockDlg(int id);                 //构造函数,id为传进来的Wall图片的id号
	SetWallBlockDlg(int id,WallConfig* temp);
	virtual ~SetWallBlockDlg();
	void DrawStatic();    //画图
	void TranBitblt(HDC *tarDC,int x,int y,int w,int h,HDC *srcDC,int sx,int sy,COLORREF rgbMask);
	int projectnum;
	int w,h;//静态图片的宽/32 高/32 这里面的第一层格式要和。。。对应
	int beginw,beginh;//重画起点位置
	std::vector<CPoint> vtProject; //投影区域
	int tileWidth,tileHeight; //tile的宽和高
	int Imagex,Imagey;        //wall帖图的初始坐标,
	int Imagexx,Imageyy;      //辅助变量,便于计算,哈哈
	void DrawFront(CRect& rt);  //画地表
	void DrawProject(); //画阻挡区域
	void DrawImage(CRect& rt);   //画wall
	int centerx,centery;
	bool editCenter;   //编辑中心点
	bool editProject;  //编辑投影区域
	int mouse;
	int editx,edity;
// 对话框数据
	enum { IDD = IDD_BLOCKSET };
protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV 支持
	DECLARE_MESSAGE_MAP()
public:
	CPoint calculateOffist();
	CSurface* Image; //wall的图片
	CSurface* Tile;  //tile的图片
	CSurface* center;//中心点显示图片
	CSurface* project;  //阻挡标示图片
 
	CStatic m_StaticPic;
	CMyScrollBar ScrollBary;
	CMyScrollBar ScrollBarx;
	int m_Offistx; //微调wall x
	int m_Offisty; //微调wall y
protected:
	virtual LRESULT WindowProc(UINT message, WPARAM wParam, LPARAM lParam);
public:
	virtual BOOL OnInitDialog();
	afx_msg void OnPaint();
	CButton m_flagsetprogjet;
	CButton m_flagCenter;
	afx_msg void OnMouseMove(UINT nFlags, CPoint point);
	afx_msg void OnBnClickedBtnsetblock();
	afx_msg void OnBnClickedBtnsetcenter();
	CSpinButtonCtrl m_spinx;
	CSpinButtonCtrl m_spiny;
	afx_msg void OnDeltaposSpin1(NMHDR *pNMHDR, LRESULT *pResult);
	afx_msg void OnDeltaposSpin2(NMHDR *pNMHDR, LRESULT *pResult);
	afx_msg void OnVScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar);
	afx_msg void OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar);
	afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
	afx_msg void OnRButtonDown(UINT nFlags, CPoint point);
};

⌨️ 快捷键说明

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