33 lines
606 B
C
33 lines
606 B
C
|
#pragma once
|
||
|
#include <memory>
|
||
|
#include "MiniEngine/MiniEngine.h"
|
||
|
|
||
|
typedef int TextureID;
|
||
|
/** TextureID:
|
||
|
>=0 Valid Texture
|
||
|
-1 Empty
|
||
|
-2 Colored
|
||
|
*/
|
||
|
|
||
|
struct TiledBox
|
||
|
{
|
||
|
TiledBox();
|
||
|
TextureID tid;
|
||
|
MiniEngine::RGBA color;
|
||
|
};
|
||
|
|
||
|
class TiledMap
|
||
|
{
|
||
|
public:
|
||
|
TiledMap(int Line,int Col,int RectSize);
|
||
|
int setBox(int LineID,int ColID,const TiledBox& box);
|
||
|
TiledBox* operator[](int LineID);
|
||
|
void setRectSize(int RectSize);
|
||
|
int getRectSize();
|
||
|
void setViewPoint(int Line,int Col);
|
||
|
void getViewPoint(int& refLine,int& refCol);
|
||
|
private:
|
||
|
struct impl;
|
||
|
std::shared_ptr<impl> sp;
|
||
|
};
|