aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/libraries/irrlicht-1.8/source/Irrlicht/Irrlicht.cpp
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/source/Irrlicht/Irrlicht.cpp
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 '')
-rw-r--r--libraries/irrlicht-1.8/source/Irrlicht/Irrlicht.cpp308
1 files changed, 154 insertions, 154 deletions
diff --git a/libraries/irrlicht-1.8/source/Irrlicht/Irrlicht.cpp b/libraries/irrlicht-1.8/source/Irrlicht/Irrlicht.cpp
index da0043b..60241cc 100644
--- a/libraries/irrlicht-1.8/source/Irrlicht/Irrlicht.cpp
+++ b/libraries/irrlicht-1.8/source/Irrlicht/Irrlicht.cpp
@@ -1,154 +1,154 @@
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#include "IrrCompileConfig.h" 5#include "IrrCompileConfig.h"
6 6
7static const char* const copyright = "Irrlicht Engine (c) 2002-2012 Nikolaus Gebhardt"; 7static const char* const copyright = "Irrlicht Engine (c) 2002-2012 Nikolaus Gebhardt";
8 8
9#ifdef _IRR_WINDOWS_ 9#ifdef _IRR_WINDOWS_
10 #include <windows.h> 10 #include <windows.h>
11 #if defined(_DEBUG) && !defined(__GNUWIN32__) && !defined(_WIN32_WCE) 11 #if defined(_DEBUG) && !defined(__GNUWIN32__) && !defined(_WIN32_WCE)
12 #include <crtdbg.h> 12 #include <crtdbg.h>
13 #endif // _DEBUG 13 #endif // _DEBUG
14#endif 14#endif
15 15
16#include "irrlicht.h" 16#include "irrlicht.h"
17#ifdef _IRR_COMPILE_WITH_WINDOWS_DEVICE_ 17#ifdef _IRR_COMPILE_WITH_WINDOWS_DEVICE_
18#include "CIrrDeviceWin32.h" 18#include "CIrrDeviceWin32.h"
19#endif 19#endif
20 20
21#ifdef _IRR_COMPILE_WITH_OSX_DEVICE_ 21#ifdef _IRR_COMPILE_WITH_OSX_DEVICE_
22#include "MacOSX/CIrrDeviceMacOSX.h" 22#include "MacOSX/CIrrDeviceMacOSX.h"
23#endif 23#endif
24 24
25#ifdef _IRR_COMPILE_WITH_WINDOWS_CE_DEVICE_ 25#ifdef _IRR_COMPILE_WITH_WINDOWS_CE_DEVICE_
26#include "CIrrDeviceWinCE.h" 26#include "CIrrDeviceWinCE.h"
27#endif 27#endif
28 28
29#ifdef _IRR_COMPILE_WITH_X11_DEVICE_ 29#ifdef _IRR_COMPILE_WITH_X11_DEVICE_
30#include "CIrrDeviceLinux.h" 30#include "CIrrDeviceLinux.h"
31#endif 31#endif
32 32
33#ifdef _IRR_COMPILE_WITH_SDL_DEVICE_ 33#ifdef _IRR_COMPILE_WITH_SDL_DEVICE_
34#include "CIrrDeviceSDL.h" 34#include "CIrrDeviceSDL.h"
35#endif 35#endif
36 36
37#ifdef _IRR_COMPILE_WITH_FB_DEVICE_ 37#ifdef _IRR_COMPILE_WITH_FB_DEVICE_
38#include "CIrrDeviceFB.h" 38#include "CIrrDeviceFB.h"
39#endif 39#endif
40 40
41#ifdef _IRR_COMPILE_WITH_CONSOLE_DEVICE_ 41#ifdef _IRR_COMPILE_WITH_CONSOLE_DEVICE_
42#include "CIrrDeviceConsole.h" 42#include "CIrrDeviceConsole.h"
43#endif 43#endif
44 44
45namespace irr 45namespace irr
46{ 46{
47 //! stub for calling createDeviceEx 47 //! stub for calling createDeviceEx
48 IRRLICHT_API IrrlichtDevice* IRRCALLCONV createDevice(video::E_DRIVER_TYPE driverType, 48 IRRLICHT_API IrrlichtDevice* IRRCALLCONV createDevice(video::E_DRIVER_TYPE driverType,
49 const core::dimension2d<u32>& windowSize, 49 const core::dimension2d<u32>& windowSize,
50 u32 bits, bool fullscreen, 50 u32 bits, bool fullscreen,
51 bool stencilbuffer, bool vsync, IEventReceiver* res) 51 bool stencilbuffer, bool vsync, IEventReceiver* res)
52 { 52 {
53 SIrrlichtCreationParameters p; 53 SIrrlichtCreationParameters p;
54 p.DriverType = driverType; 54 p.DriverType = driverType;
55 p.WindowSize = windowSize; 55 p.WindowSize = windowSize;
56 p.Bits = (u8)bits; 56 p.Bits = (u8)bits;
57 p.Fullscreen = fullscreen; 57 p.Fullscreen = fullscreen;
58 p.Stencilbuffer = stencilbuffer; 58 p.Stencilbuffer = stencilbuffer;
59 p.Vsync = vsync; 59 p.Vsync = vsync;
60 p.EventReceiver = res; 60 p.EventReceiver = res;
61 61
62 return createDeviceEx(p); 62 return createDeviceEx(p);
63 } 63 }
64 64
65 extern "C" IRRLICHT_API IrrlichtDevice* IRRCALLCONV createDeviceEx(const SIrrlichtCreationParameters& params) 65 extern "C" IRRLICHT_API IrrlichtDevice* IRRCALLCONV createDeviceEx(const SIrrlichtCreationParameters& params)
66 { 66 {
67 67
68 IrrlichtDevice* dev = 0; 68 IrrlichtDevice* dev = 0;
69 69
70#ifdef _IRR_COMPILE_WITH_WINDOWS_DEVICE_ 70#ifdef _IRR_COMPILE_WITH_WINDOWS_DEVICE_
71 if (params.DeviceType == EIDT_WIN32 || (!dev && params.DeviceType == EIDT_BEST)) 71 if (params.DeviceType == EIDT_WIN32 || (!dev && params.DeviceType == EIDT_BEST))
72 dev = new CIrrDeviceWin32(params); 72 dev = new CIrrDeviceWin32(params);
73#endif 73#endif
74 74
75#ifdef _IRR_COMPILE_WITH_OSX_DEVICE_ 75#ifdef _IRR_COMPILE_WITH_OSX_DEVICE_
76 if (params.DeviceType == EIDT_OSX || (!dev && params.DeviceType == EIDT_BEST)) 76 if (params.DeviceType == EIDT_OSX || (!dev && params.DeviceType == EIDT_BEST))
77 dev = new CIrrDeviceMacOSX(params); 77 dev = new CIrrDeviceMacOSX(params);
78#endif 78#endif
79 79
80#ifdef _IRR_COMPILE_WITH_WINDOWS_CE_DEVICE_ 80#ifdef _IRR_COMPILE_WITH_WINDOWS_CE_DEVICE_
81 if (params.DeviceType == EIDT_WINCE || (!dev && params.DeviceType == EIDT_BEST)) 81 if (params.DeviceType == EIDT_WINCE || (!dev && params.DeviceType == EIDT_BEST))
82 dev = new CIrrDeviceWinCE(params); 82 dev = new CIrrDeviceWinCE(params);
83#endif 83#endif
84 84
85#ifdef _IRR_COMPILE_WITH_X11_DEVICE_ 85#ifdef _IRR_COMPILE_WITH_X11_DEVICE_
86 if (params.DeviceType == EIDT_X11 || (!dev && params.DeviceType == EIDT_BEST)) 86 if (params.DeviceType == EIDT_X11 || (!dev && params.DeviceType == EIDT_BEST))
87 dev = new CIrrDeviceLinux(params); 87 dev = new CIrrDeviceLinux(params);
88#endif 88#endif
89 89
90#ifdef _IRR_COMPILE_WITH_SDL_DEVICE_ 90#ifdef _IRR_COMPILE_WITH_SDL_DEVICE_
91 if (params.DeviceType == EIDT_SDL || (!dev && params.DeviceType == EIDT_BEST)) 91 if (params.DeviceType == EIDT_SDL || (!dev && params.DeviceType == EIDT_BEST))
92 dev = new CIrrDeviceSDL(params); 92 dev = new CIrrDeviceSDL(params);
93#endif 93#endif
94 94
95#ifdef _IRR_COMPILE_WITH_FB_DEVICE_ 95#ifdef _IRR_COMPILE_WITH_FB_DEVICE_
96 if (params.DeviceType == EIDT_FRAMEBUFFER || (!dev && params.DeviceType == EIDT_BEST)) 96 if (params.DeviceType == EIDT_FRAMEBUFFER || (!dev && params.DeviceType == EIDT_BEST))
97 dev = new CIrrDeviceFB(params); 97 dev = new CIrrDeviceFB(params);
98#endif 98#endif
99 99
100#ifdef _IRR_COMPILE_WITH_CONSOLE_DEVICE_ 100#ifdef _IRR_COMPILE_WITH_CONSOLE_DEVICE_
101 if (params.DeviceType == EIDT_CONSOLE || (!dev && params.DeviceType == EIDT_BEST)) 101 if (params.DeviceType == EIDT_CONSOLE || (!dev && params.DeviceType == EIDT_BEST))
102 dev = new CIrrDeviceConsole(params); 102 dev = new CIrrDeviceConsole(params);
103#endif 103#endif
104 104
105 if (dev && !dev->getVideoDriver() && params.DriverType != video::EDT_NULL) 105 if (dev && !dev->getVideoDriver() && params.DriverType != video::EDT_NULL)
106 { 106 {
107 dev->closeDevice(); // destroy window 107 dev->closeDevice(); // destroy window
108 dev->run(); // consume quit message 108 dev->run(); // consume quit message
109 dev->drop(); 109 dev->drop();
110 dev = 0; 110 dev = 0;
111 } 111 }
112 112
113 return dev; 113 return dev;
114 } 114 }
115 115
116namespace core 116namespace core
117{ 117{
118 const matrix4 IdentityMatrix(matrix4::EM4CONST_IDENTITY); 118 const matrix4 IdentityMatrix(matrix4::EM4CONST_IDENTITY);
119 irr::core::stringc LOCALE_DECIMAL_POINTS("."); 119 irr::core::stringc LOCALE_DECIMAL_POINTS(".");
120} 120}
121 121
122namespace video 122namespace video
123{ 123{
124 SMaterial IdentityMaterial; 124 SMaterial IdentityMaterial;
125} 125}
126 126
127} // end namespace irr 127} // end namespace irr
128 128
129 129
130#if defined(_IRR_WINDOWS_API_) 130#if defined(_IRR_WINDOWS_API_)
131 131
132BOOL APIENTRY DllMain( HANDLE hModule, 132BOOL APIENTRY DllMain( HANDLE hModule,
133 DWORD ul_reason_for_call, 133 DWORD ul_reason_for_call,
134 LPVOID lpReserved ) 134 LPVOID lpReserved )
135{ 135{
136 // _crtBreakAlloc = 139; 136 // _crtBreakAlloc = 139;
137 137
138 switch (ul_reason_for_call) 138 switch (ul_reason_for_call)
139 { 139 {
140 case DLL_PROCESS_ATTACH: 140 case DLL_PROCESS_ATTACH:
141 #if defined(_DEBUG) && !defined(__GNUWIN32__) && !defined(__BORLANDC__) && !defined (_WIN32_WCE) && !defined (_IRR_XBOX_PLATFORM_) 141 #if defined(_DEBUG) && !defined(__GNUWIN32__) && !defined(__BORLANDC__) && !defined (_WIN32_WCE) && !defined (_IRR_XBOX_PLATFORM_)
142 _CrtSetDbgFlag(_CRTDBG_LEAK_CHECK_DF | _CRTDBG_ALLOC_MEM_DF); 142 _CrtSetDbgFlag(_CRTDBG_LEAK_CHECK_DF | _CRTDBG_ALLOC_MEM_DF);
143 #endif 143 #endif
144 break; 144 break;
145 case DLL_THREAD_ATTACH: 145 case DLL_THREAD_ATTACH:
146 case DLL_THREAD_DETACH: 146 case DLL_THREAD_DETACH:
147 case DLL_PROCESS_DETACH: 147 case DLL_PROCESS_DETACH:
148 break; 148 break;
149 } 149 }
150 return TRUE; 150 return TRUE;
151} 151}
152 152
153#endif // defined(_IRR_WINDOWS_) 153#endif // defined(_IRR_WINDOWS_)
154 154