1 2 /* 3 * whirlgif.h 4 * 5 * Copyright (C) 1995,1996 by Kevin Kadow 6 * Copyright (C) 1990,1991,1992 by Mark Podlipec. 7 * All rights reserved. 8 * 9 * This software may be freely copied, modified and redistributed 10 * without fee provided that this copyright notice is preserved 11 * intact on all copies and modified copies. 12 * 13 * There is no warranty or other guarantee of fitness of this software. 14 * It is provided solely "as is". The author(s) disclaim(s) all 15 * responsibility and liability with respect to this software's usage 16 * or its effect upon hardware or computer systems. 17 * 18 */ 19 20 /* Default amount of inter-frame time */ 21 #define DEFAULT_TIME 10 22 /* If set to 1, Netscape 'loop' code will be added by default */ 23 #define DEFAULT_LOOP 0 24 /* If set to 1, use the colormaps from all images, not just the first */ 25 #define DEFAULT_USE_COLORMAP 0 26 27 #include <stdio.h> 28 29 30 #define BIGSTRING 256 31 #define LONG int 32 #define ULONG unsigned int 33 #define BYTE char 34 #define UBYTE unsigned char 35 #define SHORT short 36 #define USHORT unsigned short 37 #define WORD short int 38 #define UWORD unsigned short int 39 40 #ifndef TRUE 41 #define TRUE 1 42 #endif 43 #ifndef FALSE 44 #define FALSE 0 45 #endif 46 47 /* Used in calculating the transparent color */ 48 #define TRANS_NONE 1 49 #define TRANS_RGB 2 50 #define TRANS_MAP 3 51 52 typedef struct 53 { 54 int type; 55 UBYTE valid; 56 UBYTE map; 57 UBYTE red; 58 UBYTE green; 59 UBYTE blue; 60 } Transparency; 61 62 typedef struct 63 { 64 Transparency trans; 65 int left; 66 int top; 67 unsigned int time; 68 } Global; 69 70 typedef struct 71 { 72 int width; 73 int height; 74 UBYTE m; 75 UBYTE cres; 76 UBYTE pixbits; 77 UBYTE bc; 78 } GIF_Screen_Hdr; 79 80 typedef union 81 { 82 struct 83 { 84 UBYTE red; 85 UBYTE green; 86 UBYTE blue; 87 UBYTE pad; 88 } cmap; 89 ULONG pixel; 90 } GIF_Color; 91 92 typedef struct 93 { 94 int left; 95 int top; 96 int width; 97 int height; 98 UBYTE m; 99 UBYTE i; 100 UBYTE pixbits; 101 UBYTE reserved; 102 } GIF_Image_Hdr; 103 104 typedef struct 105 { 106 UBYTE valid; 107 UBYTE data; 108 UBYTE first; 109 UBYTE res; 110 int last; 111 } GIF_Table; 112 113 114