eobish

diff src/tileset.h @ 4:ce0548d24918

mostly works
author John Tsiombikas <nuclear@member.fsf.org>
date Sun, 18 Jan 2015 13:30:30 +0200
parents
children 0baf4e98315e
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/src/tileset.h	Sun Jan 18 13:30:30 2015 +0200
     1.3 @@ -0,0 +1,25 @@
     1.4 +#ifndef TILESET_H_
     1.5 +#define TILESET_H_
     1.6 +
     1.7 +#include "image.h"
     1.8 +
     1.9 +struct tile {
    1.10 +	char *name;
    1.11 +	struct image img;
    1.12 +	int orig_x, orig_y;
    1.13 +};
    1.14 +
    1.15 +struct tileset {
    1.16 +	struct tile *tile;
    1.17 +	int num_tiles;
    1.18 +
    1.19 +	struct color pal[256];
    1.20 +	int pal_size;
    1.21 +};
    1.22 +
    1.23 +int load_tileset(struct tileset *ts, const char *fname);
    1.24 +void destroy_tileset(struct tileset *ts);
    1.25 +
    1.26 +struct tile *get_tile(struct tileset *ts, const char *name);
    1.27 +
    1.28 +#endif	/* TILESET_H_ */