//This code is copyright Andrew Story (Kaslai/Aslai) All rights reserved.
//This and derivative works can be distributed as seen fit,
//so long as this notice remains unchanged and present

#include "global/stdinc.h"
#include "engine/media.h"
#include "engine/types.h"
#include "global/classes.h"
#include "engine/animation.h"

struct Tile{
    CImage img;
    int frames;
    int w, h;
    int staticism;
    char* id;
    int pos;
    Context* parent;
    void draw( int x, int y );
    Tile( CImage image, Context* prnt, int framecnt, int wid, int hig, int stat, char* ID  );

    ~Tile();
};

extern std::vector<Tile*> tiles;
extern std::map<const char*, int, map_char> tile_map;

Tile* tile_add( CImage image, Context* prnt, int framecnt, int wid, int hig, int stat, char* ID );


void tile_rem( Tile* );
Tile* tile_get_by_id( char* ID );