This commit is contained in:
parent
5eddd7d792
commit
545a3d1304
19 changed files with 678 additions and 339 deletions
|
@ -19,7 +19,6 @@
|
||||||
#include "Layer.h"
|
#include "Layer.h"
|
||||||
#include "LayerTile.h"
|
#include "LayerTile.h"
|
||||||
|
|
||||||
BOOL Test3dFlag=TRUE;
|
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
@ -28,13 +27,18 @@ CCore::CCore()
|
||||||
{
|
{
|
||||||
for (int i=0; i<LAYER_TYPE_MAX; i++) Layers[i]=0;
|
for (int i=0; i<LAYER_TYPE_MAX; i++) Layers[i]=0;
|
||||||
|
|
||||||
RenderFlag=TRUE;
|
|
||||||
TileViewFlag=FALSE;
|
TileViewFlag=FALSE;
|
||||||
ParamViewFlag=TRUE;
|
GridFlag=TRUE;
|
||||||
CurrentMousePos=CPoint(0,0);
|
CurrentMousePos=CPoint(0,0);
|
||||||
ActiveLayer=0;
|
ActiveLayer=0;
|
||||||
MapCam=Vec(0,0,0);
|
MapCam=Vec(0,0,0);
|
||||||
TileCam=Vec(0,0,0);
|
TileCam=Vec(0,0,0);
|
||||||
|
Is3dFlag=TRUE;
|
||||||
|
|
||||||
|
CurrentTileBank=0;
|
||||||
|
MouseTileL.Bank=0; MouseTileL.Tile=1;
|
||||||
|
MouseTileR.Bank=0; MouseTileR.Tile=1;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -57,6 +61,11 @@ void CCore::NewMap()
|
||||||
MapCam=Vec(0,0,0);
|
MapCam=Vec(0,0,0);
|
||||||
TileCam=Vec(0,0,0);
|
TileCam=Vec(0,0,0);
|
||||||
TileBank.AddTileSet("c:/temp/3/test.gin");
|
TileBank.AddTileSet("c:/temp/3/test.gin");
|
||||||
|
// TileBank.AddTileSet("c:/temp/slope/slope.gin");
|
||||||
|
// TileBank.AddTileSet("c:/temp/2/2.gin");
|
||||||
|
// TileBank.AddTileSet("c:/temp/1/1.gin");
|
||||||
|
TileBank.AddTileSet("c:/temp/4/4.gin");
|
||||||
|
TileBank.AddTileSet("c:/temp/5/5.gin");
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
@ -67,41 +76,58 @@ void CCore::OpenMap()
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
void CCore::Render(CMapEditView *View)
|
void CCore::Render(CMapEditView *View,BOOL ForceRender)
|
||||||
{
|
{
|
||||||
|
|
||||||
Vec &ThisCam=GetCam();
|
|
||||||
|
|
||||||
if (TileBank.NeedLoad()) TileBank.LoadTileSets(this);
|
if (TileBank.NeedLoad()) TileBank.LoadTileSets(this);
|
||||||
|
|
||||||
|
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); // Clear Screen
|
||||||
if (RenderFlag)
|
if (TileViewFlag)
|
||||||
{
|
{
|
||||||
RenderFlag=FALSE;
|
RenderTileView(View);
|
||||||
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); // Clear Screen
|
}
|
||||||
if (GetTileView())
|
else
|
||||||
{
|
{
|
||||||
|
RenderLayers(View);
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
for (int i=0;i<LAYER_TYPE_MAX;i++)
|
|
||||||
{
|
|
||||||
Layers[i]->Render(this,ThisCam,Test3dFlag);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Layers[ActiveLayer]->RenderGrid(this,ThisCam);
|
|
||||||
}
|
}
|
||||||
// Calc CursorPos
|
|
||||||
Layers[ActiveLayer]->FindCursorPos(this,View,ThisCam,CurrentMousePos);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
void CCore::RenderLayers(CMapEditView *View)
|
||||||
|
{
|
||||||
|
Vec &ThisCam=GetCam();
|
||||||
|
|
||||||
|
for (int i=0;i<LAYER_TYPE_MAX;i++)
|
||||||
|
{
|
||||||
|
Layers[i]->Render(this,ThisCam,Is3dFlag);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (GridFlag) Layers[ActiveLayer]->RenderGrid(this,ThisCam);
|
||||||
|
|
||||||
|
// Get Cursor Pos
|
||||||
|
Layers[ActiveLayer]->FindCursorPos(this,View,GetCam(),CurrentMousePos);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
void CCore::RenderTileView(CMapEditView *View)
|
||||||
|
{
|
||||||
|
Vec &ThisCam=GetCam();
|
||||||
|
|
||||||
|
TileBank.RenderSet(this,ThisCam,Is3dFlag);
|
||||||
|
|
||||||
|
// Get Cursor Pos
|
||||||
|
TileBank.FindCursorPos(this,View,GetCam(),CurrentMousePos);
|
||||||
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/*** Control *****************************************************************/
|
/*** Control *****************************************************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
void CCore::LButtonControl(CMapEditView *View,UINT nFlags, CPoint &point,BOOL DownFlag)
|
void CCore::LButtonControl(CMapEditView *View,UINT nFlags, CPoint &point,BOOL DownFlag)
|
||||||
{
|
{
|
||||||
|
if (TileViewFlag)
|
||||||
|
TileBank.LButtonControl(this,View,nFlags,point,DownFlag);
|
||||||
|
else
|
||||||
|
;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
@ -113,6 +139,11 @@ void CCore::MButtonControl(CMapEditView *View,UINT nFlags, CPoint &point,BOOL Do
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
void CCore::RButtonControl(CMapEditView *View,UINT nFlags, CPoint &point,BOOL DownFlag)
|
void CCore::RButtonControl(CMapEditView *View,UINT nFlags, CPoint &point,BOOL DownFlag)
|
||||||
{
|
{
|
||||||
|
if (TileViewFlag)
|
||||||
|
TileBank.RButtonControl(this,View,nFlags,point,DownFlag);
|
||||||
|
else
|
||||||
|
;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
@ -168,7 +199,6 @@ Vec &ThisCam=GetCam();
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
void CCore::UpdateParamBar(CMapEditView *View,BOOL ViewFlag)
|
void CCore::UpdateParamBar(CMapEditView *View,BOOL ViewFlag)
|
||||||
{
|
{
|
||||||
|
|
||||||
CMainFrame *Frm=(CMainFrame*)AfxGetApp()->GetMainWnd();
|
CMainFrame *Frm=(CMainFrame*)AfxGetApp()->GetMainWnd();
|
||||||
CToolBar *ToolBar=Frm->GetToolBar();
|
CToolBar *ToolBar=Frm->GetToolBar();
|
||||||
CMultiBar *ParamBar=Frm->GetParamBar();
|
CMultiBar *ParamBar=Frm->GetParamBar();
|
||||||
|
@ -192,44 +222,69 @@ CMultiBar *ParamBar=Frm->GetParamBar();
|
||||||
// Dlg->SetCurSel(ActiveLayer);
|
// Dlg->SetCurSel(ActiveLayer);
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
ToolBar->GetToolBarCtrl().PressButton(ID_TOOLBAR_PARAMBAR,ParamViewFlag);
|
// ToolBar->GetToolBarCtrl().PressButton(ID_TOOLBAR_PARAMBAR,ParamViewFlag);
|
||||||
Frm->ShowControlBar(ParamBar, ParamViewFlag, FALSE);
|
// Frm->ShowControlBar(ParamBar, ParamViewFlag, FALSE);
|
||||||
ParamBar->ShowWindow(SW_SHOW);
|
// ParamBar->ShowWindow(SW_SHOW);
|
||||||
if (View) UpdateView(View);
|
// if (View) UpdateView(View);
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/*****************************************************************************/
|
|
||||||
void CCore::ToggleParamView(CMapEditView *View)
|
|
||||||
{
|
|
||||||
UpdateParamBar(View,!ParamViewFlag);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
void CCore::SetActiveLayer(int i)
|
void CCore::SetActiveLayer(int i)
|
||||||
{
|
{
|
||||||
UpdateParamBar(NULL,ParamViewFlag);
|
// UpdateParamBar(NULL,ParamViewFlag);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/*** TileBank ****************************************************************/
|
/*** Grid ********************************************************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/*****************************************************************************/
|
void CCore::UpdateGrid(CMapEditView *View,BOOL Toggle)
|
||||||
void CCore::UpdateTileView(CMapEditView *View,BOOL ViewFlag)
|
|
||||||
{
|
{
|
||||||
CMainFrame *Frm=(CMainFrame*)AfxGetApp()->GetMainWnd();
|
CMainFrame *Frm=(CMainFrame*)AfxGetApp()->GetMainWnd();
|
||||||
CToolBar *ToolBar=Frm->GetToolBar();
|
CToolBar *ToolBar=Frm->GetToolBar();
|
||||||
|
|
||||||
TileViewFlag=ViewFlag;
|
if (Toggle) GridFlag=!GridFlag;
|
||||||
|
|
||||||
|
ToolBar->GetToolBarCtrl().PressButton(ID_TOOLBAR_GRID,GridFlag);
|
||||||
|
UpdateView(View);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
/*** TileBank ****************************************************************/
|
||||||
|
/*****************************************************************************/
|
||||||
|
void CCore::UpdateTileView(CMapEditView *View,BOOL Toggle)
|
||||||
|
{
|
||||||
|
CMainFrame *Frm=(CMainFrame*)AfxGetApp()->GetMainWnd();
|
||||||
|
CToolBar *ToolBar=Frm->GetToolBar();
|
||||||
|
|
||||||
|
if (Toggle)
|
||||||
|
{
|
||||||
|
TileViewFlag=!TileViewFlag;
|
||||||
|
if (TileViewFlag)
|
||||||
|
TileBank.InitGUI(this);
|
||||||
|
else
|
||||||
|
Layers[ActiveLayer]->InitGUI(this);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
ToolBar->GetToolBarCtrl().PressButton(ID_TOOLBAR_TILEPALETTE,TileViewFlag);
|
ToolBar->GetToolBarCtrl().PressButton(ID_TOOLBAR_TILEPALETTE,TileViewFlag);
|
||||||
UpdateView(View);
|
UpdateView(View);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
void CCore::ToggleTileView(CMapEditView *View)
|
void CCore::ReloadTileBank()
|
||||||
{
|
{
|
||||||
UpdateTileView(View,!TileViewFlag);
|
TileBank.Reload();
|
||||||
|
TexCache.Purge();
|
||||||
|
UpdateView(NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
void CCore::ChangeTileBank()
|
||||||
|
{
|
||||||
|
CMainFrame *Frm=(CMainFrame*)AfxGetApp()->GetMainWnd();
|
||||||
|
CTileSetDlg *TileSetDlg=(CTileSetDlg*)Frm->GetDialog(IDD_TILESET_DIALOG);
|
||||||
|
|
||||||
|
CurrentTileBank=TileSetDlg->TileSetList.GetCurSel();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
@ -237,19 +292,24 @@ void CCore::ToggleTileView(CMapEditView *View)
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
Vec &CCore::GetCam()
|
Vec &CCore::GetCam()
|
||||||
{
|
{
|
||||||
if (GetTileView())
|
if (TileViewFlag)
|
||||||
return(TileCam);
|
return(TileCam);
|
||||||
else
|
else
|
||||||
return(MapCam);
|
return(MapCam);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
void CCore::UpdateAll(CMapEditView *View)
|
void CCore::UpdateAll(CMapEditView *View)
|
||||||
{
|
{
|
||||||
UpdateView(View);
|
UpdateView(View);
|
||||||
UpdateParamBar(View,ParamViewFlag);
|
UpdateGrid(View);
|
||||||
UpdateTileView(View,TileViewFlag);
|
|
||||||
|
if (TileViewFlag)
|
||||||
|
TileBank.UpdateGUI(this);
|
||||||
|
else
|
||||||
|
Layers[ActiveLayer]->UpdateGUI(this);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
@ -260,6 +320,5 @@ Vec &ThisCam=GetCam();
|
||||||
Ofs.y=-Ofs.y;
|
Ofs.y=-Ofs.y;
|
||||||
ThisCam+=Ofs;
|
ThisCam+=Ofs;
|
||||||
if (ThisCam.z>-1) ThisCam.z=-1;
|
if (ThisCam.z>-1) ThisCam.z=-1;
|
||||||
RenderFlag=TRUE;
|
if (View) View->Invalidate();
|
||||||
View->Invalidate();
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,7 +26,9 @@ public:
|
||||||
void Init();
|
void Init();
|
||||||
void NewMap();
|
void NewMap();
|
||||||
void OpenMap();
|
void OpenMap();
|
||||||
void Render(CMapEditView *View);
|
void Render(CMapEditView *View,BOOL ForceRender=FALSE);
|
||||||
|
void RenderLayers(CMapEditView *View);
|
||||||
|
void RenderTileView(CMapEditView *View);
|
||||||
|
|
||||||
// Control
|
// Control
|
||||||
void LButtonControl(CMapEditView *View,UINT nFlags, CPoint &point,BOOL DownFlag);
|
void LButtonControl(CMapEditView *View,UINT nFlags, CPoint &point,BOOL DownFlag);
|
||||||
|
@ -36,21 +38,29 @@ public:
|
||||||
void MouseMove(CMapEditView *View,UINT nFlags, CPoint &point);
|
void MouseMove(CMapEditView *View,UINT nFlags, CPoint &point);
|
||||||
|
|
||||||
// TileBank
|
// TileBank
|
||||||
void UpdateTileView(CMapEditView *View,BOOL ViewFlag);
|
void UpdateTileView(CMapEditView *View,BOOL Toggle=FALSE);
|
||||||
void ToggleTileView(CMapEditView *View);
|
|
||||||
BOOL GetTileView() {return(TileViewFlag);}
|
|
||||||
|
|
||||||
CTile GetTile(int Bank,int TileNo) {return(TileBank.GetTile(Bank,TileNo));}
|
CTile GetTile(int Bank,int TileNo) {return(TileBank.GetTile(Bank,TileNo));}
|
||||||
|
void ReloadTileBank();
|
||||||
|
void ChangeTileBank();
|
||||||
|
|
||||||
|
int GetCurrentTileBank() {return(CurrentTileBank);}
|
||||||
|
void SetCurrentTileBank(int Bnk) {CurrentTileBank=Bnk;}
|
||||||
|
sMapElem &GetMouseTileL() {return(MouseTileL);}
|
||||||
|
sMapElem &GetMouseTileR() {return(MouseTileR);}
|
||||||
|
|
||||||
// Param Bar
|
// Param Bar
|
||||||
void UpdateParamBar(CMapEditView *View,BOOL ViewFlag);
|
void UpdateParamBar(CMapEditView *View,BOOL ViewFlag);
|
||||||
void ToggleParamView(CMapEditView *View);
|
|
||||||
BOOL GetParamViewFlag() {return(ParamViewFlag);}
|
|
||||||
// Layers
|
// Layers
|
||||||
void SetActiveLayer(int Layer);
|
void SetActiveLayer(int Layer);
|
||||||
int GetActiveLayer() {return(ActiveLayer);}
|
int GetActiveLayer() {return(ActiveLayer);}
|
||||||
CLayer *GetLayer(int i) {return(Layers[i]);}
|
CLayer *GetLayer(int i) {return(Layers[i]);}
|
||||||
|
|
||||||
|
// Grid
|
||||||
|
void UpdateGrid(CMapEditView *View,BOOL Toggle=FALSE);
|
||||||
|
BOOL IsGridOn() {return(GridFlag);}
|
||||||
|
|
||||||
// Tex Cache
|
// Tex Cache
|
||||||
CTexCache &GetTexCache() {return(TexCache);}
|
CTexCache &GetTexCache() {return(TexCache);}
|
||||||
|
|
||||||
|
@ -61,6 +71,7 @@ public:
|
||||||
Vec &GetCam();
|
Vec &GetCam();
|
||||||
void SetCursorPos(CPoint &Pos) {CursorPos=Pos;}
|
void SetCursorPos(CPoint &Pos) {CursorPos=Pos;}
|
||||||
CPoint &GetCursorPos() {return(CursorPos);}
|
CPoint &GetCursorPos() {return(CursorPos);}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
CPoint CurrentMousePos,LastMousePos;
|
CPoint CurrentMousePos,LastMousePos;
|
||||||
CPoint CursorPos,LastCursorPos;
|
CPoint CursorPos,LastCursorPos;
|
||||||
|
@ -71,10 +82,12 @@ private:
|
||||||
|
|
||||||
CTileBank TileBank;
|
CTileBank TileBank;
|
||||||
CTexCache TexCache;
|
CTexCache TexCache;
|
||||||
|
int CurrentTileBank;
|
||||||
|
sMapElem MouseTileL,MouseTileR;
|
||||||
|
|
||||||
BOOL RenderFlag;
|
|
||||||
BOOL TileViewFlag;
|
BOOL TileViewFlag;
|
||||||
BOOL ParamViewFlag;
|
BOOL GridFlag;
|
||||||
|
BOOL Is3dFlag;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -41,10 +41,13 @@ virtual void SetName(char *_Name);
|
||||||
|
|
||||||
virtual float GetLayerZPosDiv() {return(ZPosDiv);}
|
virtual float GetLayerZPosDiv() {return(ZPosDiv);}
|
||||||
|
|
||||||
virtual void Render(CCore *Core,Vec &MapPos,BOOL Is3d)=0;
|
virtual void Render(CCore *Core,Vec &CamPos,BOOL Is3d)=0;
|
||||||
virtual void RenderGrid(CCore *Core,Vec &MapPos)=0;
|
virtual void RenderGrid(CCore *Core,Vec &CamPos)=0;
|
||||||
|
|
||||||
virtual void FindCursorPos(CCore *Core,CMapEditView *View,Vec &MapPos,CPoint &MousePos)=0;
|
virtual void FindCursorPos(CCore *Core,CMapEditView *View,Vec &CamPos,CPoint &MousePos)=0;
|
||||||
|
|
||||||
|
virtual void InitGUI(CCore *Core)=0;
|
||||||
|
virtual void UpdateGUI(CCore *Core)=0;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
char Name[256];
|
char Name[256];
|
||||||
|
|
|
@ -10,8 +10,10 @@
|
||||||
#include <gl\glut.h>
|
#include <gl\glut.h>
|
||||||
#include "GLEnabledView.h"
|
#include "GLEnabledView.h"
|
||||||
|
|
||||||
|
#include "MapEdit.h"
|
||||||
#include "MapEditDoc.h"
|
#include "MapEditDoc.h"
|
||||||
#include "MapEditView.h"
|
#include "MapEditView.h"
|
||||||
|
#include "MainFrm.h"
|
||||||
|
|
||||||
#include "Core.h"
|
#include "Core.h"
|
||||||
#include "Layer.h"
|
#include "Layer.h"
|
||||||
|
@ -46,29 +48,29 @@ CLayerTile::~CLayerTile()
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
void CLayerTile::Render(CCore *Core,Vec &MapPos,BOOL Is3d)
|
void CLayerTile::Render(CCore *Core,Vec &CamPos,BOOL Is3d)
|
||||||
{
|
{
|
||||||
if (Is3d && Render3dFlag)
|
if (Is3d && Render3dFlag)
|
||||||
{
|
{
|
||||||
glEnable(GL_DEPTH_TEST);
|
glEnable(GL_DEPTH_TEST);
|
||||||
Render3d(Core,MapPos);
|
Render3d(Core,CamPos);
|
||||||
glDisable(GL_DEPTH_TEST);
|
glDisable(GL_DEPTH_TEST);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Render2d(Core,MapPos);
|
Render2d(Core,CamPos);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
void CLayerTile::Render2d(CCore *Core,Vec &MapPos)
|
void CLayerTile::Render2d(CCore *Core,Vec &CamPos)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
float XYDiv=GetLayerZPosDiv();
|
float XYDiv=GetLayerZPosDiv();
|
||||||
int MapW=Map.GetWidth();
|
int MapW=Map.GetWidth();
|
||||||
int MapH=Map.GetHeight();
|
int MapH=Map.GetHeight();
|
||||||
float StartX=MapPos.x/XYDiv;
|
float StartX=CamPos.x/XYDiv;
|
||||||
float StartY=MapPos.y/XYDiv;
|
float StartY=CamPos.y/XYDiv;
|
||||||
CTexCache &TexCache=Core->GetTexCache();
|
CTexCache &TexCache=Core->GetTexCache();
|
||||||
|
|
||||||
glColor3f(0.5,0.5,0.5);
|
glColor3f(0.5,0.5,0.5);
|
||||||
|
@ -82,7 +84,7 @@ CTexCache &TexCache=Core->GetTexCache();
|
||||||
CTile &ThisTile=Core->GetTile(ThisElem.Bank,ThisElem.Tile);
|
CTile &ThisTile=Core->GetTile(ThisElem.Bank,ThisElem.Tile);
|
||||||
|
|
||||||
glLoadIdentity(); // Slow way, but good to go for the mo
|
glLoadIdentity(); // Slow way, but good to go for the mo
|
||||||
glTranslatef(StartX+XLoop,StartY-YLoop,MapPos.z);
|
glTranslatef(StartX+XLoop,StartY-YLoop,CamPos.z);
|
||||||
// ThisTile.Render();
|
// ThisTile.Render();
|
||||||
int c=(XLoop+YLoop)&1;
|
int c=(XLoop+YLoop)&1;
|
||||||
glColor3f(c,1,1);
|
glColor3f(c,1,1);
|
||||||
|
@ -95,13 +97,13 @@ int c=(XLoop+YLoop)&1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
void CLayerTile::Render3d(CCore *Core,Vec &MapPos)
|
void CLayerTile::Render3d(CCore *Core,Vec &CamPos)
|
||||||
{
|
{
|
||||||
float XYDiv=GetLayerZPosDiv();
|
float XYDiv=GetLayerZPosDiv();
|
||||||
int MapW=Map.GetWidth();
|
int MapW=Map.GetWidth();
|
||||||
int MapH=Map.GetHeight();
|
int MapH=Map.GetHeight();
|
||||||
float StartX=MapPos.x/XYDiv;
|
float StartX=CamPos.x/XYDiv;
|
||||||
float StartY=MapPos.y/XYDiv;
|
float StartY=CamPos.y/XYDiv;
|
||||||
CTexCache &TexCache=Core->GetTexCache();
|
CTexCache &TexCache=Core->GetTexCache();
|
||||||
|
|
||||||
glColor3f(0.5,0.5,0.5);
|
glColor3f(0.5,0.5,0.5);
|
||||||
|
@ -115,7 +117,7 @@ CTexCache &TexCache=Core->GetTexCache();
|
||||||
CTile &ThisTile=Core->GetTile(ThisElem.Bank,ThisElem.Tile);
|
CTile &ThisTile=Core->GetTile(ThisElem.Bank,ThisElem.Tile);
|
||||||
|
|
||||||
glLoadIdentity(); // Slow way, but good to go for the mo
|
glLoadIdentity(); // Slow way, but good to go for the mo
|
||||||
glTranslatef(StartX+XLoop,StartY-YLoop,MapPos.z);
|
glTranslatef(StartX+XLoop,StartY-YLoop,CamPos.z);
|
||||||
ThisTile.Render();
|
ThisTile.Render();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -123,18 +125,18 @@ CTexCache &TexCache=Core->GetTexCache();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
void CLayerTile::RenderGrid(CCore *Core,Vec &MapPos)
|
void CLayerTile::RenderGrid(CCore *Core,Vec &CamPos)
|
||||||
{
|
{
|
||||||
float XYDiv=GetLayerZPosDiv();
|
float XYDiv=GetLayerZPosDiv();
|
||||||
int MapW=Map.GetWidth();
|
int MapW=Map.GetWidth();
|
||||||
int MapH=Map.GetHeight();
|
int MapH=Map.GetHeight();
|
||||||
float StartX=MapPos.x/XYDiv;
|
float StartX=CamPos.x/XYDiv;
|
||||||
float StartY=MapPos.y/XYDiv;
|
float StartY=CamPos.y/XYDiv;
|
||||||
float OverVal=0.5;
|
float OverVal=0.5;
|
||||||
|
|
||||||
glMatrixMode(GL_MODELVIEW);
|
glMatrixMode(GL_MODELVIEW);
|
||||||
glLoadIdentity();
|
glLoadIdentity();
|
||||||
glTranslatef(StartX,StartY,MapPos.z);
|
glTranslatef(StartX,StartY,CamPos.z);
|
||||||
glDisable(GL_TEXTURE_2D);
|
glDisable(GL_TEXTURE_2D);
|
||||||
|
|
||||||
glBegin(GL_LINES);
|
glBegin(GL_LINES);
|
||||||
|
@ -158,7 +160,7 @@ float OverVal=0.5;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
void CLayerTile::FindCursorPos(CCore *Core,CMapEditView *View,Vec &MapPos,CPoint &MousePos)
|
void CLayerTile::FindCursorPos(CCore *Core,CMapEditView *View,Vec &CamPos,CPoint &MousePos)
|
||||||
{
|
{
|
||||||
GLint Viewport[4];
|
GLint Viewport[4];
|
||||||
GLuint SelectBuffer[SELECT_BUFFER_SIZE];
|
GLuint SelectBuffer[SELECT_BUFFER_SIZE];
|
||||||
|
@ -169,8 +171,8 @@ CPoint &CursorPos=Core->GetCursorPos();
|
||||||
float XYDiv=GetLayerZPosDiv();
|
float XYDiv=GetLayerZPosDiv();
|
||||||
int MapW=Map.GetWidth();
|
int MapW=Map.GetWidth();
|
||||||
int MapH=Map.GetHeight();
|
int MapH=Map.GetHeight();
|
||||||
float StartX=MapPos.x/XYDiv;
|
float StartX=CamPos.x/XYDiv;
|
||||||
float StartY=MapPos.y/XYDiv;
|
float StartY=CamPos.y/XYDiv;
|
||||||
|
|
||||||
|
|
||||||
glGetIntegerv(GL_VIEWPORT, Viewport);
|
glGetIntegerv(GL_VIEWPORT, Viewport);
|
||||||
|
@ -188,7 +190,7 @@ float StartY=MapPos.y/XYDiv;
|
||||||
|
|
||||||
glMatrixMode(GL_MODELVIEW);
|
glMatrixMode(GL_MODELVIEW);
|
||||||
glLoadIdentity();
|
glLoadIdentity();
|
||||||
glTranslatef(StartX,StartY,MapPos.z);
|
glTranslatef(StartX,StartY,CamPos.z);
|
||||||
|
|
||||||
for (int YLoop=0; YLoop<MapH; YLoop++)
|
for (int YLoop=0; YLoop<MapH; YLoop++)
|
||||||
{
|
{
|
||||||
|
@ -221,3 +223,20 @@ GLuint *HitPtr=SelectBuffer;
|
||||||
glMatrixMode(GL_MODELVIEW); // <-- Prevent arse GL assert
|
glMatrixMode(GL_MODELVIEW); // <-- Prevent arse GL assert
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
/*** Gui *********************************************************************/
|
||||||
|
/*****************************************************************************/
|
||||||
|
void CLayerTile::InitGUI(CCore *Core)
|
||||||
|
{
|
||||||
|
CMainFrame *Frm=(CMainFrame*)AfxGetApp()->GetMainWnd();
|
||||||
|
CMultiBar *ParamBar=Frm->GetParamBar();
|
||||||
|
|
||||||
|
ParamBar->RemoveAll();
|
||||||
|
ParamBar->Update();
|
||||||
|
}
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
void CLayerTile::UpdateGUI(CCore *Core)
|
||||||
|
{
|
||||||
|
}
|
|
@ -25,13 +25,16 @@ public:
|
||||||
CLayerTile(char *_Name); // Load Layer
|
CLayerTile(char *_Name); // Load Layer
|
||||||
~CLayerTile();
|
~CLayerTile();
|
||||||
|
|
||||||
void Render(CCore *Core,Vec &MapPos,BOOL Is3d);
|
void Render(CCore *Core,Vec &CamPos,BOOL Is3d);
|
||||||
void RenderGrid(CCore *Core,Vec &MapPos);
|
void RenderGrid(CCore *Core,Vec &CamPos);
|
||||||
void FindCursorPos(CCore *Core,CMapEditView *View,Vec &MapPos,CPoint &MousePos);
|
void FindCursorPos(CCore *Core,CMapEditView *View,Vec &CamPos,CPoint &MousePos);
|
||||||
|
|
||||||
|
void InitGUI(CCore *Core);
|
||||||
|
void UpdateGUI(CCore *Core);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void Render2d(CCore *Core,Vec &MapPos);
|
void Render2d(CCore *Core,Vec &CamPos);
|
||||||
void Render3d(CCore *Core,Vec &MapPos);
|
void Render3d(CCore *Core,Vec &CamPos);
|
||||||
|
|
||||||
CMap Map;
|
CMap Map;
|
||||||
|
|
||||||
|
|
|
@ -50,39 +50,36 @@ int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
|
||||||
EnableDocking(CBRS_ALIGN_ANY);
|
EnableDocking(CBRS_ALIGN_ANY);
|
||||||
|
|
||||||
// Status Bar
|
// Status Bar
|
||||||
if (!m_wndStatusBar.Create(this) || !m_wndStatusBar.SetIndicators(indicators,sizeof(indicators)/sizeof(UINT)))
|
if (!StatusBar.Create(this) || !StatusBar.SetIndicators(indicators,sizeof(indicators)/sizeof(UINT)))
|
||||||
{
|
{
|
||||||
TRACE0("Failed to create status bar\n");
|
TRACE0("Failed to create status bar\n");
|
||||||
return -1; // fail to create
|
return -1; // fail to create
|
||||||
}
|
}
|
||||||
|
|
||||||
// ParamBar
|
// ParamBar
|
||||||
if (!m_wndParamBar.Create(this,IDD_PARAMBAR,(CBRS_LEFT | CBRS_SIZE_DYNAMIC),IDD_PARAMBAR))
|
if (!ParamBar.Create(this,IDD_PARAMBAR,(CBRS_LEFT | CBRS_SIZE_DYNAMIC),IDD_PARAMBAR))
|
||||||
{
|
{
|
||||||
TRACE0("Failed to create ParamBar\n");
|
TRACE0("Failed to create ParamBar\n");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_wndParamBar.EnableDocking( CBRS_ALIGN_ANY);
|
ParamBar.EnableDocking( CBRS_ALIGN_ANY);
|
||||||
m_wndParamBar.SetWindowText("Param");
|
ParamBar.SetWindowText("Param");
|
||||||
DockControlBar(&m_wndParamBar);
|
DockControlBar(&ParamBar);
|
||||||
|
|
||||||
// Test1.Create(IDD_TEST1,NULL);
|
ParamBar.Add(LayerList,IDD_LAYER_LIST_DIALOG,TRUE,TRUE); // Add default parram bar item
|
||||||
m_wndParamBar.AddDialog(LayerList,IDD_LAYER_LIST_DIALOG,TRUE);
|
|
||||||
m_wndParamBar.AddDialog(Test1,IDD_TEST1,TRUE);
|
|
||||||
m_wndParamBar.AddDialog(Test2,IDD_TEST2,TRUE);
|
|
||||||
|
|
||||||
|
|
||||||
// ToolBar (plus extra code for extra controls!!)
|
// ToolBar (plus extra code for extra controls!!)
|
||||||
if (!m_wndToolBar.CreateEx(this, TBSTYLE_FLAT, WS_CHILD | WS_VISIBLE | CBRS_TOP | CBRS_GRIPPER | CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC) || !m_wndToolBar.LoadToolBar(IDR_MAINFRAME))
|
if (!ToolBar.CreateEx(this, TBSTYLE_FLAT, WS_CHILD | WS_VISIBLE | CBRS_TOP | CBRS_GRIPPER | CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC) || !ToolBar.LoadToolBar(IDR_MAINFRAME))
|
||||||
{
|
{
|
||||||
TRACE0("Failed to create toolbar\n");
|
TRACE0("Failed to create toolbar\n");
|
||||||
return -1; // fail to create
|
return -1; // fail to create
|
||||||
}
|
}
|
||||||
m_wndToolBar.SetWindowText("ToolBar");
|
ToolBar.SetWindowText("ToolBar");
|
||||||
m_wndToolBar.EnableDocking(CBRS_ALIGN_ANY);
|
ToolBar.EnableDocking(CBRS_ALIGN_ANY);
|
||||||
DockControlBar(&m_wndToolBar);
|
DockControlBar(&ToolBar);
|
||||||
|
/*
|
||||||
#define SNAP_WIDTH 80 //the width of the combo box
|
#define SNAP_WIDTH 80 //the width of the combo box
|
||||||
|
|
||||||
//set up the ComboBox control as a snap mode select box
|
//set up the ComboBox control as a snap mode select box
|
||||||
|
@ -90,11 +87,11 @@ int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
|
||||||
//First get the index of the placeholder's position in the toolbar
|
//First get the index of the placeholder's position in the toolbar
|
||||||
int index = 0;
|
int index = 0;
|
||||||
RECT rect;
|
RECT rect;
|
||||||
while (m_wndToolBar.GetItemID(index)!=ID_TOOLBAR_COMBO) index++;
|
while (ToolBar.GetItemID(index)!=ID_TOOLBAR_COMBO) index++;
|
||||||
|
|
||||||
//next convert that button to a seperator and get its position
|
//next convert that button to a seperator and get its position
|
||||||
m_wndToolBar.SetButtonInfo(index, ID_TOOLBAR_COMBO, TBBS_SEPARATOR, SNAP_WIDTH);
|
ToolBar.SetButtonInfo(index, ID_TOOLBAR_COMBO, TBBS_SEPARATOR, SNAP_WIDTH);
|
||||||
m_wndToolBar.GetItemRect(index, &rect);
|
ToolBar.GetItemRect(index, &rect);
|
||||||
|
|
||||||
//expand the rectangle to allow the combo box room to drop down
|
//expand the rectangle to allow the combo box room to drop down
|
||||||
rect.top+=2;
|
rect.top+=2;
|
||||||
|
@ -102,22 +99,22 @@ RECT rect;
|
||||||
|
|
||||||
// then .Create the combo box and show it
|
// then .Create the combo box and show it
|
||||||
|
|
||||||
if (!m_wndToolBar.m_Combo.Create(WS_CHILD|WS_VISIBLE | CBS_AUTOHSCROLL | CBS_DROPDOWNLIST | CBS_HASSTRINGS ,rect, &m_wndToolBar, IDC_TOOLBAR_COMBO))
|
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");
|
TRACE0("Failed to create combo-box\n");
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
m_wndToolBar.m_Combo.SetFont(m_wndToolBar.GetFont()); // Set to nice font (not playskool font!!)
|
ToolBar.m_Combo.SetFont(ToolBar.GetFont()); // Set to nice font (not playskool font!!)
|
||||||
m_wndToolBar.m_Combo.ShowWindow(SW_SHOW);
|
ToolBar.m_Combo.ShowWindow(SW_SHOW);
|
||||||
|
|
||||||
//fill the combo box
|
//fill the combo box
|
||||||
m_wndToolBar.m_Combo.AddString("SNAP OFF");
|
ToolBar.m_Combo.AddString("SNAP OFF");
|
||||||
m_wndToolBar.m_Combo.AddString("SNAP GRID");
|
ToolBar.m_Combo.AddString("SNAP GRID");
|
||||||
m_wndToolBar.m_Combo.AddString("SNAP RASTER");
|
ToolBar.m_Combo.AddString("SNAP RASTER");
|
||||||
m_wndToolBar.m_Combo.AddString("SNAP VERTEX");
|
ToolBar.m_Combo.AddString("SNAP VERTEX");
|
||||||
m_wndToolBar.m_Combo.AddString("SNAP LINE");
|
ToolBar.m_Combo.AddString("SNAP LINE");
|
||||||
m_wndToolBar.m_Combo.SetCurSel(0);
|
ToolBar.m_Combo.SetCurSel(0);
|
||||||
|
*/
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -151,5 +148,6 @@ void CMainFrame::Dump(CDumpContext& dc) const
|
||||||
// CMainFrame message handlers
|
// CMainFrame message handlers
|
||||||
|
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
|
|
||||||
#include "MultiBar.h"
|
#include "MultiBar.h"
|
||||||
#include "LayerList.h"
|
#include "LayerList.h"
|
||||||
|
#include "TileSetDlg.h"
|
||||||
|
|
||||||
#if _MSC_VER > 1000
|
#if _MSC_VER > 1000
|
||||||
#pragma once
|
#pragma once
|
||||||
|
@ -30,9 +31,15 @@ public:
|
||||||
|
|
||||||
// Attributes
|
// Attributes
|
||||||
public:
|
public:
|
||||||
CStatusBar *GetStatusBar() {return(&m_wndStatusBar);}
|
CStatusBar *GetStatusBar() {return(&StatusBar);}
|
||||||
CMainToolBar *GetToolBar() {return(&m_wndToolBar);}
|
CMainToolBar *GetToolBar() {return(&ToolBar);}
|
||||||
CMultiBar *GetParamBar() {return(&m_wndParamBar);}
|
CDialog *GetDialog(int ID) {return(ParamBar.GetDialog(ID));}
|
||||||
|
|
||||||
|
// Param Bar
|
||||||
|
CMultiBar *GetParamBar() {return(&ParamBar);}
|
||||||
|
CDialog &GetLayerList() {return(LayerList);}
|
||||||
|
CDialog &GetTileSetDlg() {return(TileSetDlg);}
|
||||||
|
|
||||||
// Operations
|
// Operations
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
@ -51,14 +58,13 @@ public:
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
protected: // control bar embedded members
|
protected: // control bar embedded members
|
||||||
CStatusBar m_wndStatusBar;
|
CStatusBar StatusBar;
|
||||||
CMainToolBar m_wndToolBar;
|
CMainToolBar ToolBar;
|
||||||
|
|
||||||
CMultiBar m_wndParamBar;
|
CMultiBar ParamBar;
|
||||||
// Sub Dialogs
|
// Sub Dialogs
|
||||||
CLayerList LayerList;
|
CLayerList LayerList;
|
||||||
CDialog Test1;
|
CTileSetDlg TileSetDlg;
|
||||||
CDialog Test2;
|
|
||||||
|
|
||||||
// Generated message map functions
|
// Generated message map functions
|
||||||
protected:
|
protected:
|
||||||
|
|
|
@ -2,13 +2,13 @@
|
||||||
|
|
||||||
[General Info]
|
[General Info]
|
||||||
Version=1
|
Version=1
|
||||||
LastClass=CMultiBar
|
LastClass=CTileSetDlg
|
||||||
LastTemplate=CDialog
|
LastTemplate=CDialog
|
||||||
NewFileInclude1=#include "stdafx.h"
|
NewFileInclude1=#include "stdafx.h"
|
||||||
NewFileInclude2=#include "mapedit.h"
|
NewFileInclude2=#include "mapedit.h"
|
||||||
LastPage=0
|
LastPage=0
|
||||||
|
|
||||||
ClassCount=9
|
ClassCount=10
|
||||||
Class1=CChildFrame
|
Class1=CChildFrame
|
||||||
Class2=CGLEnabledView
|
Class2=CGLEnabledView
|
||||||
Class3=CMainFrame
|
Class3=CMainFrame
|
||||||
|
@ -17,19 +17,18 @@ Class5=CAboutDlg
|
||||||
Class6=CMapEditDoc
|
Class6=CMapEditDoc
|
||||||
Class7=CMapEditView
|
Class7=CMapEditView
|
||||||
|
|
||||||
ResourceCount=10
|
ResourceCount=8
|
||||||
Resource1=IDD_TEST1
|
Resource1=IDR_TOOLBAR (English (U.S.))
|
||||||
Resource2=IDR_MAPEDITYPE (English (U.S.))
|
Resource2=IDR_MAPEDITYPE (English (U.S.))
|
||||||
Resource3=IDD_ABOUTBOX (English (U.S.))
|
Resource3=IDR_MAINFRAME (English (U.S.))
|
||||||
Resource4=IDD_DIALOGBAR (English (U.S.))
|
Resource4=IDD_DIALOGBAR (English (U.S.))
|
||||||
Resource5=IDR_MAINFRAME (English (U.S.))
|
Resource5=IDD_ABOUTBOX (English (U.S.))
|
||||||
Class8=CMultiBar
|
Class8=CMultiBar
|
||||||
Resource6=IDD_TRASHHEAP
|
Resource6=IDD_LAYER_LIST_DIALOG
|
||||||
Resource7=IDD_TEST2
|
Resource7=IDD_MULTIBAR (English (U.S.))
|
||||||
Resource8=IDR_TOOLBAR (English (U.S.))
|
|
||||||
Resource9=IDD_MULTIBAR (English (U.S.))
|
|
||||||
Class9=CLayerList
|
Class9=CLayerList
|
||||||
Resource10=IDD_LAYER_LIST_DIALOG
|
Class10=CTileSetDlg
|
||||||
|
Resource8=IDD_TILESET_DIALOG
|
||||||
|
|
||||||
[CLS:CChildFrame]
|
[CLS:CChildFrame]
|
||||||
Type=0
|
Type=0
|
||||||
|
@ -69,12 +68,16 @@ Type=0
|
||||||
BaseClass=CDocument
|
BaseClass=CDocument
|
||||||
HeaderFile=MapEditDoc.h
|
HeaderFile=MapEditDoc.h
|
||||||
ImplementationFile=MapEditDoc.cpp
|
ImplementationFile=MapEditDoc.cpp
|
||||||
|
LastObject=CMapEditDoc
|
||||||
|
|
||||||
[CLS:CMapEditView]
|
[CLS:CMapEditView]
|
||||||
Type=0
|
Type=0
|
||||||
BaseClass=CGLEnabledView
|
BaseClass=CGLEnabledView
|
||||||
HeaderFile=MapEditView.h
|
HeaderFile=MapEditView.h
|
||||||
ImplementationFile=MapEditView.cpp
|
ImplementationFile=MapEditView.cpp
|
||||||
|
LastObject=ID_TOOLBAR_GRID
|
||||||
|
Filter=C
|
||||||
|
VirtualFilter=VWC
|
||||||
|
|
||||||
[DLG:IDD_ABOUTBOX]
|
[DLG:IDD_ABOUTBOX]
|
||||||
Type=1
|
Type=1
|
||||||
|
@ -91,10 +94,9 @@ Command5=ID_EDIT_COPY
|
||||||
Command6=ID_EDIT_PASTE
|
Command6=ID_EDIT_PASTE
|
||||||
Command7=ID_FILE_PRINT
|
Command7=ID_FILE_PRINT
|
||||||
Command8=ID_APP_ABOUT
|
Command8=ID_APP_ABOUT
|
||||||
Command9=ID_TOOLBAR_PARAMBAR
|
Command9=ID_TOOLBAR_TILEPALETTE
|
||||||
Command10=ID_TOOLBAR_TILEPALETTE
|
Command10=ID_TOOLBAR_GRID
|
||||||
Command11=ID_TOOLBAR_COMBO
|
CommandCount=10
|
||||||
CommandCount=11
|
|
||||||
|
|
||||||
[MNU:IDR_MAINFRAME (English (U.S.))]
|
[MNU:IDR_MAINFRAME (English (U.S.))]
|
||||||
Type=1
|
Type=1
|
||||||
|
@ -163,12 +165,6 @@ Control2=IDC_STATIC,static,1342308480
|
||||||
Control3=IDC_STATIC,static,1342308352
|
Control3=IDC_STATIC,static,1342308352
|
||||||
Control4=IDOK,button,1342373889
|
Control4=IDOK,button,1342373889
|
||||||
|
|
||||||
[DLG:IDD_TRASHHEAP]
|
|
||||||
Type=1
|
|
||||||
Class=?
|
|
||||||
ControlCount=1
|
|
||||||
Control1=IDC_TOOLBAR_COMBO,combobox,1344340226
|
|
||||||
|
|
||||||
[DLG:IDD_DIALOGBAR (English (U.S.))]
|
[DLG:IDD_DIALOGBAR (English (U.S.))]
|
||||||
Type=1
|
Type=1
|
||||||
Class=?
|
Class=?
|
||||||
|
@ -191,41 +187,6 @@ Type=1
|
||||||
Class=CMultiBar
|
Class=CMultiBar
|
||||||
ControlCount=0
|
ControlCount=0
|
||||||
|
|
||||||
[DLG:IDD_TEST1]
|
|
||||||
Type=1
|
|
||||||
Class=?
|
|
||||||
ControlCount=9
|
|
||||||
Control1=IDC_STATIC,button,1342177287
|
|
||||||
Control2=IDC_EDIT1,edit,1350631552
|
|
||||||
Control3=IDC_EDIT2,edit,1350631552
|
|
||||||
Control4=IDC_EDIT3,edit,1350631552
|
|
||||||
Control5=IDC_EDIT4,edit,1350631552
|
|
||||||
Control6=IDC_COMBO1,combobox,1344340226
|
|
||||||
Control7=IDC_COMBO2,combobox,1344340226
|
|
||||||
Control8=IDC_COMBO3,combobox,1344340226
|
|
||||||
Control9=IDC_COMBO4,combobox,1344340226
|
|
||||||
|
|
||||||
[DLG:IDD_TEST2]
|
|
||||||
Type=1
|
|
||||||
Class=?
|
|
||||||
ControlCount=16
|
|
||||||
Control1=IDC_CHECK1,button,1342242819
|
|
||||||
Control2=IDC_CHECK2,button,1342242819
|
|
||||||
Control3=IDC_CHECK3,button,1342242819
|
|
||||||
Control4=IDC_CHECK4,button,1342242819
|
|
||||||
Control5=IDC_CHECK5,button,1342242819
|
|
||||||
Control6=IDC_CHECK6,button,1342242819
|
|
||||||
Control7=IDC_CHECK7,button,1342242819
|
|
||||||
Control8=IDC_CHECK8,button,1342242819
|
|
||||||
Control9=IDC_CHECK9,button,1342242819
|
|
||||||
Control10=IDC_CHECK10,button,1342242819
|
|
||||||
Control11=IDC_CHECK11,button,1342242819
|
|
||||||
Control12=IDC_CHECK12,button,1342242819
|
|
||||||
Control13=IDC_CHECK13,button,1342242819
|
|
||||||
Control14=IDC_CHECK14,button,1342242819
|
|
||||||
Control15=IDC_CHECK15,button,1342242819
|
|
||||||
Control16=IDC_CHECK16,button,1342242819
|
|
||||||
|
|
||||||
[DLG:IDD_LAYER_LIST_DIALOG]
|
[DLG:IDD_LAYER_LIST_DIALOG]
|
||||||
Type=1
|
Type=1
|
||||||
Class=CLayerList
|
Class=CLayerList
|
||||||
|
@ -241,3 +202,19 @@ Filter=D
|
||||||
VirtualFilter=dWC
|
VirtualFilter=dWC
|
||||||
LastObject=CLayerList
|
LastObject=CLayerList
|
||||||
|
|
||||||
|
[DLG:IDD_TILESET_DIALOG]
|
||||||
|
Type=1
|
||||||
|
Class=CTileSetDlg
|
||||||
|
ControlCount=2
|
||||||
|
Control1=IDC_TILESETDLG_COMBO,combobox,1342242819
|
||||||
|
Control2=IDC_TILESETDLG_BTN_UPDATE,button,1342242816
|
||||||
|
|
||||||
|
[CLS:CTileSetDlg]
|
||||||
|
Type=0
|
||||||
|
HeaderFile=TileSetDlg.h
|
||||||
|
ImplementationFile=TileSetDlg.cpp
|
||||||
|
BaseClass=CDialog
|
||||||
|
Filter=D
|
||||||
|
VirtualFilter=dWC
|
||||||
|
LastObject=IDC_TILESETDLG_COMBO
|
||||||
|
|
||||||
|
|
|
@ -174,10 +174,6 @@ SOURCE=.\GLEnabledView.cpp
|
||||||
# End Source File
|
# End Source File
|
||||||
# Begin Source File
|
# Begin Source File
|
||||||
|
|
||||||
SOURCE=.\LayerList.cpp
|
|
||||||
# End Source File
|
|
||||||
# Begin Source File
|
|
||||||
|
|
||||||
SOURCE=.\MainFrm.cpp
|
SOURCE=.\MainFrm.cpp
|
||||||
# End Source File
|
# End Source File
|
||||||
# Begin Source File
|
# Begin Source File
|
||||||
|
@ -198,10 +194,6 @@ SOURCE=.\MapEditView.cpp
|
||||||
# End Source File
|
# End Source File
|
||||||
# Begin Source File
|
# Begin Source File
|
||||||
|
|
||||||
SOURCE=.\MultiBar.cpp
|
|
||||||
# End Source File
|
|
||||||
# Begin Source File
|
|
||||||
|
|
||||||
SOURCE=.\StdAfx.cpp
|
SOURCE=.\StdAfx.cpp
|
||||||
# ADD CPP /Yc"stdafx.h"
|
# ADD CPP /Yc"stdafx.h"
|
||||||
# End Source File
|
# End Source File
|
||||||
|
@ -223,10 +215,6 @@ SOURCE=.\GLEnabledView.h
|
||||||
# End Source File
|
# End Source File
|
||||||
# Begin Source File
|
# Begin Source File
|
||||||
|
|
||||||
SOURCE=.\LayerList.h
|
|
||||||
# End Source File
|
|
||||||
# Begin Source File
|
|
||||||
|
|
||||||
SOURCE=.\MainFrm.h
|
SOURCE=.\MainFrm.h
|
||||||
# End Source File
|
# End Source File
|
||||||
# Begin Source File
|
# Begin Source File
|
||||||
|
@ -243,10 +231,6 @@ SOURCE=.\MapEditView.h
|
||||||
# End Source File
|
# End Source File
|
||||||
# Begin Source File
|
# Begin Source File
|
||||||
|
|
||||||
SOURCE=.\MultiBar.h
|
|
||||||
# End Source File
|
|
||||||
# Begin Source File
|
|
||||||
|
|
||||||
SOURCE=.\Resource.h
|
SOURCE=.\Resource.h
|
||||||
# End Source File
|
# End Source File
|
||||||
# Begin Source File
|
# Begin Source File
|
||||||
|
@ -274,6 +258,38 @@ SOURCE=.\res\MapEditDoc.ico
|
||||||
SOURCE=.\res\Toolbar.bmp
|
SOURCE=.\res\Toolbar.bmp
|
||||||
# End Source File
|
# End Source File
|
||||||
# End Group
|
# End Group
|
||||||
|
# Begin Group "Dlg"
|
||||||
|
|
||||||
|
# PROP Default_Filter ""
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=.\LayerList.cpp
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=.\LayerList.h
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=.\MultiBar.cpp
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=.\MultiBar.h
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=.\TileSetDlg.cpp
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=.\TileSetDlg.h
|
||||||
|
# End Source File
|
||||||
# End Group
|
# End Group
|
||||||
|
# End Group
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=".\!ToDo.txt"
|
||||||
|
# End Source File
|
||||||
# End Target
|
# End Target
|
||||||
# End Project
|
# End Project
|
||||||
|
|
|
@ -57,10 +57,8 @@ BEGIN
|
||||||
SEPARATOR
|
SEPARATOR
|
||||||
BUTTON ID_APP_ABOUT
|
BUTTON ID_APP_ABOUT
|
||||||
SEPARATOR
|
SEPARATOR
|
||||||
BUTTON ID_TOOLBAR_PARAMBAR
|
|
||||||
BUTTON ID_TOOLBAR_TILEPALETTE
|
BUTTON ID_TOOLBAR_TILEPALETTE
|
||||||
SEPARATOR
|
BUTTON ID_TOOLBAR_GRID
|
||||||
BUTTON ID_TOOLBAR_COMBO
|
|
||||||
END
|
END
|
||||||
|
|
||||||
|
|
||||||
|
@ -415,81 +413,24 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_UK
|
||||||
// Dialog
|
// Dialog
|
||||||
//
|
//
|
||||||
|
|
||||||
IDD_TRASHHEAP DIALOG DISCARDABLE 0, 0, 186, 95
|
IDD_LAYER_LIST_DIALOG DIALOG DISCARDABLE 0, 0, 155, 94
|
||||||
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
|
||||||
CAPTION "Dialog"
|
|
||||||
FONT 8, "MS Sans Serif"
|
|
||||||
BEGIN
|
|
||||||
COMBOBOX IDC_TOOLBAR_COMBO,7,7,87,34,CBS_DROPDOWN | CBS_SORT |
|
|
||||||
WS_VSCROLL | WS_TABSTOP
|
|
||||||
END
|
|
||||||
|
|
||||||
IDD_TEST1 DIALOG DISCARDABLE 0, 0, 186, 94
|
|
||||||
STYLE WS_CHILD | WS_BORDER
|
STYLE WS_CHILD | WS_BORDER
|
||||||
FONT 8, "MS Sans Serif"
|
FONT 8, "MS Sans Serif"
|
||||||
BEGIN
|
BEGIN
|
||||||
GROUPBOX "Static",IDC_STATIC,7,7,172,80
|
LISTBOX IDC_LAYER_LIST,5,5,145,85,LBS_SORT | LBS_OWNERDRAWFIXED |
|
||||||
EDITTEXT IDC_EDIT1,19,20,53,13,ES_AUTOHSCROLL
|
|
||||||
EDITTEXT IDC_EDIT2,19,35,53,13,ES_AUTOHSCROLL
|
|
||||||
EDITTEXT IDC_EDIT3,19,49,53,13,ES_AUTOHSCROLL
|
|
||||||
EDITTEXT IDC_EDIT4,19,64,53,13,ES_AUTOHSCROLL
|
|
||||||
COMBOBOX IDC_COMBO1,82,20,89,30,CBS_DROPDOWN | CBS_SORT |
|
|
||||||
WS_VSCROLL | WS_TABSTOP
|
|
||||||
COMBOBOX IDC_COMBO2,81,36,89,30,CBS_DROPDOWN | CBS_SORT |
|
|
||||||
WS_VSCROLL | WS_TABSTOP
|
|
||||||
COMBOBOX IDC_COMBO3,80,51,89,30,CBS_DROPDOWN | CBS_SORT |
|
|
||||||
WS_VSCROLL | WS_TABSTOP
|
|
||||||
COMBOBOX IDC_COMBO4,81,67,89,30,CBS_DROPDOWN | CBS_SORT |
|
|
||||||
WS_VSCROLL | WS_TABSTOP
|
|
||||||
END
|
|
||||||
|
|
||||||
IDD_TEST2 DIALOG DISCARDABLE 0, 0, 102, 86
|
|
||||||
STYLE WS_CHILD | WS_BORDER
|
|
||||||
FONT 8, "MS Sans Serif"
|
|
||||||
BEGIN
|
|
||||||
CONTROL "Check1",IDC_CHECK1,"Button",BS_AUTOCHECKBOX |
|
|
||||||
WS_TABSTOP,5,5,41,10
|
|
||||||
CONTROL "Check1",IDC_CHECK2,"Button",BS_AUTOCHECKBOX |
|
|
||||||
WS_TABSTOP,5,15,41,10
|
|
||||||
CONTROL "Check1",IDC_CHECK3,"Button",BS_AUTOCHECKBOX |
|
|
||||||
WS_TABSTOP,5,25,41,10
|
|
||||||
CONTROL "Check1",IDC_CHECK4,"Button",BS_AUTOCHECKBOX |
|
|
||||||
WS_TABSTOP,5,35,41,10
|
|
||||||
CONTROL "Check1",IDC_CHECK5,"Button",BS_AUTOCHECKBOX |
|
|
||||||
WS_TABSTOP,5,45,41,10
|
|
||||||
CONTROL "Check1",IDC_CHECK6,"Button",BS_AUTOCHECKBOX |
|
|
||||||
WS_TABSTOP,5,55,41,10
|
|
||||||
CONTROL "Check1",IDC_CHECK7,"Button",BS_AUTOCHECKBOX |
|
|
||||||
WS_TABSTOP,5,65,41,10
|
|
||||||
CONTROL "Check1",IDC_CHECK8,"Button",BS_AUTOCHECKBOX |
|
|
||||||
WS_TABSTOP,5,75,41,10
|
|
||||||
CONTROL "Check1",IDC_CHECK9,"Button",BS_AUTOCHECKBOX |
|
|
||||||
WS_TABSTOP,60,5,41,10
|
|
||||||
CONTROL "Check1",IDC_CHECK10,"Button",BS_AUTOCHECKBOX |
|
|
||||||
WS_TABSTOP,60,15,41,10
|
|
||||||
CONTROL "Check1",IDC_CHECK11,"Button",BS_AUTOCHECKBOX |
|
|
||||||
WS_TABSTOP,60,25,41,10
|
|
||||||
CONTROL "Check1",IDC_CHECK12,"Button",BS_AUTOCHECKBOX |
|
|
||||||
WS_TABSTOP,60,35,41,10
|
|
||||||
CONTROL "Check1",IDC_CHECK13,"Button",BS_AUTOCHECKBOX |
|
|
||||||
WS_TABSTOP,60,45,41,10
|
|
||||||
CONTROL "Check1",IDC_CHECK14,"Button",BS_AUTOCHECKBOX |
|
|
||||||
WS_TABSTOP,60,55,41,10
|
|
||||||
CONTROL "Check1",IDC_CHECK15,"Button",BS_AUTOCHECKBOX |
|
|
||||||
WS_TABSTOP,60,65,41,10
|
|
||||||
CONTROL "Check1",IDC_CHECK16,"Button",BS_AUTOCHECKBOX |
|
|
||||||
WS_TABSTOP,60,75,41,10
|
|
||||||
END
|
|
||||||
|
|
||||||
IDD_LAYER_LIST_DIALOG DIALOG DISCARDABLE 0, 0, 106, 94
|
|
||||||
STYLE WS_CHILD | WS_BORDER
|
|
||||||
FONT 8, "MS Sans Serif"
|
|
||||||
BEGIN
|
|
||||||
LISTBOX IDC_LAYER_LIST,7,7,92,85,LBS_SORT | LBS_OWNERDRAWFIXED |
|
|
||||||
LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | WS_VSCROLL |
|
LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | WS_VSCROLL |
|
||||||
WS_TABSTOP
|
WS_TABSTOP
|
||||||
END
|
END
|
||||||
|
|
||||||
|
IDD_TILESET_DIALOG DIALOG DISCARDABLE 0, 0, 151, 46
|
||||||
|
STYLE WS_CHILD
|
||||||
|
FONT 8, "MS Sans Serif"
|
||||||
|
BEGIN
|
||||||
|
COMBOBOX IDC_TILESETDLG_COMBO,7,7,138,322,CBS_DROPDOWNLIST |
|
||||||
|
WS_TABSTOP
|
||||||
|
PUSHBUTTON "Update",IDC_TILESETDLG_BTN_UPDATE,5,25,140,15
|
||||||
|
END
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
//
|
//
|
||||||
|
@ -499,37 +440,21 @@ END
|
||||||
#ifdef APSTUDIO_INVOKED
|
#ifdef APSTUDIO_INVOKED
|
||||||
GUIDELINES DESIGNINFO DISCARDABLE
|
GUIDELINES DESIGNINFO DISCARDABLE
|
||||||
BEGIN
|
BEGIN
|
||||||
IDD_TRASHHEAP, DIALOG
|
|
||||||
BEGIN
|
|
||||||
LEFTMARGIN, 7
|
|
||||||
RIGHTMARGIN, 179
|
|
||||||
TOPMARGIN, 7
|
|
||||||
BOTTOMMARGIN, 88
|
|
||||||
END
|
|
||||||
|
|
||||||
IDD_TEST1, DIALOG
|
|
||||||
BEGIN
|
|
||||||
LEFTMARGIN, 7
|
|
||||||
RIGHTMARGIN, 179
|
|
||||||
TOPMARGIN, 7
|
|
||||||
BOTTOMMARGIN, 87
|
|
||||||
END
|
|
||||||
|
|
||||||
IDD_TEST2, DIALOG
|
|
||||||
BEGIN
|
|
||||||
LEFTMARGIN, 7
|
|
||||||
RIGHTMARGIN, 95
|
|
||||||
TOPMARGIN, 7
|
|
||||||
BOTTOMMARGIN, 79
|
|
||||||
END
|
|
||||||
|
|
||||||
IDD_LAYER_LIST_DIALOG, DIALOG
|
IDD_LAYER_LIST_DIALOG, DIALOG
|
||||||
BEGIN
|
BEGIN
|
||||||
LEFTMARGIN, 7
|
LEFTMARGIN, 7
|
||||||
RIGHTMARGIN, 99
|
RIGHTMARGIN, 148
|
||||||
TOPMARGIN, 7
|
TOPMARGIN, 7
|
||||||
BOTTOMMARGIN, 87
|
BOTTOMMARGIN, 87
|
||||||
END
|
END
|
||||||
|
|
||||||
|
IDD_TILESET_DIALOG, DIALOG
|
||||||
|
BEGIN
|
||||||
|
LEFTMARGIN, 7
|
||||||
|
RIGHTMARGIN, 144
|
||||||
|
TOPMARGIN, 7
|
||||||
|
BOTTOMMARGIN, 39
|
||||||
|
END
|
||||||
END
|
END
|
||||||
#endif // APSTUDIO_INVOKED
|
#endif // APSTUDIO_INVOKED
|
||||||
|
|
||||||
|
|
|
@ -152,14 +152,29 @@ void CMapEditDoc::MouseMove(CMapEditView *View,UINT nFlags, CPoint &point)
|
||||||
}
|
}
|
||||||
|
|
||||||
/*********************************************************************************/
|
/*********************************************************************************/
|
||||||
void CMapEditDoc::ToggleParamView(CMapEditView *View)
|
void CMapEditDoc::ToggleTileView(CMapEditView *View)
|
||||||
{
|
{
|
||||||
Core.ToggleParamView(View);
|
Core.UpdateTileView(View,TRUE);
|
||||||
|
Core.UpdateAll(View);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*********************************************************************************/
|
/*********************************************************************************/
|
||||||
void CMapEditDoc::ToggleTileView(CMapEditView *View)
|
void CMapEditDoc::ToggleGrid(CMapEditView *View)
|
||||||
{
|
{
|
||||||
Core.ToggleTileView(View);
|
Core.UpdateGrid(View,TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*********************************************************************************/
|
||||||
|
void CMapEditDoc::ReloadTileBank()
|
||||||
|
{
|
||||||
|
Core.ReloadTileBank();
|
||||||
|
UpdateAllViews(NULL);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/*********************************************************************************/
|
||||||
|
void CMapEditDoc::TileBankChange()
|
||||||
|
{
|
||||||
|
Core.ChangeTileBank();
|
||||||
|
UpdateAllViews(NULL);
|
||||||
|
}
|
||||||
|
|
|
@ -19,7 +19,6 @@ protected: // create from serialization only
|
||||||
|
|
||||||
// Attributes
|
// Attributes
|
||||||
public:
|
public:
|
||||||
// void SetupPersMatrix(float _m_dAspectRatio);
|
|
||||||
void UpdateView(CMapEditView *View);
|
void UpdateView(CMapEditView *View);
|
||||||
void Render(CMapEditView *View);
|
void Render(CMapEditView *View);
|
||||||
void UpdateAll(CMapEditView *View);
|
void UpdateAll(CMapEditView *View);
|
||||||
|
@ -30,8 +29,11 @@ public:
|
||||||
void RButtonControl(CMapEditView *View,UINT nFlags, CPoint &point,BOOL DownFlag);
|
void RButtonControl(CMapEditView *View,UINT nFlags, CPoint &point,BOOL DownFlag);
|
||||||
void MouseWheel(CMapEditView *View,UINT nFlags, short zDelta, CPoint &pt);
|
void MouseWheel(CMapEditView *View,UINT nFlags, short zDelta, CPoint &pt);
|
||||||
void MouseMove(CMapEditView *View,UINT nFlags, CPoint &point);
|
void MouseMove(CMapEditView *View,UINT nFlags, CPoint &point);
|
||||||
void ToggleParamView(CMapEditView *View);
|
|
||||||
void ToggleTileView(CMapEditView *View);
|
void ToggleTileView(CMapEditView *View);
|
||||||
|
void ToggleGrid(CMapEditView *View);
|
||||||
|
|
||||||
|
void ReloadTileBank();
|
||||||
|
void TileBankChange();
|
||||||
|
|
||||||
// Operations
|
// Operations
|
||||||
public:
|
public:
|
||||||
|
@ -55,6 +57,7 @@ public:
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
CCore Core;
|
CCore Core;
|
||||||
|
|
||||||
// Generated message map functions
|
// Generated message map functions
|
||||||
protected:
|
protected:
|
||||||
//{{AFX_MSG(CMapEditDoc)
|
//{{AFX_MSG(CMapEditDoc)
|
||||||
|
|
|
@ -35,8 +35,8 @@ BEGIN_MESSAGE_MAP(CMapEditView, CGLEnabledView)
|
||||||
ON_WM_RBUTTONDOWN()
|
ON_WM_RBUTTONDOWN()
|
||||||
ON_WM_RBUTTONUP()
|
ON_WM_RBUTTONUP()
|
||||||
ON_WM_MOUSEMOVE()
|
ON_WM_MOUSEMOVE()
|
||||||
ON_COMMAND(ID_TOOLBAR_PARAMBAR, OnToolbarParamBar)
|
|
||||||
ON_COMMAND(ID_TOOLBAR_TILEPALETTE, OnToolbarTilepalette)
|
ON_COMMAND(ID_TOOLBAR_TILEPALETTE, OnToolbarTilepalette)
|
||||||
|
ON_COMMAND(ID_TOOLBAR_GRID, OnToolbarGrid)
|
||||||
//}}AFX_MSG_MAP
|
//}}AFX_MSG_MAP
|
||||||
END_MESSAGE_MAP()
|
END_MESSAGE_MAP()
|
||||||
|
|
||||||
|
@ -147,5 +147,5 @@ 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::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::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::OnMouseMove(UINT nFlags, CPoint point) {GetDocument()->MouseMove(this,nFlags, point);}
|
||||||
void CMapEditView::OnToolbarParamBar() {GetDocument()->ToggleParamView(this);}
|
|
||||||
void CMapEditView::OnToolbarTilepalette() {GetDocument()->ToggleTileView(this);}
|
void CMapEditView::OnToolbarTilepalette() {GetDocument()->ToggleTileView(this);}
|
||||||
|
void CMapEditView::OnToolbarGrid() {GetDocument()->ToggleGrid(this);}
|
||||||
|
|
|
@ -55,8 +55,8 @@ protected:
|
||||||
afx_msg void OnRButtonDown(UINT nFlags, CPoint point);
|
afx_msg void OnRButtonDown(UINT nFlags, CPoint point);
|
||||||
afx_msg void OnRButtonUp(UINT nFlags, CPoint point);
|
afx_msg void OnRButtonUp(UINT nFlags, CPoint point);
|
||||||
afx_msg void OnMouseMove(UINT nFlags, CPoint point);
|
afx_msg void OnMouseMove(UINT nFlags, CPoint point);
|
||||||
afx_msg void OnToolbarParamBar();
|
|
||||||
afx_msg void OnToolbarTilepalette();
|
afx_msg void OnToolbarTilepalette();
|
||||||
|
afx_msg void OnToolbarGrid();
|
||||||
//}}AFX_MSG
|
//}}AFX_MSG
|
||||||
DECLARE_MESSAGE_MAP()
|
DECLARE_MESSAGE_MAP()
|
||||||
};
|
};
|
||||||
|
|
|
@ -40,3 +40,17 @@ char Filename[256];
|
||||||
return(Count);
|
return(Count);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
void CTexCache::Purge()
|
||||||
|
{
|
||||||
|
int ListSize=TexList.size();
|
||||||
|
|
||||||
|
TRACE1("Purging %i textures\n",ListSize);
|
||||||
|
|
||||||
|
for (int i=0; i<ListSize; i++)
|
||||||
|
{
|
||||||
|
glDeleteTextures(1,&TexList[i].TexID);
|
||||||
|
}
|
||||||
|
|
||||||
|
TexList.clear();
|
||||||
|
}
|
|
@ -30,7 +30,7 @@ public:
|
||||||
int ProcessTexture(char *TexName,char *Path,int Flags);
|
int ProcessTexture(char *TexName,char *Path,int Flags);
|
||||||
sTex &GetTex(int Id) {return(TexList[Id]);}
|
sTex &GetTex(int Id) {return(TexList[Id]);}
|
||||||
GLuint GetTexGLId(int Id) {return(TexList[Id].TexID);}
|
GLuint GetTexGLId(int Id) {return(TexList[Id].TexID);}
|
||||||
|
void Purge();
|
||||||
|
|
||||||
std::vector<sTex> TexList;
|
std::vector<sTex> TexList;
|
||||||
|
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
#include <gl\gl.h>
|
#include <gl\gl.h>
|
||||||
#include <gl\glu.h>
|
#include <gl\glu.h>
|
||||||
#include <gl\glut.h>
|
#include <gl\glut.h>
|
||||||
|
#include "GLEnabledView.h"
|
||||||
#include <Vector>
|
#include <Vector>
|
||||||
|
|
||||||
#include "Core.h"
|
#include "Core.h"
|
||||||
|
@ -14,11 +15,24 @@
|
||||||
#include "GinTex.h"
|
#include "GinTex.h"
|
||||||
#include "utils.h"
|
#include "utils.h"
|
||||||
|
|
||||||
|
#include "MapEdit.h"
|
||||||
|
#include "MapEditDoc.h"
|
||||||
|
#include "MapEditView.h"
|
||||||
|
#include "MainFrm.h"
|
||||||
|
#include "TileSetDlg.h"
|
||||||
|
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/*** TileBank ****************************************************************/
|
/*** TileBank ****************************************************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
const float TileBrowserGap=0.2f;
|
||||||
|
const float TileBrowserX0=0-TileBrowserGap/2;
|
||||||
|
const float TileBrowserX1=1+TileBrowserGap/2;
|
||||||
|
const float TileBrowserY0=0-TileBrowserGap/2;
|
||||||
|
const float TileBrowserY1=1+TileBrowserGap/2;
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
CTileBank::CTileBank()
|
CTileBank::CTileBank()
|
||||||
{
|
{
|
||||||
|
@ -51,12 +65,131 @@ int ListSize=TileSet.size();
|
||||||
LoadFlag=FALSE;
|
LoadFlag=FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
void CTileBank::Reload()
|
||||||
|
{
|
||||||
|
int ListSize=TileSet.size();
|
||||||
|
|
||||||
|
for (int i=0; i<ListSize; i++)
|
||||||
|
{
|
||||||
|
TileSet[i].Purge();
|
||||||
|
}
|
||||||
|
|
||||||
|
LoadFlag=TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
CTile &CTileBank::GetTile(int Bank,int Tile)
|
CTile &CTileBank::GetTile(int Bank,int Tile)
|
||||||
{
|
{
|
||||||
return(TileSet[Bank].GetTile(Tile));
|
return(TileSet[Bank].GetTile(Tile));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
void CTileBank::RenderSet(CCore *Core,Vec &CamPos,BOOL Is3d)
|
||||||
|
{
|
||||||
|
int CurrentBank=Core->GetCurrentTileBank();
|
||||||
|
sMapElem &LSelTile=Core->GetMouseTileL();
|
||||||
|
sMapElem &RSelTile=Core->GetMouseTileR();
|
||||||
|
int LTile=-1,RTile=-1;
|
||||||
|
|
||||||
|
if (LSelTile.Bank==CurrentBank || LSelTile.Tile==0) LTile=LSelTile.Tile;
|
||||||
|
if (RSelTile.Bank==CurrentBank || RSelTile.Tile==0) RTile=RSelTile.Tile;
|
||||||
|
|
||||||
|
if (Is3d)
|
||||||
|
{
|
||||||
|
glEnable(GL_DEPTH_TEST);
|
||||||
|
TileSet[CurrentBank].Render3d(Core,CamPos,CursPos,LTile,RTile);
|
||||||
|
glDisable(GL_DEPTH_TEST);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
TileSet[CurrentBank].Render2d(Core,CamPos,CursPos,LTile,RTile);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
void CTileBank::FindCursorPos(CCore *Core,CMapEditView *View,Vec &CamPos,CPoint &MousePos)
|
||||||
|
{
|
||||||
|
int CurrentBank=Core->GetCurrentTileBank();
|
||||||
|
|
||||||
|
CursPos=TileSet[CurrentBank].FindCursorPos(Core,View,CamPos,MousePos);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
void CTileBank::LButtonControl(CCore *Core,CMapEditView *View,UINT nFlags, CPoint &point,BOOL DownFlag)
|
||||||
|
{
|
||||||
|
if (!DownFlag) return;
|
||||||
|
|
||||||
|
sMapElem &SelTile= Core->GetMouseTileL();
|
||||||
|
sMapElem &OtherSelTile= Core->GetMouseTileR();
|
||||||
|
int CurrentBank= Core->GetCurrentTileBank();
|
||||||
|
|
||||||
|
if (CursPos==-1) return;
|
||||||
|
if (CurrentBank==OtherSelTile.Bank && OtherSelTile.Tile==CursPos)
|
||||||
|
{ // Dont assign if same as other mouse
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
SelTile.Bank=CurrentBank;
|
||||||
|
SelTile.Tile=CursPos;
|
||||||
|
if (SelTile.Tile==0) SelTile.Bank=0; // Always make zero tile, bank 0 (dunno why, just seems handy)
|
||||||
|
View->Invalidate();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
void CTileBank::RButtonControl(CCore *Core,CMapEditView *View,UINT nFlags, CPoint &point,BOOL DownFlag)
|
||||||
|
{
|
||||||
|
if (!DownFlag) return;
|
||||||
|
|
||||||
|
sMapElem &SelTile= Core->GetMouseTileR();
|
||||||
|
sMapElem &OtherSelTile= Core->GetMouseTileL();
|
||||||
|
int CurrentBank= Core->GetCurrentTileBank();
|
||||||
|
|
||||||
|
if (CursPos==-1) return;
|
||||||
|
if (CurrentBank==OtherSelTile.Bank && OtherSelTile.Tile==CursPos)
|
||||||
|
{ // Dont assign if same as other mouse
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
SelTile.Bank=CurrentBank;
|
||||||
|
SelTile.Tile=CursPos;
|
||||||
|
View->Invalidate();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
/*** Gui *********************************************************************/
|
||||||
|
/*****************************************************************************/
|
||||||
|
void CTileBank::InitGUI(CCore *Core)
|
||||||
|
{
|
||||||
|
CMainFrame *Frm=(CMainFrame*)AfxGetApp()->GetMainWnd();
|
||||||
|
CMultiBar *ParamBar=Frm->GetParamBar();
|
||||||
|
|
||||||
|
ParamBar->RemoveAll();
|
||||||
|
ParamBar->Add(Frm->GetTileSetDlg(),IDD_TILESET_DIALOG,TRUE);
|
||||||
|
ParamBar->Update();
|
||||||
|
UpdateGUI(Core);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
void CTileBank::UpdateGUI(CCore *Core)
|
||||||
|
{
|
||||||
|
CMainFrame *Frm=(CMainFrame*)AfxGetApp()->GetMainWnd();
|
||||||
|
CTileSetDlg *TileSetDlg=(CTileSetDlg*)Frm->GetDialog(IDD_TILESET_DIALOG);
|
||||||
|
int ListSize=TileSet.size();
|
||||||
|
|
||||||
|
TRACE1("%i\n",TileSetDlg->TileSetList.GetCurSel());
|
||||||
|
TileSetDlg->TileSetList.ResetContent();
|
||||||
|
|
||||||
|
for (int i=0; i<ListSize; i++)
|
||||||
|
{
|
||||||
|
TileSetDlg->TileSetList.AddString(TileSet[i].GetName());
|
||||||
|
}
|
||||||
|
TileSetDlg->TileSetList.SetCurSel(Core->GetCurrentTileBank());
|
||||||
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/*** TileSet *****************************************************************/
|
/*** TileSet *****************************************************************/
|
||||||
|
@ -89,6 +222,7 @@ void CTileSet::Load(CCore *Core)
|
||||||
{
|
{
|
||||||
CScene Scene;
|
CScene Scene;
|
||||||
char Filename[256+64];
|
char Filename[256+64];
|
||||||
|
CTile NewTile;
|
||||||
|
|
||||||
sprintf(Filename,"%s%s.%s",Path,Name,"Gin");
|
sprintf(Filename,"%s%s.%s",Path,Name,"Gin");
|
||||||
Scene.Load(Filename);
|
Scene.Load(Filename);
|
||||||
|
@ -96,9 +230,11 @@ char Filename[256+64];
|
||||||
CNode &ThisNode=Scene.GetSceneNode(0);
|
CNode &ThisNode=Scene.GetSceneNode(0);
|
||||||
int ChildCount=ThisNode.GetPruneChildCount();
|
int ChildCount=ThisNode.GetPruneChildCount();
|
||||||
|
|
||||||
|
NewTile.CreateBlank(Core,this);
|
||||||
|
Tile.push_back(NewTile);
|
||||||
|
|
||||||
for (int Child=0; Child<ChildCount; Child++)
|
for (int Child=0; Child<ChildCount; Child++)
|
||||||
{
|
{
|
||||||
CTile NewTile;
|
|
||||||
NewTile.Load(Core,this,Scene,ThisNode.PruneChildList[Child]);
|
NewTile.Load(Core,this,Scene,ThisNode.PruneChildList[Child]);
|
||||||
Tile.push_back(NewTile);
|
Tile.push_back(NewTile);
|
||||||
}
|
}
|
||||||
|
@ -107,3 +243,156 @@ int ChildCount=ThisNode.GetPruneChildCount();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
void CTileSet::Purge()
|
||||||
|
{
|
||||||
|
int ListSize=Tile.size();
|
||||||
|
|
||||||
|
for (int i=0; i<ListSize; i++)
|
||||||
|
{
|
||||||
|
Tile[i].Purge();
|
||||||
|
}
|
||||||
|
Tile.clear();
|
||||||
|
Loaded=FALSE;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
void CTileSet::Render2d(CCore *Core,Vec &CamPos,int CursorPos,int LTile,int RTile)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
void CTileSet::Render3d(CCore *Core,Vec &CamPos,int CursorPos,int LTile,int RTile)
|
||||||
|
{
|
||||||
|
int ListSize=Tile.size();
|
||||||
|
CTexCache &TexCache=Core->GetTexCache();
|
||||||
|
int TileID=0;
|
||||||
|
BOOL GridFlag=Core->IsGridOn();
|
||||||
|
|
||||||
|
glMatrixMode(GL_MODELVIEW);
|
||||||
|
|
||||||
|
while(TileID!=ListSize)
|
||||||
|
{
|
||||||
|
CTile &ThisTile=Tile[TileID];
|
||||||
|
int XPos=TileID%TileBrowserWidth;
|
||||||
|
int YPos=TileID/TileBrowserWidth;
|
||||||
|
|
||||||
|
glLoadIdentity();
|
||||||
|
glTranslatef(CamPos.x+XPos*(1+TileBrowserGap),CamPos.y-YPos*(1+TileBrowserGap),CamPos.z);
|
||||||
|
|
||||||
|
RenderMisc(TileID==LTile,TileID==RTile,GridFlag,TileID==CursorPos);
|
||||||
|
|
||||||
|
glColor3f(0.5,0.5,0.5);
|
||||||
|
ThisTile.Render();
|
||||||
|
|
||||||
|
TileID++;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
void CTileSet::RenderMisc(BOOL LSelFlag,BOOL RSelFlag, BOOL GridFlag,BOOL CursorFlag)
|
||||||
|
{
|
||||||
|
|
||||||
|
glDisable(GL_TEXTURE_2D);
|
||||||
|
|
||||||
|
if (LSelFlag || RSelFlag || CursorFlag)
|
||||||
|
{ // Show selected tile
|
||||||
|
glBegin(GL_QUADS);
|
||||||
|
glNormal3f( 1,1,1);
|
||||||
|
if (LSelFlag)
|
||||||
|
glColor3ub(255,0,0);
|
||||||
|
else
|
||||||
|
if (RSelFlag)
|
||||||
|
glColor3ub(0,0,255);
|
||||||
|
else
|
||||||
|
glColor3ub(255,255,0);
|
||||||
|
|
||||||
|
BuildGLQuad(TileBrowserX0,TileBrowserX1,TileBrowserY0,TileBrowserY1,0);
|
||||||
|
glEnd();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
if (GridFlag)
|
||||||
|
{
|
||||||
|
glBegin(GL_LINES);
|
||||||
|
glNormal3f( 1,1,1);
|
||||||
|
glColor3ub(255,255,255);
|
||||||
|
|
||||||
|
glVertex3f( TileBrowserX0,TileBrowserY0,0);
|
||||||
|
glVertex3f( TileBrowserX1,TileBrowserY0,0);
|
||||||
|
|
||||||
|
glVertex3f( TileBrowserX0,TileBrowserY1,0);
|
||||||
|
glVertex3f( TileBrowserX1,TileBrowserY1,0);
|
||||||
|
|
||||||
|
glVertex3f( TileBrowserX0,TileBrowserY0,0);
|
||||||
|
glVertex3f( TileBrowserX0,TileBrowserY1,0);
|
||||||
|
|
||||||
|
glVertex3f( TileBrowserX1,TileBrowserY0,0);
|
||||||
|
glVertex3f( TileBrowserX1,TileBrowserY1,0);
|
||||||
|
|
||||||
|
glEnd();
|
||||||
|
}
|
||||||
|
|
||||||
|
glEnable(GL_TEXTURE_2D);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
int CTileSet::FindCursorPos(CCore *Core,CMapEditView *View,Vec &CamPos,CPoint &MousePos)
|
||||||
|
{
|
||||||
|
int ListSize=Tile.size();
|
||||||
|
GLint Viewport[4];
|
||||||
|
GLuint SelectBuffer[SELECT_BUFFER_SIZE];
|
||||||
|
int HitCount;
|
||||||
|
int TileID=0;
|
||||||
|
|
||||||
|
glGetIntegerv(GL_VIEWPORT, Viewport);
|
||||||
|
glSelectBuffer (SELECT_BUFFER_SIZE, SelectBuffer );
|
||||||
|
glRenderMode (GL_SELECT);
|
||||||
|
|
||||||
|
glInitNames();
|
||||||
|
glPushName(-1);
|
||||||
|
|
||||||
|
glMatrixMode(GL_PROJECTION);
|
||||||
|
glPushMatrix();
|
||||||
|
glLoadIdentity();
|
||||||
|
gluPickMatrix( MousePos.x ,(Viewport[3]-MousePos.y),5.0,5.0,Viewport);
|
||||||
|
View->SetupPersMatrix();
|
||||||
|
|
||||||
|
glMatrixMode(GL_MODELVIEW);
|
||||||
|
|
||||||
|
while(TileID!=ListSize)
|
||||||
|
{
|
||||||
|
int XPos=TileID%TileBrowserWidth;
|
||||||
|
int YPos=TileID/TileBrowserWidth;
|
||||||
|
|
||||||
|
glLoadIdentity();
|
||||||
|
glTranslatef(CamPos.x+XPos*(1+TileBrowserGap),CamPos.y-YPos*(1+TileBrowserGap),CamPos.z);
|
||||||
|
|
||||||
|
glLoadName (TileID);
|
||||||
|
glBegin (GL_QUADS);
|
||||||
|
BuildGLQuad(TileBrowserX0,TileBrowserX1,TileBrowserY0,TileBrowserY1,0);
|
||||||
|
glEnd();
|
||||||
|
TileID++;
|
||||||
|
}
|
||||||
|
|
||||||
|
HitCount= glRenderMode (GL_RENDER);
|
||||||
|
glMatrixMode(GL_PROJECTION);
|
||||||
|
glPopMatrix();
|
||||||
|
|
||||||
|
// Process hits
|
||||||
|
|
||||||
|
GLuint *HitPtr=SelectBuffer;
|
||||||
|
|
||||||
|
TileID=-1;
|
||||||
|
if (HitCount) // Just take 1st
|
||||||
|
{
|
||||||
|
TileID=HitPtr[3];
|
||||||
|
}
|
||||||
|
glMatrixMode(GL_MODELVIEW); // <-- Prevent arse GL assert
|
||||||
|
return(TileID);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -15,6 +15,11 @@
|
||||||
#include "TexCache.h"
|
#include "TexCache.h"
|
||||||
#include "Tile.h"
|
#include "Tile.h"
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
enum TileSetEnum
|
||||||
|
{
|
||||||
|
TileBrowserWidth=8,
|
||||||
|
};
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
class CCore;
|
class CCore;
|
||||||
|
@ -24,17 +29,29 @@ class CTile;
|
||||||
class CTileBank
|
class CTileBank
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
CTileBank();
|
CTileBank();
|
||||||
~CTileBank();
|
~CTileBank();
|
||||||
|
|
||||||
void AddTileSet(char *Filename);
|
void AddTileSet(char *Filename);
|
||||||
int NeedLoad() {return(LoadFlag);}
|
int NeedLoad() {return(LoadFlag);}
|
||||||
void LoadTileSets(CCore *Core);
|
void Reload();
|
||||||
CTile &GetTile(int Bank,int Tile);
|
void LoadTileSets(CCore *Core);
|
||||||
|
CTile &GetTile(int Bank,int Tile);
|
||||||
|
|
||||||
|
void RenderSet(CCore *Core,Vec &CamPos,BOOL Is3d);
|
||||||
|
void FindCursorPos(CCore *Core,CMapEditView *View,Vec &CamPos,CPoint &MousePos);
|
||||||
|
|
||||||
|
void LButtonControl(CCore *Core,CMapEditView *View,UINT nFlags, CPoint &point,BOOL DownFlag);
|
||||||
|
void RButtonControl(CCore *Core,CMapEditView *View,UINT nFlags, CPoint &point,BOOL DownFlag);
|
||||||
|
|
||||||
|
void InitGUI(CCore *Core);
|
||||||
|
void UpdateGUI(CCore *Core);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
std::vector<CTileSet> TileSet;
|
std::vector<CTileSet> TileSet;
|
||||||
BOOL LoadFlag;
|
BOOL LoadFlag;
|
||||||
|
int CursPos;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -50,7 +67,11 @@ public:
|
||||||
char *GetPath() {return(Path);}
|
char *GetPath() {return(Path);}
|
||||||
char *GetName() {return(Name);}
|
char *GetName() {return(Name);}
|
||||||
CTile &GetTile(int No) {return(Tile[No]);}
|
CTile &GetTile(int No) {return(Tile[No]);}
|
||||||
|
void Purge();
|
||||||
|
void Render2d(CCore *Core,Vec &CamPos,int CursorPos,int LTile,int RTile);
|
||||||
|
void Render3d(CCore *Core,Vec &CamPos,int CursorPos,int LTile,int RTile);
|
||||||
|
void RenderMisc(BOOL LSelFlag,BOOL RSelFlag, BOOL GridFlag,BOOL CursorFlag);
|
||||||
|
int FindCursorPos(CCore *Core,CMapEditView *View,Vec &CamPos,CPoint &MousePos);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
char Path[256],Name[256];
|
char Path[256],Name[256];
|
||||||
|
|
|
@ -10,42 +10,20 @@
|
||||||
#define IDR_TOOLBAR 128
|
#define IDR_TOOLBAR 128
|
||||||
#define IDR_MAPEDITYPE 129
|
#define IDR_MAPEDITYPE 129
|
||||||
#define IDD_TRASHHEAP 142
|
#define IDD_TRASHHEAP 142
|
||||||
#define IDD_TEST1 145
|
|
||||||
#define IDD_TEST2 146
|
|
||||||
#define IDD_LAYER_LIST_DIALOG 147
|
#define IDD_LAYER_LIST_DIALOG 147
|
||||||
|
#define IDD_TILESET_DIALOG 148
|
||||||
#define IDC_PARAMBAR_LAYER_LIST 1011
|
#define IDC_PARAMBAR_LAYER_LIST 1011
|
||||||
#define IDC_TILETOOLBAR_COMBO 1013
|
#define IDC_TILETOOLBAR_COMBO 1013
|
||||||
#define IDC_TOOLBAR_COMBO 1018
|
#define IDC_TOOLBAR_COMBO 1018
|
||||||
#define IDC_LIST1 1019
|
#define IDC_LIST1 1019
|
||||||
#define IDC_LAYER_LIST 1019
|
#define IDC_LAYER_LIST 1019
|
||||||
#define IDC_CHECK1 1023
|
#define IDC_TILESETDLG_BTN_UPDATE 1029
|
||||||
#define IDC_CHECK2 1024
|
#define IDC_TILESETDLG_COMBO 1030
|
||||||
#define IDC_EDIT1 1024
|
|
||||||
#define IDC_CHECK3 1025
|
|
||||||
#define IDC_EDIT2 1025
|
|
||||||
#define IDC_CHECK4 1026
|
|
||||||
#define IDC_EDIT3 1026
|
|
||||||
#define IDC_CHECK5 1027
|
|
||||||
#define IDC_EDIT4 1027
|
|
||||||
#define IDC_CHECK6 1028
|
|
||||||
#define IDC_COMBO1 1028
|
|
||||||
#define IDC_CHECK7 1029
|
|
||||||
#define IDC_COMBO2 1029
|
|
||||||
#define IDC_CHECK8 1030
|
|
||||||
#define IDC_COMBO3 1030
|
|
||||||
#define IDC_COMBO4 1031
|
|
||||||
#define IDC_CHECK9 1039
|
|
||||||
#define IDC_CHECK10 1040
|
|
||||||
#define IDC_CHECK11 1041
|
|
||||||
#define IDC_CHECK12 1042
|
|
||||||
#define IDC_CHECK13 1043
|
|
||||||
#define IDC_CHECK14 1044
|
|
||||||
#define IDC_CHECK15 1045
|
|
||||||
#define IDC_CHECK16 1046
|
|
||||||
#define ID_TOOLBAR_LAYERBAR 32773
|
#define ID_TOOLBAR_LAYERBAR 32773
|
||||||
#define ID_TOOLBAR_TILEPALETTE 32774
|
#define ID_TOOLBAR_TILEPALETTE 32774
|
||||||
#define ID_TOOLBAR_COMBO 32777
|
#define ID_TOOLBAR_COMBO 32777
|
||||||
#define ID_TOOLBAR_PARAMBAR 32783
|
#define ID_TOOLBAR_PARAMBAR 32783
|
||||||
|
#define ID_TOOLBAR_GRID 32784
|
||||||
#define ID_INDICATOR_CURSORXY 59142
|
#define ID_INDICATOR_CURSORXY 59142
|
||||||
|
|
||||||
// Next default values for new objects
|
// Next default values for new objects
|
||||||
|
@ -53,9 +31,9 @@
|
||||||
#ifdef APSTUDIO_INVOKED
|
#ifdef APSTUDIO_INVOKED
|
||||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||||
#define _APS_3D_CONTROLS 1
|
#define _APS_3D_CONTROLS 1
|
||||||
#define _APS_NEXT_RESOURCE_VALUE 148
|
#define _APS_NEXT_RESOURCE_VALUE 151
|
||||||
#define _APS_NEXT_COMMAND_VALUE 32784
|
#define _APS_NEXT_COMMAND_VALUE 32785
|
||||||
#define _APS_NEXT_CONTROL_VALUE 1029
|
#define _APS_NEXT_CONTROL_VALUE 1031
|
||||||
#define _APS_NEXT_SYMED_VALUE 101
|
#define _APS_NEXT_SYMED_VALUE 101
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue