#define __IRR_TYPES_H_INCLUDED__\r
\r
#include "IrrCompileConfig.h"\r
-\r
-#if defined(__GNUC__)\r
- #include <limits.h> // for __WORDSIZE\r
-#endif\r
+#include <stdint.h>\r
\r
namespace irr\r
{\r
\r
//! 8 bit unsigned variable.\r
-/** This is a typedef for unsigned char, it ensures portability of the engine. */\r
-#if defined(_MSC_VER) || ((__BORLANDC__ >= 0x530) && !defined(__STRICT_ANSI__))\r
-typedef unsigned __int8 u8;\r
-#else\r
-typedef unsigned char u8;\r
-#endif\r
+typedef uint8_t u8;\r
\r
//! 8 bit signed variable.\r
-/** This is a typedef for signed char, it ensures portability of the engine. */\r
-#if defined(_MSC_VER) || ((__BORLANDC__ >= 0x530) && !defined(__STRICT_ANSI__))\r
-typedef __int8 s8;\r
-#else\r
-typedef signed char s8;\r
-#endif\r
+typedef int8_t s8;\r
\r
//! 8 bit character variable.\r
/** This is a typedef for char, it ensures portability of the engine. */\r
\r
\r
//! 16 bit unsigned variable.\r
-/** This is a typedef for unsigned short, it ensures portability of the engine. */\r
-#if defined(_MSC_VER) || ((__BORLANDC__ >= 0x530) && !defined(__STRICT_ANSI__))\r
-typedef unsigned __int16 u16;\r
-#else\r
-typedef unsigned short u16;\r
-#endif\r
+typedef uint16_t u16;\r
\r
//! 16 bit signed variable.\r
-/** This is a typedef for signed short, it ensures portability of the engine. */\r
-#if defined(_MSC_VER) || ((__BORLANDC__ >= 0x530) && !defined(__STRICT_ANSI__))\r
-typedef __int16 s16;\r
-#else\r
-typedef signed short s16;\r
-#endif\r
+typedef int16_t s16;\r
\r
\r
\r
//! 32 bit unsigned variable.\r
-/** This is a typedef for unsigned int, it ensures portability of the engine. */\r
-#if defined(_MSC_VER) || ((__BORLANDC__ >= 0x530) && !defined(__STRICT_ANSI__))\r
-typedef unsigned __int32 u32;\r
-#else\r
-typedef unsigned int u32;\r
-#endif\r
+typedef uint32_t u32;\r
\r
//! 32 bit signed variable.\r
-/** This is a typedef for signed int, it ensures portability of the engine. */\r
-#if defined(_MSC_VER) || ((__BORLANDC__ >= 0x530) && !defined(__STRICT_ANSI__))\r
-typedef __int32 s32;\r
-#else\r
-typedef signed int s32;\r
-#endif\r
+typedef int32_t s32;\r
\r
\r
#ifdef __IRR_HAS_S64\r
//! 64 bit unsigned variable.\r
-/** This is a typedef for 64bit uint, it ensures portability of the engine. */\r
-#if defined(_MSC_VER) || ((__BORLANDC__ >= 0x530) && !defined(__STRICT_ANSI__))\r
-typedef unsigned __int64 u64;\r
-#elif defined(__GNUC__)\r
-#if defined(__WORDSIZE) && __WORDSIZE == 64\r
-typedef unsigned long int u64;\r
-#else\r
-__extension__ typedef unsigned long long u64;\r
-#endif\r
-#else\r
-typedef unsigned long long u64;\r
-#endif\r
+typedef uint64_t u64;\r
\r
//! 64 bit signed variable.\r
-/** This is a typedef for 64bit int, it ensures portability of the engine. */\r
-#if defined(_MSC_VER) || ((__BORLANDC__ >= 0x530) && !defined(__STRICT_ANSI__))\r
-typedef __int64 s64;\r
-#elif defined(__GNUC__)\r
-#if defined(__WORDSIZE) && __WORDSIZE == 64\r
-typedef long int s64;\r
-#else\r
-__extension__ typedef long long s64;\r
-#endif\r
-#else\r
-typedef long long s64;\r
-#endif\r
+typedef int64_t s64;\r
#endif // __IRR_HAS_S64\r
\r
\r
#define swprintf_irr _snwprintf\r
#define snprintf_irr _snprintf\r
#endif\r
-\r
-// define the wchar_t type if not already built in.\r
-#ifdef _MSC_VER\r
-#ifndef _WCHAR_T_DEFINED\r
-//! A 16 bit wide character type.\r
-/**\r
- Defines the wchar_t-type.\r
- In VS6, its not possible to tell\r
- the standard compiler to treat wchar_t as a built-in type, and\r
- sometimes we just don't want to include the huge stdlib.h or wchar.h,\r
- so we'll use this.\r
-*/\r
-typedef unsigned short wchar_t;\r
-#define _WCHAR_T_DEFINED\r
-#endif // wchar is not defined\r
-#endif // microsoft compiler\r
#else\r
#define swprintf_irr swprintf\r
#define snprintf_irr snprintf\r
{\r
\r
//! Type name for character type used by the file system.\r
-/** Should the wide character version of the FileSystem be used it is a\r
-16 bit character variable. Used for Unicode Filesystem and Unicode strings.\r
-Else it is a 8 bit character variable. Used for ansi Filesystem and non-unicode\r
-strings\r
-*/\r
-#if defined(_IRR_WCHAR_FILESYSTEM)\r
- typedef wchar_t fschar_t;\r
- #define _IRR_TEXT(X) L##X\r
-#else\r
typedef char fschar_t;\r
#define _IRR_TEXT(X) X\r
-#endif\r
\r
} // end namespace irr\r
\r