summaryrefslogtreecommitdiffstats
path: root/debian
diff options
context:
space:
mode:
authorDidier Raboud <odyx@debian.org>2013-11-26 09:24:28 +0100
committerDidier Raboud <odyx@debian.org>2013-11-26 09:24:28 +0100
commit36801547f27237a59dcb271e80170363bc35c011 (patch)
tree05b3bad7c6c76d07f5355d72c1990b461de0f839 /debian
parentba531cb9edf0ef90b17acb84641a9a29edf83ca9 (diff)
downloadcolobot-36801547f27237a59dcb271e80170363bc35c011.tar.gz
colobot-36801547f27237a59dcb271e80170363bc35c011.tar.bz2
colobot-36801547f27237a59dcb271e80170363bc35c011.zip
Add patch to hide the black squares bug
Diffstat (limited to 'debian')
-rw-r--r--debian/patches/i225-hide-black-squares-bug.patch20
-rw-r--r--debian/patches/series1
2 files changed, 21 insertions, 0 deletions
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 <odyx@debian.org>
+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