nuclear@0: // Copyright (C) 2002-2005 Nikolaus Gebhardt nuclear@0: // This file is part of the "Irrlicht Engine". nuclear@0: // For conditions of distribution and use, see copyright notice in irrlicht.h nuclear@0: nuclear@0: #ifndef __IRR_TYPES_H_INCLUDED__ nuclear@0: #define __IRR_TYPES_H_INCLUDED__ nuclear@0: nuclear@0: namespace irr nuclear@0: { nuclear@0: nuclear@0: //! 8 bit unsigned variable. nuclear@0: /** This is a typedef for unsigned char, it ensures portability of the engine. */ nuclear@0: typedef unsigned char u8; nuclear@0: nuclear@0: //! 8 bit signed variable. nuclear@0: /** This is a typedef for signed char, it ensures portability of the engine. */ nuclear@0: typedef signed char s8; nuclear@0: nuclear@0: //! 8 bit character variable. nuclear@0: /** This is a typedef for char, it ensures portability of the engine. */ nuclear@0: typedef char c8; nuclear@0: nuclear@0: nuclear@0: nuclear@0: //! 16 bit unsigned variable. nuclear@0: /** This is a typedef for unsigned short, it ensures portability of the engine. */ nuclear@0: typedef unsigned short u16; nuclear@0: nuclear@0: //! 16 bit signed variable. nuclear@0: /** This is a typedef for signed short, it ensures portability of the engine. */ nuclear@0: typedef signed short s16; nuclear@0: nuclear@0: nuclear@0: nuclear@0: //! 32 bit unsigned variable. nuclear@0: /** This is a typedef for unsigned int, it ensures portability of the engine. */ nuclear@0: typedef unsigned int u32; nuclear@0: nuclear@0: //! 32 bit signed variable. nuclear@0: /** This is a typedef for signed int, it ensures portability of the engine. */ nuclear@0: typedef signed int s32; nuclear@0: nuclear@0: nuclear@0: nuclear@0: // 64 bit signed variable. nuclear@0: // This is a typedef for __int64, it ensures portability of the engine. nuclear@0: // This type is currently not used by the engine and not supported by compilers nuclear@0: // other than Microsoft Compilers, so it is outcommented. nuclear@0: //typedef __int64 s64; nuclear@0: nuclear@0: nuclear@0: nuclear@0: //! 32 bit floating point variable. nuclear@0: /** This is a typedef for float, it ensures portability of the engine. */ nuclear@0: typedef float f32; nuclear@0: nuclear@0: //! 64 bit floating point variable. nuclear@0: /** This is a typedef for double, it ensures portability of the engine. */ nuclear@0: typedef double f64; nuclear@0: nuclear@0: nuclear@0: } // end namespace nuclear@0: nuclear@0: nuclear@0: // define the wchar_t type if not already built in. nuclear@0: #ifdef _MSC_VER nuclear@0: #ifndef _WCHAR_T_DEFINED nuclear@0: //! A 16 bit wide character type. nuclear@0: /** nuclear@0: Defines the wchar_t-type. nuclear@0: In VS6, its not possible to tell nuclear@0: the standard compiler to treat wchar_t as a built-in type, and nuclear@0: sometimes we just don't want to include the huge stdlib.h or wchar.h, nuclear@0: so we'll use this. nuclear@0: */ nuclear@0: typedef unsigned short wchar_t; nuclear@0: #define _WCHAR_T_DEFINED nuclear@0: #endif // wchar is not defined nuclear@0: #endif // microsoft compiler nuclear@0: nuclear@0: //! define a break macro for debugging only in Win32 mode. nuclear@0: // WORKAROUND (assimp): remove __asm nuclear@0: #if defined(WIN32) && defined(_MSC_VER) && defined(_DEBUG) nuclear@0: #if defined(_M_IX86) nuclear@0: #define _IRR_DEBUG_BREAK_IF( _CONDITION_ ) /*if (_CONDITION_) {_asm int 3}*/ nuclear@0: #else nuclear@0: #define _IRR_DEBUG_BREAK_IF( _CONDITION_ ) nuclear@0: #endif nuclear@0: #else nuclear@0: #define _IRR_DEBUG_BREAK_IF( _CONDITION_ ) nuclear@0: #endif nuclear@0: nuclear@0: //! Defines a small statement to work around a microsoft compiler bug. nuclear@0: /** The microsft compiler 7.0 - 7.1 has a bug: nuclear@0: When you call unmanaged code that returns a bool type value of false from managed code, nuclear@0: the return value may appear as true. See nuclear@0: http://support.microsoft.com/default.aspx?kbid=823071 for details. nuclear@0: Compiler version defines: VC6.0 : 1200, VC7.0 : 1300, VC7.1 : 1310, VC8.0 : 1400*/ nuclear@0: nuclear@0: // WORKAROUND (assimp): remove __asm nuclear@0: #if defined(WIN32) && defined(_MSC_VER) && (_MSC_VER > 1299) && (_MSC_VER < 1400) nuclear@0: #define _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX /*__asm mov eax,100*/ nuclear@0: #else nuclear@0: #define _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX nuclear@0: #endif // _IRR_MANAGED_MARSHALLING_BUGFIX nuclear@0: nuclear@0: #endif // __IRR_TYPES_H_INCLUDED__ nuclear@0: