Просмотр исходного кода

Windows project for 3D Physics module, enabled audio in windows

Ivan Safrin 9 лет назад
Родитель
Сommit
93d54962b2

+ 14 - 0
build/windows/win32/Polycode.sln

@@ -21,6 +21,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PolycodeUI", "PolycodeUI\Po
 		{92C7971A-F305-4B93-A9DC-6B01AF222FF9} = {92C7971A-F305-4B93-A9DC-6B01AF222FF9}
 	EndProjectSection
 EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Polycode3DPhysics", "Polycode3DPhysics\Polycode3DPhysics.vcxproj", "{8467AAFE-8DB1-464E-8929-56D6747ADA81}"
+EndProject
 Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
 		Debug|Mixed Platforms = Debug|Mixed Platforms
@@ -76,6 +78,18 @@ Global
 		{3E46FB61-BF79-46C9-8D1A-A6FFF1EA49FA}.Release|Win32.ActiveCfg = Release|Win32
 		{3E46FB61-BF79-46C9-8D1A-A6FFF1EA49FA}.Release|Win32.Build.0 = Release|Win32
 		{3E46FB61-BF79-46C9-8D1A-A6FFF1EA49FA}.Release|x64.ActiveCfg = Release|x64
+		{8467AAFE-8DB1-464E-8929-56D6747ADA81}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
+		{8467AAFE-8DB1-464E-8929-56D6747ADA81}.Debug|Mixed Platforms.Build.0 = Debug|Win32
+		{8467AAFE-8DB1-464E-8929-56D6747ADA81}.Debug|Win32.ActiveCfg = Debug|Win32
+		{8467AAFE-8DB1-464E-8929-56D6747ADA81}.Debug|Win32.Build.0 = Debug|Win32
+		{8467AAFE-8DB1-464E-8929-56D6747ADA81}.Debug|x64.ActiveCfg = Debug|x64
+		{8467AAFE-8DB1-464E-8929-56D6747ADA81}.Debug|x64.Build.0 = Debug|x64
+		{8467AAFE-8DB1-464E-8929-56D6747ADA81}.Release|Mixed Platforms.ActiveCfg = Release|Win32
+		{8467AAFE-8DB1-464E-8929-56D6747ADA81}.Release|Mixed Platforms.Build.0 = Release|Win32
+		{8467AAFE-8DB1-464E-8929-56D6747ADA81}.Release|Win32.ActiveCfg = Release|Win32
+		{8467AAFE-8DB1-464E-8929-56D6747ADA81}.Release|Win32.Build.0 = Release|Win32
+		{8467AAFE-8DB1-464E-8929-56D6747ADA81}.Release|x64.ActiveCfg = Release|x64
+		{8467AAFE-8DB1-464E-8929-56D6747ADA81}.Release|x64.Build.0 = Release|x64
 	EndGlobalSection
 	GlobalSection(SolutionProperties) = preSolution
 		HideSolutionNode = FALSE

+ 163 - 0
build/windows/win32/Polycode3DPhysics/Polycode3DPhysics.vcxproj

