Commit 41d6633d authored by hybrid's avatar hybrid

Fix eol-style for all code files to CRLF for simpler file handling.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@2528 dfc29bdd-3216-0410-991c-e03cc46cb475
parent 3f924718
This diff is collapsed.
...@@ -71,8 +71,8 @@ public: ...@@ -71,8 +71,8 @@ public:
virtual IGUISkin* createSkin(EGUI_SKIN_TYPE type); virtual IGUISkin* createSkin(EGUI_SKIN_TYPE type);
//! Creates the image list from the given texture. //! Creates the image list from the given texture.
virtual IGUIImageList* createImageList( video::ITexture* texture, virtual IGUIImageList* createImageList( video::ITexture* texture,
core::dimension2d<s32> imageSize, bool useAlphaChannel ); core::dimension2d<s32> imageSize, bool useAlphaChannel );
//! returns the font //! returns the font
virtual IGUIFont* getFont(const core::string<c16>& filename); virtual IGUIFont* getFont(const core::string<c16>& filename);
......
...@@ -46,11 +46,10 @@ CGUIImageList::~CGUIImageList() ...@@ -46,11 +46,10 @@ CGUIImageList::~CGUIImageList()
} }
//! Creates the image list from texture. //! Creates the image list from texture.
bool CGUIImageList::createImageList( video::ITexture* texture, bool CGUIImageList::createImageList(video::ITexture* texture,
core::dimension2d<s32> imageSize, core::dimension2d<s32> imageSize,
bool useAlphaChannel bool useAlphaChannel)
)
{ {
if( !texture ) if( !texture )
{ {
......
...@@ -79,12 +79,12 @@ namespace irr ...@@ -79,12 +79,12 @@ namespace irr
virtual void setResizable(bool resize=false); virtual void setResizable(bool resize=false);
//! Minimizes the window. //! Minimizes the window.
virtual void minimizeWindow(); virtual void minimizeWindow();
//! Get the device type //! Get the device type
virtual E_DEVICE_TYPE getType() const virtual E_DEVICE_TYPE getType() const
{ {
return EIDT_CONSOLE; return EIDT_CONSOLE;
} }
void addPostPresentText(s16 X, s16 Y, const wchar_t *text); void addPostPresentText(s16 X, s16 Y, const wchar_t *text);
......
...@@ -102,12 +102,12 @@ namespace irr ...@@ -102,12 +102,12 @@ namespace irr
//! copies text to the clipboard //! copies text to the clipboard
//! This sets the clipboard selection and _not_ the primary selection which you have on X on the middle mouse button. //! This sets the clipboard selection and _not_ the primary selection which you have on X on the middle mouse button.
virtual void copyToClipboard(const c8* text) const; virtual void copyToClipboard(const c8* text) const;
//! Get the device type //! Get the device type
virtual E_DEVICE_TYPE getType() const virtual E_DEVICE_TYPE getType() const
{ {
return EIDT_X11; return EIDT_X11;
} }
private: private:
......
...@@ -79,12 +79,12 @@ namespace irr ...@@ -79,12 +79,12 @@ namespace irr
virtual bool setGammaRamp( f32 red, f32 green, f32 blue, f32 brightness, f32 contrast ); virtual bool setGammaRamp( f32 red, f32 green, f32 blue, f32 brightness, f32 contrast );
//! Get the current Gamma Value for the Display //! Get the current Gamma Value for the Display
virtual bool getGammaRamp( f32 &red, f32 &green, f32 &blue, f32 &brightness, f32 &contrast ); virtual bool getGammaRamp( f32 &red, f32 &green, f32 &blue, f32 &brightness, f32 &contrast );
//! Get the device type //! Get the device type
virtual E_DEVICE_TYPE getType() const virtual E_DEVICE_TYPE getType() const
{ {
return EIDT_WIN32; return EIDT_WIN32;
} }
//! Compares to the last call of this function to return double and triple clicks. //! Compares to the last call of this function to return double and triple clicks.
......
...@@ -70,12 +70,12 @@ namespace irr ...@@ -70,12 +70,12 @@ namespace irr
virtual void setResizable(bool resize=false); virtual void setResizable(bool resize=false);
//! Minimizes the window. //! Minimizes the window.
virtual void minimizeWindow(); virtual void minimizeWindow();
//! Get the device type //! Get the device type
virtual E_DEVICE_TYPE getType() const virtual E_DEVICE_TYPE getType() const
{ {
return EIDT_WINCE; return EIDT_WINCE;
} }
//! Implementation of the win32 cursor control //! Implementation of the win32 cursor control
...@@ -265,5 +265,5 @@ namespace irr ...@@ -265,5 +265,5 @@ namespace irr
} // end namespace irr } // end namespace irr
#endif // _IRR_COMPILE_WITH_WINDOWS_CE_DEVICE_ #endif // _IRR_COMPILE_WITH_WINDOWS_CE_DEVICE_
#endif // __C_IRR_DEVICE_WINCE_H_INCLUDED__ #endif // __C_IRR_DEVICE_WINCE_H_INCLUDED__
...@@ -454,9 +454,9 @@ COpenGLDriver::~COpenGLDriver() ...@@ -454,9 +454,9 @@ COpenGLDriver::~COpenGLDriver()
deleteAllTextures(); deleteAllTextures();
#ifdef _IRR_COMPILE_WITH_WINDOWS_DEVICE_ #ifdef _IRR_COMPILE_WITH_WINDOWS_DEVICE_
if (DeviceType == EIDT_WIN32) if (DeviceType == EIDT_WIN32)
{ {
if (HRc) if (HRc)
{ {
...@@ -468,7 +468,7 @@ COpenGLDriver::~COpenGLDriver() ...@@ -468,7 +468,7 @@ COpenGLDriver::~COpenGLDriver()
} }
if (HDc) if (HDc)
ReleaseDC(Window, HDc); ReleaseDC(Window, HDc);
} }
#endif #endif
} }
...@@ -625,36 +625,36 @@ bool COpenGLDriver::endScene() ...@@ -625,36 +625,36 @@ bool COpenGLDriver::endScene()
glFlush(); glFlush();
#ifdef _IRR_COMPILE_WITH_WINDOWS_DEVICE_ #ifdef _IRR_COMPILE_WITH_WINDOWS_DEVICE_
if (DeviceType == EIDT_WIN32) if (DeviceType == EIDT_WIN32)
return SwapBuffers(HDc) == TRUE; return SwapBuffers(HDc) == TRUE;
#endif #endif
#ifdef _IRR_COMPILE_WITH_X11_DEVICE_ #ifdef _IRR_COMPILE_WITH_X11_DEVICE_
if (DeviceType == EIDT_X11) if (DeviceType == EIDT_X11)
{ {
glXSwapBuffers((Display*)ExposedData.OpenGLLinux.X11Display, Drawable); glXSwapBuffers((Display*)ExposedData.OpenGLLinux.X11Display, Drawable);
return true; return true;
} }
#endif #endif
#ifdef _IRR_COMPILE_WITH_OSX_DEVICE_ #ifdef _IRR_COMPILE_WITH_OSX_DEVICE_
if (DeviceType == EIDT_OSX) if (DeviceType == EIDT_OSX)
{ {
_device->flush(); _device->flush();
return true; return true;
} }
#endif #endif
#ifdef _IRR_COMPILE_WITH_SDL_DEVICE_ #ifdef _IRR_COMPILE_WITH_SDL_DEVICE_
if (DeviceType == EIDT_SDL) if (DeviceType == EIDT_SDL)
{ {
SDL_GL_SwapBuffers(); SDL_GL_SwapBuffers();
return true; return true;
} }
#endif #endif
// todo: console device present // todo: console device present
return false; return false;
} }
...@@ -693,12 +693,12 @@ bool COpenGLDriver::beginScene(bool backBuffer, bool zBuffer, SColor color, ...@@ -693,12 +693,12 @@ bool COpenGLDriver::beginScene(bool backBuffer, bool zBuffer, SColor color,
{ {
CNullDriver::beginScene(backBuffer, zBuffer, color, windowId, sourceRect); CNullDriver::beginScene(backBuffer, zBuffer, color, windowId, sourceRect);
#if defined(_IRR_COMPILE_WITH_SDL_DEVICE_) #if defined(_IRR_COMPILE_WITH_SDL_DEVICE_)
if (DeviceType == EIDT_SDL) if (DeviceType == EIDT_SDL)
{ {
// todo: SDL sets glFrontFace(GL_CCW) after driver creation, // todo: SDL sets glFrontFace(GL_CCW) after driver creation,
// it would be better if this was fixed elsewhere. // it would be better if this was fixed elsewhere.
glFrontFace(GL_CW); glFrontFace(GL_CW);
} }
#endif #endif
...@@ -3343,22 +3343,22 @@ IVideoDriver* createOpenGLDriver(const SIrrlichtCreationParameters& params, ...@@ -3343,22 +3343,22 @@ IVideoDriver* createOpenGLDriver(const SIrrlichtCreationParameters& params,
return 0; return 0;
#endif // _IRR_COMPILE_WITH_OPENGL_ #endif // _IRR_COMPILE_WITH_OPENGL_
} }
#endif // _IRR_COMPILE_WITH_X11_DEVICE_ #endif // _IRR_COMPILE_WITH_X11_DEVICE_
// ----------------------------------- // -----------------------------------
// SDL VERSION // SDL VERSION
// ----------------------------------- // -----------------------------------
#ifdef _IRR_COMPILE_WITH_SDL_DEVICE_ #ifdef _IRR_COMPILE_WITH_SDL_DEVICE_
IVideoDriver* createOpenGLDriver(const SIrrlichtCreationParameters& params, IVideoDriver* createOpenGLDriver(const SIrrlichtCreationParameters& params,
io::IFileSystem* io, CIrrDeviceSDL* device) io::IFileSystem* io, CIrrDeviceSDL* device)
{ {
#ifdef _IRR_COMPILE_WITH_OPENGL_ #ifdef _IRR_COMPILE_WITH_OPENGL_
return new COpenGLDriver(params, io, device); return new COpenGLDriver(params, io, device);
#else #else
return 0; return 0;
#endif // _IRR_COMPILE_WITH_OPENGL_ #endif // _IRR_COMPILE_WITH_OPENGL_
} }
#endif // _IRR_COMPILE_WITH_SDL_DEVICE_ #endif // _IRR_COMPILE_WITH_SDL_DEVICE_
} // end namespace } // end namespace
......
...@@ -37,14 +37,14 @@ namespace video ...@@ -37,14 +37,14 @@ namespace video
#ifdef _IRR_COMPILE_WITH_WINDOWS_DEVICE_ #ifdef _IRR_COMPILE_WITH_WINDOWS_DEVICE_
COpenGLDriver(const SIrrlichtCreationParameters& params, io::IFileSystem* io, CIrrDeviceWin32* device); COpenGLDriver(const SIrrlichtCreationParameters& params, io::IFileSystem* io, CIrrDeviceWin32* device);
#endif #endif
#ifdef _IRR_COMPILE_WITH_X11_DEVICE_ #ifdef _IRR_COMPILE_WITH_X11_DEVICE_
COpenGLDriver(const SIrrlichtCreationParameters& params, io::IFileSystem* io, CIrrDeviceLinux* device); COpenGLDriver(const SIrrlichtCreationParameters& params, io::IFileSystem* io, CIrrDeviceLinux* device);
#endif #endif
#ifdef _IRR_COMPILE_WITH_SDL_DEVICE_ #ifdef _IRR_COMPILE_WITH_SDL_DEVICE_
COpenGLDriver(const SIrrlichtCreationParameters& params, io::IFileSystem* io, CIrrDeviceSDL* device); COpenGLDriver(const SIrrlichtCreationParameters& params, io::IFileSystem* io, CIrrDeviceSDL* device);
#endif #endif
#ifdef _IRR_COMPILE_WITH_OSX_DEVICE_ #ifdef _IRR_COMPILE_WITH_OSX_DEVICE_
...@@ -408,15 +408,15 @@ namespace video ...@@ -408,15 +408,15 @@ namespace video
#ifdef _IRR_WINDOWS_API_ #ifdef _IRR_WINDOWS_API_
HDC HDc; // Private GDI Device Context HDC HDc; // Private GDI Device Context
HWND Window; HWND Window;
HGLRC HRc; // Permanent Rendering Context HGLRC HRc; // Permanent Rendering Context
#endif #endif
#ifdef _IRR_COMPILE_WITH_X11_DEVICE_ #ifdef _IRR_COMPILE_WITH_X11_DEVICE_
GLXDrawable Drawable; GLXDrawable Drawable;
#endif #endif
#ifdef _IRR_COMPILE_WITH_OSX_DEVICE_ #ifdef _IRR_COMPILE_WITH_OSX_DEVICE_
CIrrDeviceMacOSX *_device; CIrrDeviceMacOSX *_device;
#endif #endif
E_DEVICE_TYPE DeviceType; E_DEVICE_TYPE DeviceType;
}; };
......
...@@ -24,10 +24,10 @@ ...@@ -24,10 +24,10 @@
#include "glext.h" #include "glext.h"
#endif #endif
#include "wglext.h" #include "wglext.h"
#ifdef _MSC_VER #ifdef _MSC_VER
#pragma comment(lib, "OpenGL32.lib") #pragma comment(lib, "OpenGL32.lib")
#endif #endif
#elif defined(_IRR_COMPILE_WITH_OSX_DEVICE_) #elif defined(_IRR_COMPILE_WITH_OSX_DEVICE_)
#include "CIrrDeviceMacOSX.h" #include "CIrrDeviceMacOSX.h"
......
...@@ -13,33 +13,30 @@ static const char* const copyright = "Irrlicht Engine (c) 2002-2009 Nikolaus Geb ...@@ -13,33 +13,30 @@ static const char* const copyright = "Irrlicht Engine (c) 2002-2009 Nikolaus Geb
#endif // _DEBUG #endif // _DEBUG
#endif #endif
#include "irrlicht.h" #include "irrlicht.h"
#ifdef _IRR_COMPILE_WITH_WINDOWS_DEVICE_ #ifdef _IRR_COMPILE_WITH_WINDOWS_DEVICE_
#include "CIrrDeviceWin32.h" #include "CIrrDeviceWin32.h"
#endif #endif
#ifdef _IRR_COMPILE_WITH_OSX_DEVICE_ #ifdef _IRR_COMPILE_WITH_OSX_DEVICE_
#include "MacOSX/CIrrDeviceMacOSX.h" #include "MacOSX/CIrrDeviceMacOSX.h"
#endif #endif
#ifdef _IRR_COMPILE_WITH_WINDOWS_CE_DEVICE_
#ifdef _IRR_COMPILE_WITH_WINDOWS_CE_DEVICE_ #include "CIrrDeviceWinCE.h"
#include "CIrrDeviceWinCE.h" #endif
#endif
#ifdef _IRR_COMPILE_WITH_X11_DEVICE_
#include "CIrrDeviceLinux.h"
#ifdef _IRR_COMPILE_WITH_X11_DEVICE_ #endif
#include "CIrrDeviceLinux.h"
#endif #ifdef _IRR_COMPILE_WITH_SDL_DEVICE_
#include "CIrrDeviceSDL.h"
#endif
#ifdef _IRR_COMPILE_WITH_SDL_DEVICE_
#include "CIrrDeviceSDL.h" #ifdef _IRR_COMPILE_WITH_CONSOLE_DEVICE_
#endif
#ifdef _IRR_COMPILE_WITH_CONSOLE_DEVICE_
#include "CIrrDeviceConsole.h" #include "CIrrDeviceConsole.h"
#endif #endif
namespace irr namespace irr
{ {
...@@ -60,52 +57,52 @@ namespace irr ...@@ -60,52 +57,52 @@ namespace irr
return createDeviceEx(p); return createDeviceEx(p);
} }
extern "C" IRRLICHT_API IrrlichtDevice* IRRCALLCONV createDeviceEx(const SIrrlichtCreationParameters& params) extern "C" IRRLICHT_API IrrlichtDevice* IRRCALLCONV createDeviceEx(const SIrrlichtCreationParameters& params)
{ {
IrrlichtDevice* dev = 0; IrrlichtDevice* dev = 0;
#ifdef _IRR_COMPILE_WITH_WINDOWS_DEVICE_ #ifdef _IRR_COMPILE_WITH_WINDOWS_DEVICE_
if (params.DeviceType == EIDT_WIN32 || (!dev && params.DeviceType == EIDT_BEST)) if (params.DeviceType == EIDT_WIN32 || (!dev && params.DeviceType == EIDT_BEST))
dev = new CIrrDeviceWin32(params); dev = new CIrrDeviceWin32(params);
#endif #endif
#ifdef _IRR_COMPILE_WITH_OSX_DEVICE_ #ifdef _IRR_COMPILE_WITH_OSX_DEVICE_
if (params.DeviceType == EIDT_OSX || (!dev && params.DeviceType == EIDT_BEST)) if (params.DeviceType == EIDT_OSX || (!dev && params.DeviceType == EIDT_BEST))
dev = new CIrrDeviceMacOSX(params); dev = new CIrrDeviceMacOSX(params);
#endif #endif
#ifdef _IRR_COMPILE_WITH_WINDOWS_CE_DEVICE_ #ifdef _IRR_COMPILE_WITH_WINDOWS_CE_DEVICE_
if (params.DeviceType == EIDT_WINCE || (!dev && params.DeviceType == EIDT_BEST)) if (params.DeviceType == EIDT_WINCE || (!dev && params.DeviceType == EIDT_BEST))
dev = new CIrrDeviceWinCE(params); dev = new CIrrDeviceWinCE(params);
#endif #endif
#ifdef _IRR_COMPILE_WITH_X11_DEVICE_ #ifdef _IRR_COMPILE_WITH_X11_DEVICE_
if (params.DeviceType == EIDT_X11 || (!dev && params.DeviceType == EIDT_BEST)) if (params.DeviceType == EIDT_X11 || (!dev && params.DeviceType == EIDT_BEST))
dev = new CIrrDeviceLinux(params); dev = new CIrrDeviceLinux(params);
#endif #endif
#ifdef _IRR_COMPILE_WITH_SDL_DEVICE_ #ifdef _IRR_COMPILE_WITH_SDL_DEVICE_
if (params.DeviceType == EIDT_SDL || (!dev && params.DeviceType == EIDT_BEST)) if (params.DeviceType == EIDT_SDL || (!dev && params.DeviceType == EIDT_BEST))
dev = new CIrrDeviceSDL(params); dev = new CIrrDeviceSDL(params);
#endif #endif
#ifdef _IRR_COMPILE_WITH_CONSOLE_DEVICE_ #ifdef _IRR_COMPILE_WITH_CONSOLE_DEVICE_
if (params.DeviceType == EIDT_CONSOLE || (!dev && params.DeviceType == EIDT_BEST)) if (params.DeviceType == EIDT_CONSOLE || (!dev && params.DeviceType == EIDT_BEST))
dev = new CIrrDeviceConsole(params); dev = new CIrrDeviceConsole(params);
#endif #endif
if (dev && !dev->getVideoDriver() && params.DriverType != video::EDT_NULL) if (dev && !dev->getVideoDriver() && params.DriverType != video::EDT_NULL)
{ {
dev->closeDevice(); // destroy window dev->closeDevice(); // destroy window
dev->run(); // consume quit message dev->run(); // consume quit message
dev->drop(); dev->drop();
dev = 0; dev = 0;
} }
return dev; return dev;
} }
namespace core namespace core
{ {
......
// Copyright (C) 2005-2009 Etienne Petitjean // Copyright (C) 2005-2009 Etienne Petitjean
// This file is part of the "Irrlicht Engine". // This file is part of the "Irrlicht Engine".
// For conditions of distribution and use, see copyright notice in Irrlicht.h // For conditions of distribution and use, see copyright notice in Irrlicht.h
#include "IrrCompileConfig.h" #include "IrrCompileConfig.h"
#ifdef _IRR_USE_OSX_DEVICE_ #ifdef _IRR_USE_OSX_DEVICE_
#import <Cocoa/Cocoa.h> #import <Cocoa/Cocoa.h>
#import "CIrrDeviceMacOSX.h" #import "CIrrDeviceMacOSX.h"
@interface AppDelegate : NSObject @interface AppDelegate : NSObject
{ {
BOOL _quit; BOOL _quit;
irr::CIrrDeviceMacOSX *_device; irr::CIrrDeviceMacOSX *_device;
} }
- (id)initWithDevice:(irr::CIrrDeviceMacOSX *)device; - (id)initWithDevice:(irr::CIrrDeviceMacOSX *)device;
- (BOOL)isQuit; - (BOOL)isQuit;
@end @end
#endif // _IRR_USE_OSX_DEVICE_ #endif // _IRR_USE_OSX_DEVICE_
This diff is collapsed.
// Copyright (C) 2005-2009 Etienne Petitjean // Copyright (C) 2005-2009 Etienne Petitjean
// This file is part of the "Irrlicht Engine". // This file is part of the "Irrlicht Engine".
// For conditions of distribution and use, see copyright notice in Irrlicht.h // For conditions of distribution and use, see copyright notice in Irrlicht.h
#include "OSXClipboard.h" #include "OSXClipboard.h"
#import <Cocoa/Cocoa.h> #import <Cocoa/Cocoa.h>
void OSXCopyToClipboard(const char *text) void OSXCopyToClipboard(const char *text)
{ {
NSString *str; NSString *str;
NSPasteboard *board; NSPasteboard *board;
if (text != NULL && strlen(text) > 0) if (text != NULL && strlen(text) > 0)
{ {
str = [NSString stringWithCString:text encoding:NSWindowsCP1252StringEncoding]; str = [NSString stringWithCString:text encoding:NSWindowsCP1252StringEncoding];
board = [NSPasteboard generalPasteboard]; board = [NSPasteboard generalPasteboard];
[board declareTypes:[NSArray arrayWithObject:NSStringPboardType] owner:NSApp]; [board declareTypes:[NSArray arrayWithObject:NSStringPboardType] owner:NSApp];
[board setString:str forType:NSStringPboardType]; [board setString:str forType:NSStringPboardType];
} }
} }
char* OSXCopyFromClipboard() char* OSXCopyFromClipboard()
{ {
NSString *str; NSString *str;
NSPasteboard *board; NSPasteboard *board;
char *result; char *result;
result = NULL; result = NULL;
board = [NSPasteboard generalPasteboard]; board = [NSPasteboard generalPasteboard];
str = [board stringForType:NSStringPboardType]; str = [board stringForType:NSStringPboardType];
if (str != nil) result = (char*)[str cStringUsingEncoding:NSWindowsCP1252StringEncoding]; if (str != nil) result = (char*)[str cStringUsingEncoding:NSWindowsCP1252StringEncoding];
return (result); return (result);
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment