aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/libraries/irrlicht-1.8/include/irrTypes.h
diff options
context:
space:
mode:
authorDavid Walter Seikel2013-01-13 18:54:10 +1000
committerDavid Walter Seikel2013-01-13 18:54:10 +1000
commit959831f4ef5a3e797f576c3de08cd65032c997ad (patch)
treee7351908be5995f0b325b2ebeaa02d5a34b82583 /libraries/irrlicht-1.8/include/irrTypes.h
parentAdd info about changes to Irrlicht. (diff)
downloadSledjHamr-959831f4ef5a3e797f576c3de08cd65032c997ad.zip
SledjHamr-959831f4ef5a3e797f576c3de08cd65032c997ad.tar.gz
SledjHamr-959831f4ef5a3e797f576c3de08cd65032c997ad.tar.bz2
SledjHamr-959831f4ef5a3e797f576c3de08cd65032c997ad.tar.xz
Remove damned ancient DOS line endings from Irrlicht. Hopefully I did not go overboard.
Diffstat (limited to 'libraries/irrlicht-1.8/include/irrTypes.h')
-rw-r--r--libraries/irrlicht-1.8/include/irrTypes.h500
1 files changed, 250 insertions, 250 deletions
diff --git a/libraries/irrlicht-1.8/include/irrTypes.h b/libraries/irrlicht-1.8/include/irrTypes.h
index 6b3cb8c..e7f8fd9 100644
--- a/libraries/irrlicht-1.8/include/irrTypes.h
+++ b/libraries/irrlicht-1.8/include/irrTypes.h
@@ -1,250 +1,250 @@
1// Copyright (C) 2002-2012 Nikolaus Gebhardt 1// Copyright (C) 2002-2012 Nikolaus Gebhardt
2// This file is part of the "Irrlicht Engine". 2// This file is part of the "Irrlicht Engine".
3// For conditions of distribution and use, see copyright notice in irrlicht.h 3// For conditions of distribution and use, see copyright notice in irrlicht.h
4 4
5#ifndef __IRR_TYPES_H_INCLUDED__ 5#ifndef __IRR_TYPES_H_INCLUDED__
6#define __IRR_TYPES_H_INCLUDED__ 6#define __IRR_TYPES_H_INCLUDED__
7 7
8#include "IrrCompileConfig.h" 8#include "IrrCompileConfig.h"
9 9
10namespace irr 10namespace irr
11{ 11{
12 12
13//! 8 bit unsigned variable. 13//! 8 bit unsigned variable.
14/** This is a typedef for unsigned char, it ensures portability of the engine. */ 14/** This is a typedef for unsigned char, it ensures portability of the engine. */
15#if defined(_MSC_VER) || ((__BORLANDC__ >= 0x530) && !defined(__STRICT_ANSI__)) 15#if defined(_MSC_VER) || ((__BORLANDC__ >= 0x530) && !defined(__STRICT_ANSI__))
16typedef unsigned __int8 u8; 16typedef unsigned __int8 u8;
17#else 17#else
18typedef unsigned char u8; 18typedef unsigned char u8;
19#endif 19#endif
20 20
21//! 8 bit signed variable. 21//! 8 bit signed variable.
22/** This is a typedef for signed char, it ensures portability of the engine. */ 22/** This is a typedef for signed char, it ensures portability of the engine. */
23#if defined(_MSC_VER) || ((__BORLANDC__ >= 0x530) && !defined(__STRICT_ANSI__)) 23#if defined(_MSC_VER) || ((__BORLANDC__ >= 0x530) && !defined(__STRICT_ANSI__))
24typedef __int8 s8; 24typedef __int8 s8;
25#else 25#else
26typedef signed char s8; 26typedef signed char s8;
27#endif 27#endif
28 28
29//! 8 bit character variable. 29//! 8 bit character variable.
30/** This is a typedef for char, it ensures portability of the engine. */ 30/** This is a typedef for char, it ensures portability of the engine. */
31typedef char c8; 31typedef char c8;
32 32
33 33
34 34
35//! 16 bit unsigned variable. 35//! 16 bit unsigned variable.
36/** This is a typedef for unsigned short, it ensures portability of the engine. */ 36/** This is a typedef for unsigned short, it ensures portability of the engine. */
37#if defined(_MSC_VER) || ((__BORLANDC__ >= 0x530) && !defined(__STRICT_ANSI__)) 37#if defined(_MSC_VER) || ((__BORLANDC__ >= 0x530) && !defined(__STRICT_ANSI__))
38typedef unsigned __int16 u16; 38typedef unsigned __int16 u16;
39#else 39#else
40typedef unsigned short u16; 40typedef unsigned short u16;
41#endif 41#endif
42 42
43//! 16 bit signed variable. 43//! 16 bit signed variable.
44/** This is a typedef for signed short, it ensures portability of the engine. */ 44/** This is a typedef for signed short, it ensures portability of the engine. */
45#if defined(_MSC_VER) || ((__BORLANDC__ >= 0x530) && !defined(__STRICT_ANSI__)) 45#if defined(_MSC_VER) || ((__BORLANDC__ >= 0x530) && !defined(__STRICT_ANSI__))
46typedef __int16 s16; 46typedef __int16 s16;
47#else 47#else
48typedef signed short s16; 48typedef signed short s16;
49#endif 49#endif
50 50
51 51
52 52
53//! 32 bit unsigned variable. 53//! 32 bit unsigned variable.
54/** This is a typedef for unsigned int, it ensures portability of the engine. */ 54/** This is a typedef for unsigned int, it ensures portability of the engine. */
55#if defined(_MSC_VER) || ((__BORLANDC__ >= 0x530) && !defined(__STRICT_ANSI__)) 55#if defined(_MSC_VER) || ((__BORLANDC__ >= 0x530) && !defined(__STRICT_ANSI__))
56typedef unsigned __int32 u32; 56typedef unsigned __int32 u32;
57#else 57#else
58typedef unsigned int u32; 58typedef unsigned int u32;
59#endif 59#endif
60 60
61//! 32 bit signed variable. 61//! 32 bit signed variable.
62/** This is a typedef for signed int, it ensures portability of the engine. */ 62/** This is a typedef for signed int, it ensures portability of the engine. */
63#if defined(_MSC_VER) || ((__BORLANDC__ >= 0x530) && !defined(__STRICT_ANSI__)) 63#if defined(_MSC_VER) || ((__BORLANDC__ >= 0x530) && !defined(__STRICT_ANSI__))
64typedef __int32 s32; 64typedef __int32 s32;
65#else 65#else
66typedef signed int s32; 66typedef signed int s32;
67#endif 67#endif
68 68
69 69
70#ifdef __IRR_HAS_S64 70#ifdef __IRR_HAS_S64
71//! 64 bit unsigned variable. 71//! 64 bit unsigned variable.
72/** This is a typedef for 64bit uint, it ensures portability of the engine. */ 72/** This is a typedef for 64bit uint, it ensures portability of the engine. */
73#if defined(_MSC_VER) || ((__BORLANDC__ >= 0x530) && !defined(__STRICT_ANSI__)) 73#if defined(_MSC_VER) || ((__BORLANDC__ >= 0x530) && !defined(__STRICT_ANSI__))
74typedef unsigned __int64 u64; 74typedef unsigned __int64 u64;
75#elif __GNUC__ 75#elif __GNUC__
76#if __WORDSIZE == 64 76#if __WORDSIZE == 64
77typedef unsigned long int u64; 77typedef unsigned long int u64;
78#else 78#else
79__extension__ typedef unsigned long long u64; 79__extension__ typedef unsigned long long u64;
80#endif 80#endif
81#else 81#else
82typedef unsigned long long u64; 82typedef unsigned long long u64;
83#endif 83#endif
84 84
85//! 64 bit signed variable. 85//! 64 bit signed variable.
86/** This is a typedef for 64bit int, it ensures portability of the engine. */ 86/** This is a typedef for 64bit int, it ensures portability of the engine. */
87#if defined(_MSC_VER) || ((__BORLANDC__ >= 0x530) && !defined(__STRICT_ANSI__)) 87#if defined(_MSC_VER) || ((__BORLANDC__ >= 0x530) && !defined(__STRICT_ANSI__))
88typedef __int64 s64; 88typedef __int64 s64;
89#elif __GNUC__ 89#elif __GNUC__
90#if __WORDSIZE == 64 90#if __WORDSIZE == 64
91typedef long int s64; 91typedef long int s64;
92#else 92#else
93__extension__ typedef long long s64; 93__extension__ typedef long long s64;
94#endif 94#endif
95#else 95#else
96typedef long long s64; 96typedef long long s64;
97#endif 97#endif
98#endif // __IRR_HAS_S64 98#endif // __IRR_HAS_S64
99 99
100 100
101 101
102//! 32 bit floating point variable. 102//! 32 bit floating point variable.
103/** This is a typedef for float, it ensures portability of the engine. */ 103/** This is a typedef for float, it ensures portability of the engine. */
104typedef float f32; 104typedef float f32;
105 105
106//! 64 bit floating point variable. 106//! 64 bit floating point variable.
107/** This is a typedef for double, it ensures portability of the engine. */ 107/** This is a typedef for double, it ensures portability of the engine. */
108typedef double f64; 108typedef double f64;
109 109
110 110
111} // end namespace irr 111} // end namespace irr
112 112
113 113
114#include <wchar.h> 114#include <wchar.h>
115#ifdef _IRR_WINDOWS_API_ 115#ifdef _IRR_WINDOWS_API_
116//! Defines for s{w,n}printf because these methods do not match the ISO C 116//! Defines for s{w,n}printf because these methods do not match the ISO C
117//! standard on Windows platforms, but it does on all others. 117//! standard on Windows platforms, but it does on all others.
118//! These should be int snprintf(char *str, size_t size, const char *format, ...); 118//! These should be int snprintf(char *str, size_t size, const char *format, ...);
119//! and int swprintf(wchar_t *wcs, size_t maxlen, const wchar_t *format, ...); 119//! and int swprintf(wchar_t *wcs, size_t maxlen, const wchar_t *format, ...);
120#if defined(_MSC_VER) && _MSC_VER > 1310 && !defined (_WIN32_WCE) 120#if defined(_MSC_VER) && _MSC_VER > 1310 && !defined (_WIN32_WCE)
121#define swprintf swprintf_s 121#define swprintf swprintf_s
122#define snprintf sprintf_s 122#define snprintf sprintf_s
123#else 123#else
124#define swprintf _snwprintf 124#define swprintf _snwprintf
125#define snprintf _snprintf 125#define snprintf _snprintf
126#endif 126#endif
127 127
128// define the wchar_t type if not already built in. 128// define the wchar_t type if not already built in.
129#ifdef _MSC_VER 129#ifdef _MSC_VER
130#ifndef _WCHAR_T_DEFINED 130#ifndef _WCHAR_T_DEFINED
131//! A 16 bit wide character type. 131//! A 16 bit wide character type.
132/** 132/**
133 Defines the wchar_t-type. 133 Defines the wchar_t-type.
134 In VS6, its not possible to tell 134 In VS6, its not possible to tell
135 the standard compiler to treat wchar_t as a built-in type, and 135 the standard compiler to treat wchar_t as a built-in type, and
136 sometimes we just don't want to include the huge stdlib.h or wchar.h, 136 sometimes we just don't want to include the huge stdlib.h or wchar.h,
137 so we'll use this. 137 so we'll use this.
138*/ 138*/
139typedef unsigned short wchar_t; 139typedef unsigned short wchar_t;
140#define _WCHAR_T_DEFINED 140#define _WCHAR_T_DEFINED
141#endif // wchar is not defined 141#endif // wchar is not defined
142#endif // microsoft compiler 142#endif // microsoft compiler
143#endif // _IRR_WINDOWS_API_ 143#endif // _IRR_WINDOWS_API_
144 144
145namespace irr 145namespace irr
146{ 146{
147 147
148//! Type name for character type used by the file system. 148//! Type name for character type used by the file system.
149/** Should the wide character version of the FileSystem be used it is a 149/** Should the wide character version of the FileSystem be used it is a
15016 bit character variable. Used for unicode Filesystem and unicode strings. 15016 bit character variable. Used for unicode Filesystem and unicode strings.
151Else it is a 8 bit character variable. Used for ansi Filesystem and non-unicode 151Else it is a 8 bit character variable. Used for ansi Filesystem and non-unicode
152strings 152strings
153*/ 153*/
154#if defined(_IRR_WCHAR_FILESYSTEM) 154#if defined(_IRR_WCHAR_FILESYSTEM)
155 typedef wchar_t fschar_t; 155 typedef wchar_t fschar_t;
156 #define _IRR_TEXT(X) L##X 156 #define _IRR_TEXT(X) L##X
157#else 157#else
158 typedef char fschar_t; 158 typedef char fschar_t;
159 #define _IRR_TEXT(X) X 159 #define _IRR_TEXT(X) X
160#endif 160#endif
161 161
162} // end namespace irr 162} // end namespace irr
163 163
164//! define a break macro for debugging. 164//! define a break macro for debugging.
165#if defined(_DEBUG) 165#if defined(_DEBUG)
166#if defined(_IRR_WINDOWS_API_) && defined(_MSC_VER) && !defined (_WIN32_WCE) 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 167 #if defined(WIN64) || defined(_WIN64) // using portable common solution for x64 configuration
168 #include <crtdbg.h> 168 #include <crtdbg.h>
169 #define _IRR_DEBUG_BREAK_IF( _CONDITION_ ) if (_CONDITION_) {_CrtDbgBreak();} 169 #define _IRR_DEBUG_BREAK_IF( _CONDITION_ ) if (_CONDITION_) {_CrtDbgBreak();}
170 #else 170 #else
171 #define _IRR_DEBUG_BREAK_IF( _CONDITION_ ) if (_CONDITION_) {_asm int 3} 171 #define _IRR_DEBUG_BREAK_IF( _CONDITION_ ) if (_CONDITION_) {_asm int 3}
172 #endif 172 #endif
173#else 173#else
174#include "assert.h" 174#include "assert.h"
175#define _IRR_DEBUG_BREAK_IF( _CONDITION_ ) assert( !(_CONDITION_) ); 175#define _IRR_DEBUG_BREAK_IF( _CONDITION_ ) assert( !(_CONDITION_) );
176#endif 176#endif
177#else 177#else
178#define _IRR_DEBUG_BREAK_IF( _CONDITION_ ) 178#define _IRR_DEBUG_BREAK_IF( _CONDITION_ )
179#endif 179#endif
180 180
181//! Defines a deprecated macro which generates a warning at compile time 181//! Defines a deprecated macro which generates a warning at compile time
182/** The usage is simple 182/** The usage is simple
183For typedef: typedef _IRR_DEPRECATED_ int test1; 183For typedef: typedef _IRR_DEPRECATED_ int test1;
184For classes/structs: class _IRR_DEPRECATED_ test2 { ... }; 184For classes/structs: class _IRR_DEPRECATED_ test2 { ... };
185For methods: class test3 { _IRR_DEPRECATED_ virtual void foo() {} }; 185For methods: class test3 { _IRR_DEPRECATED_ virtual void foo() {} };
186For functions: template<class T> _IRR_DEPRECATED_ void test4(void) {} 186For functions: template<class T> _IRR_DEPRECATED_ void test4(void) {}
187**/ 187**/
188#if defined(IGNORE_DEPRECATED_WARNING) 188#if defined(IGNORE_DEPRECATED_WARNING)
189#define _IRR_DEPRECATED_ 189#define _IRR_DEPRECATED_
190#elif _MSC_VER >= 1310 //vs 2003 or higher 190#elif _MSC_VER >= 1310 //vs 2003 or higher
191#define _IRR_DEPRECATED_ __declspec(deprecated) 191#define _IRR_DEPRECATED_ __declspec(deprecated)
192#elif (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1)) // all versions above 3.0 should support this feature 192#elif (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1)) // all versions above 3.0 should support this feature
193#define _IRR_DEPRECATED_ __attribute__ ((deprecated)) 193#define _IRR_DEPRECATED_ __attribute__ ((deprecated))
194#else 194#else
195#define _IRR_DEPRECATED_ 195#define _IRR_DEPRECATED_
196#endif 196#endif
197 197
198//! Defines a small statement to work around a microsoft compiler bug. 198//! Defines a small statement to work around a microsoft compiler bug.
199/** The microsoft compiler 7.0 - 7.1 has a bug: 199/** The microsoft compiler 7.0 - 7.1 has a bug:
200When you call unmanaged code that returns a bool type value of false from managed code, 200When you call unmanaged code that returns a bool type value of false from managed code,
201the return value may appear as true. See 201the return value may appear as true. See
202http://support.microsoft.com/default.aspx?kbid=823071 for details. 202http://support.microsoft.com/default.aspx?kbid=823071 for details.
203Compiler version defines: VC6.0 : 1200, VC7.0 : 1300, VC7.1 : 1310, VC8.0 : 1400*/ 203Compiler version defines: VC6.0 : 1200, VC7.0 : 1300, VC7.1 : 1310, VC8.0 : 1400*/
204#if defined(_IRR_WINDOWS_API_) && defined(_MSC_VER) && (_MSC_VER > 1299) && (_MSC_VER < 1400) 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 205#define _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX __asm mov eax,100
206#else 206#else
207#define _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX 207#define _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX
208#endif // _IRR_MANAGED_MARSHALLING_BUGFIX 208#endif // _IRR_MANAGED_MARSHALLING_BUGFIX
209 209
210 210
211// memory debugging 211// memory debugging
212#if defined(_DEBUG) && defined(IRRLICHT_EXPORTS) && defined(_MSC_VER) && \ 212#if defined(_DEBUG) && defined(IRRLICHT_EXPORTS) && defined(_MSC_VER) && \
213 (_MSC_VER > 1299) && !defined(_IRR_DONT_DO_MEMORY_DEBUGGING_HERE) && !defined(_WIN32_WCE) 213 (_MSC_VER > 1299) && !defined(_IRR_DONT_DO_MEMORY_DEBUGGING_HERE) && !defined(_WIN32_WCE)
214 214
215 #define CRTDBG_MAP_ALLOC 215 #define CRTDBG_MAP_ALLOC
216 #define _CRTDBG_MAP_ALLOC 216 #define _CRTDBG_MAP_ALLOC
217 #define DEBUG_CLIENTBLOCK new( _CLIENT_BLOCK, __FILE__, __LINE__) 217 #define DEBUG_CLIENTBLOCK new( _CLIENT_BLOCK, __FILE__, __LINE__)
218 #include <stdlib.h> 218 #include <stdlib.h>
219 #include <crtdbg.h> 219 #include <crtdbg.h>
220 #define new DEBUG_CLIENTBLOCK 220 #define new DEBUG_CLIENTBLOCK
221#endif 221#endif
222 222
223// disable truncated debug information warning in visual studio 6 by default 223// disable truncated debug information warning in visual studio 6 by default
224#if defined(_MSC_VER) && (_MSC_VER < 1300 ) 224#if defined(_MSC_VER) && (_MSC_VER < 1300 )
225#pragma warning( disable: 4786) 225#pragma warning( disable: 4786)
226#endif // _MSC 226#endif // _MSC
227 227
228 228
229//! ignore VC8 warning deprecated 229//! ignore VC8 warning deprecated
230/** The microsoft compiler */ 230/** The microsoft compiler */
231#if defined(_IRR_WINDOWS_API_) && defined(_MSC_VER) && (_MSC_VER >= 1400) 231#if defined(_IRR_WINDOWS_API_) && defined(_MSC_VER) && (_MSC_VER >= 1400)
232 //#pragma warning( disable: 4996) 232 //#pragma warning( disable: 4996)
233 //#define _CRT_SECURE_NO_DEPRECATE 1 233 //#define _CRT_SECURE_NO_DEPRECATE 1
234 //#define _CRT_NONSTDC_NO_DEPRECATE 1 234 //#define _CRT_NONSTDC_NO_DEPRECATE 1
235#endif 235#endif
236 236
237 237
238//! creates four CC codes used in Irrlicht for simple ids 238//! creates four CC codes used in Irrlicht for simple ids
239/** some compilers can create those by directly writing the 239/** some compilers can create those by directly writing the
240code like 'code', but some generate warnings so we use this macro here */ 240code like 'code', but some generate warnings so we use this macro here */
241#define MAKE_IRR_ID(c0, c1, c2, c3) \ 241#define MAKE_IRR_ID(c0, c1, c2, c3) \
242 ((irr::u32)(irr::u8)(c0) | ((irr::u32)(irr::u8)(c1) << 8) | \ 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 )) 243 ((irr::u32)(irr::u8)(c2) << 16) | ((irr::u32)(irr::u8)(c3) << 24 ))
244 244
245#if defined(__BORLANDC__) || defined (__BCPLUSPLUS__) 245#if defined(__BORLANDC__) || defined (__BCPLUSPLUS__)
246#define _strcmpi(a,b) strcmpi(a,b) 246#define _strcmpi(a,b) strcmpi(a,b)
247#endif 247#endif
248 248
249#endif // __IRR_TYPES_H_INCLUDED__ 249#endif // __IRR_TYPES_H_INCLUDED__
250 250