- Main Page
- Data Structures
- Files

# /home/dwoods/DevIL/src-ILU/include/ilu_internal.h

    00001
    00002 #ifndef INTERNAL_H
    00003 #define INTERNAL_H
    00004
    00005 #include <string.h>
    00006
    00007 #ifdef _MSC_VER
    00008         #if _MSC_VER > 1000
    00009                 #pragma once
    00010                 #pragma intrinsic(memcpy)
    00011                 #pragma intrinsic(memset)
    00012                 //pragma comment(linker, "/NODEFAULTLIB:libc")
    00013                 #define WIN32_LEAN_AND_MEAN             // Exclude rarely-used stuff from Windows headers
    00014
    00015                 #ifdef _DEBUG
    00016                         #define _CRTDBG_MAP_ALLOC
    00017                         #include <stdlib.h>
    00018                         #ifndef _WIN32_WCE
    00019                                 #include <crtdbg.h>
    00020                         #endif
    00021                 #endif
    00022         #endif // _MSC_VER > 1000
    00023 #endif
    00024
    00025 #define _IL_BUILD_LIBRARY
    00026 #define _ILU_BUILD_LIBRARY
    00027
    00028 // Standard headers
    00029 #include <stdlib.h>
    00030 #include <stdio.h>
    00031 #include <math.h>
    00032 #include <string.h>
    00033
    00034 // Local headers
    00035 #define _IL_BUILD_LIBRARY
    00036 #define _ILU_BUILD_LIBRARY
    00037
    00038 #ifdef HAVE_CONFIG_H //if we use autotools, we have HAVE_CONFIG_H defined and we have to look for it like that
    00039 #include <config.h>
    00040 #else // if we don't use autotools, we have to point to (possibly different) config.h than in the opposite case
    00041 #include <IL/config.h>
    00042 #endif
    00043
    00044 #include <IL/ilu.h>
    00045 #include <IL/devil_internal_exports.h>
    00046
    00047
    00048 // From DevIL's internal.h:
    00049 #ifdef _WIN32_WCE
    00050         #include <windows.h>
    00051         #define IL_TEXT(s) ((char*)TEXT(s))
    00052 #elif _WIN32
    00053         #include <windows.h>
    00054         #define IL_TEXT(s) TEXT(s)
    00055 #else
    00056         #define IL_TEXT(s) s
    00057         #define TEXT(s) s
    00058 #endif
    00059
    00060 extern ILimage *iluCurImage;
    00061
    00062
    00063 // Useful global variables
    00064 extern const ILdouble   IL_PI;
    00065 extern const ILdouble   IL_DEGCONV;
    00066
    00067
    00068 #ifdef ILU_INTERNAL_C
    00069 #undef NOINLINE
    00070 #undef INLINE
    00071 #define INLINE
    00072 #endif
    00073
    00074 // Internal functions
    00075 ILfloat ilCos(ILfloat Angle);
    00076 ILfloat ilSin(ILfloat Angle);
    00077 ILint ilRound(ILfloat Num);
    00078
    00079 #ifndef NOINLINE
    00080 INLINE ILfloat ilCos(ILfloat Angle) {
    00081         return (ILfloat)(cos(Angle * IL_DEGCONV));
    00082 }
    00083
    00084 INLINE ILfloat ilSin(ILfloat Angle) {
    00085         return (ILfloat)(sin(Angle * IL_DEGCONV));
    00086 }
    00087
    00088
    00089 INLINE ILint ilRound(ILfloat Num) {
    00090         return (ILint)(Num + 0.5); // this is truncating in away-from-0, not rounding
    00091 }
    00092 #endif
    00093
    00094
    00095
    00096 ILuint  iluScaleAdvanced(ILuint Width, ILuint Height, ILenum Filter);
    00097 ILubyte *iScanFill(void);
    00098
    00099
    00100 #endif//INTERNAL_H