 |
Irrlicht 3D Engine
|
|
Go to the documentation of this file.
5 #ifndef __IRR_TYPES_H_INCLUDED__
6 #define __IRR_TYPES_H_INCLUDED__
15 #if defined(_MSC_VER) || ((__BORLANDC__ >= 0x530) && !defined(__STRICT_ANSI__))
16 typedef unsigned __int8
u8;
18 typedef unsigned char u8;
23 #if defined(_MSC_VER) || ((__BORLANDC__ >= 0x530) && !defined(__STRICT_ANSI__))
26 typedef signed char s8;
37 #if defined(_MSC_VER) || ((__BORLANDC__ >= 0x530) && !defined(__STRICT_ANSI__))
38 typedef unsigned __int16
u16;
40 typedef unsigned short u16;
45 #if defined(_MSC_VER) || ((__BORLANDC__ >= 0x530) && !defined(__STRICT_ANSI__))
48 typedef signed short s16;
55 #if defined(_MSC_VER) || ((__BORLANDC__ >= 0x530) && !defined(__STRICT_ANSI__))
56 typedef unsigned __int32
u32;
58 typedef unsigned int u32;
63 #if defined(_MSC_VER) || ((__BORLANDC__ >= 0x530) && !defined(__STRICT_ANSI__))
66 typedef signed int s32;
73 #if defined(_MSC_VER) || ((__BORLANDC__ >= 0x530) && !defined(__STRICT_ANSI__))
74 typedef unsigned __int64
u64;
77 typedef unsigned long int u64;
79 __extension__
typedef unsigned long long u64;
82 typedef unsigned long long u64;
87 #if defined(_MSC_VER) || ((__BORLANDC__ >= 0x530) && !defined(__STRICT_ANSI__))
93 __extension__
typedef long long s64;
96 typedef long long s64;
98 #endif // __IRR_HAS_S64
115 #ifdef _IRR_WINDOWS_API_
120 #if defined(_MSC_VER) && _MSC_VER > 1310 && !defined (_WIN32_WCE)
121 #define swprintf swprintf_s
122 #define snprintf sprintf_s
123 #elif !defined(__CYGWIN__)
124 #define swprintf _snwprintf
125 #define snprintf _snprintf
130 #ifndef _WCHAR_T_DEFINED
139 typedef unsigned short wchar_t;
140 #define _WCHAR_T_DEFINED
141 #endif // wchar is not defined
142 #endif // microsoft compiler
143 #endif // _IRR_WINDOWS_API_
154 #if defined(_IRR_WCHAR_FILESYSTEM)
156 #define _IRR_TEXT(X) L##X
159 #define _IRR_TEXT(X) X
166 #if defined(_IRR_WINDOWS_API_) && defined(_MSC_VER) && !defined (_WIN32_WCE)
167 #if defined(WIN64) || defined(_WIN64) // using portable common solution for x64 configuration
169 #define _IRR_DEBUG_BREAK_IF( _CONDITION_ ) if (_CONDITION_) {_CrtDbgBreak();}
171 #define _IRR_DEBUG_BREAK_IF( _CONDITION_ ) if (_CONDITION_) {_asm int 3}
175 #define _IRR_DEBUG_BREAK_IF( _CONDITION_ ) assert( !(_CONDITION_) );
178 #define _IRR_DEBUG_BREAK_IF( _CONDITION_ )
188 #if defined(IGNORE_DEPRECATED_WARNING)
189 #define _IRR_DEPRECATED_
190 #elif _MSC_VER >= 1310 //vs 2003 or higher
191 #define _IRR_DEPRECATED_ __declspec(deprecated)
192 #elif (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1)) // all versions above 3.0 should support this feature
193 #define _IRR_DEPRECATED_ __attribute__ ((deprecated))
195 #define _IRR_DEPRECATED_
204 #if defined(_IRR_WINDOWS_API_) && defined(_MSC_VER) && (_MSC_VER > 1299) && (_MSC_VER < 1400)
205 #define _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX __asm mov eax,100
207 #define _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX
208 #endif // _IRR_MANAGED_MARSHALLING_BUGFIX
212 #if defined(_DEBUG) && defined(IRRLICHT_EXPORTS) && defined(_MSC_VER) && \
213 (_MSC_VER > 1299) && !defined(_IRR_DONT_DO_MEMORY_DEBUGGING_HERE) && !defined(_WIN32_WCE)
215 #define CRTDBG_MAP_ALLOC
216 #define _CRTDBG_MAP_ALLOC
217 #define DEBUG_CLIENTBLOCK new( _CLIENT_BLOCK, __FILE__, __LINE__)
220 #define new DEBUG_CLIENTBLOCK
224 #if defined(_MSC_VER) && (_MSC_VER < 1300 )
225 #pragma warning( disable: 4786)
231 #if defined(_IRR_WINDOWS_API_) && defined(_MSC_VER) && (_MSC_VER >= 1400)
241 #define MAKE_IRR_ID(c0, c1, c2, c3) \
242 ((irr::u32)(irr::u8)(c0) | ((irr::u32)(irr::u8)(c1) << 8) | \
243 ((irr::u32)(irr::u8)(c2) << 16) | ((irr::u32)(irr::u8)(c3) << 24 ))
245 #if defined(__BORLANDC__) || defined (__BCPLUSPLUS__)
246 #define _strcmpi(a,b) strcmpi(a,b)
249 #endif // __IRR_TYPES_H_INCLUDED__