Sophie

Sophie

distrib > Mageia > 3 > i586 > media > core-release-src > by-pkgid > 517fe76a3ced26a0f87aec7931dba52b > files > 5

fretsonfire-1.3.110-1.mga3.src.rpm

# Copyright (C) 2008  David Martinez Marti <deavidsedice@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],