From 6aa8399aa8fea8dc375e38e02dd2c3ef7d426bcc Mon Sep 17 00:00:00 2001 From: rude Date: Thu, 25 Nov 2010 15:13:08 +0100 Subject: [PATCH] Made love.vcproj buildable again. --- platform/msvc2008/love.vcproj | 292 ++++++++++++++++++++------- src/modules/graphics/opengl/Font.cpp | 6 +- 2 files changed, 219 insertions(+), 79 deletions(-) diff --git a/platform/msvc2008/love.vcproj b/platform/msvc2008/love.vcproj index 0ec8838df..c0c7769fe 100644 --- a/platform/msvc2008/love.vcproj +++ b/platform/msvc2008/love.vcproj @@ -733,6 +733,22 @@ RelativePath="..\..\src\modules\graphics\opengl\Font.h" > + + + + + + + @@ -831,30 +847,6 @@ RelativePath="..\..\src\modules\graphics\opengl\Image.h" > - - - - - - - - - - @@ -927,30 +919,6 @@ RelativePath="..\..\src\modules\graphics\opengl\SpriteBatch.h" > - - - - - - - - - - @@ -975,6 +943,22 @@ RelativePath="..\..\src\modules\graphics\opengl\wrap_Font.h" > + + + + + + + @@ -3301,10 +3285,194 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -3854,34 +4022,6 @@ Name="scripts" > - - - - - - - - - - - - diff --git a/src/modules/graphics/opengl/Font.cpp b/src/modules/graphics/opengl/Font.cpp index 569e5f2d6..584d7fed3 100644 --- a/src/modules/graphics/opengl/Font.cpp +++ b/src/modules/graphics/opengl/Font.cpp @@ -81,13 +81,13 @@ namespace opengl for (unsigned int i = 0; i < text.size(); i++) { unsigned char g = (unsigned char)text[i]; if (g == '\n') { // wrap newline, but do not print it - glTranslatef(-dx, round(getHeight()), 0); + glTranslatef(-dx, floor(getHeight() + 0.5f), 0); dx = 0.0f; continue; } if (!glyphs[g]) g = 32; // space glPushMatrix(); - if (type == FONT_TRUETYPE) glTranslatef(0, round(getHeight()), 0); + if (type == FONT_TRUETYPE) glTranslatef(0, floor(getHeight() + 0.5f), 0); glyphs[g]->draw(0, 0, 0, 1, 1, 0, 0); glPopMatrix(); glTranslatef(spacing[g], 0, 0); @@ -100,7 +100,7 @@ namespace opengl { if (!glyphs[character]) character = ' '; glPushMatrix(); - glTranslatef(x, round(y+getHeight()), 0.0f); + glTranslatef(x, floor(y+getHeight() + 0.5f), 0.0f); glCallList(list+character); glPopMatrix(); }