X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?p=dosdemo;a=blobdiff_plain;f=src%2Fimage.h;fp=src%2Fimage.h;h=5da86525ed83ed1472cace1ac4fec14453cd905e;hp=0000000000000000000000000000000000000000;hb=dc88088aa075f2269860b89433ccf5736dab1244;hpb=7705fa326336feba1a66d5a6ca8a7c27771e4c5f diff --git a/src/image.h b/src/image.h new file mode 100644 index 0000000..5da8652 --- /dev/null +++ b/src/image.h @@ -0,0 +1,23 @@ +#ifndef IMAGE_H_ +#define IMAGE_H_ + +#include "inttypes.h" + +struct image { + int width, height; + uint16_t *pixels; + + /* optional animation data */ + float cur_dur, frame_interval; + int cur_frame, num_frames; + float *uoffs, *voffs; +}; + +int load_image(struct image *img, const char *fname); +int dump_image(struct image *img, const char *fname); +void destroy_image(struct image *img); + +int load_cubemap(struct image *cube, const char *fname_fmt); +void destroy_cubemap(struct image *cube); + +#endif /* IMAGE_H_ */