- Main Page
- Data Structures
- Files

- File List
- Globals

# E:/DevIL/src-IL/include/il_states.h

    00001 //-----------------------------------------------------------------------------
    00002 //
    00003 // ImageLib Sources
    00004 // Copyright (C) 2000-2008 by Denton Woods
    00005 // Last modified: 11/07/2008
    00006 //
    00007 // Filename: src-IL/src/il_states.h
    00008 //
    00009 // Description: State machine
    00010 //
    00011 //-----------------------------------------------------------------------------
    00012
    00013
    00014 #ifndef STATES_H
    00015 #define STATES_H
    00016
    00017 #include "il_internal.h"
    00018
    00019
    00020 ILboolean ilAble(ILenum Mode, ILboolean Flag);
    00021
    00022
    00023 #define IL_ATTRIB_STACK_MAX 32
    00024
    00025 ILuint ilCurrentPos = 0;  // Which position on the stack
    00026
    00027 //
    00028 // Various states
    00029 //
    00030
    00031 typedef struct IL_STATES
    00032 {
    00033         // Origin states
    00034         ILboolean       ilOriginSet;
    00035         ILenum          ilOriginMode;
    00036         // Format and type states
    00037         ILboolean       ilFormatSet;
    00038         ILboolean       ilTypeSet;
    00039         ILenum          ilFormatMode;
    00040         ILenum          ilTypeMode;
    00041         // File mode states
    00042         ILboolean       ilOverWriteFiles;
    00043         // Palette states
    00044         ILboolean       ilAutoConvPal;
    00045         // Load fail states
    00046         ILboolean       ilDefaultOnFail;
    00047         // Key colour states
    00048         ILboolean       ilUseKeyColour;
    00049         // Alpha blend states
    00050         ILboolean       ilBlitBlend;
    00051         // Compression states
    00052         ILenum          ilCompression;
    00053         // Interlace states
    00054         ILenum          ilInterlace;
    00055         // Quantization states
    00056         ILenum          ilQuantMode;
    00057         ILuint          ilNeuSample;
    00058         ILuint          ilQuantMaxIndexs;
    00059         // DXTC states
    00060         ILboolean       ilKeepDxtcData;
    00061         ILboolean       ilUseNVidiaDXT;
    00062         ILboolean       ilUseSquishDXT;
    00063
    00064
    00065         //
    00066         // Format-specific states
    00067         //
    00068
    00069         ILboolean       ilTgaCreateStamp;
    00070         ILuint          ilJpgQuality;
    00071         ILboolean       ilPngInterlace;
    00072         ILboolean       ilTgaRle;
    00073         ILboolean       ilBmpRle;
    00074         ILboolean       ilSgiRle;
    00075         ILenum          ilJpgFormat;
    00076         ILboolean       ilJpgProgressive;
    00077         ILenum          ilDxtcFormat;
    00078         ILenum          ilPcdPicNum;
    00079
    00080         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
    00081                                                                         // currently only used when writing out .png files and should obviously be set to -1 most of the time
    00082
    00083         //
    00084         // Format-specific strings
    00085         //
    00086
    00087         char*           ilTgaId;
    00088         char*           ilTgaAuthName;
    00089         char*           ilTgaAuthComment;
    00090         char*           ilPngAuthName;
    00091         char*           ilPngTitle;
    00092         char*           ilPngDescription;
    00093         char*           ilTifDescription;
    00094         char*           ilTifHostComputer;
    00095         char*           ilTifDocumentName;
    00096         char*           ilTifAuthName;
    00097         char*           ilCHeader;
    00098
    00099
    00100
    00101
    00102 } IL_STATES;
    00103
    00104 IL_STATES ilStates[IL_ATTRIB_STACK_MAX];
    00105
    00106
    00107 typedef struct IL_HINTS
    00108 {
    00109         // Memory vs. Speed trade-off
    00110         ILenum          MemVsSpeedHint;
    00111         // Compression hints
    00112         ILenum          CompressHint;
    00113
    00114 } IL_HINTS;
    00115
    00116 IL_HINTS ilHints;
    00117
    00118
    00119 #ifndef IL_NO_BMP
    00120         #define IL_BMP_EXT "bmp dib "
    00121 #else
    00122         #define IL_BMP_EXT ""
    00123 #endif
    00124
    00125 #ifndef IL_NO_CHEAD
    00126         #define IL_CHEAD_EXT "h "
    00127 #else
    00128         #define IL_CHEAD_EXT ""
    00129 #endif
    00130
    00131 #ifndef IL_NO_CUT
    00132         #define IL_CUT_EXT "cut "
    00133 #else
    00134         #define IL_CUT_EXT ""
    00135 #endif
    00136
    00137 #ifndef IL_NO_DCX
    00138         #define IL_DCX_EXT "dcx "
    00139 #else
    00140         #define IL_DCX_EXT ""
    00141 #endif
    00142
    00143 #ifndef IL_NO_DDS
    00144         #define IL_DDS_EXT "dds "
    00145 #else
    00146         #define IL_DDS_EXT ""
    00147 #endif
    00148
    00149 #ifndef IL_NO_EXR
    00150         #define IL_EXR_EXT "exr "
    00151 #else
    00152         #define IL_EXR_EXT ""
    00153 #endif
    00154
    00155 #ifndef IL_NO_GIF
    00156         #define IL_GIF_EXT "gif "
    00157 #else
    00158         #define IL_GIF_EXT ""
    00159 #endif
    00160
    00161 #ifndef IL_NO_HDR
    00162         #define IL_HDR_EXT "hdr "
    00163 #else
    00164         #define IL_HDR_EXT ""
    00165 #endif
    00166
    00167 #ifndef IL_NO_ICNS
    00168         #define IL_ICNS_EXT "icns "
    00169 #else
    00170         #define IL_ICNS_EXT ""
    00171 #endif
    00172
    00173 #ifndef IL_NO_ICO
    00174         #define IL_ICO_EXT "ico cur "
    00175 #else
    00176         #define IL_ICO_EXT ""
    00177 #endif
    00178
    00179 #ifndef IL_NO_IFF
    00180         #define IL_IFF_EXT "iff "
    00181 #else
    00182         #define IL_IFF_EXT ""
    00183 #endif
    00184
    00185 #ifndef IL_NO_JP2
    00186         #define IL_JP2_EXT "jp2 "
    00187 #else
    00188         #define IL_JP2_EXT ""
    00189 #endif
    00190
    00191 #ifndef IL_NO_JPG
    00192         #define IL_JPG_EXT "jpg jpe jpeg "
    00193 #else
    00194         #define IL_JPG_EXT ""
    00195 #endif
    00196
    00197 #ifndef IL_NO_LIF
    00198         #define IL_LIF_EXT "lif "
    00199 #else
    00200         #define IL_LIF_EXT ""
    00201 #endif
    00202
    00203 #ifndef IL_NO_MDL
    00204         #define IL_MDL_EXT "mdl "
    00205 #else
    00206         #define IL_MDL_EXT ""
    00207 #endif
    00208
    00209 #ifndef IL_NO_MNG
    00210         #define IL_MNG_EXT "mng jng "
    00211 #else
    00212         #define IL_MNG_EXT ""
    00213 #endif
    00214
    00215 #ifndef IL_NO_PCD
    00216         #define IL_PCD_EXT "pcd "
    00217 #else
    00218         #define IL_PCD_EXT ""
    00219 #endif
    00220
    00221 #ifndef IL_NO_PCX
    00222         #define IL_PCX_EXT "pcx "
    00223 #else
    00224         #define IL_PCX_EXT ""
    00225 #endif
    00226
    00227 #ifndef IL_NO_PIC
    00228         #define IL_PIC_EXT "pic "
    00229 #else
    00230         #define IL_PIC_EXT ""
    00231 #endif
    00232
    00233 #ifndef IL_NO_PIX
    00234         #define IL_PIX_EXT "pix "
    00235 #else
    00236         #define IL_PIX_EXT ""
    00237 #endif
    00238
    00239 #ifndef IL_NO_PNG
    00240         #define IL_PNG_EXT "png "
    00241 #else
    00242         #define IL_PNG_EXT ""
    00243 #endif
    00244
    00245 #ifndef IL_NO_PNM
    00246         #define IL_PNM_EXT "pbm pgm pnm ppm "
    00247 #else
    00248         #define IL_PNM_EXT ""
    00249 #endif
    00250
    00251 #ifndef IL_NO_PSD
    00252         #define IL_PSD_EXT "psd pdd "
    00253 #else
    00254         #define IL_PSD_EXT ""
    00255 #endif
    00256
    00257 #ifndef IL_NO_PSP
    00258         #define IL_PSP_EXT "psp "
    00259 #else
    00260         #define IL_PSP_EXT ""
    00261 #endif
    00262
    00263 #ifndef IL_NO_PXR
    00264         #define IL_PXR_EXT "pxr "
    00265 #else
    00266         #define IL_PXR_EXT ""
    00267 #endif
    00268
    00269 #ifndef IL_NO_RAW
    00270         #define IL_RAW_EXT "raw "
    00271 #else
    00272         #define IL_RAW_EXT ""
    00273 #endif
    00274
    00275 #ifndef IL_NO_SGI
    00276         #define IL_SGI_EXT "sgi bw rgb rgba "
    00277 #else
    00278         #define IL_SGI_EXT ""
    00279 #endif
    00280
    00281 #ifndef IL_NO_SUN
    00282         #define IL_SUN_EXT "sun "
    00283 #else
    00284         #define IL_SUN_EXT ""
    00285 #endif
    00286
    00287 #ifndef IL_NO_TGA
    00288         #define IL_TGA_EXT "tga vda icb vst "
    00289 #else
    00290         #define IL_TGA_EXT ""
    00291 #endif
    00292
    00293 #ifndef IL_NO_TIF
    00294         #define IL_TIF_EXT "tif tiff "
    00295 #else
    00296         #define IL_TIF_EXT ""
    00297 #endif
    00298
    00299 #ifndef IL_NO_VTF
    00300         #define IL_VTF_EXT "vtf "
    00301 #else
    00302         #define IL_VTF_EXT ""
    00303 #endif
    00304
    00305 #ifndef IL_NO_WAL
    00306         #define IL_WAL_EXT "wal "
    00307 #else
    00308         #define IL_WAL_EXT ""
    00309 #endif
    00310
    00311 #ifndef IL_NO_WBMP
    00312         #define IL_WBMP_EXT "wbmp "
    00313 #else
    00314         #define IL_WBMP_EXT ""
    00315 #endif
    00316
    00317 #ifndef IL_NO_XPM
    00318         #define IL_XPM_EXT "xpm "
    00319 #else
    00320         #define IL_XPM_EXT ""
    00321 #endif
    00322
    00323
    00324
    00325 #endif//STATES_H