@@ -0,0 +1,163 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="14.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>
+    <ProjectConfiguration Include="Debug|x64">
+      <Configuration>Debug</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|x64">
+      <Configuration>Release</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{8467AAFE-8DB1-464E-8929-56D6747ADA81}</ProjectGuid>
+    <Keyword>Win32Proj</Keyword>
+    <RootNamespace>Polycode3DPhysics</RootNamespace>
+    <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+    <ConfigurationType>StaticLibrary</ConfigurationType>
+    <UseDebugLibraries>true</UseDebugLibraries>
+    <PlatformToolset>v140</PlatformToolset>
+    <CharacterSet>Unicode</CharacterSet>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+    <ConfigurationType>StaticLibrary</ConfigurationType>
+    <UseDebugLibraries>false</UseDebugLibraries>
+    <PlatformToolset>v140</PlatformToolset>
+    <WholeProgramOptimization>true</WholeProgramOptimization>
+    <CharacterSet>Unicode</CharacterSet>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+    <ConfigurationType>StaticLibrary</ConfigurationType>
+    <UseDebugLibraries>true</UseDebugLibraries>
+    <PlatformToolset>v140</PlatformToolset>
+    <CharacterSet>Unicode</CharacterSet>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+    <ConfigurationType>StaticLibrary</ConfigurationType>
+    <UseDebugLibraries>false</UseDebugLibraries>
+    <PlatformToolset>v120</PlatformToolset>
+    <WholeProgramOptimization>true</WholeProgramOptimization>
+    <CharacterSet>Unicode</CharacterSet>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+  <ImportGroup Label="ExtensionSettings">
+  </ImportGroup>
+  <ImportGroup Label="Shared">
+  </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>
+  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+    <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|x64'">
+    <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>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <IncludePath>..\..\..\..\include;$(IncludePath)</IncludePath>
+    <OutDir>..\..\..\..\lib\win32\x86</OutDir>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+    <IncludePath>..\..\..\..\include;$(IncludePath)</IncludePath>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+    <IncludePath>..\..\..\..\include;$(IncludePath)</IncludePath>
+    <OutDir>..\..\..\..\lib\win32\x64</OutDir>
+  </PropertyGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+    <ClCompile>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <WarningLevel>Level3</WarningLevel>
+      <Optimization>Disabled</Optimization>
+      <PreprocessorDefinitions>WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <Link>
+      <SubSystem>Windows</SubSystem>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+    <ClCompile>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <WarningLevel>Level3</WarningLevel>
+      <Optimization>Disabled</Optimization>
+      <PreprocessorDefinitions>_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <Link>
+      <SubSystem>Windows</SubSystem>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <ClCompile>
+      <WarningLevel>Level3</WarningLevel>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <Optimization>MaxSpeed</Optimization>
+      <FunctionLevelLinking>true</FunctionLevelLinking>
+      <IntrinsicFunctions>true</IntrinsicFunctions>
+      <PreprocessorDefinitions>WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <Link>
+      <SubSystem>Windows</SubSystem>
+      <EnableCOMDATFolding>true</EnableCOMDATFolding>
+      <OptimizeReferences>true</OptimizeReferences>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+    <ClCompile>
+      <WarningLevel>Level3</WarningLevel>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <Optimization>MaxSpeed</Optimization>
+      <FunctionLevelLinking>true</FunctionLevelLinking>
+      <IntrinsicFunctions>true</IntrinsicFunctions>
+      <PreprocessorDefinitions>NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <Link>
+      <SubSystem>Windows</SubSystem>
+      <EnableCOMDATFolding>true</EnableCOMDATFolding>
+      <OptimizeReferences>true</OptimizeReferences>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemGroup>
+    <Text Include="ReadMe.txt" />
+  </ItemGroup>
+  <ItemGroup>
+    <ClInclude Include="..\..\..\..\include\polycode\modules\physics3D\Polycode3DPhysics.h" />
+    <ClInclude Include="..\..\..\..\include\polycode\modules\physics3D\PolyCollisionScene.h" />
+    <ClInclude Include="..\..\..\..\include\polycode\modules\physics3D\PolyCollisionSceneEntity.h" />
+    <ClInclude Include="..\..\..\..\include\polycode\modules\physics3D\PolyPhysicsConstraint.h" />
+    <ClInclude Include="..\..\..\..\include\polycode\modules\physics3D\PolyPhysicsScene.h" />
+    <ClInclude Include="..\..\..\..\include\polycode\modules\physics3D\PolyPhysicsSceneEntity.h" />
+  </ItemGroup>
+  <ItemGroup>
+    <ClCompile Include="..\..\..\..\src\modules\physics3D\PolyCollisionScene.cpp" />
+    <ClCompile Include="..\..\..\..\src\modules\physics3D\PolyCollisionSceneEntity.cpp" />
+    <ClCompile Include="..\..\..\..\src\modules\physics3D\PolyPhysicsConstraint.cpp" />
+    <ClCompile Include="..\..\..\..\src\modules\physics3D\PolyPhysicsScene.cpp" />
+    <ClCompile Include="..\..\..\..\src\modules\physics3D\PolyPhysicsSceneEntity.cpp" />
+  </ItemGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+  <ImportGroup Label="ExtensionTargets">
+  </ImportGroup>
+</Project>

+ 57 - 0
build/windows/win32/Polycode3DPhysics/Polycode3DPhysics.vcxproj.filters

