]> de.git.xonotic.org Git - xonotic/netradiant.git/blobdiff - contrib/gtkgensurf/font.cpp
* applied patch by StefanV (from mailinglist) that fixes an error in config.py (broke...
[xonotic/netradiant.git] / contrib / gtkgensurf / font.cpp
index dabb72d7085db852da561e268272f7c9c646ba44..17a557ecc2699bb545fffdfa07eb3c280a969b0e 100644 (file)
@@ -176,7 +176,7 @@ void texfont_init ()
 
   int i, j, x, y;
   float inv = 1.0f/128;
-  char *charlines[16] = { 
+  const char *charlines[16] = {
     "abcdefghijklmn", "opqrstuvwxyz0", "123456789ABC", "DEFGHIJKLMN", 
     "OPQRSTUVWX", "YZ,.!;:<>/?{}@$%", "&*()-+=_[] #" };
   unsigned char lefts[7][17] = { 
@@ -232,7 +232,7 @@ void texfont_init ()
   free (buf);
 }
 
-void texfont_write (const char *text, int l, int t)
+void texfont_write (const char *text, float l, float t)
 {
   if (texture == 0)
     return;
@@ -253,13 +253,13 @@ void texfont_write (const char *text, int l, int t)
       continue;
 
     g_GLTable.m_pfn_qglTexCoord2f (glyphs[*p-32].left, glyphs[*p-32].top);
-    g_GLTable.m_pfn_qglVertex2i (l, t);
+    g_GLTable.m_pfn_qglVertex2f (l, t);
     g_GLTable.m_pfn_qglTexCoord2f (glyphs[*p-32].left, glyphs[*p-32].bottom);
-    g_GLTable.m_pfn_qglVertex2i (l, t-16);
+    g_GLTable.m_pfn_qglVertex2f (l, t-16);
     g_GLTable.m_pfn_qglTexCoord2f (glyphs[*p-32].right, glyphs[*p-32].bottom);
-    g_GLTable.m_pfn_qglVertex2i (l + glyphs[*p-32].width, t-16);
+    g_GLTable.m_pfn_qglVertex2f (l + glyphs[*p-32].width, t-16);
     g_GLTable.m_pfn_qglTexCoord2f (glyphs[*p-32].right, glyphs[*p-32].top);
-    g_GLTable.m_pfn_qglVertex2i (l + glyphs[*p-32].width, t);
+    g_GLTable.m_pfn_qglVertex2f (l + glyphs[*p-32].width, t);
     l += glyphs[*p-32].width;
   }
   g_GLTable.m_pfn_qglEnd ();