diff --git a/src/graphics/render.cpp b/src/graphics/render.cpp index 49c1a9d5a..545695739 100644 --- a/src/graphics/render.cpp +++ b/src/graphics/render.cpp @@ -539,12 +539,10 @@ void IrrDriver::renderFixed(float dt) void IrrDriver::computeSunVisibility() { // Is the lens flare enabled & visible? Check last frame's query. - bool hasflare = false; bool hasgodrays = false; if (World::getWorld() != NULL) { - hasflare = World::getWorld()->getTrack()->hasLensFlare(); hasgodrays = World::getWorld()->getTrack()->hasGodRays(); } diff --git a/src/graphics/rtts.cpp b/src/graphics/rtts.cpp index 4385b17b0..73f5a8ef6 100644 --- a/src/graphics/rtts.cpp +++ b/src/graphics/rtts.cpp @@ -109,8 +109,8 @@ RTT::RTT(size_t width, size_t height) RenderTargetTextures[RTT_MLAA_BLEND] = generateRTT(res, GL_SRGB8_ALPHA8, GL_BGR, GL_UNSIGNED_BYTE); RenderTargetTextures[RTT_SSAO] = generateRTT(res, GL_R16F, GL_RED, GL_FLOAT); RenderTargetTextures[RTT_DISPLACE] = generateRTT(res, GL_RGBA16F, GL_BGRA, GL_FLOAT); - RenderTargetTextures[RTT_DIFFUSE] = generateRTT(res, GL_RGBA16F, GL_BGRA, GL_FLOAT); - RenderTargetTextures[RTT_SPECULAR] = generateRTT(res, GL_RGBA16F, GL_BGRA, GL_FLOAT); + RenderTargetTextures[RTT_DIFFUSE] = generateRTT(res, GL_R11F_G11F_B10F, GL_BGR, GL_FLOAT); + RenderTargetTextures[RTT_SPECULAR] = generateRTT(res, GL_R11F_G11F_B10F, GL_BGR, GL_FLOAT); RenderTargetTextures[RTT_HALF1] = generateRTT(half, GL_RGBA16F, GL_BGRA, GL_FLOAT); RenderTargetTextures[RTT_QUARTER1] = generateRTT(quarter, GL_RGBA16F, GL_BGRA, GL_FLOAT); diff --git a/src/guiengine/widgets/dynamic_ribbon_widget.cpp b/src/guiengine/widgets/dynamic_ribbon_widget.cpp index 5900316ff..bf2cdea17 100644 --- a/src/guiengine/widgets/dynamic_ribbon_widget.cpp +++ b/src/guiengine/widgets/dynamic_ribbon_widget.cpp @@ -482,7 +482,8 @@ void DynamicRibbonWidget::addAnimatedItem( const irr::core::stringw& user_name, virtual void IGUIElement::OnPostRender (u32 timeMs) \brief animate the element and its children. */ - GUIEngine::needsUpdate.push_back(this); + if (!GUIEngine::needsUpdate.contains(this)) + GUIEngine::needsUpdate.push_back(this); } } @@ -497,6 +498,7 @@ void DynamicRibbonWidget::clearItems() m_items.clear(); m_animated_contents = false; m_scroll_offset = 0; + GUIEngine::needsUpdate.remove(this); } // ----------------------------------------------------------------------------- void DynamicRibbonWidget::elementRemoved() diff --git a/src/race/grand_prix_manager.cpp b/src/race/grand_prix_manager.cpp index 73eb589be..f4376b441 100644 --- a/src/race/grand_prix_manager.cpp +++ b/src/race/grand_prix_manager.cpp @@ -24,8 +24,7 @@ #include #include -#include -#include + GrandPrixManager *grand_prix_manager = NULL; diff --git a/src/states_screens/edit_gp_screen.cpp b/src/states_screens/edit_gp_screen.cpp index 837814ed1..7e4202b73 100644 --- a/src/states_screens/edit_gp_screen.cpp +++ b/src/states_screens/edit_gp_screen.cpp @@ -261,6 +261,10 @@ void EditGPScreen::loadList(const int selected) m_list->setSelectionID(selected); setSelected(selected); } + else + { + enableButtons(); + } } // ----------------------------------------------------------------------------- diff --git a/src/states_screens/gp_info_screen.cpp b/src/states_screens/gp_info_screen.cpp index 4b6bd804e..4539320be 100644 --- a/src/states_screens/gp_info_screen.cpp +++ b/src/states_screens/gp_info_screen.cpp @@ -175,7 +175,7 @@ void GPInfoScreen::init() // been added or deleted since the last time this screen was shown. m_group_spinner->clearLabels(); m_group_spinner->addLabel("all"); - int index_standard; + int index_standard=0; const std::vector& groups = track_manager->getAllTrackGroups(); for (unsigned int i = 0; i < groups.size(); i++) { diff --git a/src/states_screens/tracks_screen.cpp b/src/states_screens/tracks_screen.cpp index 348d3420e..9e25c46d4 100644 --- a/src/states_screens/tracks_screen.cpp +++ b/src/states_screens/tracks_screen.cpp @@ -67,9 +67,6 @@ void TracksScreen::eventCallback(Widget* widget, const std::string& name, if (selection == "random_track") { - RibbonWidget* tabs = getWidget("trackgroups"); - assert(tabs); - if (m_random_track_list.empty()) return; std::string track = m_random_track_list.front(); diff --git a/src/tracks/track.cpp b/src/tracks/track.cpp index 64734ebd4..bf734a488 100644 --- a/src/tracks/track.cpp +++ b/src/tracks/track.cpp @@ -123,7 +123,6 @@ Track::Track(const std::string &filename) m_color_inlevel = core::vector3df(0.0,1.0, 255.0); m_color_outlevel = core::vector2df(0.0, 255.0); m_clouds = false; - m_lensflare = false; m_godrays = false; m_displacement_speed = 1.0f; m_caustics_speed = 1.0f; @@ -484,7 +483,6 @@ void Track::loadTrackInfo() root->get("clouds", &m_clouds); root->get("bloom", &m_bloom); root->get("bloom-threshold", &m_bloom_threshold); - root->get("lens-flare", &m_lensflare); root->get("shadows", &m_shadows); root->get("displacement-speed", &m_displacement_speed); root->get("caustics-speed", &m_caustics_speed); diff --git a/src/tracks/track.hpp b/src/tracks/track.hpp index 4ffb8d9d1..0e6381fe1 100644 --- a/src/tracks/track.hpp +++ b/src/tracks/track.hpp @@ -377,8 +377,6 @@ private: bool m_bloom; float m_bloom_threshold; - bool m_lensflare; - bool m_godrays; core::vector3df m_godrays_position; float m_godrays_opacity; @@ -623,7 +621,7 @@ public: bool hasClouds() const { return m_clouds; } // ------------------------------------------------------------------------ - bool getBloom() const { return m_bloom; } + bool hasBloom() const { return m_bloom; } // ------------------------------------------------------------------------ float getBloomThreshold() const { return m_bloom_threshold; } @@ -633,9 +631,6 @@ public: core::vector3df getColorLevelIn() const { return m_color_inlevel; } // ------------------------------------------------------------------------ core::vector2df getColorLevelOut() const { return m_color_outlevel; } - - // ------------------------------------------------------------------------ - bool hasLensFlare() const { return m_lensflare; } // ------------------------------------------------------------------------ bool hasGodRays() const { return m_godrays; } // ------------------------------------------------------------------------