-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAnMapDoc.h
More file actions
149 lines (137 loc) · 4.26 KB
/
AnMapDoc.h
File metadata and controls
149 lines (137 loc) · 4.26 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
// AnMapDoc.h : interface of the CAnMapDoc class
//
/////////////////////////////////////////////////////////////////////////////
#if !defined(AFX_ANMAPDOC_H__843368A7_DBA1_4162_AA84_666F430B9EF4__INCLUDED_)
#define AFX_ANMAPDOC_H__843368A7_DBA1_4162_AA84_666F430B9EF4__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "TileSpr.h"
#include "BrushView.h"
#include "AnMapView.h"
#include "MiniView.h"
#include "Sprite.h"
#include "Undo.h"
#include <Mmsystem.h>
class CAnMapDoc : public CDocument
{
protected: // create from serialization only
CAnMapDoc();
DECLARE_DYNCREATE(CAnMapDoc)
// Attributes
public:
CAnMapApp *m_pApp;
BOOL m_bWorkMode;//TRUE이면 타일찍기 모드, FALSE이면 브러쉬 선택 모드
char m_cWorkMode;//0:일반타일 1:Moveable 2:Teleport 3:Farming
short m_sMapDataSizeX, m_sMapDataSizeY;
short m_sBrsX1, m_sBrsY1;
short m_sBrsX2, m_sBrsY2;
int m_iTileMode;//TileMode - 0:일반타일 1:나무 2:구조물
int m_iHowManyUndo;
int m_iIndexUndo;
int m_iBrushIndex;
int m_iSelBrush;
int m_iSelTree;
int m_iObjectIndex;
int m_iSelObject;
int m_iBrushMode;
int m_iTempX, m_iTempY;
BOOL m_bModified;
BOOL m_bGrid;
BOOL m_bTree;
BOOL m_bActivated;
BOOL m_bReadyMiniView;
BOOL m_bReadyAnMapView;
BOOL m_bAutoSave;
DWORD m_dwAutoSaveDelay;
DWORD m_dwCursorDelay;
DWORD m_dwScrollTime;
DWORD m_dwScrollDelay;
CUndo *m_pUndo[DEF_MAX_UNDO];
HANDLE m_hMutex;
POINTS m_ScrollPt;
POINTS m_mousept;
POINTS m_edit1, m_edit2, m_memsize;
CString m_filename;
CString m_pathname;
CSprite *m_pSprite[DEF_MAXSPRITES];
CTileSpr m_tile[752][752];
CTileSpr m_mTile[752][752];
CMiniView *m_pMiniView;
CAnMapView *m_pRightView;
CBrushView *m_pBrushView;
// Operations
public:
CUndo* MakeUndo();
void CopyTile( CTileSpr* pDstTile, CTileSpr* pSrcTile );
BOOL IsBrushMatched( int i, short mx, short my );
void ChangeBrush(int iDir);
void SelectBrush(int iDir);
BOOL _bDecodeMapInfo( char * pHeader );
BOOL bOpenMapDataFile( CString cFn );
void OnKeyDown( UINT nChar);
void OnKeyUp(UINT nChar);
void OnLButtonDown(UINT nFlags);
void OnLButtonUp(UINT nFlags);
void OnRButtonDown(UINT nFlags);
void OnRButtonUp(UINT nFlags);
void OnMouseMove(UINT nFlags);
void SaveFileAs();
void SaveMapData( CString cFn );
void OnBrushMode( int iBrushIndex );
void PutTile( BOOL bMakeUndo );
void PutTree( BOOL bMakeUndo );
void PutObject( BOOL bMakeUndo );
void SetRightView( CAnMapView* pView );
void SetMiniView( CMiniView* pView );
void SetBrushView( CBrushView* pView);
void SelectTerrain(int iTerrain);
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CAnMapDoc)
//}}AFX_VIRTUAL
// Implementation
public:
void SetModify();
void ThreadJob();
void UpdateScreen();
void MakeSprite( char* FileName, short sStart, short sCount);
virtual ~CAnMapDoc();
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
// Generated message map functions
protected:
//{{AFX_MSG(CAnMapDoc)
afx_msg void OnFileSaveAs();
afx_msg void OnUpdateFileSaveAs(CCmdUI* pCmdUI);
afx_msg void OnFileOpen();
afx_msg void OnFileSave();
afx_msg void OnMoveLeft();
afx_msg void OnMoveRight();
afx_msg void OnMoveUp();
afx_msg void OnMoveDown();
afx_msg void OnFileNew();
afx_msg void OnViewGrid();
afx_msg void OnViewTree();
afx_msg void OnUpdateViewGrid(CCmdUI* pCmdUI);
afx_msg void OnUpdateViewTree(CCmdUI* pCmdUI);
afx_msg void OnEditUndo();
afx_msg void OnEditRedo();
afx_msg void OnCheckBlank();
afx_msg void OnViewRender();
afx_msg void OnEditCopy();
afx_msg void OnEditPaste();
afx_msg void OnUpdateEditUndo(CCmdUI* pCmdUI);
afx_msg void OnUpdateEditRedo(CCmdUI* pCmdUI);
afx_msg void OnUpdateEditPaste(CCmdUI* pCmdUI);
afx_msg void OnUpdateEditCopy(CCmdUI* pCmdUI);
afx_msg void OnToolOption();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_ANMAPDOC_H__843368A7_DBA1_4162_AA84_666F430B9EF4__INCLUDED_)