DevIL: /home/dwoods/DevIL/src-IL/include/il_states.h Source File

- Main Page
- Data Structures
- Files

# /home/dwoods/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         ILenum          ilVtfCompression;
    00083
    00084
    00085         //
    00086         // Format-specific strings
    00087         //
    00088
    00089         char*           ilTgaId;
    00090         char*           ilTgaAuthName;
    00091         char*           ilTgaAuthComment;
    00092         char*           ilPngAuthName;
    00093         char*           ilPngTitle;
    00094         char*           ilPngDescription;
    00095         char*           ilTifDescription;
    00096         char*           ilTifHostComputer;
    00097         char*           ilTifDocumentName;
    00098         char*           ilTifAuthName;
    00099         char*           ilCHeader;
    00100
    00101
    00102
    00103
    00104 } IL_STATES;
    00105
    00106 IL_STATES ilStates[IL_ATTRIB_STACK_MAX];
    00107
    00108
    00109 typedef struct IL_HINTS
    00110 {
    00111         // Memory vs. Speed trade-off
    00112         ILenum          MemVsSpeedHint;
    00113         // Compression hints
    00114         ILenum          CompressHint;
    00115
    00116 } IL_HINTS;
    00117
    00118 IL_HINTS ilHints;
    00119
    00120
    00121 #ifndef IL_NO_BLP
    00122         #define IL_BLP_EXT "blp "
    00123 #else
    00124         #define IL_BLP_EXT ""
    00125 #endif
    00126
    00127 #ifndef IL_NO_BMP
    00128         #define IL_BMP_EXT "bmp dib "
    00129 #else
    00130         #define IL_BMP_EXT ""
    00131 #endif
    00132
    00133 #ifndef IL_NO_CHEAD
    00134         #define IL_CHEAD_EXT "h "
    00135 #else
    00136         #define IL_CHEAD_EXT ""
    00137 #endif
    00138
    00139 #ifndef IL_NO_CUT
    00140         #define IL_CUT_EXT "cut "
    00141 #else
    00142         #define IL_CUT_EXT ""
    00143 #endif
    00144
    00145 #ifndef IL_NO_DCX
    00146         #define IL_DCX_EXT "dcx "
    00147 #else
    00148         #define IL_DCX_EXT ""
    00149 #endif
    00150
    00151 #ifndef IL_NO_DCM
    00152         #define IL_DCM_EXT "dicom dcm"
    00153 #else
    00154         #define IL_DCM_EXT ""
    00155 #endif
    00156
    00157 #ifndef IL_NO_DDS
    00158         #define IL_DDS_EXT "dds "
    00159 #else
    00160         #define IL_DDS_EXT ""
    00161 #endif
    00162
    00163 #ifndef IL_NO_DPX
    00164         #define IL_DPX_EXT "dds "
    00165 #else
    00166         #define IL_DPX_EXT ""
    00167 #endif
    00168
    00169 #ifndef IL_NO_EXR
    00170         #define IL_EXR_EXT "exr "
    00171 #else
    00172         #define IL_EXR_EXT ""
    00173 #endif
    00174
    00175 #ifndef IL_NO_FITS
    00176         #define IL_FITS_EXT "fit fits "
    00177 #else
    00178         #define IL_FITS_EXT ""
    00179 #endif
    00180
    00181 #ifndef IL_NO_FTX
    00182         #define IL_FTX_EXT "ftx "
    00183 #else
    00184         #define IL_FTX_EXT ""
    00185 #endif
    00186
    00187 #ifndef IL_NO_GIF
    00188         #define IL_GIF_EXT "gif "
    00189 #else
    00190         #define IL_GIF_EXT ""
    00191 #endif
    00192
    00193 #ifndef IL_NO_HDR
    00194         #define IL_HDR_EXT "hdr "
    00195 #else
    00196         #define IL_HDR_EXT ""
    00197 #endif
    00198
    00199 #ifndef IL_NO_ICNS
    00200         #define IL_ICNS_EXT "icns "
    00201 #else
    00202         #define IL_ICNS_EXT ""
    00203 #endif
    00204
    00205 #ifndef IL_NO_ICO
    00206         #define IL_ICO_EXT "ico cur "
    00207 #else
    00208         #define IL_ICO_EXT ""
    00209 #endif
    00210
    00211 #ifndef IL_NO_IFF
    00212         #define IL_IFF_EXT "iff "
    00213 #else
    00214         #define IL_IFF_EXT ""
    00215 #endif
    00216
    00217 #ifndef IL_NO_IWI
    00218         #define IL_IWI_EXT "iwi "
    00219 #else
    00220         #define IL_IWI_EXT ""
    00221 #endif
    00222
    00223 #ifndef IL_NO_JP2
    00224         #define IL_JP2_EXT "jp2 "
    00225 #else
    00226         #define IL_JP2_EXT ""
    00227 #endif
    00228
    00229 #ifndef IL_NO_JPG
    00230         #define IL_JPG_EXT "jpg jpe jpeg "
    00231 #else
    00232         #define IL_JPG_EXT ""
    00233 #endif
    00234
    00235 #ifndef IL_NO_LIF
    00236         #define IL_LIF_EXT "lif "
    00237 #else
    00238         #define IL_LIF_EXT ""
    00239 #endif
    00240
    00241 #ifndef IL_NO_MDL
    00242         #define IL_MDL_EXT "mdl "
    00243 #else
    00244         #define IL_MDL_EXT ""
    00245 #endif
    00246
    00247 #ifndef IL_NO_MNG
    00248         #define IL_MNG_EXT "mng jng "
    00249 #else
    00250         #define IL_MNG_EXT ""
    00251 #endif
    00252
    00253 #ifndef IL_NO_MP3
    00254         #define IL_MP3_EXT "mp3 "
    00255 #else
    00256         #define IL_MP3_EXT ""
    00257 #endif
    00258
    00259 #ifndef IL_NO_PCD
    00260         #define IL_PCD_EXT "pcd "
    00261 #else
    00262         #define IL_PCD_EXT ""
    00263 #endif
    00264
    00265 #ifndef IL_NO_PCX
    00266         #define IL_PCX_EXT "pcx "
    00267 #else
    00268         #define IL_PCX_EXT ""
    00269 #endif
    00270
    00271 #ifndef IL_NO_PIC
    00272         #define IL_PIC_EXT "pic "
    00273 #else
    00274         #define IL_PIC_EXT ""
    00275 #endif
    00276
    00277 #ifndef IL_NO_PIX
    00278         #define IL_PIX_EXT "pix "
    00279 #else
    00280         #define IL_PIX_EXT ""
    00281 #endif
    00282
    00283 #ifndef IL_NO_PNG
    00284         #define IL_PNG_EXT "png "
    00285 #else
    00286         #define IL_PNG_EXT ""
    00287 #endif
    00288
    00289 #ifndef IL_NO_PNM
    00290         #define IL_PNM_EXT "pbm pgm pnm ppm "
    00291 #else
    00292         #define IL_PNM_EXT ""
    00293 #endif
    00294
    00295 #ifndef IL_NO_PSD
    00296         #define IL_PSD_EXT "psd pdd "
    00297 #else
    00298         #define IL_PSD_EXT ""
    00299 #endif
    00300
    00301 #ifndef IL_NO_PSP
    00302         #define IL_PSP_EXT "psp "
    00303 #else
    00304         #define IL_PSP_EXT ""
    00305 #endif
    00306
    00307 #ifndef IL_NO_PXR
    00308         #define IL_PXR_EXT "pxr "
    00309 #else
    00310         #define IL_PXR_EXT ""
    00311 #endif
    00312
    00313 #ifndef IL_NO_RAW
    00314         #define IL_RAW_EXT "raw "
    00315 #else
    00316         #define IL_RAW_EXT ""
    00317 #endif
    00318
    00319 #ifndef IL_NO_ROT
    00320         #define IL_ROT_EXT "rot "
    00321 #else
    00322         #define IL_ROT_EXT ""
    00323 #endif
    00324
    00325 #ifndef IL_NO_SGI
    00326         #define IL_SGI_EXT "sgi bw rgb rgba "
    00327 #else
    00328         #define IL_SGI_EXT ""
    00329 #endif
    00330
    00331 #ifndef IL_NO_SUN
    00332         #define IL_SUN_EXT "sun ras rs im1 im8 im24 im32 "
    00333 #else
    00334         #define IL_SUN_EXT ""
    00335 #endif
    00336
    00337 #ifndef IL_NO_TEXTURE
    00338         #define IL_TEX_EXT "texture "
    00339 #else
    00340         #define IL_TEX_EXT ""
    00341 #endif
    00342
    00343 #ifndef IL_NO_TGA
    00344         #define IL_TGA_EXT "tga vda icb vst "
    00345 #else
    00346         #define IL_TGA_EXT ""
    00347 #endif
    00348
    00349 #ifndef IL_NO_TIF
    00350         #define IL_TIF_EXT "tif tiff "
    00351 #else
    00352         #define IL_TIF_EXT ""
    00353 #endif
    00354
    00355 #ifndef IL_NO_TPL
    00356         #define IL_TPL_EXT "tpl "
    00357 #else
    00358         #define IL_TPL_EXT ""
    00359 #endif
    00360
    00361 #ifndef IL_NO_UTX
    00362         #define IL_UTX_EXT "utx "
    00363 #else
    00364         #define IL_UTX_EXT ""
    00365 #endif
    00366
    00367 #ifndef IL_NO_VTF
    00368         #define IL_VTF_EXT "vtf "
    00369 #else
    00370         #define IL_VTF_EXT ""
    00371 #endif
    00372
    00373 #ifndef IL_NO_WAL
    00374         #define IL_WAL_EXT "wal "
    00375 #else
    00376         #define IL_WAL_EXT ""
    00377 #endif
    00378
    00379 #ifndef IL_NO_WBMP
    00380         #define IL_WBMP_EXT "wbmp "
    00381 #else
    00382         #define IL_WBMP_EXT ""
    00383 #endif
    00384
    00385 #ifndef IL_NO_WDP
    00386         #define IL_WDP_EXT "wdp "
    00387 #else
    00388         #define IL_WDP_EXT ""
    00389 #endif
    00390
    00391 #ifndef IL_NO_XPM
    00392         #define IL_XPM_EXT "xpm "
    00393 #else
    00394         #define IL_XPM_EXT ""
    00395 #endif
    00396
    00397
    00398
    00399 #endif//STATES_H