SBSPSS/Utils/MkLevel/Layers/MkLevelLayerThing.h

48 lines
1.1 KiB
C
Raw Normal View History

2001-04-17 18:42:07 +02:00
/*******************/
/*** Layer Thing ***/
/*******************/
#ifndef __MKLEVEL_LAYER_THING_HEADER__
#define __MKLEVEL_LAYER_THING_HEADER__
#include "MkLevelLayer.h"
struct sPoint
{
int x;
int y;
inline operator=(sPoint const &Src) {x=Src.x;y=Src.y;}
};
struct sMkLevelLayerThing
{
GString Name;
int Type;
vector<sPoint> XY;
sLayerThingData Data;
};
/*****************************************************************************/
class CMkLevelLayerThing : public CMkLevelLayer
{
public:
CMkLevelLayerThing(sExpLayerHdr *LayerHdr);
virtual const char *GetTypeName()=0;
virtual void PreProcess(CMkLevel *Core)=0;
virtual void Process(CMkLevel *Core)=0;
2001-06-25 17:54:07 +02:00
virtual int Write(CMkLevel *Core,FILE *File,const char *LayerName)=0;
2001-05-23 18:03:10 +02:00
int CountThing(CMkLevel *Core,const char *Name);
2001-04-17 18:42:07 +02:00
protected:
u8 *LoadThing(sMkLevelLayerThing &ThisThing,u8 *Ptr);
void LoadThingNames(char *Ptr);
2001-04-19 17:12:21 +02:00
void ProcessList(CMkLevel *Core);
2001-04-17 18:42:07 +02:00
CList<sMkLevelLayerThing> ThingList;
};
/*****************************************************************************/
#endif