This commit is contained in:
Daveo 2000-11-03 22:40:41 +00:00
parent 46791b36f4
commit 84eb6ded52
15 changed files with 243 additions and 108 deletions

View file

@ -30,7 +30,6 @@ BOOL Test3dFlag=TRUE;
/*****************************************************************************/ /*****************************************************************************/
CCore::CCore() CCore::CCore()
{ {
MouseMode=MOUSE_MODE_NONE;
Layers[LAYER_TYPE_BACK]= new CLayerBack(this); Layers[LAYER_TYPE_BACK]= new CLayerBack(this);
Layers[LAYER_TYPE_MID]= new CLayerMid(this); Layers[LAYER_TYPE_MID]= new CLayerMid(this);
Layers[LAYER_TYPE_ACTION]= new CLayerAction(this); Layers[LAYER_TYPE_ACTION]= new CLayerAction(this);
@ -51,14 +50,13 @@ int i;
void CCore::Init(CMapEditView *Wnd) void CCore::Init(CMapEditView *Wnd)
{ {
ParentWindow=Wnd; ParentWindow=Wnd;
ActiveLayer=0; ActiveLayer=LAYER_TYPE_ACTION;
MapCam=Vec(0,0,0); MapCam=Vec(0,0,0);
TileCam=Vec(0,0,0); TileCam=Vec(0,0,0);
UpdateView(); UpdateView();
RenderFlag=TRUE;
TileSet.push_back(CTileSet("c:/temp/3/test.gin",this)); TileSet.push_back(CTileSet("c:/temp/3/test.gin",this));
TRACE1("%i\n",TileSet.size());
} }
/*****************************************************************************/ /*****************************************************************************/
@ -68,21 +66,26 @@ void CCore::Render()
{ {
Vec &ThisCam=GetCam(); Vec &ThisCam=GetCam();
if (GetTileView()) if (RenderFlag)
{ {
RenderFlag=FALSE;
} glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
else if (GetTileView())
{
for (int i=0;i<LAYER_TYPE_MAX;i++)
{ {
if (i==LAYER_TYPE_ACTION)
glEnable(GL_DEPTH_TEST);
Layers[i]->Render(ThisCam,Test3dFlag);
glDisable(GL_DEPTH_TEST);
} }
else
{
for (int i=0;i<LAYER_TYPE_MAX;i++)
{
Layers[i]->Render(ThisCam,Test3dFlag);
}
}
Layers[ActiveLayer]->RenderGrid(ThisCam);
} }
// Calc CursorPos
Layers[ActiveLayer]->FindCursorPos(ThisCam,CurrentMousePos);
} }
@ -117,8 +120,7 @@ void CCore::MouseWheel(UINT nFlags, short zDelta, CPoint &pt)
void CCore::MouseMove(UINT nFlags, CPoint &point) void CCore::MouseMove(UINT nFlags, CPoint &point)
{ {
Vec Ofs(0,0,0); Vec Ofs(0,0,0);
//float XOfs=0;
//float YOfs=0;
Vec &ThisCam=GetCam(); Vec &ThisCam=GetCam();
// check if active doc // check if active doc
if (theApp.GetCurrent()!=ParentWindow->GetDocument()) return; if (theApp.GetCurrent()!=ParentWindow->GetDocument()) return;
@ -132,8 +134,8 @@ Vec &ThisCam=GetCam();
RECT ThisRect; RECT ThisRect;
ParentWindow->GetWindowRect(&ThisRect); ParentWindow->GetWindowRect(&ThisRect);
XS=ThisCam.z*2;//*Layers[ActiveLayer]->GetLayerZPos(); XS=ThisCam.z*4;//*Layers[ActiveLayer]->GetLayerZPos();
YS=ThisCam.z*2;//*Layers[ActiveLayer]->GetLayerZPos(); YS=ThisCam.z*4;//*Layers[ActiveLayer]->GetLayerZPos();
XS/=((ThisRect.right-ThisRect.left)); XS/=((ThisRect.right-ThisRect.left));
YS/=((ThisRect.bottom-ThisRect.top)); YS/=((ThisRect.bottom-ThisRect.top));
@ -144,10 +146,10 @@ Vec &ThisCam=GetCam();
Ofs.x*=XS; Ofs.x*=XS;
Ofs.y*=YS; Ofs.y*=YS;
TRACE2("Move %i %i \n",point.x,point.y);
UpdateView(Ofs); UpdateView(Ofs);
} }
// Mouse has moved, so need to redraw windows, to get CursorPos (And pos render)
ParentWindow->Invalidate();
} }
@ -176,7 +178,6 @@ CListBox *Dlg=(CListBox *)LayerBar->GetDlgItem(IDC_LAYERBAR_LIST);
ToolBar->GetToolBarCtrl().PressButton(ID_TOOLBAR_LAYERBAR,LayerViewFlag); ToolBar->GetToolBarCtrl().PressButton(ID_TOOLBAR_LAYERBAR,LayerViewFlag);
Frm->ShowControlBar(LayerBar, LayerViewFlag, FALSE); Frm->ShowControlBar(LayerBar, LayerViewFlag, FALSE);
// UpdateView();
} }
/*****************************************************************************/ /*****************************************************************************/
@ -202,7 +203,6 @@ CToolBar *ToolBar=Frm->GetToolBar();
/*****************************************************************************/ /*****************************************************************************/
GLint CCore::GetTile(int Bank,int TileNo) GLint CCore::GetTile(int Bank,int TileNo)
{ {
TRACE1("%i\n",TileSet.size());
return(TileSet[Bank].GetTile(TileNo)); return(TileSet[Bank].GetTile(TileNo));
} }
/*****************************************************************************/ /*****************************************************************************/
@ -225,16 +225,21 @@ void CCore::UpdateAll()
UpdateTileView(TileViewFlag); UpdateTileView(TileViewFlag);
} }
/*****************************************************************************/
void CCore::Redraw(BOOL f)
{
RenderFlag=f;
if (RenderFlag)
ParentWindow->Invalidate();
}
/*****************************************************************************/ /*****************************************************************************/
void CCore::UpdateView(Vec Ofs) void CCore::UpdateView(Vec Ofs)
{ {
Vec &ThisCam=GetCam(); Vec &ThisCam=GetCam();
ThisCam=ThisCam+Ofs; Ofs.y=-Ofs.y;
ThisCam+=Ofs;
if (ThisCam.z>-1) ThisCam.z=-1; if (ThisCam.z>-1) ThisCam.z=-1;
Redraw();
ParentWindow->Invalidate();
} }

