SBSPSS/Utils/MapEdit/Layer.h

94 lines
2.5 KiB
C
Raw Normal View History

2000-09-25 17:43:52 +02:00
/******************/
/*** Layer Core ***/
/******************/
#ifndef __LAYER_HEADER__
#define __LAYER_HEADER__
#include <Vector>
2000-12-04 17:47:34 +01:00
#include <Vector3.h>
2000-11-02 16:46:17 +01:00
#include "Map.h"
2000-12-29 23:20:38 +01:00
#include "Select.h"
2000-12-06 20:29:40 +01:00
#include "LayerDef.h"
2000-09-25 17:43:52 +02:00
2000-11-03 23:40:41 +01:00
/*****************************************************************************/
enum LAYER_ENUMS
{
SELECT_BUFFER_SIZE=16,
};
2000-11-30 23:17:55 +01:00
enum
{
SCREEN_WIDTH_TILE=30,
SCREEN_HEIGHT_TILE=20,
};
2000-09-25 17:43:52 +02:00
/*****************************************************************************/
2000-11-02 16:46:17 +01:00
class CCore;
2000-11-06 21:24:11 +01:00
class CMapEditView;
2000-11-24 23:34:20 +01:00
class CExport;
2000-09-25 17:43:52 +02:00
class CLayer
{
public:
2000-11-07 21:38:19 +01:00
CLayer(){};
virtual ~CLayer(){};
2000-09-25 17:43:52 +02:00
2000-11-28 22:16:00 +01:00
virtual char *GetName()=0;
2000-11-21 22:27:55 +01:00
virtual void SetVisible(BOOL f) {VisibleFlag=f;}
virtual BOOL IsVisible() {return(VisibleFlag);}
2000-11-20 21:33:42 +01:00
virtual int GetType()=0;
2000-11-28 22:16:00 +01:00
virtual int GetSubType() {return(-1);}
2000-09-25 17:43:52 +02:00
2000-11-28 22:16:00 +01:00
virtual float GetScaleFactor() {return(ScaleFactor);}
2000-09-25 17:43:52 +02:00
2000-12-04 17:47:34 +01:00
virtual void Render(CCore *Core,Vector3 &CamPos,BOOL Is3d)=0;
virtual void RenderGrid(CCore *Core,Vector3 &CamPos,BOOL Active)=0;
2000-12-29 23:20:38 +01:00
virtual void RenderSelection(CCore *Core,Vector3 &ThisCam)=0;
2000-09-25 17:43:52 +02:00
2000-12-04 17:47:34 +01:00
virtual void FindCursorPos(CCore *Core,CMapEditView *View,Vector3 &CamPos,CPoint &MousePos)=0;
virtual void RenderCursor(CCore *Core,Vector3 &CamPos,BOOL Is3d)=0;
2000-11-14 16:03:04 +01:00
virtual void InitGUI(CCore *Core)=0;
virtual void UpdateGUI(CCore *Core)=0;
2000-11-02 16:46:17 +01:00
2000-11-20 17:21:43 +01:00
virtual int GetWidth()=0;
virtual int GetHeight()=0;
2000-11-30 23:17:55 +01:00
virtual void CheckLayerSize(int Width,int Height){};
virtual BOOL Resize(int Width,int Height)=0;
2000-11-17 22:36:13 +01:00
2000-11-20 21:33:42 +01:00
virtual void Load(CFile *File,float Version)=0;
virtual void Save(CFile *File)=0;
2000-11-29 18:07:57 +01:00
virtual void Export(CCore *Core,CExport &Exp)=0;
2000-11-24 23:34:20 +01:00
2000-11-15 22:22:40 +01:00
// Functions
virtual BOOL SetMode(int NewMode)=0;
virtual BOOL InitMode()=0;
virtual BOOL ExitMode()=0;
virtual BOOL LButtonControl(CCore *Core,CMapEditView *View,UINT nFlags, CPoint &CursorPos,BOOL DownFlag)=0;
virtual BOOL RButtonControl(CCore *Core,CMapEditView *View,UINT nFlags, CPoint &CursorPos,BOOL DownFlag)=0;
virtual BOOL MouseMove(CCore *Core,CMapEditView *View,UINT nFlags, CPoint &CursorPos)=0;
2000-12-29 23:20:38 +01:00
virtual BOOL MirrorX(CCore *Core){return(false);};
virtual BOOL MirrorY(CCore *Core){return(false);};
virtual BOOL CopySelection(CCore *Core) {return(false);}
virtual BOOL PasteSelection(CCore *Core) {return(false);}
2000-11-17 00:08:54 +01:00
2000-12-11 22:29:59 +01:00
virtual void DeleteSet(int Set){};
virtual void RemapSet(int OrigSet,int NewSet){};
2000-11-07 21:38:19 +01:00
protected:
BOOL Render3dFlag;
2000-11-28 22:16:00 +01:00
float ScaleFactor;
2000-11-20 17:21:43 +01:00
BOOL ResizeFlag;
2000-11-21 22:27:55 +01:00
BOOL VisibleFlag;
2000-12-29 23:20:38 +01:00
CSelect Selection;
2000-09-25 17:43:52 +02:00
};
2000-11-02 16:46:17 +01:00
2000-09-25 17:43:52 +02:00
/*****************************************************************************/
#endif