|
@ -52,8 +52,9 @@ CMultiBar *ParamBar=Frm->GetParamBar();
|
|||
// Add default parram bar items
|
||||
ParamBar->Add(Frm->GetLayerList(),IDD_LAYER_LIST_DIALOG,TRUE,TRUE);
|
||||
ParamBar->Add(Frm->GetTileSetDlg(),IDD_TILESET_DIALOG,TRUE,TRUE);
|
||||
Layers[ActiveLayer]->InitGUI(this);
|
||||
ParamBar->Update();
|
||||
UpdateParamBar();
|
||||
// Layers[ActiveLayer]->InitGUI(this);
|
||||
// ParamBar->Update();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -134,7 +135,6 @@ void CCore::SetMode(int NewMode)
|
|||
BOOL RedrawFlag=FALSE;
|
||||
|
||||
RedrawFlag=Layers[ActiveLayer]->SetMode(NewMode);
|
||||
|
||||
//if (RedrawFlag) View->Invalidate();
|
||||
}
|
||||
|
||||
|
@ -231,12 +231,25 @@ Vec &ThisCam=GetCam();
|
|||
/*****************************************************************************/
|
||||
/*** Layers ******************************************************************/
|
||||
/*****************************************************************************/
|
||||
void CCore::UpdateParamBar(CMapEditView *View,BOOL ViewFlag)
|
||||
void CCore::UpdateParamBar()
|
||||
{
|
||||
CMainFrame *Frm=(CMainFrame*)AfxGetApp()->GetMainWnd();
|
||||
CToolBar *ToolBar=Frm->GetToolBar();
|
||||
CMultiBar *ParamBar=Frm->GetParamBar();
|
||||
|
||||
ParamBar->RemoveAll();
|
||||
// Add default parram bar items
|
||||
if (TileViewFlag)
|
||||
{
|
||||
// TileBank.InitGUI(this);
|
||||
}
|
||||
else
|
||||
{
|
||||
Layers[ActiveLayer]->InitGUI(this);
|
||||
}
|
||||
|
||||
ParamBar->Update();
|
||||
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -271,6 +284,7 @@ CMultiBar *ParamBar=Frm->GetParamBar();
|
|||
if (Toggle) TileViewFlag=!TileViewFlag;
|
||||
ParamBar->RemoveAll();
|
||||
ToolBar->GetToolBarCtrl().PressButton(ID_TOOLBAR_TILEPALETTE,TileViewFlag);
|
||||
UpdateParamBar();
|
||||
UpdateView(View);
|
||||
}
|
||||
|
||||
|
@ -289,6 +303,7 @@ void CCore::TileBankReload()
|
|||
TexCache.Purge();
|
||||
UpdateView(NULL);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
void CCore::TileBankSet()
|
||||
{
|
||||
|
@ -298,6 +313,18 @@ CTileSetDlg *TileSetDlg=(CTileSetDlg*)Frm->GetDialog(IDD_TILESET_DIALOG);
|
|||
TileBank.SetCurrent(TileSetDlg->TileSetList.GetCurSel());
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
void CCore::MirrorX()
|
||||
{
|
||||
if (!TileViewFlag) Layers[ActiveLayer]->MirrorX();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
void CCore::MirrorY()
|
||||
{
|
||||
if (!TileViewFlag) Layers[ActiveLayer]->MirrorY();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/*** Misc ********************************************************************/
|
||||
/*****************************************************************************/
|
||||
|
|
|
@ -45,9 +45,11 @@ public:
|
|||
void TileBankLoad(char *Filename);
|
||||
void TileBankReload();
|
||||
void TileBankSet();
|
||||
void MirrorX();
|
||||
void MirrorY();
|
||||
|
||||
// Param Bar
|
||||
void UpdateParamBar(CMapEditView *View,BOOL ViewFlag);
|
||||
void UpdateParamBar();
|
||||
|
||||
// Layers
|
||||
void SetActiveLayer(int Layer);
|
||||
|
|
|
@ -57,6 +57,9 @@ virtual BOOL LButtonControl(CCore *Core,CMapEditView *View,UINT nFlags, CPoint
|
|||
virtual BOOL RButtonControl(CCore *Core,CMapEditView *View,UINT nFlags, CPoint &CursorPos,BOOL DownFlag)=0;
|
||||
virtual BOOL MouseMove(CCore *Core,CMapEditView *View,UINT nFlags, CPoint &CursorPos)=0;
|
||||
|
||||
virtual BOOL MirrorX(){return(FALSE);};
|
||||
virtual BOOL MirrorY(){return(FALSE);};
|
||||
|
||||
protected:
|
||||
|
||||
char Name[256];
|
||||
|
|
|
@ -32,7 +32,7 @@ CLayerTile::CLayerTile(char *_Name,int Width,int Height,float ZDiv,BOOL Is3d)
|
|||
ZPosDiv=ZDiv;
|
||||
Render3dFlag=Is3d;
|
||||
Mode=MouseModePaint;
|
||||
Flag=MouseFlagNone;
|
||||
Flag=0;
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -122,7 +122,7 @@ CTexCache &TexCache=Core->GetTexCache();
|
|||
|
||||
glLoadIdentity(); // Slow way, but good to go for the mo
|
||||
glTranslatef(StartX+XLoop,StartY-YLoop,CamPos.z);
|
||||
ThisTile.Render();
|
||||
ThisTile.Render(ThisElem.Flags);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -243,6 +243,32 @@ CMultiBar *ParamBar=Frm->GetParamBar();
|
|||
/*****************************************************************************/
|
||||
void CLayerTile::UpdateGUI(CCore *Core)
|
||||
{
|
||||
CMainFrame *Frm=(CMainFrame*)AfxGetApp()->GetMainWnd();
|
||||
CGfxToolBar *GfxDlg=(CGfxToolBar *)Frm->GetDialog(IDD_GFXTOOLBAR);
|
||||
|
||||
if (GfxDlg)
|
||||
{
|
||||
GfxDlg->ResetButtons();
|
||||
switch(Mode)
|
||||
{
|
||||
case MouseModeNone:
|
||||
break;
|
||||
case MouseModePaint:
|
||||
GfxDlg->SetButtonState(CGfxToolBar::PAINT,TRUE);
|
||||
break;
|
||||
case MouseModeSelect:
|
||||
GfxDlg->SetButtonState(CGfxToolBar::SELECT,TRUE);
|
||||
break;
|
||||
case MouseModePicker:
|
||||
GfxDlg->SetButtonState(CGfxToolBar::PICKER,TRUE);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
GfxDlg->SetButtonState(CGfxToolBar::MIRRORX,Flag & MouseFlagMirrorX);
|
||||
GfxDlg->SetButtonState(CGfxToolBar::MIRRORY,Flag & MouseFlagMirrorY);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -251,6 +277,7 @@ void CLayerTile::UpdateGUI(CCore *Core)
|
|||
BOOL CLayerTile::SetMode(int NewMode)
|
||||
{
|
||||
BOOL Ret=FALSE;
|
||||
|
||||
// Clean up last mode
|
||||
Ret|=ExitMode();
|
||||
Mode=(MouseMode)NewMode;
|
||||
|
@ -269,8 +296,6 @@ BOOL CLayerTile::InitMode()
|
|||
break;
|
||||
case MouseModeSelect:
|
||||
break;
|
||||
case MouseModeBlockSelect:
|
||||
break;
|
||||
case MouseModePicker:
|
||||
break;
|
||||
default:
|
||||
|
@ -290,8 +315,6 @@ BOOL CLayerTile::ExitMode()
|
|||
break;
|
||||
case MouseModeSelect:
|
||||
break;
|
||||
case MouseModeBlockSelect:
|
||||
break;
|
||||
case MouseModePicker:
|
||||
break;
|
||||
default:
|
||||
|
@ -300,6 +323,13 @@ BOOL CLayerTile::ExitMode()
|
|||
return(FALSE);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
BOOL CLayerTile::SetFlag(int NewFlag)
|
||||
{
|
||||
Flag^=NewFlag;
|
||||
return(TRUE);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
BOOL CLayerTile::LButtonControl(CCore *Core,CMapEditView *View,UINT nFlags, CPoint &CursorPos,BOOL DownFlag)
|
||||
{
|
||||
|
@ -316,8 +346,6 @@ CTileBank &TileBank=Core->GetTileBank();
|
|||
break;
|
||||
case MouseModeSelect:
|
||||
break;
|
||||
case MouseModeBlockSelect:
|
||||
break;
|
||||
case MouseModePicker:
|
||||
break;
|
||||
default:
|
||||
|
@ -342,8 +370,6 @@ CTileBank &TileBank=Core->GetTileBank();
|
|||
break;
|
||||
case MouseModeSelect:
|
||||
break;
|
||||
case MouseModeBlockSelect:
|
||||
break;
|
||||
case MouseModePicker:
|
||||
break;
|
||||
default:
|
||||
|
@ -371,8 +397,6 @@ CTileBank &TileBank=Core->GetTileBank();
|
|||
break;
|
||||
case MouseModeSelect:
|
||||
break;
|
||||
case MouseModeBlockSelect:
|
||||
break;
|
||||
case MouseModePicker:
|
||||
break;
|
||||
default:
|
||||
|
@ -382,11 +406,29 @@ CTileBank &TileBank=Core->GetTileBank();
|
|||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
BOOL CLayerTile::MirrorX()
|
||||
{
|
||||
SetFlag(MouseFlagMirrorX);
|
||||
return(TRUE);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
BOOL CLayerTile::MirrorY()
|
||||
{
|
||||
SetFlag(MouseFlagMirrorY);
|
||||
return(TRUE);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/*****************************************************************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
BOOL CLayerTile::Paint(sMapElem &Tile,CPoint &CursorPos)
|
||||
{
|
||||
if (CursorPos.y==-1 || CursorPos.y==-1) return(FALSE); // Off Map?
|
||||
if (Tile.Set==-1 || Tile.Tile==-1) return(FALSE); // Invalid tile?
|
||||
|
||||
Tile.Flags=Flag;
|
||||
Map.SetTile(CursorPos.x,CursorPos.y,Tile);
|
||||
|
||||
return(TRUE);
|
||||
|
|
|
@ -28,16 +28,14 @@ public:
|
|||
MouseModeNone=0,
|
||||
MouseModePaint,
|
||||
MouseModeSelect,
|
||||
MouseModeBlockSelect,
|
||||
MouseModePicker,
|
||||
MouseModeMirrorX,
|
||||
MouseModeMirrorY,
|
||||
// MouseModeMirrorX,
|
||||
// MouseModeMirrorY,
|
||||
};
|
||||
enum MouseFlag
|
||||
{
|
||||
MouseFlagNone=1<<0,
|
||||
MouseFlagMirrorX=1<<1,
|
||||
MouseFlagMirrorY=1<<2,
|
||||
MouseFlagMirrorX=1<<0,
|
||||
MouseFlagMirrorY=1<<1,
|
||||
};
|
||||
|
||||
CLayerTile(char *_Name,int Width,int Height,float ZDiv,BOOL Is3d); // New Layer
|
||||
|
@ -55,10 +53,15 @@ public:
|
|||
BOOL SetMode(int NewMode);
|
||||
BOOL InitMode();
|
||||
BOOL ExitMode();
|
||||
|
||||
BOOL SetFlag(int Flag);
|
||||
|
||||
BOOL LButtonControl(CCore *Core,CMapEditView *View,UINT nFlags, CPoint &point,BOOL DownFlag);
|
||||
BOOL RButtonControl(CCore *Core,CMapEditView *View,UINT nFlags, CPoint &point,BOOL DownFlag);
|
||||
BOOL MouseMove(CCore *Core,CMapEditView *View,UINT nFlags, CPoint &point);
|
||||
|
||||
BOOL MirrorX();
|
||||
BOOL MirrorY();
|
||||
|
||||
protected:
|
||||
void Render2d(CCore *Core,Vec &CamPos);
|
||||
|
|
|
@ -76,42 +76,6 @@ int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
|
|||
ToolBar.SetWindowText("ToolBar");
|
||||
ToolBar.EnableDocking(CBRS_ALIGN_ANY);
|
||||
DockControlBar(&ToolBar);
|
||||
/*
|
||||
#define SNAP_WIDTH 80 //the width of the combo box
|
||||
|
||||
//set up the ComboBox control as a snap mode select box
|
||||
//
|
||||
//First get the index of the placeholder's position in the toolbar
|
||||
int index = 0;
|
||||
RECT rect;
|
||||
while (ToolBar.GetItemID(index)!=ID_TOOLBAR_COMBO) index++;
|
||||
|
||||
//next convert that button to a seperator and get its position
|
||||
ToolBar.SetButtonInfo(index, ID_TOOLBAR_COMBO, TBBS_SEPARATOR, SNAP_WIDTH);
|
||||
ToolBar.GetItemRect(index, &rect);
|
||||
|
||||
//expand the rectangle to allow the combo box room to drop down
|
||||
rect.top+=2;
|
||||
rect.bottom += 200;
|
||||
|
||||
// then .Create the combo box and show it
|
||||
|
||||
if (!ToolBar.m_Combo.Create(WS_CHILD|WS_VISIBLE | CBS_AUTOHSCROLL | CBS_DROPDOWNLIST | CBS_HASSTRINGS ,rect, &ToolBar, IDC_TOOLBAR_COMBO))
|
||||
{
|
||||
TRACE0("Failed to create combo-box\n");
|
||||
return FALSE;
|
||||
}
|
||||
ToolBar.m_Combo.SetFont(ToolBar.GetFont()); // Set to nice font (not playskool font!!)
|
||||
ToolBar.m_Combo.ShowWindow(SW_SHOW);
|
||||
|
||||
//fill the combo box
|
||||
ToolBar.m_Combo.AddString("SNAP OFF");
|
||||
ToolBar.m_Combo.AddString("SNAP GRID");
|
||||
ToolBar.m_Combo.AddString("SNAP RASTER");
|
||||
ToolBar.m_Combo.AddString("SNAP VERTEX");
|
||||
ToolBar.m_Combo.AddString("SNAP LINE");
|
||||
ToolBar.m_Combo.SetCurSel(0);
|
||||
*/
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -24,13 +24,15 @@ void CMap::SetSize(int Width,int Height,BOOL Clear)
|
|||
if (Clear)
|
||||
{
|
||||
for (int Y=0;Y<Height;Y++)
|
||||
{
|
||||
for (int X=0;X<Width;X++)
|
||||
{
|
||||
Map[X][Y].Set=0;
|
||||
// Map[X][Y].Tile=(X+Y)%9;
|
||||
Map[X][Y].Flags=0;
|
||||
Map[X][Y].Tile=0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -14,6 +14,12 @@ struct sMapElem
|
|||
int Flags;
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
MapElemFlagMirrorX= 1<<0,
|
||||
MapElemFlagMirrorY= 1<<1,
|
||||
};
|
||||
|
||||
/*****************************************************************************/
|
||||
class CMap
|
||||
{
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
[General Info]
|
||||
Version=1
|
||||
LastClass=CTileSetDlg
|
||||
LastClass=CMapEditView
|
||||
LastTemplate=CDialog
|
||||
NewFileInclude1=#include "stdafx.h"
|
||||
NewFileInclude2=#include "mapedit.h"
|
||||
|
@ -19,16 +19,16 @@ Class7=CMapEditView
|
|||
|
||||
ResourceCount=9
|
||||
Resource1=IDD_TILESET_DIALOG
|
||||
Resource2=IDR_MAINFRAME (English (U.S.))
|
||||
Resource3=IDR_MAPEDITYPE (English (U.S.))
|
||||
Resource2=IDD_LAYER_LIST_DIALOG
|
||||
Resource3=IDD_MULTIBAR (English (U.S.))
|
||||
Resource4=IDD_DIALOGBAR (English (U.S.))
|
||||
Resource5=IDD_ABOUTBOX (English (U.S.))
|
||||
Resource5=IDR_TOOLBAR (English (U.S.))
|
||||
Class8=CMultiBar
|
||||
Resource6=IDD_LAYER_LIST_DIALOG
|
||||
Resource7=IDD_MULTIBAR (English (U.S.))
|
||||
Resource6=IDD_ABOUTBOX (English (U.S.))
|
||||
Resource7=IDR_MAPEDITYPE (English (U.S.))
|
||||
Class9=CLayerList
|
||||
Class10=CTileSetDlg
|
||||
Resource8=IDR_TOOLBAR (English (U.S.))
|
||||
Resource8=IDR_MAINFRAME (English (U.S.))
|
||||
Class11=CGfxToolBar
|
||||
Resource9=IDD_GFXTOOLBAR
|
||||
|
||||
|
@ -77,7 +77,7 @@ Type=0
|
|||
BaseClass=CGLEnabledView
|
||||
HeaderFile=MapEditView.h
|
||||
ImplementationFile=MapEditView.cpp
|
||||
LastObject=ID_TOOLBAR_GRID
|
||||
LastObject=ID_MIRRORY
|
||||
Filter=C
|
||||
VirtualFilter=VWC
|
||||
|
||||
|
@ -126,31 +126,38 @@ Command10=ID_EDIT_COPY
|
|||
Command11=ID_EDIT_PASTE
|
||||
Command12=ID_VIEW_TOOLBAR
|
||||
Command13=ID_VIEW_STATUS_BAR
|
||||
Command14=ID_WINDOW_NEW
|
||||
Command15=ID_WINDOW_CASCADE
|
||||
Command16=ID_WINDOW_TILE_HORZ
|
||||
Command17=ID_WINDOW_ARRANGE
|
||||
Command18=ID_APP_ABOUT
|
||||
CommandCount=18
|
||||
Command14=ID_TOGGLE_GRID
|
||||
Command15=ID_TOGGLE_TILEVIEW
|
||||
Command16=ID_MIRRORX
|
||||
Command17=ID_MIRRORY
|
||||
Command18=ID_WINDOW_NEW
|
||||
Command19=ID_WINDOW_CASCADE
|
||||
Command20=ID_WINDOW_TILE_HORZ
|
||||
Command21=ID_WINDOW_ARRANGE
|
||||
Command22=ID_APP_ABOUT
|
||||
CommandCount=22
|
||||
|
||||
[ACL:IDR_MAINFRAME (English (U.S.))]
|
||||
Type=1
|
||||
Class=?
|
||||
Command1=ID_FILE_NEW
|
||||
Command2=ID_FILE_OPEN
|
||||
Command3=ID_FILE_SAVE
|
||||
Command4=ID_FILE_PRINT
|
||||
Command5=ID_EDIT_UNDO
|
||||
Command6=ID_EDIT_CUT
|
||||
Command7=ID_EDIT_COPY
|
||||
Command8=ID_EDIT_PASTE
|
||||
Command9=ID_EDIT_UNDO
|
||||
Command10=ID_EDIT_CUT
|
||||
Command11=ID_EDIT_COPY
|
||||
Command12=ID_EDIT_PASTE
|
||||
Command13=ID_NEXT_PANE
|
||||
Command14=ID_PREV_PANE
|
||||
CommandCount=14
|
||||
Command1=ID_EDIT_COPY
|
||||
Command2=ID_TOGGLE_GRID
|
||||
Command3=ID_FILE_NEW
|
||||
Command4=ID_FILE_OPEN
|
||||
Command5=ID_FILE_SAVE
|
||||
Command6=ID_EDIT_PASTE
|
||||
Command7=ID_EDIT_UNDO
|
||||
Command8=ID_EDIT_CUT
|
||||
Command9=ID_EDIT_COPY
|
||||
Command10=ID_EDIT_PASTE
|
||||
Command11=ID_TOGGLE_TILEVIEW
|
||||
Command12=ID_NEXT_PANE
|
||||
Command13=ID_PREV_PANE
|
||||
Command14=ID_MIRRORX
|
||||
Command15=ID_EDIT_CUT
|
||||
Command16=ID_MIRRORY
|
||||
Command17=ID_EDIT_UNDO
|
||||
CommandCount=17
|
||||
|
||||
[DLG:IDD_ABOUTBOX (English (U.S.))]
|
||||
Type=1
|
||||
|
@ -212,7 +219,7 @@ ImplementationFile=TileSetDlg.cpp
|
|||
BaseClass=CDialog
|
||||
Filter=D
|
||||
VirtualFilter=dWC
|
||||
LastObject=IDC_TILESETDLG_BTN_LOAD
|
||||
LastObject=IDC_TILESETDLG_COMBO
|
||||
|
||||
[CLS:CGfxToolBar]
|
||||
Type=0
|
||||
|
@ -220,16 +227,16 @@ HeaderFile=GfxToolBar.h
|
|||
ImplementationFile=GfxToolBar.cpp
|
||||
BaseClass=CDialog
|
||||
Filter=D
|
||||
LastObject=IDD_GFXTOOLBAR_MIRRORX
|
||||
LastObject=CGfxToolBar
|
||||
VirtualFilter=dWC
|
||||
|
||||
[DLG:IDD_GFXTOOLBAR]
|
||||
Type=1
|
||||
Class=CGfxToolBar
|
||||
ControlCount=5
|
||||
Control1=IDD_GFXTOOLBAR_PAINT,button,1342242816
|
||||
Control2=IDD_GFXTOOLBAR_SELECT,button,1342242816
|
||||
Control3=IDD_GFXTOOLBAR_PICKER,button,1342242816
|
||||
Control4=IDD_GFXTOOLBAR_MIRRORX,button,1342242816
|
||||
Control5=IDD_GFXTOOLBAR_MIRRORY,button,1342242816
|
||||
Control1=IDD_GFXTOOLBAR_PAINT,button,1342177344
|
||||
Control2=IDD_GFXTOOLBAR_SELECT,button,1342177344
|
||||
Control3=IDD_GFXTOOLBAR_PICKER,button,1342177344
|
||||
Control4=IDD_GFXTOOLBAR_MIRRORX,button,1342177344
|
||||
Control5=IDD_GFXTOOLBAR_MIRRORY,button,1342177344
|
||||
|
||||
|
|
|
@ -97,7 +97,7 @@ BOOL CMapEditApp::InitInstance()
|
|||
ParseCommandLine(cmdInfo);
|
||||
// Prevent creating new doc on startup (should still open cmd line file tho)
|
||||
#ifndef _DEBUG
|
||||
if (cmdInfo.m_nShellCommand==CCommandLineInfo::FileNew) cmdInfo.m_nShellCommand=CCommandLineInfo::FileNothing;
|
||||
// if (cmdInfo.m_nShellCommand==CCommandLineInfo::FileNew) cmdInfo.m_nShellCommand=CCommandLineInfo::FileNothing;
|
||||
#endif
|
||||
// Dispatch commands specified on the command line
|
||||
if (!ProcessShellCommand(cmdInfo)) return FALSE;
|
||||
|
|
|
@ -112,6 +112,16 @@ BEGIN
|
|||
MENUITEM "&Toolbar", ID_VIEW_TOOLBAR
|
||||
MENUITEM "&Status Bar", ID_VIEW_STATUS_BAR
|
||||
END
|
||||
POPUP "&Map"
|
||||
BEGIN
|
||||
MENUITEM "&Toggle Grid", ID_TOGGLE_GRID
|
||||
END
|
||||
POPUP "&TileBank"
|
||||
BEGIN
|
||||
MENUITEM "&Toggle TileView", ID_TOGGLE_TILEVIEW
|
||||
MENUITEM "Mirror &X", ID_MIRRORX
|
||||
MENUITEM "Mirror &Y", ID_MIRRORY
|
||||
END
|
||||
POPUP "&Window"
|
||||
BEGIN
|
||||
MENUITEM "&New Window", ID_WINDOW_NEW
|
||||
|
@ -133,20 +143,24 @@ END
|
|||
|
||||
IDR_MAINFRAME ACCELERATORS PRELOAD MOVEABLE PURE
|
||||
BEGIN
|
||||
"N", ID_FILE_NEW, VIRTKEY, CONTROL
|
||||
"O", ID_FILE_OPEN, VIRTKEY, CONTROL
|
||||
"S", ID_FILE_SAVE, VIRTKEY, CONTROL
|
||||
"P", ID_FILE_PRINT, VIRTKEY, CONTROL
|
||||
"Z", ID_EDIT_UNDO, VIRTKEY, CONTROL
|
||||
"X", ID_EDIT_CUT, VIRTKEY, CONTROL
|
||||
"C", ID_EDIT_COPY, VIRTKEY, CONTROL
|
||||
"V", ID_EDIT_PASTE, VIRTKEY, CONTROL
|
||||
VK_BACK, ID_EDIT_UNDO, VIRTKEY, ALT
|
||||
VK_DELETE, ID_EDIT_CUT, VIRTKEY, SHIFT
|
||||
VK_INSERT, ID_EDIT_COPY, VIRTKEY, CONTROL
|
||||
VK_INSERT, ID_EDIT_PASTE, VIRTKEY, SHIFT
|
||||
VK_F6, ID_NEXT_PANE, VIRTKEY
|
||||
VK_F6, ID_PREV_PANE, VIRTKEY, SHIFT
|
||||
"C", ID_EDIT_COPY, VIRTKEY, CONTROL, NOINVERT
|
||||
"G", ID_TOGGLE_GRID, VIRTKEY, NOINVERT
|
||||
"N", ID_FILE_NEW, VIRTKEY, CONTROL, NOINVERT
|
||||
"O", ID_FILE_OPEN, VIRTKEY, CONTROL, NOINVERT
|
||||
"S", ID_FILE_SAVE, VIRTKEY, CONTROL, NOINVERT
|
||||
"V", ID_EDIT_PASTE, VIRTKEY, CONTROL, NOINVERT
|
||||
VK_BACK, ID_EDIT_UNDO, VIRTKEY, ALT, NOINVERT
|
||||
VK_DELETE, ID_EDIT_CUT, VIRTKEY, SHIFT, NOINVERT
|
||||
VK_INSERT, ID_EDIT_COPY, VIRTKEY, CONTROL, NOINVERT
|
||||
VK_INSERT, ID_EDIT_PASTE, VIRTKEY, SHIFT, NOINVERT
|
||||
VK_SPACE, ID_TOGGLE_TILEVIEW, VIRTKEY, NOINVERT
|
||||
VK_TAB, ID_NEXT_PANE, VIRTKEY, CONTROL, NOINVERT
|
||||
VK_TAB, ID_PREV_PANE, VIRTKEY, SHIFT, CONTROL,
|
||||
NOINVERT
|
||||
"X", ID_MIRRORX, VIRTKEY, NOINVERT
|
||||
"X", ID_EDIT_CUT, VIRTKEY, CONTROL, NOINVERT
|
||||
"Y", ID_MIRRORY, VIRTKEY, NOINVERT
|
||||
"Z", ID_EDIT_UNDO, VIRTKEY, CONTROL, NOINVERT
|
||||
END
|
||||
|
||||
|
||||
|
@ -385,6 +399,12 @@ BEGIN
|
|||
IDC_TOOLBAR_COMBO "TileSet Chooser\nWee Wee Wee"
|
||||
END
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
BEGIN
|
||||
ID_TOGGLE_TILEVIEW "Toggle TileView"
|
||||
ID_MAP_TOGGLEGRID "Toggle Grid On and Off"
|
||||
END
|
||||
|
||||
#endif // English (U.S.) resources
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
@ -408,8 +428,8 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_UK
|
|||
IDI_PAINT ICON DISCARDABLE "res\\paint.ico"
|
||||
IDI_SELECT ICON DISCARDABLE "res\\select.ico"
|
||||
IDI_PICKER ICON DISCARDABLE "res\\picker.ico"
|
||||
IDI_MIRRORX ICON DISCARDABLE "res\\mirrorx.ico"
|
||||
IDI_MIRRORY ICON DISCARDABLE "res\\mirrory.ico"
|
||||
IDI_MIRRORX ICON DISCARDABLE "res\\mirrorx.ico"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
|
@ -436,14 +456,19 @@ BEGIN
|
|||
END
|
||||
|
||||
IDD_GFXTOOLBAR DIALOG DISCARDABLE 0, 0, 156, 26
|
||||
STYLE WS_CHILD
|
||||
STYLE DS_CONTROL | WS_CHILD
|
||||
FONT 8, "MS Sans Serif"
|
||||
BEGIN
|
||||
PUSHBUTTON "P",IDD_GFXTOOLBAR_PAINT,5,5,15,15
|
||||
PUSHBUTTON "S",IDD_GFXTOOLBAR_SELECT,20,5,15,15
|
||||
PUSHBUTTON "Pk",IDD_GFXTOOLBAR_PICKER,35,5,15,15
|
||||
PUSHBUTTON "X",IDD_GFXTOOLBAR_MIRRORX,50,5,15,15
|
||||
PUSHBUTTON "Y",IDD_GFXTOOLBAR_MIRRORY,65,5,15,15
|
||||
PUSHBUTTON "P",IDD_GFXTOOLBAR_PAINT,5,5,15,15,BS_ICON | NOT
|
||||
WS_TABSTOP
|
||||
PUSHBUTTON "S",IDD_GFXTOOLBAR_SELECT,20,5,15,15,BS_ICON | NOT
|
||||
WS_TABSTOP
|
||||
PUSHBUTTON "Pk",IDD_GFXTOOLBAR_PICKER,35,5,15,15,BS_ICON | NOT
|
||||
WS_TABSTOP
|
||||
PUSHBUTTON "X",IDD_GFXTOOLBAR_MIRRORX,50,5,15,15,BS_ICON | NOT
|
||||
WS_TABSTOP
|
||||
PUSHBUTTON "Y",IDD_GFXTOOLBAR_MIRRORY,65,5,15,15,BS_ICON | NOT
|
||||
WS_TABSTOP
|
||||
END
|
||||
|
||||
|
||||
|
|
|
@ -156,18 +156,35 @@ void CMapEditDoc::ToggleTileView(CMapEditView *View)
|
|||
{
|
||||
Core.UpdateTileView(View,TRUE);
|
||||
Core.UpdateAll(View);
|
||||
theApp.GetMainWnd()->SetFocus(); // Put control back to Window :o)
|
||||
}
|
||||
|
||||
/*********************************************************************************/
|
||||
void CMapEditDoc::ToggleGrid(CMapEditView *View)
|
||||
{
|
||||
Core.UpdateGrid(View,TRUE);
|
||||
theApp.GetMainWnd()->SetFocus(); // Put control back to Window :o)
|
||||
}
|
||||
|
||||
/*********************************************************************************/
|
||||
void CMapEditDoc::MirrorX()
|
||||
{
|
||||
Core.MirrorX();
|
||||
theApp.GetMainWnd()->SetFocus(); // Put control back to Window :o)
|
||||
}
|
||||
|
||||
/*********************************************************************************/
|
||||
void CMapEditDoc::MirrorY()
|
||||
{
|
||||
Core.MirrorY();
|
||||
theApp.GetMainWnd()->SetFocus(); // Put control back to Window :o)
|
||||
}
|
||||
|
||||
/*********************************************************************************/
|
||||
void CMapEditDoc::SetMode(int NewMode)
|
||||
{
|
||||
Core.SetMode(NewMode);
|
||||
theApp.GetMainWnd()->SetFocus(); // Put control back to Window :o)
|
||||
}
|
||||
|
||||
/*********************************************************************************/
|
||||
|
@ -184,6 +201,7 @@ char Filename[256];
|
|||
sprintf(Filename,"%s",Dlg.GetPathName());
|
||||
Core.TileBankLoad(Filename);
|
||||
UpdateAllViews(NULL);
|
||||
theApp.GetMainWnd()->SetFocus(); // Put control back to Window :o)
|
||||
}
|
||||
|
||||
/*********************************************************************************/
|
||||
|
@ -191,7 +209,7 @@ void CMapEditDoc::TileBankReload()
|
|||
{
|
||||
Core.TileBankReload();
|
||||
UpdateAllViews(NULL);
|
||||
|
||||
theApp.GetMainWnd()->SetFocus(); // Put control back to Window :o)
|
||||
}
|
||||
|
||||
/*********************************************************************************/
|
||||
|
@ -199,5 +217,6 @@ void CMapEditDoc::TileBankSet()
|
|||
{
|
||||
Core.TileBankSet();
|
||||
UpdateAllViews(NULL);
|
||||
theApp.GetMainWnd()->SetFocus(); // Put control back to Window :o)
|
||||
}
|
||||
|
||||
|
|
|
@ -31,6 +31,8 @@ public:
|
|||
void MouseMove(CMapEditView *View,UINT nFlags, CPoint &point);
|
||||
void ToggleTileView(CMapEditView *View);
|
||||
void ToggleGrid(CMapEditView *View);
|
||||
void MirrorX();
|
||||
void MirrorY();
|
||||
|
||||
void TileBankLoad();
|
||||
void TileBankReload();
|
||||
|
|
|
@ -35,8 +35,12 @@ BEGIN_MESSAGE_MAP(CMapEditView, CGLEnabledView)
|
|||
ON_WM_RBUTTONDOWN()
|
||||
ON_WM_RBUTTONUP()
|
||||
ON_WM_MOUSEMOVE()
|
||||
ON_COMMAND(ID_TOOLBAR_TILEPALETTE, OnToolbarTilepalette)
|
||||
ON_COMMAND(ID_TOOLBAR_GRID, OnToolbarGrid)
|
||||
ON_COMMAND(ID_TOGGLE_TILEVIEW, OnToggleTileview)
|
||||
ON_COMMAND(ID_TOOLBAR_GRID, OnToggleGrid)
|
||||
ON_COMMAND(ID_TOOLBAR_TILEPALETTE, OnToggleTileview)
|
||||
ON_COMMAND(ID_TOGGLE_GRID, OnToggleGrid)
|
||||
ON_COMMAND(ID_MIRRORX, OnMirrorx)
|
||||
ON_COMMAND(ID_MIRRORY, OnMirrory)
|
||||
//}}AFX_MSG_MAP
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
|
@ -147,5 +151,7 @@ BOOL CMapEditView::OnMouseWheel(UINT nFlags, short zDelta, CPoint pt) {GetDocume
|
|||
void CMapEditView::OnRButtonDown(UINT nFlags, CPoint point) {GetDocument()->RButtonControl(this,nFlags,point,TRUE);}
|
||||
void CMapEditView::OnRButtonUp(UINT nFlags, CPoint point) {GetDocument()->RButtonControl(this,nFlags,point,FALSE);}
|
||||
void CMapEditView::OnMouseMove(UINT nFlags, CPoint point) {GetDocument()->MouseMove(this,nFlags, point);}
|
||||
void CMapEditView::OnToolbarTilepalette() {GetDocument()->ToggleTileView(this);}
|
||||
void CMapEditView::OnToolbarGrid() {GetDocument()->ToggleGrid(this);}
|
||||
void CMapEditView::OnToggleTileview() {GetDocument()->ToggleTileView(this);}
|
||||
void CMapEditView::OnToggleGrid() {GetDocument()->ToggleGrid(this);}
|
||||
void CMapEditView::OnMirrorx() {GetDocument()->MirrorX();}
|
||||
void CMapEditView::OnMirrory() {GetDocument()->MirrorY();}
|
||||
|
|
|
@ -55,8 +55,10 @@ protected:
|
|||
afx_msg void OnRButtonDown(UINT nFlags, CPoint point);
|
||||
afx_msg void OnRButtonUp(UINT nFlags, CPoint point);
|
||||
afx_msg void OnMouseMove(UINT nFlags, CPoint point);
|
||||
afx_msg void OnToolbarTilepalette();
|
||||
afx_msg void OnToolbarGrid();
|
||||
afx_msg void OnToggleTileview();
|
||||
afx_msg void OnToggleGrid();
|
||||
afx_msg void OnMirrorx();
|
||||
afx_msg void OnMirrory();
|
||||
//}}AFX_MSG
|
||||
DECLARE_MESSAGE_MAP()
|
||||
};
|
||||
|
|
|
@ -134,6 +134,8 @@ CMainFrame *Frm=(CMainFrame*)AfxGetApp()->GetMainWnd();
|
|||
CTileSetDlg *TileSetDlg=(CTileSetDlg*)Frm->GetDialog(IDD_TILESET_DIALOG);
|
||||
int ListSize=TileSet.size();
|
||||
|
||||
ASSERT(TileSetDlg);
|
||||
|
||||
TileSetDlg->TileSetList.ResetContent();
|
||||
if (ListSize)
|
||||
{
|
||||
|
@ -244,7 +246,6 @@ int TileID=0;
|
|||
|
||||
while(TileID!=ListSize)
|
||||
{
|
||||
CTile &ThisTile=Tile[TileID];
|
||||
int XPos=TileID%TileBrowserWidth;
|
||||
int YPos=TileID/TileBrowserWidth;
|
||||
|
||||
|
@ -254,8 +255,7 @@ int TileID=0;
|
|||
RenderMisc(TileID==LTile,TileID==RTile,TileID==CursorPos,GridFlag);
|
||||
|
||||
glColor3f(0.5,0.5,0.5);
|
||||
ThisTile.Render();
|
||||
|
||||
if (TileID) Tile[TileID].Render(0);
|
||||
|
||||
TileID++;
|
||||
}
|
||||
|
|
Before Width: | Height: | Size: 318 B After Width: | Height: | Size: 318 B |
Before Width: | Height: | Size: 318 B After Width: | Height: | Size: 318 B |
Before Width: | Height: | Size: 318 B After Width: | Height: | Size: 318 B |
Before Width: | Height: | Size: 318 B After Width: | Height: | Size: 318 B |
Before Width: | Height: | Size: 318 B After Width: | Height: | Size: 1.1 KiB |
|
@ -14,8 +14,8 @@
|
|||
#define IDI_PAINT 152
|
||||
#define IDI_SELECT 153
|
||||
#define IDI_PICKER 154
|
||||
#define IDI_MIRRORX 155
|
||||
#define IDI_MIRRORY 156
|
||||
#define IDI_MIRRORY 165
|
||||
#define IDI_MIRRORX 166
|
||||
#define IDC_TOOLBAR_COMBO 1018
|
||||
#define IDC_LAYER_LIST 1019
|
||||
#define IDC_TILESETDLG_BTN_UPDATE 1029
|
||||
|
@ -31,6 +31,11 @@
|
|||
#define ID_TOOLBAR_COMBO 32777
|
||||
#define ID_TOOLBAR_PARAMBAR 32783
|
||||
#define ID_TOOLBAR_GRID 32784
|
||||
#define ID_TOGGLE_TILEVIEW 32785
|
||||
#define ID_MAP_TOGGLEGRID 32786
|
||||
#define ID_TOGGLE_GRID 32787
|
||||
#define ID_MIRRORX 32788
|
||||
#define ID_MIRRORY 32789
|
||||
#define ID_INDICATOR_CURSORXY 59142
|
||||
|
||||
// Next default values for new objects
|
||||
|
@ -38,9 +43,9 @@
|
|||
#ifdef APSTUDIO_INVOKED
|
||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||
#define _APS_3D_CONTROLS 1
|
||||
#define _APS_NEXT_RESOURCE_VALUE 163
|
||||
#define _APS_NEXT_COMMAND_VALUE 32785
|
||||
#define _APS_NEXT_CONTROL_VALUE 1032
|
||||
#define _APS_NEXT_RESOURCE_VALUE 167
|
||||
#define _APS_NEXT_COMMAND_VALUE 32790
|
||||
#define _APS_NEXT_CONTROL_VALUE 1037
|
||||
#define _APS_NEXT_SYMED_VALUE 101
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -193,6 +193,7 @@ int Status=FALSE;
|
|||
glTexImage2D(GL_TEXTURE_2D, 0, 3, TextureImage[0]->sizeX, TextureImage[0]->sizeY, 0, GL_RGB, GL_UNSIGNED_BYTE, TextureImage[0]->data);
|
||||
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_LINEAR);
|
||||
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_LINEAR);
|
||||
glBindTexture(GL_TEXTURE_2D, 0);
|
||||
}
|
||||
|
||||
if (TextureImage[0]) // If Texture Exists
|
||||
|
|