View file

@ -14,16 +14,6 @@
#include "TileSet.h" #include "TileSet.h"
/*****************************************************************************/
enum MOUSE_MODE
{
MOUSE_MODE_NONE=0,
MOUSE_MODE_LMB_EDIT,
MOUSE_MODE_MMB_EDIT,
MOUSE_MODE_RMB_EDIT,
};
/*****************************************************************************/ /*****************************************************************************/
class CMapEditView; class CMapEditView;
@ -67,12 +57,15 @@ public:
void UpdateView(Vec Ofs=Vec(0,0,0)); void UpdateView(Vec Ofs=Vec(0,0,0));
Vec &GetCam(); Vec &GetCam();
void SetCursorPos(CPoint &Pos) {CursorPos=Pos;}
CPoint &GetCursorPos() {return(CursorPos);}
CMapEditView *GetParentWindow() {return(ParentWindow);}
void Redraw(BOOL f=TRUE);
private: private:
CMapEditView *ParentWindow; CMapEditView *ParentWindow;
MOUSE_MODE MouseMode;
CPoint CurrentMousePos,LastMousePos; CPoint CurrentMousePos,LastMousePos;
CPoint CursorPos,LastCursorPos;
Vec MapCam,TileCam; Vec MapCam,TileCam;
CLayer *Layers[LAYER_TYPE_MAX]; CLayer *Layers[LAYER_TYPE_MAX];
@ -81,6 +74,7 @@ private:
std::vector<CTileSet> TileSet; std::vector<CTileSet> TileSet;
CTexCache TexCache; CTexCache TexCache;
BOOL RenderFlag;
BOOL TileViewFlag; BOOL TileViewFlag;
BOOL LayerViewFlag; BOOL LayerViewFlag;

View file

@ -216,7 +216,7 @@ void CGLEnabledView::OnDraw(CDC* pDC)
wglMakeCurrent(m_pCDC->GetSafeHdc(), m_hRC); wglMakeCurrent(m_pCDC->GetSafeHdc(), m_hRC);
// clear background // clear background
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); // glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
// call the virtual drawing procedure (to be overridden by user) // call the virtual drawing procedure (to be overridden by user)
OnDrawGL(); OnDrawGL();

View file

@ -8,10 +8,10 @@
#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 "GLEnabledView.h"
//#include "MapEditDoc.h" #include "MapEditDoc.h"
//#include "MapEditView.h" #include "MapEditView.h"
#include "Core.h" #include "Core.h"
#include "Layer.h" #include "Layer.h"
@ -43,9 +43,6 @@ int Height=Map.GetHeight();
/*****************************************************************************/ /*****************************************************************************/
void CLayer::Render(Vec &MapPos,BOOL Is3d) void CLayer::Render(Vec &MapPos,BOOL Is3d)
{ {
if (Is3d && CanRender3d())
Render3d(MapPos);
else
Render2d(MapPos); Render2d(MapPos);
} }
@ -62,7 +59,6 @@ int Height=Map.GetHeight();
glTranslatef(MapPos.x/XYDiv,MapPos.y/XYDiv,MapPos.z); glTranslatef(MapPos.x/XYDiv,MapPos.y/XYDiv,MapPos.z);
glBegin(GL_QUADS); glBegin(GL_QUADS);
SetTestColor();
BuildGLQuad(-1,Width+1,-1,0,0); // Bottom BuildGLQuad(-1,Width+1,-1,0,0); // Bottom
BuildGLQuad(-1,Width+1,Height+1,Height,0); // Top BuildGLQuad(-1,Width+1,Height+1,Height,0); // Top
BuildGLQuad(-1,0,Height,0,0); // Left BuildGLQuad(-1,0,Height,0,0); // Left
@ -73,37 +69,133 @@ int Height=Map.GetHeight();
} }
/*****************************************************************************/ /*****************************************************************************/
float asd=0;
void CLayer::Render3d(Vec &MapPos) void CLayer::Render3d(Vec &MapPos)
{ {
float XYDiv=GetLayerZPosDiv(); float XYDiv=GetLayerZPosDiv();
float X,Y; int MapW=Map.GetWidth();
int XX=0; int MapH=Map.GetHeight();
int YY=0; float StartX=MapPos.x/XYDiv;
float StartY=MapPos.y/XYDiv;
glMatrixMode(GL_MODELVIEW); glMatrixMode(GL_MODELVIEW);
Y=MapPos.y; for (int YLoop=0; YLoop<MapH; YLoop++)
for (YY=0; YY<3; YY++)
{ {
X=MapPos.x; for (int XLoop=0; XLoop<MapW; XLoop++)
for (XX=0; XX<3; XX++)
{ {
glLoadIdentity(); sMapElem &ThisTile=Map.GetTile(XLoop,YLoop);
glTranslatef(X/XYDiv,Y/XYDiv,MapPos.z);
// glRotatef(asd,0,1,0);
// asd+=0.5;
// glCallList(Core->GetTile(0,2));
glCallList(Core->GetTile(0,XX+(YY*3)));
X+=1.0f; glLoadIdentity(); // Slow way, but good to go for the mo
glTranslatef(StartX+XLoop,StartY-YLoop,MapPos.z);
glCallList(Core->GetTile(ThisTile.Bank,ThisTile.Tile));
} }
Y+=1.0f;
} }
} }
/*****************************************************************************/
void CLayer::RenderGrid(Vec &MapPos)
{
float XYDiv=GetLayerZPosDiv();
int MapW=Map.GetWidth();
int MapH=Map.GetHeight();
float StartX=MapPos.x/XYDiv;
float StartY=MapPos.y/XYDiv;
float OverVal=0.5;
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
glTranslatef(StartX,StartY,MapPos.z);
glDisable(GL_TEXTURE_2D);
glBegin(GL_LINES);
glNormal3f( 1,1,1);
glColor3ub(255,255,255);
for (int YLoop=0; YLoop<MapH+1; YLoop++)
{
glVertex3f( 0-OverVal, -YLoop+1, 0);
glVertex3f( MapW+OverVal, -YLoop+1, 0);
}
for (int XLoop=0; XLoop<MapW+1; XLoop++)
{
glVertex3f( XLoop, 0+1+OverVal, 0);
glVertex3f( XLoop, -MapH+1-OverVal, 0);
}
glEnd();
glEnable(GL_TEXTURE_2D);
}
/*****************************************************************************/ /*****************************************************************************/
void CLayer::FindCursorPos(Vec &MapPos,CPoint &MousePos)
{
GLint Viewport[4];
GLuint SelectBuffer[SELECT_BUFFER_SIZE];
int HitCount;
int TileID=0;
CPoint &CursorPos=Core->GetCursorPos();
float XYDiv=GetLayerZPosDiv();
int MapW=Map.GetWidth();
int MapH=Map.GetHeight();
float StartX=MapPos.x/XYDiv;
float StartY=MapPos.y/XYDiv;
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);
Core->GetParentWindow()->SetupPersMatrix();
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
glTranslatef(StartX,StartY,MapPos.z);
for (int YLoop=0; YLoop<MapH; YLoop++)
{
for (int XLoop=0; XLoop<MapW; XLoop++)
{
glLoadName (TileID);
glBegin (GL_QUADS);
BuildGLQuad(XLoop,XLoop+1,-YLoop,-YLoop+1,0);
glEnd();
TileID++;
}
}
HitCount= glRenderMode (GL_RENDER);
glMatrixMode(GL_PROJECTION);
glPopMatrix();
glMatrixMode(GL_MODELVIEW);
CursorPos.x=CursorPos.y=-1;
// TRACE1("Hits %i\n",HitCount);
// Process hits
GLuint *Ptr=SelectBuffer,*BestHit=0;
for (int H=0;H<HitCount;H++)
{
BestHit=Ptr; // Fakeness for the mo
}
if (BestHit)
{
int HitID=BestHit[3];
CursorPos.x=HitID%MapH;
CursorPos.y=HitID/MapW;
}
}
/*****************************************************************************/ /*****************************************************************************/

