Restructure repository to include all source folders

Move git root from Client/ to src/ to track all source code:
- Client: Game client source (moved to Client/Client/)
- Server: Game server source
- GameTools: Development tools
- CryptoSource: Encryption utilities
- database: Database scripts
- Script: Game scripts
- rylCoder_16.02.2008_src: Legacy coder tools
- GMFont, Game: Additional resources

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-11-29 20:17:20 +09:00
parent 5d3cd64a25
commit dd97ddec92
11602 changed files with 1446576 additions and 0 deletions

View File

@@ -0,0 +1,13 @@
%module DevIL
%{
#include "IL/il.h"
#include "IL/ilu.h"
#include "IL/ilut.h"
//#include "IL/ilu_region.h"
%}
%include "IL/il.h"
%include "IL/ilu.h"
%include "IL/ilut.h"
//%include "IL/ilu_region.h"

View File

@@ -0,0 +1,147 @@
/* include/IL/config.h. Generated by configure. */
/* include/IL/config.h.in. Generated from configure.in by autoheader. */
#ifndef __CONFIG_H__
#define __CONFIG_H__
/* Supported images formats (il) */
/* #undef IL_NO_BMP */
/* #undef IL_NO_CUT */
/* #undef IL_NO_CHEAD */
/* #undef IL_NO_DCX */
#define IL_NO_CUT
#define IL_NO_CHEAD
#define IL_NO_DCX
/* #undef IL_NO_DDS */
/* #undef IL_NO_DOOM */
/* #undef IL_NO_GIF */
/* #undef IL_NO_HDR */
/* #undef IL_NO_ICO */
/* #undef IL_NO_JPG */
#define IL_NO_DOOM
#define IL_NO_GIF
#define IL_NO_HDR
#define IL_NO_ICO
#define IL_NO_JPG
/* #undef IL_NO_LIF */
/* #undef IL_NO_MDL */
#define IL_NO_LIF
#define IL_NO_MDL
#define IL_NO_MNG
/* #undef IL_NO_PCD */
/* #undef IL_NO_PCX */
/* #undef IL_NO_PIC */
/* #undef IL_NO_PIX */
/* #undef IL_NO_PNG */
/* #undef IL_NO_PNM */
/* #undef IL_NO_PSD */
/* #undef IL_NO_PSP */
/* #undef IL_NO_PXR */
/* #undef IL_NO_RAW */
/* #undef IL_NO_SGI */
/* #undef IL_NO_TGA */
/* #undef IL_NO_TIF */
/* #undef IL_NO_WAL */
/* #undef IL_NO_XPM */
#define IL_NO_PCD
#define IL_NO_PCX
#define IL_NO_PIC
#define IL_NO_PIX
#define IL_NO_PNG
#define IL_NO_PNM
#define IL_NO_PSD
#define IL_NO_PSP
#define IL_NO_PXR
#define IL_NO_RAW
#define IL_NO_SGI
#define IL_NO_TGA
#define IL_NO_TIF
#define IL_NO_WAL
#define IL_NO_XPM
#define IL_USE_JPEGLIB_UNMODIFIED 1
/* Supported api (ilut) */
//
// sorry just
// cant get this one to work under windows
// have disabled for the now
//
// will look at it some more later
//
// Kriss
//
#undef ILUT_USE_ALLEGRO
#define ILUT_USE_DIRECTX8 1
#define ILUT_USE_DIRECTX9 1
#define ILUT_USE_OPENGL 1
#define ILUT_USE_SDL 1
#define ILUT_USE_WIN32 1
/* Define to 1 if you have the <dlfcn.h> header file. */
#define HAVE_DLFCN_H 1
/* Define to 1 if you have the <inttypes.h> header file. */
#define HAVE_INTTYPES_H 1
/* Define to 1 if you have the <memory.h> header file. */
#define HAVE_MEMORY_H 1
/* Define to 1 if you have the <stdint.h> header file. */
#define HAVE_STDINT_H 1
/* Define to 1 if you have the <stdlib.h> header file. */
#define HAVE_STDLIB_H 1
/* Define to 1 if you have the <strings.h> header file. */
#define HAVE_STRINGS_H 1
/* Define to 1 if you have the <string.h> header file. */
#define HAVE_STRING_H 1
/* Define to 1 if you have the <sys/stat.h> header file. */
//#define HAVE_SYS_STAT_H 1
/* Define to 1 if you have the <sys/types.h> header file. */
//#define HAVE_SYS_TYPES_H 1
/* Define to 1 if you have the <unistd.h> header file. */
//#define HAVE_UNISTD_H 1
/* Name of package */
#define PACKAGE "DevIL"
/* Define to the address where bug reports for this package should be sent. */
#define PACKAGE_BUGREPORT ""
/* Define to the full name of this package. */
#define PACKAGE_NAME ""
/* Define to the full name and version of this package. */
#define PACKAGE_STRING ""
/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME ""
/* Define to the version of this package. */
#define PACKAGE_VERSION ""
/* Define to 1 if you have the ANSI C header files. */
#define STDC_HEADERS 1
/* Version number of package */
#define VERSION "1.6.7"
/* Define to 1 if your processor stores words with the most significant byte
first (like Motorola and SPARC, unlike Intel and VAX). */
/* #undef WORDS_BIGENDIAN */
/* If using Mac OS X uncomment this line */
/* #include "macconfig.h" */
/* Define to 1 if the X Window System is missing or not being used. */
/* #undef X_DISPLAY_MISSING */
#endif /* __CONFIG_H__ */

View File

@@ -0,0 +1,123 @@
/* include/IL/config.h. Generated by configure. */
/* include/IL/config.h.in. Generated from configure.in by autoheader. */
#ifndef __CONFIG_H__
#define __CONFIG_H__
/* Supported images formats (il) */
/* #undef IL_NO_BMP */
/* #undef IL_NO_CUT */
/* #undef IL_NO_CHEAD */
/* #undef IL_NO_DCX */
/* #undef IL_NO_DDS */
/* #undef IL_NO_DOOM */
/* #undef IL_NO_GIF */
/* #undef IL_NO_HDR */
/* #undef IL_NO_ICO */
/* #undef IL_NO_JPG */
#define IL_NO_LCMS
/* #undef IL_NO_LIF */
/* #undef IL_NO_MDL */
#define IL_NO_MNG
/* #undef IL_NO_PCD */
/* #undef IL_NO_PCX */
/* #undef IL_NO_PIC */
/* #undef IL_NO_PIX */
/* #undef IL_NO_PNG */
/* #undef IL_NO_PNM */
/* #undef IL_NO_PSD */
/* #undef IL_NO_PSP */
/* #undef IL_NO_PXR */
/* #undef IL_NO_RAW */
/* #undef IL_NO_SGI */
/* #undef IL_NO_TGA */
/* #undef IL_NO_TIF */
/* #undef IL_NO_WAL */
/* #undef IL_NO_XPM */
#define IL_USE_JPEGLIB_UNMODIFIED 1
/* Supported api (ilut) */
//
// sorry just
// cant get this one to work under windows
// have disabled for the now
//
// will look at it some more later
//
// Kriss
//
#undef ILUT_USE_ALLEGRO
#define ILUT_USE_DIRECTX8 1
#define ILUT_USE_DIRECTX9 1
#define ILUT_USE_OPENGL 1
#define ILUT_USE_SDL 1
#define ILUT_USE_WIN32 1
/* Define to 1 if you have the <dlfcn.h> header file. */
#define HAVE_DLFCN_H 1
/* Define to 1 if you have the <inttypes.h> header file. */
#define HAVE_INTTYPES_H 1
/* Define to 1 if you have the <memory.h> header file. */
#define HAVE_MEMORY_H 1
/* Define to 1 if you have the <stdint.h> header file. */
#define HAVE_STDINT_H 1
/* Define to 1 if you have the <stdlib.h> header file. */
#define HAVE_STDLIB_H 1
/* Define to 1 if you have the <strings.h> header file. */
#define HAVE_STRINGS_H 1
/* Define to 1 if you have the <string.h> header file. */
#define HAVE_STRING_H 1
/* Define to 1 if you have the <sys/stat.h> header file. */
//#define HAVE_SYS_STAT_H 1
/* Define to 1 if you have the <sys/types.h> header file. */
//#define HAVE_SYS_TYPES_H 1
/* Define to 1 if you have the <unistd.h> header file. */
//#define HAVE_UNISTD_H 1
/* Name of package */
#define PACKAGE "DevIL"
/* Define to the address where bug reports for this package should be sent. */
#define PACKAGE_BUGREPORT ""
/* Define to the full name of this package. */
#define PACKAGE_NAME ""
/* Define to the full name and version of this package. */
#define PACKAGE_STRING ""
/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME ""
/* Define to the version of this package. */
#define PACKAGE_VERSION ""
/* Define to 1 if you have the ANSI C header files. */
#define STDC_HEADERS 1
/* Version number of package */
#define VERSION "1.6.7"
/* Define to 1 if your processor stores words with the most significant byte
first (like Motorola and SPARC, unlike Intel and VAX). */
/* #undef WORDS_BIGENDIAN */
/* If using Mac OS X uncomment this line */
/* #include "macconfig.h" */
/* Define to 1 if the X Window System is missing or not being used. */
/* #undef X_DISPLAY_MISSING */
#endif /* __CONFIG_H__ */

View File

@@ -0,0 +1,150 @@
//-----------------------------------------------------------------------------
//
// ImageLib Sources
// Copyright (C) 2000-2002 by Denton Woods
// Last modified: 02/19/2002 <--Y2K Compliant! =]
//
// Filename: IL/devil_internal_exports.h
//
// Description: Internal stuff for DevIL (IL, ILU and ILUT)
//
//-----------------------------------------------------------------------------
#ifndef IL_EXPORTS_H
#define IL_EXPORTS_H
#include "IL/il.h"
#ifndef NOINLINE
#ifndef INLINE
#if defined(__GNUC__)
#define INLINE extern inline
#elif defined(_MSC_VER)
#define NOINLINE
#define INLINE
//#define INLINE __inline
#else
#define INLINE inline
#endif
#endif
#else
#define INLINE
#endif //NOINLINE
#ifdef __cplusplus
extern "C" {
#endif
#define IL_MAX(a,b) (((a) > (b)) ? (a) : (b))
#define IL_MIN(a,b) (((a) < (b)) ? (a) : (b))
// Basic Palette struct
typedef struct ILpal
{
ILubyte* Palette; // the image palette (if any)
ILuint PalSize; // size of the palette (in bytes)
ILenum PalType; // the palette types below (0x0500 range)
} ILpal;
// The Fundamental Image struct
typedef struct ILimage {
ILuint Width; // the image's width
ILuint Height; // the image's height
ILuint Depth; // the image's depth
ILubyte Bpp; // bytes per pixel (now number of channels)
ILubyte Bpc; // bytes per channel
ILuint Bps; // bytes per scanline (components for IL)
ILubyte* Data; // the image data
ILuint SizeOfData; // the total size of the data (in bytes)
ILuint SizeOfPlane; // SizeOfData in a 2d image, size of each plane slice in a 3d image (in bytes)
ILenum Format; // image format (in IL enum style)
ILenum Type; // image type (in IL enum style)
ILenum Origin; // origin of the image
ILpal Pal; // palette details
ILuint Duration; // length of the time to display this "frame"
ILenum CubeFlags; // cube map flags for sides present in chain
struct ILimage* Mipmaps; // mipmapped versions of this image terminated by a NULL - usu. NULL
struct ILimage* Next; // next image in the chain - usu. NULL
struct ILimage* Layers; // subsequent layers in the chain - usu. NULL
// ILuint NumNext; // number of images following this one (0 when not parent). These are calculated on request
// ILuint NumMips; // number of mipmaps (0 when not parent)
// ILuint NumLayers; // number of layers (0 when not parent)
ILuint* AnimList; // animation list
ILuint AnimSize; // animation list size
ILvoid* Profile; // colour profile
ILuint ProfileSize; // colour profile size
ILuint OffX, OffY; // offset of the image
ILubyte* DxtcData; // compressed data
ILenum DxtcFormat; // compressed data format
ILuint DxtcSize; // compressed data size
} ILimage;
// Memory functions
ILAPI ILvoid* ILAPIENTRY ialloc(const ILuint Size);
ILAPI ILvoid ILAPIENTRY ifree(const ILvoid *Ptr);
ILAPI ILvoid* ILAPIENTRY icalloc(const ILuint Size, const ILuint Num);
#ifdef ALTIVEC_GCC
ILAPI ILvoid* ILAPIENTRY ivec_align_buffer(ILvoid *buffer, const ILuint size);
#endif
// Internal library functions in IL
ILAPI ILimage* ILAPIENTRY ilGetCurImage(ILvoid);
ILAPI ILvoid ILAPIENTRY ilSetCurImage(ILimage *Image);
ILAPI ILvoid ILAPIENTRY ilSetError(ILenum Error);
ILAPI ILvoid ILAPIENTRY ilSetPal(ILpal *Pal);
//
// Utility functions
//
ILAPI ILubyte ILAPIENTRY ilGetBppFormat(ILenum Format);
ILAPI ILenum ILAPIENTRY ilGetFormatBpp(ILubyte Bpp);
ILAPI ILubyte ILAPIENTRY ilGetBpcType(ILenum Type);
ILAPI ILenum ILAPIENTRY ilGetTypeBpc(ILubyte Bpc);
ILAPI ILubyte ILAPIENTRY ilGetBppPal(ILenum PalType);
ILAPI ILenum ILAPIENTRY ilGetPalBaseType(ILenum PalType);
ILAPI ILuint ILAPIENTRY ilNextPower2(ILuint Num);
ILAPI ILenum ILAPIENTRY ilTypeFromExt(ILconst_string FileName);
ILAPI ILvoid ILAPIENTRY ilReplaceCurImage(ILimage *Image);
ILAPI ILvoid ILAPIENTRY iMemSwap( ILubyte *, ILubyte *, const ILuint );
//
// Image functions
//
ILAPI ILvoid ILAPIENTRY iBindImageTemp (ILvoid);
ILAPI ILboolean ILAPIENTRY ilClearImage_ (ILimage *Image);
ILAPI ILvoid ILAPIENTRY ilCloseImage (ILimage *Image);
ILAPI ILvoid ILAPIENTRY ilClosePal (ILpal *Palette);
ILAPI ILpal* ILAPIENTRY iCopyPal (ILvoid);
ILAPI ILboolean ILAPIENTRY ilCopyImageAttr (ILimage *Dest, ILimage *Src);
ILAPI ILimage* ILAPIENTRY ilCopyImage_ (ILimage *Src);
ILAPI ILvoid ILAPIENTRY ilGetClear (ILvoid *Colours, ILenum Format, ILenum Type);
ILAPI ILuint ILAPIENTRY ilGetCurName (ILvoid);
ILAPI ILboolean ILAPIENTRY ilIsValidPal (ILpal *Palette);
ILAPI ILimage* ILAPIENTRY ilNewImage (ILuint Width, ILuint Height, ILuint Depth, ILubyte Bpp, ILubyte Bpc);
ILAPI ILimage* ILAPIENTRY ilNewImageFull (ILuint Width, ILuint Height, ILuint Depth, ILubyte Bpp, ILenum Format, ILenum Type, ILvoid *Data);
ILAPI ILboolean ILAPIENTRY ilInitImage (ILimage *Image, ILuint Width, ILuint Height, ILuint Depth, ILubyte Bpp, ILenum Format, ILenum Type, ILvoid *Data);
ILAPI ILboolean ILAPIENTRY ilResizeImage (ILimage *Image, ILuint Width, ILuint Height, ILuint Depth, ILubyte Bpp, ILubyte Bpc);
ILAPI ILboolean ILAPIENTRY ilTexImage_ (ILimage *Image, ILuint Width, ILuint Height, ILuint Depth, ILubyte Bpp, ILenum Format, ILenum Type, ILvoid *Data);
ILAPI ILboolean ILAPIENTRY ilTexSubImage_ (ILimage *Image, ILvoid *Data);
ILAPI ILvoid* ILAPIENTRY ilConvertBuffer (ILuint SizeOfData, ILenum SrcFormat, ILenum DestFormat, ILenum SrcType, ILenum DestType, ILvoid *Buffer);
ILAPI ILimage* ILAPIENTRY iConvertImage (ILimage *Image, ILenum DestFormat, ILenum DestType);
ILAPI ILpal* ILAPIENTRY iConvertPal (ILpal *Pal, ILenum DestFormat);
ILAPI ILubyte* ILAPIENTRY iGetFlipped (ILimage *Image);
ILAPI ILboolean ILAPIENTRY iMirror();
ILAPI ILvoid ILAPIENTRY iFlipBuffer( ILubyte *buff, ILuint depth, ILuint line_size, ILuint line_num );
ILubyte *iFlipNewBuffer( ILubyte *buff, ILuint depth, ILuint line_size, ILuint line_num );
ILAPI ILvoid ILAPIENTRY iGetIntegervImage(ILimage *Image, ILenum Mode, ILint *Param);
// Internal library functions in ILU
ILAPI ILimage* ILAPIENTRY iluRotate_(ILimage *Image, ILfloat Angle);
ILAPI ILimage* ILAPIENTRY iluRotate3D_(ILimage *Image, ILfloat x, ILfloat y, ILfloat z, ILfloat Angle);
ILAPI ILimage* ILAPIENTRY iluScale_(ILimage *Image, ILuint Width, ILuint Height, ILuint Depth);
#ifdef __cplusplus
}
#endif
#endif//IL_EXPORTS_H

View File

@@ -0,0 +1,590 @@
//-----------------------------------------------------------------------------
//
// ImageLib Sources
// Copyright (C) 2000-2002 by Denton Woods
// Last modified: 06/23/2002 <--Y2K Compliant! =]
//
// Filename: IL/il.h
//
// Description: The main include file for DevIL
//
//-----------------------------------------------------------------------------
#ifndef __il_h_
#ifndef __IL_H__
#define __il_h_
#define __IL_H__
#ifdef __cplusplus
extern "C" {
#endif
// Compiling Optionsok
#define IL_INLINE_ASM
//this define controls if floats and doubles are clampled to [0..1]
//during conversion. It takes a little more time, but it is the correct
//way of doing this. If you are sure your floats are always valid,
//you can undefine this value...
#define CLAMP_HALF 1
#define CLAMP_FLOATS 1
#define CLAMP_DOUBLES 1
#define IL_NO_GIF
#define IL_NO_JPG
#define IL_NO_MNG
#define IL_NO_PNG
#define IL_NO_TIF
#define IL_NO_LCMS
#ifdef _WIN32_WCE
#define IL_NO_GIF
#define IL_NO_JPG
#define IL_NO_MNG
#define IL_NO_PNG
#define IL_NO_TIF
#define IL_NO_LCMS
#endif //_WIN32_WCE
#ifdef DJGPP
#define IL_NO_GIF
#define IL_NO_JPG
#define IL_NO_MNG
#define IL_NO_PNG
#define IL_NO_TIF
#define IL_NO_LCMS
#endif //DJGPP
#ifdef _WIN32
#if (defined(IL_USE_PRAGMA_LIBS)) && (!defined(_IL_BUILD_LIBRARY))
#if defined(_MSC_VER) || defined(__BORLANDC__)
#pragma comment(lib, "DevIL.lib")
#endif
#endif
#endif
#ifdef RESTRICT_KEYWORD
#define RESTRICT restrict
#define CONST_RESTRICT const restrict
#else
#define RESTRICT
#define CONST_RESTRICT const
#endif
#include <stdio.h>
typedef unsigned int ILenum;
typedef unsigned char ILboolean;
typedef unsigned int ILbitfield;
typedef signed char ILbyte;
typedef signed short ILshort;
typedef int ILint;
typedef int ILsizei;
typedef unsigned char ILubyte;
typedef unsigned short ILushort;
typedef unsigned int ILuint;
typedef float ILfloat;
typedef float ILclampf;
typedef double ILdouble;
typedef double ILclampd;
typedef void ILvoid;
#include <limits.h>
#ifdef _UNICODE
#ifndef _WIN32_WCE
#include <wchar.h>
#endif
//if we use a define instead of a typedef,
//ILconst_string works as intended
#define ILstring wchar_t*
#define ILconst_string wchar_t const *
#else
//if we use a define instead of a typedef,
//ILconst_string works as intended
#define ILstring char*
#define ILconst_string char const *
#endif //_UNICODE
#define IL_FALSE 0
#define IL_TRUE 1
// Matches OpenGL's right now.
#define IL_COLOUR_INDEX 0x1900
#define IL_COLOR_INDEX 0x1900
#define IL_RGB 0x1907
#define IL_RGBA 0x1908
#define IL_BGR 0x80E0
#define IL_BGRA 0x80E1
#define IL_LUMINANCE 0x1909
#define IL_LUMINANCE_ALPHA 0x190A
#define IL_BYTE 0x1400
#define IL_UNSIGNED_BYTE 0x1401
#define IL_SHORT 0x1402
#define IL_UNSIGNED_SHORT 0x1403
#define IL_INT 0x1404
#define IL_UNSIGNED_INT 0x1405
#define IL_FLOAT 0x1406
#define IL_DOUBLE 0x140A
#define IL_HALF 0x140B
#define IL_MAX_BYTE SCHAR_MAX
#define IL_MAX_UNSIGNED_BYTE UCHAR_MAX
#define IL_MAX_SHORT SHRT_MAX
#define IL_MAX_UNSIGNED_SHORT USHRT_MAX
#define IL_MAX_INT INT_MAX
#define IL_MAX_UNSIGNED_INT UINT_MAX
#define limit(x,m,M) (x<m?m:(x>M?M:x))
#define clamp(x) limit(x,0,1)
#define IL_VENDOR 0x1F00
#define IL_LOAD_EXT 0x1F01
#define IL_SAVE_EXT 0x1F02
//
// IL-specific #define's
//
#define IL_VERSION_1_6_8 1
#define IL_VERSION 168
// Attribute Bits
#define IL_ORIGIN_BIT 0x00000001
#define IL_FILE_BIT 0x00000002
#define IL_PAL_BIT 0x00000004
#define IL_FORMAT_BIT 0x00000008
#define IL_TYPE_BIT 0x00000010
#define IL_COMPRESS_BIT 0x00000020
#define IL_LOADFAIL_BIT 0x00000040
#define IL_FORMAT_SPECIFIC_BIT 0x00000080
#define IL_ALL_ATTRIB_BITS 0x000FFFFF
// Palette types
#define IL_PAL_NONE 0x0400
#define IL_PAL_RGB24 0x0401
#define IL_PAL_RGB32 0x0402
#define IL_PAL_RGBA32 0x0403
#define IL_PAL_BGR24 0x0404
#define IL_PAL_BGR32 0x0405
#define IL_PAL_BGRA32 0x0406
// Image types
#define IL_TYPE_UNKNOWN 0x0000
#define IL_BMP 0x0420
#define IL_CUT 0x0421
#define IL_DOOM 0x0422
#define IL_DOOM_FLAT 0x0423
#define IL_ICO 0x0424
#define IL_JPG 0x0425
#define IL_JFIF 0x0425
#define IL_LBM 0x0426
#define IL_PCD 0x0427
#define IL_PCX 0x0428
#define IL_PIC 0x0429
#define IL_PNG 0x042A
#define IL_PNM 0x042B
#define IL_SGI 0x042C
#define IL_TGA 0x042D
#define IL_TIF 0x042E
#define IL_CHEAD 0x042F
#define IL_RAW 0x0430
#define IL_MDL 0x0431
#define IL_WAL 0x0432
#define IL_LIF 0x0434
#define IL_MNG 0x0435
#define IL_JNG 0x0435
#define IL_GIF 0x0436
#define IL_DDS 0x0437
#define IL_DCX 0x0438
#define IL_PSD 0x0439
#define IL_EXIF 0x043A
#define IL_PSP 0x043B
#define IL_PIX 0x043C
#define IL_PXR 0x043D
#define IL_XPM 0x043E
#define IL_HDR 0x043F
#define IL_JASC_PAL 0x0475
// Error Types
#define IL_NO_ERROR 0x0000
#define IL_INVALID_ENUM 0x0501
#define IL_OUT_OF_MEMORY 0x0502
#define IL_FORMAT_NOT_SUPPORTED 0x0503
#define IL_INTERNAL_ERROR 0x0504
#define IL_INVALID_VALUE 0x0505
#define IL_ILLEGAL_OPERATION 0x0506
#define IL_ILLEGAL_FILE_VALUE 0x0507
#define IL_INVALID_FILE_HEADER 0x0508
#define IL_INVALID_PARAM 0x0509
#define IL_COULD_NOT_OPEN_FILE 0x050A
#define IL_INVALID_EXTENSION 0x050B
#define IL_FILE_ALREADY_EXISTS 0x050C
#define IL_OUT_FORMAT_SAME 0x050D
#define IL_STACK_OVERFLOW 0x050E
#define IL_STACK_UNDERFLOW 0x050F
#define IL_INVALID_CONVERSION 0x0510
#define IL_BAD_DIMENSIONS 0x0511
#define IL_FILE_READ_ERROR 0x0512 // 05/12/2002: Addition by Sam.
#define IL_FILE_WRITE_ERROR 0x0512
#define IL_LIB_GIF_ERROR 0x05E1
#define IL_LIB_JPEG_ERROR 0x05E2
#define IL_LIB_PNG_ERROR 0x05E3
#define IL_LIB_TIFF_ERROR 0x05E4
#define IL_LIB_MNG_ERROR 0x05E5
#define IL_UNKNOWN_ERROR 0x05FF
// Origin Definitions
#define IL_ORIGIN_SET 0x0600
#define IL_ORIGIN_LOWER_LEFT 0x0601
#define IL_ORIGIN_UPPER_LEFT 0x0602
#define IL_ORIGIN_MODE 0x0603
// Format and Type Mode Definitions
#define IL_FORMAT_SET 0x0610
#define IL_FORMAT_MODE 0x0611
#define IL_TYPE_SET 0x0612
#define IL_TYPE_MODE 0x0613
// File definitions
#define IL_FILE_OVERWRITE 0x0620
#define IL_FILE_MODE 0x0621
// Palette definitions
#define IL_CONV_PAL 0x0630
// Load fail definitions
#define IL_DEFAULT_ON_FAIL 0x0632
// Key colour definitions
#define IL_USE_KEY_COLOUR 0x0635
#define IL_USE_KEY_COLOR 0x0635
// Interlace definitions
#define IL_SAVE_INTERLACED 0x0639
#define IL_INTERLACE_MODE 0x063A
// Quantization definitions
#define IL_QUANTIZATION_MODE 0x0640
#define IL_WU_QUANT 0x0641
#define IL_NEU_QUANT 0x0642
#define IL_NEU_QUANT_SAMPLE 0x0643
#define IL_MAX_QUANT_INDEXS 0x0644 //XIX : ILint : Maximum number of colors to reduce to, default of 256. and has a range of 2-256
// Hints
#define IL_FASTEST 0x0660
#define IL_LESS_MEM 0x0661
#define IL_DONT_CARE 0x0662
#define IL_MEM_SPEED_HINT 0x0665
#define IL_USE_COMPRESSION 0x0666
#define IL_NO_COMPRESSION 0x0667
#define IL_COMPRESSION_HINT 0x0668
// Subimage types
#define IL_SUB_NEXT 0x0680
#define IL_SUB_MIPMAP 0x0681
#define IL_SUB_LAYER 0x0682
// Compression definitions
#define IL_COMPRESS_MODE 0x0700
#define IL_COMPRESS_NONE 0x0701
#define IL_COMPRESS_RLE 0x0702
#define IL_COMPRESS_LZO 0x0703
#define IL_COMPRESS_ZLIB 0x0704
// File format-specific values
#define IL_TGA_CREATE_STAMP 0x0710
#define IL_JPG_QUALITY 0x0711
#define IL_PNG_INTERLACE 0x0712
#define IL_TGA_RLE 0x0713
#define IL_BMP_RLE 0x0714
#define IL_SGI_RLE 0x0715
#define IL_TGA_ID_STRING 0x0717
#define IL_TGA_AUTHNAME_STRING 0x0718
#define IL_TGA_AUTHCOMMENT_STRING 0x0719
#define IL_PNG_AUTHNAME_STRING 0x071A
#define IL_PNG_TITLE_STRING 0x071B
#define IL_PNG_DESCRIPTION_STRING 0x071C
#define IL_TIF_DESCRIPTION_STRING 0x071D
#define IL_TIF_HOSTCOMPUTER_STRING 0x071E
#define IL_TIF_DOCUMENTNAME_STRING 0x071F
#define IL_TIF_AUTHNAME_STRING 0x0720
#define IL_JPG_SAVE_FORMAT 0x0721
#define IL_CHEAD_HEADER_STRING 0x0722
#define IL_PCD_PICNUM 0x0723
#define IL_PNG_ALPHA_INDEX 0x0724 //XIX : ILint : the color in the pallete at this index value (0-255) is considered transparent, -1 for no trasparent color
// DXTC definitions
#define IL_DXTC_FORMAT 0x0705
#define IL_DXT1 0x0706
#define IL_DXT2 0x0707
#define IL_DXT3 0x0708
#define IL_DXT4 0x0709
#define IL_DXT5 0x070A
#define IL_DXT_NO_COMP 0x070B
#define IL_KEEP_DXTC_DATA 0x070C
#define IL_DXTC_DATA_FORMAT 0x070D
#define IL_3DC 0x070E
#define IL_RXGB 0x070F
#define IL_ATI1N 0x0710
// Cube map definitions
#define IL_CUBEMAP_POSITIVEX 0x00000400
#define IL_CUBEMAP_NEGATIVEX 0x00000800
#define IL_CUBEMAP_POSITIVEY 0x00001000
#define IL_CUBEMAP_NEGATIVEY 0x00002000
#define IL_CUBEMAP_POSITIVEZ 0x00004000
#define IL_CUBEMAP_NEGATIVEZ 0x00008000
// Values
#define IL_VERSION_NUM 0x0DE2
#define IL_IMAGE_WIDTH 0x0DE4
#define IL_IMAGE_HEIGHT 0x0DE5
#define IL_IMAGE_DEPTH 0x0DE6
#define IL_IMAGE_SIZE_OF_DATA 0x0DE7
#define IL_IMAGE_BPP 0x0DE8
#define IL_IMAGE_BYTES_PER_PIXEL 0x0DE8
#define IL_IMAGE_BPP 0x0DE8
#define IL_IMAGE_BITS_PER_PIXEL 0x0DE9
#define IL_IMAGE_FORMAT 0x0DEA
#define IL_IMAGE_TYPE 0x0DEB
#define IL_PALETTE_TYPE 0x0DEC
#define IL_PALETTE_SIZE 0x0DED
#define IL_PALETTE_BPP 0x0DEE
#define IL_PALETTE_NUM_COLS 0x0DEF
#define IL_PALETTE_BASE_TYPE 0x0DF0
#define IL_NUM_IMAGES 0x0DF1
#define IL_NUM_MIPMAPS 0x0DF2
#define IL_NUM_LAYERS 0x0DF3
#define IL_ACTIVE_IMAGE 0x0DF4
#define IL_ACTIVE_MIPMAP 0x0DF5
#define IL_ACTIVE_LAYER 0x0DF6
#define IL_CUR_IMAGE 0x0DF7
#define IL_IMAGE_DURATION 0x0DF8
#define IL_IMAGE_PLANESIZE 0x0DF9
#define IL_IMAGE_BPC 0x0DFA
#define IL_IMAGE_OFFX 0x0DFB
#define IL_IMAGE_OFFY 0x0DFC
#define IL_IMAGE_CUBEFLAGS 0x0DFD
#define IL_IMAGE_ORIGIN 0x0DFE
#define IL_IMAGE_CHANNELS 0x0DFF
# if defined __GNUC__ && (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ > 0))
// __attribute__((deprecated)) is supported by GCC 3.1 and later.
# define DEPRECATED(D) D __attribute__((deprecated))
# elif defined _MSC_VER && _MSC_VER >= 1300
// __declspec(deprecated) is supported by MSVC 7.0 and later.
# define DEPRECATED(D) __declspec(deprecated) D
# else
# define DEPRECATED (D) D
# endif
//
// Section shamelessly modified from the glut header.
//
// This is from Win32's <windef.h>
#if (_MSC_VER >= 800) || defined(_STDCALL_SUPPORTED) || defined(__BORLANDC__) || defined(__LCC__)
#define ILAPIENTRY __stdcall
#define IL_PACKSTRUCT
//#elif defined(linux) || defined(MACOSX) || defined(__CYGWIN__) //fix bug 840364
#elif defined( __GNUC__ )
// this should work for any of the above commented platforms
// plus any platform using GCC
#ifdef __MINGW32__
#define ILAPIENTRY __stdcall
#else
#define ILAPIENTRY
#endif
#define IL_PACKSTRUCT __attribute__ ((packed))
#else
#define ILAPIENTRY
#define IL_PACKSTRUCT
#endif
// This is from Win32's <wingdi.h> and <winnt.h>
#if defined(__LCC__)
#define ILAPI __stdcall
#elif defined(_WIN32) //changed 20031221 to fix bug 840421
#ifdef IL_STATIC_LIB
#define ILAPI
#else
#ifdef _IL_BUILD_LIBRARY
#define ILAPI __declspec(dllexport)
#else
#define ILAPI __declspec(dllimport)
#endif
#endif
#elif __APPLE__
#define ILAPI extern
#else
#define ILAPI
#endif
#define IL_SEEK_SET 0
#define IL_SEEK_CUR 1
#define IL_SEEK_END 2
#define IL_EOF -1
// Callback functions for file reading
typedef void* ILHANDLE;
typedef ILvoid (ILAPIENTRY *fCloseRProc)(ILHANDLE);
typedef ILboolean (ILAPIENTRY *fEofProc) (ILHANDLE);
typedef ILint (ILAPIENTRY *fGetcProc) (ILHANDLE);
typedef ILHANDLE (ILAPIENTRY *fOpenRProc) (ILconst_string);
typedef ILint (ILAPIENTRY *fReadProc) (void*, ILuint, ILuint, ILHANDLE);
typedef ILint (ILAPIENTRY *fSeekRProc) (ILHANDLE, ILint, ILint);
typedef ILint (ILAPIENTRY *fTellRProc) (ILHANDLE);
// Callback functions for file writing
typedef ILvoid (ILAPIENTRY *fCloseWProc)(ILHANDLE);
typedef ILHANDLE (ILAPIENTRY *fOpenWProc) (ILconst_string);
typedef ILint (ILAPIENTRY *fPutcProc) (ILubyte, ILHANDLE);
typedef ILint (ILAPIENTRY *fSeekWProc) (ILHANDLE, ILint, ILint);
typedef ILint (ILAPIENTRY *fTellWProc) (ILHANDLE);
typedef ILint (ILAPIENTRY *fWriteProc) (const void*, ILuint, ILuint, ILHANDLE);
// Callback functions for allocation and deallocation
typedef ILvoid* (ILAPIENTRY *mAlloc)(const ILuint);
typedef ILvoid (ILAPIENTRY *mFree) (const ILvoid* CONST_RESTRICT);
// Registered format procedures
typedef ILenum (ILAPIENTRY *IL_LOADPROC)(ILconst_string);
typedef ILenum (ILAPIENTRY *IL_SAVEPROC)(ILconst_string);
// ImageLib Functions
ILAPI ILboolean ILAPIENTRY ilActiveImage(ILuint Number);
ILAPI ILboolean ILAPIENTRY ilActiveLayer(ILuint Number);
ILAPI ILboolean ILAPIENTRY ilActiveMipmap(ILuint Number);
ILAPI ILboolean ILAPIENTRY ilApplyPal(ILconst_string FileName);
ILAPI ILboolean ILAPIENTRY ilApplyProfile(ILstring InProfile, ILstring OutProfile);
ILAPI ILvoid ILAPIENTRY ilBindImage(ILuint Image);
ILAPI ILboolean ILAPIENTRY ilBlit(ILuint Source, ILint DestX, ILint DestY, ILint DestZ, ILuint SrcX, ILuint SrcY, ILuint SrcZ, ILuint Width, ILuint Height, ILuint Depth);
ILAPI ILboolean ILAPIENTRY ilBlitAlpha(ILuint Source, ILint DestX, ILint DestY, ILint DestZ, ILuint SrcX, ILuint SrcY, ILuint SrcZ, ILuint Width, ILuint Height, ILuint Depth, ILboolean BlendAlpha);
ILAPI ILvoid ILAPIENTRY ilClearColour(ILclampf Red, ILclampf Green, ILclampf Blue, ILclampf Alpha);
ILAPI ILboolean ILAPIENTRY ilClearImage(ILvoid);
ILAPI ILuint ILAPIENTRY ilCloneCurImage(ILvoid);
ILAPI ILboolean ILAPIENTRY ilCompressFunc(ILenum Mode);
ILAPI ILboolean ILAPIENTRY ilConvertImage(ILenum DestFormat, ILenum DestType);
ILAPI ILboolean ILAPIENTRY ilConvertPal(ILenum DestFormat);
ILAPI ILboolean ILAPIENTRY ilCopyImage(ILuint Src);
ILAPI ILuint ILAPIENTRY ilCopyPixels(ILuint XOff, ILuint YOff, ILuint ZOff, ILuint Width, ILuint Height, ILuint Depth, ILenum Format, ILenum Type, ILvoid *Data);
ILAPI ILuint ILAPIENTRY ilCreateSubImage(ILenum Type, ILuint Num);
ILAPI ILboolean ILAPIENTRY ilDefaultImage(ILvoid);
ILAPI ILvoid ILAPIENTRY ilDeleteImage(const ILuint Num);
ILAPI ILvoid ILAPIENTRY ilDeleteImages(ILsizei Num, const ILuint *Images);
ILAPI ILboolean ILAPIENTRY ilDisable(ILenum Mode);
ILAPI ILboolean ILAPIENTRY ilEnable(ILenum Mode);
ILAPI ILboolean ILAPIENTRY ilFormatFunc(ILenum Mode);
ILAPI ILvoid ILAPIENTRY ilGenImages(ILsizei Num, ILuint *Images);
ILAPI ILint ILAPIENTRY ilGenImage();
ILAPI ILubyte* ILAPIENTRY ilGetAlpha(ILenum Type);
ILAPI ILboolean ILAPIENTRY ilGetBoolean(ILenum Mode);
ILAPI ILvoid ILAPIENTRY ilGetBooleanv(ILenum Mode, ILboolean *Param);
ILAPI ILubyte* ILAPIENTRY ilGetData(ILvoid);
ILAPI ILuint ILAPIENTRY ilGetDXTCData(ILvoid *Buffer, ILuint BufferSize, ILenum DXTCFormat);
ILAPI ILenum ILAPIENTRY ilGetError(ILvoid);
ILAPI ILint ILAPIENTRY ilGetInteger(ILenum Mode);
ILAPI ILvoid ILAPIENTRY ilGetIntegerv(ILenum Mode, ILint *Param);
ILAPI ILuint ILAPIENTRY ilGetLumpPos(ILvoid);
ILAPI ILubyte* ILAPIENTRY ilGetPalette(ILvoid);
ILAPI ILstring ILAPIENTRY ilGetString(ILenum StringName);
ILAPI ILvoid ILAPIENTRY ilHint(ILenum Target, ILenum Mode);
ILAPI ILvoid ILAPIENTRY ilInit(ILvoid);
ILAPI ILboolean ILAPIENTRY ilIsDisabled(ILenum Mode);
ILAPI ILboolean ILAPIENTRY ilIsEnabled(ILenum Mode);
ILAPI ILenum ILAPIENTRY ilDetermineTypeF(ILHANDLE File);
ILAPI ILboolean ILAPIENTRY ilIsImage(ILuint Image);
ILAPI ILboolean ILAPIENTRY ilIsValid(ILenum Type, ILstring FileName);
ILAPI ILboolean ILAPIENTRY ilIsValidF(ILenum Type, ILHANDLE File);
ILAPI ILboolean ILAPIENTRY ilIsValidL(ILenum Type, ILvoid *Lump, ILuint Size);
ILAPI ILvoid ILAPIENTRY ilKeyColour(ILclampf Red, ILclampf Green, ILclampf Blue, ILclampf Alpha);
ILAPI ILboolean ILAPIENTRY ilLoad(ILenum Type, ILconst_string FileName);
ILAPI ILboolean ILAPIENTRY ilLoadF(ILenum Type, ILHANDLE File);
ILAPI ILboolean ILAPIENTRY ilLoadImage(ILconst_string FileName);
ILAPI ILboolean ILAPIENTRY ilLoadL(ILenum Type, const ILvoid *Lump, ILuint Size);
ILAPI ILboolean ILAPIENTRY ilLoadPal(ILconst_string FileName);
ILAPI ILvoid ILAPIENTRY ilModAlpha( ILdouble AlphaValue );
ILAPI ILboolean ILAPIENTRY ilOriginFunc(ILenum Mode);
ILAPI ILboolean ILAPIENTRY ilOverlayImage(ILuint Source, ILint XCoord, ILint YCoord, ILint ZCoord);
ILAPI ILvoid ILAPIENTRY ilPopAttrib(ILvoid);
ILAPI ILvoid ILAPIENTRY ilPushAttrib(ILuint Bits);
ILAPI ILvoid ILAPIENTRY ilRegisterFormat(ILenum Format);
ILAPI ILboolean ILAPIENTRY ilRegisterLoad(ILconst_string Ext, IL_LOADPROC Load);
ILAPI ILboolean ILAPIENTRY ilRegisterMipNum(ILuint Num);
ILAPI ILboolean ILAPIENTRY ilRegisterNumImages(ILuint Num);
ILAPI ILvoid ILAPIENTRY ilRegisterOrigin(ILenum Origin);
ILAPI ILvoid ILAPIENTRY ilRegisterPal(ILvoid *Pal, ILuint Size, ILenum Type);
ILAPI ILboolean ILAPIENTRY ilRegisterSave(ILconst_string Ext, IL_SAVEPROC Save);
ILAPI ILvoid ILAPIENTRY ilRegisterType(ILenum Type);
ILAPI ILboolean ILAPIENTRY ilRemoveLoad(ILconst_string Ext);
ILAPI ILboolean ILAPIENTRY ilRemoveSave(ILconst_string Ext);
DEPRECATED(ILAPI ILvoid ILAPIENTRY ilResetMemory(ILvoid));
ILAPI ILvoid ILAPIENTRY ilResetRead(ILvoid);
ILAPI ILvoid ILAPIENTRY ilResetWrite(ILvoid);
ILAPI ILboolean ILAPIENTRY ilSave(ILenum Type, ILstring FileName);
ILAPI ILuint ILAPIENTRY ilSaveF(ILenum Type, ILHANDLE File);
ILAPI ILboolean ILAPIENTRY ilSaveImage(ILconst_string FileName);
ILAPI ILuint ILAPIENTRY ilSaveL(ILenum Type, ILvoid *Lump, ILuint Size);
ILAPI ILboolean ILAPIENTRY ilSavePal(ILconst_string FileName);
ILAPI ILboolean ILAPIENTRY ilSetAlpha( ILdouble AlphaValue );
ILAPI ILboolean ILAPIENTRY ilSetData(ILvoid *Data);
ILAPI ILboolean ILAPIENTRY ilSetDuration(ILuint Duration);
ILAPI ILvoid ILAPIENTRY ilSetInteger(ILenum Mode, ILint Param);
ILAPI ILvoid ILAPIENTRY ilSetMemory(mAlloc, mFree);
ILAPI ILvoid ILAPIENTRY ilSetPixels(ILint XOff, ILint YOff, ILint ZOff, ILuint Width, ILuint Height, ILuint Depth, ILenum Format, ILenum Type, ILvoid *Data);
ILAPI ILvoid ILAPIENTRY ilSetRead(fOpenRProc, fCloseRProc, fEofProc, fGetcProc, fReadProc, fSeekRProc, fTellRProc);
ILAPI ILvoid ILAPIENTRY ilSetString(ILenum Mode, const char *String);
ILAPI ILvoid ILAPIENTRY ilSetWrite(fOpenWProc, fCloseWProc, fPutcProc, fSeekWProc, fTellWProc, fWriteProc);
ILAPI ILvoid ILAPIENTRY ilShutDown(ILvoid);
ILAPI ILboolean ILAPIENTRY ilTexImage(ILuint Width, ILuint Height, ILuint Depth, ILubyte numChannels, ILenum Format, ILenum Type, ILvoid *Data);
ILAPI ILenum ILAPIENTRY ilTypeFromExt(ILconst_string FileName);
ILAPI ILboolean ILAPIENTRY ilTypeFunc(ILenum Mode);
ILAPI ILboolean ILAPIENTRY ilLoadData(ILconst_string FileName, ILuint Width, ILuint Height, ILuint Depth, ILubyte Bpp);
ILAPI ILboolean ILAPIENTRY ilLoadDataF(ILHANDLE File, ILuint Width, ILuint Height, ILuint Depth, ILubyte Bpp);
ILAPI ILboolean ILAPIENTRY ilLoadDataL(ILvoid *Lump, ILuint Size, ILuint Width, ILuint Height, ILuint Depth, ILubyte Bpp);
ILAPI ILboolean ILAPIENTRY ilSaveData(ILconst_string FileName);
ILAPI ILboolean ILAPIENTRY ilLoadFromJpegStruct(ILvoid* JpegDecompressorPtr);
ILAPI ILboolean ILAPIENTRY ilSaveFromJpegStruct(ILvoid* JpegCompressorPtr);
// For all those weirdos that spell "colour" without the 'u'.
#define ilClearColor ilClearColour
#define ilKeyColor ilKeyColour
#ifdef __cplusplus
}
#endif
#endif // __IL_H__
#endif // __il_h__
#define imemclear(x,y) memset(x,0,y);

View File

@@ -0,0 +1,205 @@
#ifndef WRAPPER_H
#define WRAPPER_H
/*#include <il/il.h>
#include <il/ilu.h>*/
#include <IL/ilut.h> // Probably only have to #include this one
#ifdef _MSC_VER
#ifndef _IL_WRAP_BUILD_LIB
#pragma comment(lib, "il_wrap.lib")
#endif
#endif
class ilImage
{
public:
ilImage();
ilImage(char *);
ilImage(const ilImage &);
virtual ~ilImage();
ILboolean Load(char *);
ILboolean Load(char *, ILenum);
ILboolean Save(char *);
ILboolean Save(char *, ILenum);
// ImageLib functions
ILboolean ActiveImage(ILuint);
ILboolean ActiveLayer(ILuint);
ILboolean ActiveMipmap(ILuint);
ILboolean Clear(ILvoid);
ILvoid ClearColour(ILclampf, ILclampf, ILclampf, ILclampf);
ILboolean Convert(ILenum);
ILboolean Copy(ILuint);
ILboolean Default(ILvoid);
ILboolean Flip(ILvoid);
ILboolean SwapColours(ILvoid);
ILboolean Resize(ILuint, ILuint, ILuint);
ILboolean TexImage(ILuint, ILuint, ILuint, ILubyte, ILenum, ILenum, ILvoid*);
// Image handling
ILvoid Bind(ILvoid) const;
ILvoid Bind(ILuint);
ILvoid Close(ILvoid) { this->Delete(); }
ILvoid Delete(ILvoid);
ILvoid iGenBind();
ILenum PaletteAlphaIndex();
// Image characteristics
ILuint Width(ILvoid);
ILuint Height(ILvoid);
ILuint Depth(ILvoid);
ILubyte Bpp(ILvoid);
ILubyte Bitpp(ILvoid);
ILenum PaletteType(ILvoid);
ILenum Format(ILvoid);
ILenum Type(ILvoid);
ILuint NumImages(ILvoid);
ILuint NumMipmaps(ILvoid);
ILuint GetId(ILvoid) const;
ILenum GetOrigin(ILvoid);
ILubyte *GetData(ILvoid);
ILubyte *GetPalette(ILvoid);
// Rendering
ILuint BindImage(ILvoid);
ILuint BindImage(ILenum);
// Operators
ilImage& operator = (ILuint);
ilImage& operator = (const ilImage &);
protected:
ILuint Id;
private:
ILvoid iStartUp();
};
class ilFilters
{
public:
static ILboolean Alienify(ilImage &);
static ILboolean BlurAvg(ilImage &, ILuint Iter);
static ILboolean BlurGaussian(ilImage &, ILuint Iter);
static ILboolean Contrast(ilImage &, ILfloat Contrast);
static ILboolean EdgeDetectE(ilImage &);
static ILboolean EdgeDetectP(ilImage &);
static ILboolean EdgeDetectS(ilImage &);
static ILboolean Emboss(ilImage &);
static ILboolean Gamma(ilImage &, ILfloat Gamma);
static ILboolean Negative(ilImage &);
static ILboolean Noisify(ilImage &, ILubyte Factor);
static ILboolean Pixelize(ilImage &, ILuint PixSize);
static ILboolean Saturate(ilImage &, ILfloat Saturation);
static ILboolean Saturate(ilImage &, ILfloat r, ILfloat g, ILfloat b, ILfloat Saturation);
static ILboolean ScaleColours(ilImage &, ILfloat r, ILfloat g, ILfloat b);
static ILboolean Sharpen(ilImage &, ILfloat Factor, ILuint Iter);
};
#ifdef ILUT_USE_OPENGL
class ilOgl
{
public:
static ILvoid Init(ILvoid);
static GLuint BindTex(ilImage &);
static ILboolean Upload(ilImage &, ILuint);
static GLuint Mipmap(ilImage &);
static ILboolean Screen(ILvoid);
static ILboolean Screenie(ILvoid);
};
#endif//ILUT_USE_OPENGL
#ifdef ILUT_USE_ALLEGRO
class ilAlleg
{
public:
static ILvoid Init(ILvoid);
static BITMAP *Convert(ilImage &);
};
#endif//ILUT_USE_ALLEGRO
#ifdef ILUT_USE_WIN32
class ilWin32
{
public:
static ILvoid Init(ILvoid);
static HBITMAP Convert(ilImage &);
static ILboolean GetClipboard(ilImage &);
static ILvoid GetInfo(ilImage &, BITMAPINFO *Info);
static ILubyte *GetPadData(ilImage &);
static HPALETTE GetPal(ilImage &);
static ILboolean GetResource(ilImage &, HINSTANCE hInst, ILint ID, char *ResourceType);
static ILboolean GetResource(ilImage &, HINSTANCE hInst, ILint ID, char *ResourceType, ILenum Type);
static ILboolean SetClipboard(ilImage &);
};
#endif//ILUT_USE_WIN32
class ilValidate
{
public:
static ILboolean Valid(ILenum, char *);
static ILboolean Valid(ILenum, FILE *);
static ILboolean Valid(ILenum, ILvoid *, ILuint);
protected:
private:
};
class ilState
{
public:
static ILboolean Disable(ILenum);
static ILboolean Enable(ILenum);
static ILvoid Get(ILenum, ILboolean &);
static ILvoid Get(ILenum, ILint &);
static ILboolean GetBool(ILenum);
static ILint GetInt(ILenum);
static const char *GetString(ILenum);
static ILboolean IsDisabled(ILenum);
static ILboolean IsEnabled(ILenum);
static ILboolean Origin(ILenum);
static ILvoid Pop(ILvoid);
static ILvoid Push(ILuint);
protected:
private:
};
class ilError
{
public:
static ILvoid Check(ILvoid (*Callback)(const char*));
static ILvoid Check(ILvoid (*Callback)(ILenum));
static ILenum Get(ILvoid);
static const char *String(ILvoid);
static const char *String(ILenum);
protected:
private:
};
#endif//WRAPPER_H

View File

@@ -0,0 +1,180 @@
//-----------------------------------------------------------------------------
//
// ImageLib Utility Sources
// Copyright (C) 2000-2002 by Denton Woods
// Last modified: 06/23/2002 <--Y2K Compliant! =]
//
// Filename: IL/ilu.h
//
// Description: The main include file for ILU
//
//-----------------------------------------------------------------------------
#ifndef __ilu_h_
#ifndef __ILU_H__
#define __ilu_h_
#define __ILU_H__
#include <IL/il.h>
#ifdef __cplusplus
extern "C" {
#endif
#ifdef _WIN32
#if (defined(IL_USE_PRAGMA_LIBS)) && (!defined(_IL_BUILD_LIBRARY))
#if defined(_MSC_VER) || defined(__BORLANDC__)
#pragma comment(lib, "DevILU.lib")
#endif
#endif
#endif
#define ILU_VERSION_1_6_8 1
#define ILU_VERSION 168
#define ILU_FILTER 0x2600
#define ILU_NEAREST 0x2601
#define ILU_LINEAR 0x2602
#define ILU_BILINEAR 0x2603
#define ILU_SCALE_BOX 0x2604
#define ILU_SCALE_TRIANGLE 0x2605
#define ILU_SCALE_BELL 0x2606
#define ILU_SCALE_BSPLINE 0x2607
#define ILU_SCALE_LANCZOS3 0x2608
#define ILU_SCALE_MITCHELL 0x2609
// Error types
#define ILU_INVALID_ENUM 0x0501
#define ILU_OUT_OF_MEMORY 0x0502
#define ILU_INTERNAL_ERROR 0x0504
#define ILU_INVALID_VALUE 0x0505
#define ILU_ILLEGAL_OPERATION 0x0506
#define ILU_INVALID_PARAM 0x0509
// Values
#define ILU_PLACEMENT 0x0700
#define ILU_LOWER_LEFT 0x0701
#define ILU_LOWER_RIGHT 0x0702
#define ILU_UPPER_LEFT 0x0703
#define ILU_UPPER_RIGHT 0x0704
#define ILU_CENTER 0x0705
#define ILU_CONVOLUTION_MATRIX 0x0710
#define ILU_VERSION_NUM IL_VERSION_NUM
#define ILU_VENDOR IL_VENDOR
// Filters
/*
#define ILU_FILTER_BLUR 0x0803
#define ILU_FILTER_GAUSSIAN_3x3 0x0804
#define ILU_FILTER_GAUSSIAN_5X5 0x0805
#define ILU_FILTER_EMBOSS1 0x0807
#define ILU_FILTER_EMBOSS2 0x0808
#define ILU_FILTER_LAPLACIAN1 0x080A
#define ILU_FILTER_LAPLACIAN2 0x080B
#define ILU_FILTER_LAPLACIAN3 0x080C
#define ILU_FILTER_LAPLACIAN4 0x080D
#define ILU_FILTER_SHARPEN1 0x080E
#define ILU_FILTER_SHARPEN2 0x080F
#define ILU_FILTER_SHARPEN3 0x0810
*/
typedef struct ILinfo
{
ILuint Id; // the image's id
ILubyte *Data; // the image's data
ILuint Width; // the image's width
ILuint Height; // the image's height
ILuint Depth; // the image's depth
ILubyte Bpp; // bytes per pixel (not bits) of the image
ILuint SizeOfData; // the total size of the data (in bytes)
ILenum Format; // image format (in IL enum style)
ILenum Type; // image type (in IL enum style)
ILenum Origin; // origin of the image
ILubyte *Palette; // the image's palette
ILenum PalType; // palette type
ILuint PalSize; // palette size
ILenum CubeFlags; // flags for what cube map sides are present
ILuint NumNext; // number of images following
ILuint NumMips; // number of mipmaps
ILuint NumLayers; // number of layers
} ILinfo;
typedef struct ILpointf {
ILfloat x;
ILfloat y;
} ILpointf;
typedef struct ILpointi {
ILint x;
ILint y;
} ILpointi;
ILAPI ILboolean ILAPIENTRY iluAlienify(ILvoid);
ILAPI ILboolean ILAPIENTRY iluBlurAvg(ILuint Iter);
ILAPI ILboolean ILAPIENTRY iluBlurGaussian(ILuint Iter);
ILAPI ILboolean ILAPIENTRY iluBuildMipmaps(ILvoid);
ILAPI ILuint ILAPIENTRY iluColoursUsed(ILvoid);
ILAPI ILboolean ILAPIENTRY iluCompareImage(ILuint Comp);
ILAPI ILboolean ILAPIENTRY iluContrast(ILfloat Contrast);
ILAPI ILboolean ILAPIENTRY iluCrop(ILuint XOff, ILuint YOff, ILuint ZOff, ILuint Width, ILuint Height, ILuint Depth);
DEPRECATED(ILAPI ILvoid ILAPIENTRY iluDeleteImage(ILuint Id));
ILAPI ILboolean ILAPIENTRY iluEdgeDetectE(ILvoid);
ILAPI ILboolean ILAPIENTRY iluEdgeDetectP(ILvoid);
ILAPI ILboolean ILAPIENTRY iluEdgeDetectS(ILvoid);
ILAPI ILboolean ILAPIENTRY iluEmboss(ILvoid);
ILAPI ILboolean ILAPIENTRY iluEnlargeCanvas(ILuint Width, ILuint Height, ILuint Depth);
ILAPI ILboolean ILAPIENTRY iluEnlargeImage(ILfloat XDim, ILfloat YDim, ILfloat ZDim);
ILAPI ILboolean ILAPIENTRY iluEqualize(ILvoid);
ILAPI ILstring ILAPIENTRY iluErrorString(ILenum Error);
ILAPI ILboolean ILAPIENTRY iluConvolution(ILint *matrix, ILint scale, ILint bias);
ILAPI ILboolean ILAPIENTRY iluFlipImage(ILvoid);
ILAPI ILboolean ILAPIENTRY iluGammaCorrect(ILfloat Gamma);
DEPRECATED(ILAPI ILuint ILAPIENTRY iluGenImage(ILvoid));
ILAPI ILvoid ILAPIENTRY iluGetImageInfo(ILinfo *Info);
ILAPI ILint ILAPIENTRY iluGetInteger(ILenum Mode);
ILAPI ILvoid ILAPIENTRY iluGetIntegerv(ILenum Mode, ILint *Param);
ILAPI ILstring ILAPIENTRY iluGetString(ILenum StringName);
ILAPI ILvoid ILAPIENTRY iluImageParameter(ILenum PName, ILenum Param);
ILAPI ILvoid ILAPIENTRY iluInit(ILvoid);
ILAPI ILboolean ILAPIENTRY iluInvertAlpha(ILvoid);
ILAPI ILuint ILAPIENTRY iluLoadImage(ILconst_string FileName);
ILAPI ILboolean ILAPIENTRY iluMirror(ILvoid);
ILAPI ILboolean ILAPIENTRY iluNegative(ILvoid);
ILAPI ILboolean ILAPIENTRY iluNoisify(ILclampf Tolerance);
ILAPI ILboolean ILAPIENTRY iluPixelize(ILuint PixSize);
ILAPI ILvoid ILAPIENTRY iluRegionfv(ILpointf *Points, ILuint n);
ILAPI ILvoid ILAPIENTRY iluRegioniv(ILpointi *Points, ILuint n);
ILAPI ILboolean ILAPIENTRY iluReplaceColour(ILubyte Red, ILubyte Green, ILubyte Blue, ILfloat Tolerance);
ILAPI ILboolean ILAPIENTRY iluRotate(ILfloat Angle);
ILAPI ILboolean ILAPIENTRY iluRotate3D(ILfloat x, ILfloat y, ILfloat z, ILfloat Angle);
ILAPI ILboolean ILAPIENTRY iluSaturate1f(ILfloat Saturation);
ILAPI ILboolean ILAPIENTRY iluSaturate4f(ILfloat r, ILfloat g, ILfloat b, ILfloat Saturation);
ILAPI ILboolean ILAPIENTRY iluScale(ILuint Width, ILuint Height, ILuint Depth);
ILAPI ILboolean ILAPIENTRY iluScaleAlpha(ILfloat scale);
ILAPI ILboolean ILAPIENTRY iluScaleColours(ILfloat r, ILfloat g, ILfloat b);
ILAPI ILboolean ILAPIENTRY iluSharpen(ILfloat Factor, ILuint Iter);
ILAPI ILboolean ILAPIENTRY iluSwapColours(ILvoid);
ILAPI ILboolean ILAPIENTRY iluWave(ILfloat Angle);
#define iluColorsUsed iluColoursUsed
#define iluSwapColors iluSwapColours
#define iluReplaceColor iluReplaceColour
#define iluScaleColor iluScaleColour
#ifdef __cplusplus
}
#endif
#endif // __ILU_H__
#endif // __ilu_h_

View File

@@ -0,0 +1,25 @@
//-----------------------------------------------------------------------------
//
// ImageLib Utility Sources
// Copyright (C) 2000-2002 by Denton Woods
// Last modified: 07/09/2002 <--Y2K Compliant! =]
//
// Filename: src-ILU/src/ilu_region.h
//
// Description: Creates an image region.
//
//-----------------------------------------------------------------------------
#ifndef ILU_REGION_H
#define ILU_REGION_H
typedef struct Edge
{
ILint yUpper;
ILfloat xIntersect, dxPerScan;
struct Edge *next;
} Edge;
#endif//ILU_REGION_H

View File

@@ -0,0 +1,322 @@
//-----------------------------------------------------------------------------
//
// ImageLib Utility Toolkit Sources
// Copyright (C) 2000-2002 by Denton Woods
// Last modified: 06/23/2002 <--Y2K Compliant! =]
//
// Filename: IL/ilut.h
//
// Description: The main include file for ILUT
//
//-----------------------------------------------------------------------------
#ifndef __ilut_h_
#ifndef __ILUT_H__
#define __ilut_h_
#define __ILUT_H__
#include "IL/il.h"
#include "IL/ilu.h"
//-----------------------------------------------------------------------------
// Defines
//-----------------------------------------------------------------------------
#define ILUT_VERSION_1_6_8 1
#define ILUT_VERSION 168
// Attribute Bits
#define ILUT_OPENGL_BIT 0x00000001
#define ILUT_D3D_BIT 0x00000002
#define ILUT_ALL_ATTRIB_BITS 0x000FFFFF
// Error Types
#define ILUT_INVALID_ENUM 0x0501
#define ILUT_OUT_OF_MEMORY 0x0502
#define ILUT_INVALID_VALUE 0x0505
#define ILUT_ILLEGAL_OPERATION 0x0506
#define ILUT_INVALID_PARAM 0x0509
#define ILUT_COULD_NOT_OPEN_FILE 0x050A
#define ILUT_STACK_OVERFLOW 0x050E
#define ILUT_STACK_UNDERFLOW 0x050F
#define ILUT_BAD_DIMENSIONS 0x0511
#define ILUT_NOT_SUPPORTED 0x0550
// State Definitions
#define ILUT_PALETTE_MODE 0x0600
#define ILUT_OPENGL_CONV 0x0610
#define ILUT_D3D_MIPLEVELS 0x0620
#define ILUT_MAXTEX_WIDTH 0x0630
#define ILUT_MAXTEX_HEIGHT 0x0631
#define ILUT_MAXTEX_DEPTH 0x0632
#define ILUT_GL_USE_S3TC 0x0634
#define ILUT_D3D_USE_DXTC 0x0634
#define ILUT_GL_GEN_S3TC 0x0635
#define ILUT_D3D_GEN_DXTC 0x0635
#define ILUT_S3TC_FORMAT 0x0705
#define ILUT_DXTC_FORMAT 0x0705
#define ILUT_D3D_POOL 0x0706
#define ILUT_D3D_ALPHA_KEY_COLOR 0x0707
#define ILUT_D3D_ALPHA_KEY_COLOUR 0x0707
#define ILUT_FORCE_INTEGER_FORMAT 0x0636
//This new state does automatic texture target detection
//if enabled. Currently, only cubemap detection is supported.
//if the current image is no cubemap, the 2d texture is chosen.
#define ILUT_GL_AUTODETECT_TEXTURE_TARGET 0x0807
// Values
#define ILUT_VERSION_NUM IL_VERSION_NUM
#define ILUT_VENDOR IL_VENDOR
// The different rendering api's...more to be added later?
#define ILUT_OPENGL 0
#define ILUT_ALLEGRO 1
#define ILUT_WIN32 2
#define ILUT_DIRECT3D8 3
#define ILUT_DIRECT3D9 4
/*
// Includes specific config
#ifdef DJGPP
#define ILUT_USE_ALLEGRO
#elif _WIN32_WCE
#define ILUT_USE_WIN32
#elif _WIN32
//#ifdef __GNUC__ //__CYGWIN32__ (Cygwin seems to not define this with DevIL builds)
#define ILUT_USE_WIN32
#include "IL/config.h"
// Temporary fix for the SDL main() linker bug.
//#ifdef ILUT_USE_SDL
//#undef ILUT_USE_SDL
//#endif//ILUT_USE_SDL
//#else
// #define ILUT_USE_WIN32
// #define ILUT_USE_OPENGL
// #define ILUT_USE_SDL
// #define ILUT_USE_DIRECTX8
//#endif
#elif BEOS // Don't know the #define
#define ILUT_USE_BEOS
#define ILUT_USE_OPENGL
#elif MACOSX
#define ILUT_USE_OPENGL
#else
// We are surely using a *nix so the configure script
// may have written the configured config.h header
#include "IL/config.h"
#endif
*/
#ifdef _WIN32
#if (defined(IL_USE_PRAGMA_LIBS)) && (!defined(_IL_BUILD_LIBRARY))
#if defined(_MSC_VER) || defined(__BORLANDC__)
#pragma comment(lib, "DevILUT.lib")
#endif
#endif
#endif
#include "IL/config.h"
//////////////
// Opengl
//////////////
#ifdef ILUT_USE_OPENGL
#if defined(_MSC_VER) || defined(_WIN32)
//#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#endif//_MSC_VER
#ifdef __APPLE__
#include <OpenGL/gl.h>
#include <OpenGL/glu.h>
#else
#include <GL/gl.h>
#include <GL/glu.h>
#endif//__APPLE__
#endif
#ifdef ILUT_USE_WIN32
//#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#endif
//
// If we can avoid including these in all cases thing tend to break less
// and we can keep all of them defined as available
//
// Kriss
//
// ImageLib Utility Toolkit's Allegro Functions
#ifdef ILUT_USE_ALLEGRO
// #include <allegro.h>
#endif//ILUT_USE_ALLEGRO
#ifdef ILUT_USE_SDL
// #include <SDL.h>
#endif
#ifdef ILUT_USE_DIRECTX8
// #include <d3d8.h>
#endif//ILUT_USE_DIRECTX9
#ifdef ILUT_USE_DIRECTX9
// #include <d3d9.h>
#endif//ILUT_USE_DIRECTX9
//-----------------------------------------------------------------------------
// Functions
//-----------------------------------------------------------------------------
#ifdef __cplusplus
extern "C" {
#endif
// ImageLib Utility Toolkit Functions
ILAPI ILboolean ILAPIENTRY ilutDisable(ILenum Mode);
ILAPI ILboolean ILAPIENTRY ilutEnable(ILenum Mode);
ILAPI ILboolean ILAPIENTRY ilutGetBoolean(ILenum Mode);
ILAPI ILvoid ILAPIENTRY ilutGetBooleanv(ILenum Mode, ILboolean *Param);
ILAPI ILint ILAPIENTRY ilutGetInteger(ILenum Mode);
ILAPI ILvoid ILAPIENTRY ilutGetIntegerv(ILenum Mode, ILint *Param);
ILAPI ILstring ILAPIENTRY ilutGetString(ILenum StringName);
ILAPI ILvoid ILAPIENTRY ilutInit(ILvoid);
ILAPI ILboolean ILAPIENTRY ilutIsDisabled(ILenum Mode);
ILAPI ILboolean ILAPIENTRY ilutIsEnabled(ILenum Mode);
ILAPI ILvoid ILAPIENTRY ilutPopAttrib(ILvoid);
ILAPI ILvoid ILAPIENTRY ilutPushAttrib(ILuint Bits);
ILAPI ILvoid ILAPIENTRY ilutSetInteger(ILenum Mode, ILint Param);
ILAPI ILboolean ILAPIENTRY ilutRenderer(ILenum Renderer);
// ImageLib Utility Toolkit's OpenGL Functions
#ifdef ILUT_USE_OPENGL
ILAPI GLuint ILAPIENTRY ilutGLBindTexImage();
ILAPI GLuint ILAPIENTRY ilutGLBindMipmaps(ILvoid);
ILAPI ILboolean ILAPIENTRY ilutGLBuildMipmaps(ILvoid);
ILAPI GLuint ILAPIENTRY ilutGLLoadImage(ILstring FileName);
ILAPI ILboolean ILAPIENTRY ilutGLScreen(ILvoid);
ILAPI ILboolean ILAPIENTRY ilutGLScreenie(ILvoid);
ILAPI ILboolean ILAPIENTRY ilutGLSaveImage(ILstring FileName, GLuint TexID);
ILAPI ILboolean ILAPIENTRY ilutGLSetTex(GLuint TexID);
ILAPI ILboolean ILAPIENTRY ilutGLTexImage(GLuint Level);
ILAPI ILboolean ILAPIENTRY ilutGLSubTex(GLuint TexID, ILuint XOff, ILuint YOff);
#endif//ILUT_USE_OPENGL
// ImageLib Utility Toolkit's Allegro Functions
#ifdef ILUT_USE_ALLEGRO
#ifdef __cplusplus
}
#endif
#include <allegro.h>
#ifdef __cplusplus
extern "C" {
#endif
ILAPI BITMAP* ILAPIENTRY ilutAllegLoadImage(ILstring FileName);
ILAPI BITMAP* ILAPIENTRY ilutConvertToAlleg(PALETTE Pal);
#endif//ILUT_USE_ALLEGRO
// ImageLib Utility Toolkit's SDL Functions
#ifdef ILUT_USE_SDL
ILAPI struct SDL_Surface* ILAPIENTRY ilutConvertToSDLSurface(unsigned int flags);
ILAPI struct SDL_Surface* ILAPIENTRY ilutSDLSurfaceLoadImage(ILstring FileName);
ILAPI ILboolean ILAPIENTRY ilutSDLSurfaceFromBitmap(struct SDL_Surface *Bitmap);
#endif//ILUT_USE_SDL
// ImageLib Utility Toolkit's BeOS Functions
#ifdef ILUT_USE_BEOS
ILAPI BBitmap ILAPIENTRY ilutConvertToBBitmap(ILvoid);
#endif//ILUT_USE_BEOS
// ImageLib Utility Toolkit's Win32 GDI Functions
#ifdef ILUT_USE_WIN32
ILAPI HBITMAP ILAPIENTRY ilutConvertToHBitmap(HDC hDC);
ILAPI HBITMAP ILAPIENTRY ilutConvertSliceToHBitmap(HDC hDC, ILuint slice);
ILAPI ILvoid ILAPIENTRY ilutFreePaddedData(ILubyte *Data);
ILAPI ILvoid ILAPIENTRY ilutGetBmpInfo(BITMAPINFO *Info);
ILAPI HPALETTE ILAPIENTRY ilutGetHPal(ILvoid);
ILAPI ILubyte* ILAPIENTRY ilutGetPaddedData(ILvoid);
ILAPI ILboolean ILAPIENTRY ilutGetWinClipboard(ILvoid);
ILAPI ILboolean ILAPIENTRY ilutLoadResource(HINSTANCE hInst, ILint ID, ILstring ResourceType, ILenum Type);
ILAPI ILboolean ILAPIENTRY ilutSetHBitmap(HBITMAP Bitmap);
ILAPI ILboolean ILAPIENTRY ilutSetHPal(HPALETTE Pal);
ILAPI ILboolean ILAPIENTRY ilutSetWinClipboard(ILvoid);
ILAPI HBITMAP ILAPIENTRY ilutWinLoadImage(ILstring FileName, HDC hDC);
ILAPI ILboolean ILAPIENTRY ilutWinLoadUrl(ILstring Url);
ILAPI ILboolean ILAPIENTRY ilutWinPrint(ILuint XPos, ILuint YPos, ILuint Width, ILuint Height, HDC hDC);
ILAPI ILboolean ILAPIENTRY ilutWinSaveImage(ILstring FileName, HBITMAP Bitmap);
#endif//ILUT_USE_WIN32
// ImageLib Utility Toolkit's DirectX 8 Functions
#ifdef ILUT_USE_DIRECTX8
// ILAPI ILvoid ILAPIENTRY ilutD3D8MipFunc(ILuint NumLevels);
ILAPI struct IDirect3DTexture8* ILAPIENTRY ilutD3D8Texture(struct IDirect3DDevice8 *Device);
ILAPI struct IDirect3DVolumeTexture8* ILAPIENTRY ilutD3D8VolumeTexture(struct IDirect3DDevice8 *Device);
ILAPI ILboolean ILAPIENTRY ilutD3D8TexFromFile(struct IDirect3DDevice8 *Device, char *FileName, struct IDirect3DTexture8 **Texture);
ILAPI ILboolean ILAPIENTRY ilutD3D8VolTexFromFile(struct IDirect3DDevice8 *Device, char *FileName, struct IDirect3DVolumeTexture8 **Texture);
ILAPI ILboolean ILAPIENTRY ilutD3D8TexFromFileInMemory(struct IDirect3DDevice8 *Device, ILvoid *Lump, ILuint Size, struct IDirect3DTexture8 **Texture);
ILAPI ILboolean ILAPIENTRY ilutD3D8VolTexFromFileInMemory(struct IDirect3DDevice8 *Device, ILvoid *Lump, ILuint Size, struct IDirect3DVolumeTexture8 **Texture);
ILAPI ILboolean ILAPIENTRY ilutD3D8TexFromFileHandle(struct IDirect3DDevice8 *Device, ILHANDLE File, struct IDirect3DTexture8 **Texture);
ILAPI ILboolean ILAPIENTRY ilutD3D8VolTexFromFileHandle(struct IDirect3DDevice8 *Device, ILHANDLE File, struct IDirect3DVolumeTexture8 **Texture);
// These two are not tested yet.
ILAPI ILboolean ILAPIENTRY ilutD3D8TexFromResource(struct IDirect3DDevice8 *Device, HMODULE SrcModule, char *SrcResource, struct IDirect3DTexture8 **Texture);
ILAPI ILboolean ILAPIENTRY ilutD3D8VolTexFromResource(struct IDirect3DDevice8 *Device, HMODULE SrcModule, char *SrcResource, struct IDirect3DVolumeTexture8 **Texture);
ILAPI ILboolean ILAPIENTRY ilutD3D8LoadSurface(struct IDirect3DDevice8 *Device, struct IDirect3DSurface8 *Surface);
#endif//ILUT_USE_DIRECTX8
#ifdef ILUT_USE_DIRECTX9
// ILAPI ILvoid ILAPIENTRY ilutD3D9MipFunc(ILuint NumLevels);
ILAPI struct IDirect3DTexture9* ILAPIENTRY ilutD3D9Texture (struct IDirect3DDevice9* Device);
ILAPI struct IDirect3DVolumeTexture9* ILAPIENTRY ilutD3D9VolumeTexture (struct IDirect3DDevice9* Device);
ILAPI struct IDirect3DCubeTexture9* ILAPIENTRY ilutD3D9CubeTexture (struct IDirect3DDevice9* Device);
ILAPI ILboolean ILAPIENTRY ilutD3D9CubeTexFromFile(struct IDirect3DDevice9 *Device, char *FileName, struct IDirect3DCubeTexture9 **Texture);
ILAPI ILboolean ILAPIENTRY ilutD3D9CubeTexFromFileInMemory(struct IDirect3DDevice9 *Device, ILvoid *Lump, ILuint Size, struct IDirect3DCubeTexture9 **Texture);
ILAPI ILboolean ILAPIENTRY ilutD3D9CubeTexFromFileHandle(struct IDirect3DDevice9 *Device, ILHANDLE File, struct IDirect3DCubeTexture9 **Texture);
ILAPI ILboolean ILAPIENTRY ilutD3D9CubeTexFromResource(struct IDirect3DDevice9 *Device, HMODULE SrcModule, char *SrcResource, struct IDirect3DCubeTexture9 **Texture);
ILAPI ILboolean ILAPIENTRY ilutD3D9TexFromFile(struct IDirect3DDevice9 *Device, char *FileName, struct IDirect3DTexture9 **Texture);
ILAPI ILboolean ILAPIENTRY ilutD3D9VolTexFromFile(struct IDirect3DDevice9 *Device, char *FileName, struct IDirect3DVolumeTexture9 **Texture);
ILAPI ILboolean ILAPIENTRY ilutD3D9TexFromFileInMemory(struct IDirect3DDevice9 *Device, ILvoid *Lump, ILuint Size, struct IDirect3DTexture9 **Texture);
ILAPI ILboolean ILAPIENTRY ilutD3D9VolTexFromFileInMemory(struct IDirect3DDevice9 *Device, ILvoid *Lump, ILuint Size, struct IDirect3DVolumeTexture9 **Texture);
ILAPI ILboolean ILAPIENTRY ilutD3D9TexFromFileHandle(struct IDirect3DDevice9 *Device, ILHANDLE File, struct IDirect3DTexture9 **Texture);
ILAPI ILboolean ILAPIENTRY ilutD3D9VolTexFromFileHandle(struct IDirect3DDevice9 *Device, ILHANDLE File, struct IDirect3DVolumeTexture9 **Texture);
// These two are not tested yet.
ILAPI ILboolean ILAPIENTRY ilutD3D9TexFromResource(struct IDirect3DDevice9 *Device, HMODULE SrcModule, char *SrcResource, struct IDirect3DTexture9 **Texture);
ILAPI ILboolean ILAPIENTRY ilutD3D9VolTexFromResource(struct IDirect3DDevice9 *Device, HMODULE SrcModule, char *SrcResource, struct IDirect3DVolumeTexture9 **Texture);
ILAPI ILboolean ILAPIENTRY ilutD3D9LoadSurface(struct IDirect3DDevice9 *Device, struct IDirect3DSurface9 *Surface);
#endif//ILUT_USE_DIRECTX9
#ifdef __cplusplus
}
#endif
#endif // __ILUT_H__
#endif // __ilut_h_

