This commit is contained in:
parent
073550f4c7
commit
5bfc9fdcda
@ -60,11 +60,12 @@ CMultiBar *ParamBar=Frm->GetParamBar();
|
||||
/*****************************************************************************/
|
||||
void CCore::NewMap()
|
||||
{
|
||||
// To be loaded/created
|
||||
Layers[LAYER_TYPE_BACK]= new CLayerTile("Back", 32, 32, 4.0f, FALSE);
|
||||
Layers[LAYER_TYPE_MID]= new CLayerTile("Mid", TileLayerDefaultWidth/2.0f, TileLayerDefaultHeight/2.0f, 2.0f, FALSE);
|
||||
Layers[LAYER_TYPE_ACTION]= new CLayerTile("Action",TileLayerDefaultWidth/1.0f, TileLayerDefaultHeight/1.0f, 1.0f, TRUE);
|
||||
Layers[LAYER_TYPE_FORE]= new CLayerTile("Fore", TileLayerDefaultWidth/0.5f, TileLayerDefaultHeight/0.5f, 0.5f, FALSE);
|
||||
// Create Gfx Layers
|
||||
// Name Width Height SizeDiv ViewDiv 3d? Resizable?
|
||||
Layers[LAYER_TYPE_BACK]= new CLayerTile( "Back", 32, 32, 1.0f, 4.0f, FALSE, FALSE);
|
||||
Layers[LAYER_TYPE_MID]= new CLayerTile( "Mid", TileLayerDefaultWidth, TileLayerDefaultHeight, 2.0f, 2.0f, FALSE, TRUE);
|
||||
Layers[LAYER_TYPE_ACTION]= new CLayerTile( "Action",TileLayerDefaultWidth, TileLayerDefaultHeight, 1.0f, 1.0f, TRUE, TRUE);
|
||||
Layers[LAYER_TYPE_FORE]= new CLayerTile( "Fore", TileLayerDefaultWidth, TileLayerDefaultHeight, 0.5f, 0.5f, FALSE, TRUE);
|
||||
|
||||
ActiveLayer=LAYER_TYPE_ACTION;
|
||||
MapCam=Vec(0,0,0);
|
||||
@ -327,15 +328,37 @@ CTileSetDlg *TileSetDlg=(CTileSetDlg*)Frm->GetDialog(IDD_TILESET_DIALOG);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
void CCore::MirrorX()
|
||||
void CCore::MirrorX(CMapEditView *View)
|
||||
{
|
||||
if (!TileViewFlag) Layers[ActiveLayer]->MirrorX(this);
|
||||
if (!TileViewFlag)
|
||||
{
|
||||
Layers[ActiveLayer]->MirrorX(this);
|
||||
UpdateView(View);
|
||||
}
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
void CCore::MirrorY()
|
||||
void CCore::MirrorY(CMapEditView *View)
|
||||
{
|
||||
if (!TileViewFlag) Layers[ActiveLayer]->MirrorY(this);
|
||||
if (!TileViewFlag)
|
||||
{
|
||||
Layers[ActiveLayer]->MirrorY(this);
|
||||
UpdateView(View);
|
||||
}
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
void CCore::ActiveBrushLeft(CMapEditView *View)
|
||||
{
|
||||
TileBank.SetActiveBrushL();
|
||||
UpdateView(View);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
void CCore::ActiveBrushRight(CMapEditView *View)
|
||||
{
|
||||
TileBank.SetActiveBrushR();
|
||||
UpdateView(View);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
@ -371,3 +394,17 @@ Vec &ThisCam=GetCam();
|
||||
if (ThisCam.z>-1) ThisCam.z=-1;
|
||||
if (View) View->Invalidate();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
void CCore::SetMapSize(CMapEditView *View,int Width,int Height)
|
||||
{
|
||||
if (Width==GetMapWidth() && Height==GetMapHeight()) return;
|
||||
|
||||
for (int i=0; i<LAYER_TYPE_MAX; i++)
|
||||
{
|
||||
// Layers[i]->Resize(Width,Height);
|
||||
}
|
||||
Layers[LAYER_TYPE_ACTION]->Resize(Width,Height);
|
||||
|
||||
UpdateView(View);
|
||||
}
|
@ -45,10 +45,10 @@ public:
|
||||
void TileBankLoad(char *Filename);
|
||||
void TileBankReload();
|
||||
void TileBankSet();
|
||||
void MirrorX();
|
||||
void MirrorY();
|
||||
void ActiveBrushLeft() {TileBank.SetActiveBrushL();}
|
||||
void ActiveBrushRight() {TileBank.SetActiveBrushR();}
|
||||
void MirrorX(CMapEditView *View);
|
||||
void MirrorY(CMapEditView *View);
|
||||
void ActiveBrushLeft(CMapEditView *View);
|
||||
void ActiveBrushRight(CMapEditView *View);
|
||||
// Param Bar
|
||||
void UpdateParamBar();
|
||||
|
||||
@ -72,6 +72,10 @@ public:
|
||||
void SetCursorPos(CPoint &Pos) {CursorPos=Pos;}
|
||||
CPoint &GetCursorPos() {return(CursorPos);}
|
||||
|
||||
void SetMapSize(CMapEditView *View,int Width,int Height);
|
||||
int GetMapWidth() {return(Layers[LAYER_TYPE_ACTION]->GetWidth());}
|
||||
int GetMapHeight() {return(Layers[LAYER_TYPE_ACTION]->GetHeight());}
|
||||
|
||||
private:
|
||||
CPoint CurrentMousePos,LastMousePos;
|
||||
CPoint CursorPos,LastCursorPos;
|
||||
|
@ -50,6 +50,9 @@ virtual void RenderCursor(CCore *Core,Vec &CamPos,BOOL Is3d)=0;
|
||||
virtual void InitGUI(CCore *Core)=0;
|
||||
virtual void UpdateGUI(CCore *Core)=0;
|
||||
|
||||
virtual int GetWidth()=0;
|
||||
virtual int GetHeight()=0;
|
||||
virtual void Resize(int Width,int Height)=0;
|
||||
|
||||
// Functions
|
||||
virtual BOOL SetMode(int NewMode)=0;
|
||||
@ -66,7 +69,9 @@ protected:
|
||||
|
||||
char Name[256];
|
||||
BOOL Render3dFlag;
|
||||
float ZPosDiv;
|
||||
float ZPosDiv,MapSizeDiv;
|
||||
BOOL ResizeFlag;
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
@ -25,13 +25,16 @@
|
||||
/*****************************************************************************/
|
||||
/*****************************************************************************/
|
||||
// New Layer
|
||||
CLayerTile::CLayerTile(char *_Name,int Width,int Height,float ZDiv,BOOL Is3d)
|
||||
CLayerTile::CLayerTile(char *_Name,int Width,int Height,float MapDiv,float ZDiv,BOOL Is3d,BOOL Resizable)
|
||||
{
|
||||
SetName(_Name);
|
||||
Map.SetSize(Width,Height,TRUE);
|
||||
ZPosDiv=ZDiv;
|
||||
MapSizeDiv=MapDiv;
|
||||
ResizeFlag=Resizable;
|
||||
Render3dFlag=Is3d;
|
||||
Mode=MouseModePaint;
|
||||
|
||||
Map.SetSize(Width/MapDiv,Height/MapDiv,TRUE);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
@ -46,6 +49,14 @@ CLayerTile::~CLayerTile()
|
||||
{
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
void CLayerTile::Resize(int Width,int Height)
|
||||
{
|
||||
if (!ResizeFlag) return; // Its a fixed size, so DONT DO IT!
|
||||
|
||||
Map.Resize(Width/MapSizeDiv,Height/MapSizeDiv);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/*****************************************************************************/
|
||||
/*****************************************************************************/
|
||||
@ -476,8 +487,6 @@ BOOL CLayerTile::Paint(CMap &Blk,CPoint &CursorPos)
|
||||
if (CursorPos.y==-1 || CursorPos.y==-1) return(FALSE); // Off Map?
|
||||
if (!Blk.IsValid()) return(FALSE); // Invalid tile?
|
||||
|
||||
// Tile.Flags=Flag;
|
||||
|
||||
Map.Set(CursorPos.x,CursorPos.y,Blk);
|
||||
|
||||
return(TRUE);
|
||||
|
@ -12,8 +12,8 @@
|
||||
/*****************************************************************************/
|
||||
enum TileLayerEnum
|
||||
{
|
||||
TileLayerDefaultWidth=30,
|
||||
TileLayerDefaultHeight=20,
|
||||
TileLayerDefaultWidth=3,
|
||||
TileLayerDefaultHeight=2,
|
||||
};
|
||||
|
||||
/*****************************************************************************/
|
||||
@ -35,7 +35,7 @@ public:
|
||||
MouseFlagMirrorY=1<<1,
|
||||
};
|
||||
|
||||
CLayerTile(char *_Name,int Width,int Height,float ZDiv,BOOL Is3d); // New Layer
|
||||
CLayerTile(char *_Name,int Width,int Height,float MapDiv,float ZDiv,BOOL Is3d,BOOL Resizable); // New Layer
|
||||
CLayerTile(char *_Name); // Load Layer
|
||||
~CLayerTile();
|
||||
|
||||
@ -48,6 +48,10 @@ public:
|
||||
void InitGUI(CCore *Core);
|
||||
void UpdateGUI(CCore *Core);
|
||||
|
||||
int GetWidth() {return(Map.GetWidth());}
|
||||
int GetHeight() {return(Map.GetHeight());}
|
||||
void Resize(int Width,int Height);
|
||||
|
||||
|
||||
// Functions
|
||||
BOOL SetMode(int NewMode);
|
||||
|
@ -186,4 +186,22 @@ int Height=GetHeight();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
void CMap::Resize(int Width,int Height)
|
||||
{
|
||||
CMap Old=*this;
|
||||
|
||||
int OldWidth=Old.GetWidth();
|
||||
int OldHeight=Old.GetHeight();
|
||||
int MinW=min(Width,OldWidth);
|
||||
int MinH=min(Height,OldHeight);
|
||||
|
||||
Delete();
|
||||
SetSize(Width,Height,TRUE);
|
||||
for (int Y=0; Y<MinH; Y++)
|
||||
{
|
||||
for (int X=0; X<MinW; X++)
|
||||
{
|
||||
Set(X,Y,Old.Get(X,Y));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -44,6 +44,8 @@ public:
|
||||
void Set(int X,int Y,CMap &Blk);
|
||||
void Set(CMap &Src,int StartX,int StartY,int Width,int Height);
|
||||
|
||||
void Resize(int Width,int Height);
|
||||
|
||||
BOOL DoesContainTile(sMapElem &Tile);
|
||||
|
||||
inline void operator=(CMap &Src)
|
||||
|
@ -2,13 +2,13 @@
|
||||
|
||||
[General Info]
|
||||
Version=1
|
||||
LastClass=CMapEditDoc
|
||||
LastClass=CMapSizeDlg
|
||||
LastTemplate=CDialog
|
||||
NewFileInclude1=#include "stdafx.h"
|
||||
NewFileInclude2=#include "mapedit.h"
|
||||
LastPage=0
|
||||
|
||||
ClassCount=11
|
||||
ClassCount=12
|
||||
Class1=CChildFrame
|
||||
Class2=CGLEnabledView
|
||||
Class3=CMainFrame
|
||||
@ -17,20 +17,22 @@ Class5=CAboutDlg
|
||||
Class6=CMapEditDoc
|
||||
Class7=CMapEditView
|
||||
|
||||
ResourceCount=9
|
||||
Resource1=IDD_ABOUTBOX (English (U.S.))
|
||||
Resource2=IDR_TOOLBAR (English (U.S.))
|
||||
Resource3=IDD_TILESET_DIALOG
|
||||
ResourceCount=10
|
||||
Resource1=IDR_MAINFRAME (English (U.S.))
|
||||
Resource2=IDD_TILESET_DIALOG
|
||||
Resource3=IDD_LAYER_LIST_DIALOG
|
||||
Resource4=IDD_DIALOGBAR (English (U.S.))
|
||||
Resource5=IDR_MAPEDITYPE (English (U.S.))
|
||||
Class8=CMultiBar
|
||||
Resource6=IDD_LAYER_LIST_DIALOG
|
||||
Resource7=IDR_MAINFRAME (English (U.S.))
|
||||
Resource6=IDD_ABOUTBOX (English (U.S.))
|
||||
Resource7=IDR_TOOLBAR (English (U.S.))
|
||||
Class9=CLayerList
|
||||
Class10=CTileSetDlg
|
||||
Resource8=IDD_MULTIBAR (English (U.S.))
|
||||
Class11=CGfxToolBar
|
||||
Resource9=IDD_GFXTOOLBAR
|
||||
Class12=CMapSizeDlg
|
||||
Resource10=IDD_MAPSIZE
|
||||
|
||||
[CLS:CChildFrame]
|
||||
Type=0
|
||||
@ -70,14 +72,14 @@ Type=0
|
||||
BaseClass=CDocument
|
||||
HeaderFile=MapEditDoc.h
|
||||
ImplementationFile=MapEditDoc.cpp
|
||||
LastObject=CMapEditDoc
|
||||
LastObject=ID_MIRRORX
|
||||
|
||||
[CLS:CMapEditView]
|
||||
Type=0
|
||||
BaseClass=CGLEnabledView
|
||||
HeaderFile=MapEditView.h
|
||||
ImplementationFile=MapEditView.cpp
|
||||
LastObject=ID_ACTIVEBRUSH_RIGHT
|
||||
LastObject=CMapEditView
|
||||
Filter=C
|
||||
VirtualFilter=VWC
|
||||
|
||||
@ -126,18 +128,19 @@ Command10=ID_EDIT_COPY
|
||||
Command11=ID_EDIT_PASTE
|
||||
Command12=ID_VIEW_TOOLBAR
|
||||
Command13=ID_VIEW_STATUS_BAR
|
||||
Command14=ID_TOGGLE_GRID
|
||||
Command15=ID_TOGGLE_TILEVIEW
|
||||
Command14=ID_MAP_SETSIZE
|
||||
Command15=ID_TOGGLE_GRID
|
||||
Command16=ID_MIRRORX
|
||||
Command17=ID_MIRRORY
|
||||
Command18=ID_ACTIVEBRUSH_LEFT
|
||||
Command19=ID_ACTIVEBRUSH_RIGHT
|
||||
Command20=ID_WINDOW_NEW
|
||||
Command21=ID_WINDOW_CASCADE
|
||||
Command22=ID_WINDOW_TILE_HORZ
|
||||
Command23=ID_WINDOW_ARRANGE
|
||||
Command24=ID_APP_ABOUT
|
||||
CommandCount=24
|
||||
Command20=ID_TOGGLE_TILEVIEW
|
||||
Command21=ID_WINDOW_NEW
|
||||
Command22=ID_WINDOW_CASCADE
|
||||
Command23=ID_WINDOW_TILE_HORZ
|
||||
Command24=ID_WINDOW_ARRANGE
|
||||
Command25=ID_APP_ABOUT
|
||||
CommandCount=25
|
||||
|
||||
[ACL:IDR_MAINFRAME (English (U.S.))]
|
||||
Type=1
|
||||
@ -242,3 +245,23 @@ Control1=IDD_GFXTOOLBAR_PAINT,button,1342177344
|
||||
Control2=IDD_GFXTOOLBAR_SELECT,button,1476395072
|
||||
Control3=IDD_GFXTOOLBAR_PICKER,button,1476395072
|
||||
|
||||
[DLG:IDD_MAPSIZE]
|
||||
Type=1
|
||||
Class=CMapSizeDlg
|
||||
ControlCount=7
|
||||
Control1=IDOK,button,1342177281
|
||||
Control2=IDCANCEL,button,1342177280
|
||||
Control3=IDC_MAPSIZE_WIDTH_TEXT,static,1342308866
|
||||
Control4=IDC_MAPSIZE_WIDTH,edit,1350639744
|
||||
Control5=IDC_MAPSIZE_HEIGHT_TEXT,static,1342308866
|
||||
Control6=IDC_MAPSIZE_HEIGHT,edit,1350639744
|
||||
Control7=IDC_MAPSIZE_WARNING,static,1342308352
|
||||
|
||||
[CLS:CMapSizeDlg]
|
||||
Type=0
|
||||
HeaderFile=MapSizeDlg.h
|
||||
ImplementationFile=MapSizeDlg.cpp
|
||||
BaseClass=CDialog
|
||||
Filter=D
|
||||
VirtualFilter=dWC
|
||||
|
||||
|
@ -114,17 +114,20 @@ BEGIN
|
||||
END
|
||||
POPUP "&Map"
|
||||
BEGIN
|
||||
MENUITEM "Set Size", ID_MAP_SETSIZE
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "&Toggle Grid", ID_TOGGLE_GRID
|
||||
END
|
||||
POPUP "&TileBank"
|
||||
BEGIN
|
||||
MENUITEM "&Toggle TileView", ID_TOGGLE_TILEVIEW
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "Mirror &X", ID_MIRRORX
|
||||
MENUITEM "Mirror &Y", ID_MIRRORY
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "View Left Brush", ID_ACTIVEBRUSH_LEFT
|
||||
MENUITEM "View Right Brush", ID_ACTIVEBRUSH_RIGHT
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "&Toggle TileView", ID_TOGGLE_TILEVIEW
|
||||
END
|
||||
POPUP "&Window"
|
||||
BEGIN
|
||||
@ -473,6 +476,23 @@ BEGIN
|
||||
WS_DISABLED | NOT WS_TABSTOP
|
||||
END
|
||||
|
||||
IDD_MAPSIZE DIALOG DISCARDABLE 0, 0, 127, 61
|
||||
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION
|
||||
CAPTION "Enter New Size"
|
||||
FONT 8, "MS Sans Serif"
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "OK",IDOK,75,5,50,14,NOT WS_TABSTOP
|
||||
PUSHBUTTON "Cancel",IDCANCEL,75,20,50,14,NOT WS_TABSTOP
|
||||
RTEXT "Width",IDC_MAPSIZE_WIDTH_TEXT,5,5,20,10,SS_CENTERIMAGE
|
||||
EDITTEXT IDC_MAPSIZE_WIDTH,30,5,35,12,ES_AUTOHSCROLL | ES_NUMBER
|
||||
RTEXT "Height",IDC_MAPSIZE_HEIGHT_TEXT,5,20,20,10,
|
||||
SS_CENTERIMAGE
|
||||
EDITTEXT IDC_MAPSIZE_HEIGHT,30,20,35,12,ES_AUTOHSCROLL |
|
||||
ES_NUMBER
|
||||
LTEXT "Resize can destroy data.\nYou have been warned",
|
||||
IDC_MAPSIZE_WARNING,5,40,110,20
|
||||
END
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
@ -505,6 +525,14 @@ BEGIN
|
||||
TOPMARGIN, 7
|
||||
BOTTOMMARGIN, 19
|
||||
END
|
||||
|
||||
IDD_MAPSIZE, DIALOG
|
||||
BEGIN
|
||||
LEFTMARGIN, 7
|
||||
RIGHTMARGIN, 120
|
||||
TOPMARGIN, 7
|
||||
BOTTOMMARGIN, 54
|
||||
END
|
||||
END
|
||||
#endif // APSTUDIO_INVOKED
|
||||
|
||||
|
@ -5,6 +5,7 @@
|
||||
#include "MapEdit.h"
|
||||
|
||||
#include "MapEditDoc.h"
|
||||
#include "MapSizeDlg.h"
|
||||
|
||||
#ifdef _DEBUG
|
||||
#define new DEBUG_NEW
|
||||
@ -99,16 +100,9 @@ void CMapEditDoc::Render(CMapEditView *View)
|
||||
Core.Render(View);
|
||||
}
|
||||
|
||||
/*********************************************************************************/
|
||||
void CMapEditDoc::UpdateAll(CMapEditView *View)
|
||||
{
|
||||
Core.UpdateAll(View);
|
||||
}
|
||||
|
||||
/*********************************************************************************/
|
||||
void CMapEditDoc::OnStatusCursorXY(CCmdUI *pCmdUI)
|
||||
{
|
||||
|
||||
CPoint &XY=Core.GetCursorPos();
|
||||
CString XYStr;
|
||||
pCmdUI->Enable();
|
||||
@ -167,16 +161,16 @@ void CMapEditDoc::ToggleGrid(CMapEditView *View)
|
||||
}
|
||||
|
||||
/*********************************************************************************/
|
||||
void CMapEditDoc::MirrorX()
|
||||
void CMapEditDoc::MirrorX(CMapEditView *View)
|
||||
{
|
||||
Core.MirrorX();
|
||||
Core.MirrorX(View);
|
||||
theApp.GetMainWnd()->SetFocus(); // Put control back to Window :o)
|
||||
}
|
||||
|
||||
/*********************************************************************************/
|
||||
void CMapEditDoc::MirrorY()
|
||||
void CMapEditDoc::MirrorY(CMapEditView *View)
|
||||
{
|
||||
Core.MirrorY();
|
||||
Core.MirrorY(View);
|
||||
theApp.GetMainWnd()->SetFocus(); // Put control back to Window :o)
|
||||
}
|
||||
|
||||
@ -221,16 +215,26 @@ void CMapEditDoc::TileBankSet()
|
||||
}
|
||||
|
||||
/*********************************************************************************/
|
||||
void CMapEditDoc::ActiveBrushLeft()
|
||||
void CMapEditDoc::ActiveBrushLeft(CMapEditView *View)
|
||||
{
|
||||
Core.ActiveBrushLeft();
|
||||
UpdateAllViews(NULL);
|
||||
Core.ActiveBrushLeft(View);
|
||||
}
|
||||
|
||||
/*********************************************************************************/
|
||||
void CMapEditDoc::ActiveBrushRight()
|
||||
void CMapEditDoc::ActiveBrushRight(CMapEditView *View)
|
||||
{
|
||||
Core.ActiveBrushRight();
|
||||
UpdateAllViews(NULL);
|
||||
|
||||
Core.ActiveBrushRight(View);
|
||||
}
|
||||
|
||||
/*********************************************************************************/
|
||||
void CMapEditDoc::MapSetSize(CMapEditView *View)
|
||||
{
|
||||
CMapSizeDlg Dlg;
|
||||
|
||||
Dlg.m_Width=Core.GetMapWidth();
|
||||
Dlg.m_Height=Core.GetMapHeight();
|
||||
|
||||
if (Dlg.DoModal()!=IDOK) return;
|
||||
|
||||
Core.SetMapSize(View,Dlg.m_Width,Dlg.m_Height);
|
||||
}
|
||||
|
@ -31,10 +31,11 @@ public:
|
||||
void MouseMove(CMapEditView *View,UINT nFlags, CPoint &point);
|
||||
void ToggleTileView(CMapEditView *View);
|
||||
void ToggleGrid(CMapEditView *View);
|
||||
void MirrorX();
|
||||
void MirrorY();
|
||||
void ActiveBrushLeft();
|
||||
void ActiveBrushRight();
|
||||
void MirrorX(CMapEditView *View);
|
||||
void MirrorY(CMapEditView *View);
|
||||
void ActiveBrushLeft(CMapEditView *View);
|
||||
void ActiveBrushRight(CMapEditView *View);
|
||||
void MapSetSize(CMapEditView *View);
|
||||
|
||||
void TileBankLoad();
|
||||
void TileBankReload();
|
||||
|
@ -39,10 +39,11 @@ BEGIN_MESSAGE_MAP(CMapEditView, CGLEnabledView)
|
||||
ON_COMMAND(ID_TOOLBAR_GRID, OnToggleGrid)
|
||||
ON_COMMAND(ID_MIRRORX, OnMirrorx)
|
||||
ON_COMMAND(ID_MIRRORY, OnMirrory)
|
||||
ON_COMMAND(ID_TOOLBAR_TILEPALETTE, OnToggleTileview)
|
||||
ON_COMMAND(ID_TOGGLE_GRID, OnToggleGrid)
|
||||
ON_COMMAND(ID_ACTIVEBRUSH_LEFT, OnActivebrushLeft)
|
||||
ON_COMMAND(ID_ACTIVEBRUSH_RIGHT, OnActivebrushRight)
|
||||
ON_COMMAND(ID_TOOLBAR_TILEPALETTE, OnToggleTileview)
|
||||
ON_COMMAND(ID_TOGGLE_GRID, OnToggleGrid)
|
||||
ON_COMMAND(ID_MAP_SETSIZE, OnMapSetSize)
|
||||
//}}AFX_MSG_MAP
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
@ -142,7 +143,8 @@ void CMapEditView::OnSetFocus(CWnd* pOldWnd)
|
||||
CMapEditDoc *CurDoc=GetDocument();
|
||||
CGLEnabledView::OnSetFocus(pOldWnd);
|
||||
theApp.SetCurrent(CurDoc);
|
||||
CurDoc->UpdateAll(this);
|
||||
// CurDoc->UpdateAll(this);
|
||||
CurDoc->UpdateAllViews(this);
|
||||
}
|
||||
|
||||
/*********************************************************************************/
|
||||
@ -158,8 +160,10 @@ void CMapEditView::OnRButtonUp(UINT nFlags, CPoint point) {GetDocument()->RBu
|
||||
void CMapEditView::OnMouseMove(UINT nFlags, CPoint point) {GetDocument()->MouseMove(this,nFlags, point);}
|
||||
void CMapEditView::OnToggleTileview() {GetDocument()->ToggleTileView(this);}
|
||||
void CMapEditView::OnToggleGrid() {GetDocument()->ToggleGrid(this);}
|
||||
void CMapEditView::OnMirrorx() {GetDocument()->MirrorX();}
|
||||
void CMapEditView::OnMirrory() {GetDocument()->MirrorY();}
|
||||
void CMapEditView::OnMirrorx() {GetDocument()->MirrorX(this);}
|
||||
void CMapEditView::OnMirrory() {GetDocument()->MirrorY(this);}
|
||||
|
||||
void CMapEditView::OnActivebrushLeft() {GetDocument()->ActiveBrushLeft();}
|
||||
void CMapEditView::OnActivebrushRight() {GetDocument()->ActiveBrushRight();}
|
||||
void CMapEditView::OnActivebrushLeft() {GetDocument()->ActiveBrushLeft(this);}
|
||||
void CMapEditView::OnActivebrushRight() {GetDocument()->ActiveBrushRight(this);}
|
||||
|
||||
void CMapEditView::OnMapSetSize() {GetDocument()->MapSetSize(this);}
|
||||
|
@ -61,6 +61,7 @@ protected:
|
||||
afx_msg void OnMirrory();
|
||||
afx_msg void OnActivebrushLeft();
|
||||
afx_msg void OnActivebrushRight();
|
||||
afx_msg void OnMapSetSize();
|
||||
//}}AFX_MSG
|
||||
DECLARE_MESSAGE_MAP()
|
||||
};
|
||||
|
@ -16,6 +16,7 @@
|
||||
#define IDI_PICKER 154
|
||||
#define IDI_MIRRORY 165
|
||||
#define IDI_MIRRORX 166
|
||||
#define IDD_MAPSIZE 167
|
||||
#define IDC_TOOLBAR_COMBO 1018
|
||||
#define IDC_LAYER_LIST 1019
|
||||
#define IDC_TILESETDLG_BTN_UPDATE 1029
|
||||
@ -24,6 +25,11 @@
|
||||
#define IDC_TILESETDLG_BTN_LOAD 1031
|
||||
#define IDD_GFXTOOLBAR_SELECT 1032
|
||||
#define IDD_GFXTOOLBAR_PICKER 1033
|
||||
#define IDC_MAPSIZE_WIDTH 1037
|
||||
#define IDC_MAPSIZE_WIDTH_TEXT 1038
|
||||
#define IDC_MAPSIZE_HEIGHT_TEXT 1039
|
||||
#define IDC_MAPSIZE_HEIGHT 1040
|
||||
#define IDC_MAPSIZE_WARNING 1041
|
||||
#define ID_TOOLBAR_LAYERBAR 32773
|
||||
#define ID_TOOLBAR_TILEPALETTE 32774
|
||||
#define ID_TOOLBAR_COMBO 32777
|
||||
@ -36,6 +42,7 @@
|
||||
#define ID_MIRRORY 32789
|
||||
#define ID_ACTIVEBRUSH_LEFT 32790
|
||||
#define ID_ACTIVEBRUSH_RIGHT 32791
|
||||
#define ID_MAP_SETSIZE 32792
|
||||
#define ID_INDICATOR_CURSORXY 59142
|
||||
|
||||
// Next default values for new objects
|
||||
@ -43,9 +50,9 @@
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||
#define _APS_3D_CONTROLS 1
|
||||
#define _APS_NEXT_RESOURCE_VALUE 167
|
||||
#define _APS_NEXT_COMMAND_VALUE 32792
|
||||
#define _APS_NEXT_CONTROL_VALUE 1037
|
||||
#define _APS_NEXT_RESOURCE_VALUE 168
|
||||
#define _APS_NEXT_COMMAND_VALUE 32794
|
||||
#define _APS_NEXT_CONTROL_VALUE 1042
|
||||
#define _APS_NEXT_SYMED_VALUE 101
|
||||
#endif
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user