2001-04-17 18:42:07 +02:00
|
|
|
/******************/
|
|
|
|
/*** Layer Tile ***/
|
|
|
|
/******************/
|
|
|
|
|
|
|
|
#ifndef __MKLEVEL_LAYER_TILE_HEADER__
|
|
|
|
#define __MKLEVEL_LAYER_TILE_HEADER__
|
|
|
|
|
|
|
|
#include "MkLevelLayer.h"
|
|
|
|
#include <List2d.h>
|
|
|
|
|
|
|
|
struct sMkLevelElem
|
|
|
|
{
|
|
|
|
u16 Elem;
|
|
|
|
int TexID;
|
|
|
|
};
|
|
|
|
|
|
|
|
/*****************************************************************************/
|
|
|
|
class CMkLevelLayerTile : public CMkLevelLayer
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
CMkLevelLayerTile(sExpLayerHdr *LayerHdr);
|
|
|
|
|
|
|
|
virtual void PreProcess(CMkLevel *Core);
|
|
|
|
virtual void Process(CMkLevel *Core);
|
2001-06-25 17:54:07 +02:00
|
|
|
virtual int Write(CMkLevel *Core,FILE *File,const char *LayerName);
|
2001-04-17 18:42:07 +02:00
|
|
|
|
|
|
|
protected:
|
2001-06-25 17:54:07 +02:00
|
|
|
int WriteNormal(CMkLevel *Core,FILE *File);
|
|
|
|
int WritePak(CMkLevel *Core,FILE *File);
|
|
|
|
|
|
|
|
void BuildOutElem(int X,int Y,sTileMapElem *Out);
|
|
|
|
|
2001-04-17 18:42:07 +02:00
|
|
|
CList2d<sExpLayerTile> InMap;
|
|
|
|
CList2d<sMkLevelElem> OutMap;
|
2001-06-25 17:54:07 +02:00
|
|
|
sLayerHdr Hdr;
|
|
|
|
|
|
|
|
// Pak Stuff
|
|
|
|
int BuildPakChunk(int X,int Y,int &PakW,int &PakH);
|
|
|
|
int PakChunk(int ChunkSize);
|
|
|
|
|
|
|
|
int PakW,PakH;
|
|
|
|
sTileMapElem *ChunkBuffer;
|
|
|
|
u8 *PakBuffer;
|
|
|
|
|
2001-04-17 18:42:07 +02:00
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
/*****************************************************************************/
|
|
|
|
#endif
|