X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=tools%2Fcsprite%2Fsrc%2Fimage.h;fp=tools%2Fcsprite%2Fsrc%2Fimage.h;h=63352f8a7527ed6340a80ea040dd1598b38b33bc;hb=02d3f6c78597600d2b100748aa54241228b9ca09;hp=0000000000000000000000000000000000000000;hpb=ba648ddfc62fc6d3f47294aa8bfc10ea6ca3f479;p=dosdemo diff --git a/tools/csprite/src/image.h b/tools/csprite/src/image.h new file mode 100644 index 0000000..63352f8 --- /dev/null +++ b/tools/csprite/src/image.h @@ -0,0 +1,28 @@ +#ifndef IMAGE_H_ +#define IMAGE_H_ + +struct cmapent { + unsigned char r, g, b; +}; + +struct image { + int width, height; + int bpp; + int nchan; + int scansz, pitch; + int cmap_ncolors; + struct cmapent cmap[256]; + unsigned char *pixels; +}; + +int alloc_image(struct image *img, int x, int y, int bpp); +int load_image(struct image *img, const char *fname); +int save_image(struct image *img, const char *fname); + +int cmp_image(struct image *a, struct image *b); + +void blit_image(struct image *src, int sx, int sy, int w, int h, struct image *dst, int dx, int dy); + +void image_color_offset(struct image *img, int offs); + +#endif /* IMAGE_H_ */