View File

@@ -0,0 +1,34 @@
/*
* altivec_typeconversion.h
* DevIL
*
* Created by Meloni Dario on 17/04/05.
*
*/
#include "il_internal.h"
#ifdef ALTIVEC_GCC
#ifndef ALTIVEC_COMMON
#define ALTIVEC_COMMON
typedef union {
vector unsigned int vuint;
unsigned int suint[4];
vector unsigned char vuchar;
unsigned char suchar[4];
vector float vf;
float sf[4];
} vector_t;
// Loads 16 byte from the specified address, aligned or not
//vector unsigned char load_unaligned( unsigned char *buffer );
// Fills a vector with the specified value
vector float fill_vector_f( float value );
#define eround(v,x) (((int)((v/x)*10)%10) > 0 ? (v/x) : (v/x)+1)
#define eround16(v) eround(v,16)
#endif
#endif

View File

@@ -0,0 +1,28 @@
/*
* altivec_typeconversion.h
* DevIL
*
* Created by Meloni Dario on 24/04/05.
*
*/
#include "altivec_common.h"
#ifdef ALTIVEC_GCC
// data and newdata may be the same buffer
// Used to convert RGB <-> BGR in various data types
void abc2cba_byte( ILubyte *data, ILuint length, ILubyte *newdata );
void abc2cba_short( ILushort *data, ILuint length, ILushort *newdata );
void abc2cba_int( ILuint *data, ILuint length, ILuint *newdata );
#define abc2cba_float(x,y,z) abc2cba_int(((ILuint*)(x)),y,((ILuint*)(z)))
void abc2cba_double( ILdouble *data, ILuint length, ILdouble *newdata );
// Used to convert RGBA <-> BGRA in various data types
void abcd2cbad_byte( ILubyte *data, ILuint length, ILubyte *newdata );
void abcd2cbad_short( ILushort *data, ILuint length, ILushort *newdata );
void abcd2cbad_int( ILuint *data, ILuint length, ILuint *newdata );
#define abcd2cbad_float(x,y,z) abcd2cbad_int(((ILuint*)(x)),y,((ILuint*)(z)))
void abcd2cbad_double( ILdouble *data, ILuint length, ILdouble *newdata );
#endif

View File

@@ -0,0 +1,41 @@
#ifndef ALLOC_H
#define ALLOC_H
/*#if defined(_WIN32) && defined(_MEM_DEBUG)
void *c_alloc(unsigned long size, unsigned long num, const char *file, unsigned long line);
void *m_alloc(unsigned long size, const char *file, unsigned long line);
void f_ree(void *ptr);
#ifdef malloc
#undef malloc
#endif
#ifdef calloc
#undef calloc
#endif
#ifdef free
#undef free
#endif
#define malloc(size) m_alloc(size, __FILE__, __LINE__)
#define calloc(size, num) c_alloc(size, num, __FILE__, __LINE__)
#define free(addr) f_ree(addr)
#endif//defined(_WIN32) && defined(_MEM_DEBUG)*/
#if defined (__ALLOC_C)
#define __ALLOC_EXTERN
#else
#define __ALLOC_EXTERN extern
#endif
#include <IL/il.h>
__ALLOC_EXTERN mAlloc ialloc_ptr;
__ALLOC_EXTERN mFree ifree_ptr;
#endif//ALLOC_H

View File

@@ -0,0 +1,43 @@
//-----------------------------------------------------------------------------
//
// ImageLib Sources
// Copyright (C) 2000-2002 by Denton Woods
// Last modified: 05/25/2001 <--Y2K Compliant! =]
//
// Filename: src-IL/include/il_bits.h
//
// Description: Implements a file class that reads/writes bits directly.
//
//-----------------------------------------------------------------------------
#ifndef BITS_H
#define BITS_H
#include "il_internal.h"
// Struct for dealing with reading bits from a file
typedef struct BITFILE
{
ILHANDLE File;
ILuint BitPos;
ILint ByteBitOff;
ILubyte Buff;
} BITFILE;
// Functions for reading bits from a file
//BITFILE* bopen(const char *FileName, const char *Mode);
ILint bclose(BITFILE *BitFile);
BITFILE* bfile(ILHANDLE File);
ILint btell(BITFILE *BitFile);
ILint bseek(BITFILE *BitFile, ILuint Offset, ILuint Mode);
ILint bread(ILvoid *Buffer, ILuint Size, ILuint Number, BITFILE *BitFile);
//ILint bwrite(ILvoid *Buffer, ILuint Size, ILuint Number, BITFILE *BitFile);
// Useful macros for manipulating bits
#define SetBits(var, bits) (var |= bits)
#define ClearBits(var, bits) (var &= ~(bits))
#endif//BITS_H

View File

@@ -0,0 +1,107 @@
//-----------------------------------------------------------------------------
//
// ImageLib Sources
// Copyright (C) 2000-2002 by Denton Woods
// Last modified: 09/01/2003 <--Y2K Compliant! =]
//
// Filename: src-IL/include/il_bmp.h
//
// Description: Reads and writes to a bitmap (.bmp) file.
//
//-----------------------------------------------------------------------------
#ifndef BMP_H
#define BMP_H
#include "il_internal.h"
#ifdef _WIN32
#pragma pack(push, bmp_struct, 1)
#endif
typedef struct BMPHEAD {
ILushort bfType;
ILint bfSize;
ILuint bfReserved;
ILint bfDataOff;
ILint biSize;
ILint biWidth;
ILint biHeight;
ILshort biPlanes;
ILshort biBitCount;
ILint biCompression;
ILint biSizeImage;
ILint biXPelsPerMeter;
ILint biYPelsPerMeter;
ILint biClrUsed;
ILint biClrImportant;
} IL_PACKSTRUCT BMPHEAD;
typedef struct OS2_HEAD
{
// Bitmap file header.
ILushort bfType;
ILuint biSize;
ILshort xHotspot;
ILshort yHotspot;
ILuint DataOff;
// Bitmap core header.
ILuint cbFix;
//2003-09-01: changed cx, cy to ushort according to MSDN
ILushort cx;
ILushort cy;
ILushort cPlanes;
ILushort cBitCount;
} IL_PACKSTRUCT OS2_HEAD;
#ifdef _WIN32
#pragma pack(pop, bmp_struct)
#endif
// Internal functions
ILboolean iGetBmpHead(BMPHEAD * const Header);
ILboolean iGetOS2Head(OS2_HEAD * const Header);
ILboolean iIsValidBmp();
ILboolean iCheckBmp(const BMPHEAD *CONST_RESTRICT Header);
ILboolean iCheckOS2(const OS2_HEAD *CONST_RESTRICT Header);
ILboolean iLoadBitmapInternal();
ILboolean iSaveBitmapInternal();
ILboolean ilReadUncompBmp(BMPHEAD *Info);
ILboolean ilReadRLE8Bmp(BMPHEAD *Info);
ILboolean ilReadRLE4Bmp(BMPHEAD *Info);
ILboolean iGetOS2Bmp(OS2_HEAD *Header);
#ifdef IL_BMP_C
#undef NOINLINE
#undef INLINE
#define INLINE
#endif
#ifndef NOINLINE
INLINE ILvoid GetShiftFromMask(const ILuint Mask, ILuint * CONST_RESTRICT ShiftLeft, ILuint * CONST_RESTRICT ShiftRight) {
ILuint Temp, i;
if( Mask == 0 ) {
*ShiftLeft = *ShiftRight = 0;
return;
}
Temp = Mask;
for( i = 0; i < 32; i++, Temp >>= 1 ) {
if( Temp & 1 )
break;
}
*ShiftRight = i;
// Temp is preserved, so use it again:
for( i = 0; i < 8; i++, Temp >>= 1 ) {
if( !(Temp & 1) )
break;
}
*ShiftLeft = 8 - i;
return;
}
#endif
#endif//BMP_H

View File

@@ -0,0 +1,52 @@
//-----------------------------------------------------------------------------
//
// ImageLib Sources
// Copyright (C) 2000-2002 by Denton Woods
// Last modified: 12/03/2001 <--Y2K Compliant! =]
//
// Filename: src-IL/include/il_dcx.h
//
// Description: Reads from a .dcx file.
//
//-----------------------------------------------------------------------------
#ifndef DCX_H
#define DCX_H
#include "il_internal.h"
#ifdef _WIN32
#pragma pack(push, packed_struct, 1)
#endif
typedef struct DCXHEAD
{
ILubyte Manufacturer;
ILubyte Version;
ILubyte Encoding;
ILubyte Bpp;
ILushort Xmin, Ymin, Xmax, Ymax;
ILushort HDpi;
ILushort VDpi;
ILubyte ColMap[48];
ILubyte Reserved;
ILubyte NumPlanes;
ILushort Bps;
ILushort PaletteInfo;
ILushort HScreenSize;
ILushort VScreenSize;
ILubyte Filler[54];
} IL_PACKSTRUCT DCXHEAD;
#ifdef _WIN32
#pragma pack(pop, packed_struct)
#endif
// For checking and reading
ILboolean iIsValidDcx(ILvoid);
ILboolean iCheckDcx(DCXHEAD *Header);
ILboolean iLoadDcxInternal(ILvoid);
ILimage* iUncompressDcx(DCXHEAD *Header);
ILimage* iUncompressDcxSmall(DCXHEAD *Header);
#endif//PCX_H

View File

@@ -0,0 +1,214 @@
//-----------------------------------------------------------------------------
//
// ImageLib Sources
// Copyright (C) 2000-2002 by Denton Woods
// Last modified: 02/21/2002 <--Y2K Compliant! =]
//
// Filename: src-IL/include/il_dds.h
//
// Description: Reads from a DirectDraw Surface (.dds) file.
//
//-----------------------------------------------------------------------------
#ifndef DDS_H
#define DDS_H
#include "il_internal.h"
#ifdef _WIN32
#pragma pack(push, dds_struct, 1)
#endif
typedef struct DDSHEAD
{
ILbyte Signature[4];
ILuint Size1; // size of the structure (minus MagicNum)
ILuint Flags1; // determines what fields are valid
ILuint Height; // height of surface to be created
ILuint Width; // width of input surface
ILuint LinearSize; // Formless late-allocated optimized surface size
ILuint Depth; // Depth if a volume texture
ILuint MipMapCount; // number of mip-map levels requested
ILuint AlphaBitDepth; // depth of alpha buffer requested
ILuint NotUsed[10];
ILuint Size2; // size of structure
ILuint Flags2; // pixel format flags
ILuint FourCC; // (FOURCC code)
ILuint RGBBitCount; // how many bits per pixel
ILuint RBitMask; // mask for red bit
ILuint GBitMask; // mask for green bits
ILuint BBitMask; // mask for blue bits
ILuint RGBAlphaBitMask; // mask for alpha channel
ILuint ddsCaps1, ddsCaps2, ddsCaps3, ddsCaps4; // direct draw surface capabilities
ILuint TextureStage;
} IL_PACKSTRUCT DDSHEAD;
#ifdef _WIN32
#pragma pack(pop, dds_struct)
#endif
// use cast to struct instead of RGBA_MAKE as struct is
// much
typedef struct Color8888
{
ILubyte r; // change the order of names to change the
ILubyte g; // order of the output ARGB or BGRA, etc...
ILubyte b; // Last one is MSB, 1st is LSB.
ILubyte a;
} Color8888;
typedef struct Color888
{
ILubyte r; // change the order of names to change the
ILubyte g; // order of the output ARGB or BGRA, etc...
ILubyte b; // Last one is MSB, 1st is LSB.
} Color888;
typedef struct Color565
{
unsigned nBlue : 5; // order of names changes
unsigned nGreen : 6; // byte order of output to 32 bit
unsigned nRed : 5;
} Color565;
typedef struct DXTColBlock
{
ILshort col0;
ILshort col1;
// no bit fields - use bytes
ILbyte row[4];
} DXTColBlock;
typedef struct DXTAlphaBlockExplicit
{
ILshort row[4];
} DXTAlphaBlockExplicit;
typedef struct DXTAlphaBlock3BitLinear
{
ILbyte alpha0;
ILbyte alpha1;
ILbyte stuff[6];
} DXTAlphaBlock3BitLinear;
// Defines
//Those 4 were added on 20040516 to make
//the written dds files more standard compliant
#define DDS_CAPS 0x00000001L
#define DDS_HEIGHT 0x00000002L
#define DDS_WIDTH 0x00000004L
#define DDS_RGB 0x00000040L
#define DDS_PIXELFORMAT 0x00001000L
#define DDS_LUMINANCE 0x00020000L
#define DDS_ALPHAPIXELS 0x00000001L
#define DDS_ALPHA 0x00000002L
#define DDS_FOURCC 0x00000004L
#define DDS_PITCH 0x00000008L
#define DDS_COMPLEX 0x00000008L
#define DDS_TEXTURE 0x00001000L
#define DDS_MIPMAPCOUNT 0x00020000L
#define DDS_LINEARSIZE 0x00080000L
#define DDS_VOLUME 0x00200000L
#define DDS_MIPMAP 0x00400000L
#define DDS_DEPTH 0x00800000L
#define DDS_CUBEMAP 0x00000200L
#define DDS_CUBEMAP_POSITIVEX 0x00000400L
#define DDS_CUBEMAP_NEGATIVEX 0x00000800L
#define DDS_CUBEMAP_POSITIVEY 0x00001000L
#define DDS_CUBEMAP_NEGATIVEY 0x00002000L
#define DDS_CUBEMAP_POSITIVEZ 0x00004000L
#define DDS_CUBEMAP_NEGATIVEZ 0x00008000L
#define IL_MAKEFOURCC(ch0, ch1, ch2, ch3) \
((ILint)(ILbyte)(ch0) | ((ILint)(ILbyte)(ch1) << 8) | \
((ILint)(ILbyte)(ch2) << 16) | ((ILint)(ILbyte)(ch3) << 24 ))
enum PixFormat
{
PF_ARGB,
PF_RGB,
PF_DXT1,
PF_DXT2,
PF_DXT3,
PF_DXT4,
PF_DXT5,
PF_3DC,
PF_ATI1N,
PF_LUMINANCE,
PF_LUMINANCE_ALPHA,
PF_RXGB, //Doom3 normal maps
PF_A16B16G16R16,
PF_R16F,
PF_G16R16F,
PF_A16B16G16R16F,
PF_R32F,
PF_G32R32F,
PF_A32B32G32R32F,
PF_UNKNOWN = 0xFF
};
#define CUBEMAP_SIDES 6
// Internal functions
ILboolean iLoadDdsInternal(ILvoid);
ILboolean iIsValidDds(ILvoid);
ILboolean iCheckDds(DDSHEAD *Head);
ILvoid AdjustVolumeTexture(DDSHEAD *Head);
ILboolean ReadData(ILvoid);
ILboolean AllocImage(ILvoid);
ILboolean Decompress(ILvoid);
ILboolean ReadMipmaps(ILvoid);
ILuint DecodePixelFormat(ILvoid);
ILboolean DecompressARGB(ILvoid);
ILboolean DecompressDXT1(ILvoid);
ILboolean DecompressDXT2(ILvoid);
ILboolean DecompressDXT3(ILvoid);
ILboolean DecompressDXT4(ILvoid);
ILboolean DecompressDXT5(ILvoid);
ILboolean Decompress3Dc(ILvoid);
ILboolean DecompressAti1n(ILvoid);
ILboolean DecompressRXGB(ILvoid);
ILboolean DecompressFloat(ILvoid);
ILvoid CorrectPreMult(ILvoid);
ILvoid GetBitsFromMask(ILuint Mask, ILuint *ShiftLeft, ILuint *ShiftRight);
ILboolean iSaveDdsInternal(ILvoid);
ILboolean WriteHeader(ILimage *Image, ILenum DXTCFormat, ILuint CubeFlags);
ILushort *CompressTo565(ILimage *Image);
ILubyte *CompressTo88(ILimage *Image);
ILuint Compress(ILimage *Image, ILenum DXTCFormat);
ILboolean GetBlock(ILushort *Block, ILushort *Data, ILimage *Image, ILuint XPos, ILuint YPos);

View File

@@ -0,0 +1,276 @@
//-----------------------------------------------------------------------------
//
// ImageLib Sources
// Copyright (C) 2000-2002 by Denton Woods
// Last modified: 05/25/2001 <--Y2K Compliant! =]
//
// Filename: src-IL/include/il_doompal.h
//
// Description: The default Doom palette
//
//-----------------------------------------------------------------------------
#ifndef DOOMPAL_H
#define DOOMPAL_H
#define IL_DOOMPAL_SIZE 768
ILubyte ilDefaultDoomPal[IL_DOOMPAL_SIZE] = {
0, 0, 0,
31, 23, 11,
23, 15, 7,
75, 75, 75,
255, 255, 255,
27, 27, 27,
19, 19, 19,
11, 11, 11,
7, 7, 7,
47, 55, 31,
35, 43, 15,
23, 31, 7,
15, 23, 0,
79, 59, 43,
71, 51, 35,
63, 43, 27,
255, 183, 183,
247, 171, 171,
243, 163, 163,
235, 151, 151,
231, 143, 143,
223, 135, 135,
219, 123, 123,
211, 115, 115,
203, 107, 107,
199, 99, 99,
191, 91, 91,
187, 87, 87,
179, 79, 79,
175, 71, 71,
167, 63, 63,
163, 59, 59,
155, 51, 51,
151, 47, 47,
143, 43, 43,
139, 35, 35,
131, 31, 31,
127, 27, 27,
119, 23, 23,
115, 19, 19,
107, 15, 15,
103, 11, 11,
95, 7, 7,
91, 7, 7,
83, 7, 7,
79, 0, 0,
71, 0, 0,
67, 0, 0,
255, 235, 223,
255, 227, 211,
255, 219, 199,
255, 211, 187,
255, 207, 179,
255, 199, 167,
255, 191, 155,
255, 187, 147,
255, 179, 131,
247, 171, 123,
239, 163, 115,
231, 155, 107,
223, 147, 99,
215, 139, 91,
207, 131, 83,
203, 127, 79,
191, 123, 75,
179, 115, 71,
171, 111, 67,
163, 107, 63,
155, 99, 59,
143, 95, 55,
135, 87, 51,
127, 83, 47,
119, 79, 43,
107, 71, 39,
95, 67, 35,
83, 63, 31,
75, 55, 27,
63, 47, 23,
51, 43, 19,
43, 35, 15,
239, 239, 239,
231, 231, 231,
223, 223, 223,
219, 219, 219,
211, 211, 211,
203, 203, 203,
199, 199, 199,
191, 191, 191,
183, 183, 183,
179, 179, 179,
171, 171, 171,
167, 167, 167,
159, 159, 159,
151, 151, 151,
147, 147, 147,
139, 139, 139,
131, 131, 131,
127, 127, 127,
119, 119, 119,
111, 111, 111,
107, 107, 107,
99, 99, 99,
91, 91, 91,
87, 87, 87,
79, 79, 79,
71, 71, 71,
67, 67, 67,
59, 59, 59,
55, 55, 55,
47, 47, 47,
39, 39, 39,
35, 35, 35,
119, 255, 111,
111, 239, 103,
103, 223, 95,
95, 207, 87,
91, 191, 79,
83, 175, 71,
75, 159, 63,
67, 147, 55,
63, 131, 47,
55, 115, 43,
47, 99, 35,
39, 83, 27,
31, 67, 23,
23, 51, 15,
19, 35, 11,
11, 23, 7,
191, 167, 143,
183, 159, 135,
175, 151, 127,
167, 143, 119,
159, 135, 111,
155, 127, 107,
147, 123, 99,
139, 115, 91,
131, 107, 87,
123, 99, 79,
119, 95, 75,
111, 87, 67,
103, 83, 63,
95, 75, 55,
87, 67, 51,
83, 63, 47,
159, 131, 99,
143, 119, 83,
131, 107, 75,
119, 95, 63,
103, 83, 51,
91, 71, 43,
79, 59, 35,
67, 51, 27,
123, 127, 99,
111, 115, 87,
103, 107, 79,
91, 99, 71,
83, 87, 59,
71, 79, 51,
63, 71, 43,
55, 63, 39,
255, 255, 115,
235, 219, 87,
215, 187, 67,
195, 155, 47,
175, 123, 31,
155, 91, 19,
135, 67, 7,
115, 43, 0,
255, 255, 255,
255, 219, 219,
255, 187, 187,
255, 155, 155,
255, 123, 123,
255, 95, 95,
255, 63, 63,
255, 31, 31,
255, 0, 0,
239, 0, 0,
227, 0, 0,
215, 0, 0,
203, 0, 0,
191, 0, 0,
179, 0, 0,
167, 0, 0,
155, 0, 0,
139, 0, 0,
127, 0, 0,
115, 0, 0,
103, 0, 0,
91, 0, 0,
79, 0, 0,
67, 0, 0,
231, 231, 255,
199, 199, 255,
171, 171, 255,
143, 143, 255,
115, 115, 255,
83, 83, 255,
55, 55, 255,
27, 27, 255,
0, 0, 255,
0, 0, 227,
0, 0, 203,
0, 0, 179,
0, 0, 155,
0, 0, 131,
0, 0, 107,
0, 0, 83,
255, 255, 255,
255, 235, 219,
255, 215, 187,
255, 199, 155,
255, 179, 123,
255, 163, 91,
255, 143, 59,
255, 127, 27,
243, 115, 23,
235, 111, 15,
223, 103, 15,
215, 95, 11,
203, 87, 7,
195, 79, 0,
183, 71, 0,
175, 67, 0,
255, 255, 255,
255, 255, 215,
255, 255, 179,
255, 255, 143,
255, 255, 107,
255, 255, 71,
255, 255, 35,
255, 255, 0,
167, 63, 0,
159, 55, 0,
147, 47, 0,
135, 35, 0,
79, 59, 39,
67, 47, 27,
55, 35, 19,
47, 27, 11,
0, 0, 83,
0, 0, 71,
0, 0, 59,
0, 0, 47,
0, 0, 35,
0, 0, 23,
0, 0, 11,
0, 255, 255,
255, 159, 67,
255, 231, 75,
255, 123, 255,
255, 0, 255,
207, 0, 207,
159, 0, 155,
111, 0, 107,
167, 107, 107
};
#endif//DOOMPAL_H

View File

@@ -0,0 +1,377 @@
//-----------------------------------------------------------------------------
//
// ImageLib Sources
// Copyright (C) 2000-2002 by Denton Woods
// Last modified: 01/29/2002 <--Y2K Compliant! =]
//
// Filename: src-IL/include/il_endian.h
//
// Description: Handles Endian-ness
//
//-----------------------------------------------------------------------------
#ifndef IL_ENDIAN_H
#define IL_ENDIAN_H
#include "il_internal.h"
#ifdef WORDS_BIGENDIAN //this is defined by ./configure
#ifndef __BIG_ENDIAN__
#define __BIG_ENDIAN__
#endif
#endif
#if (defined(__BYTE_ORDER__) && __BYTE_ORDER__ == __BIG_ENDIAN__) \
|| (defined(__BIG_ENDIAN__) && !defined(__LITTLE_ENDIAN__))
#undef __LITTLE_ENDIAN__
#define Short(s) iSwapShort(s)
#define UShort(s) iSwapUShort(s)
#define Int(i) iSwapInt(i)
#define UInt(i) iSwapUInt(i)
#define Float(f) iSwapFloat(f)
#define Double(d) iSwapDouble(d)
#define BigShort(s)
#define BigUShort(s)
#define BigInt(i)
#define BigUInt(i)
#define BigFloat(f)
#define BigDouble(d)
#else
#undef __BIG_ENDIAN__
#undef __LITTLE_ENDIAN__ // Not sure if it's defined by any compiler...
#define __LITTLE_ENDIAN__
#define Short(s)
#define UShort(s)
#define Int(i)
#define UInt(i)
#define Float(f)
#define Double(d)
#define BigShort(s) iSwapShort(s)
#define BigUShort(s) iSwapUShort(s)
#define BigInt(i) iSwapInt(i)
#define BigUInt(i) iSwapUInt(i)
#define BigFloat(f) iSwapFloat(f)
#define BigDouble(d) iSwapDouble(d)
#endif
ILvoid iSwapUShort(ILushort *s);
ILvoid iSwapShort(ILshort *s);
ILvoid iSwapUInt(ILuint *i);
ILvoid iSwapInt(ILint *i);
ILvoid iSwapFloat(ILfloat *f);
ILvoid iSwapDouble(ILdouble *d);
ILushort GetLittleUShort();
ILshort GetLittleShort();
ILuint GetLittleUInt();
ILint GetLittleInt();
ILfloat GetLittleFloat();
ILdouble GetLittleDouble();
ILushort GetBigUShort();
ILshort GetBigShort();
ILuint GetBigUInt();
ILint GetBigInt();
ILfloat GetBigFloat();
ILdouble GetBigDouble();
ILubyte SaveLittleUShort(ILushort s);
ILubyte SaveLittleShort(ILshort s);
ILubyte SaveLittleUInt(ILuint i);
ILubyte SaveLittleInt(ILint i);
ILubyte SaveLittleFloat(ILfloat f);
ILubyte SaveLittleDouble(ILdouble d);
ILubyte SaveBigUShort(ILushort s);
ILubyte SaveBigShort(ILshort s);
ILubyte SaveBigUInt(ILuint i);
ILubyte SaveBigInt(ILint i);
ILubyte SaveBigFloat(ILfloat f);
ILubyte SaveBigDouble(ILdouble d);
#ifdef IL_ENDIAN_C
#undef NOINLINE
#undef INLINE
#define INLINE
#endif
#ifndef NOINLINE
INLINE ILvoid iSwapUShort(ILushort *s) {
#ifdef USE_WIN32_ASM
__asm {
mov ebx, s
mov al, [ebx+1]
mov ah, [ebx ]
mov [ebx], ax
}
#else
#ifdef GCC_X86_ASM
asm("ror $8,%0"
:
: "r" (*s) );
#else
*s = ((*s)>>8) | ((*s)<<8);
#endif //GCC_X86_ASM
#endif //USE_WIN32_ASM
}
INLINE ILvoid iSwapShort(ILshort *s) {
iSwapUShort((ILushort*)s);
}
INLINE ILvoid iSwapUInt(ILuint *i) {
#ifdef USE_WIN32_ASM
__asm {
mov ebx, i
mov eax, [ebx]
bswap eax
mov [ebx], eax
}
#else
#ifdef GCC_X86_ASM
asm("bswap %0;"
: "=r" (*i) );
#else
*i = ((*i)>>24) | (((*i)>>8) & 0xff00) | (((*i)<<8) & 0xff0000) | ((*i)<<24);
#endif //GCC_X86_ASM
#endif //USE_WIN32_ASM
}
INLINE ILvoid iSwapInt(ILint *i) {
iSwapUInt((ILuint*)i);
}
INLINE ILvoid iSwapFloat(ILfloat *f) {
iSwapUInt((ILuint*)f);
}
INLINE ILvoid iSwapDouble(ILdouble *d) {
#ifdef GCC_X86_ASM
int *t = (int*)d;
asm("bswap %2 \n"
"bswap %3 \n"
"movl %2,%1 \n"
"movl %3,%0 \n"
: "=g" (t[0]), "=g" (t[1])
: "r" (t[0]), "r" (t[1]));
#else
ILubyte t,*b = (ILubyte*)d;
#define dswap(x,y) t=b[x];b[x]=b[y];b[y]=b[x];
dswap(0,7);
dswap(1,6);
dswap(2,5);
dswap(3,4);
#undef dswap
#endif
}
INLINE ILushort GetLittleUShort() {
ILushort s;
iread(&s, sizeof(ILushort), 1);
#ifdef __BIG_ENDIAN__
iSwapUShort(&s);
#endif
return s;
}
INLINE ILshort GetLittleShort() {
ILshort s;
iread(&s, sizeof(ILshort), 1);
#ifdef __BIG_ENDIAN__
iSwapShort(&s);
#endif
return s;
}
INLINE ILuint GetLittleUInt() {
ILuint i;
iread(&i, sizeof(ILuint), 1);
#ifdef __BIG_ENDIAN__
iSwapUInt(&i);
#endif
return i;
}
INLINE ILint GetLittleInt() {
ILint i;
iread(&i, sizeof(ILint), 1);
#ifdef __BIG_ENDIAN__
iSwapInt(&i);
#endif
return i;
}
INLINE ILfloat GetLittleFloat() {
ILfloat f;
iread(&f, sizeof(ILfloat), 1);
#ifdef __BIG_ENDIAN__
iSwapFloat(&f);
#endif
return f;
}
INLINE ILdouble GetLittleDouble() {
ILdouble d;
iread(&d, sizeof(ILdouble), 1);
#ifdef __BIG_ENDIAN__
iSwapDouble(&d);
#endif
return d;
}
INLINE ILushort GetBigUShort() {
ILushort s;
iread(&s, sizeof(ILushort), 1);
#ifdef __LITTLE_ENDIAN__
iSwapUShort(&s);
#endif
return s;
}
INLINE ILshort GetBigShort() {
ILshort s;
iread(&s, sizeof(ILshort), 1);
#ifdef __LITTLE_ENDIAN__
iSwapShort(&s);
#endif
return s;
}
INLINE ILuint GetBigUInt() {
ILuint i;
iread(&i, sizeof(ILuint), 1);
#ifdef __LITTLE_ENDIAN__
iSwapUInt(&i);
#endif
return i;
}
INLINE ILint GetBigInt() {
ILint i;
iread(&i, sizeof(ILint), 1);
#ifdef __LITTLE_ENDIAN__
iSwapInt(&i);
#endif
return i;
}
INLINE ILfloat GetBigFloat() {
ILfloat f;
iread(&f, sizeof(ILfloat), 1);
#ifdef __LITTLE_ENDIAN__
iSwapFloat(&f);
#endif
return f;
}
INLINE ILdouble GetBigDouble() {
ILdouble d;
iread(&d, sizeof(ILdouble), 1);
#ifdef __LITTLE_ENDIAN__
iSwapDouble(&d);
#endif
return d;
}
INLINE ILubyte SaveLittleUShort(ILushort s) {
#ifdef __BIG_ENDIAN__
iSwapUShort(&s);
#endif
return iwrite(&s, sizeof(ILushort), 1);
}
INLINE ILubyte SaveLittleShort(ILshort s) {
#ifdef __BIG_ENDIAN__
iSwapShort(&s);
#endif
return iwrite(&s, sizeof(ILshort), 1);
}
INLINE ILubyte SaveLittleUInt(ILuint i) {
#ifdef __BIG_ENDIAN__
iSwapUInt(&i);
#endif
return iwrite(&i, sizeof(ILuint), 1);
}
INLINE ILubyte SaveLittleInt(ILint i) {
#ifdef __BIG_ENDIAN__
iSwapInt(&i);
#endif
return iwrite(&i, sizeof(ILint), 1);
}
INLINE ILubyte SaveLittleFloat(ILfloat f) {
#ifdef __BIG_ENDIAN__
iSwapFloat(&f);
#endif
return iwrite(&f, sizeof(ILfloat), 1);
}
INLINE ILubyte SaveLittleDouble(ILdouble d) {
#ifdef __BIG_ENDIAN__
iSwapDouble(&d);
#endif
return iwrite(&d, sizeof(ILdouble), 1);
}
INLINE ILubyte SaveBigUShort(ILushort s) {
#ifdef __LITTLE_ENDIAN__
iSwapUShort(&s);
#endif
return iwrite(&s, sizeof(ILushort), 1);
}
INLINE ILubyte SaveBigShort(ILshort s) {
#ifdef __LITTLE_ENDIAN__
iSwapShort(&s);
#endif
return iwrite(&s, sizeof(ILshort), 1);
}
INLINE ILubyte SaveBigUInt(ILuint i) {
#ifdef __LITTLE_ENDIAN__
iSwapUInt(&i);
#endif
return iwrite(&i, sizeof(ILuint), 1);
}
INLINE ILubyte SaveBigInt(ILint i) {
#ifdef __LITTLE_ENDIAN__
iSwapInt(&i);
#endif
return iwrite(&i, sizeof(ILint), 1);
}
INLINE ILubyte SaveBigFloat(ILfloat f) {
#ifdef __LITTLE_ENDIAN__
iSwapFloat(&f);
#endif
return iwrite(&f, sizeof(ILfloat), 1);
}
INLINE ILubyte SaveBigDouble(ILdouble d) {
#ifdef __LITTLE_ENDIAN__
iSwapDouble(&d);
#endif
return iwrite(&d, sizeof(ILdouble), 1);
}
#endif
ILvoid EndianSwapData(void *_Image);
#endif//ENDIAN_H

View File

@@ -0,0 +1,76 @@
//-----------------------------------------------------------------------------
//
// ImageLib Sources
// Copyright (C) 2000-2002 by Denton Woods
// Last modified: 10/20/2001 <--Y2K Compliant! =]
//
// Filename: src-IL/include/il_files.h
//
// Description: File handling for DevIL
//
//-----------------------------------------------------------------------------
#ifndef FILES_H
#define FILES_H
#if defined (__FILES_C)
#define __FILES_EXTERN
#else
#define __FILES_EXTERN extern
#endif
#include <IL/il.h>
__FILES_EXTERN ILvoid ILAPIENTRY iPreserveReadFuncs(ILvoid);
__FILES_EXTERN ILvoid ILAPIENTRY iRestoreReadFuncs(ILvoid);
__FILES_EXTERN fEofProc EofProc;
__FILES_EXTERN fGetcProc GetcProc;
__FILES_EXTERN fReadProc ReadProc;
__FILES_EXTERN fSeekRProc SeekRProc;
__FILES_EXTERN fSeekWProc SeekWProc;
__FILES_EXTERN fTellRProc TellRProc;
__FILES_EXTERN fTellWProc TellWProc;
__FILES_EXTERN fPutcProc PutcProc;
__FILES_EXTERN fWriteProc WriteProc;
__FILES_EXTERN ILHANDLE ILAPIENTRY iDefaultOpen(ILconst_string FileName);
__FILES_EXTERN ILvoid ILAPIENTRY iDefaultClose(ILHANDLE Handle);
__FILES_EXTERN ILint ILAPIENTRY iDefaultGetc(ILHANDLE Handle);
__FILES_EXTERN ILint ILAPIENTRY iDefaultRead(ILvoid *Buffer, ILuint Size, ILuint Number, ILHANDLE Handle);
__FILES_EXTERN ILint ILAPIENTRY iDefaultSeekR(ILHANDLE Handle, ILint Offset, ILint Mode);
__FILES_EXTERN ILint ILAPIENTRY iDefaultSeekW(ILHANDLE Handle, ILint Offset, ILint Mode);
__FILES_EXTERN ILint ILAPIENTRY iDefaultTellR(ILHANDLE Handle);
__FILES_EXTERN ILint ILAPIENTRY iDefaultTellW(ILHANDLE Handle);
__FILES_EXTERN ILint ILAPIENTRY iDefaultPutc(ILubyte Char, ILHANDLE Handle);
__FILES_EXTERN ILint ILAPIENTRY iDefaultWrite(const ILvoid *Buffer, ILuint Size, ILuint Number, ILHANDLE Handle);
__FILES_EXTERN ILvoid iSetInputFile(ILHANDLE File);
__FILES_EXTERN ILvoid iSetInputLump(const ILvoid *Lump, ILuint Size);
__FILES_EXTERN ILboolean (ILAPIENTRY *ieof)(ILvoid);
__FILES_EXTERN ILHANDLE (ILAPIENTRY *iopenr)(ILconst_string);
__FILES_EXTERN ILvoid (ILAPIENTRY *icloser)(ILHANDLE);
__FILES_EXTERN ILint (ILAPIENTRY *igetc)(ILvoid);
__FILES_EXTERN ILuint (ILAPIENTRY *iread)(ILvoid *Buffer, ILuint Size, ILuint Number);
__FILES_EXTERN ILuint (ILAPIENTRY *iseek)(ILint Offset, ILuint Mode);
__FILES_EXTERN ILuint (ILAPIENTRY *itell)(ILvoid);
__FILES_EXTERN ILvoid iSetOutputFile(ILHANDLE File);
__FILES_EXTERN ILvoid iSetOutputLump(ILvoid *Lump, ILuint Size);
__FILES_EXTERN ILvoid (ILAPIENTRY *iclosew)(ILHANDLE);
__FILES_EXTERN ILHANDLE (ILAPIENTRY *iopenw)(ILconst_string);
__FILES_EXTERN ILint (ILAPIENTRY *iputc)(ILubyte Char);
__FILES_EXTERN ILuint (ILAPIENTRY *iseekw)(ILint Offset, ILuint Mode);
__FILES_EXTERN ILuint (ILAPIENTRY *itellw)(ILvoid);
__FILES_EXTERN ILint (ILAPIENTRY *iwrite)(const ILvoid *Buffer, ILuint Size, ILuint Number);
__FILES_EXTERN ILHANDLE ILAPIENTRY iGetFile(ILvoid);
__FILES_EXTERN const ILubyte* ILAPIENTRY iGetLump(ILvoid);
__FILES_EXTERN ILuint ILAPIENTRY ilprintf(const char *, ...);
__FILES_EXTERN ILvoid ipad(ILuint NumZeros);
__FILES_EXTERN ILboolean iPreCache(ILuint Size);
__FILES_EXTERN ILvoid iUnCache(ILvoid);
#endif//FILES_H

View File

@@ -0,0 +1,71 @@
//-----------------------------------------------------------------------------
//
// ImageLib Sources
// Copyright (C) 2000-2002 by Denton Woods
// Last modified: 05/18/2002 <--Y2K Compliant! =]
//
// Filename: src-IL/include/il_gif.h
//
// Description: Reads from a Graphics Interchange Format (.gif) file.
//
//-----------------------------------------------------------------------------
#ifndef GIF_H
#define GIF_H
#include "il_internal.h"
#define GIF87A 87
#define GIF89A 89
#ifdef _WIN32
#pragma pack(push, gif_struct, 1)
#endif
typedef struct GIFHEAD
{
char Sig[6];
ILushort Width;
ILushort Height;
ILubyte ColourInfo;
ILubyte Background;
ILubyte Aspect;
} IL_PACKSTRUCT GIFHEAD;
typedef struct IMAGEDESC
{
ILubyte Separator;
ILushort OffX;
ILushort OffY;
ILushort Width;
ILushort Height;
ILubyte ImageInfo;
} IL_PACKSTRUCT IMAGEDESC;
typedef struct GFXCONTROL
{
ILubyte Size;
ILubyte Packed;
ILushort Delay;
ILubyte Transparent;
ILubyte Terminator;
ILboolean Used; //this stores if a gfxcontrol was read - it is IL_FALSE (!)
//if a gfxcontrol was read from the file, IL_TRUE otherwise
} IL_PACKSTRUCT GFXCONTROL;
#ifdef _WIN32
#pragma pack(pop, gif_struct)
#endif
// Internal functions
ILboolean iLoadGifInternal(ILvoid);
ILboolean ilLoadGifF(ILHANDLE File);
ILboolean iIsValidGif(ILvoid);
ILboolean iGetPalette(ILubyte Info, ILpal *Pal);
ILboolean GetImages(ILpal *GlobalPal, GIFHEAD *GifHead);
ILboolean SkipExtensions(GFXCONTROL *Gfx);
ILboolean GifGetData(ILubyte *Data, ILuint ImageSize, ILuint Width, ILuint Height, ILuint Stride, GFXCONTROL *Gfx);
ILboolean RemoveInterlace(ILimage *image);
ILboolean iCopyPalette(ILpal *Dest, ILpal *Src);
ILboolean ConvertTransparent(ILimage *Image, ILubyte TransColour);

View File

@@ -0,0 +1,42 @@
//-----------------------------------------------------------------------------
//
// ImageLib Sources
// Copyright (C) 2000-2004 by Denton Woods (this file by thakis)
// Last modified: 06/09/2004
//
// Filename: src-IL/include/il_hdr.h
//
// Description: Reads a RADIANCE High Dynamic Range Image
//
//-----------------------------------------------------------------------------
#ifndef HDR_H
#define HDR_H
#include "il_internal.h"
#ifdef _WIN32
#pragma pack(push, gif_struct, 1)
#endif
typedef struct HDRHEADER
{
char Signature[10]; //must be "#?RADIANCE"
ILuint Width, Height;
} IL_PACKSTRUCT HDRHEADER;
#ifdef _WIN32
#pragma pack(pop, gif_struct)
#endif
// Internal functions
ILboolean ilIsValidHdrF(ILHANDLE file);
ILboolean iIsValidHdr();
ILboolean iCheckHdr(HDRHEADER *Header);
ILboolean ilLoadHdrF(ILHANDLE file);
ILboolean iLoadHdrInternal();
ILvoid ReadScanline(ILubyte *scanline, ILuint w);
#endif//HDR_H

View File

@@ -0,0 +1,71 @@
//-----------------------------------------------------------------------------
//
// ImageLib Sources
// Copyright (C) 2000-2002 by Denton Woods
// Last modified: 05/25/2001 <--Y2K Compliant! =]
//
// Filename: src-IL/include/il_icon.h
//
// Description: Reads from a Windows icon (.ico) file.
//
//-----------------------------------------------------------------------------
#ifndef ICON_H
#define ICON_H
#include "il_internal.h"
ILboolean iLoadIconInternal();
#ifdef _WIN32
#pragma pack(push, ico_struct, 1)
#endif
typedef struct ICODIR
{
ILshort Reserved; // Reserved (must be 0)
ILshort Type; // Type (1 for icons, 2 for cursors)
ILshort Count; // How many different images?
} IL_PACKSTRUCT ICODIR;
typedef struct ICODIRENTRY
{
ILubyte Width; // Width, in pixels
ILubyte Height; // Height, in pixels
ILubyte NumColours; // Number of colors in image (0 if >=8bpp)
ILubyte Reserved; // Reserved (must be 0)
ILshort Planes; // Colour planes
ILshort Bpp; // Bits per pixel
ILuint SizeOfData; // How many bytes in this resource?
ILuint Offset; // Offset from beginning of the file
} IL_PACKSTRUCT ICODIRENTRY;
typedef struct INFOHEAD
{
ILint Size;
ILint Width;
ILint Height;
ILshort Planes;
ILshort BitCount;
ILint Compression;
ILint SizeImage;
ILint XPixPerMeter;
ILint YPixPerMeter;
ILint ColourUsed;
ILint ColourImportant;
} IL_PACKSTRUCT INFOHEAD;
typedef struct ICOIMAGE
{
INFOHEAD Head;
ILubyte *Pal; // Palette
ILubyte *Data; // XOR mask
ILubyte *AND; // AND mask
} ICOIMAGE;
#ifdef _WIN32
#pragma pack(pop, ico_struct)
#endif
#endif//ICON_H

View File

