This commit is contained in:
parent
c94e338dd7
commit
afcfbf7547
16 changed files with 351 additions and 184 deletions
|
@ -15,6 +15,8 @@
|
|||
#include "MapEditView.h"
|
||||
#include "MainFrm.h"
|
||||
|
||||
#include "NewMapGUI.h"
|
||||
|
||||
#include "Core.h"
|
||||
#include "Layer.h"
|
||||
#include "LayerTile.h"
|
||||
|
@ -28,23 +30,14 @@
|
|||
/*****************************************************************************/
|
||||
CCore::CCore()
|
||||
{
|
||||
TileViewFlag=FALSE;
|
||||
GridFlag=TRUE;
|
||||
CurrentMousePos=CPoint(0,0);
|
||||
ActiveLayer=0;
|
||||
MapCam=Vec(0,0,0);
|
||||
MapCamOfs=Vec(-15,10,0);
|
||||
TileCam=Vec(0,0,0);
|
||||
TileCamOfs=Vec(-15,10,0);
|
||||
|
||||
Is3dFlag=TRUE;
|
||||
CurrentMousePos=CPoint(0,0);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
CCore::~CCore()
|
||||
{
|
||||
int ListSize=Layer.size();
|
||||
for (int i=0; i<ListSize; i++) delete Layer[i];
|
||||
for (int i=0; i<ListSize; i++) delete Layer[i];
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -54,43 +47,71 @@ CMainFrame *Frm=(CMainFrame*)AfxGetApp()->GetMainWnd();
|
|||
CMultiBar *ParamBar=Frm->GetParamBar();
|
||||
|
||||
ParamBar->RemoveAll();
|
||||
// Add default parram bar items
|
||||
// Add default param bar items
|
||||
ParamBar->Add(Frm->GetLayerList(),IDD_LAYER_LIST_DIALOG,TRUE,TRUE);
|
||||
UpdateParamBar();
|
||||
UpdateAll(NULL);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
void CCore::New()
|
||||
BOOL CCore::New()
|
||||
{
|
||||
// Create Gfx Layers
|
||||
// Name Width Height SizeDiv ViewDiv 3d? Resizable?
|
||||
Layer.push_back(new CLayerTile( "Back", 32, 32, 4.0f, 4.0f, FALSE, FALSE));
|
||||
Layer.push_back(new CLayerTile( "Mid", TileLayerDefaultWidth, TileLayerDefaultHeight, 2.0f, 2.0f, FALSE, TRUE));
|
||||
Layer.push_back(new CLayerTile( "Action", TileLayerDefaultWidth, TileLayerDefaultHeight, 1.0f, 1.0f, TRUE, TRUE));
|
||||
// Layer.push_back(new CLayerTile( "Fore", TileLayerDefaultWidth, TileLayerDefaultHeight, 0.5f, 0.5f, FALSE, TRUE));
|
||||
CNewMapGUI Dlg;
|
||||
int Width,Height;
|
||||
Dlg.m_Width=TileLayerDefaultWidth;
|
||||
Dlg.m_Height=TileLayerDefaultHeight;
|
||||
|
||||
ActiveLayer=LAYER_ACTION;
|
||||
MapCam=Vec(0,0,0);
|
||||
TileCam=Vec(0,0,0);
|
||||
Init();
|
||||
Dlg.m_Back=TRUE;
|
||||
Dlg.m_Mid=TRUE;
|
||||
Dlg.m_Fore=FALSE;
|
||||
|
||||
if (Dlg.DoModal()!=IDOK) return FALSE;
|
||||
Width=Dlg.m_Width;
|
||||
Height=Dlg.m_Height;
|
||||
|
||||
// Create Tile Layers
|
||||
// Type Width Height Scale 3d? Resizable?
|
||||
if (Dlg.m_Back) Layer.push_back(new CLayerTile( CLayerTile::Back, 32, 32, 4.0f, FALSE, FALSE));
|
||||
if (Dlg.m_Mid) Layer.push_back(new CLayerTile( CLayerTile::Mid, Width, Height, 2.0f, FALSE, TRUE));
|
||||
Layer.push_back(new CLayerTile( CLayerTile::Action, Width, Height, 1.0f, TRUE, TRUE));
|
||||
if (Dlg.m_Fore) Layer.push_back(new CLayerTile( CLayerTile::Fore, Width, Height, 0.5f, FALSE, TRUE));
|
||||
|
||||
ActiveLayer=FindActionLayer();
|
||||
MapCam=Vec(0,0,0);
|
||||
MapCamOfs=Vec(-15,10,0);
|
||||
TileCam=Vec(0,0,0);
|
||||
TileCamOfs=Vec(-15,10,0);
|
||||
TileViewFlag=FALSE;
|
||||
GridFlag=TRUE;
|
||||
Is3dFlag=TRUE;
|
||||
Init();
|
||||
return(TRUE);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
void CCore::Load(CFile *File)
|
||||
{
|
||||
float Version;
|
||||
|
||||
File->Read(&Version,sizeof(float));
|
||||
TRACE1("Load Version %g\n",Version);
|
||||
|
||||
File->Read(&MapCam,sizeof(Vec));
|
||||
File->Read(&TileCam,sizeof(Vec));
|
||||
if (Version>=1.0)
|
||||
{
|
||||
File->Read(&MapCam,sizeof(Vec));
|
||||
File->Read(&MapCamOfs,sizeof(Vec));
|
||||
File->Read(&TileCam,sizeof(Vec));
|
||||
File->Read(&TileCamOfs,sizeof(Vec));
|
||||
|
||||
File->Read(&TileViewFlag,sizeof(BOOL));
|
||||
File->Read(&GridFlag,sizeof(BOOL));
|
||||
File->Read(&Is3dFlag,sizeof(BOOL));
|
||||
}
|
||||
if (Version>=1.1)
|
||||
{
|
||||
|
||||
File->Read(&TileCam,sizeof(Vec));
|
||||
|
||||
File->Read(&TileViewFlag,sizeof(BOOL));
|
||||
File->Read(&GridFlag,sizeof(BOOL));
|
||||
File->Read(&Is3dFlag,sizeof(BOOL));
|
||||
}
|
||||
|
||||
|
||||
// Layers
|
||||
|
@ -111,22 +132,20 @@ int LayerCount;
|
|||
|
||||
}
|
||||
}
|
||||
TileBank.Load(File,Version);
|
||||
Init();
|
||||
MapCam=Vec(0,0,0);
|
||||
|
||||
TileBank.Load(File,Version);
|
||||
Init();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
void CCore::Save(CFile *File)
|
||||
{
|
||||
|
||||
// Version 1
|
||||
File->Write(&FileVersion,sizeof(float));
|
||||
|
||||
File->Write(&MapCam,sizeof(Vec));
|
||||
File->Write(&MapCamOfs,sizeof(Vec));
|
||||
File->Write(&TileCam,sizeof(Vec));
|
||||
|
||||
File->Write(&TileCam,sizeof(Vec));
|
||||
File->Write(&TileCamOfs,sizeof(Vec));
|
||||
|
||||
File->Write(&TileViewFlag,sizeof(BOOL));
|
||||
File->Write(&GridFlag,sizeof(BOOL));
|
||||
|
@ -542,6 +561,28 @@ void CCore::Toggle2d3d(CMapEditView *View)
|
|||
UpdateView(View);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
int CCore::FindLayer(int Type,int SubType)
|
||||
{
|
||||
int ListSize=Layer.size();
|
||||
|
||||
for (int i=0; i<ListSize; i++)
|
||||
{
|
||||
if (Layer[i]->GetType()==Type)
|
||||
if (SubType==-1 || Layer[i]->GetSubType()==SubType)
|
||||
return(i);
|
||||
}
|
||||
return(-1);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
int CCore::FindActionLayer()
|
||||
{
|
||||
int Idx=FindLayer(LAYER_TYPE_TILE,CLayerTile::Action);
|
||||
|
||||
return(Idx);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
Vec CCore::OffsetCam(Vec &Cam,float DivVal)
|
||||
|
|
|
@ -22,18 +22,11 @@ class CMapEditView;
|
|||
class CCore
|
||||
{
|
||||
public:
|
||||
enum
|
||||
{
|
||||
LAYER_BACK=0,
|
||||
LAYER_MID,
|
||||
LAYER_ACTION,
|
||||
LAYER_FORE,
|
||||
};
|
||||
CCore();
|
||||
~CCore();
|
||||
|
||||
void Init();
|
||||
void New();
|
||||
BOOL New();
|
||||
void Load(CFile *File);
|
||||
void Save(CFile *File);
|
||||
void Render(CMapEditView *View,BOOL ForceRender=FALSE);
|
||||
|
@ -71,9 +64,6 @@ public:
|
|||
// Layers
|
||||
void SetLayer(int Layer);
|
||||
void UpdateLayerGUI(CMapEditView *View);
|
||||
// void SetActiveLayer(int Layer);
|
||||
// int GetActiveLayer() {return(ActiveLayer);}
|
||||
// CLayer *GetLayer(int i) {return(Layer[i]);}
|
||||
|
||||
// Grid
|
||||
void UpdateGrid(CMapEditView *View,BOOL Toggle=FALSE);
|
||||
|
@ -94,11 +84,12 @@ public:
|
|||
CPoint &GetCursorPos() {return(CursorPos);}
|
||||
|
||||
void SetMapSize(CMapEditView *View,int Width,int Height);
|
||||
int GetMapWidth() {return(Layer[LAYER_ACTION]->GetWidth());}
|
||||
int GetMapHeight() {return(Layer[LAYER_ACTION]->GetHeight());}
|
||||
int GetMapWidth() {return(Layer[FindActionLayer()]->GetWidth());}
|
||||
int GetMapHeight() {return(Layer[FindActionLayer()]->GetHeight());}
|
||||
|
||||
void Toggle2d3d(CMapEditView *View);
|
||||
|
||||
int FindLayer(int Type,int SubType=-1);
|
||||
int FindActionLayer();
|
||||
|
||||
private:
|
||||
CPoint CurrentMousePos,LastMousePos;
|
||||
|
@ -118,7 +109,6 @@ private:
|
|||
BOOL GridFlag;
|
||||
BOOL Is3dFlag;
|
||||
|
||||
|
||||
};
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
|
@ -20,15 +20,3 @@
|
|||
/*****************************************************************************/
|
||||
/*****************************************************************************/
|
||||
/*****************************************************************************/
|
||||
char *CLayer::GetName()
|
||||
{
|
||||
return(Name);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
void CLayer::SetName(char *_Name)
|
||||
{
|
||||
sprintf(Name,"%s",_Name);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
|
@ -33,14 +33,13 @@ public:
|
|||
CLayer(){};
|
||||
virtual ~CLayer(){};
|
||||
|
||||
virtual char *GetName();
|
||||
virtual void SetName(char *_Name);
|
||||
|
||||
virtual char *GetName()=0;
|
||||
virtual void SetVisible(BOOL f) {VisibleFlag=f;}
|
||||
virtual BOOL IsVisible() {return(VisibleFlag);}
|
||||
virtual int GetType()=0;
|
||||
virtual int GetSubType() {return(-1);}
|
||||
|
||||
virtual float GetLayerZPosDiv() {return(ZPosDiv);}
|
||||
virtual float GetScaleFactor() {return(ScaleFactor);}
|
||||
|
||||
virtual void Render(CCore *Core,Vec &CamPos,BOOL Is3d)=0;
|
||||
virtual void RenderGrid(CCore *Core,Vec &CamPos,BOOL Active)=0;
|
||||
|
@ -72,10 +71,8 @@ virtual BOOL MirrorX(CCore *Core){return(FALSE);};
|
|||
virtual BOOL MirrorY(CCore *Core){return(FALSE);};
|
||||
|
||||
protected:
|
||||
|
||||
char Name[256];
|
||||
BOOL Render3dFlag;
|
||||
float ZPosDiv,MapSizeDiv;
|
||||
float ScaleFactor;
|
||||
BOOL ResizeFlag;
|
||||
BOOL VisibleFlag;
|
||||
|
||||
|
|
|
@ -21,16 +21,24 @@
|
|||
#include "Utils.h"
|
||||
#include "Export.h"
|
||||
|
||||
/*****************************************************************************/
|
||||
char *CLayerTile::LayerName[]=
|
||||
{
|
||||
"Back",
|
||||
"Mid",
|
||||
"Action",
|
||||
"Fore",
|
||||
};
|
||||
|
||||
/*****************************************************************************/
|
||||
/*****************************************************************************/
|
||||
/*****************************************************************************/
|
||||
// New Layer
|
||||
CLayerTile::CLayerTile(char *_Name,int Width,int Height,float MapDiv,float ZDiv,BOOL Is3d,BOOL Resizable)
|
||||
CLayerTile::CLayerTile(int _SubType,int Width,int Height,float Scale,BOOL Is3d,BOOL Resizable)
|
||||
{
|
||||
SetName(_Name);
|
||||
ZPosDiv=ZDiv;
|
||||
MapSizeDiv=MapDiv;
|
||||
// SetName(_Name);
|
||||
SubType=_SubType;
|
||||
ScaleFactor=Scale;
|
||||
ResizeFlag=Resizable;
|
||||
Render3dFlag=Is3d;
|
||||
VisibleFlag=TRUE;
|
||||
|
@ -38,7 +46,7 @@ CLayerTile::CLayerTile(char *_Name,int Width,int Height,float MapDiv,float ZDiv,
|
|||
|
||||
if (ResizeFlag)
|
||||
{
|
||||
Map.SetSize(Width/MapDiv,Height/MapDiv,TRUE);
|
||||
Map.SetSize(Width/ScaleFactor,Height/ScaleFactor,TRUE);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -62,18 +70,19 @@ CLayerTile::~CLayerTile()
|
|||
void CLayerTile::Load(CFile *File,float Version)
|
||||
{
|
||||
// Version 1
|
||||
File->Read(Name,256);
|
||||
File->Read(&Render3dFlag,sizeof(BOOL));
|
||||
File->Read(&ZPosDiv,sizeof(float));
|
||||
File->Read(&MapSizeDiv,sizeof(float));
|
||||
File->Read(&ResizeFlag,sizeof(BOOL));
|
||||
File->Read(&VisibleFlag,sizeof(BOOL));
|
||||
File->Read(&Mode,sizeof(MouseMode));
|
||||
Map.Load(File,Version);
|
||||
if (Version>=1.0)
|
||||
{
|
||||
File->Read(&Render3dFlag,sizeof(BOOL));
|
||||
File->Read(&ScaleFactor,sizeof(float));
|
||||
File->Read(&ResizeFlag,sizeof(BOOL));
|
||||
File->Read(&VisibleFlag,sizeof(BOOL));
|
||||
File->Read(&Mode,sizeof(MouseMode));
|
||||
File->Read(&SubType,sizeof(int));
|
||||
Map.Load(File,Version);
|
||||
}
|
||||
|
||||
TRACE1("%s ",Name);
|
||||
TRACE1("Div:%g ",ZPosDiv);
|
||||
TRACE1("Size:%g ",MapSizeDiv);
|
||||
TRACE1("%s\t",GetName());
|
||||
TRACE1("Scl:%g\t",ScaleFactor);
|
||||
TRACE1("%i\n",VisibleFlag);
|
||||
|
||||
|
||||
|
@ -84,13 +93,12 @@ void CLayerTile::Save(CFile *File)
|
|||
{
|
||||
// Always Save current version
|
||||
|
||||
File->Write(Name,256);
|
||||
File->Write(&Render3dFlag,sizeof(BOOL));
|
||||
File->Write(&ZPosDiv,sizeof(float));
|
||||
File->Write(&MapSizeDiv,sizeof(float));
|
||||
File->Write(&ScaleFactor,sizeof(float));
|
||||
File->Write(&ResizeFlag,sizeof(BOOL));
|
||||
File->Write(&VisibleFlag,sizeof(BOOL));
|
||||
File->Write(&Mode,sizeof(MouseMode));
|
||||
File->Write(&SubType,sizeof(SubType));
|
||||
Map.Save(File);
|
||||
}
|
||||
|
||||
|
@ -99,7 +107,7 @@ void CLayerTile::Resize(int Width,int Height)
|
|||
{
|
||||
if (!ResizeFlag) return; // Its a fixed size, so DONT DO IT!
|
||||
|
||||
Map.Resize(Width/MapSizeDiv,Height/MapSizeDiv);
|
||||
Map.Resize(Width/ScaleFactor,Height/ScaleFactor);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -107,7 +115,7 @@ void CLayerTile::Resize(int Width,int Height)
|
|||
/*****************************************************************************/
|
||||
void CLayerTile::Render(CCore *Core,Vec &CamPos,BOOL Is3d)
|
||||
{
|
||||
Vec ThisCam=Core->OffsetCam(CamPos,GetLayerZPosDiv());
|
||||
Vec ThisCam=Core->OffsetCam(CamPos,GetScaleFactor());
|
||||
|
||||
if (Is3d && Render3dFlag)
|
||||
{
|
||||
|
@ -126,7 +134,7 @@ void CLayerTile::RenderCursorPaint(CCore *Core,Vec &CamPos,BOOL Is3d)
|
|||
{
|
||||
CTileBank &TileBank=Core->GetTileBank();
|
||||
//Vec ThisCam=CamPos;
|
||||
Vec ThisCam=Core->OffsetCam(CamPos,GetLayerZPosDiv());
|
||||
Vec ThisCam=Core->OffsetCam(CamPos,GetScaleFactor());
|
||||
CPoint &CursPos=Core->GetCursorPos();
|
||||
CMap &Brush=TileBank.GetActiveBrush();
|
||||
|
||||
|
@ -188,7 +196,7 @@ void CLayerTile::RenderGrid(CCore *Core,Vec &CamPos,BOOL Active)
|
|||
{
|
||||
int Width=Map.GetWidth();
|
||||
int Height=Map.GetHeight();
|
||||
Vec ThisCam=Core->OffsetCam(CamPos,GetLayerZPosDiv());
|
||||
Vec ThisCam=Core->OffsetCam(CamPos,GetScaleFactor());
|
||||
float OverVal=0.5;
|
||||
|
||||
glMatrixMode(GL_MODELVIEW);
|
||||
|
@ -232,8 +240,7 @@ CPoint &CursorPos=Core->GetCursorPos();
|
|||
|
||||
int Width=Map.GetWidth();
|
||||
int Height=Map.GetHeight();
|
||||
Vec ThisCam=Core->OffsetCam(CamPos,GetLayerZPosDiv());
|
||||
|
||||
Vec ThisCam=Core->OffsetCam(CamPos,GetScaleFactor());
|
||||
|
||||
glGetIntegerv(GL_VIEWPORT, Viewport);
|
||||
glSelectBuffer (SELECT_BUFFER_SIZE, SelectBuffer );
|
||||
|
@ -483,5 +490,5 @@ BOOL CLayerTile::Paint(CMap &Blk,CPoint &CursorPos)
|
|||
/*****************************************************************************/
|
||||
void CLayerTile::Export(CExport &Exp)
|
||||
{
|
||||
Exp.ExportLayerTile(Name,Map);
|
||||
Exp.ExportLayerTile(GetName(),Map);
|
||||
}
|
||||
|
|
|
@ -7,8 +7,6 @@
|
|||
|
||||
#include "Layer.h"
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
/*****************************************************************************/
|
||||
enum TileLayerEnum
|
||||
{
|
||||
|
@ -27,7 +25,6 @@ public:
|
|||
{
|
||||
MouseModePaint=0,
|
||||
MouseModeSelect,
|
||||
MouseModePicker,
|
||||
};
|
||||
enum MouseFlag
|
||||
{
|
||||
|
@ -35,12 +32,21 @@ public:
|
|||
MouseFlagMirrorY=1<<1,
|
||||
MouseFlagMirrorXY=MouseFlagMirrorX|MouseFlagMirrorY,
|
||||
};
|
||||
enum SubType
|
||||
{
|
||||
Back=0,
|
||||
Mid,
|
||||
Action,
|
||||
Fore,
|
||||
};
|
||||
|
||||
CLayerTile(char *_Name,int Width,int Height,float MapDiv,float ZDiv,BOOL Is3d,BOOL Resizable); // New Layer
|
||||
CLayerTile(int SubType,int Width,int Height,float Scale,BOOL Is3d,BOOL Resizable); // New Layer
|
||||
CLayerTile(CFile *File,int Version); // Load Layer
|
||||
~CLayerTile();
|
||||
|
||||
int GetType() {return(LAYER_TYPE_TILE);}
|
||||
int GetSubType() {return(SubType);}
|
||||
char *GetName() {return(LayerName[SubType]);}
|
||||
|
||||
void Render(CCore *Core,Vec &CamPos,BOOL Is3d);
|
||||
void RenderGrid(CCore *Core,Vec &CamPos,BOOL Active);
|
||||
|
@ -79,8 +85,11 @@ protected:
|
|||
BOOL Paint(CMap &Blk,CPoint &CursorPos);
|
||||
|
||||
CMap Map;
|
||||
|
||||
int SubType;
|
||||
MouseMode Mode;
|
||||
|
||||
static char *LayerName[];
|
||||
|
||||
};
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
|
@ -2,13 +2,13 @@
|
|||
|
||||
[General Info]
|
||||
Version=1
|
||||
LastClass=CLayerTileGUI
|
||||
LastClass=CNewMapGUI
|
||||
LastTemplate=CDialog
|
||||
NewFileInclude1=#include "stdafx.h"
|
||||
NewFileInclude2=#include "mapedit.h"
|
||||
LastPage=0
|
||||
|
||||
ClassCount=12
|
||||
ClassCount=13
|
||||
Class1=CChildFrame
|
||||
Class2=CGLEnabledView
|
||||
Class3=CMainFrame
|
||||
|
@ -17,21 +17,24 @@ Class5=CAboutDlg
|
|||
Class6=CMapEditDoc
|
||||
Class7=CMapEditView
|
||||
|
||||
ResourceCount=9
|
||||
Resource1=IDR_MAINFRAME (English (U.S.))
|
||||
Resource2=IDD_ABOUTBOX (English (U.S.))
|
||||
Resource3=IDD_MULTIBAR (English (U.S.))
|
||||
ResourceCount=11
|
||||
Resource1=IDD_MULTIBAR (English (U.S.))
|
||||
Resource2=IDD_LAYERTILE_GUI
|
||||
Resource3=IDR_TOOLBAR (English (U.S.))
|
||||
Resource4=IDD_DIALOGBAR (English (U.S.))
|
||||
Resource5=IDR_TOOLBAR (English (U.S.))
|
||||
Resource5=IDD_LAYER_LIST_DIALOG
|
||||
Class8=CMultiBar
|
||||
Resource6=IDD_LAYER_LIST_DIALOG
|
||||
Resource6=IDR_MAINFRAME (English (U.S.))
|
||||
Resource7=IDR_MAPEDITYPE (English (U.S.))
|
||||
Class9=CLayerList
|
||||
Class10=CMapSizeDlg
|
||||
Resource8=IDD_LAYERTILE_GUI
|
||||
Resource8=IDD_MAPSIZE
|
||||
Class11=CGfxToolBar
|
||||
Class12=CLayerTileGUI
|
||||
Resource9=IDD_MAPSIZE
|
||||
Resource9=IDD_NEW_LAYER
|
||||
Resource10=IDD_ABOUTBOX (English (U.S.))
|
||||
Class13=CNewMapGUI
|
||||
Resource11=IDD_NEWMAP
|
||||
|
||||
[CLS:CChildFrame]
|
||||
Type=0
|
||||
|
@ -264,3 +267,43 @@ Filter=D
|
|||
VirtualFilter=dWC
|
||||
LastObject=IDD_LAYERTILE_LIST
|
||||
|
||||
[DLG:IDD_NEW_LAYER]
|
||||
Type=1
|
||||
Class=?
|
||||
ControlCount=12
|
||||
Control1=IDOK,button,1342242817
|
||||
Control2=IDCANCEL,button,1342242816
|
||||
Control3=IDC_NEW_LAYER_TYPE_LIST,combobox,1344340226
|
||||
Control4=IDC_NEW_LAYER_TYPE_NAME,static,1342308352
|
||||
Control5=IDC_NEW_LAYER_WIDTH_NAME,static,1342308352
|
||||
Control6=IDC_NEW_LAYER_HEIGHT_NAME,static,1342308352
|
||||
Control7=IDC_NEW_LAYER_WIDTH_EDIT,edit,1350631552
|
||||
Control8=IDC_NEW_LAYER_HEIGHT_EDIT,edit,1350631552
|
||||
Control9=IDC_NEW_LAYER_NAME_NAME,static,1342308352
|
||||
Control10=IDC_NEW_LAYER_NAME_EDIT,edit,1350631552
|
||||
Control11=IDC_NEW_LAYER_WIDTH_NAME2,static,1342308352
|
||||
Control12=IDC_NEW_LAYER_WIDTH_EDIT2,edit,1350631552
|
||||
|
||||
[DLG:IDD_NEWMAP]
|
||||
Type=1
|
||||
Class=CNewMapGUI
|
||||
ControlCount=9
|
||||
Control1=IDOK,button,1342177281
|
||||
Control2=IDCANCEL,button,1342177280
|
||||
Control3=IDC_MAPSIZE_WIDTH_TEXT,static,1342308866
|
||||
Control4=IDC_MAPSIZE_WIDTH,edit,1350639744
|
||||
Control5=IDC_MAPSIZE_HEIGHT_TEXT,static,1342308866
|
||||
Control6=IDC_MAPSIZE_HEIGHT,edit,1350639744
|
||||
Control7=IDC_NEWMAP_BACK_CHECK,button,1476460547
|
||||
Control8=IDC_NEWMAP_MID_CHECK,button,1476460547
|
||||
Control9=IDC_NEWMAP_FORE_CHECK,button,1342242819
|
||||
|
||||
[CLS:CNewMapGUI]
|
||||
Type=0
|
||||
HeaderFile=NewMapGUI.h
|
||||
ImplementationFile=NewMapGUI.cpp
|
||||
BaseClass=CDialog
|
||||
Filter=D
|
||||
LastObject=CNewMapGUI
|
||||
VirtualFilter=dWC
|
||||
|
||||
|
|
|
@ -96,9 +96,8 @@ BOOL CMapEditApp::InitInstance()
|
|||
CCommandLineInfo cmdInfo;
|
||||
ParseCommandLine(cmdInfo);
|
||||
// Prevent creating new doc on startup (should still open cmd line file tho)
|
||||
#ifndef _DEBUG
|
||||
// if (cmdInfo.m_nShellCommand==CCommandLineInfo::FileNew) cmdInfo.m_nShellCommand=CCommandLineInfo::FileNothing;
|
||||
#endif
|
||||
if (cmdInfo.m_nShellCommand==CCommandLineInfo::FileNew) cmdInfo.m_nShellCommand=CCommandLineInfo::FileNothing;
|
||||
|
||||
// Dispatch commands specified on the command line
|
||||
if (!ProcessShellCommand(cmdInfo)) return FALSE;
|
||||
|
||||
|
|
|
@ -328,14 +328,6 @@ SOURCE=.\res\Toolbar.bmp
|
|||
# PROP Default_Filter ""
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\GfxToolBar.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\GfxToolBar.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\LayerList.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
@ -344,6 +336,14 @@ SOURCE=.\LayerList.h
|
|||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\LayerTileGUI.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\LayerTileGUI.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\MapSizeDlg.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
@ -360,11 +360,11 @@ SOURCE=.\MultiBar.h
|
|||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\TileSetDlg.cpp
|
||||
SOURCE=.\NewMapGUI.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\TileSetDlg.h
|
||||
SOURCE=.\NewMapGUI.h
|
||||
# End Source File
|
||||
# End Group
|
||||
# End Group
|
||||
|
|
|
@ -197,7 +197,7 @@ BEGIN
|
|||
DEFPUSHBUTTON "OK",IDOK,178,7,50,14,WS_GROUP
|
||||
END
|
||||
|
||||
IDD_MULTIBAR DIALOGEX 0, 0, 251, 174
|
||||
IDD_MULTIBAR DIALOGEX 0, 0, 156, 71
|
||||
STYLE WS_CHILD
|
||||
EXSTYLE WS_EX_TOOLWINDOW
|
||||
FONT 8, "MS Sans Serif"
|
||||
|
@ -270,9 +270,9 @@ BEGIN
|
|||
IDD_MULTIBAR, DIALOG
|
||||
BEGIN
|
||||
LEFTMARGIN, 7
|
||||
RIGHTMARGIN, 244
|
||||
RIGHTMARGIN, 149
|
||||
TOPMARGIN, 7
|
||||
BOTTOMMARGIN, 167
|
||||
BOTTOMMARGIN, 64
|
||||
END
|
||||
END
|
||||
#endif // APSTUDIO_INVOKED
|
||||
|
@ -490,6 +490,47 @@ BEGIN
|
|||
IDC_MAPSIZE_WARNING,5,40,110,20
|
||||
END
|
||||
|
||||
IDD_NEW_LAYER DIALOG DISCARDABLE 0, 0, 302, 236
|
||||
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "Dialog"
|
||||
FONT 8, "MS Sans Serif"
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "OK",IDOK,245,215,50,14
|
||||
PUSHBUTTON "Cancel",IDCANCEL,190,215,50,14
|
||||
COMBOBOX IDC_NEW_LAYER_TYPE_LIST,45,20,105,110,CBS_DROPDOWN |
|
||||
CBS_SORT | WS_VSCROLL | WS_TABSTOP
|
||||
LTEXT "Layer Type",IDC_NEW_LAYER_TYPE_NAME,5,20,36,10
|
||||
LTEXT "Width",IDC_NEW_LAYER_WIDTH_NAME,5,36,36,10
|
||||
LTEXT "Height",IDC_NEW_LAYER_HEIGHT_NAME,5,50,36,10
|
||||
EDITTEXT IDC_NEW_LAYER_WIDTH_EDIT,45,36,30,15,ES_AUTOHSCROLL
|
||||
EDITTEXT IDC_NEW_LAYER_HEIGHT_EDIT,45,50,30,15,ES_AUTOHSCROLL
|
||||
LTEXT "Name",IDC_NEW_LAYER_NAME_NAME,5,5,36,10
|
||||
EDITTEXT IDC_NEW_LAYER_NAME_EDIT,45,5,105,15,ES_AUTOHSCROLL
|
||||
LTEXT "Width",IDC_NEW_LAYER_WIDTH_NAME2,80,35,36,10
|
||||
EDITTEXT IDC_NEW_LAYER_WIDTH_EDIT2,120,35,30,15,ES_AUTOHSCROLL
|
||||
END
|
||||
|
||||
IDD_NEWMAP DIALOG DISCARDABLE 0, 0, 145, 66
|
||||
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION
|
||||
CAPTION "Enter New Size"
|
||||
FONT 8, "MS Sans Serif"
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "OK",IDOK,90,45,50,14,NOT WS_TABSTOP
|
||||
PUSHBUTTON "Cancel",IDCANCEL,35,45,50,14,NOT WS_TABSTOP
|
||||
RTEXT "Width",IDC_MAPSIZE_WIDTH_TEXT,5,5,20,10,SS_CENTERIMAGE
|
||||
EDITTEXT IDC_MAPSIZE_WIDTH,30,5,35,12,ES_AUTOHSCROLL | ES_NUMBER
|
||||
RTEXT "Height",IDC_MAPSIZE_HEIGHT_TEXT,5,20,20,10,
|
||||
SS_CENTERIMAGE
|
||||
EDITTEXT IDC_MAPSIZE_HEIGHT,30,20,35,12,ES_AUTOHSCROLL |
|
||||
ES_NUMBER
|
||||
CONTROL "Create Back Layer",IDC_NEWMAP_BACK_CHECK,"Button",
|
||||
BS_AUTOCHECKBOX | WS_DISABLED | WS_TABSTOP,70,5,75,10
|
||||
CONTROL "Create Mid Layer",IDC_NEWMAP_MID_CHECK,"Button",
|
||||
BS_AUTOCHECKBOX | WS_DISABLED | WS_TABSTOP,70,15,69,10
|
||||
CONTROL "Create Fore Layer",IDC_NEWMAP_FORE_CHECK,"Button",
|
||||
BS_AUTOCHECKBOX | WS_TABSTOP,70,25,72,10
|
||||
END
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
|
@ -522,6 +563,22 @@ BEGIN
|
|||
TOPMARGIN, 7
|
||||
BOTTOMMARGIN, 54
|
||||
END
|
||||
|
||||
IDD_NEW_LAYER, DIALOG
|
||||
BEGIN
|
||||
LEFTMARGIN, 7
|
||||
RIGHTMARGIN, 295
|
||||
TOPMARGIN, 7
|
||||
BOTTOMMARGIN, 229
|
||||
END
|
||||
|
||||
IDD_NEWMAP, DIALOG
|
||||
BEGIN
|
||||
LEFTMARGIN, 7
|
||||
RIGHTMARGIN, 138
|
||||
TOPMARGIN, 7
|
||||
BOTTOMMARGIN, 59
|
||||
END
|
||||
END
|
||||
#endif // APSTUDIO_INVOKED
|
||||
|
||||
|
|
|
@ -41,9 +41,10 @@ BOOL CMapEditDoc::OnNewDocument()
|
|||
{
|
||||
if (!CDocument::OnNewDocument()) return FALSE;
|
||||
TRACE0("New Doc\n");
|
||||
Core.New();
|
||||
|
||||
return TRUE;
|
||||
return(Core.New());
|
||||
|
||||
// return TRUE;
|
||||
}
|
||||
|
||||
BOOL CMapEditDoc::OnOpenDocument(LPCTSTR lpszPathName)
|
||||
|
|
|
@ -42,30 +42,8 @@ CTileBank::CTileBank()
|
|||
LastCursorPos=CursorPos=-1;
|
||||
ActiveBrush=0;
|
||||
SelStart=-1;
|
||||
SelEnd=1;
|
||||
SelEnd=-1;
|
||||
|
||||
#ifdef _DEBUGx
|
||||
AddTileSet("c:/temp/rockp/rockp.gin");
|
||||
// AddTileSet("c:/temp/3/test.gin");
|
||||
|
||||
int W=3;
|
||||
int H=3;
|
||||
CMap &Brush=GetLBrush();
|
||||
|
||||
Brush.SetSize(W,H);
|
||||
sMapElem Blk;
|
||||
Blk.Set=0;
|
||||
Blk.Tile=1;
|
||||
Blk.Flags=0;
|
||||
for (int Y=0; Y<H; Y++)
|
||||
{
|
||||
for (int X=0; X<W; X++)
|
||||
{
|
||||
Brush.Set(X,Y,Blk);
|
||||
Blk.Tile++;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -106,7 +84,7 @@ int ListSize=TileSet.size();
|
|||
Brush[0].Save(File);
|
||||
Brush[1].Save(File);
|
||||
|
||||
for (int i=0;i<ListSize;i++)
|
||||
for (int i=0; i<ListSize; i++)
|
||||
{
|
||||
CTileSet &ThisSet=TileSet[i];
|
||||
char Filename[256+64];
|
||||
|
@ -224,9 +202,16 @@ BOOL CTileBank::Select(int BrushID,BOOL DownFlag)
|
|||
{
|
||||
if (DownFlag && SelStart==-1)
|
||||
{
|
||||
if (CursorPos==-1) return(FALSE);
|
||||
if (CursorPos<0) return(FALSE);
|
||||
SelStart=CursorPos;
|
||||
TRACE3("Start %i=%i,%i\n",SelStart,SelStart%TileBrowserWidth,SelStart/TileBrowserWidth);
|
||||
if (CursorPos==0)
|
||||
{
|
||||
SetBrush(GetBrush(BrushID));
|
||||
SelStart=-1;
|
||||
TRACE0("Selected Blank\n");
|
||||
|
||||
}
|
||||
// TRACE3("Start %i=%i,%i\n",SelStart,SelStart%TileBrowserWidth,SelStart/TileBrowserWidth);
|
||||
}
|
||||
else
|
||||
if (!DownFlag && SelStart!=-1)
|
||||
|
@ -245,18 +230,22 @@ BOOL CTileBank::Select(int BrushID,BOOL DownFlag)
|
|||
/*****************************************************************************/
|
||||
void CTileBank::SetBrush(CMap &ThisBrush)
|
||||
{
|
||||
int BW=TileSet[CurrentSet].GetTileBrowserWidth();
|
||||
CPoint S=IDToPoint(SelStart-1,BW);
|
||||
CPoint E=IDToPoint(SelEnd-1,BW);
|
||||
|
||||
CPoint S=IDToPoint(SelStart,TileBrowserWidth);
|
||||
CPoint E=IDToPoint(SelEnd,TileBrowserWidth);
|
||||
|
||||
CPoint Start=CPoint(min(S.x,E.x), min(S.y,E.y));
|
||||
CPoint End=CPoint( max(S.x,E.x), max(S.y,E.y));
|
||||
int Width=(End.x-Start.x)+1;
|
||||
int Height=(End.y-Start.y)+1;
|
||||
//CPoint Start=CPoint(min(S.x,E.x), min(S.y,E.y));
|
||||
//CPoint End=CPoint( max(S.x,E.x), max(S.y,E.y));
|
||||
//int Width=(End.x-Start.x)+1;
|
||||
//int Height=(End.y-Start.y)+1;
|
||||
int Width=abs(E.x-S.x)+1;
|
||||
int Height=abs(E.y-S.y)+1;
|
||||
|
||||
sMapElem ThisElem;
|
||||
int MaxTile=TileSet[CurrentSet].GetTileCount();
|
||||
|
||||
if (PointToID(End,TileBrowserWidth)>=MaxTile) SelectCancel(); // Invalid selection
|
||||
// if (PointToID(End,BW)>=MaxTile) SelectCancel(); // Invalid selection
|
||||
|
||||
ThisElem.Set=CurrentSet;
|
||||
ThisElem.Flags=0;
|
||||
|
@ -268,7 +257,8 @@ int MaxTile=TileSet[CurrentSet].GetTileCount();
|
|||
{
|
||||
for (int X=0; X<Width; X++)
|
||||
{
|
||||
ThisElem.Tile=PointToID(CPoint(Start.x+X,Start.y+Y),TileBrowserWidth);
|
||||
// ThisElem.Tile=PointToID(CPoint(Start.x+X,Start.y+Y),BW);
|
||||
ThisElem.Tile=SelStart+X+(Y*BW);
|
||||
ThisBrush.Set(X,Y,ThisElem);
|
||||
}
|
||||
}
|
||||
|
@ -341,14 +331,15 @@ u8 Buffer[16*16*3];
|
|||
NewTex.RGB=Buffer;
|
||||
|
||||
TRACE2("Load 2d TileBank (%i,%i)\n",Width,Height);
|
||||
Tile.push_back(CTile(0)); // Insert Blank
|
||||
|
||||
Tile.push_back(CTile(0)); // Insert Blank
|
||||
|
||||
for (int Y=0; Y<Height; Y++)
|
||||
{
|
||||
for (int X=0; X<Width; X++)
|
||||
{
|
||||
BOOL Data=Create16x16Tile(ThisBmp,Buffer,X,(Height-1)-Y);
|
||||
if (Data)
|
||||
// if (Data)
|
||||
{ // Not Blank
|
||||
char Name[256];
|
||||
sprintf(Name,"_2d_%s%i",GetName(),X+(Y*Width));
|
||||
|
@ -360,6 +351,8 @@ u8 Buffer[16*16*3];
|
|||
}
|
||||
|
||||
TexCache.FreeBMP(ThisBmp);
|
||||
TileBrowserWidth=Width;
|
||||
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -399,10 +392,12 @@ CNode &ThisNode=Scene.GetSceneNode(0);
|
|||
int ChildCount=ThisNode.GetPruneChildCount();
|
||||
|
||||
Tile.push_back(CTile(0)); // Insert Blank
|
||||
|
||||
for (int Child=0; Child<ChildCount; Child++)
|
||||
{
|
||||
Tile.push_back(CTile(Core,this,Scene,ThisNode.PruneChildList[Child]));
|
||||
}
|
||||
TileBrowserWidth=DefTileBrowserWidth;
|
||||
|
||||
}
|
||||
|
||||
|
@ -435,8 +430,14 @@ int SelFlag;
|
|||
|
||||
while(TileID!=ListSize)
|
||||
{
|
||||
CPoint Pos=IDToPoint(TileID,TileBrowserWidth);
|
||||
CPoint Pos;//=IDToPoint(TileID,TileBrowserWidth);
|
||||
|
||||
if (TileID==0)
|
||||
Pos=CPoint(-1,-1);
|
||||
else
|
||||
Pos=IDToPoint(TileID-1,TileBrowserWidth);
|
||||
|
||||
|
||||
glLoadIdentity();
|
||||
glTranslatef(CamPos.x+Pos.x*(1+TileBrowserGap),CamPos.y-Pos.y*(1+TileBrowserGap),CamPos.z);
|
||||
|
||||
|
@ -450,6 +451,7 @@ int SelFlag;
|
|||
|
||||
if (SelFlag)
|
||||
{
|
||||
glDisable(GL_TEXTURE_2D);
|
||||
glBegin(GL_QUADS);
|
||||
#ifdef UseLighting
|
||||
glNormal3f( 1,1,1);
|
||||
|
@ -473,6 +475,7 @@ int SelFlag;
|
|||
}
|
||||
|
||||
glEnd();
|
||||
glEnable(GL_TEXTURE_2D);
|
||||
}
|
||||
|
||||
TileID++;
|
||||
|
@ -486,18 +489,27 @@ void CTileSet::RenderCursor(Vec &CamPos,int CursorPos,int SelStart,int SelEnd)
|
|||
int ListSize=Tile.size();
|
||||
CPoint Start,End;
|
||||
int MaxTile=Tile.size();
|
||||
if (CursorPos<0 || CursorPos>ListSize) return;
|
||||
|
||||
if (CursorPos<-1 || CursorPos>ListSize) return;
|
||||
|
||||
if (SelStart==-1)
|
||||
{
|
||||
Start=IDToPoint(CursorPos,TileBrowserWidth);
|
||||
if (CursorPos==0)
|
||||
{
|
||||
Start=CPoint(-1,-1);
|
||||
}
|
||||
else
|
||||
{
|
||||
Start=IDToPoint(CursorPos-1,TileBrowserWidth);
|
||||
}
|
||||
End=Start;
|
||||
}
|
||||
else
|
||||
{
|
||||
CPoint S=IDToPoint(SelStart,TileBrowserWidth);
|
||||
CPoint E=IDToPoint(SelEnd,TileBrowserWidth);
|
||||
|
||||
CPoint S=IDToPoint(SelStart-1,TileBrowserWidth);
|
||||
CPoint E=IDToPoint(SelEnd-1,TileBrowserWidth);
|
||||
|
||||
Start=CPoint( min(S.x,E.x), min(S.y,E.y));
|
||||
End=CPoint( max(S.x,E.x), max(S.y,E.y));
|
||||
if (PointToID(End,TileBrowserWidth)>=MaxTile) return; // Invalid selection
|
||||
|
@ -538,7 +550,12 @@ int TileID=0;
|
|||
|
||||
while(TileID!=ListSize)
|
||||
{
|
||||
CPoint Pos=IDToPoint(TileID,TileBrowserWidth);
|
||||
CPoint Pos;//=IDToPoint(TileID,TileBrowserWidth);
|
||||
|
||||
if (TileID==0)
|
||||
Pos=CPoint(-1,-1);
|
||||
else
|
||||
Pos=IDToPoint(TileID-1,TileBrowserWidth);
|
||||
|
||||
glLoadIdentity();
|
||||
glTranslatef(CamPos.x+Pos.x*(1+TileBrowserGap),CamPos.y-Pos.y*(1+TileBrowserGap),CamPos.z);
|
||||
|
@ -594,7 +611,12 @@ int TileID=0;
|
|||
|
||||
while(TileID!=ListSize)
|
||||
{
|
||||
CPoint Pos=IDToPoint(TileID,TileBrowserWidth);
|
||||
CPoint Pos;//=IDToPoint(TileID,TileBrowserWidth);
|
||||
|
||||
if (TileID==0)
|
||||
Pos=CPoint(-1,-1);
|
||||
else
|
||||
Pos=IDToPoint(TileID-1,TileBrowserWidth);
|
||||
|
||||
glLoadIdentity();
|
||||
glTranslatef(CamPos.x+Pos.x*(1+TileBrowserGap),CamPos.y-Pos.y*(1+TileBrowserGap),CamPos.z);
|
||||
|
@ -614,7 +636,7 @@ int TileID=0;
|
|||
|
||||
GLuint *HitPtr=SelectBuffer;
|
||||
|
||||
TileID=-1;
|
||||
TileID=-2;
|
||||
if (HitCount) // Just take 1st
|
||||
{
|
||||
TileID=HitPtr[3];
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
/*****************************************************************************/
|
||||
enum TileSetEnum
|
||||
{
|
||||
TileBrowserWidth=8,
|
||||
DefTileBrowserWidth=8,
|
||||
};
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -109,7 +109,7 @@ public:
|
|||
void RenderCursor(Vec &CamPos,int Pos,int Width, int Height);
|
||||
void RenderBrush(Vec &CamPos,CMap &LBrush,CMap &RBrush);
|
||||
void RenderGrid(Vec &CamPos);
|
||||
|
||||
int GetTileBrowserWidth() {return(TileBrowserWidth);}
|
||||
private:
|
||||
BOOL Create16x16Tile(sRGBData &Src,u8 *Dst,int XOfs,int YOfs);
|
||||
|
||||
|
@ -117,6 +117,7 @@ private:
|
|||
int SetNumber;
|
||||
std::vector<CTile> Tile;
|
||||
BOOL Loaded;
|
||||
int TileBrowserWidth;
|
||||
};
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
|
@ -13,6 +13,8 @@
|
|||
#define IDI_PAINT 152
|
||||
#define IDI_SELECT 153
|
||||
#define IDD_MAPSIZE 167
|
||||
#define IDD_NEW_LAYER 168
|
||||
#define IDD_NEWMAP 169
|
||||
#define IDC_TOOLBAR_COMBO 1018
|
||||
#define IDC_LAYER_LIST 1019
|
||||
#define IDD_LAYERTILE_BTN_UPDATE 1029
|
||||
|
@ -25,6 +27,19 @@
|
|||
#define IDC_MAPSIZE_HEIGHT_TEXT 1039
|
||||
#define IDC_MAPSIZE_HEIGHT 1040
|
||||
#define IDC_MAPSIZE_WARNING 1041
|
||||
#define IDC_NEW_LAYER_TYPE_LIST 1042
|
||||
#define IDC_NEW_LAYER_TYPE_NAME 1043
|
||||
#define IDC_NEW_LAYER_WIDTH_NAME 1044
|
||||
#define IDC_NEW_LAYER_HEIGHT_NAME 1045
|
||||
#define IDC_NEW_LAYER_WIDTH_EDIT 1046
|
||||
#define IDC_NEW_LAYER_HEIGHT_EDIT 1047
|
||||
#define IDC_NEWMAP_BACK_CHECK 1047
|
||||
#define IDC_NEW_LAYER_NAME_NAME 1048
|
||||
#define IDC_NEW_LAYER_NAME_EDIT 1049
|
||||
#define IDC_NEWMAP_MID_CHECK 1050
|
||||
#define IDC_NEWMAP_FORE_CHECK 1051
|
||||
#define IDC_NEW_LAYER_WIDTH_NAME2 1052
|
||||
#define IDC_NEW_LAYER_WIDTH_EDIT2 1053
|
||||
#define ID_TOOLBAR_LAYERBAR 32773
|
||||
#define ID_TOOLBAR_TILEPALETTE 32774
|
||||
#define ID_TOOLBAR_COMBO 32777
|
||||
|
@ -48,9 +63,9 @@
|
|||
#ifdef APSTUDIO_INVOKED
|
||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||
#define _APS_3D_CONTROLS 1
|
||||
#define _APS_NEXT_RESOURCE_VALUE 168
|
||||
#define _APS_NEXT_RESOURCE_VALUE 169
|
||||
#define _APS_NEXT_COMMAND_VALUE 32797
|
||||
#define _APS_NEXT_CONTROL_VALUE 1042
|
||||
#define _APS_NEXT_CONTROL_VALUE 1048
|
||||
#define _APS_NEXT_SYMED_VALUE 101
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -121,9 +121,9 @@ void BuildGLBoxNoNormals(float XMin,float XMax,float YMin,float YMax,float ZMin,
|
|||
void BuildGLQuad(float XMin,float XMax,float YMin,float YMax,float Z)
|
||||
{
|
||||
// Front Face
|
||||
#ifdef UseLighting
|
||||
//#ifdef UseLighting
|
||||
glNormal3f( 0.0f, 0.0f, 1.0f);
|
||||
#endif
|
||||
//#endif
|
||||
glVertex3f( XMin, YMin, Z);
|
||||
glVertex3f( XMax, YMin, Z);
|
||||
glVertex3f( XMax, YMax, Z);
|
||||
|
@ -313,3 +313,4 @@ char Name[_MAX_FNAME];
|
|||
_splitpath(InName,Drive,Path,Name,0);
|
||||
sprintf(OutName,"%s%s%s.%s",Drive,Path,Name,Ext);
|
||||
}
|
||||
|
||||
|
|
|
@ -58,8 +58,4 @@ void BGR2RGB(int W,int H,u8 *Data);
|
|||
|
||||
void SetFileExt(char *InName,char *OutName,char *Ext);
|
||||
|
||||
|
||||
|
||||
/**************************************************************************************/
|
||||
|
||||
#endif
|
Loading…
Add table
Add a link
Reference in a new issue