Merge branch 'master' of github.com:supertuxkart/stk-code

This commit is contained in:
hiker 2014-09-24 08:52:31 +10:00
commit 538694c1d1
9 changed files with 12 additions and 19 deletions

View File

@ -539,12 +539,10 @@ void IrrDriver::renderFixed(float dt)
void IrrDriver::computeSunVisibility() void IrrDriver::computeSunVisibility()
{ {
// Is the lens flare enabled & visible? Check last frame's query. // Is the lens flare enabled & visible? Check last frame's query.
bool hasflare = false;
bool hasgodrays = false; bool hasgodrays = false;
if (World::getWorld() != NULL) if (World::getWorld() != NULL)
{ {
hasflare = World::getWorld()->getTrack()->hasLensFlare();
hasgodrays = World::getWorld()->getTrack()->hasGodRays(); hasgodrays = World::getWorld()->getTrack()->hasGodRays();
} }

View File

@ -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_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_SSAO] = generateRTT(res, GL_R16F, GL_RED, GL_FLOAT);
RenderTargetTextures[RTT_DISPLACE] = generateRTT(res, GL_RGBA16F, GL_BGRA, 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_DIFFUSE] = generateRTT(res, GL_R11F_G11F_B10F, GL_BGR, GL_FLOAT);
RenderTargetTextures[RTT_SPECULAR] = generateRTT(res, GL_RGBA16F, GL_BGRA, 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_HALF1] = generateRTT(half, GL_RGBA16F, GL_BGRA, GL_FLOAT);
RenderTargetTextures[RTT_QUARTER1] = generateRTT(quarter, GL_RGBA16F, GL_BGRA, GL_FLOAT); RenderTargetTextures[RTT_QUARTER1] = generateRTT(quarter, GL_RGBA16F, GL_BGRA, GL_FLOAT);

View File

@ -482,7 +482,8 @@ void DynamicRibbonWidget::addAnimatedItem( const irr::core::stringw& user_name,
virtual void IGUIElement::OnPostRender (u32 timeMs) virtual void IGUIElement::OnPostRender (u32 timeMs)
\brief animate the element and its children. \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_items.clear();
m_animated_contents = false; m_animated_contents = false;
m_scroll_offset = 0; m_scroll_offset = 0;
GUIEngine::needsUpdate.remove(this);
} }
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
void DynamicRibbonWidget::elementRemoved() void DynamicRibbonWidget::elementRemoved()

View File

@ -24,8 +24,7 @@
#include <algorithm> #include <algorithm>
#include <set> #include <set>
#include <utility>
#include <sstream>
GrandPrixManager *grand_prix_manager = NULL; GrandPrixManager *grand_prix_manager = NULL;

View File

@ -261,6 +261,10 @@ void EditGPScreen::loadList(const int selected)
m_list->setSelectionID(selected); m_list->setSelectionID(selected);
setSelected(selected); setSelected(selected);
} }
else
{
enableButtons();
}
} }
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------

View File

@ -175,7 +175,7 @@ void GPInfoScreen::init()
// been added or deleted since the last time this screen was shown. // been added or deleted since the last time this screen was shown.
m_group_spinner->clearLabels(); m_group_spinner->clearLabels();
m_group_spinner->addLabel("all"); m_group_spinner->addLabel("all");
int index_standard; int index_standard=0;
const std::vector<std::string>& groups = track_manager->getAllTrackGroups(); const std::vector<std::string>& groups = track_manager->getAllTrackGroups();
for (unsigned int i = 0; i < groups.size(); i++) for (unsigned int i = 0; i < groups.size(); i++)
{ {

View File

@ -67,9 +67,6 @@ void TracksScreen::eventCallback(Widget* widget, const std::string& name,
if (selection == "random_track") if (selection == "random_track")
{ {
RibbonWidget* tabs = getWidget<RibbonWidget>("trackgroups");
assert(tabs);
if (m_random_track_list.empty()) return; if (m_random_track_list.empty()) return;
std::string track = m_random_track_list.front(); std::string track = m_random_track_list.front();

View File

@ -123,7 +123,6 @@ Track::Track(const std::string &filename)
m_color_inlevel = core::vector3df(0.0,1.0, 255.0); m_color_inlevel = core::vector3df(0.0,1.0, 255.0);
m_color_outlevel = core::vector2df(0.0, 255.0); m_color_outlevel = core::vector2df(0.0, 255.0);
m_clouds = false; m_clouds = false;
m_lensflare = false;
m_godrays = false; m_godrays = false;
m_displacement_speed = 1.0f; m_displacement_speed = 1.0f;
m_caustics_speed = 1.0f; m_caustics_speed = 1.0f;
@ -484,7 +483,6 @@ void Track::loadTrackInfo()
root->get("clouds", &m_clouds); root->get("clouds", &m_clouds);
root->get("bloom", &m_bloom); root->get("bloom", &m_bloom);
root->get("bloom-threshold", &m_bloom_threshold); root->get("bloom-threshold", &m_bloom_threshold);
root->get("lens-flare", &m_lensflare);
root->get("shadows", &m_shadows); root->get("shadows", &m_shadows);
root->get("displacement-speed", &m_displacement_speed); root->get("displacement-speed", &m_displacement_speed);
root->get("caustics-speed", &m_caustics_speed); root->get("caustics-speed", &m_caustics_speed);

View File

@ -377,8 +377,6 @@ private:
bool m_bloom; bool m_bloom;
float m_bloom_threshold; float m_bloom_threshold;
bool m_lensflare;
bool m_godrays; bool m_godrays;
core::vector3df m_godrays_position; core::vector3df m_godrays_position;
float m_godrays_opacity; float m_godrays_opacity;
@ -623,7 +621,7 @@ public:
bool hasClouds() const { return m_clouds; } 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; } float getBloomThreshold() const { return m_bloom_threshold; }
@ -633,9 +631,6 @@ public:
core::vector3df getColorLevelIn() const { return m_color_inlevel; } core::vector3df getColorLevelIn() const { return m_color_inlevel; }
// ------------------------------------------------------------------------ // ------------------------------------------------------------------------
core::vector2df getColorLevelOut() const { return m_color_outlevel; } core::vector2df getColorLevelOut() const { return m_color_outlevel; }
// ------------------------------------------------------------------------
bool hasLensFlare() const { return m_lensflare; }
// ------------------------------------------------------------------------ // ------------------------------------------------------------------------
bool hasGodRays() const { return m_godrays; } bool hasGodRays() const { return m_godrays; }
// ------------------------------------------------------------------------ // ------------------------------------------------------------------------