SBSPSS/Utils/MapEdit/Layer.h

84 lines
2.2 KiB
C
Raw Normal View History

2000-09-25 17:43:52 +02:00
/******************/
/*** Layer Core ***/
/******************/
#ifndef __LAYER_HEADER__
#define __LAYER_HEADER__
#include <Vector>
#include "gl3d.h"
2000-11-02 16:46:17 +01:00
#include "Map.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-10-25 20:28:44 +02:00
enum LAYER_TYPE
{
2000-11-20 21:33:42 +01:00
LAYER_TYPE_TILE=0,
2000-10-25 20:28:44 +02:00
LAYER_TYPE_MAX
};
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-11-14 16:03:04 +01:00
virtual void Render(CCore *Core,Vec &CamPos,BOOL Is3d)=0;
2000-11-28 00:07:07 +01:00
virtual void RenderGrid(CCore *Core,Vec &CamPos,BOOL Active)=0;
2000-09-25 17:43:52 +02:00
2000-11-14 16:03:04 +01:00
virtual void FindCursorPos(CCore *Core,CMapEditView *View,Vec &CamPos,CPoint &MousePos)=0;
2000-11-17 22:36:13 +01:00
virtual void RenderCursor(CCore *Core,Vec &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;
virtual void 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-24 23:34:20 +01:00
virtual void Export(CExport &Exp)=0;
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-11-17 22:36:13 +01:00
virtual BOOL MirrorX(CCore *Core){return(FALSE);};
virtual BOOL MirrorY(CCore *Core){return(FALSE);};
2000-11-17 00:08:54 +01:00
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-11-20 17:21:43 +01:00
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