@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup>
+    <Filter Include="Source Files">
+      <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
+      <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+    </Filter>
+    <Filter Include="Header Files">
+      <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
+      <Extensions>h;hh;hpp;hxx;hm;inl;inc;xsd</Extensions>
+    </Filter>
+    <Filter Include="Resource Files">
+      <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
+      <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
+    </Filter>
+  </ItemGroup>
+  <ItemGroup>
+    <Text Include="ReadMe.txt" />
+  </ItemGroup>
+  <ItemGroup>
+    <ClInclude Include="..\..\..\..\include\polycode\modules\physics3D\Polycode3DPhysics.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\..\..\include\polycode\modules\physics3D\PolyCollisionScene.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\..\..\include\polycode\modules\physics3D\PolyCollisionSceneEntity.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\..\..\include\polycode\modules\physics3D\PolyPhysicsConstraint.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\..\..\include\polycode\modules\physics3D\PolyPhysicsScene.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\..\..\include\polycode\modules\physics3D\PolyPhysicsSceneEntity.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+  </ItemGroup>
+  <ItemGroup>
+    <ClCompile Include="..\..\..\..\src\modules\physics3D\PolyCollisionScene.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\..\..\src\modules\physics3D\PolyCollisionSceneEntity.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\..\..\src\modules\physics3D\PolyPhysicsConstraint.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\..\..\src\modules\physics3D\PolyPhysicsScene.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\..\..\src\modules\physics3D\PolyPhysicsSceneEntity.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+  </ItemGroup>
+</Project>

+ 29 - 0
build/windows/win32/Polycode3DPhysics/ReadMe.txt

@@ -0,0 +1,29 @@
+========================================================================
+    STATIC LIBRARY : Polycode3DPhysics Project Overview
+========================================================================
+
+AppWizard has created this Polycode3DPhysics library project for you.
+
+No source files were created as part of your project.
+
+
+Polycode3DPhysics.vcxproj
+    This is the main project file for VC++ projects generated using an Application Wizard.
+    It contains information about the version of Visual C++ that generated the file, and
+    information about the platforms, configurations, and project features selected with the
+    Application Wizard.
+
+Polycode3DPhysics.vcxproj.filters
+    This is the filters file for VC++ projects generated using an Application Wizard. 
+    It contains information about the association between the files in your project 
+    and the filters. This association is used in the IDE to show grouping of files with
+    similar extensions under a specific node (for e.g. ".cpp" files are associated with the
+    "Source Files" filter).
+
+/////////////////////////////////////////////////////////////////////////////
+Other notes:
+
+AppWizard uses "TODO:" comments to indicate parts of the source code you
+should add to or customize.
+
+/////////////////////////////////////////////////////////////////////////////

+ 1 - 1
include/polycode/core/PolyRenderer.h

@@ -35,7 +35,7 @@ THE SOFTWARE.
 #include <stack>
 #include <queue>  
 
-#define RENDERER_MAX_LIGHTS 8
+#define RENDERER_MAX_LIGHTS 12
 #define RENDERER_MAX_LIGHT_SHADOWS 2
 
 #define MAX_QUEUED_FRAMES 2

+ 1 - 0
include/polycode/core/PolyWinCore.h

@@ -28,6 +28,7 @@
 #include "polycode/core/PolyInputEvent.h"
 #include "polycode/core/PolyRectangle.h"
 #include "polycode/core/PolyOpenGLGraphicsInterface.h"
+#include "polycode/core/PolyPAAudioInterface.h"
 
 #include <winsock2.h>
 #include <windows.h>

+ 2 - 0
src/core/PolyWinCore.cpp

@@ -165,6 +165,8 @@ Win32Core::Win32Core(PolycodeViewBase *view, int _xRes, int _yRes, bool fullScre
 	pcFreq = double(li.QuadPart)/1000.0;
 	
 	setVSync(vSync);
+
+	services->getSoundManager()->setAudioInterface(new PAAudioInterface());
 }
 
 Number Win32Core::getBackingXRes() {

+ 1 - 1
src/modules/physics3D/PolyPhysicsConstraint.cpp

@@ -20,7 +20,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 THE SOFTWARE.
 */
 
-#include "PolyPhysicsConstraint.h"
+#include "polycode\modules\physics3D\PolyPhysicsConstraint.h"
 
 using namespace Polycode;