SBSPSS/Utils/MapEdit/Core.h

86 lines
2.1 KiB
C
Raw Normal View History

2000-09-22 17:11:29 +02:00
/***********************/
/*** Map Editor Core ***/
/***********************/
#ifndef __CORE_HEADER__
#define __CORE_HEADER__
#include <Vector>
2000-09-22 23:19:46 +02:00
#include "gl3d.h"
2000-09-25 17:43:52 +02:00
#include "Layer.h"
2000-10-25 20:28:44 +02:00
#include "LayerBack.h"
2000-09-22 17:11:29 +02:00
2000-10-27 20:18:30 +02:00
#include "TexCache.h"
2000-10-27 02:06:19 +02:00
#include "TileSet.h"
2000-09-22 17:11:29 +02:00
2000-10-25 20:28:44 +02:00
2000-09-22 17:11:29 +02:00
/*****************************************************************************/
2000-09-22 23:19:46 +02:00
class CMapEditView;
2000-09-22 17:11:29 +02:00
class CCore
{
public:
CCore();
~CCore();
2000-11-02 16:46:17 +01:00
void Init(CMapEditView *Wnd);
void Render();
2000-09-22 23:19:46 +02:00
// Control
2000-10-31 23:37:59 +01:00
void LButtonControl(UINT nFlags, CPoint &point,BOOL DownFlag);
void MButtonControl(UINT nFlags, CPoint &point,BOOL DownFlag);
void RButtonControl(UINT nFlags, CPoint &point,BOOL DownFlag);
void MouseWheel(UINT nFlags, short zDelta, CPoint &pt);
void MouseMove(UINT nFlags, CPoint &point);
2000-09-22 23:19:46 +02:00
2000-11-02 16:46:17 +01:00
// TileBank
void UpdateTileView(BOOL ViewFlag);
BOOL GetTileView() {return(TileViewFlag);}
void ToggleTileView() {UpdateTileView(!TileViewFlag);}
2000-09-22 17:11:29 +02:00
2000-11-02 16:46:17 +01:00
GLint GetTile(int Bank,int TileNo);
2000-10-30 22:16:48 +01:00
2000-09-22 17:11:29 +02:00
// Layers
2000-11-02 16:46:17 +01:00
void UpdateLayerBar(BOOL ViewFlag);
BOOL GetLayerViewFlag() {return(LayerViewFlag);}
void ToggleLayerView() {UpdateLayerBar(!LayerViewFlag);}
void SetActiveLayer(int Layer);
int GetActiveLayer() {return(ActiveLayer);}
CLayer *GetLayer(int i) {return(Layers[i]);}
2000-09-22 17:11:29 +02:00
2000-10-27 22:21:39 +02:00
// Tex Cache
2000-10-31 23:37:59 +01:00
CTexCache &GetTexCache() {return(TexCache);}
2000-10-27 22:21:39 +02:00
2000-11-02 16:46:17 +01:00
// Misc
void UpdateAll();
void UpdateView(Vec Ofs=Vec(0,0,0));
Vec &GetCam();
2000-11-03 23:40:41 +01:00
void SetCursorPos(CPoint &Pos) {CursorPos=Pos;}
CPoint &GetCursorPos() {return(CursorPos);}
CMapEditView *GetParentWindow() {return(ParentWindow);}
void Redraw(BOOL f=TRUE);
2000-09-22 17:11:29 +02:00
private:
2000-10-27 02:06:19 +02:00
CMapEditView *ParentWindow;
CPoint CurrentMousePos,LastMousePos;
2000-11-03 23:40:41 +01:00
CPoint CursorPos,LastCursorPos;
2000-11-02 16:46:17 +01:00
Vec MapCam,TileCam;
2000-10-27 02:06:19 +02:00
CLayer *Layers[LAYER_TYPE_MAX];
int ActiveLayer;
2000-09-22 23:19:46 +02:00
2000-10-27 02:06:19 +02:00
std::vector<CTileSet> TileSet;
2000-10-27 20:18:30 +02:00
CTexCache TexCache;
2000-09-22 23:19:46 +02:00
2000-11-03 23:40:41 +01:00
BOOL RenderFlag;
2000-10-31 23:37:59 +01:00
BOOL TileViewFlag;
2000-11-02 16:46:17 +01:00
BOOL LayerViewFlag;
2000-10-31 23:37:59 +01:00
2000-09-22 17:11:29 +02:00
};
/*****************************************************************************/
#endif