r7844 - in packages/trunk/fretsonfire/debian: . patches
Miriam Ruiz
miriam at alioth.debian.org
Tue Jul 22 21:15:31 UTC 2008
Author: miriam
Date: 2008-07-22 21:15:31 +0000 (Tue, 22 Jul 2008)
New Revision: 7844
Added:
packages/trunk/fretsonfire/debian/patches/fonts_lower_cpu.patch
Modified:
packages/trunk/fretsonfire/debian/changelog
packages/trunk/fretsonfire/debian/patches/series
Log:
Added patch: fonts_lower_cpu.patch to reduce CPU consumption
Thanks to David Martinez Marti <deavidsedice at gmail.com>
Modified: packages/trunk/fretsonfire/debian/changelog
===================================================================
--- packages/trunk/fretsonfire/debian/changelog 2008-07-22 17:56:29 UTC (rev 7843)
+++ packages/trunk/fretsonfire/debian/changelog 2008-07-22 21:15:31 UTC (rev 7844)
@@ -1,6 +1,7 @@
fretsonfire (1.2.512.dfsg-2) UNRELEASED; urgency=low
- *
+ * Added patch: fonts_lower_cpu.patch to reduce CPU consumption
+ Thanks to David MartÃnez Martà <deavidsedice at gmail.com>
-- Miriam Ruiz <little_miry at yahoo.es> Tue, 22 Jul 2008 12:38:20 +0200
Added: packages/trunk/fretsonfire/debian/patches/fonts_lower_cpu.patch
===================================================================
--- packages/trunk/fretsonfire/debian/patches/fonts_lower_cpu.patch (rev 0)
+++ packages/trunk/fretsonfire/debian/patches/fonts_lower_cpu.patch 2008-07-22 21:15:31 UTC (rev 7844)
@@ -0,0 +1,87 @@
+# Copyright (C) 2008 David Martínez Martí <deavidsedice at gmail.com>
+# Licensed under the GPL, see /usr/share/common-licenses/GPL
+
+Index: fretsonfire-1.2.512.dfsg/src/Font.py
+===================================================================
+--- fretsonfire-1.2.512.dfsg.orig/src/Font.py 2008-07-22 23:03:34.000000000 +0200
++++ fretsonfire-1.2.512.dfsg/src/Font.py 2008-07-22 23:11:15.000000000 +0200
+@@ -107,30 +107,42 @@
+ scale *= self.scale
+ glPushMatrix()
+ glTranslatef(pos[0], pos[1], 0)
+-
++
+ if self.reversed:
+ text = "".join(reversed(text))
+
+ if self.outline:
++ #outline_list=[(-.7, -.7), (0, -1), (.7, -.7), (-1, 0), (1, 0), (-.7, .7), (0, 1), (.7, .7)]
++ #outline_list=[(-.7, -.7), (.7, -.7), (-.7, .7), (.7, .7)]
++ outline_list=[(.7, .7)]
+ glPushAttrib(GL_CURRENT_BIT)
+ glPushMatrix()
+- glColor4f(0, 0, 0, .25 * glGetDoublev(GL_CURRENT_COLOR)[3])
++ glColor4f(0, 0, 0, glGetDoublev(GL_CURRENT_COLOR)[3]/len(outline_list))
+ for ch in text:
+ g = self.getGlyph(ch)
+ w, h = self.getStringSize(ch, scale = scale)
+ tw, th = g.size
+-
+- glVertexPointerf([(0.0, 0.0, 0.0), (w, 0.0, 0.0), (0.0, h, 0.0), (w, h, 0.0)])
+- glTexCoordPointerf([(0.0, th), (tw, th), (0.0, 0.0), (tw, 0.0)])
+-
+ g.bind()
+-
+- blur = 2 * 0.002
+- for offset in [(-.7, -.7), (0, -1), (.7, -.7), (-1, 0), (1, 0), (-.7, .7), (0, 1), (.7, .7)]:
+- glPushMatrix()
+- glTranslatef( blur * offset[0], blur * offset[1], 0)
+- glDrawElementsui(GL_TRIANGLE_STRIP, [0, 1, 2, 3])
+- glPopMatrix()
++
++ glPushMatrix()
++
++ blur = 2 * 0.003
++
++ glPopMatrix()
++
++ for offset in outline_list:
++ glPushMatrix()
++ glTranslatef( blur * offset[0], blur * offset[1], 0)
++ glBegin (GL_TRIANGLE_STRIP)
++ glTexCoord2f (0.0, th); glVertex2f (0.0, 0.0)
++ glTexCoord2f (tw, th); glVertex2f (w, 0.0)
++ glTexCoord2f (tw, 0.0); glVertex2f (w, h)
++ glTexCoord2f (0.0, 0.0); glVertex2f (0.0, h)
++ glTexCoord2f (0.0, th); glVertex2f (0.0, 0.0)
++ glEnd()
++
++ glPopMatrix()
++
+
+ glTranslatef(w * direction[0],
+ w * direction[1],
+@@ -144,11 +156,20 @@
+ w, h = self.getStringSize(ch, scale = scale)
+ tw, th = g.size
+
+- glVertexPointerf([(0.0, 0.0, 0.0), (w, 0.0, 0.0), (0.0, h, 0.0), (w, h, 0.0)])
+- glTexCoordPointerf([(0.0, th), (tw, th), (0.0, 0.0), (tw, 0.0)])
++ #glVertexPointerf([(0.0, 0.0, 0.0), (w, 0.0, 0.0), (0.0, h, 0.0), (w, h, 0.0)])
++ #glTexCoordPointerf([(0.0, th), (tw, th), (0.0, 0.0), (tw, 0.0)])
+
+ g.bind()
+- glDrawElementsui(GL_TRIANGLE_STRIP, [0, 1, 2, 3])
++
++ #glDrawElementsui(GL_TRIANGLE_STRIP, [0, 1, 2, 3])
++
++ glBegin (GL_TRIANGLE_STRIP)
++ glTexCoord2f (0.0, th); glVertex2f (0.0, 0.0)
++ glTexCoord2f (tw, th); glVertex2f (w, 0.0)
++ glTexCoord2f (tw, 0.0); glVertex2f (w, h)
++ glTexCoord2f (0.0, 0.0); glVertex2f (0.0, h)
++ glTexCoord2f (0.0, th); glVertex2f (0.0, 0.0)
++ glEnd()
+
+ glTranslatef(w * direction[0],
+ w * direction[1],
Modified: packages/trunk/fretsonfire/debian/patches/series
===================================================================
--- packages/trunk/fretsonfire/debian/patches/series 2008-07-22 17:56:29 UTC (rev 7843)
+++ packages/trunk/fretsonfire/debian/patches/series 2008-07-22 21:15:31 UTC (rev 7844)
@@ -3,3 +3,4 @@
stage.ini.patch
typeerror.patch
font-revert.patch
+fonts_lower_cpu.patch
More information about the Pkg-games-commits
mailing list