2000-09-25 17:43:52 +02:00
|
|
|
/******************/
|
|
|
|
/*** Layer Core ***/
|
|
|
|
/******************/
|
|
|
|
|
|
|
|
#ifndef __LAYER_HEADER__
|
|
|
|
#define __LAYER_HEADER__
|
|
|
|
|
|
|
|
#include <Vector>
|
|
|
|
#include "gl3d.h"
|
2000-11-02 16:46:17 +01:00
|
|
|
#include "Map.h"
|
2000-09-25 17:43:52 +02:00
|
|
|
|
2000-10-25 20:28:44 +02:00
|
|
|
enum LAYER_TYPE
|
|
|
|
{
|
|
|
|
LAYER_TYPE_BACK=0,
|
|
|
|
LAYER_TYPE_MID,
|
|
|
|
LAYER_TYPE_ACTION,
|
|
|
|
LAYER_TYPE_FORE,
|
|
|
|
|
|
|
|
LAYER_TYPE_MAX
|
|
|
|
};
|
|
|
|
|
2000-11-02 16:46:17 +01:00
|
|
|
/*
|
|
|
|
struct sMapElem
|
|
|
|
{
|
|
|
|
int Bank;
|
|
|
|
int Tile;
|
|
|
|
int Flags;
|
|
|
|
};
|
|
|
|
*/
|
2000-09-25 17:43:52 +02:00
|
|
|
|
|
|
|
/*****************************************************************************/
|
2000-11-02 16:46:17 +01:00
|
|
|
class CCore;
|
|
|
|
class CMap;
|
2000-09-25 17:43:52 +02:00
|
|
|
class CLayer
|
|
|
|
{
|
|
|
|
public:
|
2000-11-02 16:46:17 +01:00
|
|
|
CLayer(){ASSERT(1);}
|
|
|
|
CLayer(CCore *_Core);
|
2000-09-25 17:43:52 +02:00
|
|
|
~CLayer();
|
|
|
|
|
2000-11-02 16:46:17 +01:00
|
|
|
void InitLayer(CCore *_Core);
|
2000-09-25 17:43:52 +02:00
|
|
|
|
2000-10-25 20:28:44 +02:00
|
|
|
// Virtual
|
|
|
|
virtual void Init()=0;
|
|
|
|
virtual char *GetName()=0;
|
2000-10-25 23:00:54 +02:00
|
|
|
virtual void Render(Vec &MapPos,BOOL Is3d);
|
|
|
|
virtual void Render2d(Vec &MapPos);
|
|
|
|
virtual void Render3d(Vec &MapPos);
|
2000-09-25 17:43:52 +02:00
|
|
|
|
2000-10-25 20:28:44 +02:00
|
|
|
virtual float GetLayerZPosDiv()=0;
|
2000-10-25 23:00:54 +02:00
|
|
|
virtual BOOL CanRender3d()=0;
|
2000-10-25 20:28:44 +02:00
|
|
|
virtual void SetTestColor()=0;
|
2000-09-25 17:43:52 +02:00
|
|
|
|
2000-10-25 20:28:44 +02:00
|
|
|
// Control
|
2000-09-25 17:43:52 +02:00
|
|
|
|
|
|
|
|
2000-10-25 20:28:44 +02:00
|
|
|
protected:
|
2000-11-02 16:46:17 +01:00
|
|
|
// float Width,Height;
|
|
|
|
CCore *Core;
|
|
|
|
// std::vector< std::vector<sMapElem> > Map;
|
|
|
|
// sMapElem *Map;
|
|
|
|
CMap Map;
|
|
|
|
|
2000-09-25 17:43:52 +02:00
|
|
|
};
|
|
|
|
|
2000-11-02 16:46:17 +01:00
|
|
|
|
2000-09-25 17:43:52 +02:00
|
|
|
/*****************************************************************************/
|
|
|
|
#endif
|