Browse Source

Made love.vcproj buildable again.

rude 14 years ago
parent
commit
6aa8399aa8
2 changed files with 203 additions and 63 deletions
  1. 200 60
      platform/msvc2008/love.vcproj
  2. 3 3
      src/modules/graphics/opengl/Font.cpp

+ 200 - 60
platform/msvc2008/love.vcproj

@@ -734,7 +734,7 @@
 						>
 					</File>
 					<File
-						RelativePath="..\..\src\modules\graphics\opengl\GLee.c"
+						RelativePath="..\..\src\modules\graphics\opengl\Framebuffer.cpp"
 						>
 						<FileConfiguration
 							Name="Debug|Win32"
@@ -742,25 +742,15 @@
 							<Tool
 								Name="VCCLCompilerTool"
 								ObjectFile="$(IntDir)\graphics\opengl\"
-								WarningLevel="0"
-							/>
-						</FileConfiguration>
-						<FileConfiguration
-							Name="Release|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\graphics\opengl\"
-								WarningLevel="0"
 							/>
 						</FileConfiguration>
 					</File>
 					<File
-						RelativePath="..\..\src\modules\graphics\opengl\GLee.h"
+						RelativePath="..\..\src\modules\graphics\opengl\Framebuffer.h"
 						>
 					</File>
 					<File
-						RelativePath="..\..\src\modules\graphics\opengl\Glyph.cpp"
+						RelativePath="..\..\src\modules\graphics\opengl\GLee.c"
 						>
 						<FileConfiguration
 							Name="Debug|Win32"
@@ -768,6 +758,7 @@
 							<Tool
 								Name="VCCLCompilerTool"
 								ObjectFile="$(IntDir)\graphics\opengl\"
+								WarningLevel="0"
 							/>
 						</FileConfiguration>
 						<FileConfiguration
@@ -776,15 +767,16 @@
 							<Tool
 								Name="VCCLCompilerTool"
 								ObjectFile="$(IntDir)\graphics\opengl\"
+								WarningLevel="0"
 							/>
 						</FileConfiguration>
 					</File>
 					<File
-						RelativePath="..\..\src\modules\graphics\opengl\Glyph.h"
+						RelativePath="..\..\src\modules\graphics\opengl\GLee.h"
 						>
 					</File>
 					<File
-						RelativePath="..\..\src\modules\graphics\opengl\Graphics.cpp"
+						RelativePath="..\..\src\modules\graphics\opengl\Glyph.cpp"
 						>
 						<FileConfiguration
 							Name="Debug|Win32"
@@ -804,11 +796,11 @@
 						</FileConfiguration>
 					</File>
 					<File
-						RelativePath="..\..\src\modules\graphics\opengl\Graphics.h"
+						RelativePath="..\..\src\modules\graphics\opengl\Glyph.h"
 						>
 					</File>
 					<File
-						RelativePath="..\..\src\modules\graphics\opengl\Image.cpp"
+						RelativePath="..\..\src\modules\graphics\opengl\Graphics.cpp"
 						>
 						<FileConfiguration
 							Name="Debug|Win32"
@@ -828,11 +820,11 @@
 						</FileConfiguration>
 					</File>
 					<File
-						RelativePath="..\..\src\modules\graphics\opengl\Image.h"
+						RelativePath="..\..\src\modules\graphics\opengl\Graphics.h"
 						>
 					</File>
 					<File
-						RelativePath="..\..\src\modules\graphics\opengl\ImageFont.cpp"
+						RelativePath="..\..\src\modules\graphics\opengl\Image.cpp"
 						>
 						<FileConfiguration
 							Name="Debug|Win32"
@@ -852,7 +844,7 @@
 						</FileConfiguration>
 					</File>
 					<File
-						RelativePath="..\..\src\modules\graphics\opengl\ImageFont.h"
+						RelativePath="..\..\src\modules\graphics\opengl\Image.h"
 						>
 					</File>
 					<File
@@ -928,7 +920,7 @@
 						>
 					</File>
 					<File
-						RelativePath="..\..\src\modules\graphics\opengl\TrueTypeFont.cpp"
+						RelativePath="..\..\src\modules\graphics\opengl\wrap_Font.cpp"
 						>
 						<FileConfiguration
 							Name="Debug|Win32"
@@ -948,11 +940,11 @@
 						</FileConfiguration>
 					</File>
 					<File
-						RelativePath="..\..\src\modules\graphics\opengl\TrueTypeFont.h"
+						RelativePath="..\..\src\modules\graphics\opengl\wrap_Font.h"
 						>
 					</File>
 					<File
-						RelativePath="..\..\src\modules\graphics\opengl\wrap_Font.cpp"
+						RelativePath="..\..\src\modules\graphics\opengl\wrap_Framebuffer.cpp"
 						>
 						<FileConfiguration
 							Name="Debug|Win32"
@@ -962,17 +954,9 @@
 								ObjectFile="$(IntDir)\graphics\opengl\"
 							/>
 						</FileConfiguration>
-						<FileConfiguration
-							Name="Release|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\graphics\opengl\"
-							/>
-						</FileConfiguration>
 					</File>
 					<File
-						RelativePath="..\..\src\modules\graphics\opengl\wrap_Font.h"
+						RelativePath="..\..\src\modules\graphics\opengl\wrap_Framebuffer.h"
 						>
 					</File>
 					<File
@@ -3301,10 +3285,194 @@
 					</File>
 				</Filter>
 			</Filter>
+			<Filter
+				Name="font"
+				>
+				<File
+					RelativePath="..\..\src\modules\font\Font.h"
+					>
+				</File>
+				<File
+					RelativePath="..\..\src\modules\font\FontData.cpp"
+					>
+					<FileConfiguration
+						Name="Debug|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							ObjectFile="$(IntDir)\font\"
+						/>
+					</FileConfiguration>
+				</File>
+				<File
+					RelativePath="..\..\src\modules\font\FontData.h"
+					>
+				</File>
+				<File
+					RelativePath="..\..\src\modules\font\GlyphData.cpp"
+					>
+					<FileConfiguration
+						Name="Debug|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							ObjectFile="$(IntDir)\font\"
+						/>
+					</FileConfiguration>
+				</File>
+				<File
+					RelativePath="..\..\src\modules\font\GlyphData.h"
+					>
+				</File>
+				<File
+					RelativePath="..\..\src\modules\font\ImageRasterizer.cpp"
+					>
+					<FileConfiguration
+						Name="Debug|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							ObjectFile="$(IntDir)\font\"
+						/>
+					</FileConfiguration>
+				</File>
+				<File
+					RelativePath="..\..\src\modules\font\ImageRasterizer.h"
+					>
+				</File>
+				<File
+					RelativePath="..\..\src\modules\font\Rasterizer.cpp"
+					>
+					<FileConfiguration
+						Name="Debug|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							ObjectFile="$(IntDir)\font\"
+						/>
+					</FileConfiguration>
+				</File>
+				<File
+					RelativePath="..\..\src\modules\font\Rasterizer.h"
+					>
+				</File>
+				<File
+					RelativePath="..\..\src\modules\font\wrap_FontData.cpp"
+					>
+					<FileConfiguration
+						Name="Debug|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							ObjectFile="$(IntDir)\font\"
+						/>
+					</FileConfiguration>
+				</File>
+				<File
+					RelativePath="..\..\src\modules\font\wrap_FontData.h"
+					>
+				</File>
+				<File
+					RelativePath="..\..\src\modules\font\wrap_GlyphData.cpp"
+					>
+					<FileConfiguration
+						Name="Debug|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							ObjectFile="$(IntDir)\font\"
+						/>
+					</FileConfiguration>
+				</File>
+				<File
+					RelativePath="..\..\src\modules\font\wrap_GlyphData.h"
+					>
+				</File>
+				<File
+					RelativePath="..\..\src\modules\font\wrap_Rasterizer.cpp"
+					>
+					<FileConfiguration
+						Name="Debug|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							ObjectFile="$(IntDir)\font\"
+						/>
+					</FileConfiguration>
+				</File>
+				<File
+					RelativePath="..\..\src\modules\font\wrap_Rasterizer.h"
+					>
+				</File>
+				<Filter
+					Name="freetype"
+					>
+					<File
+						RelativePath="..\..\src\modules\font\freetype\Font.cpp"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\font\freetype\"
+							/>
+						</FileConfiguration>
+					</File>
+					<File
+						RelativePath="..\..\src\modules\font\freetype\Font.h"
+						>
+					</File>
+					<File
+						RelativePath="..\..\src\modules\font\freetype\TrueTypeRasterizer.cpp"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\font\freetype\"
+							/>
+						</FileConfiguration>
+					</File>
+					<File
+						RelativePath="..\..\src\modules\font\freetype\TrueTypeRasterizer.h"
+						>
+					</File>
+					<File
+						RelativePath="..\..\src\modules\font\freetype\wrap_Font.cpp"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\font\freetype\"
+							/>
+						</FileConfiguration>
+					</File>
+					<File
+						RelativePath="..\..\src\modules\font\freetype\wrap_Font.h"
+						>
+					</File>
+				</Filter>
+			</Filter>
 		</Filter>
 		<Filter
 			Name="common"
 			>
+			<File
+				RelativePath="..\..\src\common\b64.cpp"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						ObjectFile="$(IntDir)\common\"
+					/>
+				</FileConfiguration>
+			</File>
 			<File
 				RelativePath="..\..\src\common\config.h"
 				>
@@ -3854,34 +4022,6 @@
 			Name="scripts"
 			>
 		</Filter>
-		<Filter
-			Name="resources"
-			>
-			<File
-				RelativePath="..\..\src\resources\resources.cpp"
-				>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						ObjectFile="$(IntDir)\resources\"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						ObjectFile="$(IntDir)\resources\"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\..\src\resources\resources.h"
-				>
-			</File>
-		</Filter>
 		<File
 			RelativePath=".\icon.rc"
 			>

+ 3 - 3
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();
 	}