View file

@ -9,6 +9,13 @@
#include "gl3d.h" #include "gl3d.h"
#include "Map.h" #include "Map.h"
/*****************************************************************************/
enum LAYER_ENUMS
{
SELECT_BUFFER_SIZE=16,
};
/*****************************************************************************/
enum LAYER_TYPE enum LAYER_TYPE
{ {
LAYER_TYPE_BACK=0, LAYER_TYPE_BACK=0,
@ -19,14 +26,6 @@ enum LAYER_TYPE
LAYER_TYPE_MAX LAYER_TYPE_MAX
}; };
/*
struct sMapElem
{
int Bank;
int Tile;
int Flags;
};
*/
/*****************************************************************************/ /*****************************************************************************/
class CCore; class CCore;
@ -46,19 +45,16 @@ virtual char *GetName()=0;
virtual void Render(Vec &MapPos,BOOL Is3d); virtual void Render(Vec &MapPos,BOOL Is3d);
virtual void Render2d(Vec &MapPos); virtual void Render2d(Vec &MapPos);
virtual void Render3d(Vec &MapPos); virtual void Render3d(Vec &MapPos);
virtual void RenderGrid(Vec &MapPos);
virtual float GetLayerZPosDiv()=0; virtual float GetLayerZPosDiv()=0;
virtual BOOL CanRender3d()=0; virtual BOOL CanRender3d()=0;
virtual void SetTestColor()=0;
// Control
virtual void FindCursorPos(Vec &MapPos,CPoint &MousePos);
protected: protected:
// float Width,Height;
CCore *Core; CCore *Core;
// std::vector< std::vector<sMapElem> > Map;
// sMapElem *Map;
CMap Map; CMap Map;
}; };

View file

@ -14,6 +14,11 @@ static char THIS_FILE[] = __FILE__;
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// CMainFrame // CMainFrame
static UINT indicators[] =
{
ID_SEPARATOR, // status line indicator
ID_INDICATOR_CURSORXY,
};
IMPLEMENT_DYNAMIC(CMainFrame, CMDIFrameWnd) IMPLEMENT_DYNAMIC(CMainFrame, CMDIFrameWnd)
@ -21,15 +26,9 @@ BEGIN_MESSAGE_MAP(CMainFrame, CMDIFrameWnd)
//{{AFX_MSG_MAP(CMainFrame) //{{AFX_MSG_MAP(CMainFrame)
ON_WM_CREATE() ON_WM_CREATE()
//}}AFX_MSG_MAP //}}AFX_MSG_MAP
END_MESSAGE_MAP()
static UINT indicators[] =
{ END_MESSAGE_MAP()
ID_SEPARATOR, // status line indicator
ID_INDICATOR_CAPS,
ID_INDICATOR_NUM,
ID_INDICATOR_SCRL,
};
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// CMainFrame construction/destruction // CMainFrame construction/destruction
@ -125,3 +124,5 @@ void CMainFrame::Dump(CDumpContext& dc) const
// CMainFrame message handlers // CMainFrame message handlers

View file

@ -21,6 +21,7 @@ public:
CToolBar *GetToolBar() {return(&m_wndToolBar);} CToolBar *GetToolBar() {return(&m_wndToolBar);}
CDialogBar *GetLayerBar() {return(&m_wndLayerBar);} CDialogBar *GetLayerBar() {return(&m_wndLayerBar);}
CDialogBar *GetTileBar() {return(&m_wndTileBar);} CDialogBar *GetTileBar() {return(&m_wndTileBar);}
CStatusBar *GetStatusBar() {return(&m_wndStatusBar);}
// Operations // Operations
public: public:
@ -52,6 +53,13 @@ protected:
DECLARE_MESSAGE_MAP() DECLARE_MESSAGE_MAP()
}; };
enum STATUS_BAR_ENUM
{
STATUS_BAR_SEP=0,
STATUS_BAR_XPOS,
STATUS_BAR_YPOS,
};
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}} //{{AFX_INSERT_LOCATION}}

View file

@ -4,6 +4,11 @@
#include "stdafx.h" #include "stdafx.h"
#include "gl3d.h"
#include <gl\gl.h>
#include <gl\glu.h>
#include <gl\glut.h>
#include "Map.h" #include "Map.h"
@ -31,7 +36,6 @@ void CMap::SetSize(int Width,int Height)
for (int Y=0;Y<Height;Y++) for (int Y=0;Y<Height;Y++)
for (int X=0;X<Width;X++) for (int X=0;X<Width;X++)
{ {
TRACE2("%i,%i\n",X,Y);
Map[X][Y].Bank=0; Map[X][Y].Bank=0;
Map[X][Y].Tile=(X+Y)%9; Map[X][Y].Tile=(X+Y)%9;
} }

View file

@ -21,12 +21,14 @@ public:
CMap(){}; CMap(){};
~CMap(){}; ~CMap(){};
int GetWidth(); int GetWidth();
int GetHeight(); int GetHeight();
void SetSize(int Width,int Height); void SetSize(int Width,int Height);
void SetWidth(int Width); void SetWidth(int Width);
void SetHeight(int Height); void SetHeight(int Height);
sMapElem &GetTile(int X,int Y) {return(Map[X][Y]);}
protected: protected:
std::vector< std::vector<sMapElem> > Map; std::vector< std::vector<sMapElem> > Map;

View file

@ -20,10 +20,10 @@ Class8=CMapEditView
ResourceCount=6 ResourceCount=6
Resource1=IDR_MAPEDITYPE (English (U.S.)) Resource1=IDR_MAPEDITYPE (English (U.S.))
Resource2=IDR_MAINFRAME (English (U.S.)) Resource2=IDD_LAYERBAR (English (U.S.))
Resource3=IDD_LAYERBAR1 (English (U.S.)) Resource3=IDD_LAYERBAR1 (English (U.S.))
Resource4=IDD_LAYERBAR (English (U.S.)) Resource4=IDD_ABOUTBOX (English (U.S.))
Resource5=IDD_ABOUTBOX (English (U.S.)) Resource5=IDR_MAINFRAME (English (U.S.))
Class9=CTileWindow Class9=CTileWindow
Resource6=IDD_TILEBAR (English (U.S.)) Resource6=IDD_TILEBAR (English (U.S.))

View file

@ -319,6 +319,7 @@ BEGIN
ID_INDICATOR_SCRL "SCRL" ID_INDICATOR_SCRL "SCRL"
ID_INDICATOR_OVR "OVR" ID_INDICATOR_OVR "OVR"
ID_INDICATOR_REC "REC" ID_INDICATOR_REC "REC"
ID_INDICATOR_CURSORXY "CursorXY"
END END
STRINGTABLE DISCARDABLE STRINGTABLE DISCARDABLE

View file

@ -37,6 +37,7 @@ BEGIN_MESSAGE_MAP(CMapEditView, CGLEnabledView)
ON_WM_MOUSEMOVE() ON_WM_MOUSEMOVE()
ON_COMMAND(ID_TOOLBAR_LAYERBAR, OnToolbarLayerbar) ON_COMMAND(ID_TOOLBAR_LAYERBAR, OnToolbarLayerbar)
ON_COMMAND(ID_TOOLBAR_TILEPALETTE, OnToolbarTilepalette) ON_COMMAND(ID_TOOLBAR_TILEPALETTE, OnToolbarTilepalette)
ON_UPDATE_COMMAND_UI(ID_INDICATOR_CURSORXY, OnStatusCursorXY)
//}}AFX_MSG_MAP //}}AFX_MSG_MAP
END_MESSAGE_MAP() END_MESSAGE_MAP()
@ -80,12 +81,35 @@ void CMapEditView::OnCreateGL()
} }
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
void CMapEditView::OnDrawGL() void CMapEditView::OnDrawGL()
{ {
Core.Render(); Core.Render();
} }
/////////////////////////////////////////////////////////////////////////////
void CMapEditView::OnSizeGL(int cx, int cy)
{
glViewport(0,0,cx,cy);
// update the camera
glPushMatrix();
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
SetupPersMatrix();
glMatrixMode(GL_MODELVIEW);
glPopMatrix();
Core.Redraw();
}
/////////////////////////////////////////////////////////////////////////////
void CMapEditView::SetupPersMatrix()
{
gluPerspective(40.0,m_dAspectRatio,0.1f, 100.0f);
glTranslatef(0.0f,0.0f,-4.f);
}
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// CMapEditView diagnostics // CMapEditView diagnostics
@ -126,6 +150,17 @@ void CMapEditView::UpdateAll()
Core.UpdateAll(); Core.UpdateAll();
} }
/*********************************************************************************/
void CMapEditView::OnStatusCursorXY(CCmdUI *pCmdUI)
{
CPoint &XY=Core.GetCursorPos();
CString XYStr;
pCmdUI->Enable();
if (XY.x!=-1 && XY.y!=-1)
XYStr.Format( "%d\t%d", XY.x,XY.y);
pCmdUI->SetText(XYStr);
}
/*********************************************************************************/ /*********************************************************************************/
/*********************************************************************************/ /*********************************************************************************/
/*********************************************************************************/ /*********************************************************************************/
@ -140,3 +175,5 @@ void CMapEditView::OnMouseMove(UINT nFlags, CPoint point) {Core.MouseMove(nFl
void CMapEditView::OnToolbarLayerbar() {Core.ToggleLayerView();} void CMapEditView::OnToolbarLayerbar() {Core.ToggleLayerView();}
void CMapEditView::OnToolbarTilepalette() {Core.ToggleTileView();} void CMapEditView::OnToolbarTilepalette() {Core.ToggleTileView();}

View file

@ -21,6 +21,8 @@ public:
CMapEditDoc* GetDocument(); CMapEditDoc* GetDocument();
void OnCreateGL(); void OnCreateGL();
void OnDrawGL(); void OnDrawGL();
void OnSizeGL(int cx, int cy);
void SetupPersMatrix();
// Operations // Operations
public: public:
@ -57,6 +59,7 @@ protected:
afx_msg void OnMouseMove(UINT nFlags, CPoint point); afx_msg void OnMouseMove(UINT nFlags, CPoint point);
afx_msg void OnToolbarLayerbar(); afx_msg void OnToolbarLayerbar();
afx_msg void OnToolbarTilepalette(); afx_msg void OnToolbarTilepalette();
afx_msg void OnStatusCursorXY(CCmdUI *pCmdUI);
//}}AFX_MSG //}}AFX_MSG
DECLARE_MESSAGE_MAP() DECLARE_MESSAGE_MAP()
}; };

View file

@ -55,17 +55,8 @@ int ChildCount=ThisNode.GetPruneChildCount();
CTile NewTile; 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);
// AddTileToSet(Scene,ThisNode.PruneChildList[Child]);
} }
/*
std::vector<GString> const &Tex=Scene.GetTexNames();
for (i=0;i<Tex.size();i++)
{
TRACE1("%s\n",Tex[i]);
}
*/
return(1); return(1);
} }

View file

@ -16,6 +16,7 @@
#define IDC_TILETOOLBAR_COMBO 1013 #define IDC_TILETOOLBAR_COMBO 1013
#define ID_TOOLBAR_LAYERBAR 32773 #define ID_TOOLBAR_LAYERBAR 32773
#define ID_TOOLBAR_TILEPALETTE 32774 #define ID_TOOLBAR_TILEPALETTE 32774
#define ID_INDICATOR_CURSORXY 59142
// Next default values for new objects // Next default values for new objects
// //