From 7f12f345650d8c7e704f844644494f91901d9536 Mon Sep 17 00:00:00 2001 From: Didier Raboud Date: Sun, 19 Jan 2014 11:03:52 +0100 Subject: Replace the patch to hide the black squares bug by the upstream fix --- debian/patches/i225-hide-black-squares-bug.patch | 48 ++++++++++++++---------- 1 file changed, 29 insertions(+), 19 deletions(-) diff --git a/debian/patches/i225-hide-black-squares-bug.patch b/debian/patches/i225-hide-black-squares-bug.patch index 8425043..c405688 100644 --- a/debian/patches/i225-hide-black-squares-bug.patch +++ b/debian/patches/i225-hide-black-squares-bug.patch @@ -1,20 +1,30 @@ -Description: Hide upstream issue #225 "Black rectangles shows due to particle and fire effects" -Author: Didier Raboud -Origin: vendor -Forwarded: https://github.com/colobot/colobot/issues/225 -Last-Updated: 2013-11-26 ---- a/src/graphics/engine/particle.cpp -+++ b/src/graphics/engine/particle.cpp -@@ -2875,6 +2875,12 @@ - vertex[2] = Vertex(corner[3], n, Math::Point(m_particle[i].texSup.x, m_particle[i].texInf.y)); - vertex[3] = Vertex(corner[2], n, Math::Point(m_particle[i].texInf.x, m_particle[i].texInf.y)); +commit 70b18cc4c05398cd06558f4634937a70c2436546 +Author: Piotr Dziwinski +Date: Sat Jan 18 21:35:32 2014 +0100 + + Move engine frame update after game state update + + This should finally fix #225 + +--- a/src/app/app.cpp ++++ b/src/app/app.cpp +@@ -962,15 +962,15 @@ + { + LogEvent(event); -+ // On first call, the coordinates are all 0, in that case, return as it's wrong. -+ if((m_particle[i].texSup.x-m_particle[i].texInf.x) == 0.0f || (m_particle[i].texSup.y - m_particle[i].texInf.y) == 0.0f ) { -+ // One particle texture dimension is zero, most probably wrong! -+ // Don't display it then. -+ return; -+ } - m_device->DrawPrimitive(PRIMITIVE_TRIANGLE_STRIP, vertex, 4); - m_engine->AddStatisticTriangle(2); - } +- StartPerformanceCounter(PCNT_UPDATE_ENGINE); +- m_engine->FrameUpdate(); +- StopPerformanceCounter(PCNT_UPDATE_ENGINE); +- + m_sound->FrameMove(m_relTime); + + StartPerformanceCounter(PCNT_UPDATE_GAME); + m_robotMain->ProcessEvent(event); + StopPerformanceCounter(PCNT_UPDATE_GAME); ++ ++ StartPerformanceCounter(PCNT_UPDATE_ENGINE); ++ m_engine->FrameUpdate(); ++ StopPerformanceCounter(PCNT_UPDATE_ENGINE); + } + + StopPerformanceCounter(PCNT_UPDATE_ALL); -- cgit v1.2.3-1-g7c22