From 36801547f27237a59dcb271e80170363bc35c011 Mon Sep 17 00:00:00 2001 From: Didier Raboud Date: Tue, 26 Nov 2013 09:24:28 +0100 Subject: Add patch to hide the black squares bug --- debian/patches/i225-hide-black-squares-bug.patch | 20 ++++++++++++++++++++ debian/patches/series | 1 + 2 files changed, 21 insertions(+) create mode 100644 debian/patches/i225-hide-black-squares-bug.patch create mode 100644 debian/patches/series (limited to 'debian/patches') diff --git a/debian/patches/i225-hide-black-squares-bug.patch b/debian/patches/i225-hide-black-squares-bug.patch new file mode 100644 index 0000000..8425043 --- /dev/null +++ b/debian/patches/i225-hide-black-squares-bug.patch @@ -0,0 +1,20 @@ +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)); + ++ // 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); + } diff --git a/debian/patches/series b/debian/patches/series new file mode 100644 index 0000000..779db1a --- /dev/null +++ b/debian/patches/series @@ -0,0 +1 @@ +i225-hide-black-squares-bug.patch -- cgit v1.2.3-1-g7c22