X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?p=eradicate;a=blobdiff_plain;f=tools%2Frlesprite%2Fsrc%2Fimage.h;fp=tools%2Frlesprite%2Fsrc%2Fimage.h;h=0b966a6a2d49826e910e416d81077fda014df252;hp=0000000000000000000000000000000000000000;hb=2bd7529337d75380170f58364b1328ef3b8dc845;hpb=79091ddde8d1e5f865502f1a3f0755cda57c34fb diff --git a/tools/rlesprite/src/image.h b/tools/rlesprite/src/image.h new file mode 100644 index 0000000..0b966a6 --- /dev/null +++ b/tools/rlesprite/src/image.h @@ -0,0 +1,30 @@ +#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 conv_image_rgb565(struct image *img16, struct image *img); + +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_ */