From: <at...@us...> - 2007-06-28 07:40:25
|
Revision: 412 http://svn.sourceforge.net/cadcdev/?rev=412&view=rev Author: atani Date: 2007-06-28 00:40:21 -0700 (Thu, 28 Jun 2007) Log Message: ----------- updates for win32 build Modified Paths: -------------- tiki/examples/TikiTest/src/test.cpp tiki/src/audio/sound.cpp tiki/src/gl/drawables/console.cpp tiki/src/gl/drawables/cursor.cpp tiki/src/gl/drawables/pointerArrow.cpp tiki/win32/src/plathid.cpp tiki/win32/tiki_vc80.sln tiki/win32/tiki_vs80.vcproj Added Paths: ----------- tiki/examples/TikiTest/TikiTest_vc80.vcproj Added: tiki/examples/TikiTest/TikiTest_vc80.vcproj =================================================================== --- tiki/examples/TikiTest/TikiTest_vc80.vcproj (rev 0) +++ tiki/examples/TikiTest/TikiTest_vc80.vcproj 2007-06-28 07:40:21 UTC (rev 412) @@ -0,0 +1,213 @@ +<?xml version="1.0" encoding="Windows-1252"?> +<VisualStudioProject + ProjectType="Visual C++" + Version="8.00" + Name="TikiTest" + ProjectGUID="{7B823C96-860C-4578-95BB-1087A45AF1AA}" + Keyword="Win32Proj" + > + <Platforms> + <Platform + Name="Win32" + /> + </Platforms> + <ToolFiles> + </ToolFiles> + <Configurations> + <Configuration + Name="Debug|Win32" + OutputDirectory="Debug" + IntermediateDirectory="Debug" + ConfigurationType="1" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + /> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="$(SolutionDir)\include;$(SolutionDir)\..\include;"C:\Program Files\OpenAL 1.1 SDK\include"" + PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;" + MinimalRebuild="true" + BasicRuntimeChecks="3" + RuntimeLibrary="1" + UsePrecompiledHeader="0" + WarningLevel="3" + Detect64BitPortabilityProblems="true" + DebugInformationFormat="4" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + AdditionalDependencies="gdi32.lib kernel32.lib user32.lib opengl32.lib glu32.lib comdlg32.lib" + LinkIncremental="2" + AdditionalLibraryDirectories="$(SolutionDir)\Debug;"C:\Program Files\OpenAL 1.1 SDK\libs\Win32"" + GenerateDebugInformation="true" + SubSystem="2" + TargetMachine="1" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCWebDeploymentTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + <Configuration + Name="Release|Win32" + OutputDirectory="Release" + IntermediateDirectory="Release" + ConfigurationType="1" + CharacterSet="2" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + /> + <Tool + Name="VCCLCompilerTool" + AdditionalIncludeDirectories="$(SolutionDir)\include;$(SolutionDir)\..\include;"C:\Program Files\OpenAL 1.1 SDK\include"" + PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;" + RuntimeLibrary="0" + UsePrecompiledHeader="0" + WarningLevel="3" + Detect64BitPortabilityProblems="true" + DebugInformationFormat="3" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + AdditionalDependencies="gdi32.lib kernel32.lib user32.lib opengl32.lib glu32.lib comdlg32.lib" + LinkIncremental="1" + AdditionalLibraryDirectories="$(SolutionDir)\Release;C:\Program Files\OpenAL 1.1 SDK\libs\Win32" + IgnoreDefaultLibraryNames="" + GenerateDebugInformation="true" + SubSystem="2" + OptimizeReferences="2" + EnableCOMDATFolding="2" + TargetMachine="1" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCWebDeploymentTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + </Configurations> + <References> + </References> + <Files> + <Filter + Name="Header Files" + Filter="h;hpp;hxx;hm;inl;inc;xsd" + UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}" + > + <File + RelativePath=".\src\testobj.h" + > + </File> + </Filter> + <Filter + Name="Resource Files" + Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx" + UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}" + > + </Filter> + <Filter + Name="Source Files" + Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx" + UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}" + > + <File + RelativePath=".\src\test.cpp" + > + </File> + <File + RelativePath=".\src\testobj.cpp" + > + </File> + <File + RelativePath=".\src\TikiTest.cpp" + > + </File> + </Filter> + </Files> + <Globals> + </Globals> +</VisualStudioProject> Modified: tiki/examples/TikiTest/src/test.cpp =================================================================== --- tiki/examples/TikiTest/src/test.cpp 2007-05-25 14:37:18 UTC (rev 411) +++ tiki/examples/TikiTest/src/test.cpp 2007-06-28 07:40:21 UTC (rev 412) @@ -42,40 +42,40 @@ plx_mat3d_identity(); - vert.argb = Color(0,0,0); - vert.z = 0.3; + vert.argb = Color(0, 0, 0); + vert.z = 0.3f; vert.flags = PLX_VERT; - vert.x = pos->x-2; - vert.y = pos->y-4; + vert.x = static_cast<float>(pos->x - 2); + vert.y = static_cast<float>(pos->y - 4); plx_prim(&vert, sizeof(vert)); vert.flags = PLX_VERT; - vert.x = pos->x+18; - vert.y = pos->y+16; + vert.x = static_cast<float>(pos->x + 18); + vert.y = static_cast<float>(pos->y + 16); plx_prim(&vert, sizeof(vert)); vert.flags = PLX_VERT_EOS; - vert.x = pos->x-2; - vert.y = pos->y+24; + vert.x = static_cast<float>(pos->x - 2); + vert.y = static_cast<float>(pos->y + 24); plx_prim(&vert, sizeof(vert)); - vert.argb = Color(0.8,0.2,0.1); - vert.z = 0.31; + vert.argb = Color(0.8f, 0.2f, 0.1f); + vert.z = 0.31f; vert.flags = PLX_VERT; - vert.x = pos->x; - vert.y = pos->y; + vert.x = static_cast<float>(pos->x); + vert.y = static_cast<float>(pos->y); plx_prim(&vert, sizeof(vert)); vert.flags = PLX_VERT; - vert.x = pos->x+15; - vert.y = pos->y+15; + vert.x = static_cast<float>(pos->x + 15); + vert.y = static_cast<float>(pos->y + 15); plx_prim(&vert, sizeof(vert)); vert.flags = PLX_VERT_EOS; - vert.x = pos->x; - vert.y = pos->y+21; + vert.x = static_cast<float>(pos->x); + vert.y = static_cast<float>(pos->y + 21); plx_prim(&vert, sizeof(vert)); } @@ -107,14 +107,14 @@ /* Iterate over stacks */ for ( i=0; i<stacks; i++ ) { - pitch = 2*M_PI * ( (float)i/(float)stacks ); - pitch2 = 2*M_PI * ( (float)(i+1)/(float)stacks ); + pitch = static_cast<float>(2*M_PI * ( (float)i/(float)stacks )); + pitch2 = static_cast<float>(2*M_PI * ( (float)(i+1)/(float)stacks )); /* Iterate over slices: each entire stack will be one long triangle strip. */ for ( j=0; j<=slices/2; j++ ) { - yaw = 2*M_PI * ( (float)j/(float)slices ); - yaw2 = 2*M_PI * ( (float)(j+1)/(float)slices ); + yaw = static_cast<float>(2*M_PI * ( (float)j/(float)slices )); + yaw2 = static_cast<float>(2*M_PI * ( (float)(j+1)/(float)slices )); /* x, y+1 */ x = radius * fcos( yaw ) * fcos( pitch2 ); @@ -172,7 +172,7 @@ plx_mat3d_push(); for (i=0; i<SPHERE_CNT; i++) { - plx_mat3d_translate(6.0f * fcos(i * 2*M_PI / SPHERE_CNT), 0.0f, 6.0f * fsin(i * 2*M_PI / SPHERE_CNT)); + plx_mat3d_translate(6.0f * fcos(static_cast<float>(i * 2*M_PI / SPHERE_CNT)), 0.0f, 6.0f * fsin(static_cast<float>(i * 2*M_PI / SPHERE_CNT))); plx_mat3d_rotate(r, 1.0f, 1.0f, 1.0f); sphere(1.2f, 20, 20); if (i < (SPHERE_CNT-1)) @@ -186,7 +186,7 @@ plx_mat3d_push(); for (i=0; i<SPHERE_CNT; i++) { - plx_mat3d_translate(3.0f * fcos(i * 2*M_PI / SPHERE_CNT), 0.0f, 3.0f * fsin(i * 2*M_PI / SPHERE_CNT)); + plx_mat3d_translate(3.0f * fcos(static_cast<float>(i * 2*M_PI / SPHERE_CNT)), 0.0f, 3.0f * fsin(static_cast<float>(i * 2*M_PI / SPHERE_CNT))); plx_mat3d_rotate(r, 1.0f, 1.0f, 1.0f); sphere(0.8f, 20, 20); if (i < (SPHERE_CNT-1)) @@ -198,7 +198,7 @@ Frame::finish(); r+=dir; - phase += 2*M_PI / 240.0f; + phase += static_cast<float>(2*M_PI / 240); } volatile bool quitting = false; Modified: tiki/src/audio/sound.cpp =================================================================== --- tiki/src/audio/sound.cpp 2007-05-25 14:37:18 UTC (rev 411) +++ tiki/src/audio/sound.cpp 2007-06-28 07:40:21 UTC (rev 412) @@ -124,7 +124,7 @@ char magic[4]; uint32 len, hz; - uint16 *tmp, chn, bitsize, fmt; + uint16 chn, bitsize, fmt; File wavFile(fn,"r"); wavFile.seek(8, SEEK_SET); Modified: tiki/src/gl/drawables/console.cpp =================================================================== --- tiki/src/gl/drawables/console.cpp 2007-05-25 14:37:18 UTC (rev 411) +++ tiki/src/gl/drawables/console.cpp 2007-06-28 07:40:21 UTC (rev 412) @@ -179,8 +179,8 @@ void ConsoleText::renderCharacter(float x, float y, float w, float h, unsigned char c, int attr) { plx_vertex_t vert; - float u = (c % 16) * 8; - float v = (c / 16) * 8; + float u = static_cast<float>((c % 16) * 8); + float v = static_cast<float>((c / 16) * 8); int color = attr & 0x07; @@ -188,7 +188,7 @@ w *= sv.x; h *= sv.y; - const Vector & tv = getPosition() + Vector(x, y, 0.01); + const Vector & tv = getPosition() + Vector(x, y, 0.01f); m_texture->select(); @@ -233,7 +233,7 @@ w *= sv.x; h *= sv.y; - const Vector & tv = getPosition() + Vector(x, y, -0.01); + const Vector & tv = getPosition() + Vector(x, y, -0.01f); m_texture->deselect(); Modified: tiki/src/gl/drawables/cursor.cpp =================================================================== --- tiki/src/gl/drawables/cursor.cpp 2007-05-25 14:37:18 UTC (rev 411) +++ tiki/src/gl/drawables/cursor.cpp 2007-06-28 07:40:21 UTC (rev 412) @@ -50,7 +50,7 @@ } if (evt.type==Event::EvtMouseMove ) { - setTranslate(Vector(evt.x,evt.y,getTranslate().z)); + setTranslate(Vector(static_cast<float>(evt.x), static_cast<float>(evt.y), getTranslate().z)); } } Modified: tiki/src/gl/drawables/pointerArrow.cpp =================================================================== --- tiki/src/gl/drawables/pointerArrow.cpp 2007-05-25 14:37:18 UTC (rev 411) +++ tiki/src/gl/drawables/pointerArrow.cpp 2007-06-28 07:40:21 UTC (rev 412) @@ -16,7 +16,7 @@ using namespace Tiki::GL::Plxcompat; PointerArrow::PointerArrow() { - setTint(Color(1.0,0.2,0.1)); + setTint(Color(1.0f, 0.2f, 0.1f)); } PointerArrow::~PointerArrow() { @@ -48,7 +48,7 @@ plx_prim(&vert, sizeof(vert)); vert.argb = getTint(); - vert.z = tv.z + 0.01; + vert.z = tv.z + 0.01f; vert.flags = PLX_VERT; vert.x = tv.x; Modified: tiki/win32/src/plathid.cpp =================================================================== --- tiki/win32/src/plathid.cpp 2007-05-25 14:37:18 UTC (rev 411) +++ tiki/win32/src/plathid.cpp 2007-06-28 07:40:21 UTC (rev 412) @@ -161,7 +161,7 @@ } evt.type = Event::EvtKeypress; - for (int i=0; i<event.nRepeatCount; i++) + for (unsigned int i=0; i<event.nRepeatCount; i++) sendEvent(evt); } break; Modified: tiki/win32/tiki_vc80.sln =================================================================== --- tiki/win32/tiki_vc80.sln 2007-05-25 14:37:18 UTC (rev 411) +++ tiki/win32/tiki_vc80.sln 2007-06-28 07:40:21 UTC (rev 412) @@ -1,7 +1,18 @@ + Microsoft Visual Studio Solution File, Format Version 9.00 -# Visual Studio 2005 +# Visual C++ Express 2005 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tiki", "tiki_vs80.vcproj", "{F2816CAC-B560-4ED9-8A73-9635F832943C}" EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TikiTest", "..\examples\TikiTest\TikiTest_vc80.vcproj", "{7B823C96-860C-4578-95BB-1087A45AF1AA}" + ProjectSection(ProjectDependencies) = postProject + {F2816CAC-B560-4ED9-8A73-9635F832943C} = {F2816CAC-B560-4ED9-8A73-9635F832943C} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TikiSnake", "..\examples\console\TikiSnake\TikiSnake.vcproj", "{FCAE4EF3-7B5D-4C0D-8793-4157F7D8709F}" + ProjectSection(ProjectDependencies) = postProject + {F2816CAC-B560-4ED9-8A73-9635F832943C} = {F2816CAC-B560-4ED9-8A73-9635F832943C} + EndProjectSection +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 @@ -12,6 +23,14 @@ {F2816CAC-B560-4ED9-8A73-9635F832943C}.Debug|Win32.Build.0 = Debug|Win32 {F2816CAC-B560-4ED9-8A73-9635F832943C}.Release|Win32.ActiveCfg = Release|Win32 {F2816CAC-B560-4ED9-8A73-9635F832943C}.Release|Win32.Build.0 = Release|Win32 + {7B823C96-860C-4578-95BB-1087A45AF1AA}.Debug|Win32.ActiveCfg = Debug|Win32 + {7B823C96-860C-4578-95BB-1087A45AF1AA}.Debug|Win32.Build.0 = Debug|Win32 + {7B823C96-860C-4578-95BB-1087A45AF1AA}.Release|Win32.ActiveCfg = Release|Win32 + {7B823C96-860C-4578-95BB-1087A45AF1AA}.Release|Win32.Build.0 = Release|Win32 + {FCAE4EF3-7B5D-4C0D-8793-4157F7D8709F}.Debug|Win32.ActiveCfg = Debug|Win32 + {FCAE4EF3-7B5D-4C0D-8793-4157F7D8709F}.Debug|Win32.Build.0 = Debug|Win32 + {FCAE4EF3-7B5D-4C0D-8793-4157F7D8709F}.Release|Win32.ActiveCfg = Release|Win32 + {FCAE4EF3-7B5D-4C0D-8793-4157F7D8709F}.Release|Win32.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE Modified: tiki/win32/tiki_vs80.vcproj =================================================================== --- tiki/win32/tiki_vs80.vcproj 2007-05-25 14:37:18 UTC (rev 411) +++ tiki/win32/tiki_vs80.vcproj 2007-06-28 07:40:21 UTC (rev 412) @@ -4,6 +4,7 @@ Version="8.00" Name="tiki" ProjectGUID="{F2816CAC-B560-4ED9-8A73-9635F832943C}" + RootNamespace="tiki" Keyword="Win32Proj" > <Platforms> @@ -41,8 +42,8 @@ <Tool Name="VCCLCompilerTool" Optimization="0" - AdditionalIncludeDirectories="include;../include;../3rdparty/libpng;../3rdparty/zlib;../3rdparty/libjpeg;../3rdparty/libogg/include;../3rdparty/libvorbis/include;"C:\Program Files\OpenAL 1.1 SDK\include"" - PreprocessorDefinitions="_WIN32_WINNT=0x0500" + AdditionalIncludeDirectories=""$(SolutionDir)\include";"$(SolutionDir)\..\include";"C:\Program Files\OpenAL 1.1 SDK\include";"$(SolutionDir)\..\3rdparty\libjpeg";"$(SolutionDir)\..\3rdparty\libogg\include";"$(SolutionDir)\..\3rdparty\libpng";"$(SolutionDir)\..\3rdparty\libvorbis\include";"$(SolutionDir)\..\3rdparty\zlib"" + PreprocessorDefinitions="_WIN32_WINNT=0x0500;_CRT_SECURE_NO_WARNINGS=1" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="1" @@ -107,8 +108,8 @@ /> <Tool Name="VCCLCompilerTool" - AdditionalIncludeDirectories="include;../include;../3rdparty/libpng;../3rdparty/zlib;../3rdparty/libjpeg;../3rdparty/libogg/include;../3rdparty/libvorbis/include;"C:\Program Files\OpenAL 1.1 SDK\include"" - PreprocessorDefinitions="_WIN32_WINNT=0x0500" + AdditionalIncludeDirectories=""$(SolutionDir)\include";"$(SolutionDir)\..\include";"C:\Program Files\OpenAL 1.1 SDK\include";"$(SolutionDir)\..\3rdparty\libjpeg";"$(SolutionDir)\..\3rdparty\libogg\include";"$(SolutionDir)\..\3rdparty\libpng";"$(SolutionDir)\..\3rdparty\libvorbis\include";"$(SolutionDir)\..\3rdparty\zlib"" + PreprocessorDefinitions="_WIN32_WINNT=0x0500; _CRT_SECURE_NO_WARNINGS=1" RuntimeLibrary="0" UsePrecompiledHeader="2" PrecompiledHeaderThrough="pch.h" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |