From 959831f4ef5a3e797f576c3de08cd65032c997ad Mon Sep 17 00:00:00 2001 From: David Walter Seikel Date: Sun, 13 Jan 2013 18:54:10 +1000 Subject: Remove damned ancient DOS line endings from Irrlicht. Hopefully I did not go overboard. --- libraries/irrlicht-1.8/tools/GUIEditor/main.cpp | 152 ++++++++++++------------ 1 file changed, 76 insertions(+), 76 deletions(-) (limited to 'libraries/irrlicht-1.8/tools/GUIEditor/main.cpp') diff --git a/libraries/irrlicht-1.8/tools/GUIEditor/main.cpp b/libraries/irrlicht-1.8/tools/GUIEditor/main.cpp index e8434b2..1d917d3 100644 --- a/libraries/irrlicht-1.8/tools/GUIEditor/main.cpp +++ b/libraries/irrlicht-1.8/tools/GUIEditor/main.cpp @@ -1,76 +1,76 @@ -#include -#include "driverChoice.h" - -// include the gui creator element factory -#include "CGUIEditFactory.h" - -using namespace irr; -using namespace gui; - -#ifdef _MSC_VER -#pragma comment(lib, "Irrlicht.lib") -#endif - -int main() -{ - // ask user for driver - video::E_DRIVER_TYPE driverType=driverChoiceConsole(); - if (driverType==video::EDT_COUNT) - return 1; - - IrrlichtDevice *device = createDevice(driverType, core::dimension2du(800, 600)); - video::IVideoDriver* driver = device->getVideoDriver(); - scene::ISceneManager* smgr = device->getSceneManager(); - gui::IGUIEnvironment *env = device->getGUIEnvironment(); - - device->setResizable(true); - - /* - first we create the factory which can make new GUI elements - and register it with the gui environment. - */ - - IGUIElementFactory* factory = new CGUIEditFactory(env); - env->registerGUIElementFactory(factory); - // remember to drop since we created with a create call - factory->drop(); - - IGUISkin *skin = env->createSkin(EGST_WINDOWS_METALLIC); - env->setSkin(skin); - - IGUIFont *font = env->getFont("../../media/lucida.xml"); - if (font) - skin->setFont(font); - skin->drop(); - - // change transparency of skin - for (s32 i=0; igetSkin()->getColor((gui::EGUI_DEFAULT_COLOR)i); - col.setAlpha(250); - env->getSkin()->setColor((gui::EGUI_DEFAULT_COLOR)i, col); - } - - /* - now we add the GUI Editor Workspace - */ - - env->addGUIElement("GUIEditor"); - - while(device->run()) - { - device->sleep(10); - - if (device->isWindowActive()) - { - driver->beginScene(true, true, video::SColor(0,200,200,200)); - smgr->drawAll(); - env->drawAll(); - driver->endScene(); - } - } - - device->drop(); - - return 0; -} +#include +#include "driverChoice.h" + +// include the gui creator element factory +#include "CGUIEditFactory.h" + +using namespace irr; +using namespace gui; + +#ifdef _MSC_VER +#pragma comment(lib, "Irrlicht.lib") +#endif + +int main() +{ + // ask user for driver + video::E_DRIVER_TYPE driverType=driverChoiceConsole(); + if (driverType==video::EDT_COUNT) + return 1; + + IrrlichtDevice *device = createDevice(driverType, core::dimension2du(800, 600)); + video::IVideoDriver* driver = device->getVideoDriver(); + scene::ISceneManager* smgr = device->getSceneManager(); + gui::IGUIEnvironment *env = device->getGUIEnvironment(); + + device->setResizable(true); + + /* + first we create the factory which can make new GUI elements + and register it with the gui environment. + */ + + IGUIElementFactory* factory = new CGUIEditFactory(env); + env->registerGUIElementFactory(factory); + // remember to drop since we created with a create call + factory->drop(); + + IGUISkin *skin = env->createSkin(EGST_WINDOWS_METALLIC); + env->setSkin(skin); + + IGUIFont *font = env->getFont("../../media/lucida.xml"); + if (font) + skin->setFont(font); + skin->drop(); + + // change transparency of skin + for (s32 i=0; igetSkin()->getColor((gui::EGUI_DEFAULT_COLOR)i); + col.setAlpha(250); + env->getSkin()->setColor((gui::EGUI_DEFAULT_COLOR)i, col); + } + + /* + now we add the GUI Editor Workspace + */ + + env->addGUIElement("GUIEditor"); + + while(device->run()) + { + device->sleep(10); + + if (device->isWindowActive()) + { + driver->beginScene(true, true, video::SColor(0,200,200,200)); + smgr->drawAll(); + env->drawAll(); + driver->endScene(); + } + } + + device->drop(); + + return 0; +} -- cgit v1.1