@@ -0,0 +1,380 @@
//-----------------------------------------------------------------------------
//
// ImageLib Sources
// Copyright (C) 2000-2002 by Denton Woods
// Last modified: 02/19/2002 <--Y2K Compliant! =]
//
// Filename: src-IL/include/il_internal.h
//
// Description: Internal stuff for DevIL
//
//-----------------------------------------------------------------------------
#ifndef INTERNAL_H
#define INTERNAL_H
#define _IL_BUILD_LIBRARY
// Standard headers
#include <stdlib.h>
#include <stdio.h>
#include <math.h>
#include <string.h>
// Local headers
#if defined(_WIN32) && !defined(HAVE_CONFIG_H)
#define HAVE_CONFIG_H
#endif
#ifdef HAVE_CONFIG_H
#include <IL/config.h>
#endif
#include <IL/il.h>
#include <IL/devil_internal_exports.h>
#include "il_files.h"
#include "il_endian.h"
// Windows-specific
#ifdef _WIN32
#ifdef _MSC_VER
#if _MSC_VER > 1000
#pragma once
#pragma intrinsic(memcpy)
#pragma intrinsic(memset)
#pragma intrinsic(strcmp)
#pragma intrinsic(strlen)
#pragma intrinsic(strcpy)
/*
#if _MSC_VER >= 1300 // Erroneous size_t conversion warnings
pragma warning(disable : 4267)
#endif
pragma comment(linker, "/NODEFAULTLIB:libc")
pragma comment(linker, "/NODEFAULTLIB:libcd")
pragma comment(linker, "/NODEFAULTLIB:libcmt.lib")
#ifdef _DEBUG
pragma comment(linker, "/NODEFAULTLIB:libcmtd")
pragma comment(linker, "/NODEFAULTLIB:msvcrt.lib")
#endif // _DEBUG
*/
#endif // _MSC_VER > 1000
#endif
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
#include <windows.h>
#endif
// Windows has a TEXT macro defined in WinNT.h that makes string Unicode if UNICODE is defined.
/*#ifndef _WIN32
#define IL_TEXT(s) s
#endif*/
/*#ifdef _WIN32_WCE
#define IL_TEXT(s) ((char*)TEXT(s))
#elif _WIN32
#define IL_TEXT(s) (s)
#else
#define IL_TEXT(s) (s)
#define TEXT(s) (s)
#endif*/
#ifdef _UNICODE
#define IL_TEXT(s) L##s
#else
#define IL_TEXT(s) (s)
#endif
#ifdef IL_INLINE_ASM
#ifdef _MSC_VER // MSVC++ only
#define USE_WIN32_ASM
#endif
#endif
extern ILimage *iCurImage;
#define BIT_0 0x00000001
#define BIT_1 0x00000002
#define BIT_2 0x00000004
#define BIT_3 0x00000008
#define BIT_4 0x00000010
#define BIT_5 0x00000020
#define BIT_6 0x00000040
#define BIT_7 0x00000080
#define BIT_8 0x00000100
#define BIT_9 0x00000200
#define BIT_10 0x00000400
#define BIT_11 0x00000800
#define BIT_12 0x00001000
#define BIT_13 0x00002000
#define BIT_14 0x00004000
#define BIT_15 0x00008000
#define BIT_16 0x00010000
#define BIT_17 0x00020000
#define BIT_18 0x00040000
#define BIT_19 0x00080000
#define BIT_20 0x00100000
#define BIT_21 0x00200000
#define BIT_22 0x00400000
#define BIT_23 0x00800000
#define BIT_24 0x01000000
#define BIT_25 0x02000000
#define BIT_26 0x04000000
#define BIT_27 0x08000000
#define BIT_28 0x10000000
#define BIT_29 0x20000000
#define BIT_30 0x40000000
#define BIT_31 0x80000000
#define NUL '\0' // Easier to type and ?portable?
#if !_WIN32 || _WIN32_WCE
int stricmp(const char *src1, const char *src2);
int strnicmp(const char *src1, const char *src2, size_t max);
#endif//_WIN32
int iStrCmp(ILconst_string src1, ILconst_string src2);
//
// Some math functions
//
// A fast integer squareroot, completely accurate for x < 289.
// Taken from http://atoms.org.uk/sqrt/
// There is also a version that is accurate for all integers
// < 2^31, if we should need it
int iSqrt(int x);
//
// Useful miscellaneous functions
//
ILboolean iCheckExtension(ILconst_string Arg, ILconst_string Ext);
ILbyte* iFgets(char *buffer, ILuint maxlen);
ILboolean iFileExists(ILconst_string FileName);
ILstring iGetExtension(ILconst_string FileName);
char* ilStrDup(const char *Str);
ILuint ilStrLen(const char *Str);
// Miscellaneous functions
ILvoid ilDefaultStates(ILvoid);
ILenum iGetHint(ILenum Target);
ILint iGetInt(ILenum Mode);
ILvoid ilRemoveRegistered(ILvoid);
ILAPI ILvoid ILAPIENTRY ilSetCurImage(ILimage *Image);
//
// Rle compression
//
#define IL_TGACOMP 0x01
#define IL_PCXCOMP 0x02
#define IL_SGICOMP 0x03
#define IL_BMPCOMP 0x04
ILboolean ilRleCompressLine(ILubyte *ScanLine, ILuint Width, ILubyte Bpp, ILubyte *Dest, ILuint *DestWidth, ILenum CompressMode);
ILuint ilRleCompress(ILubyte *Data, ILuint Width, ILuint Height, ILuint Depth, ILubyte Bpp, ILubyte *Dest, ILenum CompressMode, ILuint *ScanTable);
ILvoid iSetImage0(ILvoid);
// Conversion functions
ILboolean ilAddAlpha(ILvoid);
ILboolean ilAddAlphaKey(ILimage *Image);
ILboolean iFastConvert(ILenum DestFormat);
ILboolean ilFixImage(ILvoid);
ILboolean ilRemoveAlpha(ILvoid);
ILboolean ilSwapColours(ILvoid);
// Miscellaneous functions
char *iGetString(ILenum StringName); // Internal version of ilGetString
// Library usage
#if _MSC_VER && !_WIN32_WCE
#ifndef IL_NO_JPG
#ifdef IL_USE_IJL
//pragma comment(lib, "ijl15.lib")
#else
#ifndef IL_DEBUG
//pragma comment(lib, "libjpeg.lib")
#else
//ragma comment(lib, "debug/libjpeg.lib")
#endif
#endif
#endif
#ifndef IL_NO_MNG
#ifndef IL_DEBUG
//pragma comment(lib, "libmng.lib")
//pragma comment(lib, "libjpeg.lib") // For JNG support.
#else
//pragma comment(lib, "debug/libmng.lib")
//pragma comment(lib, "debug/libjpeg.lib") // For JNG support.
#endif
#endif
#ifndef IL_NO_PNG
#ifndef IL_DEBUG
//pragma comment(lib, "libpng.lib")
#else
//pragma comment(lib, "debug/libpng.lib")
#endif
#endif
#ifndef IL_NO_TIF
#ifndef IL_DEBUG
//pragma comment(lib, "libtiff.lib")
#else
//pragma comment(lib, "debug/libtiff.lib")
#endif
#endif
#if !defined(IL_NO_MNG) || !defined(IL_NO_PNG)
#ifndef IL_DEBUG
//pragma comment(lib, "zlib.lib")
#else
//pragma comment(lib, "debug/zlib.lib")
#endif
#endif
#endif
//
// Image loading/saving functions
//
ILboolean ilIsValidBmp(ILconst_string FileName);
ILboolean ilIsValidBmpF(ILHANDLE File);
ILboolean ilIsValidBmpL(const ILvoid *Lump, ILuint Size);
ILboolean ilLoadBmp(ILconst_string FileName);
ILboolean ilLoadBmpF(ILHANDLE File);
ILboolean ilLoadBmpL(const ILvoid *Lump, ILuint Size);
ILboolean ilSaveBmp(ILconst_string FileName);
ILboolean ilSaveBmpF(ILHANDLE File);
ILboolean ilSaveBmpL(ILvoid *Lump, ILuint Size);
ILboolean ilSaveCHeader(ILconst_string FileName, const char *InternalName);
ILboolean ilLoadCut(ILconst_string FileName);
ILboolean ilLoadCutF(ILHANDLE File);
ILboolean ilLoadCutL(const ILvoid *Lump, ILuint Size);
ILboolean ilIsValidDcx(ILconst_string FileName);
ILboolean ilIsValidDcxF(ILHANDLE File);
ILboolean ilIsValidDcxL(const ILvoid *Lump, ILuint Size);
ILboolean ilLoadDcx(ILconst_string FileName);
ILboolean ilLoadDcxF(ILHANDLE File);
ILboolean ilLoadDcxL(const ILvoid *Lump, ILuint Size);
ILboolean ilIsValidDds(ILconst_string FileName);
ILboolean ilIsValidDdsF(ILHANDLE File);
ILboolean ilIsValidDdsL(const ILvoid *Lump, ILuint Size);
ILboolean ilLoadDds(ILconst_string FileName);
ILboolean ilLoadDdsF(ILHANDLE File);
ILboolean ilLoadDdsL(const ILvoid *Lump, ILuint Size);
ILboolean ilSaveDds(ILconst_string FileName);
ILboolean ilSaveDdsF(ILHANDLE File);
ILboolean ilSaveDdsL(ILvoid *Lump, ILuint Size);
ILboolean ilLoadDoom(ILconst_string FileName);
ILboolean ilLoadDoomF(ILHANDLE File);
ILboolean ilLoadDoomL(const ILvoid *Lump, ILuint Size);
ILboolean ilLoadDoomFlat(ILconst_string FileName);
ILboolean ilLoadDoomFlatF(ILHANDLE File);
ILboolean ilLoadDoomFlatL(const ILvoid *Lump, ILuint Size);
ILboolean ilIsValidGif(ILconst_string FileName);
ILboolean ilIsValidGifF(ILHANDLE File);
ILboolean ilIsValidGifL(const ILvoid *Lump, ILuint Size);
ILboolean ilLoadGif(ILconst_string FileName);
ILboolean ilLoadGifF(ILHANDLE File);
ILboolean ilLoadGifL(const ILvoid *Lump, ILuint Size);
ILboolean ilIsValidHdr(ILconst_string FileName);
ILboolean ilIsValidHdrF(ILHANDLE File);
ILboolean ilIsValidHdrL(const ILvoid *Lump, ILuint Size);
ILboolean ilLoadHdr(ILconst_string FileName);
ILboolean ilLoadHdrF(ILHANDLE File);
ILboolean ilLoadHdrL(const ILvoid *Lump, ILuint Size);
ILboolean ilLoadIcon(ILconst_string FileName);
ILboolean ilLoadIconF(ILHANDLE File);
ILboolean ilLoadIconL(const ILvoid *Lump, ILuint Size);
ILboolean ilIsValidJpg(ILconst_string FileName);
ILboolean ilIsValidJpgF(ILHANDLE File);
ILboolean ilIsValidJpgL(const ILvoid *Lump, ILuint Size);
ILboolean ilLoadJpeg(ILconst_string FileName);
ILboolean ilLoadJpegF(ILHANDLE File);
ILboolean ilLoadJpegL(const ILvoid *Lump, ILuint Size);
ILboolean ilSaveJpeg(ILconst_string FileName);
ILboolean ilSaveJpegF(ILHANDLE File);
ILboolean ilSaveJpegL(ILvoid *Lump, ILuint Size);
ILboolean ilIsValidLif(ILconst_string FileName);
ILboolean ilIsValidLifF(ILHANDLE File);
ILboolean ilIsValidLifL(const ILvoid *Lump, ILuint Size);
ILboolean ilLoadLif(ILconst_string FileName);
ILboolean ilLoadLifF(ILHANDLE File);
ILboolean ilLoadLifL(const ILvoid *Lump, ILuint Size);
ILboolean ilLoadMdl(ILconst_string FileName);
ILboolean ilLoadMdlF(ILHANDLE File);
ILboolean ilLoadMdlL(const ILvoid *Lump, ILuint Size);
ILboolean ilLoadMng(ILconst_string FileName);
ILboolean ilLoadMngF(ILHANDLE File);
ILboolean ilLoadMngL(const ILvoid *Lump, ILuint Size);
ILboolean ilSaveMng(ILconst_string FileName);
ILboolean ilSaveMngF(ILHANDLE File);
ILboolean ilSaveMngL(ILvoid *Lump, ILuint Size);
ILboolean ilLoadPcd(ILconst_string FileName);
ILboolean ilLoadPcdF(ILHANDLE File);
ILboolean ilLoadPcdL(const ILvoid *Lump, ILuint Size);
ILboolean ilIsValidPcx(ILconst_string FileName);
ILboolean ilIsValidPcxF(ILHANDLE File);
ILboolean ilIsValidPcxL(const ILvoid *Lump, ILuint Size);
ILboolean ilLoadPcx(ILconst_string FileName);
ILboolean ilLoadPcxF(ILHANDLE File);
ILboolean ilLoadPcxL(const ILvoid *Lump, ILuint Size);
ILboolean ilSavePcx(ILconst_string FileName);
ILboolean ilSavePcxF(ILHANDLE File);
ILboolean ilSavePcxL(ILvoid *Lump, ILuint Size);
ILboolean ilIsValidPic(ILconst_string FileName);
ILboolean ilIsValidPicF(ILHANDLE File);
ILboolean ilIsValidPicL(const ILvoid *Lump, ILuint Size);
ILboolean ilLoadPic(ILconst_string FileName);
ILboolean ilLoadPicF(ILHANDLE File);
ILboolean ilLoadPicL(const ILvoid *Lump, ILuint Size);
ILboolean ilLoadPix(ILconst_string FileName);
ILboolean ilLoadPixF(ILHANDLE File);
ILboolean ilLoadPixL(const ILvoid *Lump, ILuint Size);
ILboolean ilIsValidPng(ILconst_string FileName);
ILboolean ilIsValidPngF(ILHANDLE File);
ILboolean ilIsValidPngL(const ILvoid *Lump, ILuint Size);
ILboolean ilLoadPng(ILconst_string FileName);
ILboolean ilLoadPngF(ILHANDLE File);
ILboolean ilLoadPngL(const ILvoid *Lump, ILuint Size);
ILboolean ilSavePng(ILconst_string FileName);
ILboolean ilSavePngF(ILHANDLE File);
ILboolean ilSavePngL(ILvoid *Lump, ILuint Size);
ILboolean ilIsValidPnm(ILconst_string FileName);
ILboolean ilIsValidPnmF(ILHANDLE File);
ILboolean ilIsValidPnmL(const ILvoid *Lump, ILuint Size);
ILboolean ilLoadPnm(ILconst_string FileName);
ILboolean ilLoadPnmF(ILHANDLE File);
ILboolean ilLoadPnmL(const ILvoid *Lump, ILuint Size);
ILboolean ilSavePnm(ILconst_string FileName);
ILboolean ilSavePnmF(ILHANDLE File);
ILboolean ilSavePnmL(ILvoid *Lump, ILuint Size);
ILboolean ilIsValidPsd(ILconst_string FileName);
ILboolean ilIsValidPsdF(ILHANDLE File);
ILboolean ilIsValidPsdL(const ILvoid *Lump, ILuint Size);
ILboolean ilLoadPsd(ILconst_string FileName);
ILboolean ilLoadPsdF(ILHANDLE File);
ILboolean ilLoadPsdL(const ILvoid *Lump, ILuint Size);
ILboolean ilSavePsd(ILconst_string FileName);
ILboolean ilSavePsdF(ILHANDLE File);
ILboolean ilSavePsdL(ILvoid *Lump, ILuint Size);
ILboolean ilIsValidPsp(ILconst_string FileName);
ILboolean ilIsValidPspF(ILHANDLE File);
ILboolean ilIsValidPspL(const ILvoid *Lump, ILuint Size);
ILboolean ilLoadPsp(ILconst_string FileName);
ILboolean ilLoadPspF(ILHANDLE File);
ILboolean ilLoadPspL(const ILvoid *Lump, ILuint Size);
ILboolean ilLoadPxr(ILconst_string FileName);
ILboolean ilLoadPxrF(ILHANDLE File);
ILboolean ilLoadPxrL(const ILvoid *Lump, ILuint Size);
ILboolean ilLoadRaw(ILconst_string FileName);
ILboolean ilLoadRawF(ILHANDLE File);
ILboolean ilLoadRawL(const ILvoid *Lump, ILuint Size);
ILboolean ilSaveRaw(ILconst_string FileName);
ILboolean ilSaveRawF(ILHANDLE File);
ILboolean ilSaveRawL(ILvoid *Lump, ILuint Size);
ILboolean ilIsValidSgi(ILconst_string FileName);
ILboolean ilIsValidSgiF(ILHANDLE File);
ILboolean ilIsValidSgiL(const ILvoid *Lump, ILuint Size);
ILboolean ilLoadSgi(ILconst_string FileName);
ILboolean ilLoadSgiF(ILHANDLE File);
ILboolean ilLoadSgiL(const ILvoid *Lump, ILuint Size);
ILboolean ilSaveSgi(ILconst_string FileName);
ILboolean ilSaveSgiF(ILHANDLE File);
ILboolean ilSaveSgiL(ILvoid *Lump, ILuint Size);
ILboolean ilIsValidTga(ILconst_string FileName);
ILboolean ilIsValidTgaF(ILHANDLE File);
ILboolean ilIsValidTgaL(const ILvoid *Lump, ILuint Size);
ILboolean ilLoadTarga(ILconst_string FileName);
ILboolean ilLoadTargaF(ILHANDLE File);
ILboolean ilLoadTargaL(const ILvoid *Lump, ILuint Size);
ILboolean ilSaveTarga(ILconst_string FileName);
ILboolean ilSaveTargaF(ILHANDLE File);
ILboolean ilSaveTargaL(ILvoid *Lump, ILuint Size);
ILboolean ilIsValidTiff(ILconst_string FileName);
ILboolean ilIsValidTiffF(ILHANDLE File);
ILboolean ilIsValidTiffL(const ILvoid *Lump, ILuint Size);
ILboolean ilLoadTiff(ILconst_string FileName);
ILboolean ilLoadTiffF(ILHANDLE File);
ILboolean ilLoadTiffL(const ILvoid *Lump, ILuint Size);
ILboolean ilSaveTiff(ILconst_string FileName);
ILboolean ilSaveTiffF(ILHANDLE File);
ILboolean ilSaveTiffL(const ILvoid *Lump, ILuint Size);
ILboolean ilLoadWal(ILconst_string FileName);
ILboolean ilLoadWalF(ILHANDLE File);
ILboolean ilLoadWalL(const ILvoid *Lump, ILuint Size);
ILboolean ilLoadXpm(ILconst_string FileName);
ILboolean ilLoadXpmF(ILHANDLE File);
ILboolean ilLoadXpmL(const ILvoid *Lump, ILuint Size);
#endif//INTERNAL_H

View File

@@ -0,0 +1,29 @@
//-----------------------------------------------------------------------------
//
// ImageLib Sources
// Copyright (C) 2000-2002 by Denton Woods
// Last modified: 02/16/2002 <--Y2K Compliant! =]
//
// Filename: src-IL/include/il_jpeg.h
//
// Description: Jpeg (.jpg) functions
//
//-----------------------------------------------------------------------------
#ifndef JPEG_H
#define JPEG_H
#include "il_internal.h"
ILboolean iCheckJpg(ILubyte Header[2]);
ILboolean iIsValidJpg(ILvoid);
#ifndef IL_USE_IJL
ILboolean iLoadJpegInternal(ILvoid);
ILboolean iSaveJpegInternal(ILvoid);
#else
ILboolean iLoadJpegInternal(ILconst_string FileName, ILvoid *Lump, ILuint Size);
ILboolean iSaveJpegInternal(ILconst_string FileName, ILvoid *Lump, ILuint Size);
#endif
#endif//JPEG_H

View File

@@ -0,0 +1,37 @@
//-----------------------------------------------------------------------------
//
// ImageLib Sources
// Copyright (C) 2000-2001 by Denton Woods
// Last modified: 05/25/2001 <--Y2K Compliant! =]
//
// Filename: src-IL/include/il_lif.c
//
// Description: Reads a Homeworld image.
//
//-----------------------------------------------------------------------------
#ifndef LIF_H
#define LIF_H
#include "il_internal.h"
typedef struct LIF_HEAD
{
char Id[8]; //"Willy 7"
ILuint Version; // Version Number (260)
ILuint Flags; // Usually 50
ILuint Width;
ILuint Height;
ILuint PaletteCRC; // CRC of palettes for fast comparison.
ILuint ImageCRC; // CRC of the image.
ILuint PalOffset; // Offset to the palette (not used).
ILuint TeamEffect0; // Team effect offset 0
ILuint TeamEffect1; // Team effect offset 1
} LIF_HEAD;
ILboolean iIsValidLif(ILvoid);
ILboolean iCheckLif(LIF_HEAD *Header);
ILboolean iLoadLifInternal(ILvoid);
#endif//LIF_H

View File

@@ -0,0 +1,242 @@
//-----------------------------------------------------------------------------
//
// ImageLib Sources
// Copyright (C) 2001-2002 by Denton Woods
// Last modified: 05/25/2001 <--Y2K Compliant! =]
//
// Filename: src-IL/include/il_manip.h
//
// Description: Image manipulation
//
//-----------------------------------------------------------------------------
#ifndef MANIP_H
#define MANIP_H
#ifdef _cplusplus
extern "C" {
#endif
ILboolean ilFlipImage(ILvoid);
ILboolean ilMirrorImage(ILvoid); //@JASON New routine created 03/28/2001
//-----------------------------------------------
// Overflow handler for float-to-half conversion;
// generates a hardware floating-point overflow,
// which may be trapped by the operating system.
//-----------------------------------------------
#ifndef NOINLINE
INLINE ILfloat ILAPIENTRY ilFloatToHalfOverflow() {
ILfloat f = 1e10;
ILint j;
for (j = 0; j < 10; j++)
f *= f; // this will overflow before
// the for loop terminates
return f;
}
//-----------------------------------------------------
// Float-to-half conversion -- general case, including
// zeroes, denormalized numbers and exponent overflows.
//-----------------------------------------------------
INLINE ILushort ILAPIENTRY ilFloatToHalf(ILuint i) {
//
// Our floating point number, f, is represented by the bit
// pattern in integer i. Disassemble that bit pattern into
// the sign, s, the exponent, e, and the significand, m.
// Shift s into the position where it will go in in the
// resulting half number.
// Adjust e, accounting for the different exponent bias
// of float and half (127 versus 15).
//
register int s = (i >> 16) & 0x00008000;
register int e = ((i >> 23) & 0x000000ff) - (127 - 15);
register int m = i & 0x007fffff;
//
// Now reassemble s, e and m into a half:
//
if (e <= 0)
{
if (e < -10)
{
//
// E is less than -10. The absolute value of f is
// less than HALF_MIN (f may be a small normalized
// float, a denormalized float or a zero).
//
// We convert f to a half zero.
//
return 0;
}
//
// E is between -10 and 0. F is a normalized float,
// whose magnitude is less than HALF_NRM_MIN.
//
// We convert f to a denormalized half.
//
m = (m | 0x00800000) >> (1 - e);
//
// Round to nearest, round "0.5" up.
//
// Rounding may cause the significand to overflow and make
// our number normalized. Because of the way a half's bits
// are laid out, we don't have to treat this case separately;
// the code below will handle it correctly.
//
if (m & 0x00001000)
m += 0x00002000;
//
// Assemble the half from s, e (zero) and m.
//
return s | (m >> 13);
}
else if (e == 0xff - (127 - 15))
{
if (m == 0)
{
//
// F is an infinity; convert f to a half
// infinity with the same sign as f.
//
return s | 0x7c00;
}
else
{
//
// F is a NAN; we produce a half NAN that preserves
// the sign bit and the 10 leftmost bits of the
// significand of f, with one exception: If the 10
// leftmost bits are all zero, the NAN would turn
// into an infinity, so we have to set at least one
// bit in the significand.
//
m >>= 13;
return s | 0x7c00 | m | (m == 0);
}
}
else
{
//
// E is greater than zero. F is a normalized float.
// We try to convert f to a normalized half.
//
//
// Round to nearest, round "0.5" up
//
if (m & 0x00001000)
{
m += 0x00002000;
if (m & 0x00800000)
{
m = 0; // overflow in significand,
e += 1; // adjust exponent
}
}
//
// Handle exponent overflow
//
if (e > 30)
{
ilFloatToHalfOverflow(); // Cause a hardware floating point overflow;
return s | 0x7c00; // if this returns, the half becomes an
} // infinity with the same sign as f.
//
// Assemble the half from s, e and m.
//
return s | (e << 10) | (m >> 13);
}
}
//stolen from OpenEXR
INLINE ILuint ILAPIENTRY ilHalfToFloat (ILushort y) {
int s = (y >> 15) & 0x00000001;
int e = (y >> 10) & 0x0000001f;
int m = y & 0x000003ff;
if (e == 0)
{
if (m == 0)
{
//
// Plus or minus zero
//
return s << 31;
}
else
{
//
// Denormalized number -- renormalize it
//
while (!(m & 0x00000400))
{
m <<= 1;
e -= 1;
}
e += 1;
m &= ~0x00000400;
}
}
else if (e == 31)
{
if (m == 0)
{
//
// Positive or negative infinity
//
return (s << 31) | 0x7f800000;
}
else
{
//
// Nan -- preserve sign and significand bits
//
return (s << 31) | 0x7f800000 | (m << 13);
}
}
//
// Normalized number
//
e = e + (127 - 15);
m = m << 13;
//
// Assemble s, e and m.
//
return (s << 31) | (e << 23) | m;
}
#endif //NOINLINE
#ifdef _cplusplus
}
#endif
#endif//MANIP_H

View File

@@ -0,0 +1,28 @@
//-----------------------------------------------------------------------------
//
// ImageLib Sources
// Copyright (C) 2000-2002 by Denton Woods
// Last modified: 05/25/2001 <--Y2K Compliant! =]
//
// Filename: src-IL/include/il_mdl.h
//
// Description: Reads a Half-Life model file.
//
//-----------------------------------------------------------------------------
#ifndef MD2_H
#define MD2_H
#include "il_internal.h"
typedef struct TEX_HEAD
{
char Name[64];
ILuint Flags;
ILuint Width;
ILuint Height;
ILuint Offset;
} TEX_HEAD;
#endif//MD2_H

View File

@@ -0,0 +1,54 @@
//-----------------------------------------------------------------------------
//
// ImageLib Sources
// Copyright (C) 2000-2002 by Denton Woods
// Last modified: 05/25/2001 <--Y2K Compliant! =]
//
// Filename: src-IL/include/il_pal.h
//
// Description: Loads palettes from different file formats
//
//-----------------------------------------------------------------------------
#ifndef IL_PAL_H
#define IL_PAL_H
#include "il_internal.h"
#define BUFFLEN 256
#define PALBPP 3
#ifdef _MSC_VER
#pragma pack(push, packed_struct, 1)
#endif
typedef struct HALOHEAD
{
ILushort Id; // 'AH'
ILshort Version;
ILshort Size;
ILbyte Filetype;
ILbyte Subtype;
//ILshort Brdid, Grmode;
ILint Ignored;
ILushort MaxIndex; // Colors = maxindex + 1
ILushort MaxRed;
ILushort MaxGreen;
ILushort MaxBlue;
/*ILbyte Signature[8];
ILbyte Filler[12];*/
ILbyte Filler[20]; // Always 0 by PSP 4
} IL_PACKSTRUCT HALOHEAD;
#ifdef _MSC_VER
#pragma pack(pop, packed_struct)
#endif
ILboolean ilLoadJascPal(ILconst_string FileName);
ILboolean ilSaveJascPal(ILconst_string FileName);
char *iFgetw(ILubyte *Buff, ILint MaxLen, FILE *File);
ILboolean ilLoadHaloPal(ILconst_string FileName);
ILboolean ilLoadColPal(ILconst_string FileName);
ILboolean ilLoadActPal(ILconst_string FileName);
ILboolean ilLoadPltPal(ILconst_string FileName);
#endif//IL_PAL_H

View File

@@ -0,0 +1,58 @@
//-----------------------------------------------------------------------------
//
// ImageLib Sources
// Copyright (C) 2000-2002 by Denton Woods
// Last modified: 05/25/2001 <--Y2K Compliant! =]
//
// Filename: src-IL/include/il_pcx.h
//
// Description: Reads and writes from/to a .pcx file.
//
//-----------------------------------------------------------------------------
#ifndef PCX_H
#define PCX_H
#include "il_internal.h"
#ifdef _WIN32
#pragma pack(push, packed_struct, 1)
#endif
typedef struct PCXHEAD
{
ILubyte Manufacturer;
ILubyte Version;
ILubyte Encoding;
ILubyte Bpp;
ILushort Xmin, Ymin, Xmax, Ymax;
ILushort HDpi;
ILushort VDpi;
ILubyte ColMap[48];
ILubyte Reserved;
ILubyte NumPlanes;
ILushort Bps;
ILushort PaletteInfo;
ILushort HScreenSize;
ILushort VScreenSize;
ILubyte Filler[54];
} IL_PACKSTRUCT PCXHEAD;
#ifdef _WIN32
#pragma pack(pop, packed_struct)
#endif
// For checking and reading
ILboolean iIsValidPcx(ILvoid);
ILboolean iCheckPcx(PCXHEAD *Header);
ILboolean iLoadPcxInternal(ILvoid);
ILboolean iSavePcxInternal(ILvoid);
ILboolean iUncompressPcx(PCXHEAD *Header);
ILboolean iUncompressSmall(PCXHEAD *Header);
// For writing
ILuint encput(ILubyte byt, ILubyte cnt);
ILuint encLine(ILubyte *inBuff, ILint inLen, ILubyte Stride);
#endif//PCX_H

View File

@@ -0,0 +1,79 @@
//-----------------------------------------------------------------------------
//
// ImageLib Sources
// Copyright (C) 2000-2002 by Denton Woods
// Last modified: 05/21/2002 <--Y2K Compliant! =]
//
// Filename: src-IL/include/il_pic.h
//
// Description: Softimage Pic (.pic) functions
//
//-----------------------------------------------------------------------------
#ifndef PIC_H
#define PIC_H
#include "il_internal.h"
#ifdef _MSC_VER
#pragma pack(push, packed_struct, 1)
#endif
typedef struct PIC_HEAD
{
ILint Magic; // PIC_MAGIC_NUMBER
ILfloat Version; // Version of format
ILbyte Comment[80]; // Prototype description
ILbyte Id[4]; // 'PICT'
ILshort Width; // Image width, in pixels
ILshort Height; // Image height, in pixels
ILfloat Ratio; // Pixel aspect ratio
ILshort Fields; // Picture field type
ILshort Padding; // Unused
} IL_PACKSTRUCT PIC_HEAD;
typedef struct CHANNEL
{
ILubyte Size;
ILubyte Type;
ILubyte Chan;
ILvoid *Next;
} CHANNEL;
#ifdef _MSC_VER
#pragma pack(pop, packed_struct)
#endif
// Data type
#define PIC_UNSIGNED_INTEGER 0x00
#define PIC_SIGNED_INTEGER 0x10 // XXX: Not implemented
#define PIC_SIGNED_FLOAT 0x20 // XXX: Not implemented
// Compression type
#define PIC_UNCOMPRESSED 0x00
#define PIC_PURE_RUN_LENGTH 0x01
#define PIC_MIXED_RUN_LENGTH 0x02
// CHANNEL types (OR'd)
#define PIC_RED_CHANNEL 0x80
#define PIC_GREEN_CHANNEL 0x40
#define PIC_BLUE_CHANNEL 0x20
#define PIC_ALPHA_CHANNEL 0x10
#define PIC_SHADOW_CHANNEL 0x08 // XXX: Not implemented
#define PIC_DEPTH_CHANNEL 0x04 // XXX: Not implemented
#define PIC_AUXILIARY_1_CHANNEL 0x02 // XXX: Not implemented
#define PIC_AUXILIARY_2_CHANNEL 0x01 // XXX: Not implemented
ILboolean iIsValidPic(ILvoid);
ILboolean iCheckPic(PIC_HEAD *Header);
ILboolean iLoadPicInternal(ILvoid);
ILboolean readScanlines(ILuint *image, ILint width, ILint height, CHANNEL *channel, ILuint alpha);
ILuint readScanline(ILubyte *scan, ILint width, CHANNEL *channel, ILint bytes);
ILboolean channelReadRaw(ILubyte *scan, ILint width, ILint noCol, ILint *off, ILint bytes);
ILboolean channelReadPure(ILubyte *scan, ILint width, ILint noCol, ILint *off, ILint bytes);
ILboolean channelReadMixed(ILubyte *scan, ILint width, ILint noCol, ILint *off, ILint bytes);
#endif//PIC_H

View File

@@ -0,0 +1,46 @@
//-----------------------------------------------------------------------------
//
// ImageLib Sources
// Copyright (C) 2000-2002 by Denton Woods
// Last modified: 05/25/2001 <--Y2K Compliant! =]
//
// Filename: src-IL/include/il_pnm.h
//
// Description: Reads/writes to/from pbm/pgm/ppm formats
//
//-----------------------------------------------------------------------------
#ifndef PPMPGM_H
#define PPMPGM_H
#include "il_internal.h"
#define IL_PBM_ASCII 0x0001
#define IL_PGM_ASCII 0x0002
#define IL_PPM_ASCII 0x0003
#define IL_PBM_BINARY 0x0004
#define IL_PGM_BINARY 0x0005
#define IL_PPM_BINARY 0x0006
typedef struct PPMINFO
{
ILenum Type;
ILuint Width;
ILuint Height;
ILuint MaxColour;
ILubyte Bpp;
} PPMINFO;
ILboolean iIsValidPnm(ILvoid);
ILboolean iCheckPnm(char Header[2]);
ILboolean iLoadPnmInternal(ILvoid);
ILboolean iSavePnmInternal(ILvoid);
ILimage *ilReadAsciiPpm(PPMINFO *Info);
ILimage *ilReadBinaryPpm(PPMINFO *Info);
ILimage *ilReadBitPbm(PPMINFO *Info);
ILboolean iGetWord(ILvoid);
ILvoid PbmMaximize(ILimage *Image);
#endif//PPMPGM_H

View File

@@ -0,0 +1,56 @@
//-----------------------------------------------------------------------------
//
// ImageLib Sources
// Copyright (C) 2000-2001 by Denton Woods
// Last modified: 01/23/2001 <--Y2K Compliant! =]
//
// Filename: src-IL/include/il_il_psd.c
//
// Description: Reads from a PhotoShop (.psd) file.
//
//-----------------------------------------------------------------------------
#ifndef PSD_H
#define PSD_H
#include "il_internal.h"
#ifdef _MSC_VER
#pragma pack(push, packed_struct, 1)
#endif
typedef struct PSDHEAD
{
ILubyte Signature[4];
ILushort Version;
ILubyte Reserved[6];
ILushort Channels;
ILuint Height;
ILuint Width;
ILushort Depth;
ILushort Mode;
} IL_PACKSTRUCT PSDHEAD;
#ifdef _MSC_VER
#pragma pack(pop, packed_struct)
#endif
ILushort ChannelNum;
ILboolean iIsValidPsd(ILvoid);
ILboolean iCheckPsd(PSDHEAD *Header);
ILboolean iLoadPsdInternal(ILvoid);
ILboolean ReadPsd(PSDHEAD *Head);
ILboolean ReadGrey(PSDHEAD *Head);
ILboolean ReadIndexed(PSDHEAD *Head);
ILboolean ReadRGB(PSDHEAD *Head);
ILboolean ReadCMYK(PSDHEAD *Head);
ILuint *GetCompChanLen(PSDHEAD *Head);
ILboolean PsdGetData(PSDHEAD *Head, ILvoid *Buffer, ILboolean Compressed);
ILboolean ParseResources(ILuint ResourceSize, ILubyte *Resources);
ILboolean GetSingleChannel(PSDHEAD *Head, ILubyte *Buffer, ILboolean Compressed);
ILboolean iSavePsdInternal(ILvoid);
#endif//PSD_H

View File

@@ -0,0 +1,250 @@
//-----------------------------------------------------------------------------
//
// ImageLib Sources
// Copyright (C) 2000-2002 by Denton Woods
// Last modified: 05/02/2002 <--Y2K Compliant! =]
//
// Filename: src-IL/include/il_psp.h
//
// Description: Reads a Paint Shop Pro file.
//
//-----------------------------------------------------------------------------
#ifndef PSP_H
#define PSP_H
#include "il_internal.h"
// Block identifiers
enum PSPBlockID {
PSP_IMAGE_BLOCK = 0, // (0) General Image Attributes Block (main)
PSP_CREATOR_BLOCK, // (1) Creator Data Block (main)
PSP_COLOR_BLOCK, // (2) Color Palette Block (main and sub)
PSP_LAYER_START_BLOCK, // (3) Layer Bank Block (main)
PSP_LAYER_BLOCK, // (4) Layer Block (sub)
PSP_CHANNEL_BLOCK, // (5) Channel Block (sub)
PSP_SELECTION_BLOCK, // (6) Selection Block (main)
PSP_ALPHA_BANK_BLOCK, // (7) Alpha Bank Block (main)
PSP_ALPHA_CHANNEL_BLOCK, // (8) Alpha Channel Block (sub)
PSP_COMPOSITE_IMAGE_BLOCK, // (9) Composite Image Block (sub)
PSP_EXTENDED_DATA_BLOCK, // (10) Extended Data Block (main)
PSP_TUBE_BLOCK, // (11) Picture Tube Data Block (main)
PSP_ADJUSTMENT_EXTENSION_BLOCK, // (12) Adjustment Layer Block (sub)
PSP_VECTOR_EXTENSION_BLOCK, // (13) Vector Layer Block (sub)
PSP_SHAPE_BLOCK, // (14) Vector Shape Block (sub)
PSP_PAINTSTYLE_BLOCK, // (15) Paint Style Block (sub)
PSP_COMPOSITE_IMAGE_BANK_BLOCK, // (16) Composite Image Bank (main)
PSP_COMPOSITE_ATTRIBUTES_BLOCK, // (17) Composite Image Attr. (sub)
PSP_JPEG_BLOCK, // (18) JPEG Image Block (sub)
PSP_LINESTYLE_BLOCK, // (19) Line Style Block (sub)
PSP_TABLE_BANK_BLOCK, // (20) Table Bank Block (main)
PSP_TABLE_BLOCK, // (21) Table Block (sub)
PSP_PAPER_BLOCK, // (22) Vector Table Paper Block (sub)
PSP_PATTERN_BLOCK, // (23) Vector Table Pattern Block (sub)
};
// Bitmap type
enum PSPDIBType {
PSP_DIB_IMAGE = 0, // Layer color bitmap
PSP_DIB_TRANS_MASK, // Layer transparency mask bitmap
PSP_DIB_USER_MASK, // Layer user mask bitmap
PSP_DIB_SELECTION, // Selection mask bitmap
PSP_DIB_ALPHA_MASK, // Alpha channel mask bitmap
PSP_DIB_THUMBNAIL // Thumbnail bitmap
};
// Channel types
enum PSPChannelType {
PSP_CHANNEL_COMPOSITE = 0, // Channel of single channel bitmap
PSP_CHANNEL_RED, // Red channel of 24 bit bitmap
PSP_CHANNEL_GREEN, // Green channel of 24 bit bitmap
PSP_CHANNEL_BLUE // Blue channel of 24 bit bitmap
};
// Possible metrics used to measure resolution
enum PSP_METRIC {
PSP_METRIC_UNDEFINED = 0, // Metric unknown
PSP_METRIC_INCH, // Resolution is in inches
PSP_METRIC_CM // Resolution is in centimeters
};
// Possible types of compression.
enum PSPCompression {
PSP_COMP_NONE = 0, // No compression
PSP_COMP_RLE, // RLE compression
PSP_COMP_LZ77, // LZ77 compression
PSP_COMP_JPEG // JPEG compression (only used by thumbnail and composite image)
};
// Picture tube placement mode.
enum TubePlacementMode {
tpmRandom, // Place tube images in random intervals
tpmConstant // Place tube images in constant intervals
};
// Picture tube selection mode.
enum TubeSelectionMode {
tsmRandom, // Randomly select the next image in tube to display
tsmIncremental, // Select each tube image in turn
tsmAngular, // Select image based on cursor direction
tsmPressure, // Select image based on pressure (from pressure-sensitive pad)
tsmVelocity // Select image based on cursor speed
};
// Extended data field types.
enum PSPExtendedDataID {
PSP_XDATA_TRNS_INDEX = 0 // Transparency index field
};
// Creator field types.
enum PSPCreatorFieldID {
PSP_CRTR_FLD_TITLE = 0, // Image document title field
PSP_CRTR_FLD_CRT_DATE, // Creation date field
PSP_CRTR_FLD_MOD_DATE, // Modification date field
PSP_CRTR_FLD_ARTIST, // Artist name field
PSP_CRTR_FLD_CPYRGHT, // Copyright holder name field
PSP_CRTR_FLD_DESC, // Image document description field
PSP_CRTR_FLD_APP_ID, // Creating app id field
PSP_CRTR_FLD_APP_VER, // Creating app version field
};
// Creator application identifiers.
enum PSPCreatorAppID {
PSP_CREATOR_APP_UNKNOWN = 0, // Creator application unknown
PSP_CREATOR_APP_PAINT_SHOP_PRO // Creator is Paint Shop Pro
};
// Layer types.
enum PSPLayerType {
PSP_LAYER_NORMAL = 0, // Normal layer
PSP_LAYER_FLOATING_SELECTION // Floating selection layer
};
// Truth values.
/*enum PSP_BOOLEAN {
FALSE = 0,
TRUE
};*/
#ifdef _MSC_VER
#pragma pack(push, packed_struct, 1)
#endif
typedef struct PSPRECT
{
ILuint x1,y1,x2,y2;
} IL_PACKSTRUCT PSPRECT;
typedef struct PSPHEAD
{
char FileSig[32];
ILushort MajorVersion;
ILushort MinorVersion;
} IL_PACKSTRUCT PSPHEAD;
typedef struct BLOCKHEAD
{
ILubyte HeadID[4];
ILushort BlockID;
ILuint BlockLen;
} IL_PACKSTRUCT BLOCKHEAD;
typedef struct GENATT_CHUNK
{
ILint Width;
ILint Height;
ILdouble Resolution;
ILubyte ResMetric;
ILushort Compression;
ILushort BitDepth;
ILushort PlaneCount;
ILuint ColourCount;
ILubyte GreyscaleFlag;
ILuint SizeOfImage;
ILint ActiveLayer;
ILushort LayerCount;
ILuint GraphicContents;
} IL_PACKSTRUCT GENATT_CHUNK;
typedef struct LAYERINFO_CHUNK
{
ILubyte LayerType;
PSPRECT ImageRect;
PSPRECT SavedImageRect;
ILubyte Opacity;
ILubyte BlendingMode;
ILubyte LayerFlags;
ILubyte TransProtFlag;
ILubyte LinkID;
PSPRECT MaskRect;
PSPRECT SavedMaskRect;
ILubyte MaskLinked;
ILubyte MaskDisabled;
ILubyte InvertMaskBlend;
ILushort BlendRange;
ILubyte SourceBlend1[4];
ILubyte DestBlend1[4];
ILubyte SourceBlend2[4];
ILubyte DestBlend2[4];
ILubyte SourceBlend3[4];
ILubyte DestBlend3[4];
ILubyte SourceBlend4[4];
ILubyte DestBlend4[4];
ILubyte SourceBlend5[4];
ILubyte DestBlend5[4];
} IL_PACKSTRUCT LAYERINFO_CHUNK;
typedef struct LAYERBITMAP_CHUNK
{
ILushort NumBitmaps;
ILushort NumChannels;
} IL_PACKSTRUCT LAYERBITMAP_CHUNK;
typedef struct CHANNEL_CHUNK
{
ILuint CompLen;
ILuint Length;
ILushort BitmapType;
ILushort ChanType;
} IL_PACKSTRUCT CHANNEL_CHUNK;
typedef struct ALPHAINFO_CHUNK
{
PSPRECT AlphaRect;
PSPRECT AlphaSavedRect;
} IL_PACKSTRUCT ALPHAINFO_CHUNK;
typedef struct ALPHA_CHUNK
{
ILushort BitmapCount;
ILushort ChannelCount;
} IL_PACKSTRUCT ALPHA_CHUNK;
#ifdef _MSC_VER
#pragma pack(pop, packed_struct)
#endif
// Function definitions
ILboolean iLoadPspInternal(ILvoid);
ILboolean iCheckPsp(ILvoid);
ILboolean iIsValidPsp(ILvoid);
ILboolean ReadGenAttributes(ILvoid);
ILboolean ParseChunks(ILvoid);
ILboolean ReadLayerBlock(ILuint BlockLen);
ILboolean ReadAlphaBlock(ILuint BlockLen);
ILubyte *GetChannel(ILvoid);
ILboolean UncompRLE(ILubyte *CompData, ILubyte *Data, ILuint CompLen);
ILboolean ReadPalette(ILuint BlockLen);
ILboolean AssembleImage(ILvoid);
ILboolean Cleanup(ILvoid);
#endif//PSP_H

View File

@@ -0,0 +1,276 @@
//-----------------------------------------------------------------------------
//
// ImageLib Sources
// Copyright (C) 2000-2002 by Denton Woods
// Last modified: 05/25/2001 <--Y2K Compliant! =]
//
// Filename: src-IL/include/il_q2pal.h
//
// Description: The default Quake2 palette
//
//-----------------------------------------------------------------------------
#ifndef Q2PAL_H
#define Q2PAL_H
#define IL_Q2PAL_SIZE 768
ILubyte ilDefaultQ2Pal[IL_Q2PAL_SIZE] = {
0, 0, 0,
15, 15, 15,
31, 31, 31,
47, 47, 47,
63, 63, 63,
75, 75, 75,
91, 91, 91,
107, 107, 107,
123, 123, 123,
139, 139, 139,
155, 155, 155,
171, 171, 171,
187, 187, 187,
203, 203, 203,
219, 219, 219,
235, 235, 235,
99, 75, 35,
91, 67, 31,
83, 63, 31,
79, 59, 27,
71, 55, 27,
63, 47, 23,
59, 43, 23,
51, 39, 19,
47, 35, 19,
43, 31, 19,
39, 27, 15,
35, 23, 15,
27, 19, 11,
23, 15, 11,
19, 15, 7,
15, 11, 7,
95, 95, 111,
91, 91, 103,
91, 83, 95,
87, 79, 91,
83, 75, 83,
79, 71, 75,
71, 63, 67,
63, 59, 59,
59, 55, 55,
51, 47, 47,
47, 43, 43,
39, 39, 39,
35, 35, 35,
27, 27, 27,
23, 23, 23,
19, 19, 19,
143, 119, 83,
123, 99, 67,
115, 91, 59,
103, 79, 47,
207, 151, 75,
167, 123, 59,
139, 103, 47,
111, 83, 39,
235, 159, 39,
203, 139, 35,
175, 119, 31,
147, 99, 27,
119, 79, 23,
91, 59, 15,
63, 39, 11,
35, 23, 7,
167, 59, 43,
159, 47, 35,
151, 43, 27,
139, 39, 19,
127, 31, 15,
115, 23, 11,
103, 23, 7,
87, 19, 0,
75, 15, 0,
67, 15, 0,
59, 15, 0,
51, 11, 0,
43, 11, 0,
35, 11, 0,
27, 7, 0,
19, 7, 0,
123, 95, 75,
115, 87, 67,
107, 83, 63,
103, 79, 59,
95, 71, 55,
87, 67, 51,
83, 63, 47,
75, 55, 43,
67, 51, 39,
63, 47, 35,
55, 39, 27,
47, 35, 23,
39, 27, 19,
31, 23, 15,
23, 15, 11,
15, 11, 7,
111, 59, 23,
95, 55, 23,
83, 47, 23,
67, 43, 23,
55, 35, 19,
39, 27, 15,
27, 19, 11,
15, 11, 7,
179, 91, 79,
191, 123, 111,
203, 155, 147,
215, 187, 183,
203, 215, 223,
179, 199, 211,
159, 183, 195,
135, 167, 183,
115, 151, 167,
91, 135, 155,
71, 119, 139,
47, 103, 127,
23, 83, 111,
19, 75, 103,
15, 67, 91,
11, 63, 83,
7, 55, 75,
7, 47, 63,
7, 39, 51,
0, 31, 43,
0, 23, 31,
0, 15, 19,
0, 7, 11,
0, 0, 0,
139, 87, 87,
131, 79, 79,
123, 71, 71,
115, 67, 67,
107, 59, 59,
99, 51, 51,
91, 47, 47,
87, 43, 43,
75, 35, 35,
63, 31, 31,
51, 27, 27,
43, 19, 19,
31, 15, 15,
19, 11, 11,
11, 7, 7,
0, 0, 0,
151, 159, 123,
143, 151, 115,
135, 139, 107,
127, 131, 99,
119, 123, 95,
115, 115, 87,
107, 107, 79,
99, 99, 71,
91, 91, 67,
79, 79, 59,
67, 67, 51,
55, 55, 43,
47, 47, 35,
35, 35, 27,
23, 23, 19,
15, 15, 11,
159, 75, 63,
147, 67, 55,
139, 59, 47,
127, 55, 39,
119, 47, 35,
107, 43, 27,
99, 35, 23,
87, 31, 19,
79, 27, 15,
67, 23, 11,
55, 19, 11,
43, 15, 7,
31, 11, 7,
23, 7, 0,
11, 0, 0,
0, 0, 0,
119, 123, 207,
111, 115, 195,
103, 107, 183,
99, 99, 167,
91, 91, 155,
83, 87, 143,
75, 79, 127,
71, 71, 115,
63, 63, 103,
55, 55, 87,
47, 47, 75,
39, 39, 63,
35, 31, 47,
27, 23, 35,
19, 15, 23,
11, 7, 7,
155, 171, 123,
143, 159, 111,
135, 151, 99,
123, 139, 87,
115, 131, 75,
103, 119, 67,
95, 111, 59,
87, 103, 51,
75, 91, 39,
63, 79, 27,
55, 67, 19,
47, 59, 11,
35, 47, 7,
27, 35, 0,
19, 23, 0,
11, 15, 0,
0, 255, 0,
35, 231, 15,
63, 211, 27,
83, 187, 39,
95, 167, 47,
95, 143, 51,
95, 123, 51,
255, 255, 255,
255, 255, 211,
255, 255, 167,
255, 255, 127,
255, 255, 83,
255, 255, 39,
255, 235, 31,
255, 215, 23,
255, 191, 15,
255, 171, 7,
255, 147, 0,
239, 127, 0,
227, 107, 0,
211, 87, 0,
199, 71, 0,
183, 59, 0,
171, 43, 0,
155, 31, 0,
143, 23, 0,
127, 15, 0,
115, 7, 0,
95, 0, 0,
71, 0, 0,
47, 0, 0,
27, 0, 0,
239, 0, 0,
55, 55, 255,
255, 0, 0,
0, 0, 255,
43, 43, 35,
27, 27, 23,
19, 19, 15,
235, 151, 127,
195, 115, 83,
159, 87, 51,
123, 63, 27,
235, 211, 199,
199, 171, 155,
167, 139, 119,
135, 107, 87,
159, 91, 83
};
#endif//Q2PAL_H

View File

@@ -0,0 +1,41 @@
//-----------------------------------------------------------------------------
//
// ImageLib Sources
// Copyright (C) 2000-2002 by Denton Woods
// Last modified: 05/25/2001 <--Y2K Compliant! =]
//
// Filename: src-IL/include/il_register.h
//
// Description: Allows the caller to specify user-defined callback functions
// to open files DevIL does not support, to parse files
// differently, or anything else a person can think up.
//
//-----------------------------------------------------------------------------
#ifndef REGISTER_H
#define REGISTER_H
#include "il_internal.h"
typedef struct iFormatL
{
ILstring Ext;
IL_LOADPROC Load;
struct iFormatL *Next;
} iFormatL;
typedef struct iFormatS
{
ILstring Ext;
IL_SAVEPROC Save;
struct iFormatS *Next;
} iFormatS;
#define I_LOAD_FUNC 0
#define I_SAVE_FUNC 1
ILboolean iRegisterLoad(ILconst_string FileName);
ILboolean iRegisterSave(ILconst_string FileName);
#endif//REGISTER_H

View File

@@ -0,0 +1,92 @@
//-----------------------------------------------------------------------------
//
// ImageLib Sources
// Copyright (C) 2000-2002 by Denton Woods
// Last modified: 05/25/2001 <--Y2K Compliant! =]
//
// Filename: src-IL/include/il_rle.h
//
// Description: Functions for run-length encoding
//
//-----------------------------------------------------------------------------
#ifndef RLE_H
#define RLE_H
#include "il_internal.h"
#define TGA_MAX_RUN 128
#define SGI_MAX_RUN 127
#define BMP_MAX_RUN 127
#ifdef IL_RLE_C
#undef NOINLINE
#undef INLINE
#define INLINE
#endif
#ifndef NOINLINE
INLINE ILuint GetPix(ILubyte *p, ILuint bpp) {
ILuint Pixel;
Pixel = (ILuint)*p++;
while( bpp-- > 1 ) {
Pixel <<= 8;
Pixel |= (ILuint)*p++;
}
return Pixel;
}
INLINE ILint CountDiffPixels(ILubyte *p, ILuint bpp, ILuint pixCnt) {
ILuint pixel;
ILuint nextPixel = 0;
ILint n;
n = 0;
if (pixCnt == 1)
return pixCnt;
pixel = GetPix(p, bpp);
while (pixCnt > 1) {
p += bpp;
nextPixel = GetPix(p, bpp);
if (nextPixel == pixel)
break;
pixel = nextPixel;
++n;
--pixCnt;
}
if (nextPixel == pixel)
return n;
return n + 1;
}
INLINE ILint CountSamePixels(ILubyte *p, ILuint bpp, ILuint pixCnt) {
ILuint pixel;
ILuint nextPixel;
ILint n;
n = 1;
pixel = GetPix(p, bpp);
pixCnt--;
while (pixCnt > 0) {
p += bpp;
nextPixel = GetPix(p, bpp);
if (nextPixel != pixel)
break;
++n;
--pixCnt;
}
return n;
}
#endif
ILuint GetPix(ILubyte *p, ILuint bpp);
ILint CountDiffPixels(ILubyte *p, ILuint bpp, ILuint pixCnt);
ILint CountSamePixels(ILubyte *p, ILuint bpp, ILuint pixCnt);
#endif//RLE_H

View File

@@ -0,0 +1,66 @@
//-----------------------------------------------------------------------------
//
// ImageLib Sources
// Copyright (C) 2000-2002 by Denton Woods
// Last modified: 05/25/2002 <--Y2K Compliant! =]
//
// Filename: src-IL/include/sgi.h
//
// Description: Reads from and writes to SGI graphics files.
//
//-----------------------------------------------------------------------------
#ifndef SGI_H
#define SGI_H
#include "il_internal.h"
typedef struct iSgiHeader
{
ILshort MagicNum; // IRIS image file magic number
ILbyte Storage; // Storage format
ILbyte Bpc; // Number of bytes per pixel channel
ILushort Dim; // Number of dimensions
// 1: single channel, 1 row with XSize pixels
// 2: single channel, XSize*YSize pixels
// 3: ZSize channels, XSize*YSize pixels
ILushort XSize; // X size in pixels
ILushort YSize; // Y size in pixels
ILushort ZSize; // Number of channels
ILint PixMin; // Minimum pixel value
ILint PixMax; // Maximum pixel value
ILint Dummy1; // Ignored
ILbyte Name[80]; // Image name
ILint ColMap; // Colormap ID
ILbyte Dummy[404]; // Ignored
} IL_PACKSTRUCT iSgiHeader;
// Sgi format #define's
#define SGI_VERBATIM 0
#define SGI_RLE 1
#define SGI_MAGICNUM 474
// Sgi colormap types
#define SGI_COLMAP_NORMAL 0
#define SGI_COLMAP_DITHERED 1
#define SGI_COLMAP_SCREEN 2
#define SGI_COLMAP_COLMAP 3
// Internal functions
ILboolean iIsValidSgi(ILvoid);
ILboolean iCheckSgi(iSgiHeader *Header);
ILboolean iLoadSgiInternal(ILvoid);
ILboolean iSaveSgiInternal(ILvoid);
ILvoid iExpandScanLine(ILubyte *Dest, ILubyte *Src, ILuint Bpc);
ILint iGetScanLine(ILubyte *ScanLine, iSgiHeader *Head, ILuint Length);
ILint iGetScanLineFast(ILubyte *ScanLine, iSgiHeader *Head, ILuint Length, ILubyte*);
ILvoid sgiSwitchData(ILubyte *Data, ILuint SizeOfData);
ILboolean iNewSgi(iSgiHeader *Head);
ILboolean iReadNonRleSgi(iSgiHeader *Head);
ILboolean iReadRleSgi(iSgiHeader *Head);
ILboolean iSaveRleSgi(ILubyte *Data, ILuint w, ILuint h, ILuint numChannels, ILuint bps);
#endif//SGI_H

View File

@@ -0,0 +1,43 @@
//-----------------------------------------------------------------------------
//
// ImageLib Sources
// Copyright (C) 2000-2002 by Denton Woods
// Last modified: 05/25/2001 <--Y2K Compliant! =]
//
// Filename: src-IL/include/il_stack.h
//
// Description: The main image stack
//
//-----------------------------------------------------------------------------
#ifndef IMAGESTACK_H
#define IMAGESTACK_H
#include "il_internal.h"
// Just a guess...seems large enough
#define I_STACK_INCREMENT 1024
typedef struct iFree
{
ILuint Name;
void *Next;
} iFree;
// Internal functions
ILboolean iEnlargeStack(ILvoid);
ILvoid iFreeMem(ILvoid);
// Globals for il_stack.c
ILuint StackSize = 0;
ILuint LastUsed = 0;
ILuint CurName = 0;
ILimage **ImageStack = NULL;
iFree *FreeNames = NULL;
ILboolean OnExit = IL_FALSE;
ILboolean ParentImage = IL_TRUE;
#endif//IMAGESTACK_H

View File

@@ -0,0 +1,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

View File

@@ -0,0 +1,109 @@
//-----------------------------------------------------------------------------
//
// ImageLib Sources
// Copyright (C) 2000-2002 by Denton Woods
// Last modified: 05/25/2001 <--Y2K Compliant! =]
//
// Filename: src-IL/include/il_targa.h
//
// Description: Targa (.tga) functions
//
//-----------------------------------------------------------------------------
#ifndef TARGA_H
#define TARGA_H
#include "il_internal.h"
#ifdef _MSC_VER
#pragma pack(push, tga_struct, 1)
#elif defined(MACOSX) || defined(__GNUC__)
#pragma pack(1)
#endif
typedef struct TARGAHEAD
{
ILubyte IDLen;
ILubyte ColMapPresent;
ILubyte ImageType;
ILshort FirstEntry;
ILshort ColMapLen;
ILubyte ColMapEntSize;
ILshort OriginX;
ILshort OriginY;
ILushort Width;
ILushort Height;
ILubyte Bpp;
ILubyte ImageDesc;
} IL_PACKSTRUCT TARGAHEAD;
typedef struct TARGAFOOTER
{
ILuint ExtOff; // Extension Area Offset
ILuint DevDirOff; // Developer Directory Offset
ILbyte Signature[16]; // TRUEVISION-XFILE
ILbyte Reserved; // ASCII period '.'
ILbyte NullChar; // NULL
} IL_PACKSTRUCT TARGAFOOTER;
#if defined(MACOSX) || defined(__GNUC__)
#pragma pack()
#elif _MSC_VER
#pragma pack(pop, tga_struct)
#endif
#define TGA_EXT_LEN 495
typedef struct TARGAEXT
{
// Dev Directory
// We don't mess with this
// Extension Area
ILshort Size; // should be TGA_EXT_LEN
ILbyte AuthName[41]; // the image author's name
ILbyte AuthComments[324]; // author's comments
ILshort Month, Day, Year, Hour, Minute, Second; // internal date of file
ILbyte JobID[41]; // the job description (if any)
ILshort JobHour, JobMin, JobSecs; // the job's time
ILbyte SoftwareID[41]; // the software that created this
ILshort SoftwareVer; // the software version number * 100
ILbyte SoftwareVerByte; // the software version letter
ILint KeyColor; // the transparent colour
} TARGAEXT;
// Different Targa formats
#define TGA_NO_DATA 0
#define TGA_COLMAP_UNCOMP 1
#define TGA_UNMAP_UNCOMP 2
#define TGA_BW_UNCOMP 3
#define TGA_COLMAP_COMP 9
#define TGA_UNMAP_COMP 10
#define TGA_BW_COMP 11
// Targa origins
#define IMAGEDESC_ORIGIN_MASK 0x30
#define IMAGEDESC_TOPLEFT 0x20
#define IMAGEDESC_BOTLEFT 0x00
#define IMAGEDESC_BOTRIGHT 0x10
#define IMAGEDESC_TOPRIGHT 0x30
// Internal functions
ILboolean iIsValidTarga();
ILboolean iGetTgaHead(TARGAHEAD *Header);
ILboolean iCheckTarga(TARGAHEAD *Header);
ILboolean iLoadTargaInternal(ILvoid);
ILboolean iSaveTargaInternal(ILvoid);
//ILvoid iMakeString(char *Str);
ILboolean iReadBwTga(TARGAHEAD *Header);
ILboolean iReadColMapTga(TARGAHEAD *Header);
ILboolean iReadUnmapTga(TARGAHEAD *Header);
ILboolean iUncompressTgaData(ILimage *Image);
ILboolean i16BitTarga(ILimage *Image);
ILvoid iGetDateTime(ILuint *Month, ILuint *Day, ILuint *Yr, ILuint *Hr, ILuint *Min, ILuint *Sec);
#endif//TARGA_H

View File

@@ -0,0 +1,549 @@
# Microsoft Developer Studio Project File - Name="IL" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** NICHT BEARBEITEN **
# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
CFG=IL - WIN32 DEBUG
!MESSAGE Dies ist kein gültiges Makefile. Zum Erstellen dieses Projekts mit NMAKE
!MESSAGE verwenden Sie den Befehl "Makefile exportieren" und führen Sie den Befehl
!MESSAGE
!MESSAGE NMAKE /f "IL.mak".
!MESSAGE
!MESSAGE Sie können beim Ausführen von NMAKE eine Konfiguration angeben
!MESSAGE durch Definieren des Makros CFG in der Befehlszeile. Zum Beispiel:
!MESSAGE
!MESSAGE NMAKE /f "IL.mak" CFG="IL - WIN32 DEBUG"
!MESSAGE
!MESSAGE Für die Konfiguration stehen zur Auswahl:
!MESSAGE
!MESSAGE "IL - Win32 Debug" (basierend auf "Win32 (x86) Dynamic-Link Library")
!MESSAGE "IL - Win32 Dynamic" (basierend auf "Win32 (x86) Dynamic-Link Library")
!MESSAGE "IL - Win32 Release" (basierend auf "Win32 (x86) Dynamic-Link Library")
!MESSAGE
# Begin Project
# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName "IL"
# PROP Scc_LocalPath "..\.."
CPP=cl.exe
MTL=midl.exe
RSC=rc.exe
!IF "$(CFG)" == "IL - Win32 Debug"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "../../lib/debug"
# PROP BASE Intermediate_Dir "../src/obj/debug"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "../../lib/debug"
# PROP Intermediate_Dir "../src/obj/debug"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "IL_EXPORTS" /YX /FD /GZ /c
# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../projects/msvc/extlibs/" /I "../include" /I "../../include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "IL_EXPORTS" /YX /FD /GZ /c
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x409 /d "_DEBUG"
# ADD RSC /l 0x409 /d "_DEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo /o"../src/obj/debug/DevIL.bsc"
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /def:".\il.def" /out:"C:\path\devil.dll" /pdbtype:sept /libpath:"../../projects/msvc/extlibs"
# SUBTRACT LINK32 /pdb:none
!ELSEIF "$(CFG)" == "IL - Win32 Dynamic"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "../../lib"
# PROP BASE Intermediate_Dir "../src/obj/dynamic"
# PROP BASE Ignore_Export_Lib 0
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "../../lib"
# PROP Intermediate_Dir "../src/obj/dynamic"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MD /W3 /GX /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "IL_EXPORTS" /YX /FD /c
# ADD CPP /nologo /MD /W3 /GX /O1 /I "../include" /I "../../extlibs/" /I "../../include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "IL_EXPORTS" /YX /FD /c
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x409 /d "NDEBUG"
# ADD RSC /l 0x409 /d "NDEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo /o"../src/obj/dynamic/DevIL.bsc"
# ADD BSC32 /nologo /o"../src/obj/dynamic/DevIL.bsc"
LINK32=link.exe
# ADD BASE LINK32 delayimp.lib user32.lib gdi32.lib comdlg32.lib shell32.lib /nologo /dll /machine:I386 /def:".\il.def" /out:"../../lib/DevIL-l.dll" /OPT:NOWIN98 /delayload:libpng3.dll /delayload:lcms108.dll
# SUBTRACT BASE LINK32 /pdb:none
# ADD LINK32 delayimp.lib user32.lib gdi32.lib comdlg32.lib shell32.lib /nologo /dll /machine:I386 /def:".\il.def" /out:"../../lib/DevIL-l.dll" /libpath:"../../extlibs/lib" /OPT:NOWIN98 /delayload:lcms108.dll /delayload:libpng.dll
# SUBTRACT LINK32 /pdb:none
# Begin Special Build Tool
TargetName=DevIL-l
SOURCE="$(InputPath)"
PostBuild_Cmds=..\..\projects\msvc\insdll.bat ..\..\lib\$(TargetName).dll
# End Special Build Tool
!ELSEIF "$(CFG)" == "IL - Win32 Release"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "../../lib"
# PROP BASE Intermediate_Dir "../src/obj"
# PROP BASE Ignore_Export_Lib 0
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "../../lib"
# PROP Intermediate_Dir "../src/obj"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MD /W3 /GX /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "IL_EXPORTS" /D "IL_STATIC_LIB" /YX /FD /c
# ADD CPP /nologo /MD /W3 /GX /O1 /I "../../projects/msvc/extlibs/" /I "../include" /I "../../include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "IL_EXPORTS" /YX /FD /c
# SUBTRACT CPP /X
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x409 /d "NDEBUG"
# ADD RSC /l 0x409 /i "..\include" /d "NDEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo /o"../src/obj/DevIL.bsc"
# ADD BSC32 /nologo /o"../src/obj/DevIL.bsc"
LINK32=link.exe
# ADD BASE LINK32 user32.lib gdi32.lib comdlg32.lib shell32.lib /nologo /dll /machine:I386 /def:".\il.def" /out:"../../lib/DevIL.dll" /OPT:NOWIN98
# SUBTRACT BASE LINK32 /pdb:none
# ADD LINK32 user32.lib gdi32.lib comdlg32.lib shell32.lib /nologo /dll /machine:I386 /def:".\il.def" /out:"../../lib/DevIL.dll" /libpath:"../../projects/msvc/extlibs" /OPT:NOWIN98
# SUBTRACT LINK32 /pdb:none
# Begin Special Build Tool
SOURCE="$(InputPath)"
PostBuild_Cmds=copy ..\..\lib\DevIL.dll "C:\path\DevIL.dll"
# End Special Build Tool
!ENDIF
# Begin Target
# Name "IL - Win32 Debug"
# Name "IL - Win32 Dynamic"
# Name "IL - Win32 Release"
# Begin Group "Source Files"
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
# Begin Source File
SOURCE=.\il.def
!IF "$(CFG)" == "IL - Win32 Debug"
# PROP Exclude_From_Build 1
!ELSEIF "$(CFG)" == "IL - Win32 Dynamic"
# PROP BASE Exclude_From_Build 1
# PROP Exclude_From_Build 1
!ELSEIF "$(CFG)" == "IL - Win32 Release"
# PROP BASE Exclude_From_Build 1
# PROP Exclude_From_Build 1
!ENDIF
# End Source File
# Begin Source File
SOURCE=..\src\il_alloc.c
# End Source File
# Begin Source File
SOURCE=..\src\il_bits.c
# End Source File
# Begin Source File
SOURCE=..\src\il_bmp.c
# End Source File
# Begin Source File
SOURCE=..\src\il_convbuff.c
# End Source File
# Begin Source File
SOURCE=..\src\il_convert.c
# End Source File
# Begin Source File
SOURCE=..\src\il_cut.c
# End Source File
# Begin Source File
SOURCE=..\src\il_dcx.c
# End Source File
# Begin Source File
SOURCE="..\src\il_dds-save.c"
# End Source File
# Begin Source File
SOURCE=..\src\il_dds.c
# End Source File
# Begin Source File
SOURCE=..\src\il_devil.c
# End Source File
# Begin Source File
SOURCE=..\src\il_doom.c
# End Source File
# Begin Source File
SOURCE=..\src\il_endian.c
# End Source File
# Begin Source File
SOURCE=..\src\il_error.c
# End Source File
# Begin Source File
SOURCE=..\src\il_fastconv.c
# End Source File
# Begin Source File
SOURCE=..\src\il_files.c
# End Source File
# Begin Source File
SOURCE=..\src\il_gif.c
# End Source File
# Begin Source File
SOURCE=..\src\il_hdr.c
# End Source File
# Begin Source File
SOURCE=..\src\il_header.c
# End Source File
# Begin Source File
SOURCE=..\src\il_icon.c
# End Source File
# Begin Source File
SOURCE=..\src\il_internal.c
# End Source File
# Begin Source File
SOURCE=..\src\il_io.c
# End Source File
# Begin Source File
SOURCE=..\src\il_jpeg.c
# End Source File
# Begin Source File
SOURCE=..\src\il_lif.c
# End Source File
# Begin Source File
SOURCE=..\src\il_main.c
# End Source File
# Begin Source File
SOURCE=..\src\il_manip.c
# End Source File
# Begin Source File
SOURCE=..\src\il_mdl.c
# End Source File
# Begin Source File
SOURCE=..\src\il_mng.c
# End Source File
# Begin Source File
SOURCE=..\src\il_neuquant.c
# End Source File
# Begin Source File
SOURCE=..\src\il_pal.c
# End Source File
# Begin Source File
SOURCE=..\src\il_pcd.c
# End Source File
# Begin Source File
SOURCE=..\src\il_pcx.c
# End Source File
# Begin Source File
SOURCE=..\src\il_pic.c
# End Source File
# Begin Source File
SOURCE=..\src\il_pix.c
# End Source File
# Begin Source File
SOURCE=..\src\il_png.c
# End Source File
# Begin Source File
SOURCE=..\src\il_pnm.c
# End Source File
# Begin Source File
SOURCE=..\src\il_profiles.c
# End Source File
# Begin Source File
SOURCE=..\src\il_psd.c
# End Source File
# Begin Source File
SOURCE=..\src\il_psp.c
# End Source File
# Begin Source File
SOURCE=..\src\il_pxr.c
# End Source File
# Begin Source File
SOURCE=..\src\il_quantizer.c
# End Source File
# Begin Source File
SOURCE=..\src\il_raw.c
# End Source File
# Begin Source File
SOURCE=..\src\il_rawdata.c
# End Source File
# Begin Source File
SOURCE=..\src\il_register.c
# End Source File
# Begin Source File
SOURCE=..\src\il_rle.c
# End Source File
# Begin Source File
SOURCE=..\src\il_sgi.c
# End Source File
# Begin Source File
SOURCE=..\src\il_stack.c
# End Source File
# Begin Source File
SOURCE=..\src\il_states.c
# End Source File
# Begin Source File
SOURCE=..\src\il_targa.c
# End Source File
# Begin Source File
SOURCE=..\src\il_tiff.c
# End Source File
# Begin Source File
SOURCE=..\src\il_utility.c
# End Source File
# Begin Source File
SOURCE=..\src\il_wal.c
# End Source File
# Begin Source File
SOURCE=..\src\il_xpm.c
# End Source File
# End Group
# Begin Group "Header Files"
# PROP Default_Filter "h;hpp;hxx;hm;inl"
# Begin Source File
SOURCE=..\..\include\IL\config.h
# End Source File
# Begin Source File
SOURCE=..\..\include\IL\devil_internal_exports.h
# End Source File
# Begin Source File
SOURCE=..\..\include\il\il.h
# End Source File
# Begin Source File
SOURCE=..\include\il_alloc.h
# End Source File
# Begin Source File
SOURCE=..\include\il_bits.h
# End Source File
# Begin Source File
SOURCE=..\include\il_bmp.h
# End Source File
# Begin Source File
SOURCE=..\include\il_dcx.h
# End Source File
# Begin Source File
SOURCE=..\include\il_dds.h
# End Source File
# Begin Source File
SOURCE=..\include\il_doompal.h
# End Source File
# Begin Source File
SOURCE=..\include\il_endian.h
# End Source File
# Begin Source File
SOURCE=..\include\il_files.h
# End Source File
# Begin Source File
SOURCE=..\include\il_gif.h
# End Source File
# Begin Source File
SOURCE=..\include\il_hdr.h
# End Source File
# Begin Source File
SOURCE=..\include\il_icon.h
# End Source File
# Begin Source File
SOURCE=..\include\il_internal.h
# End Source File
# Begin Source File
SOURCE=..\include\il_jpeg.h
# End Source File
# Begin Source File
SOURCE=..\include\il_lif.h
# End Source File
# Begin Source File
SOURCE=..\include\il_manip.h
# End Source File
# Begin Source File
SOURCE=..\include\il_mdl.h
# End Source File
# Begin Source File
SOURCE=..\include\il_pal.h
# End Source File
# Begin Source File
SOURCE=..\include\il_pcx.h
# End Source File
# Begin Source File
SOURCE=..\include\il_pic.h
# End Source File
# Begin Source File
SOURCE=..\include\il_pnm.h
# End Source File
# Begin Source File
SOURCE=..\include\il_psd.h
# End Source File
# Begin Source File
SOURCE=..\include\il_psp.h
# End Source File
# Begin Source File
SOURCE=..\include\il_q2pal.h
# End Source File
# Begin Source File
SOURCE=..\include\il_register.h
# End Source File
# Begin Source File
SOURCE=..\include\il_rle.h
# End Source File
# Begin Source File
SOURCE=..\include\il_sgi.h
# End Source File
# Begin Source File
SOURCE=..\include\il_stack.h
# End Source File
# Begin Source File
SOURCE=..\include\il_states.h
# End Source File
# Begin Source File
SOURCE=..\include\il_targa.h
# End Source File
# End Group
# Begin Group "Resource Files"
# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
# Begin Source File
SOURCE=".\resources\IL Logo.ico"
# End Source File
# Begin Source File
SOURCE=.\IL.rc
# End Source File
# End Group
# Begin Group "Text Files"
# PROP Default_Filter "txt"
# Begin Source File
SOURCE=..\..\AUTHORS
# End Source File
# Begin Source File
SOURCE=..\..\BUGS
# End Source File
# Begin Source File
SOURCE=..\..\ChangeLog
# End Source File
# Begin Source File
SOURCE=..\..\CREDITS
# End Source File
# Begin Source File
SOURCE=..\..\libraries.txt
# End Source File
# Begin Source File
SOURCE="..\..\MSVC++.txt"
# End Source File
# Begin Source File
SOURCE=..\..\README.unix
# End Source File
# Begin Source File
SOURCE=..\..\README.win
# End Source File
# End Group
# End Target
# End Project

View File

@@ -0,0 +1,135 @@
//Microsoft Developer Studio generated resource script.
//
#include "resource.h"
#define APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 2 resource.
//
#define APSTUDIO_HIDDEN_SYMBOLS
#include "windows.h"
#undef APSTUDIO_HIDDEN_SYMBOLS
#include "resource.h"
/////////////////////////////////////////////////////////////////////////////
#undef APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
// English (U.S.) resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
#ifdef _WIN32
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
#pragma code_page(1252)
#endif //_WIN32
#ifdef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// TEXTINCLUDE
//
2 TEXTINCLUDE MOVEABLE PURE
BEGIN
"#define APSTUDIO_HIDDEN_SYMBOLS\r\n"
"#include ""windows.h""\r\n"
"#undef APSTUDIO_HIDDEN_SYMBOLS\r\n"
"#include ""resource.h""\r\n"
"\0"
END
3 TEXTINCLUDE MOVEABLE PURE
BEGIN
"\r\n"
"\0"
END
1 TEXTINCLUDE MOVEABLE PURE
BEGIN
"resource.h\0"
END
#endif // APSTUDIO_INVOKED
#ifndef _MAC
/////////////////////////////////////////////////////////////////////////////
//
// Version
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 0,1,6,5
PRODUCTVERSION 0,1,6,5
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x29L
#else
FILEFLAGS 0x28L
#endif
FILEOS 0x40004L
FILETYPE 0x2L
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904b0"
BEGIN
VALUE "Comments", "DevIL: A portable image library in development\0"
VALUE "CompanyName", "Abysmal Software\0"
VALUE "FileDescription", "DevIL: A portable image library in development\0"
VALUE "FileVersion", "1.6.6\0"
VALUE "InternalName", "Developer's Image Library (DevIL)\0"
VALUE "LegalCopyright", "Copyright © 2000-2002\0"
VALUE "LegalTrademarks", "Under LGPL License\0"
VALUE "OriginalFilename", "DevIL.dll\0"
VALUE "PrivateBuild", "Open Source\0"
VALUE "ProductName", "Developer's Image Library (DevIL)\0"
VALUE "ProductVersion", "1.6.6\0"
VALUE "SpecialBuild", "eh?\0"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1200
END
END
#endif // !_MAC
/////////////////////////////////////////////////////////////////////////////
//
// Icon
//
// Icon with lowest ID value placed first to ensure application icon
// remains consistent on all systems.
IDI_ICON1 ICON DISCARDABLE "resources\\IL Logo.ico"
/////////////////////////////////////////////////////////////////////////////
//
// String Table
//
STRINGTABLE DISCARDABLE
BEGIN
IDC_OPENIL "Developer's Image Library, Version 1.6.6"
END
#endif // English (U.S.) resources
/////////////////////////////////////////////////////////////////////////////
#ifndef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 3 resource.
//
/////////////////////////////////////////////////////////////////////////////
#endif // not APSTUDIO_INVOKED

Some files were not shown because too many files have changed in this diff Show More