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