#include "allegro.h"
#include "CObject.h"
#include "CTile.h"

#ifndef CTileSet_def

#define CTileSet_def
#define max_tiles   50

#define GRASS_BACKGROUND    0
#define DESERT_BACKGROUND   1
#define DEATH_BACKGROUND    2
#define SNOW_BACKGROUND     3
#define CASTLE_BACKGROUND    4
#define WASTELAND_BACKGROUND   5

class CTileSet
{
private:
    CTile *tile[50];
    int next_tile;
    char dataname[20];
    int background;

public:
    DATAFILE *data;
    void init(void);
    void add_tile(CTile *_tile);
    CTile* return_tile(int num);
    void display_tiles(BITMAP *backgr);
    void display_tile(BITMAP *backgr,int n, float x, float y);
    int ret_max_tiles(void);
    int ret_background(void) {return background;}

    void save_tile_set(char *filename);
    void load_tile_set(char *filename);
    void destroy_ts(void);
};

#endif


