SBSPSS/Utils/MapEdit/LayerShade.h

92 lines
2.4 KiB
C
Raw Normal View History

2001-02-09 22:17:01 +01:00
/*******************/
/*** Layer Shade ***/
/*******************/
#ifndef __LAYER_SHADE_HEADER__
#define __LAYER_SHADE_HEADER__
#include "Layer.h"
#include "MapEdit.h"
2001-03-13 22:00:34 +01:00
#include "GUILayerShade.h"
2001-04-30 23:49:54 +02:00
#include "Elem.h"
#include "ExportHdr.h"
/*****************************************************************************/
struct sBackList
{
GString Name;
int ElemID;
};
2001-02-09 22:17:01 +01:00
/*****************************************************************************/
class CCore;
class CLayerShade : public CLayer
{
public:
2001-02-16 19:23:01 +01:00
enum
{
LAYER_SHADE_RGB_MAX=4,
};
2001-04-07 23:05:33 +02:00
2001-03-26 23:29:09 +02:00
CLayerShade(sLayerDef &Def);
CLayerShade(CFile *File,int Version) {Load(File,Version);}
2001-02-09 22:17:01 +01:00
~CLayerShade();
2001-03-26 23:29:09 +02:00
void InitLayer(sLayerDef &Def);
2001-03-01 18:28:20 +01:00
void Render(CCore *Core,Vector3 &CamPos,bool Is3d);
void RenderGrid(CCore *Core,Vector3 &CamPos,bool Active){};
2001-02-09 22:17:01 +01:00
void RenderSelection(CCore *Core,Vector3 &ThisCam){};
2001-04-30 23:49:54 +02:00
void RenderCursor(CCore *Core,Vector3 &CamPos,bool Is3d);
2001-02-09 22:17:01 +01:00
void GUIInit(CCore *Core);
void GUIKill(CCore *Core);
void GUIUpdate(CCore *Core);
void GUIChanged(CCore *Core);
2001-04-30 23:49:54 +02:00
// int GetWidth() {return(LayerDef.Width);}
// int GetHeight() {return(LayerDef.Height);}
void CheckLayerSize(int Width,int Height);
2001-03-26 23:29:09 +02:00
bool Resize(int Width,int Height);
2001-02-09 22:17:01 +01:00
void Load(CFile *File,int Version);
void Save(CFile *File);
void Export(CCore *Core,CExport &Exp);
2001-05-05 23:18:12 +02:00
virtual void LoadGfx(CCore *Core) {if (GfxBank->NeedLoad()) GfxBank->LoadAllSets(Core);}
2001-02-09 22:17:01 +01:00
// Functions
2001-04-30 23:49:54 +02:00
bool LButtonControl(CCore *Core,UINT nFlags, CPoint &CursorPos,bool DownFlag);
bool RButtonControl(CCore *Core,UINT nFlags, CPoint &CursorPos,bool DownFlag);
bool MouseMove(CCore *Core,UINT nFlags, CPoint &CursorPos);
bool Command(int CmdMsg,CCore *Core,int Param0=0,int Param1=0);
2001-02-09 22:17:01 +01:00
protected:
2001-04-30 23:49:54 +02:00
void LoadGfx();
2001-03-01 18:28:20 +01:00
void Render(CCore *Core,Vector3 &CamPos,CMap &ThisMap,bool Render3d,float Alpha=1.0f,Vector3 *Ofs=0);
2001-04-30 23:49:54 +02:00
void RenderBackGfx(CCore *Core,Vector3 &ThisCam,sLayerShadeGfx &ThisGfx);
void AddGfx(CCore *Core);
void GotoGfx(CCore *Core);
void DeleteGfx(CCore *Core);
CGUILayerShade GUIShade;
CIni Script;
CList<sBackList> BankList;
CElemBank *GfxBank;
sLayerShadeGfx Cursor;
int ShadeCount;
sRGBCol ShadeRGB[LAYER_SHADE_RGB_MAX];
CList<sLayerShadeGfx> GfxList;
int CurrentGfx;
2001-04-07 23:05:33 +02:00
2001-02-09 22:17:01 +01:00
};
/*****************************************************************************/
#endif