This commit is contained in:
parent
114268ff23
commit
3602018f1a
25 changed files with 565 additions and 1169 deletions
|
@ -5,33 +5,21 @@
|
|||
#ifndef __LAYER_ITEM_HEADER__
|
||||
#define __LAYER_ITEM_HEADER__
|
||||
|
||||
#include "LayerThing.h"
|
||||
#include "Layer.h"
|
||||
#include "MapEdit.h"
|
||||
#include "GUIToolbar.h"
|
||||
#include "ElemStore.h"
|
||||
|
||||
#include "Elem.h"
|
||||
|
||||
/*****************************************************************************/
|
||||
class CLayerItem : public CLayer
|
||||
class CLayerItem : public CLayerThing
|
||||
{
|
||||
public:
|
||||
enum MouseMode
|
||||
{
|
||||
MouseModePaint=0,
|
||||
MouseModeSelect,
|
||||
};
|
||||
CLayerItem(sLayerDef &Def);
|
||||
CLayerItem(CFile *File,int Version) {Load(File,Version);}
|
||||
|
||||
CLayerItem(){};
|
||||
CLayerItem(int SubType,int Width,int Height); // New Layer
|
||||
CLayerItem(CFile *File,int Version); // Load Layer
|
||||
~CLayerItem();
|
||||
|
||||
int GetType() {return(LAYER_TYPE_ITEM);}
|
||||
void InitSubView(CCore *Core);
|
||||
|
||||
void Render(CCore *Core,Vector3 &CamPos,bool Is3d);
|
||||
void RenderCursor(CCore *Core,Vector3 &CamPos,bool Is3d);
|
||||
|
||||
void GUIInit(CCore *Core);
|
||||
void GUIKill(CCore *Core);
|
||||
void GUIUpdate(CCore *Core);
|
||||
|
@ -39,28 +27,12 @@ public:
|
|||
|
||||
void Load(CFile *File,int Version);
|
||||
void Save(CFile *File);
|
||||
void LoadThingScript(const char *Filename);
|
||||
|
||||
void Export(CCore *Core,CExport &Exp);
|
||||
|
||||
// Functions
|
||||
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
|
||||
CElemBank *GetElemBank() {return(ElemBank);}
|
||||
|
||||
protected:
|
||||
void Render(CCore *Core,Vector3 &CamPos,CMap &ThisMap,bool Render3d,float Alpha=1.0f,Vector3 *Ofs=0);
|
||||
void RenderCursorPaint(CCore *Core,Vector3 &CamPos,bool Is3d);
|
||||
|
||||
bool Paint(CMap &Blk,CPoint &CursorPos);
|
||||
|
||||
CElemStore *ElemBank;
|
||||
MouseMode Mode;
|
||||
|
||||
CGUIToolBar GUIToolBar;
|
||||
CGUIToolBar GUIToolBar;
|
||||
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue