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-11-07 21:38:19 +01:00
|
|
|
//#include "LayerTile.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
|
|
|
|
2000-11-06 21:24:11 +01:00
|
|
|
void Init();
|
|
|
|
void NewMap();
|
|
|
|
void OpenMap();
|
|
|
|
void Render(CMapEditView *View);
|
2000-11-02 16:46:17 +01:00
|
|
|
|
2000-09-22 23:19:46 +02:00
|
|
|
// Control
|
2000-11-06 21:24:11 +01:00
|
|
|
void LButtonControl(CMapEditView *View,UINT nFlags, CPoint &point,BOOL DownFlag);
|
|
|
|
void MButtonControl(CMapEditView *View,UINT nFlags, CPoint &point,BOOL DownFlag);
|
|
|
|
void RButtonControl(CMapEditView *View,UINT nFlags, CPoint &point,BOOL DownFlag);
|
|
|
|
void MouseWheel(CMapEditView *View,UINT nFlags, short zDelta, CPoint &pt);
|
|
|
|
void MouseMove(CMapEditView *View,UINT nFlags, CPoint &point);
|
2000-09-22 23:19:46 +02:00
|
|
|
|
2000-11-02 16:46:17 +01:00
|
|
|
// TileBank
|
2000-11-06 21:24:11 +01:00
|
|
|
void UpdateTileView(CMapEditView *View,BOOL ViewFlag);
|
|
|
|
void ToggleTileView(CMapEditView *View);
|
|
|
|
BOOL GetTileView() {return(TileViewFlag);}
|
2000-09-22 17:11:29 +02:00
|
|
|
|
2000-11-06 21:24:11 +01:00
|
|
|
CTile GetTile(int Bank,int TileNo) {return(TileBank.GetTile(Bank,TileNo));}
|
2000-10-30 22:16:48 +01:00
|
|
|
|
2000-11-08 15:49:33 +01:00
|
|
|
// Param Bar
|
|
|
|
void UpdateParamBar(CMapEditView *View,BOOL ViewFlag);
|
|
|
|
void ToggleParamView(CMapEditView *View);
|
|
|
|
BOOL GetParamViewFlag() {return(ParamViewFlag);}
|
2000-09-22 17:11:29 +02:00
|
|
|
// Layers
|
2000-11-06 21:24:11 +01:00
|
|
|
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-11-06 21:24:11 +01:00
|
|
|
CTexCache &GetTexCache() {return(TexCache);}
|
2000-10-27 22:21:39 +02:00
|
|
|
|
2000-11-02 16:46:17 +01:00
|
|
|
// Misc
|
2000-11-06 21:24:11 +01:00
|
|
|
void UpdateAll(CMapEditView *View);
|
|
|
|
void UpdateView(CMapEditView *View,Vec Ofs=Vec(0,0,0));
|
2000-09-22 17:11:29 +02:00
|
|
|
|
2000-11-06 21:24:11 +01:00
|
|
|
Vec &GetCam();
|
|
|
|
void SetCursorPos(CPoint &Pos) {CursorPos=Pos;}
|
|
|
|
CPoint &GetCursorPos() {return(CursorPos);}
|
2000-09-22 17:11:29 +02:00
|
|
|
private:
|
2000-10-27 02:06:19 +02:00
|
|
|
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-11-06 21:24:11 +01:00
|
|
|
CTileBank TileBank;
|
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-08 15:49:33 +01:00
|
|
|
BOOL ParamViewFlag;
|
2000-10-31 23:37:59 +01:00
|
|
|
|
2000-09-22 17:11:29 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
/*****************************************************************************/
|
|
|
|
#endif
|