2000-10-27 02:06:19 +02:00
|
|
|
/*********************/
|
|
|
|
/*** TileSet Stuph ***/
|
|
|
|
/*********************/
|
|
|
|
|
|
|
|
#ifndef __TILESET_HEADER__
|
|
|
|
#define __TILESET_HEADER__
|
|
|
|
|
|
|
|
#include "stdafx.h"
|
2000-12-04 17:47:34 +01:00
|
|
|
#include <Vector3.h>
|
2000-10-27 02:06:19 +02:00
|
|
|
#include <gl\gl.h>
|
|
|
|
#include <gl\glu.h>
|
|
|
|
#include <Vector>
|
2000-12-04 17:47:34 +01:00
|
|
|
#include <gfname.hpp>
|
2000-10-27 02:06:19 +02:00
|
|
|
|
2001-03-01 18:28:20 +01:00
|
|
|
#include "Layer.h"
|
2000-10-27 20:18:30 +02:00
|
|
|
#include "TexCache.h"
|
2001-03-05 21:49:46 +01:00
|
|
|
#include "Elem.h"
|
2000-10-27 02:06:19 +02:00
|
|
|
|
2001-02-09 22:17:01 +01:00
|
|
|
#include "MapEdit.h"
|
2001-03-13 22:00:34 +01:00
|
|
|
#include "GUITilebank.h"
|
|
|
|
#include "GUIElemList.h"
|
2001-02-09 22:17:01 +01:00
|
|
|
|
2000-11-14 16:03:04 +01:00
|
|
|
/*****************************************************************************/
|
2000-10-27 20:18:30 +02:00
|
|
|
|
|
|
|
/*****************************************************************************/
|
2000-11-06 21:24:11 +01:00
|
|
|
class CCore;
|
2001-03-22 21:49:58 +01:00
|
|
|
class CTileBank : public CElemBank
|
2000-11-06 21:24:11 +01:00
|
|
|
{
|
|
|
|
public:
|
2000-11-14 16:03:04 +01:00
|
|
|
CTileBank();
|
|
|
|
~CTileBank();
|
|
|
|
|
2000-11-17 22:36:13 +01:00
|
|
|
enum BrushEnum
|
|
|
|
{
|
|
|
|
LBrush=0,
|
|
|
|
RBrush,
|
|
|
|
MaxBrush
|
|
|
|
};
|
2001-03-01 18:28:20 +01:00
|
|
|
// Overloads
|
|
|
|
int GetType() {return(0);}
|
2000-11-17 22:36:13 +01:00
|
|
|
|
2001-03-01 18:28:20 +01:00
|
|
|
void Render(CCore *Core,Vector3 &CamPos,bool Is3d);
|
2001-03-22 21:49:58 +01:00
|
|
|
// void RenderGrid(CCore *Core,Vector3 &CamPos,bool Active);
|
2001-03-01 18:28:20 +01:00
|
|
|
void RenderSelection(CCore *Core,Vector3 &ThisCam){};
|
|
|
|
void RenderCursor(CCore *Core,Vector3 &CamPos,bool Is3d);
|
2001-03-22 21:49:58 +01:00
|
|
|
// void FindCursorPos(CCore *Core,Vector3 &CamPos,CPoint &MousePos);
|
2001-03-01 18:28:20 +01:00
|
|
|
|
|
|
|
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 Export(CCore *Core,CExport &Exp){};
|
|
|
|
|
|
|
|
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);
|
|
|
|
|
|
|
|
// Local
|
|
|
|
void DeleteCurrent();
|
2000-11-15 22:22:40 +01:00
|
|
|
|
2001-03-05 21:49:46 +01:00
|
|
|
CMap &GetLBrush() {return(Brush[LBrush]);}
|
|
|
|
CMap &GetRBrush() {return(Brush[RBrush]);}
|
|
|
|
CMap &GetBrush(int i) {return(Brush[i]);}
|
|
|
|
CMap &GetActiveBrush() {return(GetBrush(ActiveBrush));}
|
2000-11-29 18:07:57 +01:00
|
|
|
|
2001-03-05 21:49:46 +01:00
|
|
|
bool CanClose() {return(SelStart==-1);}
|
2001-01-23 22:53:48 +01:00
|
|
|
|
2000-11-15 22:22:40 +01:00
|
|
|
// Functions
|
2001-03-01 18:28:20 +01:00
|
|
|
bool SelectCancel();
|
|
|
|
void DeleteSet(CCore *Core);
|
2000-11-20 21:33:42 +01:00
|
|
|
|
|
|
|
|
2001-02-09 22:17:01 +01:00
|
|
|
protected:
|
2001-03-01 18:28:20 +01:00
|
|
|
bool Select(int BrushID,bool DownFlag);
|
2000-11-17 22:36:13 +01:00
|
|
|
void SetBrush(CMap &ThisBrush);
|
2000-11-14 16:03:04 +01:00
|
|
|
|
2001-03-22 21:49:58 +01:00
|
|
|
CMap Brush[2];
|
|
|
|
int ActiveBrush;
|
|
|
|
int SelStart;
|
2001-02-09 22:17:01 +01:00
|
|
|
|
2001-03-22 21:49:58 +01:00
|
|
|
CGUIElemList GUIElemList;
|
|
|
|
CGUITileBank GUITileBank;
|
2000-11-06 21:24:11 +01:00
|
|
|
};
|
|
|
|
|
2000-10-27 02:06:19 +02:00
|
|
|
/*****************************************************************************/
|
|
|
|
#endif
|