diff --git a/src/graphics/irr_driver.cpp b/src/graphics/irr_driver.cpp index 9c504080e..15663bf48 100644 --- a/src/graphics/irr_driver.cpp +++ b/src/graphics/irr_driver.cpp @@ -184,7 +184,7 @@ void IrrDriver::initDevice() //const std::string &font = file_manager->getFontFile("DomesticManners.xml"); //m_race_font = m_gui_env->getFont(font.c_str()); -#if (IRRLICHT_VERSION_MAJOR == 1) && (IRRLICHT_VERSION_MINOR >= 7) + video::SMaterial& material2D = m_video_driver->getMaterial2D(); material2D.setFlag(video::EMF_ANTI_ALIASING, true); for (unsigned int n=0; nenableMaterial2D(); -#endif + // set cursor visible by default (what's the default is not too clearly documented, // so let's decide ourselves...) @@ -453,11 +453,7 @@ scene::ISceneNode* IrrDriver::addWaterNode(scene::IMesh *mesh, */ scene::ISceneNode *IrrDriver::addOctTree(scene::IMesh *mesh) { -#if (IRRLICHT_VERSION_MAJOR == 1) && (IRRLICHT_VERSION_MINOR == 7) return m_scene_manager->addOctreeSceneNode(mesh); -#else - return m_scene_manager->addOctTreeSceneNode(mesh); -#endif } // addOctTree // ---------------------------------------------------------------------------- diff --git a/src/graphics/material.cpp b/src/graphics/material.cpp index d2e47ccea..442155c9f 100644 --- a/src/graphics/material.cpp +++ b/src/graphics/material.cpp @@ -174,8 +174,6 @@ void Material::setMaterialProperties(video::SMaterial *m) const m->setFlag(video::EMF_TRILINEAR_FILTER, true); } -#if (IRRLICHT_VERSION_MAJOR == 1) && (IRRLICHT_VERSION_MINOR >= 7) - if ( (m_clamp_tex & UCLAMP) != 0) { // m->setFlag(); @@ -201,7 +199,6 @@ void Material::setMaterialProperties(video::SMaterial *m) const } } -#endif if(!m_backface_culling) m->setFlag(video::EMF_BACK_FACE_CULLING, false); diff --git a/src/graphics/material_manager.cpp b/src/graphics/material_manager.cpp index b473e3372..aa9b7b258 100644 --- a/src/graphics/material_manager.cpp +++ b/src/graphics/material_manager.cpp @@ -73,11 +73,7 @@ void MaterialManager::setAllFlatMaterialFlags(scene::IMeshBuffer *mb) const void MaterialManager::setAllMaterialFlags(video::ITexture* t, scene::IMeshBuffer *mb) const { -#if (IRRLICHT_VERSION_MAJOR == 1) && (IRRLICHT_VERSION_MINOR == 7) const std::string image = StringUtils::getBasename(core::stringc(t->getName()).c_str()); -#else - const std::string image = StringUtils::getBasename(t->getName().c_str()); -#endif // Search backward so that temporary (track) textures are found first for(int i = (int)m_materials.size()-1; i>=0; i-- ) { diff --git a/src/guiengine/engine.cpp b/src/guiengine/engine.cpp index 3d07a0cf4..70a6fb02a 100644 --- a/src/guiengine/engine.cpp +++ b/src/guiengine/engine.cpp @@ -685,9 +685,7 @@ void render(float elapsed_time) g_skin->drawBGFadeColor(); } -#if (IRRLICHT_VERSION_MAJOR == 1) && (IRRLICHT_VERSION_MINOR >= 7) g_driver->enableMaterial2D(); -#endif if (gamestate == MENU || gamestate == INGAME_MENU) { @@ -742,9 +740,8 @@ void render(float elapsed_time) } } -#if (IRRLICHT_VERSION_MAJOR == 1) && (IRRLICHT_VERSION_MINOR >= 7) g_driver->enableMaterial2D(false); -#endif + } // render // ----------------------------------------------------------------------------- diff --git a/src/guiengine/skin.cpp b/src/guiengine/skin.cpp index d14530df8..157ececab 100644 --- a/src/guiengine/skin.cpp +++ b/src/guiengine/skin.cpp @@ -1509,18 +1509,11 @@ void Skin::drawBGFadeColor() // ----------------------------------------------------------------------------- -#if (IRRLICHT_VERSION_MAJOR == 1) && (IRRLICHT_VERSION_MINOR==7) core::rect< s32 > Skin::draw3DWindowBackground(IGUIElement *element, bool drawTitleBar, video::SColor titleBarColor, const core::rect< s32 > &rect, const core::rect< s32 > *clip, core::rect* checkClientArea) -#else -core::rect< s32 > Skin::draw3DWindowBackground(IGUIElement *element, bool drawTitleBar, - video::SColor titleBarColor, - const core::rect< s32 > &rect, - const core::rect< s32 > *clip) -#endif { drawBGFadeColor(); diff --git a/src/guiengine/skin.hpp b/src/guiengine/skin.hpp index 522b0ae52..db6d254b3 100644 --- a/src/guiengine/skin.hpp +++ b/src/guiengine/skin.hpp @@ -288,12 +288,10 @@ namespace GUIEngine virtual void draw3DTabBody (irr::gui::IGUIElement *element, bool border, bool background, const irr::core::rect< irr::s32 > &rect, const irr::core::rect< irr::s32 > *clip, irr::s32 tabHeight=-1, irr::gui::EGUI_ALIGNMENT alignment=irr::gui::EGUIA_UPPERLEFT); virtual void draw3DTabButton (irr::gui::IGUIElement *element, bool active, const irr::core::rect< irr::s32 > &rect, const irr::core::rect< irr::s32 > *clip, irr::gui::EGUI_ALIGNMENT alignment=irr::gui::EGUIA_UPPERLEFT); virtual void draw3DToolBar (irr::gui::IGUIElement *element, const irr::core::rect< irr::s32 > &rect, const irr::core::rect< irr::s32 > *clip); -#if (IRRLICHT_VERSION_MAJOR == 1) && (IRRLICHT_VERSION_MINOR==7) + virtual irr::core::rect< irr::s32 > draw3DWindowBackground (irr::gui::IGUIElement *element, bool drawTitleBar, irr::video::SColor titleBarColor, const irr::core::rect< irr::s32 > &rect, const irr::core::rect< irr::s32 > *clip, irr::core::rect* checkClientArea=0); -#else - virtual irr::core::rect< irr::s32 > draw3DWindowBackground (irr::gui::IGUIElement *element, bool drawTitleBar, irr::video::SColor titleBarColor, const irr::core::rect< irr::s32 > &rect, const irr::core::rect< irr::s32 > *clip); -#endif + virtual void drawIcon (irr::gui::IGUIElement *element, irr::gui::EGUI_DEFAULT_ICON icon, const irr::core::position2di position, irr::u32 starttime, irr::u32 currenttime, bool loop=false, const irr::core::rect< irr::s32 > *clip=NULL); virtual irr::video::SColor getColor (irr::gui::EGUI_DEFAULT_COLOR color) const; virtual const wchar_t* getDefaultText (irr::gui::EGUI_DEFAULT_TEXT text) const; diff --git a/src/states_screens/feature_unlocked.cpp b/src/states_screens/feature_unlocked.cpp index 8caa77057..4c8eb0f4d 100644 --- a/src/states_screens/feature_unlocked.cpp +++ b/src/states_screens/feature_unlocked.cpp @@ -196,13 +196,8 @@ void FeatureUnlockedCutScene::init() m.Shininess = 0; //m.setFlag(video::EMF_TEXTURE_WRAP, false); - #if (IRRLICHT_VERSION_MAJOR == 1) && (IRRLICHT_VERSION_MINOR >= 7) m.TextureLayer[0].TextureWrapU = video::ETC_CLAMP_TO_EDGE; m.TextureLayer[0].TextureWrapV = video::ETC_CLAMP_TO_EDGE; - #else - m.TextureLayer[0].TextureWrap = video::ETC_CLAMP_TO_EDGE; - #endif - scene::IMesh* mesh = irr_driver->createTexturedQuadMesh(&m, m_unlocked_stuff[n].m_w, m_unlocked_stuff[n].m_h); diff --git a/src/tracks/track.cpp b/src/tracks/track.cpp index 66c57ec43..a121fafbf 100644 --- a/src/tracks/track.cpp +++ b/src/tracks/track.cpp @@ -382,12 +382,9 @@ void Track::convertTrackToBullet(const scene::IMesh *mesh, const Material* material=0; TriangleMesh *tmesh = m_track_mesh; - if(t) { -#if (IRRLICHT_VERSION_MAJOR == 1) && (IRRLICHT_VERSION_MINOR == 7) + if(t) + { std::string image = std::string(core::stringc(t->getName()).c_str()); -#else - std::string image = std::string(t->getName().c_str()); -#endif material=material_manager->getMaterial(StringUtils::getBasename(image)); // Zipper are converted to non-collision mesh, since otherwise // the road becomes 'bumpy' if the meshes are not 100% correctly @@ -532,11 +529,7 @@ void Track::handleAnimatedTextures(scene::ISceneNode *node, const XMLNode &xml) video::ITexture* t=irrMaterial.getTexture(j); if(!t) continue; const std::string texture_name = -#if (IRRLICHT_VERSION_MAJOR == 1) && (IRRLICHT_VERSION_MINOR == 7) StringUtils::getBasename(core::stringc(t->getName()).c_str()); -#else - StringUtils::getBasename(t->getName().c_str()); -#endif if(texture_name!=name) continue; core::matrix4 *m = &irrMaterial.getTextureMatrix(j); m_animated_textures.push_back(new MovingTexture(m, *texture_node));