]> git.xonotic.org Git - xonotic/netradiant.git/blobdiff - contrib/gtkgensurf/font.cpp
Partial OSX support
[xonotic/netradiant.git] / contrib / gtkgensurf / font.cpp
index 870e121fa15ffe0b0f02c203962476c1a64da9a1..17aebc8027b6d299262c8c72450b2cde59984566 100644 (file)
@@ -26,7 +26,7 @@
 // Leonardo Zide (leo@lokigames.com)
 //
 
-#include <stdlib.h>
+#include <cstdlib>
 #include "gensurf.h"
 
 static const unsigned char data[2048] = {
@@ -236,7 +236,7 @@ void texfont_init(){
        free( buf );
 }
 
-void texfont_write( const char *text, float l, float t ){
+void texfont_write( const char *text, int l, int t ){
        if ( texture == 0 ) {
                return;
        }
@@ -259,13 +259,13 @@ void texfont_write( const char *text, float l, float t ){
                }
 
                g_GLTable.m_pfn_qglTexCoord2f( glyphs[*p - 32].left, glyphs[*p - 32].top );
-               g_GLTable.m_pfn_qglVertex2f( l, t );
+               g_GLTable.m_pfn_qglVertex2i( l, t );
                g_GLTable.m_pfn_qglTexCoord2f( glyphs[*p - 32].left, glyphs[*p - 32].bottom );
-               g_GLTable.m_pfn_qglVertex2f( l, t - 16 );
+               g_GLTable.m_pfn_qglVertex2i( l, t - 16 );
                g_GLTable.m_pfn_qglTexCoord2f( glyphs[*p - 32].right, glyphs[*p - 32].bottom );
-               g_GLTable.m_pfn_qglVertex2f( l + glyphs[*p - 32].width, t - 16 );
+               g_GLTable.m_pfn_qglVertex2i( l + glyphs[*p - 32].width, t - 16 );
                g_GLTable.m_pfn_qglTexCoord2f( glyphs[*p - 32].right, glyphs[*p - 32].top );
-               g_GLTable.m_pfn_qglVertex2f( l + glyphs[*p - 32].width, t );
+               g_GLTable.m_pfn_qglVertex2i( l + glyphs[*p - 32].width, t );
                l += glyphs[*p - 32].width;
        }
        g_GLTable.m_pfn_qglEnd();