eobish

diff src/image.h @ 4:ce0548d24918

mostly works
author John Tsiombikas <nuclear@member.fsf.org>
date Sun, 18 Jan 2015 13:30:30 +0200
parents
children
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/src/image.h	Sun Jan 18 13:30:30 2015 +0200
     1.3 @@ -0,0 +1,21 @@
     1.4 +#ifndef IMAGE_H_
     1.5 +#define IMAGE_H_
     1.6 +
     1.7 +struct color {
     1.8 +	int r, g, b;
     1.9 +};
    1.10 +
    1.11 +struct image {
    1.12 +	int xsz, ysz;
    1.13 +	unsigned char *pixels;
    1.14 +};
    1.15 +
    1.16 +int load_image(struct image *img, const char *fname);
    1.17 +void destroy_image(struct image *img);
    1.18 +
    1.19 +/* returns the number of palette entries loaded */
    1.20 +int load_palette(struct color *col, const char *fname);
    1.21 +
    1.22 +void blitkey(struct image *img, int x, int y, struct image *src, int key);
    1.23 +
    1.24 +#endif	/* IMAGE_H_ */