1 /* 2 * lf2.h 3 * Header file for programs dealing with Leaf LF2 format. 4 * 10/12/1997 by TF 5 */ 6 7 #ifndef ___INCLUDE_LF2_H 8 #define ___INCLUDE_LF2_H 9 10 #include <stdio.h> 11 12 #define LF2_R 0 13 #define LF2_G 1 14 #define LF2_B 2 15 16 typedef struct { 17 int width; 18 int height; 19 int xoffset; 20 int yoffset; 21 int color_num; 22 int unknown; /* unknown, yet */ 23 int direction; /* vertical or horizontal */ 24 int transparent; /* the palette num. of transparent color */ 25 int size; /* the size of image */ 26 int palette[256][3]; 27 int *image; 28 } LF2; 29 30 extern void free_lf2(LF2 *); 31 32 extern LF2 *read_lf2(char *); 33 extern LF2 *read_lf2_from_data(unsigned char *, int); 34 #endif 35