1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266
|
//-----------------------------------------------------------------------------
//
// ImageLib Sources
// Copyright (C) 2000-2002 by Denton Woods
// Last modified: 05/24/2001 <--Y2K Compliant! =]
//
// Filename: src-IL/src/il_states.h
//
// Description: State machine
//
//-----------------------------------------------------------------------------
#ifndef STATES_H
#define STATES_H
#include "il_internal.h"
ILboolean ilAble(ILenum Mode, ILboolean Flag);
#define IL_ATTRIB_STACK_MAX 32
ILuint ilCurrentPos = 0; // Which position on the stack
//
// Various states
//
typedef struct IL_STATES
{
// Origin states
ILboolean ilOriginSet;
ILenum ilOriginMode;
// Format and type states
ILboolean ilFormatSet;
ILboolean ilTypeSet;
ILenum ilFormatMode;
ILenum ilTypeMode;
// File mode states
ILboolean ilOverWriteFiles;
// Palette states
ILboolean ilAutoConvPal;
// Load fail states
ILboolean ilDefaultOnFail;
// Key colour states
ILboolean ilUseKeyColour;
// Compression states
ILenum ilCompression;
// Interlace states
ILenum ilInterlace;
// Quantization states
ILenum ilQuantMode;
ILuint ilNeuSample;
ILuint ilQuantMaxIndexs;
// DXTC states
ILboolean ilKeepDxtcData;
//
// Format-specific states
//
ILboolean ilTgaCreateStamp;
ILuint ilJpgQuality;
ILboolean ilPngInterlace;
ILboolean ilTgaRle;
ILboolean ilBmpRle;
ILboolean ilSgiRle;
ILenum ilJpgFormat;
ILenum ilDxtcFormat;
ILenum ilPcdPicNum;
ILint ilPngAlphaIndex; // this index should be treated as an alpha key (most formats use this rather than having alpha in the palette), -1 for none
// currently only used when writing out .png files and should obviously be set to -1 most of the time
//
// Format-specific strings
//
char *ilTgaId;
char *ilTgaAuthName;
char *ilTgaAuthComment;
char *ilPngAuthName;
char *ilPngTitle;
char *ilPngDescription;
char *ilTifDescription;
char *ilTifHostComputer;
char *ilTifDocumentName;
char *ilTifAuthName;
char *ilCHeader;
} IL_STATES;
IL_STATES ilStates[IL_ATTRIB_STACK_MAX];
typedef struct IL_HINTS
{
// Memory vs. Speed trade-off
ILenum MemVsSpeedHint;
// Compression hints
ILenum CompressHint;
} IL_HINTS;
IL_HINTS ilHints;
#ifndef IL_NO_BMP
#define IL_BMP_EXT "bmp dib "
#else
#define IL_BMP_EXT ""
#endif
#ifndef IL_NO_CHEAD
#define IL_CHEAD_EXT "h "
#else
#define IL_CHEAD_EXT ""
#endif
#ifndef IL_NO_CUT
#define IL_CUT_EXT "cut "
#else
#define IL_CUT_EXT ""
#endif
#ifndef IL_NO_DCX
#define IL_DCX_EXT "dcx "
#else
#define IL_DCX_EXT ""
#endif
#ifndef IL_NO_DDS
#define IL_DDS_EXT "dds "
#else
#define IL_DDS_EXT ""
#endif
#ifndef IL_NO_GIF
#define IL_GIF_EXT "gif "
#else
#define IL_GIF_EXT ""
#endif
#ifndef IL_NO_HDR
#define IL_HDR_EXT "hdr "
#else
#define IL_HDR_EXT ""
#endif
#ifndef IL_NO_ICO
#define IL_ICO_EXT "ico cur "
#else
#define IL_ICO_EXT ""
#endif
#ifndef IL_NO_JPG
#define IL_JPG_EXT "jpg jpe jpeg "
#else
#define IL_JPG_EXT ""
#endif
#ifndef IL_NO_LIF
#define IL_LIF_EXT "lif "
#else
#define IL_LIF_EXT ""
#endif
#ifndef IL_NO_MDL
#define IL_MDL_EXT "mdl "
#else
#define IL_MDL_EXT ""
#endif
#ifndef IL_NO_MNG
#define IL_MNG_EXT "mng jng "
#else
#define IL_MNG_EXT ""
#endif
#ifndef IL_NO_PCX
#define IL_PCX_EXT "pcx "
#else
#define IL_PCX_EXT ""
#endif
#ifndef IL_NO_PIC
#define IL_PIC_EXT "pic "
#else
#define IL_PIC_EXT ""
#endif
#ifndef IL_NO_PIX
#define IL_PIX_EXT "pix "
#else
#define IL_PIX_EXT ""
#endif
#ifndef IL_NO_PNG
#define IL_PNG_EXT "png "
#else
#define IL_PNG_EXT ""
#endif
#ifndef IL_NO_PNM
#define IL_PNM_EXT "pbm pgm pnm ppm "
#else
#define IL_PNM_EXT ""
#endif
#ifndef IL_NO_PSD
#define IL_PSD_EXT "psd pdd "
#else
#define IL_PSD_EXT ""
#endif
#ifndef IL_NO_PSP
#define IL_PSP_EXT "psp "
#else
#define IL_PSP_EXT ""
#endif
#ifndef IL_NO_PXR
#define IL_PXR_EXT "pxr "
#else
#define IL_PXR_EXT ""
#endif
#ifndef IL_NO_SGI
#define IL_SGI_EXT "sgi bw rgb rgba "
#else
#define IL_SGI_EXT ""
#endif
#ifndef IL_NO_TGA
#define IL_TGA_EXT "tga vda icb vst "
#else
#define IL_TGA_EXT ""
#endif
#ifndef IL_NO_TIF
#define IL_TIF_EXT "tif tiff "
#else
#define IL_TIF_EXT ""
#endif
#ifndef IL_NO_WAL
#define IL_WAL_EXT "wal "
#else
#define IL_WAL_EXT ""
#endif
#ifndef IL_NO_XPM
#define IL_XPM_EXT "xpm "
#else
#define IL_XPM_EXT ""
#endif
#endif//STATES_H
|