SBSPSS/Utils/MapEdit/Core.h

65 lines
1.4 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-09-25 17:43:52 +02:00
enum MOUSE_MODE
2000-09-22 17:11:29 +02:00
{
2000-09-25 17:43:52 +02:00
MOUSE_MODE_NONE=0,
2000-10-25 20:28:44 +02:00
MOUSE_MODE_LMB_EDIT,
MOUSE_MODE_MMB_EDIT,
MOUSE_MODE_RMB_EDIT,
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-09-22 23:19:46 +02:00
// Control
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);
2000-10-25 20:28:44 +02:00
void MouseMove(UINT nFlags, CPoint &point);
2000-09-22 23:19:46 +02:00
// Blah
void Init(CMapEditView *Wnd);
void Render();
void UpdateView(float XOfs,float YOfs,float ZOfs);
2000-09-25 17:43:52 +02:00
void SetMouseMode(MOUSE_MODE CurrentMode,MOUSE_MODE NewMode);
2000-09-22 17:11:29 +02:00
// Layers
void LayerSetActive(int Layer);
int LayerGetActive();
2000-10-25 20:28:44 +02:00
CLayer *LayerGet(int i);
2000-09-22 17:11:29 +02:00
private:
2000-09-22 23:19:46 +02:00
CMapEditView *ParentWindow;
2000-09-25 17:43:52 +02:00
MOUSE_MODE MouseMode;
2000-09-22 23:19:46 +02:00
CPoint CurrentMousePos,LastMousePos;
2000-10-25 20:28:44 +02:00
Vec MapPos;
2000-09-22 23:19:46 +02:00
2000-10-25 20:28:44 +02:00
CLayer *Layers[LAYER_TYPE_MAX];
2000-09-22 23:19:46 +02:00
int ActiveLayer;
2000-09-22 17:11:29 +02:00
};
/*****************************************************************************/
#endif