This commit is contained in:
parent
425713a3aa
commit
c1309c1c96
44 changed files with 2193 additions and 1452 deletions
|
@ -1,20 +1,19 @@
|
|||
/******************/
|
||||
/*** Layer Tile ***/
|
||||
/*** Layer Item ***/
|
||||
/******************/
|
||||
|
||||
#ifndef __LAYER_TILE_HEADER__
|
||||
#define __LAYER_TILE_HEADER__
|
||||
#ifndef __LAYER_ITEM_HEADER__
|
||||
#define __LAYER_ITEM_HEADER__
|
||||
|
||||
#include "Layer.h"
|
||||
#include "MapEdit.h"
|
||||
#include "LayerTileToolbar.h"
|
||||
#include "GUIToolbar.h"
|
||||
#include "ElemStore.h"
|
||||
|
||||
|
||||
/*****************************************************************************/
|
||||
class CCore;
|
||||
class CTileBank;
|
||||
class CLayerTile : public CLayer
|
||||
class CLayerItem : public CLayer
|
||||
{
|
||||
|
||||
public:
|
||||
enum MouseMode
|
||||
{
|
||||
|
@ -22,54 +21,35 @@ public:
|
|||
MouseModeSelect,
|
||||
};
|
||||
|
||||
CLayerTile(){};
|
||||
CLayerTile(int SubType,int Width,int Height); // New Layer
|
||||
CLayerTile(CFile *File,int Version); // Load Layer
|
||||
~CLayerTile();
|
||||
CLayerItem(){};
|
||||
CLayerItem(int SubType,int Width,int Height); // New Layer
|
||||
CLayerItem(CFile *File,int Version); // Load Layer
|
||||
~CLayerItem();
|
||||
|
||||
int GetType() {return(LAYER_TYPE_TILE);}
|
||||
int GetSubType() {return(SubType);}
|
||||
int GetType() {return(LAYER_TYPE_ITEM);}
|
||||
void InitSubView(CCore *Core);
|
||||
|
||||
virtual void Render(CCore *Core,Vector3 &CamPos,bool Is3d);
|
||||
virtual void RenderGrid(CCore *Core,Vector3 &CamPos,bool Active);
|
||||
virtual void RenderSelection(CCore *Core,Vector3 &ThisCam);
|
||||
|
||||
void FindCursorPos(CCore *Core,Vector3 &CamPos,CPoint &MousePos);
|
||||
void Render(CCore *Core,Vector3 &CamPos,bool Is3d);
|
||||
void RenderCursor(CCore *Core,Vector3 &CamPos,bool Is3d);
|
||||
|
||||
virtual void GUIInit(CCore *Core);
|
||||
virtual void GUIKill(CCore *Core);
|
||||
virtual void GUIUpdate(CCore *Core);
|
||||
virtual void GUIChanged(CCore *Core);
|
||||
|
||||
int GetWidth() {return(Map.GetWidth());}
|
||||
int GetHeight() {return(Map.GetHeight());}
|
||||
bool Resize(int Width,int Height);
|
||||
void GUIInit(CCore *Core);
|
||||
void GUIKill(CCore *Core);
|
||||
void GUIUpdate(CCore *Core);
|
||||
void GUIChanged(CCore *Core);
|
||||
|
||||
void Load(CFile *File,int Version);
|
||||
void Save(CFile *File);
|
||||
void CheckLayerSize(int Width,int Height);
|
||||
|
||||
void Export(CCore *Core,CExport &Exp);
|
||||
|
||||
// Functions
|
||||
virtual bool LButtonControl(CCore *Core,UINT nFlags, CPoint &point,bool DownFlag);
|
||||
virtual bool RButtonControl(CCore *Core,UINT nFlags, CPoint &point,bool DownFlag);
|
||||
virtual bool MouseMove(CCore *Core,UINT nFlags, CPoint &point);
|
||||
virtual bool Command(int CmdMsg,CCore *Core,int Param0=0,int Param1=0);
|
||||
|
||||
bool MirrorX(CCore *Core);
|
||||
bool MirrorY(CCore *Core);
|
||||
bool SetColFlags(CCore *Core,int Flags);
|
||||
|
||||
bool CopySelection(CCore *Core);
|
||||
bool PasteSelection(CCore *Core);
|
||||
bool LButtonControl(CCore *Core,UINT nFlags, CPoint &point,bool DownFlag);
|
||||
bool RButtonControl(CCore *Core,UINT nFlags, CPoint &point,bool DownFlag);
|
||||
bool MouseMove(CCore *Core,UINT nFlags, CPoint &point);
|
||||
bool Command(int CmdMsg,CCore *Core,int Param0=0,int Param1=0);
|
||||
|
||||
// Local
|
||||
CTileBank *GetTileBank() {return(TileBank);}
|
||||
void RemoveSet(int Set);
|
||||
void RemapSet(int OrigSet,int NewSet);
|
||||
CElemBank *GetElemBank() {return(ElemBank);}
|
||||
|
||||
protected:
|
||||
void Render(CCore *Core,Vector3 &CamPos,CMap &ThisMap,bool Render3d,float Alpha=1.0f,Vector3 *Ofs=0);
|
||||
|
@ -77,13 +57,10 @@ protected:
|
|||
|
||||
bool Paint(CMap &Blk,CPoint &CursorPos);
|
||||
|
||||
CMap Map;
|
||||
int SubType;
|
||||
CElemStore *ElemBank;
|
||||
MouseMode Mode;
|
||||
|
||||
CTileBank *TileBank;
|
||||
|
||||
CLayerTileToolbar ToolBarGUI;
|
||||
CGUIToolBar GUIToolBar;
|
||||
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue