Skip to content
Browse files

Microsoft Visual Studio 2010 project files

  • Loading branch information...
1 parent fd62497 commit 187754a1afd31ff1333599d84c5a5b0fc0eb196b @jhasse committed
View
2 freetype.cpp
@@ -40,7 +40,7 @@ namespace jngl
fontColorAlpha = alpha;
}
- Character::Character(const unsigned long ch, const float fontHeight, FT_Face face) : texture_(0)
+ Character::Character(const unsigned long ch, const unsigned int fontHeight, FT_Face face) : texture_(0)
{
if(FT_Load_Glyph(face, FT_Get_Char_Index(face, ch) , FT_LOAD_TARGET_LIGHT))
{
View
6 freetype.hpp
@@ -41,7 +41,7 @@ namespace jngl
class Character : boost::noncopyable
{
public:
- Character(unsigned long ch, float height, FT_Face);
+ Character(unsigned long ch, unsigned int height, FT_Face);
~Character();
void Draw() const;
double GetWidth() const;
@@ -49,7 +49,7 @@ namespace jngl
Texture* texture_;
int width_;
int left_;
- float top_;
+ int top_;
};
class Font : boost::noncopyable
@@ -69,7 +69,7 @@ namespace jngl
static FT_Library library_;
FT_Face face_;
boost::shared_ptr<Finally> freeFace_; // Frees face_ if necessary
- float height_;
+ unsigned int height_;
std::map<unsigned long, boost::shared_ptr<Character> > characters_;
};
}
View
20 jngl.sln
@@ -0,0 +1,20 @@
+
+Microsoft Visual Studio Solution File, Format Version 11.00
+# Visual Studio 2010
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "jngl", "jngl.vcxproj", "{C8C7E794-05B1-4A00-A060-2A4236C7D1E3}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Win32 = Debug|Win32
+ Release|Win32 = Release|Win32
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {C8C7E794-05B1-4A00-A060-2A4236C7D1E3}.Debug|Win32.ActiveCfg = Debug|Win32
+ {C8C7E794-05B1-4A00-A060-2A4236C7D1E3}.Debug|Win32.Build.0 = Debug|Win32
+ {C8C7E794-05B1-4A00-A060-2A4236C7D1E3}.Release|Win32.ActiveCfg = Release|Win32
+ {C8C7E794-05B1-4A00-A060-2A4236C7D1E3}.Release|Win32.Build.0 = Release|Win32
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
View
111 jngl.vcxproj
@@ -0,0 +1,111 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{C8C7E794-05B1-4A00-A060-2A4236C7D1E3}</ProjectGuid>
+ <RootNamespace>jngl</RootNamespace>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <IncludePath>.;./include;$(IncludePath)</IncludePath>
+ <LibraryPath>./lib;$(LibraryPath)</LibraryPath>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <IncludePath>.;./include;$(IncludePath)</IncludePath>
+ <LibraryPath>./lib;$(LibraryPath)</LibraryPath>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <WarningLevel>Level3</WarningLevel>
+ <Optimization>Disabled</Optimization>
+ <PreprocessorDefinitions>NO_WEAK_LINKING_OPENAL;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ <MinimalRebuild>false</MinimalRebuild>
+ </ClCompile>
+ <Link>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <AdditionalDependencies>libvorbis_static.lib;jpeg.lib;jngl.lib;alut.lib;ogg.lib;OpenAL32.lib;vorbisfile.lib;opengl32.lib;glu32.lib;freetype.lib;libpng.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <WarningLevel>Level3</WarningLevel>
+ <Optimization>MaxSpeed</Optimization>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <PreprocessorDefinitions>NO_WEAK_LINKING_OPENAL;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ <Link>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <OptimizeReferences>true</OptimizeReferences>
+ <AdditionalDependencies>jpeg.lib;jngl.lib;alut.lib;ogg.lib;OpenAL32.lib;vorbisfile.lib;opengl32.lib;glu32.lib;freetype.lib;libpng.lib</AdditionalDependencies>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="audio.cpp" />
+ <ClCompile Include="callbacks.c" />
+ <ClCompile Include="ConvertUTF.c" />
+ <ClCompile Include="finally.cpp" />
+ <ClCompile Include="freetype.cpp" />
+ <ClCompile Include="main.cpp" />
+ <ClCompile Include="opengl.cpp" />
+ <ClCompile Include="sprite.cpp" />
+ <ClCompile Include="tess.cpp" />
+ <ClCompile Include="test.cpp" />
+ <ClCompile Include="texture.cpp" />
+ <ClCompile Include="win32\message.cpp" />
+ <ClCompile Include="win32\time.cpp" />
+ <ClCompile Include="win32\windowimpl.cpp" />
+ <ClCompile Include="window.cpp" />
+ <ClCompile Include="windowptr.cpp" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="audio.hpp" />
+ <ClInclude Include="ConvertUTF.h" />
+ <ClInclude Include="debug.hpp" />
+ <ClInclude Include="draw.hpp" />
+ <ClInclude Include="finally.hpp" />
+ <ClInclude Include="freetype.hpp" />
+ <ClInclude Include="jngl.hpp" />
+ <ClInclude Include="opengl.hpp" />
+ <ClInclude Include="sprite.hpp" />
+ <ClInclude Include="texture.hpp" />
+ <ClInclude Include="win32\wglext.h" />
+ <ClInclude Include="window.hpp" />
+ <ClInclude Include="windowptr.hpp" />
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
View
BIN jpeg62.dll
Binary file not shown.
View
BIN lib/jpeg.lib
Binary file not shown.
View
BIN lib/libpng.lib
Binary file not shown.
View
BIN lib/libvorbis_static.lib
Binary file not shown.
View
BIN lib/ogg.lib
Binary file not shown.
View
BIN lib/png.lib
Binary file not shown.
View
BIN lib/vorbisfile.lib
Binary file not shown.
View
6 test.cpp
@@ -69,7 +69,7 @@ int main()
jngl::DrawScaled("jngl.png",
-jngl::GetWidth("jngl.png") * factor,
-jngl::GetHeight("jngl.png") * factor,
- factor * 2);
+ static_cast<float>(factor * 2));
jngl::SetColor(0, 0, 0);
jngl::DrawRect(-125, 100, 250, 28);
jngl::SetFontColor(255, 255, 255);
@@ -165,8 +165,8 @@ void DrawBackground()
jngl::DrawScaled("jngl.png",
x * jngl::GetWindowWidth() / performance,
y * jngl::GetWindowHeight() / performance,
- (double)jngl::GetWindowWidth() / performance / jngl::GetWidth("jngl.png"),
- (double)jngl::GetWindowHeight() / performance / jngl::GetHeight("jngl.png"));
+ (float)jngl::GetWindowWidth() / performance / jngl::GetWidth("jngl.png"),
+ (float)jngl::GetWindowHeight() / performance / jngl::GetHeight("jngl.png"));
}
}
}
View
4 texture.cpp
@@ -48,7 +48,7 @@ Texture::Texture(const int imgWidth, const int imgHeight, GLenum format, int cha
{
GLfloat vertexes[] = {
0, 0, 0, y, x, y, x, 0, // texture coordinates
- 0, 0, 0, imgHeight, imgWidth, imgHeight, imgWidth, 0
+ 0, 0, 0, GLfloat(imgHeight), GLfloat(imgWidth), GLfloat(imgHeight), GLfloat(imgWidth), 0
};
glGenBuffers(1, &vertexBuffer_);
opengl::BindArrayBuffer(vertexBuffer_);
@@ -106,7 +106,7 @@ void Texture::Draw() const
glDisable(GL_TEXTURE_2D);
}
-bool Texture::GetID() const
+GLuint Texture::GetID() const
{
return texture_;
}
View
2 texture.hpp
@@ -30,7 +30,7 @@ class Texture : boost::noncopyable {
~Texture();
void Bind() const;
void Draw() const;
- bool GetID() const;
+ GLuint GetID() const;
private:
static bool useVBO_;
GLuint texture_;
View
4 win32/window.cpp → win32/windowimpl.cpp
@@ -75,7 +75,7 @@ namespace jngl
0,0};
// First We Check To See If We Can Get A Pixel Format For 4 Samples
- bool valid = wglChoosePixelFormatARB(hDC, iAttributes, fAttributes, 1, &pixelFormat, &numFormats);
+ BOOL valid = wglChoosePixelFormatARB(hDC, iAttributes, fAttributes, 1, &pixelFormat, &numFormats);
// if We Returned True, And Our Format Count Is Greater Than 1
if (valid && numFormats >= 1)
@@ -341,7 +341,7 @@ namespace jngl
};
for(unsigned int i = 0; i < sizeof(codesToCheck) / sizeof(codesToCheck[0]); ++i)
{
- bool value = GetKeyState(codesToCheck[i]) & 0xf0;
+ bool value = ((GetKeyState(codesToCheck[i]) & 0xf0) != 0);
keyDown_[codesToCheck[i]] = value;
keyPressed_[codesToCheck[i]] = value;
}

0 comments on commit 187754a

Please sign in to comment.
Something went wrong with that request. Please try again.