made sprite compiler able to handle 565 formats. the assembly output
[dosdemo] / tools / csprite / src / image.h
1 #ifndef IMAGE_H_
2 #define IMAGE_H_
3
4 struct cmapent {
5         unsigned char r, g, b;
6 };
7
8 struct image {
9         int width, height;
10         int bpp;
11         int nchan;
12         int scansz, pitch;
13         int cmap_ncolors;
14         struct cmapent cmap[256];
15         unsigned char *pixels;
16 };
17
18 int alloc_image(struct image *img, int x, int y, int bpp);
19 int load_image(struct image *img, const char *fname);
20 int save_image(struct image *img, const char *fname);
21
22 int conv_image_rgb565(struct image *img16, struct image *img);
23
24 int cmp_image(struct image *a, struct image *b);
25
26 void blit_image(struct image *src, int sx, int sy, int w, int h, struct image *dst, int dx, int dy);
27
28 void image_color_offset(struct image *img, int offs);
29
30 #endif  /* IMAGE_H_ */