Moved to VS2013 and latest SpriteBatch
@@ -77,10 +77,11 @@
|
||||
#ifdef XP_MAC /* Macintosh */
|
||||
|
||||
#define ALIGN_TYPE long /* for sane memory alignment */
|
||||
#define NO_GETENV /* we do have the function, but it's dead */
|
||||
|
||||
#endif /* XP_MAC */
|
||||
|
||||
#define NO_GETENV /* we don't care of that feature */
|
||||
|
||||
#endif /* JPEG_INTERNALS */
|
||||
|
||||
|
||||
|
||||
@@ -1,10 +1,18 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|ARM">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>ARM</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|ARM">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>ARM</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
@@ -19,13 +27,23 @@
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v110</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PlatformToolset>v110_wp80</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v110</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
@@ -35,9 +53,15 @@
|
||||
<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 Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'" Label="PropertySheets">
|
||||
<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 Condition="'$(Configuration)|$(Platform)'=='Release|ARM'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup />
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
@@ -54,6 +78,20 @@
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions);_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS</PreprocessorDefinitions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
@@ -72,6 +110,24 @@
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions);_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS</PreprocessorDefinitions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<Text Include="ReadMe.txt" />
|
||||
</ItemGroup>
|
||||
|
||||
@@ -1,10 +1,18 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|ARM">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>ARM</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|ARM">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>ARM</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
@@ -19,13 +27,23 @@
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v110</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PlatformToolset>v110_wp80</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v110</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
@@ -35,9 +53,15 @@
|
||||
<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 Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'" Label="PropertySheets">
|
||||
<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 Condition="'$(Configuration)|$(Platform)'=='Release|ARM'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup />
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
@@ -55,6 +79,21 @@
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions);_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS</PreprocessorDefinitions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<AdditionalIncludeDirectories>../zlib</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
@@ -74,6 +113,25 @@
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions);_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS</PreprocessorDefinitions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<AdditionalIncludeDirectories>../zlib</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<Text Include="ReadMe.txt" />
|
||||
</ItemGroup>
|
||||
|
||||
@@ -1,10 +1,18 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|ARM">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>ARM</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|ARM">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>ARM</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
@@ -19,13 +27,23 @@
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v110</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PlatformToolset>v110_wp80</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v110</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
@@ -35,9 +53,15 @@
|
||||
<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 Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'" Label="PropertySheets">
|
||||
<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 Condition="'$(Configuration)|$(Platform)'=='Release|ARM'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup />
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
@@ -54,6 +78,20 @@
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
@@ -72,6 +110,24 @@
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<Text Include="ReadMe.txt" />
|
||||
</ItemGroup>
|
||||
|
||||
@@ -1,14 +1,26 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|ARM">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>ARM</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Profile|ARM">
|
||||
<Configuration>Profile</Configuration>
|
||||
<Platform>ARM</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Profile|Win32">
|
||||
<Configuration>Profile</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|ARM">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>ARM</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
@@ -17,27 +29,50 @@
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{89159C26-2282-404A-A194-103B0A49DF7B}</ProjectGuid>
|
||||
<RootNamespace>JGE</RootNamespace>
|
||||
<MinimumVisualStudioVersion>12.0</MinimumVisualStudioVersion>
|
||||
<ApplicationType>Windows Store</ApplicationType>
|
||||
<ApplicationTypeRevision>8.1</ApplicationTypeRevision>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Profile|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseOfMfc>false</UseOfMfc>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v110</PlatformToolset>
|
||||
<PlatformToolset>v120</PlatformToolset>
|
||||
<WindowsAppContainer>true</WindowsAppContainer>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Profile|ARM'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseOfMfc>false</UseOfMfc>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v120</PlatformToolset>
|
||||
<WindowsAppContainer>true</WindowsAppContainer>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseOfMfc>false</UseOfMfc>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v110</PlatformToolset>
|
||||
<PlatformToolset>v120</PlatformToolset>
|
||||
<WindowsAppContainer>true</WindowsAppContainer>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseOfMfc>false</UseOfMfc>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<WindowsAppContainer>true</WindowsAppContainer>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseOfMfc>false</UseOfMfc>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v110</PlatformToolset>
|
||||
<PlatformToolset>v120</PlatformToolset>
|
||||
<WindowsAppContainer>true</WindowsAppContainer>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseOfMfc>false</UseOfMfc>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v120</PlatformToolset>
|
||||
<WindowsAppContainer>true</WindowsAppContainer>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
@@ -47,42 +82,76 @@
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="..\projects\mtg\mtg.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Profile|ARM'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="..\projects\mtg\mtg.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="..\projects\mtg\mtg.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="..\projects\mtg\mtg.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="..\projects\mtg\mtg.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="..\projects\mtg\mtg.props" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</IntDir>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\</IntDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Platform)\$(Configuration)\JGE</IntDir>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Platform)\$(Configuration)\JGE\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Platform)\$(Configuration)\JGE</IntDir>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Profile|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Profile|Win32'">$(Configuration)\</IntDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Profile|Win32'">$(Platform)\$(Configuration)\JGE</IntDir>
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'" />
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Profile|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Profile|ARM'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Profile|Win32'" />
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Profile|ARM'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Profile|Win32'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Profile|ARM'" />
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|ARM'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|ARM'" />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Profile|Win32'">
|
||||
<TargetName>JGE</TargetName>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Profile|ARM'">
|
||||
<TargetName>JGE</TargetName>
|
||||
<IntDir>$(Platform)\$(Configuration)\JGE</IntDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<TargetName>JGE</TargetName>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
|
||||
<OutDir>$(SolutionDir)$(Platform)\$(Configuration)\JGE\</OutDir>
|
||||
<TargetName>JGE</TargetName>
|
||||
<IntDir>$(Platform)\$(Configuration)\JGE</IntDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<TargetName>JGE</TargetName>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
|
||||
<TargetName>JGE</TargetName>
|
||||
<IntDir>$(Platform)\$(Configuration)\JGE</IntDir>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
@@ -113,10 +182,40 @@
|
||||
<IgnoreSpecificDefaultLibraries>LIBCMT;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
|
||||
</Lib>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
|
||||
<ClCompile>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<AdditionalIncludeDirectories>src/zipFS;Dependencies/SDL/include;Dependencies/include;$(JGEEXTRAS);../Boost;../projects/mtg/include;include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>TIXML_USE_STL;WP8;WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<PrecompiledHeaderOutputFile>.\Release/JGE.pch</PrecompiledHeaderOutputFile>
|
||||
<AssemblerListingLocation>.\Release/</AssemblerListingLocation>
|
||||
<ObjectFileName>.\Release/</ObjectFileName>
|
||||
<ProgramDataBaseFileName>.\Release/</ProgramDataBaseFileName>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<CompileAs>Default</CompileAs>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<CompileAsWinRT>true</CompileAsWinRT>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<Culture>0x0c09</Culture>
|
||||
</ResourceCompile>
|
||||
<Lib>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<IgnoreSpecificDefaultLibraries>LIBCMT;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
|
||||
</Lib>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>src/zipFS;Dependencies/SDL/include;Dependencies/include;$(JGEEXTRAS);../Boost;../projects/mtg/include;include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>src/DirectX;src/zipFS;Dependencies/SDL/include;Dependencies/include;../Boost;../projects/mtg/include;include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>TIXML_USE_STL;WP8;WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
@@ -141,6 +240,34 @@
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
</Lib>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>TIXML_USE_STL;WP8;WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<PrecompiledHeaderOutputFile>.\Debug/JGE.pch</PrecompiledHeaderOutputFile>
|
||||
<AssemblerListingLocation>.\Debug/</AssemblerListingLocation>
|
||||
<ObjectFileName>.\Debug/</ObjectFileName>
|
||||
<ProgramDataBaseFileName>.\Debug/</ProgramDataBaseFileName>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<CompileAs>Default</CompileAs>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<CompileAsWinRT>false</CompileAsWinRT>
|
||||
<AdditionalIncludeDirectories>src/DirectX;src/zipFS;Dependencies/SDL/include;Dependencies/include;../Boost;../projects/mtg/include;include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<Culture>0x0c09</Culture>
|
||||
</ResourceCompile>
|
||||
<Lib>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
</Lib>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Profile|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>Full</Optimization>
|
||||
@@ -172,83 +299,177 @@
|
||||
<IgnoreSpecificDefaultLibraries>LIBCMT;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
|
||||
</Lib>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Profile|ARM'">
|
||||
<ClCompile>
|
||||
<Optimization>Full</Optimization>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<AdditionalIncludeDirectories>src/zipFS;Dependencies/SDL/include;Dependencies/include;$(JGEEXTRAS);../Boost;../projects/mtg/include;include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>TIXML_USE_STL;WP8;WIN32;NDEBUG;_LIB;_SECURE_SCL=0;_HAS_ITERATOR_DEBBUGING=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<PrecompiledHeaderOutputFile>.\Release/JGE.pch</PrecompiledHeaderOutputFile>
|
||||
<AssemblerListingLocation>.\Release/</AssemblerListingLocation>
|
||||
<ObjectFileName>.\Release/</ObjectFileName>
|
||||
<ProgramDataBaseFileName>.\Release/</ProgramDataBaseFileName>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<CompileAs>Default</CompileAs>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<CompileAsWinRT>true</CompileAsWinRT>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<Culture>0x0c09</Culture>
|
||||
</ResourceCompile>
|
||||
<Lib>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<IgnoreSpecificDefaultLibraries>LIBCMT;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
|
||||
</Lib>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="src\corewrapper.cpp" />
|
||||
<ClCompile Include="src\DirectX\CommonStates.cpp" />
|
||||
<ClCompile Include="src\DirectX\SpriteBatch.cpp" />
|
||||
<ClCompile Include="src\DirectX\VertexTypes.cpp" />
|
||||
<ClCompile Include="src\Encoding.cpp" />
|
||||
<ClCompile Include="src\JAnimator.cpp" />
|
||||
<ClCompile Include="src\JApp.cpp">
|
||||
<Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
|
||||
<Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
|
||||
<BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">EnableFastChecks</BasicRuntimeChecks>
|
||||
<Optimization Condition="'$(Configuration)|$(Platform)'=='Profile|Win32'">MaxSpeed</Optimization>
|
||||
<Optimization Condition="'$(Configuration)|$(Platform)'=='Profile|ARM'">MaxSpeed</Optimization>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Profile|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Profile|ARM'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Profile|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Profile|ARM'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
|
||||
<Optimization Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">MaxSpeed</Optimization>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\JDistortionMesh.cpp">
|
||||
<Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
|
||||
<Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
|
||||
<BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">EnableFastChecks</BasicRuntimeChecks>
|
||||
<Optimization Condition="'$(Configuration)|$(Platform)'=='Profile|Win32'">MaxSpeed</Optimization>
|
||||
<Optimization Condition="'$(Configuration)|$(Platform)'=='Profile|ARM'">MaxSpeed</Optimization>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Profile|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Profile|ARM'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Profile|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Profile|ARM'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
|
||||
<Optimization Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">MaxSpeed</Optimization>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\JFileSystem.cpp" />
|
||||
<ClCompile Include="src\JGameObject.cpp">
|
||||
<Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
|
||||
<Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
|
||||
<BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">EnableFastChecks</BasicRuntimeChecks>
|
||||
<Optimization Condition="'$(Configuration)|$(Platform)'=='Profile|Win32'">MaxSpeed</Optimization>
|
||||
<Optimization Condition="'$(Configuration)|$(Platform)'=='Profile|ARM'">MaxSpeed</Optimization>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Profile|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Profile|ARM'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Profile|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Profile|ARM'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
|
||||
<Optimization Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">MaxSpeed</Optimization>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\JGE.cpp">
|
||||
<Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
|
||||
<Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
|
||||
<BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">EnableFastChecks</BasicRuntimeChecks>
|
||||
<Optimization Condition="'$(Configuration)|$(Platform)'=='Profile|Win32'">MaxSpeed</Optimization>
|
||||
<Optimization Condition="'$(Configuration)|$(Platform)'=='Profile|ARM'">MaxSpeed</Optimization>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Profile|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Profile|ARM'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Profile|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Profile|ARM'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
|
||||
<Optimization Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">MaxSpeed</Optimization>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</CompileAsWinRT>
|
||||
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">false</CompileAsWinRT>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\JGui.cpp">
|
||||
<Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
|
||||
<Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
|
||||
<BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">EnableFastChecks</BasicRuntimeChecks>
|
||||
<Optimization Condition="'$(Configuration)|$(Platform)'=='Profile|Win32'">MaxSpeed</Optimization>
|
||||
<Optimization Condition="'$(Configuration)|$(Platform)'=='Profile|ARM'">MaxSpeed</Optimization>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Profile|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Profile|ARM'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Profile|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Profile|ARM'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
|
||||
<Optimization Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">MaxSpeed</Optimization>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\JLBFont.cpp">
|
||||
<Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
|
||||
<Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
|
||||
<BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">EnableFastChecks</BasicRuntimeChecks>
|
||||
<Optimization Condition="'$(Configuration)|$(Platform)'=='Profile|Win32'">MaxSpeed</Optimization>
|
||||
<Optimization Condition="'$(Configuration)|$(Platform)'=='Profile|ARM'">MaxSpeed</Optimization>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Profile|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Profile|ARM'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Profile|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Profile|ARM'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
|
||||
<Optimization Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">MaxSpeed</Optimization>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\JLogger.cpp" />
|
||||
<ClCompile Include="src\JOBJModel.cpp" />
|
||||
@@ -260,28 +481,48 @@
|
||||
<ClCompile Include="src\JSpline.cpp" />
|
||||
<ClCompile Include="src\JSprite.cpp">
|
||||
<Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
|
||||
<Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
|
||||
<BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">EnableFastChecks</BasicRuntimeChecks>
|
||||
<Optimization Condition="'$(Configuration)|$(Platform)'=='Profile|Win32'">MaxSpeed</Optimization>
|
||||
<Optimization Condition="'$(Configuration)|$(Platform)'=='Profile|ARM'">MaxSpeed</Optimization>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Profile|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Profile|ARM'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Profile|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Profile|ARM'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
|
||||
<Optimization Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">MaxSpeed</Optimization>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\tinyxml\tinyxmlparser.cpp" />
|
||||
<ClCompile Include="src\Vector2D.cpp">
|
||||
<Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
|
||||
<Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
|
||||
<BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">EnableFastChecks</BasicRuntimeChecks>
|
||||
<Optimization Condition="'$(Configuration)|$(Platform)'=='Profile|Win32'">MaxSpeed</Optimization>
|
||||
<Optimization Condition="'$(Configuration)|$(Platform)'=='Profile|ARM'">MaxSpeed</Optimization>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Profile|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Profile|ARM'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Profile|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Profile|ARM'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
|
||||
<Optimization Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">MaxSpeed</Optimization>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\hge\hgecolor.cpp" />
|
||||
<ClCompile Include="src\hge\hgedistort.cpp" />
|
||||
@@ -293,10 +534,6 @@
|
||||
<ClCompile Include="src\tinyxml\tinystr.cpp" />
|
||||
<ClCompile Include="src\tinyxml\tinyxml.cpp" />
|
||||
<ClCompile Include="src\tinyxml\tinyxmlerror.cpp" />
|
||||
<ClCompile Include="src\DirectX\BasicLoader.cpp" />
|
||||
<ClCompile Include="src\DirectX\BasicReaderWriter.cpp" />
|
||||
<ClCompile Include="src\DirectX\BasicSprites.cpp" />
|
||||
<ClCompile Include="src\DirectX\JGfx.cpp" />
|
||||
<ClCompile Include="src\DirectX\JSfx.cpp" />
|
||||
<ClCompile Include="src\zipFS\zfsystem.cpp" />
|
||||
<ClCompile Include="src\zipFS\ziphdr.cpp" />
|
||||
@@ -340,13 +577,17 @@
|
||||
<ClInclude Include="include\hge\hgeparticle.h" />
|
||||
<ClInclude Include="include\hge\hgerect.h" />
|
||||
<ClInclude Include="include\hge\hgevector.h" />
|
||||
<ClInclude Include="src\DirectX\AlignedNew.h" />
|
||||
<ClInclude Include="src\DirectX\CommonStates.h" />
|
||||
<ClInclude Include="src\DirectX\ConstantBuffer.h" />
|
||||
<ClInclude Include="src\DirectX\DemandCreate.h" />
|
||||
<ClInclude Include="src\DirectX\DirectXHelpers.h" />
|
||||
<ClInclude Include="src\DirectX\PlatformHelpers.h" />
|
||||
<ClInclude Include="src\DirectX\SharedResourcePool.h" />
|
||||
<ClInclude Include="src\DirectX\SpriteBatch.h" />
|
||||
<ClInclude Include="src\DirectX\VertexTypes.h" />
|
||||
<ClInclude Include="src\tinyxml\tinystr.h" />
|
||||
<ClInclude Include="src\tinyxml\tinyxml.h" />
|
||||
<ClInclude Include="src\DirectX\BasicLoader.h" />
|
||||
<ClInclude Include="src\DirectX\BasicMath.h" />
|
||||
<ClInclude Include="src\DirectX\BasicReaderWriter.h" />
|
||||
<ClInclude Include="src\DirectX\BasicShapes.h" />
|
||||
<ClInclude Include="src\DirectX\BasicSprites.h" />
|
||||
<ClInclude Include="src\zipFS\fileio.h" />
|
||||
<ClInclude Include="src\zipFS\static_assert.h" />
|
||||
<ClInclude Include="src\zipFS\stdafx.h" />
|
||||
@@ -355,10 +596,6 @@
|
||||
<ClInclude Include="src\zipFS\zstream.h" />
|
||||
<ClInclude Include="src\zipFS\zstream_zlib.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Makefile" />
|
||||
<None Include="Makefile.hge" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
|
||||
@@ -58,6 +58,13 @@ typedef struct
|
||||
} ESMatrix;
|
||||
#endif // (defined GL_ES_VERSION_2_0) || (defined GL_VERSION_2_0)
|
||||
|
||||
#ifdef WP8
|
||||
namespace DirectX {
|
||||
class SpriteBatch;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
/// A collection of core rendering functions.
|
||||
///
|
||||
@@ -604,6 +611,7 @@ private:
|
||||
Microsoft::WRL::ComPtr<IUnknown> m_Window;
|
||||
ID3D11Buffer* m_vertexBuffer;
|
||||
ID3D11Buffer* m_indexBuffer;
|
||||
DirectX::SpriteBatch* m_spriteBatch;
|
||||
|
||||
#elif (!defined PSP) && (!defined WP8) && (!defined CONSOLE_CONFIG)
|
||||
|
||||
|
||||
@@ -25,17 +25,57 @@
|
||||
#include <psprtc.h>
|
||||
#include "JAudio.h"
|
||||
|
||||
#else
|
||||
|
||||
#include <stdint.h>
|
||||
#elif defined WP8
|
||||
|
||||
#if !defined(WIN32_LEAN_AND_MEAN)
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#endif
|
||||
|
||||
#ifdef WP8
|
||||
#define _XM_NO_INTRINSICS_
|
||||
#include <wrl/client.h>
|
||||
#if !defined(NOMINMAX)
|
||||
#define NOMINMAX
|
||||
#endif
|
||||
|
||||
#if defined(_XBOX_ONE) && defined(_TITLE)
|
||||
#include <d3d11_x.h>
|
||||
#define DCOMMON_H_INCLUDED
|
||||
#define NO_D3D11_DEBUG_NAME
|
||||
#else
|
||||
#include <d3d11_1.h>
|
||||
#endif
|
||||
|
||||
#include <DirectXMath.h>
|
||||
#include <DirectXPackedVector.h>
|
||||
#include <DirectXCollision.h>
|
||||
|
||||
#include <algorithm>
|
||||
#include <array>
|
||||
#include <exception>
|
||||
#include <malloc.h>
|
||||
#include <map>
|
||||
#include <memory>
|
||||
#include <set>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
// VS 2010's stdint.h conflicts with intsafe.h
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable : 4005)
|
||||
#include <stdint.h>
|
||||
#include <intsafe.h>
|
||||
#pragma warning(pop)
|
||||
|
||||
#include <wrl.h>
|
||||
|
||||
namespace DirectX
|
||||
{
|
||||
#if (DIRECTX_MATH_VERSION < 305) && !defined(XM_CALLCONV)
|
||||
#define XM_CALLCONV __fastcall
|
||||
typedef const XMVECTOR& HXMVECTOR;
|
||||
typedef const XMMATRIX& FXMMATRIX;
|
||||
#endif
|
||||
}
|
||||
#else
|
||||
#include <stdint.h>
|
||||
#endif
|
||||
|
||||
#ifndef __GNUC__
|
||||
@@ -406,7 +446,7 @@ public:
|
||||
bool mInVideoRAM;
|
||||
PIXEL_TYPE* mBits;
|
||||
#elif defined (WP8)
|
||||
ID3D11Texture2D* mTexId;
|
||||
ID3D11ShaderResourceView* mTexId;
|
||||
u8* mBuffer;
|
||||
#else
|
||||
GLuint mTexId;
|
||||
|
||||
67
JGE/src/DirectX/AlignedNew.h
Normal file
@@ -0,0 +1,67 @@
|
||||
//--------------------------------------------------------------------------------------
|
||||
// File: AlignedNew.h
|
||||
//
|
||||
// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
|
||||
// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
|
||||
// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
|
||||
// PARTICULAR PURPOSE.
|
||||
//
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
//
|
||||
// http://go.microsoft.com/fwlink/?LinkId=248929
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <malloc.h>
|
||||
#include <exception>
|
||||
|
||||
|
||||
namespace DirectX
|
||||
{
|
||||
// Derive from this to customize operator new and delete for
|
||||
// types that have special heap alignment requirements.
|
||||
//
|
||||
// Example usage:
|
||||
//
|
||||
// __declspec(align(16)) struct MyAlignedType : public AlignedNew<MyAlignedType>
|
||||
|
||||
template<typename TDerived>
|
||||
struct AlignedNew
|
||||
{
|
||||
// Allocate aligned memory.
|
||||
static void* operator new (size_t size)
|
||||
{
|
||||
const size_t alignment = __alignof(TDerived);
|
||||
|
||||
static_assert(alignment > 8, "AlignedNew is only useful for types with > 8 byte alignment. Did you forget a __declspec(align) on TDerived?");
|
||||
|
||||
void* ptr = _aligned_malloc(size, alignment);
|
||||
|
||||
if (!ptr)
|
||||
throw std::bad_alloc();
|
||||
|
||||
return ptr;
|
||||
}
|
||||
|
||||
|
||||
// Free aligned memory.
|
||||
static void operator delete (void* ptr)
|
||||
{
|
||||
_aligned_free(ptr);
|
||||
}
|
||||
|
||||
|
||||
// Array overloads.
|
||||
static void* operator new[] (size_t size)
|
||||
{
|
||||
return operator new(size);
|
||||
}
|
||||
|
||||
|
||||
static void operator delete[] (void* ptr)
|
||||
{
|
||||
operator delete(ptr);
|
||||
}
|
||||
};
|
||||
}
|
||||
@@ -1,672 +0,0 @@
|
||||
//// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
|
||||
//// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
|
||||
//// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
|
||||
//// PARTICULAR PURPOSE.
|
||||
////
|
||||
//// Copyright (c) Microsoft Corporation. All rights reserved
|
||||
|
||||
#include <wrl/client.h>
|
||||
#include <d3d11_1.h>
|
||||
#include <DirectXMath.h>
|
||||
#include <ppl.h>
|
||||
#include <ppltasks.h>
|
||||
#include <agile.h>
|
||||
#include "BasicLoader.h"
|
||||
#include "BasicShapes.h"
|
||||
#include <memory>
|
||||
|
||||
using namespace Microsoft::WRL;
|
||||
using namespace Windows::Storage;
|
||||
using namespace Windows::Storage::Streams;
|
||||
using namespace Windows::Foundation;
|
||||
using namespace Windows::ApplicationModel;
|
||||
using namespace std;
|
||||
using namespace concurrency;
|
||||
|
||||
BasicLoader::BasicLoader(
|
||||
_In_ ID3D11Device* d3dDevice
|
||||
// , _In_opt_ IWICImagingFactory2* wicFactory
|
||||
) :
|
||||
m_d3dDevice(d3dDevice)//,
|
||||
// m_wicFactory(wicFactory)
|
||||
{
|
||||
// Create a new BasicReaderWriter to do raw file I/O.
|
||||
m_basicReaderWriter = ref new BasicReaderWriter();
|
||||
}
|
||||
|
||||
template <class DeviceChildType>
|
||||
inline void BasicLoader::SetDebugName(
|
||||
_In_ DeviceChildType* object,
|
||||
_In_ Platform::String^ name
|
||||
)
|
||||
{
|
||||
#if defined(_DEBUG)
|
||||
// Only assign debug names in debug builds.
|
||||
|
||||
char nameString[1024];
|
||||
int nameStringLength = WideCharToMultiByte(
|
||||
CP_ACP,
|
||||
0,
|
||||
name->Data(),
|
||||
-1,
|
||||
nameString,
|
||||
1024,
|
||||
nullptr,
|
||||
nullptr
|
||||
);
|
||||
|
||||
if (nameStringLength == 0)
|
||||
{
|
||||
char defaultNameString[] = "BasicLoaderObject";
|
||||
DX::ThrowIfFailed(
|
||||
object->SetPrivateData(
|
||||
WKPDID_D3DDebugObjectName,
|
||||
sizeof(defaultNameString) - 1,
|
||||
defaultNameString
|
||||
)
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
DX::ThrowIfFailed(
|
||||
object->SetPrivateData(
|
||||
WKPDID_D3DDebugObjectName,
|
||||
nameStringLength - 1,
|
||||
nameString
|
||||
)
|
||||
);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
Platform::String^ BasicLoader::GetExtension(
|
||||
_In_ Platform::String^ filename
|
||||
)
|
||||
{
|
||||
int lastDotIndex = -1;
|
||||
for (int i = filename->Length() - 1; i >= 0 && lastDotIndex == -1; i--)
|
||||
{
|
||||
if (*(filename->Data() + i) == '.')
|
||||
{
|
||||
lastDotIndex = i;
|
||||
}
|
||||
}
|
||||
if (lastDotIndex != -1)
|
||||
{
|
||||
std::unique_ptr<wchar_t[]> extension(new wchar_t[filename->Length() - lastDotIndex]);
|
||||
for (unsigned int i = 0; i < filename->Length() - lastDotIndex; i++)
|
||||
{
|
||||
extension[i] = tolower(*(filename->Data() + lastDotIndex + 1 + i));
|
||||
}
|
||||
return ref new Platform::String(extension.get());
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
|
||||
void BasicLoader::CreateInputLayout(
|
||||
_In_reads_bytes_(bytecodeSize) byte* bytecode,
|
||||
_In_ uint32 bytecodeSize,
|
||||
_In_reads_opt_(layoutDescNumElements) D3D11_INPUT_ELEMENT_DESC* layoutDesc,
|
||||
_In_ uint32 layoutDescNumElements,
|
||||
_Out_ ID3D11InputLayout** layout
|
||||
)
|
||||
{
|
||||
if (layoutDesc == nullptr)
|
||||
{
|
||||
// If no input layout is specified, use the BasicVertex layout.
|
||||
const D3D11_INPUT_ELEMENT_DESC basicVertexLayoutDesc[] =
|
||||
{
|
||||
{ "POSITION", 0, DXGI_FORMAT_R32G32B32_FLOAT, 0, 0, D3D11_INPUT_PER_VERTEX_DATA, 0 },
|
||||
{ "NORMAL", 0, DXGI_FORMAT_R32G32B32_FLOAT, 0, 12, D3D11_INPUT_PER_VERTEX_DATA, 0 },
|
||||
{ "TEXCOORD", 0, DXGI_FORMAT_R32G32_FLOAT, 0, 24, D3D11_INPUT_PER_VERTEX_DATA, 0 },
|
||||
};
|
||||
|
||||
DX::ThrowIfFailed(
|
||||
m_d3dDevice->CreateInputLayout(
|
||||
basicVertexLayoutDesc,
|
||||
ARRAYSIZE(basicVertexLayoutDesc),
|
||||
bytecode,
|
||||
bytecodeSize,
|
||||
layout
|
||||
)
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
DX::ThrowIfFailed(
|
||||
m_d3dDevice->CreateInputLayout(
|
||||
layoutDesc,
|
||||
layoutDescNumElements,
|
||||
bytecode,
|
||||
bytecodeSize,
|
||||
layout
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
void BasicLoader::CreateMesh(
|
||||
_In_ byte* meshData,
|
||||
_Out_ ID3D11Buffer** vertexBuffer,
|
||||
_Out_ ID3D11Buffer** indexBuffer,
|
||||
_Out_opt_ uint32* vertexCount,
|
||||
_Out_opt_ uint32* indexCount,
|
||||
_In_opt_ Platform::String^ debugName
|
||||
)
|
||||
{
|
||||
// The first 4 bytes of the BasicMesh format define the number of vertices in the mesh.
|
||||
uint32 numVertices = *reinterpret_cast<uint32*>(meshData);
|
||||
|
||||
// The following 4 bytes define the number of indices in the mesh.
|
||||
uint32 numIndices = *reinterpret_cast<uint32*>(meshData + sizeof(uint32));
|
||||
|
||||
// The next segment of the BasicMesh format contains the vertices of the mesh.
|
||||
BasicVertex* vertices = reinterpret_cast<BasicVertex*>(meshData + sizeof(uint32) * 2);
|
||||
|
||||
// The last segment of the BasicMesh format contains the indices of the mesh.
|
||||
uint16* indices = reinterpret_cast<uint16*>(meshData + sizeof(uint32) * 2 + sizeof(BasicVertex) * numVertices);
|
||||
|
||||
// Create the vertex and index buffers with the mesh data.
|
||||
|
||||
D3D11_SUBRESOURCE_DATA vertexBufferData = {0};
|
||||
vertexBufferData.pSysMem = vertices;
|
||||
vertexBufferData.SysMemPitch = 0;
|
||||
vertexBufferData.SysMemSlicePitch = 0;
|
||||
CD3D11_BUFFER_DESC vertexBufferDesc(numVertices * sizeof(BasicVertex), D3D11_BIND_VERTEX_BUFFER);
|
||||
DX::ThrowIfFailed(
|
||||
m_d3dDevice->CreateBuffer(
|
||||
&vertexBufferDesc,
|
||||
&vertexBufferData,
|
||||
vertexBuffer
|
||||
)
|
||||
);
|
||||
|
||||
D3D11_SUBRESOURCE_DATA indexBufferData = {0};
|
||||
indexBufferData.pSysMem = indices;
|
||||
indexBufferData.SysMemPitch = 0;
|
||||
indexBufferData.SysMemSlicePitch = 0;
|
||||
CD3D11_BUFFER_DESC indexBufferDesc(numIndices * sizeof(uint16), D3D11_BIND_INDEX_BUFFER);
|
||||
DX::ThrowIfFailed(
|
||||
m_d3dDevice->CreateBuffer(
|
||||
&indexBufferDesc,
|
||||
&indexBufferData,
|
||||
indexBuffer
|
||||
)
|
||||
);
|
||||
|
||||
SetDebugName(*vertexBuffer, Platform::String::Concat(debugName, "_VertexBuffer"));
|
||||
SetDebugName(*indexBuffer, Platform::String::Concat(debugName, "_IndexBuffer"));
|
||||
|
||||
if (vertexCount != nullptr)
|
||||
{
|
||||
*vertexCount = numVertices;
|
||||
}
|
||||
if (indexCount != nullptr)
|
||||
{
|
||||
*indexCount = numIndices;
|
||||
}
|
||||
}
|
||||
|
||||
void BasicLoader::LoadShader(
|
||||
_In_ Platform::String^ filename,
|
||||
_In_reads_opt_(layoutDescNumElements) D3D11_INPUT_ELEMENT_DESC layoutDesc[],
|
||||
_In_ uint32 layoutDescNumElements,
|
||||
_Out_ ID3D11VertexShader** shader,
|
||||
_Out_opt_ ID3D11InputLayout** layout
|
||||
)
|
||||
{
|
||||
Platform::Array<byte>^ bytecode = m_basicReaderWriter->ReadData(filename);
|
||||
|
||||
DX::ThrowIfFailed(
|
||||
m_d3dDevice->CreateVertexShader(
|
||||
bytecode->Data,
|
||||
bytecode->Length,
|
||||
nullptr,
|
||||
shader
|
||||
)
|
||||
);
|
||||
|
||||
SetDebugName(*shader, filename);
|
||||
|
||||
if (layout != nullptr)
|
||||
{
|
||||
CreateInputLayout(
|
||||
bytecode->Data,
|
||||
bytecode->Length,
|
||||
layoutDesc,
|
||||
layoutDescNumElements,
|
||||
layout
|
||||
);
|
||||
|
||||
SetDebugName(*layout, filename);
|
||||
}
|
||||
}
|
||||
|
||||
task<void> BasicLoader::LoadShaderAsync(
|
||||
_In_ Platform::String^ filename,
|
||||
_In_reads_opt_(layoutDescNumElements) D3D11_INPUT_ELEMENT_DESC layoutDesc[],
|
||||
_In_ uint32 layoutDescNumElements,
|
||||
_Out_ ID3D11VertexShader** shader,
|
||||
_Out_opt_ ID3D11InputLayout** layout
|
||||
)
|
||||
{
|
||||
// This method assumes that the lifetime of input arguments may be shorter
|
||||
// than the duration of this task. In order to ensure accurate results, a
|
||||
// copy of all arguments passed by pointer must be made. The method then
|
||||
// ensures that the lifetime of the copied data exceeds that of the task.
|
||||
|
||||
// Create copies of the layoutDesc array as well as the SemanticName strings,
|
||||
// both of which are pointers to data whose lifetimes may be shorter than that
|
||||
// of this method's task.
|
||||
shared_ptr<vector<D3D11_INPUT_ELEMENT_DESC>> layoutDescCopy;
|
||||
shared_ptr<vector<string>> layoutDescSemanticNamesCopy;
|
||||
if (layoutDesc != nullptr)
|
||||
{
|
||||
layoutDescCopy.reset(
|
||||
new vector<D3D11_INPUT_ELEMENT_DESC>(
|
||||
layoutDesc,
|
||||
layoutDesc + layoutDescNumElements
|
||||
)
|
||||
);
|
||||
|
||||
layoutDescSemanticNamesCopy.reset(
|
||||
new vector<string>(layoutDescNumElements)
|
||||
);
|
||||
|
||||
for (uint32 i = 0; i < layoutDescNumElements; i++)
|
||||
{
|
||||
layoutDescSemanticNamesCopy->at(i).assign(layoutDesc[i].SemanticName);
|
||||
}
|
||||
}
|
||||
|
||||
return m_basicReaderWriter->ReadDataAsync(filename).then([=](const Platform::Array<byte>^ bytecode)
|
||||
{
|
||||
DX::ThrowIfFailed(
|
||||
m_d3dDevice->CreateVertexShader(
|
||||
bytecode->Data,
|
||||
bytecode->Length,
|
||||
nullptr,
|
||||
shader
|
||||
)
|
||||
);
|
||||
|
||||
SetDebugName(*shader, filename);
|
||||
|
||||
if (layout != nullptr)
|
||||
{
|
||||
if (layoutDesc != nullptr)
|
||||
{
|
||||
// Reassign the SemanticName elements of the layoutDesc array copy to point
|
||||
// to the corresponding copied strings. Performing the assignment inside the
|
||||
// lambda body ensures that the lambda will take a reference to the shared_ptr
|
||||
// that holds the data. This will guarantee that the data is still valid when
|
||||
// CreateInputLayout is called.
|
||||
for (uint32 i = 0; i < layoutDescNumElements; i++)
|
||||
{
|
||||
layoutDescCopy->at(i).SemanticName = layoutDescSemanticNamesCopy->at(i).c_str();
|
||||
}
|
||||
}
|
||||
|
||||
CreateInputLayout(
|
||||
bytecode->Data,
|
||||
bytecode->Length,
|
||||
layoutDesc == nullptr ? nullptr : layoutDescCopy->data(),
|
||||
layoutDescNumElements,
|
||||
layout
|
||||
);
|
||||
|
||||
SetDebugName(*layout, filename);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
void BasicLoader::LoadShader(
|
||||
_In_ Platform::String^ filename,
|
||||
_Out_ ID3D11PixelShader** shader
|
||||
)
|
||||
{
|
||||
Platform::Array<byte>^ bytecode = m_basicReaderWriter->ReadData(filename);
|
||||
|
||||
DX::ThrowIfFailed(
|
||||
m_d3dDevice->CreatePixelShader(
|
||||
bytecode->Data,
|
||||
bytecode->Length,
|
||||
nullptr,
|
||||
shader
|
||||
)
|
||||
);
|
||||
|
||||
SetDebugName(*shader, filename);
|
||||
}
|
||||
|
||||
task<void> BasicLoader::LoadShaderAsync(
|
||||
_In_ Platform::String^ filename,
|
||||
_Out_ ID3D11PixelShader** shader
|
||||
)
|
||||
{
|
||||
return m_basicReaderWriter->ReadDataAsync(filename).then([=](const Platform::Array<byte>^ bytecode)
|
||||
{
|
||||
DX::ThrowIfFailed(
|
||||
m_d3dDevice->CreatePixelShader(
|
||||
bytecode->Data,
|
||||
bytecode->Length,
|
||||
nullptr,
|
||||
shader
|
||||
)
|
||||
);
|
||||
|
||||
SetDebugName(*shader, filename);
|
||||
});
|
||||
}
|
||||
|
||||
void BasicLoader::LoadShader(
|
||||
_In_ Platform::String^ filename,
|
||||
_Out_ ID3D11ComputeShader** shader
|
||||
)
|
||||
{
|
||||
Platform::Array<byte>^ bytecode = m_basicReaderWriter->ReadData(filename);
|
||||
|
||||
DX::ThrowIfFailed(
|
||||
m_d3dDevice->CreateComputeShader(
|
||||
bytecode->Data,
|
||||
bytecode->Length,
|
||||
nullptr,
|
||||
shader
|
||||
)
|
||||
);
|
||||
|
||||
SetDebugName(*shader, filename);
|
||||
}
|
||||
|
||||
task<void> BasicLoader::LoadShaderAsync(
|
||||
_In_ Platform::String^ filename,
|
||||
_Out_ ID3D11ComputeShader** shader
|
||||
)
|
||||
{
|
||||
return m_basicReaderWriter->ReadDataAsync(filename).then([=](const Platform::Array<byte>^ bytecode)
|
||||
{
|
||||
DX::ThrowIfFailed(
|
||||
m_d3dDevice->CreateComputeShader(
|
||||
bytecode->Data,
|
||||
bytecode->Length,
|
||||
nullptr,
|
||||
shader
|
||||
)
|
||||
);
|
||||
|
||||
SetDebugName(*shader, filename);
|
||||
});
|
||||
}
|
||||
|
||||
void BasicLoader::LoadShader(
|
||||
_In_ Platform::String^ filename,
|
||||
_Out_ ID3D11GeometryShader** shader
|
||||
)
|
||||
{
|
||||
Platform::Array<byte>^ bytecode = m_basicReaderWriter->ReadData(filename);
|
||||
|
||||
DX::ThrowIfFailed(
|
||||
m_d3dDevice->CreateGeometryShader(
|
||||
bytecode->Data,
|
||||
bytecode->Length,
|
||||
nullptr,
|
||||
shader
|
||||
)
|
||||
);
|
||||
|
||||
SetDebugName(*shader, filename);
|
||||
}
|
||||
|
||||
task<void> BasicLoader::LoadShaderAsync(
|
||||
_In_ Platform::String^ filename,
|
||||
_Out_ ID3D11GeometryShader** shader
|
||||
)
|
||||
{
|
||||
return m_basicReaderWriter->ReadDataAsync(filename).then([=](const Platform::Array<byte>^ bytecode)
|
||||
{
|
||||
DX::ThrowIfFailed(
|
||||
m_d3dDevice->CreateGeometryShader(
|
||||
bytecode->Data,
|
||||
bytecode->Length,
|
||||
nullptr,
|
||||
shader
|
||||
)
|
||||
);
|
||||
|
||||
SetDebugName(*shader, filename);
|
||||
});
|
||||
}
|
||||
|
||||
void BasicLoader::LoadShader(
|
||||
_In_ Platform::String^ filename,
|
||||
_In_reads_opt_(numEntries) const D3D11_SO_DECLARATION_ENTRY* streamOutDeclaration,
|
||||
_In_ uint32 numEntries,
|
||||
_In_reads_opt_(numStrides) const uint32* bufferStrides,
|
||||
_In_ uint32 numStrides,
|
||||
_In_ uint32 rasterizedStream,
|
||||
_Out_ ID3D11GeometryShader** shader
|
||||
)
|
||||
{
|
||||
Platform::Array<byte>^ bytecode = m_basicReaderWriter->ReadData(filename);
|
||||
|
||||
DX::ThrowIfFailed(
|
||||
m_d3dDevice->CreateGeometryShaderWithStreamOutput(
|
||||
bytecode->Data,
|
||||
bytecode->Length,
|
||||
streamOutDeclaration,
|
||||
numEntries,
|
||||
bufferStrides,
|
||||
numStrides,
|
||||
rasterizedStream,
|
||||
nullptr,
|
||||
shader
|
||||
)
|
||||
);
|
||||
|
||||
SetDebugName(*shader, filename);
|
||||
}
|
||||
|
||||
task<void> BasicLoader::LoadShaderAsync(
|
||||
_In_ Platform::String^ filename,
|
||||
_In_reads_opt_(numEntries) const D3D11_SO_DECLARATION_ENTRY* streamOutDeclaration,
|
||||
_In_ uint32 numEntries,
|
||||
_In_reads_opt_(numStrides) const uint32* bufferStrides,
|
||||
_In_ uint32 numStrides,
|
||||
_In_ uint32 rasterizedStream,
|
||||
_Out_ ID3D11GeometryShader** shader
|
||||
)
|
||||
{
|
||||
// This method assumes that the lifetime of input arguments may be shorter
|
||||
// than the duration of this task. In order to ensure accurate results, a
|
||||
// copy of all arguments passed by pointer must be made. The method then
|
||||
// ensures that the lifetime of the copied data exceeds that of the task.
|
||||
|
||||
// Create copies of the streamOutDeclaration array as well as the SemanticName
|
||||
// strings, both of which are pointers to data whose lifetimes may be shorter
|
||||
// than that of this method's task.
|
||||
shared_ptr<vector<D3D11_SO_DECLARATION_ENTRY>> streamOutDeclarationCopy;
|
||||
shared_ptr<vector<string>> streamOutDeclarationSemanticNamesCopy;
|
||||
if (streamOutDeclaration != nullptr)
|
||||
{
|
||||
streamOutDeclarationCopy.reset(
|
||||
new vector<D3D11_SO_DECLARATION_ENTRY>(
|
||||
streamOutDeclaration,
|
||||
streamOutDeclaration + numEntries
|
||||
)
|
||||
);
|
||||
|
||||
streamOutDeclarationSemanticNamesCopy.reset(
|
||||
new vector<string>(numEntries)
|
||||
);
|
||||
|
||||
for (uint32 i = 0; i < numEntries; i++)
|
||||
{
|
||||
streamOutDeclarationSemanticNamesCopy->at(i).assign(streamOutDeclaration[i].SemanticName);
|
||||
}
|
||||
}
|
||||
|
||||
// Create a copy of the bufferStrides array, which is a pointer to data
|
||||
// whose lifetime may be shorter than that of this method's task.
|
||||
shared_ptr<vector<uint32>> bufferStridesCopy;
|
||||
if (bufferStrides != nullptr)
|
||||
{
|
||||
bufferStridesCopy.reset(
|
||||
new vector<uint32>(
|
||||
bufferStrides,
|
||||
bufferStrides + numStrides
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
return m_basicReaderWriter->ReadDataAsync(filename).then([=](const Platform::Array<byte>^ bytecode)
|
||||
{
|
||||
if (streamOutDeclaration != nullptr)
|
||||
{
|
||||
// Reassign the SemanticName elements of the streamOutDeclaration array copy to
|
||||
// point to the corresponding copied strings. Performing the assignment inside the
|
||||
// lambda body ensures that the lambda will take a reference to the shared_ptr
|
||||
// that holds the data. This will guarantee that the data is still valid when
|
||||
// CreateGeometryShaderWithStreamOutput is called.
|
||||
for (uint32 i = 0; i < numEntries; i++)
|
||||
{
|
||||
streamOutDeclarationCopy->at(i).SemanticName = streamOutDeclarationSemanticNamesCopy->at(i).c_str();
|
||||
}
|
||||
}
|
||||
|
||||
DX::ThrowIfFailed(
|
||||
m_d3dDevice->CreateGeometryShaderWithStreamOutput(
|
||||
bytecode->Data,
|
||||
bytecode->Length,
|
||||
streamOutDeclaration == nullptr ? nullptr : streamOutDeclarationCopy->data(),
|
||||
numEntries,
|
||||
bufferStrides == nullptr ? nullptr : bufferStridesCopy->data(),
|
||||
numStrides,
|
||||
rasterizedStream,
|
||||
nullptr,
|
||||
shader
|
||||
)
|
||||
);
|
||||
|
||||
SetDebugName(*shader, filename);
|
||||
});
|
||||
}
|
||||
|
||||
void BasicLoader::LoadShader(
|
||||
_In_ Platform::String^ filename,
|
||||
_Out_ ID3D11HullShader** shader
|
||||
)
|
||||
{
|
||||
Platform::Array<byte>^ bytecode = m_basicReaderWriter->ReadData(filename);
|
||||
|
||||
DX::ThrowIfFailed(
|
||||
m_d3dDevice->CreateHullShader(
|
||||
bytecode->Data,
|
||||
bytecode->Length,
|
||||
nullptr,
|
||||
shader
|
||||
)
|
||||
);
|
||||
|
||||
SetDebugName(*shader, filename);
|
||||
}
|
||||
|
||||
task<void> BasicLoader::LoadShaderAsync(
|
||||
_In_ Platform::String^ filename,
|
||||
_Out_ ID3D11HullShader** shader
|
||||
)
|
||||
{
|
||||
return m_basicReaderWriter->ReadDataAsync(filename).then([=](const Platform::Array<byte>^ bytecode)
|
||||
{
|
||||
DX::ThrowIfFailed(
|
||||
m_d3dDevice->CreateHullShader(
|
||||
bytecode->Data,
|
||||
bytecode->Length,
|
||||
nullptr,
|
||||
shader
|
||||
)
|
||||
);
|
||||
|
||||
SetDebugName(*shader, filename);
|
||||
});
|
||||
}
|
||||
|
||||
void BasicLoader::LoadShader(
|
||||
_In_ Platform::String^ filename,
|
||||
_Out_ ID3D11DomainShader** shader
|
||||
)
|
||||
{
|
||||
Platform::Array<byte>^ bytecode = m_basicReaderWriter->ReadData(filename);
|
||||
|
||||
DX::ThrowIfFailed(
|
||||
m_d3dDevice->CreateDomainShader(
|
||||
bytecode->Data,
|
||||
bytecode->Length,
|
||||
nullptr,
|
||||
shader
|
||||
)
|
||||
);
|
||||
|
||||
SetDebugName(*shader, filename);
|
||||
}
|
||||
|
||||
task<void> BasicLoader::LoadShaderAsync(
|
||||
_In_ Platform::String^ filename,
|
||||
_Out_ ID3D11DomainShader** shader
|
||||
)
|
||||
{
|
||||
return m_basicReaderWriter->ReadDataAsync(filename).then([=](const Platform::Array<byte>^ bytecode)
|
||||
{
|
||||
DX::ThrowIfFailed(
|
||||
m_d3dDevice->CreateDomainShader(
|
||||
bytecode->Data,
|
||||
bytecode->Length,
|
||||
nullptr,
|
||||
shader
|
||||
)
|
||||
);
|
||||
|
||||
SetDebugName(*shader, filename);
|
||||
});
|
||||
}
|
||||
|
||||
void BasicLoader::LoadMesh(
|
||||
_In_ Platform::String^ filename,
|
||||
_Out_ ID3D11Buffer** vertexBuffer,
|
||||
_Out_ ID3D11Buffer** indexBuffer,
|
||||
_Out_opt_ uint32* vertexCount,
|
||||
_Out_opt_ uint32* indexCount
|
||||
)
|
||||
{
|
||||
Platform::Array<byte>^ meshData = m_basicReaderWriter->ReadData(filename);
|
||||
|
||||
CreateMesh(
|
||||
meshData->Data,
|
||||
vertexBuffer,
|
||||
indexBuffer,
|
||||
vertexCount,
|
||||
indexCount,
|
||||
filename
|
||||
);
|
||||
}
|
||||
|
||||
task<void> BasicLoader::LoadMeshAsync(
|
||||
_In_ Platform::String^ filename,
|
||||
_Out_ ID3D11Buffer** vertexBuffer,
|
||||
_Out_ ID3D11Buffer** indexBuffer,
|
||||
_Out_opt_ uint32* vertexCount,
|
||||
_Out_opt_ uint32* indexCount
|
||||
)
|
||||
{
|
||||
return m_basicReaderWriter->ReadDataAsync(filename).then([=](const Platform::Array<byte>^ meshData)
|
||||
{
|
||||
CreateMesh(
|
||||
meshData->Data,
|
||||
vertexBuffer,
|
||||
indexBuffer,
|
||||
vertexCount,
|
||||
indexCount,
|
||||
filename
|
||||
);
|
||||
});
|
||||
}
|
||||
@@ -1,155 +0,0 @@
|
||||
//// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
|
||||
//// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
|
||||
//// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
|
||||
//// PARTICULAR PURPOSE.
|
||||
////
|
||||
//// Copyright (c) Microsoft Corporation. All rights reserved
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "BasicReaderWriter.h"
|
||||
|
||||
// A simple loader class that provides support for loading shaders, textures,
|
||||
// and meshes from files on disk. Provides synchronous and asynchronous methods.
|
||||
ref class BasicLoader
|
||||
{
|
||||
internal:
|
||||
BasicLoader(
|
||||
_In_ ID3D11Device* d3dDevice
|
||||
// ,_In_opt_ IWICImagingFactory2* wicFactory = nullptr
|
||||
);
|
||||
|
||||
void LoadShader(
|
||||
_In_ Platform::String^ filename,
|
||||
_In_reads_opt_(layoutDescNumElements) D3D11_INPUT_ELEMENT_DESC layoutDesc[],
|
||||
_In_ uint32 layoutDescNumElements,
|
||||
_Out_ ID3D11VertexShader** shader,
|
||||
_Out_opt_ ID3D11InputLayout** layout
|
||||
);
|
||||
|
||||
concurrency::task<void> LoadShaderAsync(
|
||||
_In_ Platform::String^ filename,
|
||||
_In_reads_opt_(layoutDescNumElements) D3D11_INPUT_ELEMENT_DESC layoutDesc[],
|
||||
_In_ uint32 layoutDescNumElements,
|
||||
_Out_ ID3D11VertexShader** shader,
|
||||
_Out_opt_ ID3D11InputLayout** layout
|
||||
);
|
||||
|
||||
void LoadShader(
|
||||
_In_ Platform::String^ filename,
|
||||
_Out_ ID3D11PixelShader** shader
|
||||
);
|
||||
|
||||
concurrency::task<void> LoadShaderAsync(
|
||||
_In_ Platform::String^ filename,
|
||||
_Out_ ID3D11PixelShader** shader
|
||||
);
|
||||
|
||||
void LoadShader(
|
||||
_In_ Platform::String^ filename,
|
||||
_Out_ ID3D11ComputeShader** shader
|
||||
);
|
||||
|
||||
concurrency::task<void> LoadShaderAsync(
|
||||
_In_ Platform::String^ filename,
|
||||
_Out_ ID3D11ComputeShader** shader
|
||||
);
|
||||
|
||||
void LoadShader(
|
||||
_In_ Platform::String^ filename,
|
||||
_Out_ ID3D11GeometryShader** shader
|
||||
);
|
||||
|
||||
concurrency::task<void> LoadShaderAsync(
|
||||
_In_ Platform::String^ filename,
|
||||
_Out_ ID3D11GeometryShader** shader
|
||||
);
|
||||
|
||||
void LoadShader(
|
||||
_In_ Platform::String^ filename,
|
||||
_In_reads_opt_(numEntries) const D3D11_SO_DECLARATION_ENTRY* streamOutDeclaration,
|
||||
_In_ uint32 numEntries,
|
||||
_In_reads_opt_(numStrides) const uint32* bufferStrides,
|
||||
_In_ uint32 numStrides,
|
||||
_In_ uint32 rasterizedStream,
|
||||
_Out_ ID3D11GeometryShader** shader
|
||||
);
|
||||
|
||||
concurrency::task<void> LoadShaderAsync(
|
||||
_In_ Platform::String^ filename,
|
||||
_In_reads_opt_(numEntries) const D3D11_SO_DECLARATION_ENTRY* streamOutDeclaration,
|
||||
_In_ uint32 numEntries,
|
||||
_In_reads_opt_(numStrides) const uint32* bufferStrides,
|
||||
_In_ uint32 numStrides,
|
||||
_In_ uint32 rasterizedStream,
|
||||
_Out_ ID3D11GeometryShader** shader
|
||||
);
|
||||
|
||||
void LoadShader(
|
||||
_In_ Platform::String^ filename,
|
||||
_Out_ ID3D11HullShader** shader
|
||||
);
|
||||
|
||||
concurrency::task<void> LoadShaderAsync(
|
||||
_In_ Platform::String^ filename,
|
||||
_Out_ ID3D11HullShader** shader
|
||||
);
|
||||
|
||||
void LoadShader(
|
||||
_In_ Platform::String^ filename,
|
||||
_Out_ ID3D11DomainShader** shader
|
||||
);
|
||||
|
||||
concurrency::task<void> LoadShaderAsync(
|
||||
_In_ Platform::String^ filename,
|
||||
_Out_ ID3D11DomainShader** shader
|
||||
);
|
||||
|
||||
void LoadMesh(
|
||||
_In_ Platform::String^ filename,
|
||||
_Out_ ID3D11Buffer** vertexBuffer,
|
||||
_Out_ ID3D11Buffer** indexBuffer,
|
||||
_Out_opt_ uint32* vertexCount,
|
||||
_Out_opt_ uint32* indexCount
|
||||
);
|
||||
|
||||
concurrency::task<void> LoadMeshAsync(
|
||||
_In_ Platform::String^ filename,
|
||||
_Out_ ID3D11Buffer** vertexBuffer,
|
||||
_Out_ ID3D11Buffer** indexBuffer,
|
||||
_Out_opt_ uint32* vertexCount,
|
||||
_Out_opt_ uint32* indexCount
|
||||
);
|
||||
|
||||
private:
|
||||
Microsoft::WRL::ComPtr<ID3D11Device> m_d3dDevice;
|
||||
// Microsoft::WRL::ComPtr<IWICImagingFactory2> m_wicFactory;
|
||||
BasicReaderWriter^ m_basicReaderWriter;
|
||||
|
||||
template <class DeviceChildType>
|
||||
inline void SetDebugName(
|
||||
_In_ DeviceChildType* object,
|
||||
_In_ Platform::String^ name
|
||||
);
|
||||
|
||||
Platform::String^ GetExtension(
|
||||
_In_ Platform::String^ filename
|
||||
);
|
||||
|
||||
void CreateInputLayout(
|
||||
_In_reads_bytes_(bytecodeSize) byte* bytecode,
|
||||
_In_ uint32 bytecodeSize,
|
||||
_In_reads_opt_(layoutDescNumElements) D3D11_INPUT_ELEMENT_DESC* layoutDesc,
|
||||
_In_ uint32 layoutDescNumElements,
|
||||
_Out_ ID3D11InputLayout** layout
|
||||
);
|
||||
|
||||
void CreateMesh(
|
||||
_In_ byte* meshData,
|
||||
_Out_ ID3D11Buffer** vertexBuffer,
|
||||
_Out_ ID3D11Buffer** indexBuffer,
|
||||
_Out_opt_ uint32* vertexCount,
|
||||
_Out_opt_ uint32* indexCount,
|
||||
_In_opt_ Platform::String^ debugName
|
||||
);
|
||||
};
|
||||
@@ -1,531 +0,0 @@
|
||||
//// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
|
||||
//// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
|
||||
//// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
|
||||
//// PARTICULAR PURPOSE.
|
||||
////
|
||||
//// Copyright (c) Microsoft Corporation. All rights reserved
|
||||
|
||||
#pragma once
|
||||
|
||||
// This header defines helper utilities to make DirectX APIs work with exceptions.
|
||||
namespace DX
|
||||
{
|
||||
inline void ThrowIfFailed(HRESULT hr)
|
||||
{
|
||||
if (FAILED(hr))
|
||||
{
|
||||
// Set a breakpoint on this line to catch DX API errors.
|
||||
throw Platform::Exception::CreateException(hr);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#define _USE_MATH_DEFINES
|
||||
#include <math.h>
|
||||
|
||||
// This header defines math and matrix helper functions and structures used
|
||||
// by DirectX SDK samples.
|
||||
|
||||
// Common Constants
|
||||
|
||||
#define PI_F 3.1415927f
|
||||
|
||||
// Template Vector & Matrix Classes
|
||||
|
||||
template <class T> struct Vector2
|
||||
{
|
||||
union
|
||||
{
|
||||
struct
|
||||
{
|
||||
T x;
|
||||
T y;
|
||||
};
|
||||
struct
|
||||
{
|
||||
T r;
|
||||
T g;
|
||||
};
|
||||
struct
|
||||
{
|
||||
T u;
|
||||
T v;
|
||||
};
|
||||
};
|
||||
|
||||
T& operator[](unsigned int index)
|
||||
{
|
||||
return static_cast<T*>(this)[index];
|
||||
}
|
||||
|
||||
Vector2(T _x = 0, T _y = 0) : x(_x), y(_y) { }
|
||||
};
|
||||
|
||||
template <class T> struct Vector3
|
||||
{
|
||||
union
|
||||
{
|
||||
struct
|
||||
{
|
||||
T x;
|
||||
T y;
|
||||
T z;
|
||||
};
|
||||
struct
|
||||
{
|
||||
T r;
|
||||
T g;
|
||||
T b;
|
||||
};
|
||||
struct
|
||||
{
|
||||
T u;
|
||||
T v;
|
||||
T w;
|
||||
};
|
||||
};
|
||||
|
||||
T& operator[](unsigned int index)
|
||||
{
|
||||
return static_cast<T*>(this)[index];
|
||||
}
|
||||
|
||||
Vector3(T _x = 0, T _y = 0, T _z = 0) : x(_x), y(_y), z(_z) { }
|
||||
};
|
||||
|
||||
template <class T> struct Vector4
|
||||
{
|
||||
union
|
||||
{
|
||||
struct
|
||||
{
|
||||
T x;
|
||||
T y;
|
||||
T z;
|
||||
T w;
|
||||
};
|
||||
struct
|
||||
{
|
||||
T r;
|
||||
T g;
|
||||
T b;
|
||||
T a;
|
||||
};
|
||||
};
|
||||
|
||||
T& operator[](unsigned int index)
|
||||
{
|
||||
return static_cast<T*>(this)[index];
|
||||
}
|
||||
|
||||
Vector4(T _x = 0, T _y = 0, T _z = 0, T _w = 0) : x(_x), y(_y), z(_z), w(_w) { }
|
||||
};
|
||||
|
||||
template <class T> struct Matrix4x4
|
||||
{
|
||||
union
|
||||
{
|
||||
struct
|
||||
{
|
||||
T _11; T _12; T _13; T _14;
|
||||
T _21; T _22; T _23; T _24;
|
||||
T _31; T _32; T _33; T _34;
|
||||
T _41; T _42; T _43; T _44;
|
||||
};
|
||||
struct
|
||||
{
|
||||
T _m00; T _m01; T _m02; T _m03;
|
||||
T _m10; T _m11; T _m12; T _m13;
|
||||
T _m20; T _m21; T _m22; T _m23;
|
||||
T _m30; T _m31; T _m32; T _m33;
|
||||
};
|
||||
};
|
||||
|
||||
Matrix4x4(T value = 0)
|
||||
{
|
||||
_11 = _12 = _13 = _14 = value;
|
||||
_21 = _22 = _23 = _24 = value;
|
||||
_31 = _32 = _33 = _34 = value;
|
||||
_41 = _42 = _43 = _44 = value;
|
||||
}
|
||||
|
||||
Matrix4x4(
|
||||
T i11, T i12, T i13, T i14,
|
||||
T i21, T i22, T i23, T i24,
|
||||
T i31, T i32, T i33, T i34,
|
||||
T i41, T i42, T i43, T i44
|
||||
)
|
||||
{
|
||||
_11 = i11; _12 = i12; _13 = i13; _14 = i14;
|
||||
_21 = i21; _22 = i22; _23 = i23; _24 = i24;
|
||||
_31 = i31; _32 = i32; _33 = i33; _34 = i34;
|
||||
_41 = i41; _42 = i42; _43 = i43; _44 = i44;
|
||||
}
|
||||
|
||||
T* operator[](unsigned int index)
|
||||
{
|
||||
return &(reinterpret_cast<T*>(this)[index*4]);
|
||||
}
|
||||
};
|
||||
|
||||
// Template Vector Operations
|
||||
|
||||
template <class T>
|
||||
T dot(Vector2<T> a, Vector2<T> b)
|
||||
{
|
||||
return a.x * b.x + a.y * b.y;
|
||||
}
|
||||
|
||||
template <class T>
|
||||
T dot(Vector3<T> a, Vector3<T> b)
|
||||
{
|
||||
return a.x * b.x + a.y * b.y + a.z * b.z;
|
||||
}
|
||||
|
||||
template <class T>
|
||||
T dot(Vector4<T> a, Vector4<T> b)
|
||||
{
|
||||
return a.x * b.x + a.y * b.y + a.z * b.z + a.w + b.w;
|
||||
}
|
||||
|
||||
template <class T>
|
||||
T length(Vector2<T> a)
|
||||
{
|
||||
return sqrt(a.x * a.x + a.y * a.y);
|
||||
}
|
||||
|
||||
template <class T>
|
||||
T length(Vector3<T> a)
|
||||
{
|
||||
return sqrt(a.x * a.x + a.y * a.y + a.z * a.z);
|
||||
}
|
||||
|
||||
template <class T>
|
||||
T length(Vector4<T> a)
|
||||
{
|
||||
return sqrt(a.x * a.x + a.y * a.y + a.z * a.z + a.w * a.w);
|
||||
}
|
||||
|
||||
template <class T>
|
||||
Vector3<T> cross(Vector3<T> a, Vector3<T> b)
|
||||
{
|
||||
return Vector3<T>((a.y*b.z)-(a.z*b.y), (a.z*b.x)-(a.x*b.z), (a.x*b.y)-(a.y*b.x));
|
||||
}
|
||||
|
||||
template <class T>
|
||||
Vector2<T> normalize(Vector2<T> a)
|
||||
{
|
||||
T len = length(a);
|
||||
return Vector2<T>(a.x / len, a.y / len);
|
||||
}
|
||||
|
||||
template <class T>
|
||||
Vector3<T> normalize(Vector3<T> a)
|
||||
{
|
||||
T len = length(a);
|
||||
return Vector3<T>(a.x / len, a.y / len, a.z / len);
|
||||
}
|
||||
|
||||
template <class T>
|
||||
Vector4<T> normalize(Vector4<T> a)
|
||||
{
|
||||
T len = length(a);
|
||||
return Vector4<T>(a.x / len, a.y / len, a.z / len, a.w / len);
|
||||
}
|
||||
|
||||
// Template Vector Operators
|
||||
|
||||
template <class T>
|
||||
Vector2<T> operator-(Vector2<T> a, Vector2<T> b)
|
||||
{
|
||||
return Vector2<T>(a.x - b.x, a.y - b.y);
|
||||
}
|
||||
|
||||
template <class T>
|
||||
Vector2<T> operator-(Vector2<T> a)
|
||||
{
|
||||
return Vector2<T>(-a.x, -a.y);
|
||||
}
|
||||
|
||||
template <class T>
|
||||
Vector3<T> operator-(Vector3<T> a, Vector3<T> b)
|
||||
{
|
||||
return Vector3<T>(a.x - b.x, a.y - b.y, a.z - b.z);
|
||||
}
|
||||
|
||||
template <class T>
|
||||
Vector3<T> operator-(Vector3<T> a)
|
||||
{
|
||||
return Vector3<T>(-a.x, -a.y, -a.z);
|
||||
}
|
||||
|
||||
template <class T>
|
||||
Vector4<T> operator-(Vector4<T> a, Vector4<T> b)
|
||||
{
|
||||
return Vector4<T>(a.x - b.x, a.y - b.y, a.z - b.z, a.w - b.w);
|
||||
}
|
||||
|
||||
template <class T>
|
||||
Vector4<T> operator-(Vector4<T> a)
|
||||
{
|
||||
return Vector4<T>(-a.x, -a.y, -a.z, -a.w);
|
||||
}
|
||||
|
||||
template <class T>
|
||||
Vector2<T> operator+(Vector2<T> a, Vector2<T> b)
|
||||
{
|
||||
return Vector2<T>(a.x + b.x, a.y + b.y);
|
||||
}
|
||||
|
||||
template <class T>
|
||||
Vector3<T> operator+(Vector3<T> a, Vector3<T> b)
|
||||
{
|
||||
return Vector3<T>(a.x + b.x, a.y + b.y, a.z + b.z);
|
||||
}
|
||||
|
||||
template <class T>
|
||||
Vector4<T> operator+(Vector4<T> a, Vector4<T> b)
|
||||
{
|
||||
return Vector4<T>(a.x + b.x, a.y + b.y, a.z + b.z, a.w + b.w);
|
||||
}
|
||||
|
||||
template <class T>
|
||||
Vector2<T> operator*(Vector2<T> a, T s)
|
||||
{
|
||||
return Vector2<T>(a.x * s, a.y * s);
|
||||
}
|
||||
|
||||
template <class T>
|
||||
Vector2<T> operator*(T s, Vector2<T> a)
|
||||
{
|
||||
return a * s;
|
||||
}
|
||||
|
||||
template <class T>
|
||||
Vector2<T> operator*(Vector2<T> a, Vector2<T> b)
|
||||
{
|
||||
return Vector2<T>(a.x * b.x, a.y * b.y);
|
||||
}
|
||||
|
||||
template <class T>
|
||||
Vector2<T> operator/(Vector2<T> a, T s)
|
||||
{
|
||||
return Vector2<T>(a.x / s, a.y / s);
|
||||
}
|
||||
|
||||
template <class T>
|
||||
Vector3<T> operator*(Vector3<T> a, T s)
|
||||
{
|
||||
return Vector3<T>(a.x * s, a.y * s, a.z * s);
|
||||
}
|
||||
|
||||
template <class T>
|
||||
Vector3<T> operator*(T s, Vector3<T> a)
|
||||
{
|
||||
return a * s;
|
||||
}
|
||||
|
||||
template <class T>
|
||||
Vector3<T> operator*(Vector3<T> a, Vector3<T> b)
|
||||
{
|
||||
return Vector3<T>(a.x * b.x, a.y * b.y, a.z * b.z);
|
||||
}
|
||||
|
||||
template <class T>
|
||||
Vector3<T> operator/(Vector3<T> a, T s)
|
||||
{
|
||||
return Vector3<T>(a.x / s, a.y / s, a.z / s);
|
||||
}
|
||||
|
||||
template <class T>
|
||||
Vector4<T> operator*(Vector4<T> a, T s)
|
||||
{
|
||||
return Vector4<T>(a.x * s, a.y * s, a.z * s, a.w * s);
|
||||
}
|
||||
|
||||
template <class T>
|
||||
Vector4<T> operator*(T s, Vector4<T> a)
|
||||
{
|
||||
return a * s;
|
||||
}
|
||||
|
||||
template <class T>
|
||||
Vector4<T> operator*(Vector4<T> a, Vector4<T> b)
|
||||
{
|
||||
return Vector4<T>(a.x * b.x, a.y * b.y, a.z * b.z, a.w * b.w);
|
||||
}
|
||||
|
||||
template <class T>
|
||||
Vector4<T> operator/(Vector4<T> a, T s)
|
||||
{
|
||||
return Vector4<T>(a.x / s, a.y / s, a.z / s, a.w / s);
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Template Matrix Operations
|
||||
|
||||
template <class T>
|
||||
Matrix4x4<T> transpose(Matrix4x4<T> m)
|
||||
{
|
||||
return Matrix4x4<T>(
|
||||
m._11, m._21, m._31, m._41,
|
||||
m_.12, m._22, m._32, m._42,
|
||||
m._13, m._23, m._33, m._43,
|
||||
m._14, m._24, m._34, m._44
|
||||
);
|
||||
}
|
||||
|
||||
template <class T>
|
||||
Matrix4x4<T> mul(Matrix4x4<T> m1, Matrix4x4<T> m2)
|
||||
{
|
||||
Matrix4x4<T> mOut;
|
||||
|
||||
for (int i = 0; i < 4; i++)
|
||||
{
|
||||
for (int j = 0; j < 4; j++)
|
||||
{
|
||||
for (int k = 0; k < 4; k++)
|
||||
{
|
||||
mOut[i][j] += m1[i][k] * m2[k][j];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return mOut;
|
||||
}
|
||||
|
||||
// Common HLSL-compatible vector typedefs
|
||||
|
||||
typedef unsigned int uint;
|
||||
|
||||
typedef Vector2<float> float2;
|
||||
typedef Vector3<float> float3;
|
||||
typedef Vector4<float> float4;
|
||||
|
||||
typedef Matrix4x4<float> float4x4;
|
||||
|
||||
// Standard Matrix Intializers
|
||||
|
||||
inline float4x4 identity()
|
||||
{
|
||||
float4x4 mOut;
|
||||
|
||||
mOut._11 = 1.0f; mOut._12 = 0.0f; mOut._13 = 0.0f; mOut._14 = 0.0f;
|
||||
mOut._21 = 0.0f; mOut._22 = 1.0f; mOut._23 = 0.0f; mOut._24 = 0.0f;
|
||||
mOut._31 = 0.0f; mOut._32 = 0.0f; mOut._33 = 1.0f; mOut._34 = 0.0f;
|
||||
mOut._41 = 0.0f; mOut._42 = 0.0f; mOut._43 = 0.0f; mOut._44 = 1.0f;
|
||||
|
||||
return mOut;
|
||||
}
|
||||
|
||||
inline float4x4 translation(float x, float y, float z)
|
||||
{
|
||||
float4x4 mOut;
|
||||
|
||||
mOut._11 = 1.0f; mOut._12 = 0.0f; mOut._13 = 0.0f; mOut._14 = x;
|
||||
mOut._21 = 0.0f; mOut._22 = 1.0f; mOut._23 = 0.0f; mOut._24 = y;
|
||||
mOut._31 = 0.0f; mOut._32 = 0.0f; mOut._33 = 1.0f; mOut._34 = z;
|
||||
mOut._41 = 0.0f; mOut._42 = 0.0f; mOut._43 = 0.0f; mOut._44 = 1.0f;
|
||||
|
||||
return mOut;
|
||||
}
|
||||
|
||||
inline float4x4 scale(float x, float y, float z)
|
||||
{
|
||||
float4x4 mOut;
|
||||
|
||||
mOut._11 = x; mOut._12 = 0.0f; mOut._13 = 0.0f; mOut._14 = 0.0f;
|
||||
mOut._21 = 0.0f; mOut._22 = y; mOut._23 = 0.0f; mOut._24 = 0.0f;
|
||||
mOut._31 = 0.0f; mOut._32 = 0.0f; mOut._33 = z; mOut._34 = 0.0f;
|
||||
mOut._41 = 0.0f; mOut._42 = 0.0f; mOut._43 = 0.0f; mOut._44 = 1.0f;
|
||||
|
||||
return mOut;
|
||||
}
|
||||
|
||||
inline float4x4 rotationX(float degreeX)
|
||||
{
|
||||
float angleInRadians = degreeX * (PI_F / 180.0f);
|
||||
|
||||
float sinAngle = sinf(angleInRadians);
|
||||
float cosAngle = cosf(angleInRadians);
|
||||
|
||||
float4x4 mOut;
|
||||
|
||||
mOut._11 = 1.0f; mOut._12 = 0.0f; mOut._13 = 0.0f; mOut._14 = 0.0f;
|
||||
mOut._21 = 0.0f; mOut._22 = cosAngle; mOut._23 = -sinAngle; mOut._24 = 0.0f;
|
||||
mOut._31 = 0.0f; mOut._32 = sinAngle; mOut._33 = cosAngle; mOut._34 = 0.0f;
|
||||
mOut._41 = 0.0f; mOut._42 = 0.0f; mOut._43 = 0.0f; mOut._44 = 1.0f;
|
||||
|
||||
return mOut;
|
||||
}
|
||||
|
||||
inline float4x4 rotationY(float degreeY)
|
||||
{
|
||||
float angleInRadians = degreeY * (PI_F / 180.0f);
|
||||
|
||||
float sinAngle = sinf(angleInRadians);
|
||||
float cosAngle = cosf(angleInRadians);
|
||||
|
||||
float4x4 mOut;
|
||||
|
||||
mOut._11 = cosAngle; mOut._12 = 0.0f; mOut._13 = sinAngle; mOut._14 = 0.0f;
|
||||
mOut._21 = 0.0f; mOut._22 = 1.0f; mOut._23 = 0.0f; mOut._24 = 0.0f;
|
||||
mOut._31 = -sinAngle; mOut._32 = 0.0f; mOut._33 = cosAngle; mOut._34 = 0.0f;
|
||||
mOut._41 = 0.0f; mOut._42 = 0.0f; mOut._43 = 0.0f; mOut._44 = 1.0f;
|
||||
|
||||
return mOut;
|
||||
}
|
||||
|
||||
inline float4x4 rotationZ(float degreeZ)
|
||||
{
|
||||
float angleInRadians = degreeZ * (PI_F / 180.0f);
|
||||
|
||||
float sinAngle = sinf(angleInRadians);
|
||||
float cosAngle = cosf(angleInRadians);
|
||||
|
||||
float4x4 mOut;
|
||||
|
||||
mOut._11 = cosAngle; mOut._12 = -sinAngle; mOut._13 = 0.0f; mOut._14 = 0.0f;
|
||||
mOut._21 = sinAngle; mOut._22 = cosAngle; mOut._23 = 0.0f; mOut._24 = 0.0f;
|
||||
mOut._31 = 0.0f; mOut._32 = 0.0f; mOut._33 = 1.0f; mOut._34 = 0.0f;
|
||||
mOut._41 = 0.0f; mOut._42 = 0.0f; mOut._43 = 0.0f; mOut._44 = 1.0f;
|
||||
|
||||
return mOut;
|
||||
}
|
||||
|
||||
// 3D Rotation matrix for an arbitrary axis specified by x, y and z
|
||||
inline float4x4 rotationArbitrary(float3 axis, float degree)
|
||||
{
|
||||
axis = normalize(axis);
|
||||
|
||||
float angleInRadians = degree * (PI_F / 180.0f);
|
||||
|
||||
float sinAngle = sinf(angleInRadians);
|
||||
float cosAngle = cosf(angleInRadians);
|
||||
float oneMinusCosAngle = 1 - cosAngle;
|
||||
|
||||
float4x4 mOut;
|
||||
|
||||
mOut._11 = 1.0f + oneMinusCosAngle * (axis.x * axis.x - 1.0f);
|
||||
mOut._12 = axis.z * sinAngle + oneMinusCosAngle * axis.x * axis.y;
|
||||
mOut._13 = -axis.y * sinAngle + oneMinusCosAngle * axis.x * axis.z;
|
||||
mOut._41 = 0.0f;
|
||||
|
||||
mOut._21 = -axis.z * sinAngle + oneMinusCosAngle * axis.y * axis.x;
|
||||
mOut._22 = 1.0f + oneMinusCosAngle * (axis.y * axis.y - 1.0f);
|
||||
mOut._23 = axis.x * sinAngle + oneMinusCosAngle * axis.y * axis.z;
|
||||
mOut._24 = 0.0f;
|
||||
|
||||
mOut._31 = axis.y * sinAngle + oneMinusCosAngle * axis.z * axis.x;
|
||||
mOut._32 = -axis.x * sinAngle + oneMinusCosAngle * axis.z * axis.y;
|
||||
mOut._33 = 1.0f + oneMinusCosAngle * (axis.z * axis.z - 1.0f);
|
||||
mOut._34 = 0.0f;
|
||||
|
||||
mOut._41 = 0.0f;
|
||||
mOut._42 = 0.0f;
|
||||
mOut._43 = 0.0f;
|
||||
mOut._44 = 1.0f;
|
||||
|
||||
return mOut;
|
||||
}
|
||||
@@ -1,175 +0,0 @@
|
||||
//// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
|
||||
//// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
|
||||
//// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
|
||||
//// PARTICULAR PURPOSE.
|
||||
////
|
||||
//// Copyright (c) Microsoft Corporation. All rights reserved
|
||||
|
||||
#include <wrl.h>
|
||||
#include <wrl/client.h>
|
||||
#include <d3d11_1.h>
|
||||
#include <DirectXMath.h>
|
||||
#include <ppl.h>
|
||||
#include <ppltasks.h>
|
||||
#include <agile.h>
|
||||
#include "BasicReaderWriter.h"
|
||||
|
||||
using namespace Microsoft::WRL;
|
||||
using namespace Windows::Storage;
|
||||
using namespace Windows::Storage::FileProperties;
|
||||
using namespace Windows::Storage::Streams;
|
||||
using namespace Windows::Foundation;
|
||||
using namespace Windows::ApplicationModel;
|
||||
using namespace concurrency;
|
||||
|
||||
BasicReaderWriter::BasicReaderWriter()
|
||||
{
|
||||
m_location = Package::Current->InstalledLocation;
|
||||
m_locationPath = Platform::String::Concat(m_location->Path, "\\");
|
||||
}
|
||||
|
||||
BasicReaderWriter::BasicReaderWriter(
|
||||
_In_ Windows::Storage::StorageFolder^ folder
|
||||
)
|
||||
{
|
||||
m_location = folder;
|
||||
Platform::String^ path = m_location->Path;
|
||||
if (path->Length() == 0)
|
||||
{
|
||||
// Applications are not permitted to access certain
|
||||
// folders, such as the Documents folder, using this
|
||||
// code path. In such cases, the Path property for
|
||||
// the folder will be an empty string.
|
||||
throw ref new Platform::FailureException();
|
||||
}
|
||||
m_locationPath = Platform::String::Concat(path, "\\");
|
||||
}
|
||||
|
||||
Platform::Array<byte>^ BasicReaderWriter::ReadData(
|
||||
_In_ Platform::String^ filename
|
||||
)
|
||||
{
|
||||
CREATEFILE2_EXTENDED_PARAMETERS extendedParams = {0};
|
||||
extendedParams.dwSize = sizeof(CREATEFILE2_EXTENDED_PARAMETERS);
|
||||
extendedParams.dwFileAttributes = FILE_ATTRIBUTE_NORMAL;
|
||||
extendedParams.dwFileFlags = FILE_FLAG_SEQUENTIAL_SCAN;
|
||||
extendedParams.dwSecurityQosFlags = SECURITY_ANONYMOUS;
|
||||
extendedParams.lpSecurityAttributes = nullptr;
|
||||
extendedParams.hTemplateFile = nullptr;
|
||||
|
||||
Wrappers::FileHandle file(
|
||||
CreateFile2(
|
||||
Platform::String::Concat(m_locationPath, filename)->Data(),
|
||||
GENERIC_READ,
|
||||
FILE_SHARE_READ,
|
||||
OPEN_EXISTING,
|
||||
&extendedParams
|
||||
)
|
||||
);
|
||||
if (file.Get() == INVALID_HANDLE_VALUE)
|
||||
{
|
||||
throw ref new Platform::FailureException();
|
||||
}
|
||||
|
||||
FILE_STANDARD_INFO fileInfo = {0};
|
||||
if (!GetFileInformationByHandleEx(
|
||||
file.Get(),
|
||||
FileStandardInfo,
|
||||
&fileInfo,
|
||||
sizeof(fileInfo)
|
||||
))
|
||||
{
|
||||
throw ref new Platform::FailureException();
|
||||
}
|
||||
|
||||
if (fileInfo.EndOfFile.HighPart != 0)
|
||||
{
|
||||
throw ref new Platform::OutOfMemoryException();
|
||||
}
|
||||
|
||||
Platform::Array<byte>^ fileData = ref new Platform::Array<byte>(fileInfo.EndOfFile.LowPart);
|
||||
|
||||
if (!ReadFile(
|
||||
file.Get(),
|
||||
fileData->Data,
|
||||
fileData->Length,
|
||||
nullptr,
|
||||
nullptr
|
||||
))
|
||||
{
|
||||
throw ref new Platform::FailureException();
|
||||
}
|
||||
|
||||
return fileData;
|
||||
}
|
||||
|
||||
task<Platform::Array<byte>^> BasicReaderWriter::ReadDataAsync(
|
||||
_In_ Platform::String^ filename
|
||||
)
|
||||
{
|
||||
return task<StorageFile^>(m_location->GetFileAsync(filename)).then([=](StorageFile^ file)
|
||||
{
|
||||
return FileIO::ReadBufferAsync(file);
|
||||
}).then([=](IBuffer^ buffer)
|
||||
{
|
||||
auto fileData = ref new Platform::Array<byte>(buffer->Length);
|
||||
DataReader::FromBuffer(buffer)->ReadBytes(fileData);
|
||||
return fileData;
|
||||
});
|
||||
}
|
||||
|
||||
uint32 BasicReaderWriter::WriteData(
|
||||
_In_ Platform::String^ filename,
|
||||
_In_ const Platform::Array<byte>^ fileData
|
||||
)
|
||||
{
|
||||
CREATEFILE2_EXTENDED_PARAMETERS extendedParams = {0};
|
||||
extendedParams.dwSize = sizeof(CREATEFILE2_EXTENDED_PARAMETERS);
|
||||
extendedParams.dwFileAttributes = FILE_ATTRIBUTE_NORMAL;
|
||||
extendedParams.dwFileFlags = FILE_FLAG_SEQUENTIAL_SCAN;
|
||||
extendedParams.dwSecurityQosFlags = SECURITY_ANONYMOUS;
|
||||
extendedParams.lpSecurityAttributes = nullptr;
|
||||
extendedParams.hTemplateFile = nullptr;
|
||||
|
||||
Wrappers::FileHandle file(
|
||||
CreateFile2(
|
||||
Platform::String::Concat(m_locationPath, filename)->Data(),
|
||||
GENERIC_WRITE,
|
||||
0,
|
||||
CREATE_ALWAYS,
|
||||
&extendedParams
|
||||
)
|
||||
);
|
||||
if (file.Get() == INVALID_HANDLE_VALUE)
|
||||
{
|
||||
throw ref new Platform::FailureException();
|
||||
}
|
||||
|
||||
DWORD numBytesWritten;
|
||||
if (
|
||||
!WriteFile(
|
||||
file.Get(),
|
||||
fileData->Data,
|
||||
fileData->Length,
|
||||
&numBytesWritten,
|
||||
nullptr
|
||||
) ||
|
||||
numBytesWritten != fileData->Length
|
||||
)
|
||||
{
|
||||
throw ref new Platform::FailureException();
|
||||
}
|
||||
|
||||
return numBytesWritten;
|
||||
}
|
||||
|
||||
task<void> BasicReaderWriter::WriteDataAsync(
|
||||
_In_ Platform::String^ filename,
|
||||
_In_ const Platform::Array<byte>^ fileData
|
||||
)
|
||||
{
|
||||
return task<StorageFile^>(m_location->CreateFileAsync(filename, CreationCollisionOption::ReplaceExisting)).then([=](StorageFile^ file)
|
||||
{
|
||||
FileIO::WriteBytesAsync(file, fileData);
|
||||
});
|
||||
}
|
||||
@@ -1,43 +0,0 @@
|
||||
//// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
|
||||
//// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
|
||||
//// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
|
||||
//// PARTICULAR PURPOSE.
|
||||
////
|
||||
//// Copyright (c) Microsoft Corporation. All rights reserved
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <ppltasks.h>
|
||||
|
||||
// A simple reader/writer class that provides support for reading and writing
|
||||
// files on disk. Provides synchronous and asynchronous methods.
|
||||
ref class BasicReaderWriter
|
||||
{
|
||||
private:
|
||||
Windows::Storage::StorageFolder^ m_location;
|
||||
Platform::String^ m_locationPath;
|
||||
|
||||
internal:
|
||||
BasicReaderWriter();
|
||||
BasicReaderWriter(
|
||||
_In_ Windows::Storage::StorageFolder^ folder
|
||||
);
|
||||
|
||||
Platform::Array<byte>^ ReadData(
|
||||
_In_ Platform::String^ filename
|
||||
);
|
||||
|
||||
concurrency::task<Platform::Array<byte>^> ReadDataAsync(
|
||||
_In_ Platform::String^ filename
|
||||
);
|
||||
|
||||
uint32 WriteData(
|
||||
_In_ Platform::String^ filename,
|
||||
_In_ const Platform::Array<byte>^ fileData
|
||||
);
|
||||
|
||||
concurrency::task<void> WriteDataAsync(
|
||||
_In_ Platform::String^ filename,
|
||||
_In_ const Platform::Array<byte>^ fileData
|
||||
);
|
||||
};
|
||||
@@ -1,88 +0,0 @@
|
||||
//// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
|
||||
//// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
|
||||
//// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
|
||||
//// PARTICULAR PURPOSE.
|
||||
////
|
||||
//// Copyright (c) Microsoft Corporation. All rights reserved
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "BasicMath.h"
|
||||
|
||||
// Defines the vertex format for the shapes generated in the functions below.
|
||||
struct BasicVertex
|
||||
{
|
||||
float3 pos; // position
|
||||
float3 norm; // surface normal vector
|
||||
float2 tex; // texture coordinate
|
||||
};
|
||||
|
||||
// Defines the vertex format for all shapes generated in the functions below.
|
||||
struct TangentVertex
|
||||
{
|
||||
float3 pos; // position
|
||||
float2 tex; // texture coordinate
|
||||
float3 uTan; // texture coordinate u-tangent vector
|
||||
float3 vTan; // texture coordinate v-tangent vector
|
||||
};
|
||||
|
||||
// A helper class that provides convenient functions for creating common
|
||||
// geometrical shapes used by DirectX SDK samples.
|
||||
ref class BasicShapes
|
||||
{
|
||||
internal:
|
||||
BasicShapes(ID3D11Device *d3dDevice);
|
||||
void CreateCube(
|
||||
_Out_ ID3D11Buffer **vertexBuffer,
|
||||
_Out_ ID3D11Buffer **indexBuffer,
|
||||
_Out_opt_ unsigned int *vertexCount,
|
||||
_Out_opt_ unsigned int *indexCount
|
||||
);
|
||||
void CreateBox(
|
||||
float3 radii,
|
||||
_Out_ ID3D11Buffer **vertexBuffer,
|
||||
_Out_ ID3D11Buffer **indexBuffer,
|
||||
_Out_opt_ unsigned int *vertexCount,
|
||||
_Out_opt_ unsigned int *indexCount
|
||||
);
|
||||
void CreateSphere(
|
||||
_Out_ ID3D11Buffer **vertexBuffer,
|
||||
_Out_ ID3D11Buffer **indexBuffer,
|
||||
_Out_opt_ unsigned int *vertexCount,
|
||||
_Out_opt_ unsigned int *indexCount
|
||||
);
|
||||
void CreateTangentSphere(
|
||||
_Out_ ID3D11Buffer **vertexBuffer,
|
||||
_Out_ ID3D11Buffer **indexBuffer,
|
||||
_Out_opt_ unsigned int *vertexCount,
|
||||
_Out_opt_ unsigned int *indexCount
|
||||
);
|
||||
void CreateReferenceAxis(
|
||||
_Out_ ID3D11Buffer **vertexBuffer,
|
||||
_Out_ ID3D11Buffer **indexBuffer,
|
||||
_Out_opt_ unsigned int *vertexCount,
|
||||
_Out_opt_ unsigned int *indexCount
|
||||
);
|
||||
|
||||
private:
|
||||
Microsoft::WRL::ComPtr<ID3D11Device> m_d3dDevice;
|
||||
|
||||
void CreateVertexBuffer(
|
||||
_In_ unsigned int numVertices,
|
||||
_In_ BasicVertex *vertexData,
|
||||
_Out_ ID3D11Buffer **vertexBuffer
|
||||
);
|
||||
|
||||
void CreateIndexBuffer(
|
||||
_In_ unsigned int numIndices,
|
||||
_In_ unsigned short *indexData,
|
||||
_Out_ ID3D11Buffer **indexBuffer
|
||||
);
|
||||
|
||||
void CreateTangentVertexBuffer(
|
||||
_In_ unsigned int numVertices,
|
||||
_In_ TangentVertex *vertexData,
|
||||
_Out_ ID3D11Buffer **vertexBuffer
|
||||
);
|
||||
|
||||
};
|
||||
@@ -1,95 +0,0 @@
|
||||
// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
|
||||
// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
|
||||
// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
|
||||
// PARTICULAR PURPOSE.
|
||||
//
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
cbuffer RenderTargetInfoCB
|
||||
{
|
||||
float2 renderTargetSize;
|
||||
};
|
||||
|
||||
cbuffer MvpMatrixCB
|
||||
{
|
||||
float4x4 mvpMatrix;
|
||||
};
|
||||
|
||||
struct GeometryShaderInput
|
||||
{
|
||||
float2 origin : TRANSFORM0;
|
||||
float2 offset : TRANSFORM1;
|
||||
float rotation : TRANSFORM2;
|
||||
float4 textRect : TRANSFORM3;
|
||||
vector<unsigned int, 4> colors : COLOR0;
|
||||
float4 pt_x: TRANSFORM4;
|
||||
float4 pt_y: TRANSFORM5;
|
||||
};
|
||||
|
||||
struct PixelShaderInput
|
||||
{
|
||||
float4 pos : SV_POSITION;
|
||||
float2 tex : TEXCOORD0;
|
||||
float4 color : COLOR0;
|
||||
};
|
||||
|
||||
|
||||
void rotate(float4x4 matrixxx, float angle, float3 origin)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
// This shader generates two triangles that will be used to draw the sprite.
|
||||
// The vertex properties are calculated based on the per-sprite instance data
|
||||
// passed in from the vertex shader.
|
||||
|
||||
[maxvertexcount(4)]
|
||||
void main(point GeometryShaderInput input[1], inout TriangleStream<PixelShaderInput> spriteStream)
|
||||
{
|
||||
float sinRotation;
|
||||
float cosRotation;
|
||||
sincos(input[0].rotation, sinRotation, cosRotation);
|
||||
|
||||
float2 texCoord[4];
|
||||
|
||||
texCoord[0] = float2(input[0].textRect[0], input[0].textRect[2]);
|
||||
texCoord[1] = float2(input[0].textRect[1], input[0].textRect[2]);
|
||||
texCoord[2] = float2(input[0].textRect[0], input[0].textRect[3]);
|
||||
texCoord[3] = float2(input[0].textRect[1], input[0].textRect[3]);
|
||||
|
||||
float2 posDelta[4];
|
||||
|
||||
posDelta[0] = float2(0.0f, 0.0f);
|
||||
posDelta[1] = float2( 2*input[0].offset.x, 0.0f);
|
||||
posDelta[2] = float2(0.0f, -2*input[0].offset.y);
|
||||
posDelta[3] = float2( 2*input[0].offset.x, -2*input[0].offset.y);
|
||||
/*
|
||||
posDelta[0] = float2(-input[0].offset.x, input[0].offset.y);
|
||||
posDelta[1] = float2( input[0].offset.x, input[0].offset.y);
|
||||
posDelta[2] = float2(-input[0].offset.x, -input[0].offset.y);
|
||||
posDelta[3] = float2( input[0].offset.x, -input[0].offset.y);
|
||||
*/
|
||||
spriteStream.RestartStrip();
|
||||
[unroll]
|
||||
for (int i = 0; i < 4; i++)
|
||||
{
|
||||
float4 colorFloat;
|
||||
colorFloat[3] = (float)((input[0].colors[i] & 0xFF000000) >> 24) / (float)255;
|
||||
colorFloat[0] = (float)((input[0].colors[i] & 0x00FF0000) >> 16) / (float)255;
|
||||
colorFloat[1] = (float)((input[0].colors[i] & 0x0000FF00) >> 8) / (float)255;
|
||||
colorFloat[2] = (float)((input[0].colors[i] & 0x000000FF) ) / (float)255;
|
||||
|
||||
posDelta[i] = float2(
|
||||
posDelta[i].x * cosRotation - posDelta[i].y * sinRotation,
|
||||
posDelta[i].x * sinRotation + posDelta[i].y * cosRotation
|
||||
);
|
||||
posDelta[i] /= renderTargetSize;
|
||||
PixelShaderInput streamElement;
|
||||
streamElement.pos = float4(input[0].origin + posDelta[i], 0.5f, 1.0f);
|
||||
streamElement.tex = texCoord[i];
|
||||
streamElement.color = colorFloat;
|
||||
spriteStream.Append(streamElement);
|
||||
}
|
||||
spriteStream.RestartStrip();
|
||||
}
|
||||
@@ -1,44 +0,0 @@
|
||||
// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
|
||||
// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
|
||||
// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
|
||||
// PARTICULAR PURPOSE.
|
||||
//
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
struct VertexShaderInput
|
||||
{
|
||||
float2 origin : TRANSFORM0;
|
||||
float2 offset : TRANSFORM1;
|
||||
float rotation : TRANSFORM2;
|
||||
float4 textRect : TRANSFORM3;
|
||||
vector<unsigned int, 4> colors : COLOR0;
|
||||
float4 pt_x: TRANSFORM4;
|
||||
float4 pt_y: TRANSFORM5;
|
||||
};
|
||||
|
||||
struct GeometryShaderInput
|
||||
{
|
||||
float2 origin : TRANSFORM0;
|
||||
float2 offset : TRANSFORM1;
|
||||
float rotation : TRANSFORM2;
|
||||
float4 textRect : TRANSFORM3;
|
||||
vector<unsigned int, 4> colors : COLOR0;
|
||||
float4 pt_x: TRANSFORM4;
|
||||
float4 pt_y: TRANSFORM5;
|
||||
};
|
||||
|
||||
// This shader simply passes per-sprite instance data to the geometry shader.
|
||||
|
||||
GeometryShaderInput main(VertexShaderInput input)
|
||||
{
|
||||
GeometryShaderInput ret;
|
||||
ret.origin = input.origin;
|
||||
ret.offset = input.offset;
|
||||
ret.rotation = input.rotation;
|
||||
ret.textRect = input.textRect;
|
||||
ret.colors = input.colors;
|
||||
ret.pt_x = input.pt_x;
|
||||
ret.pt_y = input.pt_y;
|
||||
return ret;
|
||||
}
|
||||
@@ -1,51 +0,0 @@
|
||||
// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
|
||||
// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
|
||||
// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
|
||||
// PARTICULAR PURPOSE.
|
||||
//
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
cbuffer RenderTargetInfoCB
|
||||
{
|
||||
float2 renderTargetSize;
|
||||
};
|
||||
|
||||
struct VertexShaderInput
|
||||
{
|
||||
float2 pos : POSITION;
|
||||
float2 tex : TEXCOORD0;
|
||||
float2 origin : TRANSFORM0;
|
||||
float2 offset : TRANSFORM1;
|
||||
float rotation : TRANSFORM2;
|
||||
float4 color : COLOR0;
|
||||
};
|
||||
|
||||
struct PixelShaderInput
|
||||
{
|
||||
float4 pos : SV_POSITION;
|
||||
float2 tex : TEXCOORD0;
|
||||
float4 color : COLOR0;
|
||||
};
|
||||
|
||||
// This shader takes a fixed-position vertex buffer, and using per-sprite
|
||||
// instance data, transforms the vertices so that the sprite is rendered
|
||||
// at the desired position, rotation, and scale.
|
||||
|
||||
PixelShaderInput main(VertexShaderInput input)
|
||||
{
|
||||
PixelShaderInput ret;
|
||||
float sinRotation;
|
||||
float cosRotation;
|
||||
sincos(input.rotation, sinRotation, cosRotation);
|
||||
float2 posDelta = input.pos * input.offset;
|
||||
posDelta = float2(
|
||||
posDelta.x * cosRotation - posDelta.y * sinRotation,
|
||||
posDelta.x * sinRotation + posDelta.y * cosRotation
|
||||
);
|
||||
posDelta /= renderTargetSize;
|
||||
ret.pos = float4(input.origin + posDelta, 0.5f, 1.0f);
|
||||
ret.tex = input.tex;
|
||||
ret.color = input.color;
|
||||
return ret;
|
||||
}
|
||||
@@ -1,32 +0,0 @@
|
||||
// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
|
||||
// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
|
||||
// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
|
||||
// PARTICULAR PURPOSE.
|
||||
//
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
struct VertexShaderInput
|
||||
{
|
||||
float2 pos : POSITIONT;
|
||||
float2 tex : TEXCOORD0;
|
||||
float4 color : COLOR0;
|
||||
};
|
||||
|
||||
struct PixelShaderInput
|
||||
{
|
||||
float4 pos : SV_POSITION;
|
||||
float2 tex : TEXCOORD0;
|
||||
float4 color : COLOR0;
|
||||
};
|
||||
|
||||
// This shader simply passes pre-transformed vertex data to the pixel shader.
|
||||
|
||||
PixelShaderInput main(VertexShaderInput input)
|
||||
{
|
||||
PixelShaderInput ret;
|
||||
ret.pos = float4(input.pos, 0.5f, 1.0f);
|
||||
ret.tex = input.tex;
|
||||
ret.color = input.color;
|
||||
return ret;
|
||||
}
|
||||
@@ -1,988 +0,0 @@
|
||||
//// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
|
||||
//// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
|
||||
//// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
|
||||
//// PARTICULAR PURPOSE.
|
||||
////
|
||||
//// Copyright (c) Microsoft Corporation. All rights reserved
|
||||
|
||||
// Warning: SpriteBatch performance is significantly decreased in
|
||||
// the Debug configuration. Release configuration is recommended
|
||||
// for accurate performance assessment.
|
||||
|
||||
#include <wrl/client.h>
|
||||
#include <d3d11_1.h>
|
||||
#include <DirectXMath.h>
|
||||
#include <ppl.h>
|
||||
#include <ppltasks.h>
|
||||
#include <agile.h>
|
||||
|
||||
#include "BasicSprites.h"
|
||||
#include "BasicLoader.h"
|
||||
|
||||
using namespace Microsoft::WRL;
|
||||
using namespace BasicSprites;
|
||||
|
||||
SpriteBatch::SpriteBatch() :
|
||||
m_capacity(0)
|
||||
{
|
||||
}
|
||||
|
||||
void SpriteBatch::Initialize(
|
||||
_In_ ID3D11Device1* d3dDevice,
|
||||
_In_ int capacity
|
||||
)
|
||||
{
|
||||
m_d3dDevice = d3dDevice;
|
||||
m_d3dDevice->GetImmediateContext1(&m_d3dContext);
|
||||
m_capacity = capacity;
|
||||
|
||||
// Determine the technique that will be used to render the sprites.
|
||||
auto featureLevel = m_d3dDevice->GetFeatureLevel();
|
||||
|
||||
if (featureLevel >= D3D_FEATURE_LEVEL_10_0)
|
||||
{
|
||||
// On DirectX 10+ devices, the Geometry Shader allows the sprite vertices to be
|
||||
// generated on the GPU, significantly reducing memory bandwidth requirements.
|
||||
m_technique = RenderTechnique::GeometryShader;
|
||||
}
|
||||
else if (featureLevel >= D3D_FEATURE_LEVEL_9_3)
|
||||
{
|
||||
// On DirectX 9.3+ devices, instancing allows shared sprite geometry with unique
|
||||
// per-sprite instance parameters, eliminating redundant data transfer.
|
||||
m_technique = RenderTechnique::Instancing;
|
||||
}
|
||||
else
|
||||
{
|
||||
// On devices that do not support Instancing, sprite vertex data must be replicated
|
||||
// in order to achieve the desired effect.
|
||||
m_technique = RenderTechnique::Replication;
|
||||
|
||||
if (capacity > static_cast<int>(Parameters::MaximumCapacityCompatible))
|
||||
{
|
||||
// The index buffer format for feature-level 9.1 devices may only be 16 bits.
|
||||
// With 4 vertices per sprite, this allows a maximum of (1 << 16) / 4 sprites.
|
||||
throw ref new Platform::InvalidArgumentException();
|
||||
}
|
||||
}
|
||||
|
||||
// Create the texture sampler.
|
||||
|
||||
D3D11_SAMPLER_DESC samplerDesc;
|
||||
ZeroMemory(&samplerDesc, sizeof(samplerDesc));
|
||||
samplerDesc.Filter = D3D11_FILTER_MIN_MAG_MIP_LINEAR;
|
||||
samplerDesc.AddressU = D3D11_TEXTURE_ADDRESS_CLAMP;
|
||||
samplerDesc.AddressV = D3D11_TEXTURE_ADDRESS_CLAMP;
|
||||
samplerDesc.AddressW = D3D11_TEXTURE_ADDRESS_CLAMP;
|
||||
samplerDesc.MipLODBias = 0.0f;
|
||||
samplerDesc.MaxAnisotropy = 0;
|
||||
samplerDesc.ComparisonFunc = D3D11_COMPARISON_NEVER;
|
||||
samplerDesc.BorderColor[0] = 0.0f;
|
||||
samplerDesc.BorderColor[1] = 0.0f;
|
||||
samplerDesc.BorderColor[2] = 0.0f;
|
||||
samplerDesc.BorderColor[3] = 0.0f;
|
||||
samplerDesc.MinLOD = 0.0f;
|
||||
samplerDesc.MaxLOD = FLT_MAX;
|
||||
|
||||
DX::ThrowIfFailed(
|
||||
m_d3dDevice->CreateSamplerState(
|
||||
&samplerDesc,
|
||||
&m_linearSampler
|
||||
)
|
||||
);
|
||||
|
||||
// Create the blend states.
|
||||
|
||||
D3D11_BLEND_DESC1 blendDesc;
|
||||
ZeroMemory(&blendDesc, sizeof(blendDesc));
|
||||
blendDesc.AlphaToCoverageEnable = false;
|
||||
blendDesc.IndependentBlendEnable = false;
|
||||
blendDesc.RenderTarget[0].BlendEnable = true;
|
||||
blendDesc.RenderTarget[0].LogicOpEnable = false;
|
||||
blendDesc.RenderTarget[0].SrcBlend = D3D11_BLEND_SRC_ALPHA;
|
||||
blendDesc.RenderTarget[0].DestBlend = D3D11_BLEND_INV_SRC_ALPHA;
|
||||
blendDesc.RenderTarget[0].BlendOp = D3D11_BLEND_OP_ADD;
|
||||
blendDesc.RenderTarget[0].SrcBlendAlpha = D3D11_BLEND_ONE;
|
||||
blendDesc.RenderTarget[0].DestBlendAlpha = D3D11_BLEND_ONE;
|
||||
blendDesc.RenderTarget[0].BlendOpAlpha = D3D11_BLEND_OP_ADD;
|
||||
blendDesc.RenderTarget[0].RenderTargetWriteMask = D3D11_COLOR_WRITE_ENABLE_ALL;
|
||||
|
||||
DX::ThrowIfFailed(
|
||||
m_d3dDevice->CreateBlendState1(
|
||||
&blendDesc,
|
||||
&m_blendStateAlpha
|
||||
)
|
||||
);
|
||||
|
||||
blendDesc.RenderTarget[0].DestBlend = D3D11_BLEND_ONE;
|
||||
|
||||
DX::ThrowIfFailed(
|
||||
m_d3dDevice->CreateBlendState1(
|
||||
&blendDesc,
|
||||
&m_blendStateAdditive
|
||||
)
|
||||
);
|
||||
|
||||
BasicLoader^ loader = ref new BasicLoader(m_d3dDevice.Get());
|
||||
|
||||
if (m_technique == RenderTechnique::GeometryShader)
|
||||
{
|
||||
D3D11_INPUT_ELEMENT_DESC layoutDesc[] =
|
||||
{
|
||||
{ "TRANSFORM", 0, DXGI_FORMAT_R32G32_FLOAT, 0, 0, D3D11_INPUT_PER_INSTANCE_DATA, 1 },
|
||||
{ "TRANSFORM", 1, DXGI_FORMAT_R32G32_FLOAT, 0, 8, D3D11_INPUT_PER_INSTANCE_DATA, 1 },
|
||||
{ "TRANSFORM", 2, DXGI_FORMAT_R32_FLOAT, 0, 16, D3D11_INPUT_PER_INSTANCE_DATA, 1 },
|
||||
{ "TRANSFORM", 3, DXGI_FORMAT_R32G32B32A32_FLOAT, 0, 20, D3D11_INPUT_PER_INSTANCE_DATA, 1 },
|
||||
{ "COLOR", 0, DXGI_FORMAT_R32G32B32A32_UINT, 0, 36, D3D11_INPUT_PER_INSTANCE_DATA, 1 },
|
||||
{ "TRANSFORM", 4, DXGI_FORMAT_R32G32B32A32_FLOAT, 0, 52, D3D11_INPUT_PER_INSTANCE_DATA, 1 },
|
||||
{ "TRANSFORM", 5, DXGI_FORMAT_R32G32B32A32_FLOAT, 0, 68, D3D11_INPUT_PER_INSTANCE_DATA, 1 },
|
||||
};
|
||||
loader->LoadShader(
|
||||
"BasicSprites.GeometryShader.vs.cso",
|
||||
layoutDesc,
|
||||
ARRAYSIZE(layoutDesc),
|
||||
&m_vertexShader,
|
||||
&m_inputLayout
|
||||
);
|
||||
loader->LoadShader(
|
||||
"BasicSprites.GeometryShader.gs.cso",
|
||||
&m_geometryShader
|
||||
);
|
||||
}
|
||||
else if (m_technique == RenderTechnique::Instancing)
|
||||
{
|
||||
D3D11_INPUT_ELEMENT_DESC layoutDesc[] =
|
||||
{
|
||||
{ "POSITION", 0, DXGI_FORMAT_R32G32_FLOAT, 0, 0, D3D11_INPUT_PER_VERTEX_DATA, 0 },
|
||||
{ "TEXCOORD", 0, DXGI_FORMAT_R32G32_FLOAT, 0, 8, D3D11_INPUT_PER_VERTEX_DATA, 0 },
|
||||
{ "TRANSFORM", 0, DXGI_FORMAT_R32G32_FLOAT, 1, 0, D3D11_INPUT_PER_INSTANCE_DATA, 1 },
|
||||
{ "TRANSFORM", 1, DXGI_FORMAT_R32G32_FLOAT, 1, 8, D3D11_INPUT_PER_INSTANCE_DATA, 1 },
|
||||
{ "TRANSFORM", 2, DXGI_FORMAT_R32_FLOAT, 1, 16, D3D11_INPUT_PER_INSTANCE_DATA, 1 },
|
||||
{ "COLOR", 0, DXGI_FORMAT_R8G8B8A8_UNORM, 1, 20, D3D11_INPUT_PER_INSTANCE_DATA, 1 }
|
||||
};
|
||||
loader->LoadShader(
|
||||
"BasicSprites.Instancing.vs.cso",
|
||||
layoutDesc,
|
||||
ARRAYSIZE(layoutDesc),
|
||||
&m_vertexShader,
|
||||
&m_inputLayout
|
||||
);
|
||||
}
|
||||
else if (m_technique == RenderTechnique::Replication)
|
||||
{
|
||||
D3D11_INPUT_ELEMENT_DESC layoutDesc[] =
|
||||
{
|
||||
{ "POSITIONT", 0, DXGI_FORMAT_R32G32_FLOAT, 0, 0, D3D11_INPUT_PER_VERTEX_DATA, 0 },
|
||||
{ "TEXCOORD", 0, DXGI_FORMAT_R32G32_FLOAT, 0, 8, D3D11_INPUT_PER_VERTEX_DATA, 0 },
|
||||
{ "COLOR", 0, DXGI_FORMAT_R8G8B8A8_UNORM, 0, 16, D3D11_INPUT_PER_VERTEX_DATA, 0 }
|
||||
};
|
||||
loader->LoadShader(
|
||||
"BasicSprites.Replication.vs.cso",
|
||||
layoutDesc,
|
||||
ARRAYSIZE(layoutDesc),
|
||||
&m_vertexShader,
|
||||
&m_inputLayout
|
||||
);
|
||||
}
|
||||
|
||||
loader->LoadShader(
|
||||
"BasicSprites.ps.cso",
|
||||
&m_pixelShader
|
||||
);
|
||||
|
||||
// Create buffers.
|
||||
|
||||
if (m_technique == RenderTechnique::GeometryShader)
|
||||
{
|
||||
// Create the instance data buffer.
|
||||
|
||||
CD3D11_BUFFER_DESC instanceDataBufferDesc(
|
||||
m_capacity * sizeof(InstanceData),
|
||||
D3D11_BIND_VERTEX_BUFFER,
|
||||
D3D11_USAGE_DEFAULT,
|
||||
0
|
||||
);
|
||||
|
||||
DX::ThrowIfFailed(
|
||||
m_d3dDevice->CreateBuffer(
|
||||
&instanceDataBufferDesc,
|
||||
nullptr,
|
||||
&m_instanceDataBuffer
|
||||
)
|
||||
);
|
||||
|
||||
m_instanceData.reset(new InstanceData[m_capacity]);
|
||||
}
|
||||
else if (m_technique == RenderTechnique::Instancing)
|
||||
{
|
||||
// Create the vertex buffer.
|
||||
|
||||
InstancingVertex vertexBufferData[] =
|
||||
{
|
||||
{ float2(-1.0f, 1.0f), float2(0.0f, 0.0f) },
|
||||
{ float2( 1.0f, 1.0f), float2(1.0f, 0.0f) },
|
||||
{ float2(-1.0f, -1.0f), float2(0.0f, 1.0f) },
|
||||
{ float2( 1.0f, -1.0f), float2(1.0f, 1.0f) }
|
||||
};
|
||||
|
||||
D3D11_SUBRESOURCE_DATA vertexInitialData;
|
||||
vertexInitialData.pSysMem = vertexBufferData;
|
||||
vertexInitialData.SysMemPitch = 0;
|
||||
vertexInitialData.SysMemSlicePitch = 0;
|
||||
|
||||
CD3D11_BUFFER_DESC vertexBufferDesc(
|
||||
sizeof(vertexBufferData),
|
||||
D3D11_BIND_VERTEX_BUFFER,
|
||||
D3D11_USAGE_DEFAULT,
|
||||
0
|
||||
);
|
||||
|
||||
DX::ThrowIfFailed(
|
||||
m_d3dDevice->CreateBuffer(
|
||||
&vertexBufferDesc,
|
||||
&vertexInitialData,
|
||||
&m_vertexBuffer
|
||||
)
|
||||
);
|
||||
|
||||
// Create the instance data buffer.
|
||||
|
||||
CD3D11_BUFFER_DESC instanceDataBufferDesc(
|
||||
m_capacity * sizeof(InstanceData),
|
||||
D3D11_BIND_VERTEX_BUFFER,
|
||||
D3D11_USAGE_DEFAULT,
|
||||
0
|
||||
);
|
||||
|
||||
DX::ThrowIfFailed(
|
||||
m_d3dDevice->CreateBuffer(
|
||||
&instanceDataBufferDesc,
|
||||
nullptr,
|
||||
&m_instanceDataBuffer
|
||||
)
|
||||
);
|
||||
|
||||
m_instanceData.reset(new InstanceData[m_capacity]);
|
||||
|
||||
// Create the index buffer.
|
||||
|
||||
unsigned int indexBufferData[] =
|
||||
{
|
||||
0, 1, 2,
|
||||
1, 3, 2
|
||||
};
|
||||
|
||||
D3D11_SUBRESOURCE_DATA indexInitialData;
|
||||
indexInitialData.pSysMem = indexBufferData;
|
||||
indexInitialData.SysMemPitch = 0;
|
||||
indexInitialData.SysMemSlicePitch = 0;
|
||||
|
||||
CD3D11_BUFFER_DESC indexBufferDesc(
|
||||
sizeof(indexBufferData),
|
||||
D3D11_BIND_INDEX_BUFFER,
|
||||
D3D11_USAGE_DEFAULT,
|
||||
0
|
||||
);
|
||||
|
||||
DX::ThrowIfFailed(
|
||||
m_d3dDevice->CreateBuffer(
|
||||
&indexBufferDesc,
|
||||
&indexInitialData,
|
||||
&m_indexBuffer
|
||||
)
|
||||
);
|
||||
}
|
||||
else if (m_technique == RenderTechnique::Replication)
|
||||
{
|
||||
// Create the vertex buffer.
|
||||
|
||||
CD3D11_BUFFER_DESC vertexBufferDesc(
|
||||
m_capacity * 4 * sizeof(ReplicationVertex),
|
||||
D3D11_BIND_VERTEX_BUFFER,
|
||||
D3D11_USAGE_DEFAULT,
|
||||
0
|
||||
);
|
||||
|
||||
DX::ThrowIfFailed(
|
||||
m_d3dDevice->CreateBuffer(
|
||||
&vertexBufferDesc,
|
||||
nullptr,
|
||||
&m_vertexBuffer
|
||||
)
|
||||
);
|
||||
|
||||
m_vertexData.reset(new ReplicationVertex[m_capacity * 4]);
|
||||
|
||||
// Create the index buffer.
|
||||
|
||||
std::unique_ptr<unsigned short[]> indexBufferData(new unsigned short[m_capacity * 6]);
|
||||
|
||||
for (int i = 0; i < m_capacity; i++)
|
||||
{
|
||||
indexBufferData[i * 6 + 0] = i * 4 + 0;
|
||||
indexBufferData[i * 6 + 1] = i * 4 + 1;
|
||||
indexBufferData[i * 6 + 2] = i * 4 + 2;
|
||||
indexBufferData[i * 6 + 3] = i * 4 + 1;
|
||||
indexBufferData[i * 6 + 4] = i * 4 + 3;
|
||||
indexBufferData[i * 6 + 5] = i * 4 + 2;
|
||||
}
|
||||
|
||||
D3D11_SUBRESOURCE_DATA initialData;
|
||||
initialData.pSysMem = indexBufferData.get();
|
||||
initialData.SysMemPitch = 0;
|
||||
initialData.SysMemSlicePitch = 0;
|
||||
|
||||
CD3D11_BUFFER_DESC indexBufferDesc(
|
||||
m_capacity * 6 * sizeof(unsigned short),
|
||||
D3D11_BIND_INDEX_BUFFER,
|
||||
D3D11_USAGE_DEFAULT,
|
||||
0
|
||||
);
|
||||
|
||||
DX::ThrowIfFailed(
|
||||
m_d3dDevice->CreateBuffer(
|
||||
&indexBufferDesc,
|
||||
&initialData,
|
||||
&m_indexBuffer
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
if (m_technique == RenderTechnique::GeometryShader || m_technique == RenderTechnique::Instancing)
|
||||
{
|
||||
// Both the Geometry Shader and Instancing techniques scale geometry in shader code.
|
||||
// As a result, they require information about the render target size.
|
||||
|
||||
CD3D11_BUFFER_DESC renderTargetInfoCbufferDesc(
|
||||
16, // Constant buffer sizes must be a multiple of 16 bytes. 16 is sufficient for the required float2 data.
|
||||
D3D11_BIND_CONSTANT_BUFFER,
|
||||
D3D11_USAGE_DYNAMIC,
|
||||
D3D11_CPU_ACCESS_WRITE
|
||||
);
|
||||
|
||||
DX::ThrowIfFailed(
|
||||
m_d3dDevice->CreateBuffer(
|
||||
&renderTargetInfoCbufferDesc,
|
||||
nullptr,
|
||||
&m_renderTargetInfoCbuffer
|
||||
)
|
||||
);
|
||||
|
||||
CD3D11_BUFFER_DESC mvpMatrixCbufferDesc(
|
||||
128, // Matrix4x4 float data.
|
||||
D3D11_BIND_CONSTANT_BUFFER,
|
||||
D3D11_USAGE_DYNAMIC,
|
||||
D3D11_CPU_ACCESS_WRITE
|
||||
);
|
||||
|
||||
DX::ThrowIfFailed(
|
||||
m_d3dDevice->CreateBuffer(
|
||||
&mvpMatrixCbufferDesc,
|
||||
nullptr,
|
||||
&m_mvpMatrixCbuffer
|
||||
)
|
||||
);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
void SpriteBatch::AddTexture(
|
||||
_In_ ID3D11Texture2D* texture
|
||||
)
|
||||
{
|
||||
TextureMapElement mapElement;
|
||||
CD3D11_SHADER_RESOURCE_VIEW_DESC mapElementSrvDesc(
|
||||
texture,
|
||||
D3D11_SRV_DIMENSION_TEXTURE2D
|
||||
);
|
||||
DX::ThrowIfFailed(
|
||||
m_d3dDevice->CreateShaderResourceView(
|
||||
texture,
|
||||
&mapElementSrvDesc,
|
||||
&mapElement.srv
|
||||
)
|
||||
);
|
||||
|
||||
D3D11_TEXTURE2D_DESC textureDesc;
|
||||
texture->GetDesc(&textureDesc);
|
||||
mapElement.size = float2(
|
||||
static_cast<float>(textureDesc.Width),
|
||||
static_cast<float>(textureDesc.Height)
|
||||
);
|
||||
|
||||
m_textureMap[texture] = mapElement;
|
||||
}
|
||||
|
||||
void SpriteBatch::RemoveTexture(
|
||||
_In_ ID3D11Texture2D* texture
|
||||
)
|
||||
{
|
||||
m_textureMap.erase(texture);
|
||||
}
|
||||
|
||||
void SpriteBatch::Begin()
|
||||
{
|
||||
// Reset internal sprite data.
|
||||
|
||||
m_numSpritesDrawn = 0;
|
||||
m_spritesInRun = 0;
|
||||
m_spriteRuns.clear();
|
||||
|
||||
// Get the current render target dimensions and logical DPI.
|
||||
|
||||
ComPtr<ID3D11RenderTargetView> renderTargetView;
|
||||
m_d3dContext->OMGetRenderTargets(
|
||||
1,
|
||||
&renderTargetView,
|
||||
nullptr
|
||||
);
|
||||
|
||||
ComPtr<ID3D11Resource> renderTarget;
|
||||
renderTargetView->GetResource(&renderTarget);
|
||||
|
||||
ComPtr<ID3D11Texture2D> renderTargetTexture;
|
||||
renderTarget.As(&renderTargetTexture);
|
||||
|
||||
D3D11_TEXTURE2D_DESC renderTargetTextureDesc;
|
||||
renderTargetTexture->GetDesc(&renderTargetTextureDesc);
|
||||
|
||||
m_renderTargetSize = float2(
|
||||
static_cast<float>(renderTargetTextureDesc.Width),
|
||||
static_cast<float>(renderTargetTextureDesc.Height)
|
||||
);
|
||||
|
||||
m_mvpMatrix = identity();
|
||||
|
||||
m_dpi = Windows::Graphics::Display::DisplayProperties::LogicalDpi;
|
||||
}
|
||||
|
||||
void SpriteBatch::End()
|
||||
{
|
||||
// If no sprites were drawn, do nothing.
|
||||
if (m_numSpritesDrawn == 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Save the final sprite run info.
|
||||
|
||||
SpriteRunInfo runInfo;
|
||||
runInfo.textureView = m_currentTextureView;
|
||||
runInfo.blendState = m_currentBlendState;
|
||||
runInfo.numSprites = m_spritesInRun;
|
||||
m_spriteRuns.push_back(runInfo);
|
||||
|
||||
// Update the buffer data.
|
||||
|
||||
if (m_technique == RenderTechnique::GeometryShader || m_technique == RenderTechnique::Instancing)
|
||||
{
|
||||
CD3D11_BOX instanceDataBox(
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
sizeof(InstanceData) * m_numSpritesDrawn,
|
||||
1,
|
||||
1
|
||||
);
|
||||
|
||||
m_d3dContext->UpdateSubresource(
|
||||
m_instanceDataBuffer.Get(),
|
||||
0,
|
||||
&instanceDataBox,
|
||||
m_instanceData.get(),
|
||||
0,
|
||||
0
|
||||
);
|
||||
}
|
||||
else if (m_technique == RenderTechnique::Replication)
|
||||
{
|
||||
CD3D11_BOX vertexDataBox(
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
sizeof(ReplicationVertex) * m_numSpritesDrawn * 4,
|
||||
1,
|
||||
1
|
||||
);
|
||||
|
||||
m_d3dContext->UpdateSubresource(
|
||||
m_vertexBuffer.Get(),
|
||||
0,
|
||||
&vertexDataBox,
|
||||
m_vertexData.get(),
|
||||
0,
|
||||
0
|
||||
);
|
||||
}
|
||||
|
||||
if (m_technique == RenderTechnique::GeometryShader || m_technique == RenderTechnique::Instancing)
|
||||
{
|
||||
D3D11_MAPPED_SUBRESOURCE mappedSubresource;
|
||||
m_d3dContext->Map(
|
||||
m_renderTargetInfoCbuffer.Get(),
|
||||
0,
|
||||
D3D11_MAP_WRITE_DISCARD,
|
||||
0,
|
||||
&mappedSubresource
|
||||
);
|
||||
*static_cast<float2*>(mappedSubresource.pData) = m_renderTargetSize;
|
||||
m_d3dContext->Unmap(
|
||||
m_renderTargetInfoCbuffer.Get(),
|
||||
0
|
||||
);
|
||||
|
||||
m_d3dContext->Map(
|
||||
m_mvpMatrixCbuffer.Get(),
|
||||
0,
|
||||
D3D11_MAP_WRITE_DISCARD,
|
||||
0,
|
||||
&mappedSubresource
|
||||
);
|
||||
*static_cast<float4x4*>(mappedSubresource.pData) = m_mvpMatrix;
|
||||
m_d3dContext->Unmap(
|
||||
m_mvpMatrixCbuffer.Get(),
|
||||
0
|
||||
);
|
||||
}
|
||||
|
||||
// Set the pipeline state
|
||||
|
||||
if (m_technique == RenderTechnique::Instancing)
|
||||
{
|
||||
m_d3dContext->IASetPrimitiveTopology(D3D11_PRIMITIVE_TOPOLOGY_TRIANGLELIST);
|
||||
m_d3dContext->IASetIndexBuffer(
|
||||
m_indexBuffer.Get(),
|
||||
DXGI_FORMAT_R32_UINT,
|
||||
0
|
||||
);
|
||||
}
|
||||
else if (m_technique == RenderTechnique::Replication)
|
||||
{
|
||||
m_d3dContext->IASetPrimitiveTopology(D3D11_PRIMITIVE_TOPOLOGY_TRIANGLELIST);
|
||||
m_d3dContext->IASetIndexBuffer(
|
||||
m_indexBuffer.Get(),
|
||||
DXGI_FORMAT_R16_UINT,
|
||||
0
|
||||
);
|
||||
}
|
||||
else if (m_technique == RenderTechnique::GeometryShader)
|
||||
{
|
||||
m_d3dContext->IASetPrimitiveTopology(D3D11_PRIMITIVE_TOPOLOGY_POINTLIST);
|
||||
m_d3dContext->GSSetShader(
|
||||
m_geometryShader.Get(),
|
||||
nullptr,
|
||||
0
|
||||
);
|
||||
}
|
||||
|
||||
m_d3dContext->IASetInputLayout(m_inputLayout.Get());
|
||||
|
||||
m_d3dContext->VSSetShader(
|
||||
m_vertexShader.Get(),
|
||||
nullptr,
|
||||
0
|
||||
);
|
||||
|
||||
if (m_technique == RenderTechnique::GeometryShader)
|
||||
{
|
||||
m_d3dContext->GSSetConstantBuffers(
|
||||
0,
|
||||
1,
|
||||
m_renderTargetInfoCbuffer.GetAddressOf()
|
||||
);
|
||||
|
||||
m_d3dContext->GSSetConstantBuffers(
|
||||
1,
|
||||
1,
|
||||
m_mvpMatrixCbuffer.GetAddressOf()
|
||||
);
|
||||
}
|
||||
else if (m_technique == RenderTechnique::Instancing)
|
||||
{
|
||||
m_d3dContext->VSSetConstantBuffers(
|
||||
0,
|
||||
1,
|
||||
m_renderTargetInfoCbuffer.GetAddressOf()
|
||||
);
|
||||
}
|
||||
|
||||
m_d3dContext->PSSetShader(
|
||||
m_pixelShader.Get(),
|
||||
nullptr,
|
||||
0
|
||||
);
|
||||
|
||||
m_d3dContext->PSSetSamplers(
|
||||
0,
|
||||
1,
|
||||
m_linearSampler.GetAddressOf()
|
||||
);
|
||||
|
||||
if (m_technique == RenderTechnique::GeometryShader)
|
||||
{
|
||||
unsigned int stride = sizeof(InstanceData);
|
||||
unsigned int offset = 0;
|
||||
m_d3dContext->IASetVertexBuffers(
|
||||
0,
|
||||
1,
|
||||
m_instanceDataBuffer.GetAddressOf(),
|
||||
&stride,
|
||||
&offset
|
||||
);
|
||||
}
|
||||
else if (m_technique == RenderTechnique::Instancing)
|
||||
{
|
||||
unsigned int stride = sizeof(InstancingVertex);
|
||||
unsigned int offset = 0;
|
||||
m_d3dContext->IASetVertexBuffers(
|
||||
0,
|
||||
1,
|
||||
m_vertexBuffer.GetAddressOf(),
|
||||
&stride,
|
||||
&offset
|
||||
);
|
||||
}
|
||||
else if (m_technique == RenderTechnique::Replication)
|
||||
{
|
||||
unsigned int stride = sizeof(ReplicationVertex);
|
||||
unsigned int offset = 0;
|
||||
m_d3dContext->IASetVertexBuffers(
|
||||
0,
|
||||
1,
|
||||
m_vertexBuffer.GetAddressOf(),
|
||||
&stride,
|
||||
&offset
|
||||
);
|
||||
}
|
||||
|
||||
// Draw each sprite run
|
||||
|
||||
unsigned int indexBase = 0;
|
||||
for (auto runIterator = m_spriteRuns.begin(); runIterator != m_spriteRuns.end(); runIterator++)
|
||||
{
|
||||
m_d3dContext->PSSetShaderResources(
|
||||
0,
|
||||
1,
|
||||
&runIterator->textureView
|
||||
);
|
||||
|
||||
const FLOAT blendFactor[] = {0.0f, 0.0f, 0.0f, 0.0f};
|
||||
|
||||
m_d3dContext->OMSetBlendState(
|
||||
runIterator->blendState,
|
||||
nullptr,
|
||||
0xFFFFFFFF
|
||||
);
|
||||
|
||||
if (m_technique == RenderTechnique::GeometryShader)
|
||||
{
|
||||
unsigned int instancesToDraw = runIterator->numSprites;
|
||||
m_d3dContext->DrawInstanced(
|
||||
1,
|
||||
instancesToDraw,
|
||||
0,
|
||||
indexBase
|
||||
);
|
||||
indexBase += instancesToDraw;
|
||||
}
|
||||
else if (m_technique == RenderTechnique::Instancing)
|
||||
{
|
||||
unsigned int instancesToDraw = runIterator->numSprites;
|
||||
unsigned int stride = sizeof(InstanceData);
|
||||
unsigned int offset = indexBase * stride;
|
||||
// Instance data offset must be zero for the draw call on feature level 9.3 and below.
|
||||
// Instead, set the offset in the input assembler.
|
||||
m_d3dContext->IASetVertexBuffers(
|
||||
1,
|
||||
1,
|
||||
m_instanceDataBuffer.GetAddressOf(),
|
||||
&stride,
|
||||
&offset
|
||||
);
|
||||
m_d3dContext->DrawIndexedInstanced(
|
||||
6,
|
||||
instancesToDraw,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
);
|
||||
indexBase += instancesToDraw;
|
||||
}
|
||||
else if (m_technique == RenderTechnique::Replication)
|
||||
{
|
||||
unsigned int indicesToDraw = runIterator->numSprites * 6;
|
||||
m_d3dContext->DrawIndexed(indicesToDraw, indexBase, 0);
|
||||
indexBase += indicesToDraw;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
unsigned int SpriteBatch::MakeUnorm(float4 color)
|
||||
{
|
||||
unsigned int r = max(0, min(255, static_cast<unsigned int>(color.r * 255.0f)));
|
||||
unsigned int g = max(0, min(255, static_cast<unsigned int>(color.g * 255.0f)));
|
||||
unsigned int b = max(0, min(255, static_cast<unsigned int>(color.b * 255.0f)));
|
||||
unsigned int a = max(0, min(255, static_cast<unsigned int>(color.a * 255.0f)));
|
||||
return
|
||||
(a << 24) |
|
||||
(b << 16) |
|
||||
(g << 8) |
|
||||
r;
|
||||
}
|
||||
|
||||
float2 SpriteBatch::StandardOrigin(float2 position, PositionUnits positionUnits, float2 renderTargetSize, float dpi)
|
||||
{
|
||||
float2 origin;
|
||||
if (positionUnits == PositionUnits::Pixels)
|
||||
{
|
||||
origin.x = (position.x / renderTargetSize.x) * 2.0f - 1.0f;
|
||||
origin.y = 1.0f - (position.y / renderTargetSize.y) * 2.0f;
|
||||
}
|
||||
else if (positionUnits == PositionUnits::DIPs)
|
||||
{
|
||||
origin.x = ((position.x * dpi / 96.0f) / renderTargetSize.x) * 2.0f - 1.0f;
|
||||
origin.y = 1.0f - ((position.y * dpi / 96.0f) / renderTargetSize.y) * 2.0f;
|
||||
}
|
||||
else if (positionUnits == PositionUnits::Normalized)
|
||||
{
|
||||
origin.x = position.x * 2.0f - 1.0f;
|
||||
origin.y = 1.0f - position.y * 2.0f;
|
||||
}
|
||||
else if (positionUnits == PositionUnits::UniformWidth)
|
||||
{
|
||||
origin.x = position.x * 2.0f - 1.0f;
|
||||
origin.y = 1.0f - position.y * (renderTargetSize.x / renderTargetSize.y) * 2.0f;
|
||||
}
|
||||
else if (positionUnits == PositionUnits::UniformHeight)
|
||||
{
|
||||
origin.x = position.x * (renderTargetSize.y / renderTargetSize.x) * 2.0f - 1.0f;
|
||||
origin.y = 1.0f - position.y * 2.0f;
|
||||
}
|
||||
return origin;
|
||||
}
|
||||
|
||||
float2 SpriteBatch::StandardOffset(float2 size, SizeUnits sizeUnits, float2 spriteSize, float dpi)
|
||||
{
|
||||
float2 offset;
|
||||
if (sizeUnits == SizeUnits::Pixels)
|
||||
{
|
||||
offset = size;
|
||||
}
|
||||
else if (sizeUnits == SizeUnits::DIPs)
|
||||
{
|
||||
offset = size * dpi / 96.0f;
|
||||
}
|
||||
else if (sizeUnits == SizeUnits::Normalized)
|
||||
{
|
||||
offset = spriteSize * size;
|
||||
}
|
||||
return offset;
|
||||
}
|
||||
|
||||
void SpriteBatch::Draw(
|
||||
_In_ ID3D11Texture2D* texture,
|
||||
_In_ float2 position,
|
||||
_In_ PositionUnits positionUnits = PositionUnits::DIPs
|
||||
)
|
||||
{
|
||||
Draw(
|
||||
texture,
|
||||
position,
|
||||
positionUnits,
|
||||
float2(1.0f, 1.0f),
|
||||
SizeUnits::Normalized
|
||||
);
|
||||
}
|
||||
|
||||
void SpriteBatch::Draw(
|
||||
_In_ ID3D11Texture2D* texture,
|
||||
_In_ float2 position,
|
||||
_In_ PositionUnits positionUnits,
|
||||
_In_ float2 size,
|
||||
_In_ SizeUnits sizeUnits
|
||||
)
|
||||
{
|
||||
Draw(
|
||||
texture,
|
||||
position,
|
||||
positionUnits,
|
||||
size,
|
||||
sizeUnits,
|
||||
float4(1.0f, 1.0f, 1.0f, 1.0f)
|
||||
);
|
||||
}
|
||||
|
||||
void SpriteBatch::Draw(
|
||||
_In_ ID3D11Texture2D* texture,
|
||||
_In_ float2 position,
|
||||
_In_ PositionUnits positionUnits,
|
||||
_In_ float2 size,
|
||||
_In_ SizeUnits sizeUnits,
|
||||
_In_ float4 color
|
||||
)
|
||||
{
|
||||
Draw(
|
||||
texture,
|
||||
position,
|
||||
positionUnits,
|
||||
size,
|
||||
sizeUnits,
|
||||
color,
|
||||
0.0f
|
||||
);
|
||||
}
|
||||
|
||||
void SpriteBatch::Draw(
|
||||
_In_ ID3D11Texture2D* texture,
|
||||
_In_ float2 position,
|
||||
_In_ PositionUnits positionUnits,
|
||||
_In_ float2 size,
|
||||
_In_ SizeUnits sizeUnits,
|
||||
_In_ float4 color,
|
||||
_In_ float rotation
|
||||
)
|
||||
{
|
||||
Draw(
|
||||
texture,
|
||||
position,
|
||||
positionUnits,
|
||||
size,
|
||||
sizeUnits,
|
||||
color,
|
||||
rotation,
|
||||
BlendMode::Alpha
|
||||
);
|
||||
}
|
||||
|
||||
void SpriteBatch::Draw(
|
||||
_In_ ID3D11Texture2D* texture,
|
||||
_In_ float2 position,
|
||||
_In_ PositionUnits positionUnits,
|
||||
_In_ float2 size,
|
||||
_In_ SizeUnits sizeUnits,
|
||||
_In_ float4 color,
|
||||
_In_ float rotation,
|
||||
_In_ BlendMode blendMode
|
||||
)
|
||||
{
|
||||
Draw(
|
||||
texture,
|
||||
position,
|
||||
positionUnits,
|
||||
size,
|
||||
sizeUnits,
|
||||
color,
|
||||
rotation,
|
||||
blendMode,
|
||||
float4(0.0f, 1.0f, 0.0f, 1.0f),
|
||||
Vector4<unsigned int>(0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
void SpriteBatch::Draw(
|
||||
_In_ ID3D11Texture2D* texture,
|
||||
_In_ float2 position,
|
||||
_In_ PositionUnits positionUnits,
|
||||
_In_ float2 size,
|
||||
_In_ SizeUnits sizeUnits,
|
||||
_In_ float4 color,
|
||||
_In_ float rotation,
|
||||
_In_ BlendMode blendMode,
|
||||
_In_ float4 textRect,
|
||||
_In_ Vector4<unsigned int> colors
|
||||
)
|
||||
{
|
||||
// Fail if drawing this sprite would exceed the capacity of the sprite batch.
|
||||
if (m_numSpritesDrawn >= m_capacity)
|
||||
{
|
||||
throw ref new Platform::OutOfBoundsException();
|
||||
}
|
||||
|
||||
// Retrieve information about the sprite.
|
||||
TextureMapElement element = m_textureMap[texture];
|
||||
ID3D11ShaderResourceView* textureView = element.srv.Get();
|
||||
float2 textureSize = element.size;
|
||||
ID3D11BlendState1* blendState = blendMode == BlendMode::Additive ? m_blendStateAdditive.Get() : m_blendStateAlpha.Get();
|
||||
|
||||
// Fail if the texture has not previously been added to the sprite batch.
|
||||
if (textureView == nullptr)
|
||||
{
|
||||
throw ref new Platform::NullReferenceException();
|
||||
}
|
||||
|
||||
// Unless this is the first sprite run, save out the previous run info if a new run is required.
|
||||
if (
|
||||
m_numSpritesDrawn > 0 && (
|
||||
textureView != m_currentTextureView ||
|
||||
blendState != m_currentBlendState
|
||||
)
|
||||
)
|
||||
{
|
||||
SpriteRunInfo runInfo;
|
||||
runInfo.textureView = m_currentTextureView;
|
||||
runInfo.blendState = m_currentBlendState;
|
||||
runInfo.numSprites = m_spritesInRun;
|
||||
m_spriteRuns.push_back(runInfo);
|
||||
m_spritesInRun = 0; // Reset for the next sprite run.
|
||||
}
|
||||
m_currentTextureView = textureView;
|
||||
m_currentBlendState = blendState;
|
||||
|
||||
// Add the sprite to the buffer.
|
||||
|
||||
float2 origin = StandardOrigin(position, positionUnits, m_renderTargetSize, m_dpi);
|
||||
float2 offset = StandardOffset(size, sizeUnits, textureSize, m_dpi);
|
||||
|
||||
if (m_technique == RenderTechnique::GeometryShader || m_technique == RenderTechnique::Instancing)
|
||||
{
|
||||
m_instanceData[m_numSpritesDrawn].origin = origin;
|
||||
m_instanceData[m_numSpritesDrawn].offset = offset;
|
||||
m_instanceData[m_numSpritesDrawn].rotation = rotation;
|
||||
m_instanceData[m_numSpritesDrawn].color = MakeUnorm(color);
|
||||
m_instanceData[m_numSpritesDrawn].textRect = textRect;
|
||||
m_instanceData[m_numSpritesDrawn].colors = colors;
|
||||
}
|
||||
else if (m_technique == RenderTechnique::Replication)
|
||||
{
|
||||
float2 offsets[4] =
|
||||
{
|
||||
float2(-offset.x, offset.y),
|
||||
float2( offset.x, offset.y),
|
||||
float2(-offset.x, -offset.y),
|
||||
float2( offset.x, -offset.y)
|
||||
};
|
||||
|
||||
float sinRotation = sinf(rotation);
|
||||
float cosRotation = cosf(rotation);
|
||||
|
||||
for (int i = 0; i < 4; i++)
|
||||
{
|
||||
offsets[i] = float2(
|
||||
offsets[i].x * cosRotation - offsets[i].y * sinRotation,
|
||||
offsets[i].x * sinRotation + offsets[i].y * cosRotation
|
||||
);
|
||||
offsets[i].x /= m_renderTargetSize.x;
|
||||
offsets[i].y /= m_renderTargetSize.y;
|
||||
}
|
||||
|
||||
// Write vertex buffer data.
|
||||
|
||||
ReplicationVertex* singleSpriteVertices = &m_vertexData[m_numSpritesDrawn * 4];
|
||||
unsigned int colorUnorm = MakeUnorm(color);
|
||||
singleSpriteVertices[0].pos = origin + offsets[0];
|
||||
singleSpriteVertices[1].pos = origin + offsets[1];
|
||||
singleSpriteVertices[2].pos = origin + offsets[2];
|
||||
singleSpriteVertices[3].pos = origin + offsets[3];
|
||||
singleSpriteVertices[0].color = colorUnorm;
|
||||
singleSpriteVertices[1].color = colorUnorm;
|
||||
singleSpriteVertices[2].color = colorUnorm;
|
||||
singleSpriteVertices[3].color = colorUnorm;
|
||||
singleSpriteVertices[0].tex = float2(0.0f, 0.0f);
|
||||
singleSpriteVertices[1].tex = float2(1.0f, 0.0f);
|
||||
singleSpriteVertices[2].tex = float2(0.0f, 1.0f);
|
||||
singleSpriteVertices[3].tex = float2(1.0f, 1.0f);
|
||||
}
|
||||
|
||||
m_spritesInRun++;
|
||||
m_numSpritesDrawn++;
|
||||
}
|
||||
@@ -1,195 +0,0 @@
|
||||
//// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
|
||||
//// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
|
||||
//// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
|
||||
//// PARTICULAR PURPOSE.
|
||||
////
|
||||
//// Copyright (c) Microsoft Corporation. All rights reserved
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "BasicMath.h"
|
||||
#include <vector>
|
||||
#include <map>
|
||||
#include <memory>
|
||||
|
||||
namespace BasicSprites
|
||||
{
|
||||
namespace Parameters
|
||||
{
|
||||
// The index buffer format for feature-level 9.1 devices may only be 16 bits.
|
||||
// With 4 vertices per sprite, this allows a maximum of (1 << 16) / 4 sprites.
|
||||
static unsigned int MaximumCapacityCompatible = (1 << 16) / 4;
|
||||
}
|
||||
|
||||
enum class PositionUnits
|
||||
{
|
||||
DIPs, // Interpret position as device-independent pixel values.
|
||||
Pixels, // Interpret position as pixel values.
|
||||
Normalized, // Interpret position as a fraction of the render target dimensions.
|
||||
UniformWidth, // Interpret position as a fraction of the render target width.
|
||||
UniformHeight // Interpret position as a fraction of the render target height.
|
||||
};
|
||||
|
||||
enum class SizeUnits
|
||||
{
|
||||
DIPs, // Interpret size as device-independent pixel values.
|
||||
Pixels, // Interpret size as pixel values.
|
||||
Normalized // Interpret size as a multiplier of the pixel size of the sprite.
|
||||
};
|
||||
|
||||
enum class BlendMode
|
||||
{
|
||||
Alpha, // Use alpha blending (out = old * (1 - new.a) + new * new.a).
|
||||
Additive // Use additive blending (out = old + new * new.a).
|
||||
};
|
||||
|
||||
enum class RenderTechnique
|
||||
{
|
||||
Replication,
|
||||
Instancing,
|
||||
GeometryShader
|
||||
};
|
||||
|
||||
struct ReplicationVertex
|
||||
{
|
||||
float2 pos;
|
||||
float2 tex;
|
||||
unsigned int color;
|
||||
};
|
||||
|
||||
struct InstancingVertex
|
||||
{
|
||||
float2 pos;
|
||||
float2 tex;
|
||||
};
|
||||
|
||||
struct InstanceData
|
||||
{
|
||||
float2 origin;
|
||||
float2 offset;
|
||||
float rotation;
|
||||
float4 textRect;
|
||||
Vector4<unsigned int> colors;
|
||||
float4 pt_x;
|
||||
float4 pt_y;
|
||||
unsigned int color;
|
||||
};
|
||||
|
||||
struct TextureMapElement
|
||||
{
|
||||
Microsoft::WRL::ComPtr<ID3D11ShaderResourceView> srv;
|
||||
float2 size;
|
||||
};
|
||||
|
||||
struct SpriteRunInfo
|
||||
{
|
||||
ID3D11ShaderResourceView* textureView;
|
||||
ID3D11BlendState1* blendState;
|
||||
unsigned int numSprites;
|
||||
};
|
||||
|
||||
ref class SpriteBatch
|
||||
{
|
||||
internal:
|
||||
SpriteBatch();
|
||||
void Initialize(
|
||||
_In_ ID3D11Device1* d3dDevice,
|
||||
_In_ int capacity = 1024
|
||||
);
|
||||
void AddTexture(
|
||||
_In_ ID3D11Texture2D* texture
|
||||
);
|
||||
void RemoveTexture(
|
||||
_In_ ID3D11Texture2D* texture
|
||||
);
|
||||
void Begin();
|
||||
void End();
|
||||
void Draw(
|
||||
_In_ ID3D11Texture2D* texture,
|
||||
_In_ float2 position,
|
||||
_In_ PositionUnits positionUnits
|
||||
);
|
||||
void Draw(
|
||||
_In_ ID3D11Texture2D* texture,
|
||||
_In_ float2 position,
|
||||
_In_ PositionUnits positionUnits,
|
||||
_In_ float2 size,
|
||||
_In_ SizeUnits sizeUnits
|
||||
);
|
||||
void Draw(
|
||||
_In_ ID3D11Texture2D* texture,
|
||||
_In_ float2 position,
|
||||
_In_ PositionUnits positionUnits,
|
||||
_In_ float2 size,
|
||||
_In_ SizeUnits sizeUnits,
|
||||
_In_ float4 color
|
||||
);
|
||||
void Draw(
|
||||
_In_ ID3D11Texture2D* texture,
|
||||
_In_ float2 position,
|
||||
_In_ PositionUnits positionUnits,
|
||||
_In_ float2 size,
|
||||
_In_ SizeUnits sizeUnits,
|
||||
_In_ float4 color,
|
||||
_In_ float rotation
|
||||
);
|
||||
void Draw(
|
||||
_In_ ID3D11Texture2D* texture,
|
||||
_In_ float2 position,
|
||||
_In_ PositionUnits positionUnits,
|
||||
_In_ float2 size,
|
||||
_In_ SizeUnits sizeUnits,
|
||||
_In_ float4 color,
|
||||
_In_ float rotation,
|
||||
_In_ BlendMode blendMode
|
||||
);
|
||||
void Draw(
|
||||
_In_ ID3D11Texture2D* texture,
|
||||
_In_ float2 position,
|
||||
_In_ PositionUnits positionUnits,
|
||||
_In_ float2 size,
|
||||
_In_ SizeUnits sizeUnits,
|
||||
_In_ float4 color,
|
||||
_In_ float rotation,
|
||||
_In_ BlendMode blendMode,
|
||||
_In_ float4 textRect,
|
||||
_In_ Vector4<unsigned int> colors
|
||||
);
|
||||
|
||||
private:
|
||||
unsigned int MakeUnorm(float4 color);
|
||||
float2 StandardOrigin(float2 position, PositionUnits positionUnits, float2 renderTargetSize, float dpi);
|
||||
float2 StandardOffset(float2 size, SizeUnits sizeUnits, float2 spriteSize, float dpi);
|
||||
|
||||
Microsoft::WRL::ComPtr<ID3D11Device1> m_d3dDevice;
|
||||
Microsoft::WRL::ComPtr<ID3D11DeviceContext1> m_d3dContext;
|
||||
Microsoft::WRL::ComPtr<ID3D11Buffer> m_vertexBuffer;
|
||||
Microsoft::WRL::ComPtr<ID3D11Buffer> m_instanceDataBuffer;
|
||||
Microsoft::WRL::ComPtr<ID3D11Buffer> m_indexBuffer;
|
||||
Microsoft::WRL::ComPtr<ID3D11BlendState1> m_blendStateAlpha;
|
||||
Microsoft::WRL::ComPtr<ID3D11BlendState1> m_blendStateAdditive;
|
||||
Microsoft::WRL::ComPtr<ID3D11InputLayout> m_inputLayout;
|
||||
Microsoft::WRL::ComPtr<ID3D11VertexShader> m_vertexShader;
|
||||
Microsoft::WRL::ComPtr<ID3D11GeometryShader> m_geometryShader;
|
||||
Microsoft::WRL::ComPtr<ID3D11PixelShader> m_pixelShader;
|
||||
Microsoft::WRL::ComPtr<ID3D11SamplerState> m_linearSampler;
|
||||
Microsoft::WRL::ComPtr<ID3D11Buffer> m_renderTargetInfoCbuffer;
|
||||
Microsoft::WRL::ComPtr<ID3D11Buffer> m_mvpMatrixCbuffer;
|
||||
|
||||
std::unique_ptr<ReplicationVertex[]> m_vertexData;
|
||||
std::unique_ptr<InstanceData[]> m_instanceData;
|
||||
std::map<ID3D11Texture2D*, TextureMapElement> m_textureMap;
|
||||
std::vector<SpriteRunInfo> m_spriteRuns;
|
||||
|
||||
RenderTechnique m_technique;
|
||||
ID3D11ShaderResourceView* m_currentTextureView;
|
||||
ID3D11BlendState1* m_currentBlendState;
|
||||
float2 m_renderTargetSize;
|
||||
float4x4 m_mvpMatrix;
|
||||
|
||||
int m_capacity;
|
||||
int m_spritesInRun;
|
||||
int m_numSpritesDrawn;
|
||||
float m_dpi;
|
||||
};
|
||||
}
|
||||
@@ -1,24 +0,0 @@
|
||||
//// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
|
||||
// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
|
||||
// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
|
||||
// PARTICULAR PURPOSE.
|
||||
//
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
Texture2D spriteTexture : register(t0);
|
||||
SamplerState linearSampler : register(s0);
|
||||
|
||||
struct PixelShaderInput
|
||||
{
|
||||
float4 pos : SV_POSITION;
|
||||
float2 tex : TEXCOORD0;
|
||||
float4 color : COLOR0;
|
||||
};
|
||||
|
||||
// This general-purpose pixel shader draws a bound texture with optionally modified color channels.
|
||||
|
||||
float4 main(PixelShaderInput input) : SV_TARGET
|
||||
{
|
||||
return input.color * spriteTexture.Sample(linearSampler, input.tex);
|
||||
}
|
||||
373
JGE/src/DirectX/CommonStates.cpp
Normal file
@@ -0,0 +1,373 @@
|
||||
//--------------------------------------------------------------------------------------
|
||||
// File: CommonStates.cpp
|
||||
//
|
||||
// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
|
||||
// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
|
||||
// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
|
||||
// PARTICULAR PURPOSE.
|
||||
//
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
//
|
||||
// http://go.microsoft.com/fwlink/?LinkId=248929
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
//#include "pch.h"
|
||||
#include <wrl.h>
|
||||
#include <wrl/client.h>
|
||||
using namespace Microsoft::WRL;
|
||||
|
||||
#include "CommonStates.h"
|
||||
#include "DemandCreate.h"
|
||||
#include "DirectXHelpers.h"
|
||||
#include "SharedResourcePool.h"
|
||||
|
||||
using namespace DirectX;
|
||||
using namespace Microsoft::WRL;
|
||||
|
||||
|
||||
// Internal state object implementation class. Only one of these helpers is allocated
|
||||
// per D3D device, even if there are multiple public facing CommonStates instances.
|
||||
class CommonStates::Impl
|
||||
{
|
||||
public:
|
||||
Impl(_In_ ID3D11Device* device)
|
||||
: device(device)
|
||||
{ }
|
||||
|
||||
HRESULT CreateBlendState(D3D11_BLEND srcBlend, D3D11_BLEND destBlend, _Out_ ID3D11BlendState** pResult);
|
||||
HRESULT CreateDepthStencilState(bool enable, bool writeEnable, _Out_ ID3D11DepthStencilState** pResult);
|
||||
HRESULT CreateRasterizerState(D3D11_CULL_MODE cullMode, D3D11_FILL_MODE fillMode, _Out_ ID3D11RasterizerState** pResult);
|
||||
HRESULT CreateSamplerState(D3D11_FILTER filter, D3D11_TEXTURE_ADDRESS_MODE addressMode, _Out_ ID3D11SamplerState** pResult);
|
||||
|
||||
ComPtr<ID3D11Device> device;
|
||||
|
||||
ComPtr<ID3D11BlendState> opaque;
|
||||
ComPtr<ID3D11BlendState> alphaBlend;
|
||||
ComPtr<ID3D11BlendState> additive;
|
||||
ComPtr<ID3D11BlendState> nonPremultiplied;
|
||||
|
||||
ComPtr<ID3D11DepthStencilState> depthNone;
|
||||
ComPtr<ID3D11DepthStencilState> depthDefault;
|
||||
ComPtr<ID3D11DepthStencilState> depthRead;
|
||||
|
||||
ComPtr<ID3D11RasterizerState> cullNone;
|
||||
ComPtr<ID3D11RasterizerState> cullClockwise;
|
||||
ComPtr<ID3D11RasterizerState> cullCounterClockwise;
|
||||
ComPtr<ID3D11RasterizerState> wireframe;
|
||||
|
||||
ComPtr<ID3D11SamplerState> pointWrap;
|
||||
ComPtr<ID3D11SamplerState> pointClamp;
|
||||
ComPtr<ID3D11SamplerState> linearWrap;
|
||||
ComPtr<ID3D11SamplerState> linearClamp;
|
||||
ComPtr<ID3D11SamplerState> anisotropicWrap;
|
||||
ComPtr<ID3D11SamplerState> anisotropicClamp;
|
||||
|
||||
std::mutex mutex;
|
||||
|
||||
static SharedResourcePool<ID3D11Device*, Impl> instancePool;
|
||||
};
|
||||
|
||||
|
||||
// Global instance pool.
|
||||
SharedResourcePool<ID3D11Device*, CommonStates::Impl> CommonStates::Impl::instancePool;
|
||||
|
||||
|
||||
// Helper for creating blend state objects.
|
||||
HRESULT CommonStates::Impl::CreateBlendState(D3D11_BLEND srcBlend, D3D11_BLEND destBlend, _Out_ ID3D11BlendState** pResult)
|
||||
{
|
||||
D3D11_BLEND_DESC desc;
|
||||
ZeroMemory(&desc, sizeof(desc));
|
||||
|
||||
desc.RenderTarget[0].BlendEnable = (srcBlend != D3D11_BLEND_ONE) ||
|
||||
(destBlend != D3D11_BLEND_ZERO);
|
||||
|
||||
desc.RenderTarget[0].SrcBlend = desc.RenderTarget[0].SrcBlendAlpha = srcBlend;
|
||||
desc.RenderTarget[0].DestBlend = desc.RenderTarget[0].DestBlendAlpha = destBlend;
|
||||
desc.RenderTarget[0].BlendOp = desc.RenderTarget[0].BlendOpAlpha = D3D11_BLEND_OP_ADD;
|
||||
|
||||
desc.RenderTarget[0].RenderTargetWriteMask = D3D11_COLOR_WRITE_ENABLE_ALL;
|
||||
|
||||
HRESULT hr = device->CreateBlendState(&desc, pResult);
|
||||
|
||||
if (SUCCEEDED(hr))
|
||||
SetDebugObjectName(*pResult, "DirectXTK:CommonStates");
|
||||
|
||||
return hr;
|
||||
}
|
||||
|
||||
|
||||
// Helper for creating depth stencil state objects.
|
||||
HRESULT CommonStates::Impl::CreateDepthStencilState(bool enable, bool writeEnable, _Out_ ID3D11DepthStencilState** pResult)
|
||||
{
|
||||
D3D11_DEPTH_STENCIL_DESC desc;
|
||||
ZeroMemory(&desc, sizeof(desc));
|
||||
|
||||
desc.DepthEnable = enable;
|
||||
desc.DepthWriteMask = writeEnable ? D3D11_DEPTH_WRITE_MASK_ALL : D3D11_DEPTH_WRITE_MASK_ZERO;
|
||||
desc.DepthFunc = D3D11_COMPARISON_LESS_EQUAL;
|
||||
|
||||
desc.StencilEnable = false;
|
||||
desc.StencilReadMask = D3D11_DEFAULT_STENCIL_READ_MASK;
|
||||
desc.StencilWriteMask = D3D11_DEFAULT_STENCIL_WRITE_MASK;
|
||||
|
||||
desc.FrontFace.StencilFunc = D3D11_COMPARISON_ALWAYS;
|
||||
desc.FrontFace.StencilPassOp = D3D11_STENCIL_OP_KEEP;
|
||||
desc.FrontFace.StencilFailOp = D3D11_STENCIL_OP_KEEP;
|
||||
desc.FrontFace.StencilDepthFailOp = D3D11_STENCIL_OP_KEEP;
|
||||
|
||||
desc.BackFace = desc.FrontFace;
|
||||
|
||||
HRESULT hr = device->CreateDepthStencilState(&desc, pResult);
|
||||
|
||||
if (SUCCEEDED(hr))
|
||||
SetDebugObjectName(*pResult, "DirectXTK:CommonStates");
|
||||
|
||||
return hr;
|
||||
}
|
||||
|
||||
|
||||
// Helper for creating rasterizer state objects.
|
||||
HRESULT CommonStates::Impl::CreateRasterizerState(D3D11_CULL_MODE cullMode, D3D11_FILL_MODE fillMode, _Out_ ID3D11RasterizerState** pResult)
|
||||
{
|
||||
D3D11_RASTERIZER_DESC desc;
|
||||
ZeroMemory(&desc, sizeof(desc));
|
||||
|
||||
desc.CullMode = cullMode;
|
||||
desc.FillMode = fillMode;
|
||||
desc.DepthClipEnable = true;
|
||||
desc.MultisampleEnable = true;
|
||||
|
||||
HRESULT hr = device->CreateRasterizerState(&desc, pResult);
|
||||
|
||||
if (SUCCEEDED(hr))
|
||||
SetDebugObjectName(*pResult, "DirectXTK:CommonStates");
|
||||
|
||||
return hr;
|
||||
}
|
||||
|
||||
|
||||
// Helper for creating sampler state objects.
|
||||
HRESULT CommonStates::Impl::CreateSamplerState(D3D11_FILTER filter, D3D11_TEXTURE_ADDRESS_MODE addressMode, _Out_ ID3D11SamplerState** pResult)
|
||||
{
|
||||
D3D11_SAMPLER_DESC desc;
|
||||
ZeroMemory(&desc, sizeof(desc));
|
||||
|
||||
desc.Filter = filter;
|
||||
|
||||
desc.AddressU = addressMode;
|
||||
desc.AddressV = addressMode;
|
||||
desc.AddressW = addressMode;
|
||||
|
||||
desc.MaxAnisotropy = (device->GetFeatureLevel() > D3D_FEATURE_LEVEL_9_1) ? 16 : 2;
|
||||
|
||||
desc.MaxLOD = FLT_MAX;
|
||||
desc.ComparisonFunc = D3D11_COMPARISON_NEVER;
|
||||
|
||||
HRESULT hr = device->CreateSamplerState(&desc, pResult);
|
||||
|
||||
if (SUCCEEDED(hr))
|
||||
SetDebugObjectName(*pResult, "DirectXTK:CommonStates");
|
||||
|
||||
return hr;
|
||||
}
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------
|
||||
// CommonStates
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
// Public constructor.
|
||||
CommonStates::CommonStates(_In_ ID3D11Device* device)
|
||||
: pImpl(Impl::instancePool.DemandCreate(device))
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
// Move constructor.
|
||||
CommonStates::CommonStates(CommonStates&& moveFrom)
|
||||
: pImpl(std::move(moveFrom.pImpl))
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
// Move assignment.
|
||||
CommonStates& CommonStates::operator= (CommonStates&& moveFrom)
|
||||
{
|
||||
pImpl = std::move(moveFrom.pImpl);
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
// Public destructor.
|
||||
CommonStates::~CommonStates()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------
|
||||
// Blend states
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
ID3D11BlendState* CommonStates::Opaque() const
|
||||
{
|
||||
return DemandCreate(pImpl->opaque, pImpl->mutex, [&](ID3D11BlendState** pResult)
|
||||
{
|
||||
return pImpl->CreateBlendState(D3D11_BLEND_ONE, D3D11_BLEND_ZERO, pResult);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
ID3D11BlendState* CommonStates::AlphaBlend() const
|
||||
{
|
||||
return DemandCreate(pImpl->alphaBlend, pImpl->mutex, [&](ID3D11BlendState** pResult)
|
||||
{
|
||||
return pImpl->CreateBlendState(D3D11_BLEND_ONE, D3D11_BLEND_INV_SRC_ALPHA, pResult);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
ID3D11BlendState* CommonStates::Additive() const
|
||||
{
|
||||
return DemandCreate(pImpl->additive, pImpl->mutex, [&](ID3D11BlendState** pResult)
|
||||
{
|
||||
return pImpl->CreateBlendState(D3D11_BLEND_SRC_ALPHA, D3D11_BLEND_ONE, pResult);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
ID3D11BlendState* CommonStates::NonPremultiplied() const
|
||||
{
|
||||
return DemandCreate(pImpl->nonPremultiplied, pImpl->mutex, [&](ID3D11BlendState** pResult)
|
||||
{
|
||||
return pImpl->CreateBlendState(D3D11_BLEND_SRC_ALPHA, D3D11_BLEND_INV_SRC_ALPHA, pResult);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------
|
||||
// Depth stencil states
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
ID3D11DepthStencilState* CommonStates::DepthNone() const
|
||||
{
|
||||
return DemandCreate(pImpl->depthNone, pImpl->mutex, [&](ID3D11DepthStencilState** pResult)
|
||||
{
|
||||
return pImpl->CreateDepthStencilState(false, false, pResult);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
ID3D11DepthStencilState* CommonStates::DepthDefault() const
|
||||
{
|
||||
return DemandCreate(pImpl->depthDefault, pImpl->mutex, [&](ID3D11DepthStencilState** pResult)
|
||||
{
|
||||
return pImpl->CreateDepthStencilState(true, true, pResult);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
ID3D11DepthStencilState* CommonStates::DepthRead() const
|
||||
{
|
||||
return DemandCreate(pImpl->depthRead, pImpl->mutex, [&](ID3D11DepthStencilState** pResult)
|
||||
{
|
||||
return pImpl->CreateDepthStencilState(true, false, pResult);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------
|
||||
// Rasterizer states
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
ID3D11RasterizerState* CommonStates::CullNone() const
|
||||
{
|
||||
return DemandCreate(pImpl->cullNone, pImpl->mutex, [&](ID3D11RasterizerState** pResult)
|
||||
{
|
||||
return pImpl->CreateRasterizerState(D3D11_CULL_NONE, D3D11_FILL_SOLID, pResult);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
ID3D11RasterizerState* CommonStates::CullClockwise() const
|
||||
{
|
||||
return DemandCreate(pImpl->cullClockwise, pImpl->mutex, [&](ID3D11RasterizerState** pResult)
|
||||
{
|
||||
return pImpl->CreateRasterizerState(D3D11_CULL_FRONT, D3D11_FILL_SOLID, pResult);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
ID3D11RasterizerState* CommonStates::CullCounterClockwise() const
|
||||
{
|
||||
return DemandCreate(pImpl->cullCounterClockwise, pImpl->mutex, [&](ID3D11RasterizerState** pResult)
|
||||
{
|
||||
return pImpl->CreateRasterizerState(D3D11_CULL_BACK, D3D11_FILL_SOLID, pResult);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
ID3D11RasterizerState* CommonStates::Wireframe() const
|
||||
{
|
||||
return DemandCreate(pImpl->wireframe, pImpl->mutex, [&](ID3D11RasterizerState** pResult)
|
||||
{
|
||||
return pImpl->CreateRasterizerState(D3D11_CULL_BACK, D3D11_FILL_WIREFRAME, pResult);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------
|
||||
// Sampler states
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
ID3D11SamplerState* CommonStates::PointWrap() const
|
||||
{
|
||||
return DemandCreate(pImpl->pointWrap, pImpl->mutex, [&](ID3D11SamplerState** pResult)
|
||||
{
|
||||
return pImpl->CreateSamplerState(D3D11_FILTER_MIN_MAG_MIP_POINT, D3D11_TEXTURE_ADDRESS_WRAP, pResult);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
ID3D11SamplerState* CommonStates::PointClamp() const
|
||||
{
|
||||
return DemandCreate(pImpl->pointClamp, pImpl->mutex, [&](ID3D11SamplerState** pResult)
|
||||
{
|
||||
return pImpl->CreateSamplerState(D3D11_FILTER_MIN_MAG_MIP_POINT, D3D11_TEXTURE_ADDRESS_CLAMP, pResult);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
ID3D11SamplerState* CommonStates::LinearWrap() const
|
||||
{
|
||||
return DemandCreate(pImpl->linearWrap, pImpl->mutex, [&](ID3D11SamplerState** pResult)
|
||||
{
|
||||
return pImpl->CreateSamplerState(D3D11_FILTER_MIN_MAG_MIP_LINEAR, D3D11_TEXTURE_ADDRESS_WRAP, pResult);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
ID3D11SamplerState* CommonStates::LinearClamp() const
|
||||
{
|
||||
return DemandCreate(pImpl->linearClamp, pImpl->mutex, [&](ID3D11SamplerState** pResult)
|
||||
{
|
||||
return pImpl->CreateSamplerState(D3D11_FILTER_MIN_MAG_MIP_LINEAR, D3D11_TEXTURE_ADDRESS_CLAMP, pResult);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
ID3D11SamplerState* CommonStates::AnisotropicWrap() const
|
||||
{
|
||||
return DemandCreate(pImpl->anisotropicWrap, pImpl->mutex, [&](ID3D11SamplerState** pResult)
|
||||
{
|
||||
return pImpl->CreateSamplerState(D3D11_FILTER_ANISOTROPIC, D3D11_TEXTURE_ADDRESS_WRAP, pResult);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
ID3D11SamplerState* CommonStates::AnisotropicClamp() const
|
||||
{
|
||||
return DemandCreate(pImpl->anisotropicClamp, pImpl->mutex, [&](ID3D11SamplerState** pResult)
|
||||
{
|
||||
return pImpl->CreateSamplerState(D3D11_FILTER_ANISOTROPIC, D3D11_TEXTURE_ADDRESS_CLAMP, pResult);
|
||||
});
|
||||
}
|
||||
70
JGE/src/DirectX/CommonStates.h
Normal file
@@ -0,0 +1,70 @@
|
||||
//--------------------------------------------------------------------------------------
|
||||
// File: CommonStates.h
|
||||
//
|
||||
// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
|
||||
// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
|
||||
// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
|
||||
// PARTICULAR PURPOSE.
|
||||
//
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
//
|
||||
// http://go.microsoft.com/fwlink/?LinkId=248929
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
#pragma once
|
||||
|
||||
#if defined(_XBOX_ONE) && defined(_TITLE)
|
||||
#include <d3d11_x.h>
|
||||
#else
|
||||
#include <d3d11_1.h>
|
||||
#endif
|
||||
|
||||
#include <memory>
|
||||
|
||||
|
||||
namespace DirectX
|
||||
{
|
||||
class CommonStates
|
||||
{
|
||||
public:
|
||||
explicit CommonStates(_In_ ID3D11Device* device);
|
||||
CommonStates(CommonStates&& moveFrom);
|
||||
CommonStates& operator= (CommonStates&& moveFrom);
|
||||
virtual ~CommonStates();
|
||||
|
||||
// Blend states.
|
||||
ID3D11BlendState* __cdecl Opaque() const;
|
||||
ID3D11BlendState* __cdecl AlphaBlend() const;
|
||||
ID3D11BlendState* __cdecl Additive() const;
|
||||
ID3D11BlendState* __cdecl NonPremultiplied() const;
|
||||
|
||||
// Depth stencil states.
|
||||
ID3D11DepthStencilState* __cdecl DepthNone() const;
|
||||
ID3D11DepthStencilState* __cdecl DepthDefault() const;
|
||||
ID3D11DepthStencilState* __cdecl DepthRead() const;
|
||||
|
||||
// Rasterizer states.
|
||||
ID3D11RasterizerState* __cdecl CullNone() const;
|
||||
ID3D11RasterizerState* __cdecl CullClockwise() const;
|
||||
ID3D11RasterizerState* __cdecl CullCounterClockwise() const;
|
||||
ID3D11RasterizerState* __cdecl Wireframe() const;
|
||||
|
||||
// Sampler states.
|
||||
ID3D11SamplerState* __cdecl PointWrap() const;
|
||||
ID3D11SamplerState* __cdecl PointClamp() const;
|
||||
ID3D11SamplerState* __cdecl LinearWrap() const;
|
||||
ID3D11SamplerState* __cdecl LinearClamp() const;
|
||||
ID3D11SamplerState* __cdecl AnisotropicWrap() const;
|
||||
ID3D11SamplerState* __cdecl AnisotropicClamp() const;
|
||||
|
||||
private:
|
||||
// Private implementation.
|
||||
class Impl;
|
||||
|
||||
std::shared_ptr<Impl> pImpl;
|
||||
|
||||
// Prevent copying.
|
||||
CommonStates(CommonStates const&);
|
||||
CommonStates& operator= (CommonStates const&);
|
||||
};
|
||||
}
|
||||
85
JGE/src/DirectX/ConstantBuffer.h
Normal file
@@ -0,0 +1,85 @@
|
||||
//--------------------------------------------------------------------------------------
|
||||
// File: ConstantBuffer.h
|
||||
//
|
||||
// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
|
||||
// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
|
||||
// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
|
||||
// PARTICULAR PURPOSE.
|
||||
//
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
//
|
||||
// http://go.microsoft.com/fwlink/?LinkId=248929
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "DirectXHelpers.h"
|
||||
#include "PlatformHelpers.h"
|
||||
|
||||
|
||||
namespace DirectX
|
||||
{
|
||||
// Strongly typed wrapper around a D3D constant buffer.
|
||||
template<typename T>
|
||||
class ConstantBuffer
|
||||
{
|
||||
public:
|
||||
// Constructor.
|
||||
ConstantBuffer() {}
|
||||
explicit ConstantBuffer(_In_ ID3D11Device* device)
|
||||
{
|
||||
Create( device );
|
||||
}
|
||||
|
||||
|
||||
void Create(_In_ ID3D11Device* device)
|
||||
{
|
||||
D3D11_BUFFER_DESC desc = { 0 };
|
||||
|
||||
desc.ByteWidth = sizeof(T);
|
||||
desc.Usage = D3D11_USAGE_DYNAMIC;
|
||||
desc.BindFlags = D3D11_BIND_CONSTANT_BUFFER;
|
||||
desc.CPUAccessFlags = D3D11_CPU_ACCESS_WRITE;
|
||||
|
||||
ThrowIfFailed(
|
||||
device->CreateBuffer(&desc, nullptr, mConstantBuffer.ReleaseAndGetAddressOf() )
|
||||
);
|
||||
|
||||
SetDebugObjectName(mConstantBuffer.Get(), "DirectXTK");
|
||||
}
|
||||
|
||||
|
||||
// Writes new data into the constant buffer.
|
||||
void SetData(_In_ ID3D11DeviceContext* deviceContext, T const& value)
|
||||
{
|
||||
assert( mConstantBuffer.Get() != 0 );
|
||||
|
||||
D3D11_MAPPED_SUBRESOURCE mappedResource;
|
||||
|
||||
ThrowIfFailed(
|
||||
deviceContext->Map(mConstantBuffer.Get(), 0, D3D11_MAP_WRITE_DISCARD, 0, &mappedResource)
|
||||
);
|
||||
|
||||
*(T*)mappedResource.pData = value;
|
||||
|
||||
deviceContext->Unmap(mConstantBuffer.Get(), 0);
|
||||
}
|
||||
|
||||
|
||||
// Looks up the underlying D3D constant buffer.
|
||||
ID3D11Buffer* GetBuffer()
|
||||
{
|
||||
return mConstantBuffer.Get();
|
||||
}
|
||||
|
||||
|
||||
private:
|
||||
// The underlying D3D object.
|
||||
Microsoft::WRL::ComPtr<ID3D11Buffer> mConstantBuffer;
|
||||
|
||||
|
||||
// Prevent copying.
|
||||
ConstantBuffer(ConstantBuffer const&);
|
||||
ConstantBuffer& operator= (ConstantBuffer const&);
|
||||
};
|
||||
}
|
||||
51
JGE/src/DirectX/DemandCreate.h
Normal file
@@ -0,0 +1,51 @@
|
||||
//--------------------------------------------------------------------------------------
|
||||
// File: DemandCreate.h
|
||||
//
|
||||
// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
|
||||
// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
|
||||
// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
|
||||
// PARTICULAR PURPOSE.
|
||||
//
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
//
|
||||
// http://go.microsoft.com/fwlink/?LinkId=248929
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "PlatformHelpers.h"
|
||||
|
||||
|
||||
namespace DirectX
|
||||
{
|
||||
// Helper for lazily creating a D3D resource.
|
||||
template<typename T, typename TCreateFunc>
|
||||
static T* DemandCreate(Microsoft::WRL::ComPtr<T>& comPtr, std::mutex& mutex, TCreateFunc createFunc)
|
||||
{
|
||||
T* result = comPtr.Get();
|
||||
|
||||
// Double-checked lock pattern.
|
||||
MemoryBarrier();
|
||||
|
||||
if (!result)
|
||||
{
|
||||
std::lock_guard<std::mutex> lock(mutex);
|
||||
|
||||
result = comPtr.Get();
|
||||
|
||||
if (!result)
|
||||
{
|
||||
// Create the new object.
|
||||
ThrowIfFailed(
|
||||
createFunc(&result)
|
||||
);
|
||||
|
||||
MemoryBarrier();
|
||||
|
||||
comPtr.Attach(result);
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
120
JGE/src/DirectX/DirectXHelpers.h
Normal file
@@ -0,0 +1,120 @@
|
||||
//--------------------------------------------------------------------------------------
|
||||
// File: DirectXHelpers.h
|
||||
//
|
||||
// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
|
||||
// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
|
||||
// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
|
||||
// PARTICULAR PURPOSE.
|
||||
//
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
//
|
||||
// http://go.microsoft.com/fwlink/?LinkId=248929
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
#pragma once
|
||||
|
||||
#if defined(_XBOX_ONE) && defined(_TITLE)
|
||||
#include <d3d11_x.h>
|
||||
#define NO_D3D11_DEBUG_NAME
|
||||
#else
|
||||
#include <d3d11_1.h>
|
||||
#endif
|
||||
|
||||
#if !defined(NO_D3D11_DEBUG_NAME) && ( defined(_DEBUG) || defined(PROFILE) )
|
||||
#pragma comment(lib,"dxguid.lib")
|
||||
#endif
|
||||
|
||||
#include <exception>
|
||||
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable : 4005)
|
||||
#include <stdint.h>
|
||||
#pragma warning(pop)
|
||||
|
||||
//
|
||||
// The core Direct3D headers provide the following helper C++ classes
|
||||
// CD3D11_RECT
|
||||
// CD3D11_BOX
|
||||
// CD3D11_DEPTH_STENCIL_DESC
|
||||
// CD3D11_BLEND_DESC, CD3D11_BLEND_DESC1
|
||||
// CD3D11_RASTERIZER_DESC, CD3D11_RASTERIZER_DESC1
|
||||
// CD3D11_BUFFER_DESC
|
||||
// CD3D11_TEXTURE1D_DESC
|
||||
// CD3D11_TEXTURE2D_DESC
|
||||
// CD3D11_TEXTURE3D_DESC
|
||||
// CD3D11_SHADER_RESOURCE_VIEW_DESC
|
||||
// CD3D11_RENDER_TARGET_VIEW_DESC
|
||||
// CD3D11_VIEWPORT
|
||||
// CD3D11_DEPTH_STENCIL_VIEW_DESC
|
||||
// CD3D11_UNORDERED_ACCESS_VIEW_DESC
|
||||
// CD3D11_SAMPLER_DESC
|
||||
// CD3D11_QUERY_DESC
|
||||
// CD3D11_COUNTER_DESC
|
||||
//
|
||||
|
||||
|
||||
namespace DirectX
|
||||
{
|
||||
// simliar to std::lock_guard for exception-safe Direct3D 11 resource locking
|
||||
class MapGuard : public D3D11_MAPPED_SUBRESOURCE
|
||||
{
|
||||
public:
|
||||
MapGuard( _In_ ID3D11DeviceContext* context,
|
||||
_In_ ID3D11Resource *resource,
|
||||
_In_ UINT subresource,
|
||||
_In_ D3D11_MAP mapType,
|
||||
_In_ UINT mapFlags )
|
||||
: mContext(context), mResource(resource), mSubresource(subresource)
|
||||
{
|
||||
HRESULT hr = mContext->Map( resource, subresource, mapType, mapFlags, this );
|
||||
if (FAILED(hr))
|
||||
{
|
||||
throw std::exception();
|
||||
}
|
||||
}
|
||||
|
||||
~MapGuard()
|
||||
{
|
||||
mContext->Unmap( mResource, mSubresource );
|
||||
}
|
||||
|
||||
uint8_t* get() const
|
||||
{
|
||||
return reinterpret_cast<uint8_t*>( pData );
|
||||
}
|
||||
uint8_t* get(size_t slice) const
|
||||
{
|
||||
return reinterpret_cast<uint8_t*>( pData ) + ( slice * DepthPitch );
|
||||
}
|
||||
|
||||
uint8_t* scanline(size_t row) const
|
||||
{
|
||||
return reinterpret_cast<uint8_t*>( pData ) + ( row * RowPitch );
|
||||
}
|
||||
uint8_t* scanline(size_t slice, size_t row) const
|
||||
{
|
||||
return reinterpret_cast<uint8_t*>( pData ) + ( slice * DepthPitch ) + ( row * RowPitch );
|
||||
}
|
||||
|
||||
private:
|
||||
ID3D11DeviceContext* mContext;
|
||||
ID3D11Resource* mResource;
|
||||
UINT mSubresource;
|
||||
|
||||
MapGuard(MapGuard const&);
|
||||
MapGuard& operator= (MapGuard const&);
|
||||
};
|
||||
|
||||
|
||||
// Helper sets a D3D resource name string (used by PIX and debug layer leak reporting).
|
||||
template<UINT TNameLength>
|
||||
inline void SetDebugObjectName(_In_ ID3D11DeviceChild* resource, _In_z_ const char (&name)[TNameLength])
|
||||
{
|
||||
#if !defined(NO_D3D11_DEBUG_NAME) && ( defined(_DEBUG) || defined(PROFILE) )
|
||||
resource->SetPrivateData(WKPDID_D3DDebugObjectName, TNameLength - 1, name);
|
||||
#else
|
||||
UNREFERENCED_PARAMETER(resource);
|
||||
UNREFERENCED_PARAMETER(name);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
@@ -7,6 +7,10 @@
|
||||
// Copyright (c) 2007 James Hui (a.k.a. Dr.Watson) <jhkhui@gmail.com>
|
||||
//
|
||||
//-------------------------------------------------------------------------------------
|
||||
|
||||
#include "PrecompiledHeader.h"
|
||||
#undef DebugTrace
|
||||
|
||||
#if (!defined IOS) && (!defined QT_CONFIG)
|
||||
#if (defined WIN32) && (!defined WP8)
|
||||
#pragma warning(disable : 4786)
|
||||
@@ -21,14 +25,17 @@
|
||||
#include <ppl.h>
|
||||
#include <ppltasks.h>
|
||||
#include <agile.h>
|
||||
#include "BasicSprites.h"
|
||||
#include <d2d1_1.h>
|
||||
using namespace BasicSprites;
|
||||
//using namespace BasicSprites;
|
||||
using namespace Microsoft::WRL;
|
||||
using namespace DirectX;
|
||||
using namespace Windows::UI::Core;
|
||||
using namespace Windows::Foundation;
|
||||
using namespace Windows::Graphics::Display;
|
||||
#include "SpriteBatch.h"
|
||||
#include "CommonStates.h"
|
||||
#include "PlatformHelpers.h"
|
||||
using namespace DirectX;
|
||||
#endif
|
||||
|
||||
#include <png.h>
|
||||
@@ -57,42 +64,45 @@ extern "C" {
|
||||
#endif
|
||||
#endif
|
||||
|
||||
typedef float4x4 ESMatrix;
|
||||
//typedef float4x4 ESMatrix;
|
||||
typedef float GLfloat;
|
||||
typedef struct {
|
||||
GLfloat m[4][4];
|
||||
} ESMatrix;
|
||||
|
||||
void esMatrixLoadIdentity(ESMatrix *result)
|
||||
{
|
||||
memset(result, 0x0, sizeof(ESMatrix));
|
||||
(*result)[0][0] = 1.0f;
|
||||
(*result)[1][1] = 1.0f;
|
||||
(*result)[2][2] = 1.0f;
|
||||
(*result)[3][3] = 1.0f;
|
||||
result->m[0][0] = 1.0f;
|
||||
result->m[1][1] = 1.0f;
|
||||
result->m[2][2] = 1.0f;
|
||||
result->m[3][3] = 1.0f;
|
||||
}
|
||||
|
||||
void esScale(ESMatrix *result, GLfloat sx, GLfloat sy, GLfloat sz)
|
||||
{
|
||||
(*result)[0][0] *= sx;
|
||||
(*result)[0][1] *= sx;
|
||||
(*result)[0][2] *= sx;
|
||||
(*result)[0][3] *= sx;
|
||||
result->m[0][0] *= sx;
|
||||
result->m[0][1] *= sx;
|
||||
result->m[0][2] *= sx;
|
||||
result->m[0][3] *= sx;
|
||||
|
||||
(*result)[1][0] *= sy;
|
||||
(*result)[1][1] *= sy;
|
||||
(*result)[1][2] *= sy;
|
||||
(*result)[1][3] *= sy;
|
||||
result->m[1][0] *= sy;
|
||||
result->m[1][1] *= sy;
|
||||
result->m[1][2] *= sy;
|
||||
result->m[1][3] *= sy;
|
||||
|
||||
(*result)[2][0] *= sz;
|
||||
(*result)[2][1] *= sz;
|
||||
(*result)[2][2] *= sz;
|
||||
(*result)[2][3] *= sz;
|
||||
result->m[2][0] *= sz;
|
||||
result->m[2][1] *= sz;
|
||||
result->m[2][2] *= sz;
|
||||
result->m[2][3] *= sz;
|
||||
}
|
||||
|
||||
void esTranslate(ESMatrix *result, GLfloat tx, GLfloat ty, GLfloat tz)
|
||||
{
|
||||
(*result)[3][0] += ((*result)[0][0] * tx + (*result)[1][0] * ty + (*result)[2][0] * tz);
|
||||
(*result)[3][1] += ((*result)[0][1] * tx + (*result)[1][1] * ty + (*result)[2][1] * tz);
|
||||
(*result)[3][2] += ((*result)[0][2] * tx + (*result)[1][2] * ty + (*result)[2][2] * tz);
|
||||
(*result)[3][3] += ((*result)[0][3] * tx + (*result)[1][3] * ty + (*result)[2][3] * tz);
|
||||
result->m[3][0] += (result->m[0][0] * tx + result->m[1][0] * ty + result->m[2][0] * tz);
|
||||
result->m[3][1] += (result->m[0][1] * tx + result->m[1][1] * ty + result->m[2][1] * tz);
|
||||
result->m[3][2] += (result->m[0][2] * tx + result->m[1][2] * ty + result->m[2][2] * tz);
|
||||
result->m[3][3] += (result->m[0][3] * tx + result->m[1][3] * ty + result->m[2][3] * tz);
|
||||
}
|
||||
|
||||
void esMatrixMultiply(ESMatrix *result, ESMatrix *srcA, ESMatrix *srcB)
|
||||
@@ -102,25 +112,25 @@ void esMatrixMultiply(ESMatrix *result, ESMatrix *srcA, ESMatrix *srcB)
|
||||
|
||||
for (i=0; i<4; i++)
|
||||
{
|
||||
tmp[i][0] = ((*srcA)[i][0] * (*srcB)[0][0]) +
|
||||
((*srcA)[i][1] * (*srcB)[1][0]) +
|
||||
((*srcA)[i][2] * (*srcB)[2][0]) +
|
||||
((*srcA)[i][3] * (*srcB)[3][0]) ;
|
||||
tmp.m[i][0] = (srcA->m[i][0] * srcB->m[0][0]) +
|
||||
(srcA->m[i][1] * srcB->m[1][0]) +
|
||||
(srcA->m[i][2] * srcB->m[2][0]) +
|
||||
(srcA->m[i][3] * srcB->m[3][0]) ;
|
||||
|
||||
tmp[i][1] = ((*srcA)[i][0] * (*srcB)[0][1]) +
|
||||
((*srcA)[i][1] * (*srcB)[1][1]) +
|
||||
((*srcA)[i][2] * (*srcB)[2][1]) +
|
||||
((*srcA)[i][3] * (*srcB)[3][1]) ;
|
||||
tmp.m[i][1] = (srcA->m[i][0] * srcB->m[0][1]) +
|
||||
(srcA->m[i][1] * srcB->m[1][1]) +
|
||||
(srcA->m[i][2] * srcB->m[2][1]) +
|
||||
(srcA->m[i][3] * srcB->m[3][1]) ;
|
||||
|
||||
tmp[i][2] = ((*srcA)[i][0] * (*srcB)[0][2]) +
|
||||
((*srcA)[i][1] * (*srcB)[1][2]) +
|
||||
((*srcA)[i][2] * (*srcB)[2][2]) +
|
||||
((*srcA)[i][3] * (*srcB)[3][2]) ;
|
||||
tmp.m[i][2] = (srcA->m[i][0] * srcB->m[0][2]) +
|
||||
(srcA->m[i][1] * srcB->m[1][2]) +
|
||||
(srcA->m[i][2] * srcB->m[2][2]) +
|
||||
(srcA->m[i][3] * srcB->m[3][2]) ;
|
||||
|
||||
tmp[i][3] = ((*srcA)[i][0] * (*srcB)[0][3]) +
|
||||
((*srcA)[i][1] * (*srcB)[1][3]) +
|
||||
((*srcA)[i][2] * (*srcB)[2][3]) +
|
||||
((*srcA)[i][3] * (*srcB)[3][3]) ;
|
||||
tmp.m[i][3] = (srcA->m[i][0] * srcB->m[0][3]) +
|
||||
(srcA->m[i][1] * srcB->m[1][3]) +
|
||||
(srcA->m[i][2] * srcB->m[2][3]) +
|
||||
(srcA->m[i][3] * srcB->m[3][3]) ;
|
||||
}
|
||||
/*
|
||||
* Actually, srcA and srcB are column-major order matrixes, while they
|
||||
@@ -183,25 +193,25 @@ void esRotate(ESMatrix *result, GLfloat angle, GLfloat x, GLfloat y, GLfloat z)
|
||||
|
||||
// Note: matrixes in OpenGL ES are stored in column-major order!
|
||||
|
||||
rotMat[0][0] = (oneMinusCos * xx) + cosAngle;
|
||||
rotMat[1][0] = (oneMinusCos * xy) - zs;
|
||||
rotMat[2][0] = (oneMinusCos * zx) + ys;
|
||||
rotMat[3][0] = 0.0F;
|
||||
rotMat.m[0][0] = (oneMinusCos * xx) + cosAngle;
|
||||
rotMat.m[1][0] = (oneMinusCos * xy) - zs;
|
||||
rotMat.m[2][0] = (oneMinusCos * zx) + ys;
|
||||
rotMat.m[3][0] = 0.0F;
|
||||
|
||||
rotMat[0][1] = (oneMinusCos * xy) + zs;
|
||||
rotMat[1][1] = (oneMinusCos * yy) + cosAngle;
|
||||
rotMat[2][1] = (oneMinusCos * yz) - xs;
|
||||
rotMat[3][1] = 0.0F;
|
||||
rotMat.m[0][1] = (oneMinusCos * xy) + zs;
|
||||
rotMat.m[1][1] = (oneMinusCos * yy) + cosAngle;
|
||||
rotMat.m[2][1] = (oneMinusCos * yz) - xs;
|
||||
rotMat.m[3][1] = 0.0F;
|
||||
|
||||
rotMat[0][2] = (oneMinusCos * zx) - ys;
|
||||
rotMat[1][2] = (oneMinusCos * yz) + xs;
|
||||
rotMat[2][2] = (oneMinusCos * zz) + cosAngle;
|
||||
rotMat[3][2] = 0.0F;
|
||||
rotMat.m[0][2] = (oneMinusCos * zx) - ys;
|
||||
rotMat.m[1][2] = (oneMinusCos * yz) + xs;
|
||||
rotMat.m[2][2] = (oneMinusCos * zz) + cosAngle;
|
||||
rotMat.m[3][2] = 0.0F;
|
||||
|
||||
rotMat[0][3] = 0.0F;
|
||||
rotMat[1][3] = 0.0F;
|
||||
rotMat[2][3] = 0.0F;
|
||||
rotMat[3][3] = 1.0F;
|
||||
rotMat.m[0][3] = 0.0F;
|
||||
rotMat.m[1][3] = 0.0F;
|
||||
rotMat.m[2][3] = 0.0F;
|
||||
rotMat.m[3][3] = 1.0F;
|
||||
|
||||
esMatrixMultiply( result, &rotMat, result );
|
||||
}
|
||||
@@ -218,12 +228,12 @@ void esOrtho(ESMatrix *result, float left, float right, float bottom, float top,
|
||||
return;
|
||||
|
||||
esMatrixLoadIdentity(&ortho);
|
||||
ortho[0][0] = 2.0f / deltaX;
|
||||
ortho[3][0] = -(right + left) / deltaX;
|
||||
ortho[1][1] = 2.0f / deltaY;
|
||||
ortho[3][1] = -(top + bottom) / deltaY;
|
||||
ortho[2][2] = -2.0f / deltaZ;
|
||||
ortho[3][2] = -(nearZ + farZ) / deltaZ;
|
||||
ortho.m[0][0] = 2.0f / deltaX;
|
||||
ortho.m[3][0] = -(right + left) / deltaX;
|
||||
ortho.m[1][1] = 2.0f / deltaY;
|
||||
ortho.m[3][1] = -(top + bottom) / deltaY;
|
||||
ortho.m[2][2] = -2.0f / deltaZ;
|
||||
ortho.m[3][2] = -(nearZ + farZ) / deltaZ;
|
||||
|
||||
esMatrixMultiply(result, &ortho, result);
|
||||
}
|
||||
@@ -282,25 +292,24 @@ void JQuad::SetHotSpot(float x, float y)
|
||||
}
|
||||
|
||||
JRenderer* JRenderer::mInstance = NULL;
|
||||
BasicSprites::SpriteBatch^ mspriteBatchInstance;
|
||||
bool JRenderer::m3DEnabled = false;
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
JTexture::JTexture() : mBuffer(NULL)
|
||||
{
|
||||
mTexId = (ID3D11Texture2D*)-1;
|
||||
mTexId = (ID3D11ShaderResourceView*)0;
|
||||
}
|
||||
|
||||
JTexture::~JTexture()
|
||||
{
|
||||
if (mBuffer)
|
||||
{
|
||||
if(mTexId)
|
||||
mTexId->Release();
|
||||
delete [] mBuffer;
|
||||
mBuffer = NULL;
|
||||
}
|
||||
|
||||
mspriteBatchInstance->RemoveTexture(mTexId);
|
||||
}
|
||||
|
||||
|
||||
@@ -318,8 +327,6 @@ JRenderer* JRenderer::GetInstance()
|
||||
if (mInstance == NULL)
|
||||
{
|
||||
mInstance = new JRenderer();
|
||||
mspriteBatchInstance = ref new SpriteBatch();
|
||||
|
||||
JASSERT(mInstance != NULL);
|
||||
|
||||
mInstance->InitRenderer();
|
||||
@@ -336,7 +343,6 @@ void JRenderer::Destroy()
|
||||
mInstance->DestroyRenderer();
|
||||
delete mInstance;
|
||||
mInstance = NULL;
|
||||
mspriteBatchInstance = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -387,7 +393,7 @@ void JRenderer::InitRenderer()
|
||||
// Create the Direct3D 11 API device object and a corresponding context.
|
||||
ComPtr<ID3D11Device> device;
|
||||
ComPtr<ID3D11DeviceContext> context;
|
||||
DX::ThrowIfFailed(
|
||||
DirectX::ThrowIfFailed(
|
||||
D3D11CreateDevice(
|
||||
nullptr, // Specify nullptr to use the default adapter.
|
||||
D3D_DRIVER_TYPE_HARDWARE,
|
||||
@@ -403,17 +409,15 @@ void JRenderer::InitRenderer()
|
||||
);
|
||||
|
||||
// Get the Direct3D 11.1 API device and context interfaces.
|
||||
DX::ThrowIfFailed(
|
||||
DirectX::ThrowIfFailed(
|
||||
device.As(&m_d3dDevice)
|
||||
);
|
||||
|
||||
DX::ThrowIfFailed(
|
||||
DirectX::ThrowIfFailed(
|
||||
context.As(&m_d3dContext)
|
||||
);
|
||||
|
||||
mspriteBatchInstance->Initialize(
|
||||
m_d3dDevice.Get(), 10024
|
||||
);
|
||||
m_spriteBatch = new SpriteBatch(m_d3dContext.Get());
|
||||
}
|
||||
|
||||
void JRenderer::OnWindowsSizeChanged(void* window, float inWidth, float inHeight)
|
||||
@@ -434,7 +438,7 @@ void JRenderer::OnWindowsSizeChanged(void* window, float inWidth, float inHeight
|
||||
if(m_swapChain != nullptr)
|
||||
{
|
||||
// If the swap chain already exists, resize it.
|
||||
DX::ThrowIfFailed(
|
||||
DirectX::ThrowIfFailed(
|
||||
m_swapChain->ResizeBuffers(
|
||||
2, // Double-buffered swap chain.
|
||||
static_cast<UINT>(mWindowWidth),
|
||||
@@ -461,17 +465,17 @@ void JRenderer::OnWindowsSizeChanged(void* window, float inWidth, float inHeight
|
||||
swapChainDesc.Flags = 0;
|
||||
|
||||
ComPtr<IDXGIDevice1> dxgiDevice;
|
||||
DX::ThrowIfFailed(
|
||||
DirectX::ThrowIfFailed(
|
||||
m_d3dDevice.As(&dxgiDevice)
|
||||
);
|
||||
|
||||
ComPtr<IDXGIAdapter> dxgiAdapter;
|
||||
DX::ThrowIfFailed(
|
||||
DirectX::ThrowIfFailed(
|
||||
dxgiDevice->GetAdapter(&dxgiAdapter)
|
||||
);
|
||||
|
||||
ComPtr<IDXGIFactory2> dxgiFactory;
|
||||
DX::ThrowIfFailed(
|
||||
DirectX::ThrowIfFailed(
|
||||
dxgiAdapter->GetParent(
|
||||
__uuidof(IDXGIFactory2),
|
||||
&dxgiFactory
|
||||
@@ -479,7 +483,7 @@ void JRenderer::OnWindowsSizeChanged(void* window, float inWidth, float inHeight
|
||||
);
|
||||
|
||||
// Windows::UI::Core::CoreWindow* window = (Windows::UI::Core::CoreWindow*)window.Get();
|
||||
DX::ThrowIfFailed(
|
||||
DirectX::ThrowIfFailed(
|
||||
dxgiFactory->CreateSwapChainForCoreWindow(
|
||||
m_d3dDevice.Get(),
|
||||
m_Window.Get(),
|
||||
@@ -491,14 +495,14 @@ void JRenderer::OnWindowsSizeChanged(void* window, float inWidth, float inHeight
|
||||
|
||||
// Ensure that DXGI does not queue more than one frame at a time. This both reduces latency and
|
||||
// ensures that the application will only render after each VSync, minimizing power consumption.
|
||||
DX::ThrowIfFailed(
|
||||
DirectX::ThrowIfFailed(
|
||||
dxgiDevice->SetMaximumFrameLatency(1)
|
||||
);
|
||||
}
|
||||
|
||||
// Create a render target view of the swap chain back buffer.
|
||||
ComPtr<ID3D11Texture2D> backBuffer;
|
||||
DX::ThrowIfFailed(
|
||||
DirectX::ThrowIfFailed(
|
||||
m_swapChain->GetBuffer(
|
||||
0,
|
||||
__uuidof(ID3D11Texture2D),
|
||||
@@ -506,7 +510,7 @@ void JRenderer::OnWindowsSizeChanged(void* window, float inWidth, float inHeight
|
||||
)
|
||||
);
|
||||
|
||||
DX::ThrowIfFailed(
|
||||
DirectX::ThrowIfFailed(
|
||||
m_d3dDevice->CreateRenderTargetView(
|
||||
backBuffer.Get(),
|
||||
nullptr,
|
||||
@@ -529,7 +533,7 @@ void JRenderer::OnWindowsSizeChanged(void* window, float inWidth, float inHeight
|
||||
);
|
||||
|
||||
ComPtr<ID3D11Texture2D> depthStencil;
|
||||
DX::ThrowIfFailed(
|
||||
DirectX::ThrowIfFailed(
|
||||
m_d3dDevice->CreateTexture2D(
|
||||
&depthStencilDesc,
|
||||
nullptr,
|
||||
@@ -538,7 +542,7 @@ void JRenderer::OnWindowsSizeChanged(void* window, float inWidth, float inHeight
|
||||
);
|
||||
|
||||
CD3D11_DEPTH_STENCIL_VIEW_DESC depthStencilViewDesc(D3D11_DSV_DIMENSION_TEXTURE2D);
|
||||
DX::ThrowIfFailed(
|
||||
DirectX::ThrowIfFailed(
|
||||
m_d3dDevice->CreateDepthStencilView(
|
||||
depthStencil.Get(),
|
||||
&depthStencilViewDesc,
|
||||
@@ -561,6 +565,9 @@ void JRenderer::OnWindowsSizeChanged(void* window, float inWidth, float inHeight
|
||||
|
||||
void JRenderer::DestroyRenderer()
|
||||
{
|
||||
if(m_spriteBatch)
|
||||
delete m_spriteBatch;
|
||||
m_spriteBatch = NULL;
|
||||
}
|
||||
|
||||
void JRenderer::BeginScene()
|
||||
@@ -576,14 +583,15 @@ void JRenderer::BeginScene()
|
||||
reinterpret_cast<float*>(&D2D1::ColorF(D2D1::ColorF::MidnightBlue))
|
||||
);
|
||||
|
||||
mspriteBatchInstance->Begin();
|
||||
CommonStates states(m_d3dDevice.Get());
|
||||
m_spriteBatch->Begin(SpriteSortMode_Deferred, states.NonPremultiplied());
|
||||
}
|
||||
|
||||
|
||||
void JRenderer::EndScene()
|
||||
{
|
||||
|
||||
mspriteBatchInstance->End();
|
||||
m_spriteBatch->End();
|
||||
|
||||
// The application may optionally specify "dirty" or "scroll"
|
||||
// rects to improve efficiency in certain scenarios.
|
||||
@@ -623,7 +631,7 @@ void JRenderer::EndScene()
|
||||
}
|
||||
else
|
||||
{
|
||||
DX::ThrowIfFailed(hr);
|
||||
DirectX::ThrowIfFailed(hr);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -654,66 +662,127 @@ void JRenderer::RenderQuad(JQuad* quad, float xo, float yo, float angle, float x
|
||||
float x = -quad->mHotSpotX;
|
||||
float y = quad->mHotSpotY;
|
||||
|
||||
mspriteBatchInstance->Draw(
|
||||
XMVECTORF32 position = {
|
||||
((xo)*GetActualWidth())/SCREEN_WIDTH_F, ((yo)*GetActualHeight())/SCREEN_HEIGHT_F, 0, 0
|
||||
};
|
||||
|
||||
XMVECTORF32 origin = {
|
||||
-x, y, 0, 0
|
||||
};
|
||||
|
||||
XMVECTORF32 color = {
|
||||
quad->mColor[0].r/255.0f, quad->mColor[0].g/255.0f, quad->mColor[0].b/255.0f, quad->mColor[0].a/255.0f
|
||||
};
|
||||
|
||||
RECT rect;
|
||||
rect.bottom = quad->mY + height;
|
||||
rect.top = quad->mY;
|
||||
rect.left = quad->mX;;
|
||||
rect.right = quad->mX + width;
|
||||
|
||||
XMVECTOR scale = {xScale*GetActualWidth()/SCREEN_WIDTH_F, yScale*GetActualHeight()/SCREEN_HEIGHT_F};
|
||||
|
||||
m_spriteBatch->Draw(
|
||||
quad->mTex->mTexId,
|
||||
float2(
|
||||
// ((xo+((width*xScale)/2))*GetActualWidth())/SCREEN_WIDTH_F,
|
||||
// ((yo+((height*yScale)/2))*GetActualHeight())/SCREEN_HEIGHT_F),
|
||||
((xo)*GetActualWidth())/SCREEN_WIDTH_F,
|
||||
((yo)*GetActualHeight())/SCREEN_HEIGHT_F),
|
||||
PositionUnits::Pixels,
|
||||
float2(
|
||||
(width*xScale*GetActualWidth())/SCREEN_WIDTH_F,
|
||||
(height*yScale*GetActualHeight())/SCREEN_HEIGHT_F
|
||||
),
|
||||
SizeUnits::Pixels,
|
||||
float4(
|
||||
quad->mColor[0].r/255.0f,
|
||||
quad->mColor[0].g/255.0f,
|
||||
quad->mColor[0].b/255.0f,
|
||||
quad->mColor[0].a/255.0f),
|
||||
-angle,
|
||||
BlendMode::Alpha,
|
||||
float4(quad->mTX0, quad->mTX1, quad->mTY0, quad->mTY1),
|
||||
Vector4<unsigned int>(quad->mColor[0].color, quad->mColor[1].color, quad->mColor[2].color, quad->mColor[3].color)
|
||||
// position
|
||||
position,
|
||||
// sourceRectangle
|
||||
&rect,
|
||||
// color
|
||||
color,
|
||||
// rotation
|
||||
angle,
|
||||
// origin
|
||||
origin,
|
||||
//scale
|
||||
scale
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
void JRenderer::RenderQuad(JQuad* quad, VertexColor* pt)
|
||||
{
|
||||
{/*
|
||||
float width = quad->mWidth;
|
||||
float height = quad->mHeight;
|
||||
float x = -quad->mHotSpotX;
|
||||
float y = quad->mHotSpotY;
|
||||
|
||||
mspriteBatchInstance->Draw(
|
||||
FXMVECTOR position = { 0, 0 };
|
||||
|
||||
FXMVECTOR origin = {
|
||||
-x, y, 0, 0
|
||||
};
|
||||
|
||||
FXMVECTOR color = {
|
||||
pt[0].color, pt[1].color, pt[2].color, pt[3].color
|
||||
};
|
||||
|
||||
RECT rect;
|
||||
rect.bottom = quad->mY + height;
|
||||
rect.top = quad->mY;
|
||||
rect.left = quad->mX;
|
||||
rect.right = quad->mX + width;
|
||||
|
||||
XMVECTOR scale = {1*GetActualWidth()/SCREEN_WIDTH_F, 1*GetActualHeight()/SCREEN_HEIGHT_F};
|
||||
|
||||
m_spriteBatch->Draw(
|
||||
quad->mTex->mTexId,
|
||||
float2(
|
||||
((pt[0].x)*GetActualWidth())/SCREEN_WIDTH_F,
|
||||
((pt[0].y)*GetActualHeight())/SCREEN_HEIGHT_F),
|
||||
PositionUnits::Pixels,
|
||||
float2(
|
||||
(width*GetActualWidth())/SCREEN_WIDTH_F,
|
||||
(height*GetActualHeight())/SCREEN_HEIGHT_F
|
||||
),
|
||||
SizeUnits::Pixels,
|
||||
float4(
|
||||
quad->mColor[0].r/255.0f,
|
||||
quad->mColor[0].g/255.0f,
|
||||
quad->mColor[0].b/255.0f,
|
||||
quad->mColor[0].a/255.0f),
|
||||
// position
|
||||
position,
|
||||
// sourceRectangle
|
||||
&rect,
|
||||
// color
|
||||
color,
|
||||
// rotation
|
||||
0,
|
||||
BlendMode::Alpha,
|
||||
float4(quad->mTX0, quad->mTX1, quad->mTY0, quad->mTY1),
|
||||
Vector4<unsigned int>(pt[0].color, pt[1].color, pt[2].color, pt[3].color)
|
||||
);
|
||||
// origin
|
||||
origin,
|
||||
//scale
|
||||
scale
|
||||
);*/
|
||||
}
|
||||
|
||||
|
||||
void JRenderer::FillRect(float x, float y, float width, float height, PIXEL_TYPE color)
|
||||
{
|
||||
{/*
|
||||
FXMVECTOR position = {
|
||||
((x)*GetActualWidth())/SCREEN_WIDTH_F, ((y)*GetActualHeight())/SCREEN_HEIGHT_F, 0, 0
|
||||
};
|
||||
|
||||
FXMVECTOR origin = {
|
||||
0, 0, 0, 0
|
||||
};
|
||||
|
||||
JColor col;
|
||||
col.color = color;
|
||||
|
||||
FXMVECTOR colorVector = {
|
||||
col.r/255.0f, col.g/255.0f, col.b/255.0f, col.a/255.0f
|
||||
};
|
||||
|
||||
RECT rect;
|
||||
rect.bottom = height;
|
||||
rect.top = 0;
|
||||
rect.left = 0;
|
||||
rect.right = width;
|
||||
|
||||
XMVECTOR scale = {GetActualWidth()/SCREEN_WIDTH_F, GetActualHeight()/SCREEN_HEIGHT_F};
|
||||
|
||||
m_spriteBatch->Draw(
|
||||
NULL,//quad->mTex->mTexId,
|
||||
// position
|
||||
position,
|
||||
// sourceRectangle
|
||||
&rect,
|
||||
// color
|
||||
colorVector,
|
||||
// rotation
|
||||
0,
|
||||
// origin
|
||||
origin,
|
||||
//scale
|
||||
scale
|
||||
);*/
|
||||
}
|
||||
|
||||
|
||||
@@ -1128,11 +1197,18 @@ void JRenderer::TransferTextureToGLContext(JTexture& inTexture)
|
||||
initData.SysMemSlicePitch = inTexture.mTexHeight*inTexture.mTexWidth*4;
|
||||
|
||||
ID3D11Texture2D* tex2D = nullptr;
|
||||
hr = m_d3dDevice->CreateTexture2D( &desc, &initData, &inTexture.mTexId);
|
||||
if( S_OK != hr)
|
||||
hr = m_d3dDevice->CreateTexture2D( &desc, &initData, &tex2D);
|
||||
if( FAILED(hr) || tex2D == 0)
|
||||
return;
|
||||
|
||||
mspriteBatchInstance->AddTexture(inTexture.mTexId);
|
||||
D3D11_SHADER_RESOURCE_VIEW_DESC SRVDesc;
|
||||
memset( &SRVDesc, 0, sizeof( SRVDesc ) );
|
||||
SRVDesc.Format = DXGI_FORMAT_R8G8B8A8_UNORM;
|
||||
SRVDesc.ViewDimension = D3D11_SRV_DIMENSION_TEXTURE2D;
|
||||
SRVDesc.Texture2D.MipLevels = 1;
|
||||
|
||||
hr = m_d3dDevice->CreateShaderResourceView( tex2D, &SRVDesc, &inTexture.mTexId );
|
||||
tex2D->Release();
|
||||
|
||||
delete [] inTexture.mBuffer;
|
||||
inTexture.mBuffer = NULL;
|
||||
|
||||
110
JGE/src/DirectX/PlatformHelpers.h
Normal file
@@ -0,0 +1,110 @@
|
||||
//--------------------------------------------------------------------------------------
|
||||
// File: PlatformHelpers.h
|
||||
//
|
||||
// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
|
||||
// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
|
||||
// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
|
||||
// PARTICULAR PURPOSE.
|
||||
//
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
//
|
||||
// http://go.microsoft.com/fwlink/?LinkId=248929
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
#pragma once
|
||||
|
||||
#pragma warning(disable : 4324 4481)
|
||||
|
||||
#include <exception>
|
||||
|
||||
|
||||
namespace DirectX
|
||||
{
|
||||
// Helper utility converts D3D API failures into exceptions.
|
||||
inline void ThrowIfFailed(HRESULT hr)
|
||||
{
|
||||
if (FAILED(hr))
|
||||
{
|
||||
throw std::exception();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Helper for output debug tracing
|
||||
inline void DebugTrace( _In_z_ _Printf_format_string_ const char* format, ... )
|
||||
{
|
||||
#ifdef _DEBUG
|
||||
va_list args;
|
||||
va_start( args, format );
|
||||
|
||||
char buff[1024]={0};
|
||||
vsprintf_s( buff, format, args );
|
||||
OutputDebugStringA( buff );
|
||||
#else
|
||||
UNREFERENCED_PARAMETER( format );
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
// Helper smart-pointers
|
||||
struct handle_closer { void operator()(HANDLE h) { if (h) CloseHandle(h); } };
|
||||
|
||||
typedef public std::unique_ptr<void, handle_closer> ScopedHandle;
|
||||
|
||||
inline HANDLE safe_handle( HANDLE h ) { return (h == INVALID_HANDLE_VALUE) ? 0 : h; }
|
||||
}
|
||||
|
||||
|
||||
#if (defined(_MSC_VER) && (_MSC_VER < 1610)) || defined(DIRECTX_EMULATE_MUTEX)
|
||||
|
||||
// Emulate the C++0x mutex and lock_guard types when building with Visual Studio versions < 2012.
|
||||
namespace std
|
||||
{
|
||||
class mutex
|
||||
{
|
||||
public:
|
||||
mutex() { InitializeCriticalSection(&mCriticalSection); }
|
||||
~mutex() { DeleteCriticalSection(&mCriticalSection); }
|
||||
|
||||
void lock() { EnterCriticalSection(&mCriticalSection); }
|
||||
void unlock() { LeaveCriticalSection(&mCriticalSection); }
|
||||
bool try_lock() { return TryEnterCriticalSection(&mCriticalSection) != 0; }
|
||||
|
||||
private:
|
||||
CRITICAL_SECTION mCriticalSection;
|
||||
|
||||
mutex(mutex const&);
|
||||
mutex& operator= (mutex const&);
|
||||
};
|
||||
|
||||
|
||||
template<typename Mutex>
|
||||
class lock_guard
|
||||
{
|
||||
public:
|
||||
typedef Mutex mutex_type;
|
||||
|
||||
explicit lock_guard(mutex_type& mutex)
|
||||
: mMutex(mutex)
|
||||
{
|
||||
mMutex.lock();
|
||||
}
|
||||
|
||||
~lock_guard()
|
||||
{
|
||||
mMutex.unlock();
|
||||
}
|
||||
|
||||
private:
|
||||
mutex_type& mMutex;
|
||||
|
||||
lock_guard(lock_guard const&);
|
||||
lock_guard& operator= (lock_guard const&);
|
||||
};
|
||||
}
|
||||
|
||||
#else // _MSC_VER < 1610
|
||||
|
||||
#include <mutex>
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,137 @@
|
||||
#if 0
|
||||
//
|
||||
// Generated by Microsoft (R) D3D Shader Disassembler
|
||||
//
|
||||
//
|
||||
// Input signature:
|
||||
//
|
||||
// Name Index Mask Register SysValue Format Used
|
||||
// -------------------- ----- ------ -------- -------- ------- ------
|
||||
// COLOR 0 xyzw 0 NONE float xyzw
|
||||
// TEXCOORD 0 xy 1 NONE float xy
|
||||
//
|
||||
//
|
||||
// Output signature:
|
||||
//
|
||||
// Name Index Mask Register SysValue Format Used
|
||||
// -------------------- ----- ------ -------- -------- ------- ------
|
||||
// SV_Target 0 xyzw 0 TARGET float xyzw
|
||||
//
|
||||
//
|
||||
// Sampler/Resource to DX9 shader sampler mappings:
|
||||
//
|
||||
// Target Sampler Source Sampler Source Resource
|
||||
// -------------- --------------- ----------------
|
||||
// s0 s0 t0
|
||||
//
|
||||
//
|
||||
// Level9 shader bytecode:
|
||||
//
|
||||
ps_2_0
|
||||
dcl t0
|
||||
dcl t1.xy
|
||||
dcl_2d s0
|
||||
texld r0, t1, s0
|
||||
mul r0, r0, t0
|
||||
mov oC0, r0
|
||||
|
||||
// approximately 3 instruction slots used (1 texture, 2 arithmetic)
|
||||
ps_4_0
|
||||
dcl_constantbuffer cb0[1], immediateIndexed
|
||||
dcl_sampler s0, mode_default
|
||||
dcl_resource_texture2d (float,float,float,float) t0
|
||||
dcl_input_ps linear v0.xyzw
|
||||
dcl_input_ps linear v1.xy
|
||||
dcl_output o0.xyzw
|
||||
dcl_temps 1
|
||||
sample r0.xyzw, v1.xyxx, t0.xyzw, s0
|
||||
mul o0.xyzw, r0.xyzw, v0.xyzw
|
||||
ret
|
||||
// Approximately 0 instruction slots used
|
||||
#endif
|
||||
|
||||
const BYTE SpriteEffect_SpritePixelShader[] =
|
||||
{
|
||||
68, 88, 66, 67, 62, 231,
|
||||
156, 88, 145, 159, 172, 51,
|
||||
164, 207, 207, 254, 124, 230,
|
||||
155, 106, 1, 0, 0, 0,
|
||||
232, 1, 0, 0, 4, 0,
|
||||
0, 0, 48, 0, 0, 0,
|
||||
184, 0, 0, 0, 100, 1,
|
||||
0, 0, 180, 1, 0, 0,
|
||||
65, 111, 110, 57, 128, 0,
|
||||
0, 0, 128, 0, 0, 0,
|
||||
0, 2, 255, 255, 88, 0,
|
||||
0, 0, 40, 0, 0, 0,
|
||||
0, 0, 40, 0, 0, 0,
|
||||
40, 0, 0, 0, 40, 0,
|
||||
1, 0, 36, 0, 0, 0,
|
||||
40, 0, 0, 0, 0, 0,
|
||||
0, 2, 255, 255, 31, 0,
|
||||
0, 2, 0, 0, 0, 128,
|
||||
0, 0, 15, 176, 31, 0,
|
||||
0, 2, 0, 0, 0, 128,
|
||||
1, 0, 3, 176, 31, 0,
|
||||
0, 2, 0, 0, 0, 144,
|
||||
0, 8, 15, 160, 66, 0,
|
||||
0, 3, 0, 0, 15, 128,
|
||||
1, 0, 228, 176, 0, 8,
|
||||
228, 160, 5, 0, 0, 3,
|
||||
0, 0, 15, 128, 0, 0,
|
||||
228, 128, 0, 0, 228, 176,
|
||||
1, 0, 0, 2, 0, 8,
|
||||
15, 128, 0, 0, 228, 128,
|
||||
255, 255, 0, 0, 83, 72,
|
||||
68, 82, 164, 0, 0, 0,
|
||||
64, 0, 0, 0, 41, 0,
|
||||
0, 0, 89, 0, 0, 4,
|
||||
70, 142, 32, 0, 0, 0,
|
||||
0, 0, 1, 0, 0, 0,
|
||||
90, 0, 0, 3, 0, 96,
|
||||
16, 0, 0, 0, 0, 0,
|
||||
88, 24, 0, 4, 0, 112,
|
||||
16, 0, 0, 0, 0, 0,
|
||||
85, 85, 0, 0, 98, 16,
|
||||
0, 3, 242, 16, 16, 0,
|
||||
0, 0, 0, 0, 98, 16,
|
||||
0, 3, 50, 16, 16, 0,
|
||||
1, 0, 0, 0, 101, 0,
|
||||
0, 3, 242, 32, 16, 0,
|
||||
0, 0, 0, 0, 104, 0,
|
||||
0, 2, 1, 0, 0, 0,
|
||||
69, 0, 0, 9, 242, 0,
|
||||
16, 0, 0, 0, 0, 0,
|
||||
70, 16, 16, 0, 1, 0,
|
||||
0, 0, 70, 126, 16, 0,
|
||||
0, 0, 0, 0, 0, 96,
|
||||
16, 0, 0, 0, 0, 0,
|
||||
56, 0, 0, 7, 242, 32,
|
||||
16, 0, 0, 0, 0, 0,
|
||||
70, 14, 16, 0, 0, 0,
|
||||
0, 0, 70, 30, 16, 0,
|
||||
0, 0, 0, 0, 62, 0,
|
||||
0, 1, 73, 83, 71, 78,
|
||||
72, 0, 0, 0, 2, 0,
|
||||
0, 0, 8, 0, 0, 0,
|
||||
56, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
3, 0, 0, 0, 0, 0,
|
||||
0, 0, 15, 15, 0, 0,
|
||||
62, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
3, 0, 0, 0, 1, 0,
|
||||
0, 0, 3, 3, 0, 0,
|
||||
67, 79, 76, 79, 82, 0,
|
||||
84, 69, 88, 67, 79, 79,
|
||||
82, 68, 0, 171, 79, 83,
|
||||
71, 78, 44, 0, 0, 0,
|
||||
1, 0, 0, 0, 8, 0,
|
||||
0, 0, 32, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
0, 0, 3, 0, 0, 0,
|
||||
0, 0, 0, 0, 15, 0,
|
||||
0, 0, 83, 86, 95, 84,
|
||||
97, 114, 103, 101, 116, 0,
|
||||
171, 171
|
||||
};
|
||||
@@ -0,0 +1,213 @@
|
||||
#if 0
|
||||
//
|
||||
// Generated by Microsoft (R) D3D Shader Disassembler
|
||||
//
|
||||
//
|
||||
// Input signature:
|
||||
//
|
||||
// Name Index Mask Register SysValue Format Used
|
||||
// -------------------- ----- ------ -------- -------- ------- ------
|
||||
// COLOR 0 xyzw 0 NONE float xyzw
|
||||
// TEXCOORD 0 xy 1 NONE float xy
|
||||
// SV_Position 0 xyzw 2 NONE float xyzw
|
||||
//
|
||||
//
|
||||
// Output signature:
|
||||
//
|
||||
// Name Index Mask Register SysValue Format Used
|
||||
// -------------------- ----- ------ -------- -------- ------- ------
|
||||
// COLOR 0 xyzw 0 NONE float xyzw
|
||||
// TEXCOORD 0 xy 1 NONE float xy
|
||||
// SV_Position 0 xyzw 2 POS float xyzw
|
||||
//
|
||||
//
|
||||
// Constant buffer to DX9 shader constant mappings:
|
||||
//
|
||||
// Target Reg Buffer Start Reg # of Regs Data Conversion
|
||||
// ---------- ------- --------- --------- ----------------------
|
||||
// c1 cb0 0 4 ( FLT, FLT, FLT, FLT)
|
||||
//
|
||||
//
|
||||
// Runtime generated constant mappings:
|
||||
//
|
||||
// Target Reg Constant Description
|
||||
// ---------- --------------------------------------------------
|
||||
// c0 Vertex Shader position offset
|
||||
//
|
||||
//
|
||||
// Level9 shader bytecode:
|
||||
//
|
||||
vs_2_0
|
||||
dcl_texcoord v0
|
||||
dcl_texcoord1 v1
|
||||
dcl_texcoord2 v2
|
||||
mul r0, v2.y, c2
|
||||
mad r0, v2.x, c1, r0
|
||||
mad r0, v2.z, c3, r0
|
||||
mad r0, v2.w, c4, r0
|
||||
mad oPos.xy, r0.w, c0, r0
|
||||
mov oPos.zw, r0
|
||||
mov oT0, v0
|
||||
mov oT1.xy, v1
|
||||
|
||||
// approximately 8 instruction slots used
|
||||
vs_4_0
|
||||
dcl_constantbuffer cb0[4], immediateIndexed
|
||||
dcl_input v0.xyzw
|
||||
dcl_input v1.xy
|
||||
dcl_input v2.xyzw
|
||||
dcl_output o0.xyzw
|
||||
dcl_output o1.xy
|
||||
dcl_output_siv o2.xyzw, position
|
||||
dcl_temps 1
|
||||
mov o0.xyzw, v0.xyzw
|
||||
mov o1.xy, v1.xyxx
|
||||
mul r0.xyzw, v2.yyyy, cb0[1].xyzw
|
||||
mad r0.xyzw, v2.xxxx, cb0[0].xyzw, r0.xyzw
|
||||
mad r0.xyzw, v2.zzzz, cb0[2].xyzw, r0.xyzw
|
||||
mad o2.xyzw, v2.wwww, cb0[3].xyzw, r0.xyzw
|
||||
ret
|
||||
// Approximately 0 instruction slots used
|
||||
#endif
|
||||
|
||||
const BYTE SpriteEffect_SpriteVertexShader[] =
|
||||
{
|
||||
68, 88, 66, 67, 53, 15,
|
||||
108, 68, 10, 30, 79, 231,
|
||||
153, 9, 61, 10, 198, 154,
|
||||
8, 125, 1, 0, 0, 0,
|
||||
60, 3, 0, 0, 4, 0,
|
||||
0, 0, 48, 0, 0, 0,
|
||||
28, 1, 0, 0, 84, 2,
|
||||
0, 0, 200, 2, 0, 0,
|
||||
65, 111, 110, 57, 228, 0,
|
||||
0, 0, 228, 0, 0, 0,
|
||||
0, 2, 254, 255, 176, 0,
|
||||
0, 0, 52, 0, 0, 0,
|
||||
1, 0, 36, 0, 0, 0,
|
||||
48, 0, 0, 0, 48, 0,
|
||||
0, 0, 36, 0, 1, 0,
|
||||
48, 0, 0, 0, 0, 0,
|
||||
4, 0, 1, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
0, 2, 254, 255, 31, 0,
|
||||
0, 2, 5, 0, 0, 128,
|
||||
0, 0, 15, 144, 31, 0,
|
||||
0, 2, 5, 0, 1, 128,
|
||||
1, 0, 15, 144, 31, 0,
|
||||
0, 2, 5, 0, 2, 128,
|
||||
2, 0, 15, 144, 5, 0,
|
||||
0, 3, 0, 0, 15, 128,
|
||||
2, 0, 85, 144, 2, 0,
|
||||
228, 160, 4, 0, 0, 4,
|
||||
0, 0, 15, 128, 2, 0,
|
||||
0, 144, 1, 0, 228, 160,
|
||||
0, 0, 228, 128, 4, 0,
|
||||
0, 4, 0, 0, 15, 128,
|
||||
2, 0, 170, 144, 3, 0,
|
||||
228, 160, 0, 0, 228, 128,
|
||||
4, 0, 0, 4, 0, 0,
|
||||
15, 128, 2, 0, 255, 144,
|
||||
4, 0, 228, 160, 0, 0,
|
||||
228, 128, 4, 0, 0, 4,
|
||||
0, 0, 3, 192, 0, 0,
|
||||
255, 128, 0, 0, 228, 160,
|
||||
0, 0, 228, 128, 1, 0,
|
||||
0, 2, 0, 0, 12, 192,
|
||||
0, 0, 228, 128, 1, 0,
|
||||
0, 2, 0, 0, 15, 224,
|
||||
0, 0, 228, 144, 1, 0,
|
||||
0, 2, 1, 0, 3, 224,
|
||||
1, 0, 228, 144, 255, 255,
|
||||
0, 0, 83, 72, 68, 82,
|
||||
48, 1, 0, 0, 64, 0,
|
||||
1, 0, 76, 0, 0, 0,
|
||||
89, 0, 0, 4, 70, 142,
|
||||
32, 0, 0, 0, 0, 0,
|
||||
4, 0, 0, 0, 95, 0,
|
||||
0, 3, 242, 16, 16, 0,
|
||||
0, 0, 0, 0, 95, 0,
|
||||
0, 3, 50, 16, 16, 0,
|
||||
1, 0, 0, 0, 95, 0,
|
||||
0, 3, 242, 16, 16, 0,
|
||||
2, 0, 0, 0, 101, 0,
|
||||
0, 3, 242, 32, 16, 0,
|
||||
0, 0, 0, 0, 101, 0,
|
||||
0, 3, 50, 32, 16, 0,
|
||||
1, 0, 0, 0, 103, 0,
|
||||
0, 4, 242, 32, 16, 0,
|
||||
2, 0, 0, 0, 1, 0,
|
||||
0, 0, 104, 0, 0, 2,
|
||||
1, 0, 0, 0, 54, 0,
|
||||
0, 5, 242, 32, 16, 0,
|
||||
0, 0, 0, 0, 70, 30,
|
||||
16, 0, 0, 0, 0, 0,
|
||||
54, 0, 0, 5, 50, 32,
|
||||
16, 0, 1, 0, 0, 0,
|
||||
70, 16, 16, 0, 1, 0,
|
||||
0, 0, 56, 0, 0, 8,
|
||||
242, 0, 16, 0, 0, 0,
|
||||
0, 0, 86, 21, 16, 0,
|
||||
2, 0, 0, 0, 70, 142,
|
||||
32, 0, 0, 0, 0, 0,
|
||||
1, 0, 0, 0, 50, 0,
|
||||
0, 10, 242, 0, 16, 0,
|
||||
0, 0, 0, 0, 6, 16,
|
||||
16, 0, 2, 0, 0, 0,
|
||||
70, 142, 32, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
70, 14, 16, 0, 0, 0,
|
||||
0, 0, 50, 0, 0, 10,
|
||||
242, 0, 16, 0, 0, 0,
|
||||
0, 0, 166, 26, 16, 0,
|
||||
2, 0, 0, 0, 70, 142,
|
||||
32, 0, 0, 0, 0, 0,
|
||||
2, 0, 0, 0, 70, 14,
|
||||
16, 0, 0, 0, 0, 0,
|
||||
50, 0, 0, 10, 242, 32,
|
||||
16, 0, 2, 0, 0, 0,
|
||||
246, 31, 16, 0, 2, 0,
|
||||
0, 0, 70, 142, 32, 0,
|
||||
0, 0, 0, 0, 3, 0,
|
||||
0, 0, 70, 14, 16, 0,
|
||||
0, 0, 0, 0, 62, 0,
|
||||
0, 1, 73, 83, 71, 78,
|
||||
108, 0, 0, 0, 3, 0,
|
||||
0, 0, 8, 0, 0, 0,
|
||||
80, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
3, 0, 0, 0, 0, 0,
|
||||
0, 0, 15, 15, 0, 0,
|
||||
86, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
3, 0, 0, 0, 1, 0,
|
||||
0, 0, 3, 3, 0, 0,
|
||||
95, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
3, 0, 0, 0, 2, 0,
|
||||
0, 0, 15, 15, 0, 0,
|
||||
67, 79, 76, 79, 82, 0,
|
||||
84, 69, 88, 67, 79, 79,
|
||||
82, 68, 0, 83, 86, 95,
|
||||
80, 111, 115, 105, 116, 105,
|
||||
111, 110, 0, 171, 79, 83,
|
||||
71, 78, 108, 0, 0, 0,
|
||||
3, 0, 0, 0, 8, 0,
|
||||
0, 0, 80, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
0, 0, 3, 0, 0, 0,
|
||||
0, 0, 0, 0, 15, 0,
|
||||
0, 0, 86, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
0, 0, 3, 0, 0, 0,
|
||||
1, 0, 0, 0, 3, 12,
|
||||
0, 0, 95, 0, 0, 0,
|
||||
0, 0, 0, 0, 1, 0,
|
||||
0, 0, 3, 0, 0, 0,
|
||||
2, 0, 0, 0, 15, 0,
|
||||
0, 0, 67, 79, 76, 79,
|
||||
82, 0, 84, 69, 88, 67,
|
||||
79, 79, 82, 68, 0, 83,
|
||||
86, 95, 80, 111, 115, 105,
|
||||
116, 105, 111, 110, 0, 171
|
||||
};
|
||||
108
JGE/src/DirectX/SharedResourcePool.h
Normal file
@@ -0,0 +1,108 @@
|
||||
//--------------------------------------------------------------------------------------
|
||||
// File: SharedResourcePool.h
|
||||
//
|
||||
// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
|
||||
// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
|
||||
// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
|
||||
// PARTICULAR PURPOSE.
|
||||
//
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
//
|
||||
// http://go.microsoft.com/fwlink/?LinkId=248929
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <map>
|
||||
#include <memory>
|
||||
|
||||
#include "PlatformHelpers.h"
|
||||
|
||||
|
||||
namespace DirectX
|
||||
{
|
||||
// Pool manager ensures that only a single TData instance is created for each unique TKey.
|
||||
// This is used to avoid duplicate resource creation, so that for instance a caller can
|
||||
// create any number of SpriteBatch instances, but these can internally share shaders and
|
||||
// vertex buffer if more than one SpriteBatch uses the same underlying D3D device.
|
||||
template<typename TKey, typename TData>
|
||||
class SharedResourcePool
|
||||
{
|
||||
public:
|
||||
SharedResourcePool()
|
||||
: mResourceMap(std::make_shared<ResourceMap>())
|
||||
{ }
|
||||
|
||||
|
||||
// Allocates or looks up the shared TData instance for the specified key.
|
||||
std::shared_ptr<TData> DemandCreate(TKey key)
|
||||
{
|
||||
std::lock_guard<std::mutex> lock(mResourceMap->mutex);
|
||||
|
||||
// Return an existing instance?
|
||||
auto pos = mResourceMap->find(key);
|
||||
|
||||
if (pos != mResourceMap->end())
|
||||
{
|
||||
auto existingValue = pos->second.lock();
|
||||
|
||||
if (existingValue)
|
||||
return existingValue;
|
||||
else
|
||||
mResourceMap->erase(pos);
|
||||
}
|
||||
|
||||
// Allocate a new instance.
|
||||
auto newValue = std::make_shared<WrappedData>(key, mResourceMap);
|
||||
|
||||
mResourceMap->insert(std::make_pair(key, newValue));
|
||||
|
||||
return newValue;
|
||||
}
|
||||
|
||||
|
||||
private:
|
||||
// Keep track of all allocated TData instances.
|
||||
struct ResourceMap : public std::map<TKey, std::weak_ptr<TData>>
|
||||
{
|
||||
std::mutex mutex;
|
||||
};
|
||||
|
||||
std::shared_ptr<ResourceMap> mResourceMap;
|
||||
|
||||
|
||||
// Wrap TData with our own subclass, so we can hook the destructor
|
||||
// to remove instances from our pool before they are freed.
|
||||
struct WrappedData : public TData
|
||||
{
|
||||
WrappedData(TKey key, std::shared_ptr<ResourceMap> const& resourceMap)
|
||||
: mKey(key),
|
||||
mResourceMap(resourceMap),
|
||||
TData(key)
|
||||
{ }
|
||||
|
||||
~WrappedData()
|
||||
{
|
||||
std::lock_guard<std::mutex> lock(mResourceMap->mutex);
|
||||
|
||||
auto pos = mResourceMap->find(mKey);
|
||||
|
||||
// Check for weak reference expiry before erasing, in case DemandCreate runs on
|
||||
// a different thread at the same time as a previous instance is being destroyed.
|
||||
// We mustn't erase replacement objects that have just been added!
|
||||
if (pos != mResourceMap->end() && pos->second.expired())
|
||||
{
|
||||
mResourceMap->erase(pos);
|
||||
}
|
||||
}
|
||||
|
||||
TKey mKey;
|
||||
std::shared_ptr<ResourceMap> mResourceMap;
|
||||
};
|
||||
|
||||
|
||||
// Prevent copying.
|
||||
SharedResourcePool(SharedResourcePool const&);
|
||||
SharedResourcePool& operator= (SharedResourcePool const&);
|
||||
};
|
||||
}
|
||||
1086
JGE/src/DirectX/SpriteBatch.cpp
Normal file
110
JGE/src/DirectX/SpriteBatch.h
Normal file
@@ -0,0 +1,110 @@
|
||||
//--------------------------------------------------------------------------------------
|
||||
// File: SpriteBatch.h
|
||||
//
|
||||
// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
|
||||
// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
|
||||
// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
|
||||
// PARTICULAR PURPOSE.
|
||||
//
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
//
|
||||
// http://go.microsoft.com/fwlink/?LinkId=248929
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
#pragma once
|
||||
|
||||
#if defined(_XBOX_ONE) && defined(_TITLE)
|
||||
#include <d3d11_x.h>
|
||||
#else
|
||||
#include <d3d11_1.h>
|
||||
#endif
|
||||
|
||||
#include <DirectXMath.h>
|
||||
#include <DirectXColors.h>
|
||||
#include <functional>
|
||||
#include <memory>
|
||||
|
||||
// VS 2010 doesn't support explicit calling convention for std::function
|
||||
#ifndef DIRECTX_STD_CALLCONV
|
||||
#if defined(_MSC_VER) && (_MSC_VER < 1700)
|
||||
#define DIRECTX_STD_CALLCONV
|
||||
#else
|
||||
#define DIRECTX_STD_CALLCONV __cdecl
|
||||
#endif
|
||||
#endif
|
||||
|
||||
namespace DirectX
|
||||
{
|
||||
#if (DIRECTX_MATH_VERSION < 305) && !defined(XM_CALLCONV)
|
||||
#define XM_CALLCONV __fastcall
|
||||
typedef const XMVECTOR& HXMVECTOR;
|
||||
typedef const XMMATRIX& FXMMATRIX;
|
||||
#endif
|
||||
|
||||
enum SpriteSortMode
|
||||
{
|
||||
SpriteSortMode_Deferred,
|
||||
SpriteSortMode_Immediate,
|
||||
SpriteSortMode_Texture,
|
||||
SpriteSortMode_BackToFront,
|
||||
SpriteSortMode_FrontToBack,
|
||||
};
|
||||
|
||||
|
||||
enum SpriteEffects
|
||||
{
|
||||
SpriteEffects_None = 0,
|
||||
SpriteEffects_FlipHorizontally = 1,
|
||||
SpriteEffects_FlipVertically = 2,
|
||||
SpriteEffects_FlipBoth = SpriteEffects_FlipHorizontally | SpriteEffects_FlipVertically,
|
||||
};
|
||||
|
||||
|
||||
class SpriteBatch
|
||||
{
|
||||
public:
|
||||
explicit SpriteBatch(_In_ ID3D11DeviceContext* deviceContext);
|
||||
SpriteBatch(SpriteBatch&& moveFrom);
|
||||
SpriteBatch& operator= (SpriteBatch&& moveFrom);
|
||||
virtual ~SpriteBatch();
|
||||
|
||||
// Begin/End a batch of sprite drawing operations.
|
||||
void XM_CALLCONV Begin(SpriteSortMode sortMode = SpriteSortMode_Deferred, _In_opt_ ID3D11BlendState* blendState = nullptr, _In_opt_ ID3D11SamplerState* samplerState = nullptr, _In_opt_ ID3D11DepthStencilState* depthStencilState = nullptr, _In_opt_ ID3D11RasterizerState* rasterizerState = nullptr,
|
||||
_In_opt_ std::function<void DIRECTX_STD_CALLCONV()> setCustomShaders = nullptr, FXMMATRIX transformMatrix = MatrixIdentity);
|
||||
void __cdecl End();
|
||||
|
||||
// Draw overloads specifying position, origin and scale as XMFLOAT2.
|
||||
void XM_CALLCONV Draw(_In_ ID3D11ShaderResourceView* texture, XMFLOAT2 const& position, FXMVECTOR color = Colors::White);
|
||||
void XM_CALLCONV Draw(_In_ ID3D11ShaderResourceView* texture, XMFLOAT2 const& position, _In_opt_ RECT const* sourceRectangle, FXMVECTOR color = Colors::White, float rotation = 0, XMFLOAT2 const& origin = Float2Zero, float scale = 1, SpriteEffects effects = SpriteEffects_None, float layerDepth = 0);
|
||||
void XM_CALLCONV Draw(_In_ ID3D11ShaderResourceView* texture, XMFLOAT2 const& position, _In_opt_ RECT const* sourceRectangle, FXMVECTOR color, float rotation, XMFLOAT2 const& origin, XMFLOAT2 const& scale, SpriteEffects effects = SpriteEffects_None, float layerDepth = 0);
|
||||
|
||||
// Draw overloads specifying position, origin and scale via the first two components of an XMVECTOR.
|
||||
void XM_CALLCONV Draw(_In_ ID3D11ShaderResourceView* texture, FXMVECTOR position, FXMVECTOR color = Colors::White);
|
||||
void XM_CALLCONV Draw(_In_ ID3D11ShaderResourceView* texture, FXMVECTOR position, _In_opt_ RECT const* sourceRectangle, FXMVECTOR color = Colors::White, float rotation = 0, FXMVECTOR origin = g_XMZero, float scale = 1, SpriteEffects effects = SpriteEffects_None, float layerDepth = 0);
|
||||
void XM_CALLCONV Draw(_In_ ID3D11ShaderResourceView* texture, FXMVECTOR position, _In_opt_ RECT const* sourceRectangle, FXMVECTOR color, float rotation, FXMVECTOR origin, GXMVECTOR scale, SpriteEffects effects = SpriteEffects_None, float layerDepth = 0);
|
||||
|
||||
// Draw overloads specifying position as a RECT.
|
||||
void XM_CALLCONV Draw(_In_ ID3D11ShaderResourceView* texture, RECT const& destinationRectangle, FXMVECTOR color = Colors::White);
|
||||
void XM_CALLCONV Draw(_In_ ID3D11ShaderResourceView* texture, RECT const& destinationRectangle, _In_opt_ RECT const* sourceRectangle, FXMVECTOR color = Colors::White, float rotation = 0, XMFLOAT2 const& origin = Float2Zero, SpriteEffects effects = SpriteEffects_None, float layerDepth = 0);
|
||||
|
||||
// Rotation mode to be applied to the sprite transformation
|
||||
void __cdecl SetRotation( DXGI_MODE_ROTATION mode );
|
||||
DXGI_MODE_ROTATION __cdecl GetRotation() const;
|
||||
|
||||
// Set viewport for sprite transformation
|
||||
void __cdecl SetViewport( const D3D11_VIEWPORT& viewPort );
|
||||
|
||||
private:
|
||||
// Private implementation.
|
||||
class Impl;
|
||||
|
||||
std::unique_ptr<Impl> pImpl;
|
||||
|
||||
static const XMMATRIX MatrixIdentity;
|
||||
static const XMFLOAT2 Float2Zero;
|
||||
|
||||
// Prevent copying.
|
||||
SpriteBatch(SpriteBatch const&);
|
||||
SpriteBatch& operator= (SpriteBatch const&);
|
||||
};
|
||||
}
|
||||
166
JGE/src/DirectX/VertexTypes.cpp
Normal file
@@ -0,0 +1,166 @@
|
||||
//--------------------------------------------------------------------------------------
|
||||
// File: VertexTypes.cpp
|
||||
//
|
||||
// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
|
||||
// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
|
||||
// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
|
||||
// PARTICULAR PURPOSE.
|
||||
//
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
//
|
||||
// http://go.microsoft.com/fwlink/?LinkId=248929
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
//#include "pch.h"
|
||||
#if !defined(WIN32_LEAN_AND_MEAN)
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#endif
|
||||
|
||||
#if !defined(NOMINMAX)
|
||||
#define NOMINMAX
|
||||
#endif
|
||||
|
||||
#include <wrl.h>
|
||||
#include <wrl/client.h>
|
||||
using namespace Microsoft::WRL;
|
||||
#include "VertexTypes.h"
|
||||
|
||||
#include <DirectXPackedVector.h>
|
||||
|
||||
using namespace DirectX;
|
||||
using namespace DirectX::PackedVector;
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------
|
||||
// Vertex struct holding position and color information.
|
||||
const D3D11_INPUT_ELEMENT_DESC VertexPositionColor::InputElements[] =
|
||||
{
|
||||
{ "SV_Position", 0, DXGI_FORMAT_R32G32B32_FLOAT, 0, D3D11_APPEND_ALIGNED_ELEMENT, D3D11_INPUT_PER_VERTEX_DATA, 0 },
|
||||
{ "COLOR", 0, DXGI_FORMAT_R32G32B32A32_FLOAT, 0, D3D11_APPEND_ALIGNED_ELEMENT, D3D11_INPUT_PER_VERTEX_DATA, 0 },
|
||||
};
|
||||
|
||||
static_assert( sizeof(VertexPositionColor) == 28, "Vertex struct/layout mismatch" );
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------
|
||||
// Vertex struct holding position and texture mapping information.
|
||||
const D3D11_INPUT_ELEMENT_DESC VertexPositionTexture::InputElements[] =
|
||||
{
|
||||
{ "SV_Position", 0, DXGI_FORMAT_R32G32B32_FLOAT, 0, D3D11_APPEND_ALIGNED_ELEMENT, D3D11_INPUT_PER_VERTEX_DATA, 0 },
|
||||
{ "TEXCOORD", 0, DXGI_FORMAT_R32G32_FLOAT, 0, D3D11_APPEND_ALIGNED_ELEMENT, D3D11_INPUT_PER_VERTEX_DATA, 0 },
|
||||
};
|
||||
|
||||
static_assert( sizeof(VertexPositionTexture) == 20, "Vertex struct/layout mismatch" );
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------
|
||||
// Vertex struct holding position and normal vector.
|
||||
const D3D11_INPUT_ELEMENT_DESC VertexPositionNormal::InputElements[] =
|
||||
{
|
||||
{ "SV_Position", 0, DXGI_FORMAT_R32G32B32_FLOAT, 0, D3D11_APPEND_ALIGNED_ELEMENT, D3D11_INPUT_PER_VERTEX_DATA, 0 },
|
||||
{ "NORMAL", 0, DXGI_FORMAT_R32G32B32_FLOAT, 0, D3D11_APPEND_ALIGNED_ELEMENT, D3D11_INPUT_PER_VERTEX_DATA, 0 },
|
||||
};
|
||||
|
||||
static_assert( sizeof(VertexPositionNormal) == 24, "Vertex struct/layout mismatch" );
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------
|
||||
// Vertex struct holding position, color, and texture mapping information.
|
||||
const D3D11_INPUT_ELEMENT_DESC VertexPositionColorTexture::InputElements[] =
|
||||
{
|
||||
{ "SV_Position", 0, DXGI_FORMAT_R32G32B32_FLOAT, 0, D3D11_APPEND_ALIGNED_ELEMENT, D3D11_INPUT_PER_VERTEX_DATA, 0 },
|
||||
{ "COLOR", 0, DXGI_FORMAT_R32G32B32A32_FLOAT, 0, D3D11_APPEND_ALIGNED_ELEMENT, D3D11_INPUT_PER_VERTEX_DATA, 0 },
|
||||
{ "TEXCOORD", 0, DXGI_FORMAT_R32G32_FLOAT, 0, D3D11_APPEND_ALIGNED_ELEMENT, D3D11_INPUT_PER_VERTEX_DATA, 0 },
|
||||
};
|
||||
|
||||
static_assert( sizeof(VertexPositionColorTexture) == 36, "Vertex struct/layout mismatch" );
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------
|
||||
// Vertex struct holding position, normal vector, and color information.
|
||||
const D3D11_INPUT_ELEMENT_DESC VertexPositionNormalColor::InputElements[] =
|
||||
{
|
||||
{ "SV_Position", 0, DXGI_FORMAT_R32G32B32_FLOAT, 0, D3D11_APPEND_ALIGNED_ELEMENT, D3D11_INPUT_PER_VERTEX_DATA, 0 },
|
||||
{ "NORMAL", 0, DXGI_FORMAT_R32G32B32_FLOAT, 0, D3D11_APPEND_ALIGNED_ELEMENT, D3D11_INPUT_PER_VERTEX_DATA, 0 },
|
||||
{ "COLOR", 0, DXGI_FORMAT_R32G32B32A32_FLOAT, 0, D3D11_APPEND_ALIGNED_ELEMENT, D3D11_INPUT_PER_VERTEX_DATA, 0 },
|
||||
};
|
||||
|
||||
static_assert( sizeof(VertexPositionNormalColor) == 40, "Vertex struct/layout mismatch" );
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------
|
||||
// Vertex struct holding position, normal vector, and texture mapping information.
|
||||
const D3D11_INPUT_ELEMENT_DESC VertexPositionNormalTexture::InputElements[] =
|
||||
{
|
||||
{ "SV_Position", 0, DXGI_FORMAT_R32G32B32_FLOAT, 0, D3D11_APPEND_ALIGNED_ELEMENT, D3D11_INPUT_PER_VERTEX_DATA, 0 },
|
||||
{ "NORMAL", 0, DXGI_FORMAT_R32G32B32_FLOAT, 0, D3D11_APPEND_ALIGNED_ELEMENT, D3D11_INPUT_PER_VERTEX_DATA, 0 },
|
||||
{ "TEXCOORD", 0, DXGI_FORMAT_R32G32_FLOAT, 0, D3D11_APPEND_ALIGNED_ELEMENT, D3D11_INPUT_PER_VERTEX_DATA, 0 },
|
||||
};
|
||||
|
||||
static_assert( sizeof(VertexPositionNormalTexture) == 32, "Vertex struct/layout mismatch" );
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------
|
||||
// Vertex struct holding position, normal vector, color, and texture mapping information.
|
||||
const D3D11_INPUT_ELEMENT_DESC VertexPositionNormalColorTexture::InputElements[] =
|
||||
{
|
||||
{ "SV_Position", 0, DXGI_FORMAT_R32G32B32_FLOAT, 0, D3D11_APPEND_ALIGNED_ELEMENT, D3D11_INPUT_PER_VERTEX_DATA, 0 },
|
||||
{ "NORMAL", 0, DXGI_FORMAT_R32G32B32_FLOAT, 0, D3D11_APPEND_ALIGNED_ELEMENT, D3D11_INPUT_PER_VERTEX_DATA, 0 },
|
||||
{ "COLOR", 0, DXGI_FORMAT_R32G32B32A32_FLOAT, 0, D3D11_APPEND_ALIGNED_ELEMENT, D3D11_INPUT_PER_VERTEX_DATA, 0 },
|
||||
{ "TEXCOORD", 0, DXGI_FORMAT_R32G32_FLOAT, 0, D3D11_APPEND_ALIGNED_ELEMENT, D3D11_INPUT_PER_VERTEX_DATA, 0 },
|
||||
};
|
||||
|
||||
static_assert( sizeof(VertexPositionNormalColorTexture) == 48, "Vertex struct/layout mismatch" );
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------
|
||||
// Vertex struct for Visual Studio Shader Designer (DGSL) holding position, normal,
|
||||
// tangent, color (RGBA), and texture mapping information
|
||||
const D3D11_INPUT_ELEMENT_DESC VertexPositionNormalTangentColorTexture::InputElements[] =
|
||||
{
|
||||
{ "SV_Position", 0, DXGI_FORMAT_R32G32B32_FLOAT, 0, D3D11_APPEND_ALIGNED_ELEMENT, D3D11_INPUT_PER_VERTEX_DATA, 0 },
|
||||
{ "NORMAL", 0, DXGI_FORMAT_R32G32B32_FLOAT, 0, D3D11_APPEND_ALIGNED_ELEMENT, D3D11_INPUT_PER_VERTEX_DATA, 0 },
|
||||
{ "TANGENT", 0, DXGI_FORMAT_R32G32B32A32_FLOAT, 0, D3D11_APPEND_ALIGNED_ELEMENT, D3D11_INPUT_PER_VERTEX_DATA, 0 },
|
||||
{ "COLOR", 0, DXGI_FORMAT_R8G8B8A8_UNORM, 0, D3D11_APPEND_ALIGNED_ELEMENT, D3D11_INPUT_PER_VERTEX_DATA, 0 },
|
||||
{ "TEXCOORD", 0, DXGI_FORMAT_R32G32_FLOAT, 0, D3D11_APPEND_ALIGNED_ELEMENT, D3D11_INPUT_PER_VERTEX_DATA, 0 },
|
||||
};
|
||||
|
||||
static_assert( sizeof(VertexPositionNormalTangentColorTexture) == 52, "Vertex struct/layout mismatch" );
|
||||
|
||||
void XM_CALLCONV VertexPositionNormalTangentColorTexture::SetColor( FXMVECTOR icolor )
|
||||
{
|
||||
XMUBYTEN4 rgba;
|
||||
XMStoreUByteN4( &rgba, icolor );
|
||||
this->color = rgba.v;
|
||||
}
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------
|
||||
// Vertex struct for Visual Studio Shader Designer (DGSL) holding position, normal,
|
||||
// tangent, color (RGBA), texture mapping information, and skinning weights
|
||||
const D3D11_INPUT_ELEMENT_DESC VertexPositionNormalTangentColorTextureSkinning::InputElements[] =
|
||||
{
|
||||
{ "SV_Position", 0, DXGI_FORMAT_R32G32B32_FLOAT, 0, D3D11_APPEND_ALIGNED_ELEMENT, D3D11_INPUT_PER_VERTEX_DATA, 0 },
|
||||
{ "NORMAL", 0, DXGI_FORMAT_R32G32B32_FLOAT, 0, D3D11_APPEND_ALIGNED_ELEMENT, D3D11_INPUT_PER_VERTEX_DATA, 0 },
|
||||
{ "TANGENT", 0, DXGI_FORMAT_R32G32B32A32_FLOAT, 0, D3D11_APPEND_ALIGNED_ELEMENT, D3D11_INPUT_PER_VERTEX_DATA, 0 },
|
||||
{ "COLOR", 0, DXGI_FORMAT_R8G8B8A8_UNORM, 0, D3D11_APPEND_ALIGNED_ELEMENT, D3D11_INPUT_PER_VERTEX_DATA, 0 },
|
||||
{ "TEXCOORD", 0, DXGI_FORMAT_R32G32_FLOAT, 0, D3D11_APPEND_ALIGNED_ELEMENT, D3D11_INPUT_PER_VERTEX_DATA, 0 },
|
||||
{ "BLENDINDICES",0, DXGI_FORMAT_R8G8B8A8_UINT, 0, D3D11_APPEND_ALIGNED_ELEMENT, D3D11_INPUT_PER_VERTEX_DATA, 0 },
|
||||
{ "BLENDWEIGHT", 0, DXGI_FORMAT_R8G8B8A8_UNORM, 0, D3D11_APPEND_ALIGNED_ELEMENT, D3D11_INPUT_PER_VERTEX_DATA, 0 },
|
||||
};
|
||||
|
||||
static_assert( VertexPositionNormalTangentColorTextureSkinning::InputElementCount == VertexPositionNormalTangentColorTexture::InputElementCount + 2, "layout mismatch");
|
||||
|
||||
static_assert( sizeof(VertexPositionNormalTangentColorTextureSkinning) == 60, "Vertex struct/layout mismatch" );
|
||||
|
||||
void VertexPositionNormalTangentColorTextureSkinning::SetBlendIndices( XMUINT4 const& iindices )
|
||||
{
|
||||
this->indices = ( (iindices.w & 0xff) << 24 ) | ( (iindices.z & 0xff) << 16 ) | ( (iindices.y & 0xff) << 8 ) | ( iindices.x & 0xff );
|
||||
}
|
||||
|
||||
void XM_CALLCONV VertexPositionNormalTangentColorTextureSkinning::SetBlendWeights( FXMVECTOR iweights )
|
||||
{
|
||||
XMUBYTEN4 packed;
|
||||
XMStoreUByteN4( &packed, iweights );
|
||||
this->weights = packed.v;
|
||||
}
|
||||
331
JGE/src/DirectX/VertexTypes.h
Normal file
@@ -0,0 +1,331 @@
|
||||
//--------------------------------------------------------------------------------------
|
||||
// File: VertexTypes.h
|
||||
//
|
||||
// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
|
||||
// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
|
||||
// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
|
||||
// PARTICULAR PURPOSE.
|
||||
//
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
//
|
||||
// http://go.microsoft.com/fwlink/?LinkId=248929
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
#pragma once
|
||||
|
||||
#if defined(_XBOX_ONE) && defined(_TITLE)
|
||||
#include <d3d11_x.h>
|
||||
#else
|
||||
#include <d3d11_1.h>
|
||||
#endif
|
||||
|
||||
#include <DirectXMath.h>
|
||||
|
||||
|
||||
namespace DirectX
|
||||
{
|
||||
#if (DIRECTX_MATH_VERSION < 305) && !defined(XM_CALLCONV)
|
||||
#define XM_CALLCONV __fastcall
|
||||
typedef const XMVECTOR& HXMVECTOR;
|
||||
typedef const XMMATRIX& FXMMATRIX;
|
||||
#endif
|
||||
|
||||
// Vertex struct holding position and color information.
|
||||
struct VertexPositionColor
|
||||
{
|
||||
VertexPositionColor()
|
||||
{ }
|
||||
|
||||
VertexPositionColor(XMFLOAT3 const& position, XMFLOAT4 const& color)
|
||||
: position(position),
|
||||
color(color)
|
||||
{ }
|
||||
|
||||
VertexPositionColor(FXMVECTOR position, FXMVECTOR color)
|
||||
{
|
||||
XMStoreFloat3(&this->position, position);
|
||||
XMStoreFloat4(&this->color, color);
|
||||
}
|
||||
|
||||
XMFLOAT3 position;
|
||||
XMFLOAT4 color;
|
||||
|
||||
static const int InputElementCount = 2;
|
||||
static const D3D11_INPUT_ELEMENT_DESC InputElements[InputElementCount];
|
||||
};
|
||||
|
||||
|
||||
// Vertex struct holding position and texture mapping information.
|
||||
struct VertexPositionTexture
|
||||
{
|
||||
VertexPositionTexture()
|
||||
{ }
|
||||
|
||||
VertexPositionTexture(XMFLOAT3 const& position, XMFLOAT2 const& textureCoordinate)
|
||||
: position(position),
|
||||
textureCoordinate(textureCoordinate)
|
||||
{ }
|
||||
|
||||
VertexPositionTexture(FXMVECTOR position, FXMVECTOR textureCoordinate)
|
||||
{
|
||||
XMStoreFloat3(&this->position, position);
|
||||
XMStoreFloat2(&this->textureCoordinate, textureCoordinate);
|
||||
}
|
||||
|
||||
XMFLOAT3 position;
|
||||
XMFLOAT2 textureCoordinate;
|
||||
|
||||
static const int InputElementCount = 2;
|
||||
static const D3D11_INPUT_ELEMENT_DESC InputElements[InputElementCount];
|
||||
};
|
||||
|
||||
|
||||
// Vertex struct holding position and normal vector.
|
||||
struct VertexPositionNormal
|
||||
{
|
||||
VertexPositionNormal()
|
||||
{ }
|
||||
|
||||
VertexPositionNormal(XMFLOAT3 const& position, XMFLOAT3 const& normal)
|
||||
: position(position),
|
||||
normal(normal)
|
||||
{ }
|
||||
|
||||
VertexPositionNormal(FXMVECTOR position, FXMVECTOR normal)
|
||||
{
|
||||
XMStoreFloat3(&this->position, position);
|
||||
XMStoreFloat3(&this->normal, normal);
|
||||
}
|
||||
|
||||
XMFLOAT3 position;
|
||||
XMFLOAT3 normal;
|
||||
|
||||
static const int InputElementCount = 2;
|
||||
static const D3D11_INPUT_ELEMENT_DESC InputElements[InputElementCount];
|
||||
};
|
||||
|
||||
|
||||
// Vertex struct holding position, color, and texture mapping information.
|
||||
struct VertexPositionColorTexture
|
||||
{
|
||||
VertexPositionColorTexture()
|
||||
{ }
|
||||
|
||||
VertexPositionColorTexture(XMFLOAT3 const& position, XMFLOAT4 const& color, XMFLOAT2 const& textureCoordinate)
|
||||
: position(position),
|
||||
color(color),
|
||||
textureCoordinate(textureCoordinate)
|
||||
{ }
|
||||
|
||||
VertexPositionColorTexture(FXMVECTOR position, FXMVECTOR color, FXMVECTOR textureCoordinate)
|
||||
{
|
||||
XMStoreFloat3(&this->position, position);
|
||||
XMStoreFloat4(&this->color, color);
|
||||
XMStoreFloat2(&this->textureCoordinate, textureCoordinate);
|
||||
}
|
||||
|
||||
XMFLOAT3 position;
|
||||
XMFLOAT4 color;
|
||||
XMFLOAT2 textureCoordinate;
|
||||
|
||||
static const int InputElementCount = 3;
|
||||
static const D3D11_INPUT_ELEMENT_DESC InputElements[InputElementCount];
|
||||
};
|
||||
|
||||
|
||||
// Vertex struct holding position, normal vector, and color information.
|
||||
struct VertexPositionNormalColor
|
||||
{
|
||||
VertexPositionNormalColor()
|
||||
{ }
|
||||
|
||||
VertexPositionNormalColor(XMFLOAT3 const& position, XMFLOAT3 const& normal, XMFLOAT4 const& color)
|
||||
: position(position),
|
||||
normal(normal),
|
||||
color(color)
|
||||
{ }
|
||||
|
||||
VertexPositionNormalColor(FXMVECTOR position, FXMVECTOR normal, FXMVECTOR color)
|
||||
{
|
||||
XMStoreFloat3(&this->position, position);
|
||||
XMStoreFloat3(&this->normal, normal);
|
||||
XMStoreFloat4(&this->color, color);
|
||||
}
|
||||
|
||||
XMFLOAT3 position;
|
||||
XMFLOAT3 normal;
|
||||
XMFLOAT4 color;
|
||||
|
||||
static const int InputElementCount = 3;
|
||||
static const D3D11_INPUT_ELEMENT_DESC InputElements[InputElementCount];
|
||||
};
|
||||
|
||||
|
||||
// Vertex struct holding position, normal vector, and texture mapping information.
|
||||
struct VertexPositionNormalTexture
|
||||
{
|
||||
VertexPositionNormalTexture()
|
||||
{ }
|
||||
|
||||
VertexPositionNormalTexture(XMFLOAT3 const& position, XMFLOAT3 const& normal, XMFLOAT2 const& textureCoordinate)
|
||||
: position(position),
|
||||
normal(normal),
|
||||
textureCoordinate(textureCoordinate)
|
||||
{ }
|
||||
|
||||
VertexPositionNormalTexture(FXMVECTOR position, FXMVECTOR normal, FXMVECTOR textureCoordinate)
|
||||
{
|
||||
XMStoreFloat3(&this->position, position);
|
||||
XMStoreFloat3(&this->normal, normal);
|
||||
XMStoreFloat2(&this->textureCoordinate, textureCoordinate);
|
||||
}
|
||||
|
||||
XMFLOAT3 position;
|
||||
XMFLOAT3 normal;
|
||||
XMFLOAT2 textureCoordinate;
|
||||
|
||||
static const int InputElementCount = 3;
|
||||
static const D3D11_INPUT_ELEMENT_DESC InputElements[InputElementCount];
|
||||
};
|
||||
|
||||
|
||||
// Vertex struct holding position, normal vector, color, and texture mapping information.
|
||||
struct VertexPositionNormalColorTexture
|
||||
{
|
||||
VertexPositionNormalColorTexture()
|
||||
{ }
|
||||
|
||||
VertexPositionNormalColorTexture(XMFLOAT3 const& position, XMFLOAT3 const& normal, XMFLOAT4 const& color, XMFLOAT2 const& textureCoordinate)
|
||||
: position(position),
|
||||
normal(normal),
|
||||
color(color),
|
||||
textureCoordinate(textureCoordinate)
|
||||
{ }
|
||||
|
||||
VertexPositionNormalColorTexture(FXMVECTOR position, FXMVECTOR normal, FXMVECTOR color, CXMVECTOR textureCoordinate)
|
||||
{
|
||||
XMStoreFloat3(&this->position, position);
|
||||
XMStoreFloat3(&this->normal, normal);
|
||||
XMStoreFloat4(&this->color, color);
|
||||
XMStoreFloat2(&this->textureCoordinate, textureCoordinate);
|
||||
}
|
||||
|
||||
XMFLOAT3 position;
|
||||
XMFLOAT3 normal;
|
||||
XMFLOAT4 color;
|
||||
XMFLOAT2 textureCoordinate;
|
||||
|
||||
static const int InputElementCount = 4;
|
||||
static const D3D11_INPUT_ELEMENT_DESC InputElements[InputElementCount];
|
||||
};
|
||||
|
||||
|
||||
// Vertex struct for Visual Studio Shader Designer (DGSL) holding position, normal,
|
||||
// tangent, color (RGBA), and texture mapping information
|
||||
struct VertexPositionNormalTangentColorTexture
|
||||
{
|
||||
VertexPositionNormalTangentColorTexture()
|
||||
{ }
|
||||
|
||||
XMFLOAT3 position;
|
||||
XMFLOAT3 normal;
|
||||
XMFLOAT4 tangent;
|
||||
uint32_t color;
|
||||
XMFLOAT2 textureCoordinate;
|
||||
|
||||
VertexPositionNormalTangentColorTexture(XMFLOAT3 const& position, XMFLOAT3 const& normal, XMFLOAT4 const& tangent, uint32_t rgba, XMFLOAT2 const& textureCoordinate)
|
||||
: position(position),
|
||||
normal(normal),
|
||||
tangent(tangent),
|
||||
color(rgba),
|
||||
textureCoordinate(textureCoordinate)
|
||||
{
|
||||
}
|
||||
|
||||
VertexPositionNormalTangentColorTexture(FXMVECTOR position, FXMVECTOR normal, FXMVECTOR tangent, uint32_t rgba, CXMVECTOR textureCoordinate)
|
||||
: color(rgba)
|
||||
{
|
||||
XMStoreFloat3(&this->position, position);
|
||||
XMStoreFloat3(&this->normal, normal);
|
||||
XMStoreFloat4(&this->tangent, tangent);
|
||||
XMStoreFloat2(&this->textureCoordinate, textureCoordinate);
|
||||
}
|
||||
|
||||
VertexPositionNormalTangentColorTexture(XMFLOAT3 const& position, XMFLOAT3 const& normal, XMFLOAT4 const& tangent, XMFLOAT4 const& color, XMFLOAT2 const& textureCoordinate)
|
||||
: position(position),
|
||||
normal(normal),
|
||||
tangent(tangent),
|
||||
textureCoordinate(textureCoordinate)
|
||||
{
|
||||
SetColor( color );
|
||||
}
|
||||
|
||||
VertexPositionNormalTangentColorTexture(FXMVECTOR position, FXMVECTOR normal, FXMVECTOR tangent, CXMVECTOR color, CXMVECTOR textureCoordinate)
|
||||
{
|
||||
XMStoreFloat3(&this->position, position);
|
||||
XMStoreFloat3(&this->normal, normal);
|
||||
XMStoreFloat4(&this->tangent, tangent);
|
||||
XMStoreFloat2(&this->textureCoordinate, textureCoordinate);
|
||||
|
||||
SetColor( color );
|
||||
}
|
||||
|
||||
void __cdecl SetColor( XMFLOAT4 const& icolor ) { SetColor( XMLoadFloat4( &icolor ) ); }
|
||||
void XM_CALLCONV SetColor( FXMVECTOR icolor );
|
||||
|
||||
static const int InputElementCount = 5;
|
||||
static const D3D11_INPUT_ELEMENT_DESC InputElements[InputElementCount];
|
||||
};
|
||||
|
||||
|
||||
// Vertex struct for Visual Studio Shader Designer (DGSL) holding position, normal,
|
||||
// tangent, color (RGBA), texture mapping information, and skinning weights
|
||||
struct VertexPositionNormalTangentColorTextureSkinning : public VertexPositionNormalTangentColorTexture
|
||||
{
|
||||
VertexPositionNormalTangentColorTextureSkinning()
|
||||
{ }
|
||||
|
||||
uint32_t indices;
|
||||
uint32_t weights;
|
||||
|
||||
VertexPositionNormalTangentColorTextureSkinning(XMFLOAT3 const& position, XMFLOAT3 const& normal, XMFLOAT4 const& tangent, uint32_t rgba,
|
||||
XMFLOAT2 const& textureCoordinate, XMUINT4 const& indices, XMFLOAT4 const& weights)
|
||||
: VertexPositionNormalTangentColorTexture(position,normal,tangent,rgba,textureCoordinate)
|
||||
{
|
||||
SetBlendIndices( indices );
|
||||
SetBlendWeights( weights );
|
||||
}
|
||||
|
||||
VertexPositionNormalTangentColorTextureSkinning(FXMVECTOR position, FXMVECTOR normal, FXMVECTOR tangent, uint32_t rgba, CXMVECTOR textureCoordinate,
|
||||
XMUINT4 const& indices, CXMVECTOR weights)
|
||||
: VertexPositionNormalTangentColorTexture(position,normal,tangent,rgba,textureCoordinate)
|
||||
{
|
||||
SetBlendIndices( indices );
|
||||
SetBlendWeights( weights );
|
||||
}
|
||||
|
||||
VertexPositionNormalTangentColorTextureSkinning(XMFLOAT3 const& position, XMFLOAT3 const& normal, XMFLOAT4 const& tangent, XMFLOAT4 const& color,
|
||||
XMFLOAT2 const& textureCoordinate, XMUINT4 const& indices, XMFLOAT4 const& weights)
|
||||
: VertexPositionNormalTangentColorTexture(position,normal,tangent,color,textureCoordinate)
|
||||
{
|
||||
SetBlendIndices( indices );
|
||||
SetBlendWeights( weights );
|
||||
}
|
||||
|
||||
VertexPositionNormalTangentColorTextureSkinning(FXMVECTOR position, FXMVECTOR normal, FXMVECTOR tangent, CXMVECTOR color, CXMVECTOR textureCoordinate,
|
||||
XMUINT4 const& indices, CXMVECTOR weights)
|
||||
: VertexPositionNormalTangentColorTexture(position,normal,tangent,color,textureCoordinate)
|
||||
{
|
||||
SetBlendIndices( indices );
|
||||
SetBlendWeights( weights );
|
||||
}
|
||||
|
||||
void __cdecl SetBlendIndices( XMUINT4 const& iindices );
|
||||
|
||||
void __cdecl SetBlendWeights( XMFLOAT4 const& iweights ) { SetBlendWeights( XMLoadFloat4( &iweights ) ); }
|
||||
void XM_CALLCONV SetBlendWeights( FXMVECTOR iweights );
|
||||
|
||||
static const int InputElementCount = 7;
|
||||
static const D3D11_INPUT_ELEMENT_DESC InputElements[InputElementCount];
|
||||
};
|
||||
}
|
||||
@@ -32,7 +32,6 @@ The content that users should not be touching.
|
||||
#include "../include/JGE.h"
|
||||
#include "../include/JFileSystem.h"
|
||||
#include "../include/JLogger.h"
|
||||
#include <dirent.h>
|
||||
|
||||
#ifdef QT_CONFIG
|
||||
#include <QDir>
|
||||
@@ -139,9 +138,11 @@ JFileSystem::JFileSystem(const string & _userPath, const string & _systemPath)
|
||||
DebugTrace("Current path " << QDir::currentPath().toStdString());
|
||||
#elif defined (WP8)
|
||||
char buff[500];
|
||||
// auto appInstallDirectory = Windows::Storage::KnownFolders::DocumentsLibrary::get()->Path;
|
||||
auto appInstallDirectory = Windows::ApplicationModel::Package::Current->InstalledLocation->Path;
|
||||
WideCharToMultiByte(CP_ACP, 0, appInstallDirectory->Data(), -1, buff, appInstallDirectory->Length()+1, NULL, NULL);
|
||||
systemPath = buff;
|
||||
systemPath += "\\Assets\\";
|
||||
|
||||
auto localfolder = Windows::Storage::ApplicationData::Current->LocalFolder->Path;
|
||||
WideCharToMultiByte(CP_ACP, 0, localfolder->Data(), -1, buff, localfolder->Length()+1, NULL, NULL);
|
||||
@@ -257,7 +258,7 @@ void JFileSystem::clearZipCache()
|
||||
|
||||
bool JFileSystem::AttachZipFile(const string &zipfile, char *password /* = NULL */)
|
||||
{
|
||||
if (mZipAvailable && mZipFile != NULL)
|
||||
if (mZipAvailable && mZipFile.is_open())
|
||||
{
|
||||
if (mZipFileName != zipfile)
|
||||
DetachZipFile(); // close the previous zip file
|
||||
|
||||
@@ -149,8 +149,6 @@ void WagicApp::Initialize(CoreApplicationView^ applicationView)
|
||||
void WagicApp::SetWindow(CoreWindow^ window)
|
||||
{
|
||||
m_window = window;
|
||||
window->SizeChanged +=
|
||||
ref new TypedEventHandler<CoreWindow^, WindowSizeChangedEventArgs^>(this, &WagicApp::OnWindowSizeChanged);
|
||||
|
||||
window->VisibilityChanged +=
|
||||
ref new TypedEventHandler<CoreWindow^, VisibilityChangedEventArgs^>(this, &WagicApp::OnVisibilityChanged);
|
||||
@@ -158,8 +156,6 @@ void WagicApp::SetWindow(CoreWindow^ window)
|
||||
window->Closed +=
|
||||
ref new TypedEventHandler<CoreWindow^, CoreWindowEventArgs^>(this, &WagicApp::OnWindowClosed);
|
||||
|
||||
window->PointerCursor = ref new CoreCursor(CoreCursorType::Arrow, 0);
|
||||
|
||||
window->PointerPressed +=
|
||||
ref new TypedEventHandler<CoreWindow^, PointerEventArgs^>(this, &WagicApp::OnPointerPressed);
|
||||
|
||||
@@ -175,8 +171,50 @@ void WagicApp::SetWindow(CoreWindow^ window)
|
||||
window->PointerWheelChanged +=
|
||||
ref new TypedEventHandler<CoreWindow^, PointerEventArgs^>(this, &WagicApp::OnPointerWheelChanged);
|
||||
|
||||
#if !(WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP)
|
||||
window->PointerCursor = ref new CoreCursor(CoreCursorType::Arrow, 0);
|
||||
|
||||
window->SizeChanged +=
|
||||
ref new TypedEventHandler<CoreWindow^, WindowSizeChangedEventArgs^>(this, &WagicApp::OnWindowSizeChanged);
|
||||
#endif
|
||||
static const float dipsPerInch = 96.0f;
|
||||
m_Wagic.initApp();
|
||||
m_Wagic.onWindowResize((void*)window, window->Bounds.Width, window->Bounds.Height);
|
||||
m_Wagic.onWindowResize(
|
||||
(void*)window,
|
||||
floor(window->Bounds.Width * DisplayProperties::LogicalDpi / dipsPerInch + 0.5f),
|
||||
floor(window->Bounds.Height * DisplayProperties::LogicalDpi / dipsPerInch + 0.5f));
|
||||
|
||||
/*
|
||||
window->VisibilityChanged +=
|
||||
ref new TypedEventHandler<CoreWindow^, VisibilityChangedEventArgs^>(this, &App::OnVisibilityChanged);
|
||||
|
||||
window->Closed +=
|
||||
ref new TypedEventHandler<CoreWindow^, CoreWindowEventArgs^>(this, &App::OnWindowClosed);
|
||||
|
||||
DisplayInformation^ currentDisplayInformation = DisplayInformation::GetForCurrentView();
|
||||
|
||||
DisplayInformation::DisplayContentsInvalidated +=
|
||||
ref new TypedEventHandler<DisplayInformation^, Object^>(this, &App::OnDisplayContentsInvalidated);
|
||||
|
||||
#if !(WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP)
|
||||
window->SizeChanged +=
|
||||
ref new TypedEventHandler<CoreWindow^, WindowSizeChangedEventArgs^>(this, &App::OnWindowSizeChanged);
|
||||
|
||||
currentDisplayInformation->DpiChanged +=
|
||||
ref new TypedEventHandler<DisplayInformation^, Object^>(this, &App::OnDpiChanged);
|
||||
|
||||
currentDisplayInformation->OrientationChanged +=
|
||||
ref new TypedEventHandler<DisplayInformation^, Object^>(this, &App::OnOrientationChanged);
|
||||
|
||||
// Désactivez tout retour visuel du pointeur pour de meilleures performances tactiles.
|
||||
// Ceci n'est pas pris en charge sur les applications Windows Phone.
|
||||
auto pointerVisualizationSettings = PointerVisualizationSettings::GetForCurrentView();
|
||||
pointerVisualizationSettings->IsContactFeedbackEnabled = false;
|
||||
pointerVisualizationSettings->IsBarrelButtonFeedbackEnabled = false;
|
||||
#endif
|
||||
|
||||
m_deviceResources->SetWindow(window);
|
||||
*/
|
||||
}
|
||||
|
||||
void WagicApp::Load(Platform::String^ entryPoint)
|
||||
|
||||
@@ -51,9 +51,7 @@
|
||||
#include <PrecompiledHeader.h>
|
||||
#endif
|
||||
|
||||
#include <dirent.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <limits.h>
|
||||
|
||||
namespace io_facilities {
|
||||
|
||||
BIN
projects/mtg/WRL/Assets/Logo.png
Normal file
|
After Width: | Height: | Size: 801 B |
BIN
projects/mtg/WRL/Assets/Logo.scale-240.png
Normal file
|
After Width: | Height: | Size: 2.5 KiB |
BIN
projects/mtg/WRL/Assets/SmallLogo.png
Normal file
BIN
projects/mtg/WRL/Assets/SmallLogo.scale-100.png
Normal file
|
After Width: | Height: | Size: 6.7 KiB |
BIN
projects/mtg/WRL/Assets/SmallLogo.scale-240.png
Normal file
|
After Width: | Height: | Size: 753 B |
BIN
projects/mtg/WRL/Assets/SplashScreen.png
Normal file
|
After Width: | Height: | Size: 2.1 KiB |
BIN
projects/mtg/WRL/Assets/SplashScreen.scale-240.png
Normal file
|
After Width: | Height: | Size: 14 KiB |
BIN
projects/mtg/WRL/Assets/Square71x71Logo.scale-240.png
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
projects/mtg/WRL/Assets/StoreLogo.png
Normal file
BIN
projects/mtg/WRL/Assets/StoreLogo.scale-240.png
Normal file
|
After Width: | Height: | Size: 2.1 KiB |
BIN
projects/mtg/WRL/Assets/WideLogo.scale-240.png
Normal file
|
After Width: | Height: | Size: 4.4 KiB |
38
projects/mtg/WRL/Wagic.Shared.vcxitems
Normal file
@@ -0,0 +1,38 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup Label="Globals">
|
||||
<MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>
|
||||
<CodeSharingProject>248F659F-DAC5-46E8-AC09-60EC9FC95053</CodeSharingProject>
|
||||
<HasSharedItems>true</HasSharedItems>
|
||||
<SharedGUID>8d01c384-882c-4ac8-a178-e4c946e5a542</SharedGUID>
|
||||
<ItemsProjectGuid>{1c587904-01ba-482e-806e-0617aea0b059}</ItemsProjectGuid>
|
||||
<ItemsRootNamespace>Wagic</ItemsRootNamespace>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup>
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(MSBuildThisFileDirectory)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\..\JGE\src\DirectX\JGfx.cpp">
|
||||
<CompileAsWinRT>true</CompileAsWinRT>
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\..\JGE\src\JFileSystem.cpp">
|
||||
<CompileAsWinRT>true</CompileAsWinRT>
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\..\JGE\src\WRLmain.cpp">
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectCapability Include="SourceItemsFromImports" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="$(MSBuildThisFileDirectory)Assets\Res.zip">
|
||||
<FileType>Document</FileType>
|
||||
<DeploymentContent>true</DeploymentContent>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
11
projects/mtg/WRL/Wagic.Shared.vcxitems.filters
Normal file
@@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\..\JGE\src\WRLmain.cpp" />
|
||||
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\..\JGE\src\DirectX\JGfx.cpp" />
|
||||
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\..\JGE\src\JFileSystem.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="$(MSBuildThisFileDirectory)Assets\Res.zip" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
35
projects/mtg/WRL/Wagic.WindowsDesktop.Package.appxmanifest
Normal file
@@ -0,0 +1,35 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Package xmlns="http://schemas.microsoft.com/appx/2010/manifest" xmlns:m2="http://schemas.microsoft.com/appx/2013/manifest">
|
||||
<Identity Name="4c752c01-e47b-453a-b221-6118ed085eb9" Publisher="CN=xawot_000" Version="1.1.0.0" />
|
||||
<Properties>
|
||||
<DisplayName>Wagic</DisplayName>
|
||||
<PublisherDisplayName>xawot_000</PublisherDisplayName>
|
||||
<Logo>Assets\StoreLogo.png</Logo>
|
||||
</Properties>
|
||||
<Prerequisites>
|
||||
<OSMinVersion>6.3</OSMinVersion>
|
||||
<OSMaxVersionTested>6.3</OSMaxVersionTested>
|
||||
</Prerequisites>
|
||||
<Resources>
|
||||
<Resource Language="x-generate" />
|
||||
</Resources>
|
||||
<Applications>
|
||||
<Application Id="App" Executable="$targetnametoken$.exe" EntryPoint="Wagic.App">
|
||||
<m2:VisualElements DisplayName="Wagic" Description="Wagic" BackgroundColor="#464646" ForegroundText="light" Square150x150Logo="Assets\Logo.png" Square30x30Logo="Assets\SmallLogo.png">
|
||||
<m2:DefaultTile>
|
||||
<m2:ShowNameOnTiles>
|
||||
<m2:ShowOn Tile="square150x150Logo" />
|
||||
</m2:ShowNameOnTiles>
|
||||
</m2:DefaultTile>
|
||||
<m2:InitialRotationPreference>
|
||||
<m2:Rotation Preference="landscape" />
|
||||
<m2:Rotation Preference="landscapeFlipped" />
|
||||
</m2:InitialRotationPreference>
|
||||
<m2:SplashScreen Image="Assets\SplashScreen.png" />
|
||||
</m2:VisualElements>
|
||||
</Application>
|
||||
</Applications>
|
||||
<Capabilities>
|
||||
<Capability Name="internetClient" />
|
||||
</Capabilities>
|
||||
</Package>
|
||||
176
projects/mtg/WRL/Wagic.WindowsDesktop.vcxproj
Normal file
@@ -0,0 +1,176 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="12.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>
|
||||
<ProjectConfiguration Include="Debug|ARM">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>ARM</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|ARM">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>ARM</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{45306c0e-e90b-4e84-a32f-504ed7b5c299}</ProjectGuid>
|
||||
<RootNamespace>Wagic</RootNamespace>
|
||||
<DefaultLanguage>en-US</DefaultLanguage>
|
||||
<MinimumVisualStudioVersion>12.0</MinimumVisualStudioVersion>
|
||||
<AppContainerApplication>true</AppContainerApplication>
|
||||
<ProjectName>app</ProjectName>
|
||||
<ApplicationType>Windows Store</ApplicationType>
|
||||
<ApplicationTypeRevision>8.1</ApplicationTypeRevision>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v120</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v120</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v120</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v120</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v120</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v120</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<Import Project="Wagic.Shared.vcxitems" Label="Shared" />
|
||||
<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|ARM'">
|
||||
<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|ARM'">
|
||||
<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>
|
||||
<PackageCertificateKeyFile>Wagic_TemporaryKey.pfx</PackageCertificateKeyFile>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<OutDir>$(SolutionDir)$(Platform)\$(Configuration)\$(MSBuildProjectName)\</OutDir>
|
||||
<IntDir>$(Platform)\$(Configuration)\$(ProjectName)</IntDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<OutDir>$(SolutionDir)$(Platform)\$(Configuration)\$(MSBuildProjectName)\</OutDir>
|
||||
<IntDir>$(Platform)\$(Configuration)\$(ProjectName)</IntDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
|
||||
<IntDir>$(Platform)\$(Configuration)\$(ProjectName)</IntDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<IntDir>$(Platform)\$(Configuration)\$(ProjectName)</IntDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
|
||||
<IntDir>$(Platform)\$(Configuration)\$(ProjectName)</IntDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<IntDir>$(Platform)\$(Configuration)\$(ProjectName)</IntDir>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup>
|
||||
<Link>
|
||||
<AdditionalDependencies>d2d1.lib;d3d11.lib;dxgi.lib;ole32.lib;windowscodecs.lib;dwrite.lib;JGE.lib;zlib.lib;libpng.lib;libjpeg.lib;wagic.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
<ClCompile>
|
||||
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
|
||||
<PrecompiledHeaderOutputFile>$(IntDir)pch.pch</PrecompiledHeaderOutputFile>
|
||||
<AdditionalIncludeDirectories>../include;../../../JGE/include;../../../JGE/Dependencies/zlib;../../../JGE/src/zipFS;../../../JGE/Dependencies/include;$(ProjectDir);$(IntermediateOutputPath);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<DisableSpecificWarnings>4453</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)'=='Release'">
|
||||
<ClCompile>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions);WP8</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalLibraryDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration)\;$(SolutionDir)$(Platform)\$(Configuration);$(SolutionDir)$(Platform)\$(Configuration)\JGE;$(SolutionDir)$(Platform)\$(Configuration)\zlib;$(SolutionDir)$(Platform)\$(Configuration)\libjpeg;$(SolutionDir)$(Platform)\$(Configuration)\libpng;$(SolutionDir)$(Platform)\$(Configuration)\wagic;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
</Link>
|
||||
<Link>
|
||||
<AdditionalLibraryDirectories Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">$(SolutionDir)$(Configuration)\;$(SolutionDir)$(Platform)\$(Configuration);$(SolutionDir)$(Platform)\$(Configuration)\JGE;$(SolutionDir)$(Platform)\$(Configuration)\zlib;$(SolutionDir)$(Platform)\$(Configuration)\libjpeg;$(SolutionDir)$(Platform)\$(Configuration)\libpng;$(SolutionDir)$(Platform)\$(Configuration)\wagic;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
</Link>
|
||||
<Link>
|
||||
<AdditionalLibraryDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)$(Configuration)\;$(SolutionDir)$(Platform)\$(Configuration);$(SolutionDir)$(Platform)\$(Configuration)\JGE;$(SolutionDir)$(Platform)\$(Configuration)\zlib;$(SolutionDir)$(Platform)\$(Configuration)\libjpeg;$(SolutionDir)$(Platform)\$(Configuration)\libpng;$(SolutionDir)$(Platform)\$(Configuration)\wagic;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)'=='Debug'">
|
||||
<ClCompile>
|
||||
<PreprocessorDefinitions>PSAPI_VERSION=2;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WP8;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalLibraryDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Configuration)\;$(SolutionDir)$(Platform)\$(Configuration);$(SolutionDir)$(Platform)\$(Configuration)\JGE;$(SolutionDir)$(Platform)\$(Configuration)\zlib;$(SolutionDir)$(Platform)\$(Configuration)\libjpeg;$(SolutionDir)$(Platform)\$(Configuration)\libpng;$(SolutionDir)$(Platform)\$(Configuration)\wagic;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
</Link>
|
||||
<Link>
|
||||
<AdditionalLibraryDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">$(SolutionDir)$(Configuration)\;$(SolutionDir)$(Platform)\$(Configuration);$(SolutionDir)$(Platform)\$(Configuration)\JGE;$(SolutionDir)$(Platform)\$(Configuration)\zlib;$(SolutionDir)$(Platform)\$(Configuration)\libjpeg;$(SolutionDir)$(Platform)\$(Configuration)\libpng;$(SolutionDir)$(Platform)\$(Configuration)\wagic;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
</Link>
|
||||
<Link>
|
||||
<AdditionalLibraryDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)$(Configuration)\;$(SolutionDir)$(Platform)\$(Configuration);$(SolutionDir)$(Platform)\$(Configuration)\JGE;$(SolutionDir)$(Platform)\$(Configuration)\zlib;$(SolutionDir)$(Platform)\$(Configuration)\libjpeg;$(SolutionDir)$(Platform)\$(Configuration)\libpng;$(SolutionDir)$(Platform)\$(Configuration)\wagic;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<Image Include="Assets\Logo.png" />
|
||||
<Image Include="Assets\SmallLogo.png" />
|
||||
<Image Include="Assets\SmallLogo.scale-100.png">
|
||||
<DeploymentContent>true</DeploymentContent>
|
||||
</Image>
|
||||
<Image Include="Assets\StoreLogo.png" />
|
||||
<Image Include="Assets\SplashScreen.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<AppxManifest Include="Wagic.WindowsDesktop.Package.appxmanifest">
|
||||
<SubType>Designer</SubType>
|
||||
</AppxManifest>
|
||||
<None Include="Wagic_TemporaryKey.pfx" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
43
projects/mtg/WRL/Wagic.WindowsPhone.Package.appxmanifest
Normal file
@@ -0,0 +1,43 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Package xmlns="http://schemas.microsoft.com/appx/2010/manifest" xmlns:m2="http://schemas.microsoft.com/appx/2013/manifest" xmlns:m3="http://schemas.microsoft.com/appx/2014/manifest" xmlns:mp="http://schemas.microsoft.com/appx/2014/phone/manifest">
|
||||
<Identity Name="54be4aa0-addb-43f8-a8cf-5661ba193b47" Publisher="CN=xawot_000" Version="1.0.0.0" />
|
||||
<mp:PhoneIdentity PhoneProductId="54be4aa0-addb-43f8-a8cf-5661ba193b47" PhonePublisherId="00000000-0000-0000-0000-000000000000" />
|
||||
<Properties>
|
||||
<DisplayName>app.WindowsPhone</DisplayName>
|
||||
<PublisherDisplayName>wagic</PublisherDisplayName>
|
||||
<Logo>Assets\StoreLogo.png</Logo>
|
||||
</Properties>
|
||||
<Prerequisites>
|
||||
<OSMinVersion>6.3.1</OSMinVersion>
|
||||
<OSMaxVersionTested>6.3.1</OSMaxVersionTested>
|
||||
</Prerequisites>
|
||||
<Resources>
|
||||
<Resource Language="x-generate" />
|
||||
</Resources>
|
||||
<Applications>
|
||||
<Application Id="App" Executable="$targetnametoken$.exe" EntryPoint="app_WindowsPhone.App">
|
||||
<m3:VisualElements DisplayName="app.WindowsPhone" Square150x150Logo="Assets\Logo.png" Square44x44Logo="Assets\SmallLogo.png" Description="app.WindowsPhone" ForegroundText="light" BackgroundColor="transparent">
|
||||
<m3:DefaultTile Wide310x150Logo="Assets\WideLogo.png" Square71x71Logo="Assets\Square71x71Logo.png">
|
||||
</m3:DefaultTile>
|
||||
<m3:SplashScreen Image="Assets\SplashScreen.png" />
|
||||
<m3:InitialRotationPreference>
|
||||
<m3:Rotation Preference="landscape" />
|
||||
</m3:InitialRotationPreference>
|
||||
</m3:VisualElements>
|
||||
<Extensions>
|
||||
<Extension Category="windows.fileTypeAssociation">
|
||||
<FileTypeAssociation Name="wagic">
|
||||
<DisplayName>Wagic Resources</DisplayName>
|
||||
<SupportedFileTypes>
|
||||
<FileType ContentType="doc/zip">.zip</FileType>
|
||||
</SupportedFileTypes>
|
||||
</FileTypeAssociation>
|
||||
</Extension>
|
||||
</Extensions>
|
||||
</Application>
|
||||
</Applications>
|
||||
<Capabilities>
|
||||
<Capability Name="internetClientServer" />
|
||||
<Capability Name="documentsLibrary" />
|
||||
</Capabilities>
|
||||
</Package>
|
||||
138
projects/mtg/WRL/Wagic.WindowsPhone.vcxproj
Normal file
@@ -0,0 +1,138 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|ARM">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>ARM</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|ARM">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>ARM</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{b1a69919-8795-4071-ad05-883294596217}</ProjectGuid>
|
||||
<RootNamespace>Wagic</RootNamespace>
|
||||
<DefaultLanguage>en</DefaultLanguage>
|
||||
<MinimumVisualStudioVersion>12.0</MinimumVisualStudioVersion>
|
||||
<AppContainerApplication>true</AppContainerApplication>
|
||||
<ApplicationType>Windows Phone</ApplicationType>
|
||||
<ApplicationTypeRevision>8.1</ApplicationTypeRevision>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v120_wp81</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v120_wp81</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v120_wp81</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v120_wp81</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
<Import Project="$(VSINSTALLDIR)\Common7\IDE\Extensions\Microsoft\VsGraphics\ImageContentTask.props" />
|
||||
<Import Project="$(VSINSTALLDIR)\Common7\IDE\Extensions\Microsoft\VsGraphics\MeshContentTask.props" />
|
||||
<Import Project="$(VSINSTALLDIR)\Common7\IDE\Extensions\Microsoft\VsGraphics\ShaderGraphContentTask.props" />
|
||||
</ImportGroup>
|
||||
<Import Project="Wagic.Shared.vcxitems" Label="Shared" />
|
||||
<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|ARM'">
|
||||
<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|ARM'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<Link>
|
||||
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories);$(WindowsPhoneSDK_LibraryPath_x86)</AdditionalLibraryDirectories>
|
||||
<AdditionalDependencies>WindowsPhoneCore.lib;RuntimeObject.lib;PhoneAppModelHost.lib;DXGI.lib;D3D11.lib;D2D1.lib;DWrite.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<GenerateWindowsMetadata>false</GenerateWindowsMetadata>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<Link>
|
||||
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories);$(WindowsPhoneSDK_LibraryPath_x86)</AdditionalLibraryDirectories>
|
||||
<AdditionalDependencies>WindowsPhoneCore.lib;RuntimeObject.lib;PhoneAppModelHost.lib;DXGI.lib;D3D11.lib;D2D1.lib;DWrite.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<GenerateWindowsMetadata>false</GenerateWindowsMetadata>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
|
||||
<Link>
|
||||
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories);$(WindowsPhoneSDK_LibraryPath_arm);$(SolutionDir)$(Platform)\$(Configuration)\JGE;$(SolutionDir)$(Platform)\$(Configuration)\zlib;$(SolutionDir)$(Platform)\$(Configuration)\libjpeg;$(SolutionDir)$(Platform)\$(Configuration)\libpng;$(SolutionDir)$(Platform)\$(Configuration)\wagic</AdditionalLibraryDirectories>
|
||||
<AdditionalDependencies>JGE.lib;zlib.lib;libpng.lib;libjpeg.lib;wagic.lib;WindowsPhoneCore.lib;RuntimeObject.lib;PhoneAppModelHost.lib;DXGI.lib;D3D11.lib;D2D1.lib;DWrite.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<GenerateWindowsMetadata>false</GenerateWindowsMetadata>
|
||||
</Link>
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(IntermediateOutputPath);../../../JGE/include;../../../JGE/Dependencies/zlib;../../../JGE/src/zipFS;../include;../../../JGE/Dependencies/include</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WP8;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
|
||||
<Link>
|
||||
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories);$(WindowsPhoneSDK_LibraryPath_arm)</AdditionalLibraryDirectories>
|
||||
<AdditionalDependencies>WindowsPhoneCore.lib;RuntimeObject.lib;PhoneAppModelHost.lib;DXGI.lib;D3D11.lib;D2D1.lib;DWrite.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<GenerateWindowsMetadata>false</GenerateWindowsMetadata>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<OutDir>$(SolutionDir)$(Platform)\$(Configuration)\$(MSBuildProjectName)\</OutDir>
|
||||
<IntDir>$(Platform)\$(Configuration)\$(ProjectName)</IntDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
|
||||
<IntDir>$(Platform)\$(Configuration)\$(ProjectName)</IntDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
|
||||
<IntDir>$(Platform)\$(Configuration)\$(ProjectName)</IntDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<IntDir>$(Platform)\$(Configuration)\$(ProjectName)</IntDir>
|
||||
<OutDir>$(SolutionDir)$(Platform)\$(Configuration)\$(MSBuildProjectName)\</OutDir>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Image Include="Assets\Logo.scale-240.png" />
|
||||
<Image Include="Assets\SmallLogo.scale-240.png" />
|
||||
<Image Include="Assets\SplashScreen.scale-240.png" />
|
||||
<Image Include="Assets\Square71x71Logo.scale-240.png" />
|
||||
<Image Include="Assets\StoreLogo.scale-240.png" />
|
||||
<Image Include="Assets\WideLogo.scale-240.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<AppxManifest Include="Wagic.WindowsPhone.Package.appxmanifest">
|
||||
<SubType>Designer</SubType>
|
||||
</AppxManifest>
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
<Import Project="$(VSINSTALLDIR)\Common7\IDE\Extensions\Microsoft\VsGraphics\ImageContentTask.targets" />
|
||||
<Import Project="$(VSINSTALLDIR)\Common7\IDE\Extensions\Microsoft\VsGraphics\MeshContentTask.targets" />
|
||||
<Import Project="$(VSINSTALLDIR)\Common7\IDE\Extensions\Microsoft\VsGraphics\ShaderGraphContentTask.targets" />
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
36
projects/mtg/WRL/Wagic.WindowsPhone.vcxproj.filters
Normal file
@@ -0,0 +1,36 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="Common">
|
||||
<UniqueIdentifier>20a460d3-908d-4e24-9f44-f887aea6fda6</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Assets">
|
||||
<UniqueIdentifier>c9191f0f-4b13-4395-81a7-d9bbf2fcf5cd</UniqueIdentifier>
|
||||
<Extensions>bmp;fbx;gif;jpg;jpeg;tga;tiff;tif;png;zip</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Content">
|
||||
<UniqueIdentifier>b1a69919-8795-4071-ad05-883294596217</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Image Include="Assets\Logo.scale-240.png">
|
||||
<Filter>Assets</Filter>
|
||||
</Image>
|
||||
<Image Include="Assets\SmallLogo.scale-240.png">
|
||||
<Filter>Assets</Filter>
|
||||
</Image>
|
||||
<Image Include="Assets\SplashScreen.scale-240.png">
|
||||
<Filter>Assets</Filter>
|
||||
</Image>
|
||||
<Image Include="Assets\Square71x71Logo.scale-240.png">
|
||||
<Filter>Assets</Filter>
|
||||
</Image>
|
||||
<Image Include="Assets\StoreLogo.scale-240.png">
|
||||
<Filter>Assets</Filter>
|
||||
</Image>
|
||||
<Image Include="Assets\WideLogo.scale-240.png">
|
||||
<Filter>Assets</Filter>
|
||||
</Image>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<AppxManifest Include="Wagic.WindowsPhone.Package.appxmanifest" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
195
projects/mtg/WRL/Wagic.sln
Normal file
@@ -0,0 +1,195 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Express 2013 for Windows
|
||||
VisualStudioVersion = 12.0.31101.0
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "app", "Wagic.WindowsDesktop.vcxproj", "{45306C0E-E90B-4E84-A32F-504ED7B5C299}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{1DE5241B-2F18-4662-A196-F5C2A26CE5D6} = {1DE5241B-2F18-4662-A196-F5C2A26CE5D6}
|
||||
{89159C26-2282-404A-A194-103B0A49DF7B} = {89159C26-2282-404A-A194-103B0A49DF7B}
|
||||
{6BEE6FBA-C260-4A82-A8DA-6463F4FFA470} = {6BEE6FBA-C260-4A82-A8DA-6463F4FFA470}
|
||||
{6CD25DC7-5D2C-48FB-B10B-345F1A13E3F3} = {6CD25DC7-5D2C-48FB-B10B-345F1A13E3F3}
|
||||
{C724E4D7-A1D1-41BE-8F22-382C6CB3CDAC} = {C724E4D7-A1D1-41BE-8F22-382C6CB3CDAC}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "JGE - win8", "..\..\..\JGE\JGE - win8.vcxproj", "{89159C26-2282-404A-A194-103B0A49DF7B}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{1DE5241B-2F18-4662-A196-F5C2A26CE5D6} = {1DE5241B-2F18-4662-A196-F5C2A26CE5D6}
|
||||
{6BEE6FBA-C260-4A82-A8DA-6463F4FFA470} = {6BEE6FBA-C260-4A82-A8DA-6463F4FFA470}
|
||||
{6CD25DC7-5D2C-48FB-B10B-345F1A13E3F3} = {6CD25DC7-5D2C-48FB-B10B-345F1A13E3F3}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wagic", "wagic.vcxproj", "{C724E4D7-A1D1-41BE-8F22-382C6CB3CDAC}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{89159C26-2282-404A-A194-103B0A49DF7B} = {89159C26-2282-404A-A194-103B0A49DF7B}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlib", "..\..\..\JGE\Dependencies\zlib\zlib.vcxproj", "{6CD25DC7-5D2C-48FB-B10B-345F1A13E3F3}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libjpeg", "..\..\..\JGE\Dependencies\libjpeg\libjpeg.vcxproj", "{1DE5241B-2F18-4662-A196-F5C2A26CE5D6}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libpng", "..\..\..\JGE\Dependencies\libpng\libpng.vcxproj", "{6BEE6FBA-C260-4A82-A8DA-6463F4FFA470}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Wagic App", "Wagic App", "{8314F48C-574C-483F-AA48-55A29510CC00}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Wagic.Shared", "Wagic.Shared.vcxitems", "{1C587904-01BA-482E-806E-0617AEA0B059}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Wagic.WindowsPhone", "Wagic.WindowsPhone.vcxproj", "{B1A69919-8795-4071-AD05-883294596217}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{1DE5241B-2F18-4662-A196-F5C2A26CE5D6} = {1DE5241B-2F18-4662-A196-F5C2A26CE5D6}
|
||||
{89159C26-2282-404A-A194-103B0A49DF7B} = {89159C26-2282-404A-A194-103B0A49DF7B}
|
||||
{6BEE6FBA-C260-4A82-A8DA-6463F4FFA470} = {6BEE6FBA-C260-4A82-A8DA-6463F4FFA470}
|
||||
{6CD25DC7-5D2C-48FB-B10B-345F1A13E3F3} = {6CD25DC7-5D2C-48FB-B10B-345F1A13E3F3}
|
||||
{C724E4D7-A1D1-41BE-8F22-382C6CB3CDAC} = {C724E4D7-A1D1-41BE-8F22-382C6CB3CDAC}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SharedMSBuildProjectFiles) = preSolution
|
||||
Wagic.Shared.vcxitems*{b1a69919-8795-4071-ad05-883294596217}*SharedItemsImports = 4
|
||||
Wagic.Shared.vcxitems*{45306c0e-e90b-4e84-a32f-504ed7b5c299}*SharedItemsImports = 4
|
||||
Wagic.Shared.vcxitems*{1c587904-01ba-482e-806e-0617aea0b059}*SharedItemsImports = 9
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|ARM = Debug|ARM
|
||||
Debug|Win32 = Debug|Win32
|
||||
Debug|x64 = Debug|x64
|
||||
Profile|ARM = Profile|ARM
|
||||
Profile|Win32 = Profile|Win32
|
||||
Profile|x64 = Profile|x64
|
||||
Release|ARM = Release|ARM
|
||||
Release|Win32 = Release|Win32
|
||||
Release|x64 = Release|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{45306C0E-E90B-4E84-A32F-504ED7B5C299}.Debug|ARM.ActiveCfg = Debug|ARM
|
||||
{45306C0E-E90B-4E84-A32F-504ED7B5C299}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{45306C0E-E90B-4E84-A32F-504ED7B5C299}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{45306C0E-E90B-4E84-A32F-504ED7B5C299}.Debug|Win32.Deploy.0 = Debug|Win32
|
||||
{45306C0E-E90B-4E84-A32F-504ED7B5C299}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{45306C0E-E90B-4E84-A32F-504ED7B5C299}.Debug|x64.Build.0 = Debug|x64
|
||||
{45306C0E-E90B-4E84-A32F-504ED7B5C299}.Debug|x64.Deploy.0 = Debug|x64
|
||||
{45306C0E-E90B-4E84-A32F-504ED7B5C299}.Profile|ARM.ActiveCfg = Release|ARM
|
||||
{45306C0E-E90B-4E84-A32F-504ED7B5C299}.Profile|ARM.Build.0 = Release|ARM
|
||||
{45306C0E-E90B-4E84-A32F-504ED7B5C299}.Profile|ARM.Deploy.0 = Release|ARM
|
||||
{45306C0E-E90B-4E84-A32F-504ED7B5C299}.Profile|Win32.ActiveCfg = Release|Win32
|
||||
{45306C0E-E90B-4E84-A32F-504ED7B5C299}.Profile|Win32.Build.0 = Release|Win32
|
||||
{45306C0E-E90B-4E84-A32F-504ED7B5C299}.Profile|Win32.Deploy.0 = Release|Win32
|
||||
{45306C0E-E90B-4E84-A32F-504ED7B5C299}.Profile|x64.ActiveCfg = Release|x64
|
||||
{45306C0E-E90B-4E84-A32F-504ED7B5C299}.Profile|x64.Build.0 = Release|x64
|
||||
{45306C0E-E90B-4E84-A32F-504ED7B5C299}.Profile|x64.Deploy.0 = Release|x64
|
||||
{45306C0E-E90B-4E84-A32F-504ED7B5C299}.Release|ARM.ActiveCfg = Release|ARM
|
||||
{45306C0E-E90B-4E84-A32F-504ED7B5C299}.Release|ARM.Build.0 = Release|ARM
|
||||
{45306C0E-E90B-4E84-A32F-504ED7B5C299}.Release|ARM.Deploy.0 = Release|ARM
|
||||
{45306C0E-E90B-4E84-A32F-504ED7B5C299}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{45306C0E-E90B-4E84-A32F-504ED7B5C299}.Release|Win32.Build.0 = Release|Win32
|
||||
{45306C0E-E90B-4E84-A32F-504ED7B5C299}.Release|Win32.Deploy.0 = Release|Win32
|
||||
{45306C0E-E90B-4E84-A32F-504ED7B5C299}.Release|x64.ActiveCfg = Release|x64
|
||||
{45306C0E-E90B-4E84-A32F-504ED7B5C299}.Release|x64.Build.0 = Release|x64
|
||||
{45306C0E-E90B-4E84-A32F-504ED7B5C299}.Release|x64.Deploy.0 = Release|x64
|
||||
{89159C26-2282-404A-A194-103B0A49DF7B}.Debug|ARM.ActiveCfg = Debug|ARM
|
||||
{89159C26-2282-404A-A194-103B0A49DF7B}.Debug|ARM.Build.0 = Debug|ARM
|
||||
{89159C26-2282-404A-A194-103B0A49DF7B}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{89159C26-2282-404A-A194-103B0A49DF7B}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{89159C26-2282-404A-A194-103B0A49DF7B}.Debug|x64.ActiveCfg = Debug|Win32
|
||||
{89159C26-2282-404A-A194-103B0A49DF7B}.Profile|ARM.ActiveCfg = Profile|ARM
|
||||
{89159C26-2282-404A-A194-103B0A49DF7B}.Profile|ARM.Build.0 = Profile|ARM
|
||||
{89159C26-2282-404A-A194-103B0A49DF7B}.Profile|Win32.ActiveCfg = Profile|Win32
|
||||
{89159C26-2282-404A-A194-103B0A49DF7B}.Profile|Win32.Build.0 = Profile|Win32
|
||||
{89159C26-2282-404A-A194-103B0A49DF7B}.Profile|x64.ActiveCfg = Profile|Win32
|
||||
{89159C26-2282-404A-A194-103B0A49DF7B}.Release|ARM.ActiveCfg = Release|ARM
|
||||
{89159C26-2282-404A-A194-103B0A49DF7B}.Release|ARM.Build.0 = Release|ARM
|
||||
{89159C26-2282-404A-A194-103B0A49DF7B}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{89159C26-2282-404A-A194-103B0A49DF7B}.Release|Win32.Build.0 = Release|Win32
|
||||
{89159C26-2282-404A-A194-103B0A49DF7B}.Release|x64.ActiveCfg = Release|Win32
|
||||
{C724E4D7-A1D1-41BE-8F22-382C6CB3CDAC}.Debug|ARM.ActiveCfg = Debug|ARM
|
||||
{C724E4D7-A1D1-41BE-8F22-382C6CB3CDAC}.Debug|ARM.Build.0 = Debug|ARM
|
||||
{C724E4D7-A1D1-41BE-8F22-382C6CB3CDAC}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{C724E4D7-A1D1-41BE-8F22-382C6CB3CDAC}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{C724E4D7-A1D1-41BE-8F22-382C6CB3CDAC}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{C724E4D7-A1D1-41BE-8F22-382C6CB3CDAC}.Debug|x64.Build.0 = Debug|x64
|
||||
{C724E4D7-A1D1-41BE-8F22-382C6CB3CDAC}.Profile|ARM.ActiveCfg = Release|ARM
|
||||
{C724E4D7-A1D1-41BE-8F22-382C6CB3CDAC}.Profile|ARM.Build.0 = Release|ARM
|
||||
{C724E4D7-A1D1-41BE-8F22-382C6CB3CDAC}.Profile|Win32.ActiveCfg = Release|Win32
|
||||
{C724E4D7-A1D1-41BE-8F22-382C6CB3CDAC}.Profile|Win32.Build.0 = Release|Win32
|
||||
{C724E4D7-A1D1-41BE-8F22-382C6CB3CDAC}.Profile|x64.ActiveCfg = Release|x64
|
||||
{C724E4D7-A1D1-41BE-8F22-382C6CB3CDAC}.Profile|x64.Build.0 = Release|x64
|
||||
{C724E4D7-A1D1-41BE-8F22-382C6CB3CDAC}.Release|ARM.ActiveCfg = Release|ARM
|
||||
{C724E4D7-A1D1-41BE-8F22-382C6CB3CDAC}.Release|ARM.Build.0 = Release|ARM
|
||||
{C724E4D7-A1D1-41BE-8F22-382C6CB3CDAC}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{C724E4D7-A1D1-41BE-8F22-382C6CB3CDAC}.Release|Win32.Build.0 = Release|Win32
|
||||
{C724E4D7-A1D1-41BE-8F22-382C6CB3CDAC}.Release|x64.ActiveCfg = Release|x64
|
||||
{C724E4D7-A1D1-41BE-8F22-382C6CB3CDAC}.Release|x64.Build.0 = Release|x64
|
||||
{6CD25DC7-5D2C-48FB-B10B-345F1A13E3F3}.Debug|ARM.ActiveCfg = Debug|ARM
|
||||
{6CD25DC7-5D2C-48FB-B10B-345F1A13E3F3}.Debug|ARM.Build.0 = Debug|ARM
|
||||
{6CD25DC7-5D2C-48FB-B10B-345F1A13E3F3}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{6CD25DC7-5D2C-48FB-B10B-345F1A13E3F3}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{6CD25DC7-5D2C-48FB-B10B-345F1A13E3F3}.Debug|x64.ActiveCfg = Debug|Win32
|
||||
{6CD25DC7-5D2C-48FB-B10B-345F1A13E3F3}.Profile|ARM.ActiveCfg = Release|ARM
|
||||
{6CD25DC7-5D2C-48FB-B10B-345F1A13E3F3}.Profile|ARM.Build.0 = Release|ARM
|
||||
{6CD25DC7-5D2C-48FB-B10B-345F1A13E3F3}.Profile|Win32.ActiveCfg = Release|Win32
|
||||
{6CD25DC7-5D2C-48FB-B10B-345F1A13E3F3}.Profile|Win32.Build.0 = Release|Win32
|
||||
{6CD25DC7-5D2C-48FB-B10B-345F1A13E3F3}.Profile|x64.ActiveCfg = Release|Win32
|
||||
{6CD25DC7-5D2C-48FB-B10B-345F1A13E3F3}.Release|ARM.ActiveCfg = Release|ARM
|
||||
{6CD25DC7-5D2C-48FB-B10B-345F1A13E3F3}.Release|ARM.Build.0 = Release|ARM
|
||||
{6CD25DC7-5D2C-48FB-B10B-345F1A13E3F3}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{6CD25DC7-5D2C-48FB-B10B-345F1A13E3F3}.Release|Win32.Build.0 = Release|Win32
|
||||
{6CD25DC7-5D2C-48FB-B10B-345F1A13E3F3}.Release|x64.ActiveCfg = Release|Win32
|
||||
{1DE5241B-2F18-4662-A196-F5C2A26CE5D6}.Debug|ARM.ActiveCfg = Debug|ARM
|
||||
{1DE5241B-2F18-4662-A196-F5C2A26CE5D6}.Debug|ARM.Build.0 = Debug|ARM
|
||||
{1DE5241B-2F18-4662-A196-F5C2A26CE5D6}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{1DE5241B-2F18-4662-A196-F5C2A26CE5D6}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{1DE5241B-2F18-4662-A196-F5C2A26CE5D6}.Debug|x64.ActiveCfg = Debug|Win32
|
||||
{1DE5241B-2F18-4662-A196-F5C2A26CE5D6}.Profile|ARM.ActiveCfg = Release|ARM
|
||||
{1DE5241B-2F18-4662-A196-F5C2A26CE5D6}.Profile|ARM.Build.0 = Release|ARM
|
||||
{1DE5241B-2F18-4662-A196-F5C2A26CE5D6}.Profile|Win32.ActiveCfg = Release|Win32
|
||||
{1DE5241B-2F18-4662-A196-F5C2A26CE5D6}.Profile|Win32.Build.0 = Release|Win32
|
||||
{1DE5241B-2F18-4662-A196-F5C2A26CE5D6}.Profile|x64.ActiveCfg = Release|Win32
|
||||
{1DE5241B-2F18-4662-A196-F5C2A26CE5D6}.Release|ARM.ActiveCfg = Release|ARM
|
||||
{1DE5241B-2F18-4662-A196-F5C2A26CE5D6}.Release|ARM.Build.0 = Release|ARM
|
||||
{1DE5241B-2F18-4662-A196-F5C2A26CE5D6}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{1DE5241B-2F18-4662-A196-F5C2A26CE5D6}.Release|Win32.Build.0 = Release|Win32
|
||||
{1DE5241B-2F18-4662-A196-F5C2A26CE5D6}.Release|x64.ActiveCfg = Release|Win32
|
||||
{6BEE6FBA-C260-4A82-A8DA-6463F4FFA470}.Debug|ARM.ActiveCfg = Debug|ARM
|
||||
{6BEE6FBA-C260-4A82-A8DA-6463F4FFA470}.Debug|ARM.Build.0 = Debug|ARM
|
||||
{6BEE6FBA-C260-4A82-A8DA-6463F4FFA470}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{6BEE6FBA-C260-4A82-A8DA-6463F4FFA470}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{6BEE6FBA-C260-4A82-A8DA-6463F4FFA470}.Debug|x64.ActiveCfg = Debug|Win32
|
||||
{6BEE6FBA-C260-4A82-A8DA-6463F4FFA470}.Profile|ARM.ActiveCfg = Release|ARM
|
||||
{6BEE6FBA-C260-4A82-A8DA-6463F4FFA470}.Profile|ARM.Build.0 = Release|ARM
|
||||
{6BEE6FBA-C260-4A82-A8DA-6463F4FFA470}.Profile|Win32.ActiveCfg = Release|Win32
|
||||
{6BEE6FBA-C260-4A82-A8DA-6463F4FFA470}.Profile|Win32.Build.0 = Release|Win32
|
||||
{6BEE6FBA-C260-4A82-A8DA-6463F4FFA470}.Profile|x64.ActiveCfg = Release|Win32
|
||||
{6BEE6FBA-C260-4A82-A8DA-6463F4FFA470}.Release|ARM.ActiveCfg = Release|ARM
|
||||
{6BEE6FBA-C260-4A82-A8DA-6463F4FFA470}.Release|ARM.Build.0 = Release|ARM
|
||||
{6BEE6FBA-C260-4A82-A8DA-6463F4FFA470}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{6BEE6FBA-C260-4A82-A8DA-6463F4FFA470}.Release|Win32.Build.0 = Release|Win32
|
||||
{6BEE6FBA-C260-4A82-A8DA-6463F4FFA470}.Release|x64.ActiveCfg = Release|Win32
|
||||
{B1A69919-8795-4071-AD05-883294596217}.Debug|ARM.ActiveCfg = Debug|ARM
|
||||
{B1A69919-8795-4071-AD05-883294596217}.Debug|ARM.Build.0 = Debug|ARM
|
||||
{B1A69919-8795-4071-AD05-883294596217}.Debug|ARM.Deploy.0 = Debug|ARM
|
||||
{B1A69919-8795-4071-AD05-883294596217}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{B1A69919-8795-4071-AD05-883294596217}.Debug|x64.ActiveCfg = Debug|Win32
|
||||
{B1A69919-8795-4071-AD05-883294596217}.Profile|ARM.ActiveCfg = Release|ARM
|
||||
{B1A69919-8795-4071-AD05-883294596217}.Profile|ARM.Build.0 = Release|ARM
|
||||
{B1A69919-8795-4071-AD05-883294596217}.Profile|ARM.Deploy.0 = Release|ARM
|
||||
{B1A69919-8795-4071-AD05-883294596217}.Profile|Win32.ActiveCfg = Release|Win32
|
||||
{B1A69919-8795-4071-AD05-883294596217}.Profile|Win32.Build.0 = Release|Win32
|
||||
{B1A69919-8795-4071-AD05-883294596217}.Profile|Win32.Deploy.0 = Release|Win32
|
||||
{B1A69919-8795-4071-AD05-883294596217}.Profile|x64.ActiveCfg = Release|Win32
|
||||
{B1A69919-8795-4071-AD05-883294596217}.Release|ARM.ActiveCfg = Release|ARM
|
||||
{B1A69919-8795-4071-AD05-883294596217}.Release|ARM.Build.0 = Release|ARM
|
||||
{B1A69919-8795-4071-AD05-883294596217}.Release|ARM.Deploy.0 = Release|ARM
|
||||
{B1A69919-8795-4071-AD05-883294596217}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{B1A69919-8795-4071-AD05-883294596217}.Release|Win32.Build.0 = Release|Win32
|
||||
{B1A69919-8795-4071-AD05-883294596217}.Release|Win32.Deploy.0 = Release|Win32
|
||||
{B1A69919-8795-4071-AD05-883294596217}.Release|x64.ActiveCfg = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(NestedProjects) = preSolution
|
||||
{45306C0E-E90B-4E84-A32F-504ED7B5C299} = {8314F48C-574C-483F-AA48-55A29510CC00}
|
||||
{1C587904-01BA-482E-806E-0617AEA0B059} = {8314F48C-574C-483F-AA48-55A29510CC00}
|
||||
{B1A69919-8795-4071-AD05-883294596217} = {8314F48C-574C-483F-AA48-55A29510CC00}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
249
projects/mtg/WRL/Wagic.vcxproj.filters
Normal file
@@ -0,0 +1,249 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="Common">
|
||||
<UniqueIdentifier>45306c0e-e90b-4e84-a32f-504ed7b5c299</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Assets">
|
||||
<UniqueIdentifier>fa0c4a9e-0e3e-41e3-b373-64a5adc01ce4</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\src\AbilityParser.cpp" />
|
||||
<ClCompile Include="..\src\ActionElement.cpp" />
|
||||
<ClCompile Include="..\src\ActionLayer.cpp" />
|
||||
<ClCompile Include="..\src\ActionStack.cpp" />
|
||||
<ClCompile Include="..\src\AIHints.cpp" />
|
||||
<ClCompile Include="..\src\AIMomirPlayer.cpp" />
|
||||
<ClCompile Include="..\src\AIPlayer.cpp" />
|
||||
<ClCompile Include="..\src\AIPlayerBaka.cpp" />
|
||||
<ClCompile Include="..\src\AIPlayerBakaB.cpp" />
|
||||
<ClCompile Include="..\src\AIStats.cpp" />
|
||||
<ClCompile Include="..\src\AllAbilities.cpp" />
|
||||
<ClCompile Include="..\src\CardDescriptor.cpp" />
|
||||
<ClCompile Include="..\src\CardDisplay.cpp" />
|
||||
<ClCompile Include="..\src\CardGui.cpp" />
|
||||
<ClCompile Include="..\src\CardPrimitive.cpp" />
|
||||
<ClCompile Include="..\src\CardSelector.cpp" />
|
||||
<ClCompile Include="..\src\CardSelectorSingleton.cpp" />
|
||||
<ClCompile Include="..\src\CarouselDeckView.cpp" />
|
||||
<ClCompile Include="..\src\Closest.cpp" />
|
||||
<ClCompile Include="..\src\Counters.cpp" />
|
||||
<ClCompile Include="..\src\Credits.cpp" />
|
||||
<ClCompile Include="..\src\Damage.cpp" />
|
||||
<ClCompile Include="..\src\DamagerDamaged.cpp" />
|
||||
<ClCompile Include="..\src\DeckDataWrapper.cpp" />
|
||||
<ClCompile Include="..\src\DeckEditorMenu.cpp" />
|
||||
<ClCompile Include="..\src\DeckManager.cpp" />
|
||||
<ClCompile Include="..\src\DeckMenu.cpp" />
|
||||
<ClCompile Include="..\src\DeckMenuItem.cpp" />
|
||||
<ClCompile Include="..\src\DeckMetaData.cpp" />
|
||||
<ClCompile Include="..\src\DeckStats.cpp" />
|
||||
<ClCompile Include="..\src\DeckView.cpp" />
|
||||
<ClCompile Include="..\src\DuelLayers.cpp" />
|
||||
<ClCompile Include="..\src\ExtraCost.cpp" />
|
||||
<ClCompile Include="..\src\GameApp.cpp" />
|
||||
<ClCompile Include="..\src\GameLauncher.cpp" />
|
||||
<ClCompile Include="..\src\GameObserver.cpp" />
|
||||
<ClCompile Include="..\src\GameOptions.cpp" />
|
||||
<ClCompile Include="..\src\GameState.cpp" />
|
||||
<ClCompile Include="..\src\GameStateAwards.cpp" />
|
||||
<ClCompile Include="..\src\GameStateDeckViewer.cpp" />
|
||||
<ClCompile Include="..\src\GameStateDuel.cpp" />
|
||||
<ClCompile Include="..\src\GameStateMenu.cpp" />
|
||||
<ClCompile Include="..\src\GameStateOptions.cpp" />
|
||||
<ClCompile Include="..\src\GameStateShop.cpp" />
|
||||
<ClCompile Include="..\src\GameStateStory.cpp" />
|
||||
<ClCompile Include="..\src\GameStateTransitions.cpp" />
|
||||
<ClCompile Include="..\src\GridDeckView.cpp" />
|
||||
<ClCompile Include="..\src\GuiAvatars.cpp" />
|
||||
<ClCompile Include="..\src\GuiBackground.cpp" />
|
||||
<ClCompile Include="..\src\GuiCardsController.cpp" />
|
||||
<ClCompile Include="..\src\GuiCombat.cpp" />
|
||||
<ClCompile Include="..\src\GuiFrame.cpp" />
|
||||
<ClCompile Include="..\src\GuiHand.cpp" />
|
||||
<ClCompile Include="..\src\GuiLayers.cpp" />
|
||||
<ClCompile Include="..\src\GuiMana.cpp" />
|
||||
<ClCompile Include="..\src\GuiPhaseBar.cpp" />
|
||||
<ClCompile Include="..\src\GuiPlay.cpp" />
|
||||
<ClCompile Include="..\src\GuiStatic.cpp" />
|
||||
<ClCompile Include="..\src\IconButton.cpp" />
|
||||
<ClCompile Include="..\src\InteractiveButton.cpp" />
|
||||
<ClCompile Include="..\src\ManaCost.cpp" />
|
||||
<ClCompile Include="..\src\ManaCostHybrid.cpp" />
|
||||
<ClCompile Include="..\src\MenuItem.cpp" />
|
||||
<ClCompile Include="..\src\ModRules.cpp" />
|
||||
<ClCompile Include="..\src\MTGAbility.cpp" />
|
||||
<ClCompile Include="..\src\MTGCard.cpp" />
|
||||
<ClCompile Include="..\src\MTGCardInstance.cpp" />
|
||||
<ClCompile Include="..\src\MTGDeck.cpp" />
|
||||
<ClCompile Include="..\src\MTGDefinitions.cpp" />
|
||||
<ClCompile Include="..\src\MTGGamePhase.cpp" />
|
||||
<ClCompile Include="..\src\MTGGameZones.cpp" />
|
||||
<ClCompile Include="..\src\MTGPack.cpp" />
|
||||
<ClCompile Include="..\src\MTGRules.cpp" />
|
||||
<ClCompile Include="..\src\Navigator.cpp" />
|
||||
<ClCompile Include="..\src\NetworkPlayer.cpp" />
|
||||
<ClCompile Include="..\src\ObjectAnalytics.cpp" />
|
||||
<ClCompile Include="..\src\OptionItem.cpp" />
|
||||
<ClCompile Include="..\src\PhaseRing.cpp" />
|
||||
<ClCompile Include="..\src\Player.cpp" />
|
||||
<ClCompile Include="..\src\PlayerData.cpp" />
|
||||
<ClCompile Include="..\src\PlayGuiObject.cpp" />
|
||||
<ClCompile Include="..\src\PlayGuiObjectController.cpp" />
|
||||
<ClCompile Include="..\src\PlayRestrictions.cpp" />
|
||||
<ClCompile Include="..\src\Pos.cpp" />
|
||||
<ClCompile Include="..\src\PrecompiledHeader.cpp" />
|
||||
<ClCompile Include="..\src\PriceList.cpp" />
|
||||
<ClCompile Include="..\src\ReplacementEffects.cpp" />
|
||||
<ClCompile Include="..\src\Rules.cpp" />
|
||||
<ClCompile Include="..\src\SimpleButton.cpp" />
|
||||
<ClCompile Include="..\src\SimpleMenu.cpp" />
|
||||
<ClCompile Include="..\src\SimpleMenuItem.cpp" />
|
||||
<ClCompile Include="..\src\SimplePad.cpp" />
|
||||
<ClCompile Include="..\src\SimplePopup.cpp" />
|
||||
<ClCompile Include="..\src\StoryFlow.cpp" />
|
||||
<ClCompile Include="..\src\StyleManager.cpp" />
|
||||
<ClCompile Include="..\src\Subtypes.cpp" />
|
||||
<ClCompile Include="..\src\TargetChooser.cpp" />
|
||||
<ClCompile Include="..\src\TargetsList.cpp" />
|
||||
<ClCompile Include="..\src\Tasks.cpp" />
|
||||
<ClCompile Include="..\src\TestSuiteAI.cpp" />
|
||||
<ClCompile Include="..\src\TextScroller.cpp" />
|
||||
<ClCompile Include="..\src\ThisDescriptor.cpp" />
|
||||
<ClCompile Include="..\src\Token.cpp" />
|
||||
<ClCompile Include="..\src\Translate.cpp" />
|
||||
<ClCompile Include="..\src\TranslateKeys.cpp" />
|
||||
<ClCompile Include="..\src\Trash.cpp" />
|
||||
<ClCompile Include="..\src\utils.cpp" />
|
||||
<ClCompile Include="..\src\WCachedResource.cpp" />
|
||||
<ClCompile Include="..\src\WDataSrc.cpp" />
|
||||
<ClCompile Include="..\src\WEvent.cpp" />
|
||||
<ClCompile Include="..\src\WFilter.cpp" />
|
||||
<ClCompile Include="..\src\WFont.cpp" />
|
||||
<ClCompile Include="..\src\WGui.cpp" />
|
||||
<ClCompile Include="..\src\WResourceManager.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\include\AbilityParser.h" />
|
||||
<ClInclude Include="..\include\ActionElement.h" />
|
||||
<ClInclude Include="..\include\ActionLayer.h" />
|
||||
<ClInclude Include="..\include\ActionStack.h" />
|
||||
<ClInclude Include="..\include\AIHints.h" />
|
||||
<ClInclude Include="..\include\AIMomirPlayer.h" />
|
||||
<ClInclude Include="..\include\AIPlayer.h" />
|
||||
<ClInclude Include="..\include\AIPlayerBaka.h" />
|
||||
<ClInclude Include="..\include\AIPlayerBakaB.h" />
|
||||
<ClInclude Include="..\include\AIStats.h" />
|
||||
<ClInclude Include="..\include\AllAbilities.h" />
|
||||
<ClInclude Include="..\include\CacheEngine.h" />
|
||||
<ClInclude Include="..\include\CardDescriptor.h" />
|
||||
<ClInclude Include="..\include\CardDisplay.h" />
|
||||
<ClInclude Include="..\include\CardGui.h" />
|
||||
<ClInclude Include="..\include\CardPrimitive.h" />
|
||||
<ClInclude Include="..\include\CardSelector.h" />
|
||||
<ClInclude Include="..\include\CardSelectorSingleton.h" />
|
||||
<ClInclude Include="..\include\CarouselDeckView.h" />
|
||||
<ClInclude Include="..\include\config.h" />
|
||||
<ClInclude Include="..\include\Counters.h" />
|
||||
<ClInclude Include="..\include\Credits.h" />
|
||||
<ClInclude Include="..\include\Damage.h" />
|
||||
<ClInclude Include="..\include\DamagerDamaged.h" />
|
||||
<ClInclude Include="..\include\DeckDataWrapper.h" />
|
||||
<ClInclude Include="..\include\DeckEditorMenu.h" />
|
||||
<ClInclude Include="..\include\DeckManager.h" />
|
||||
<ClInclude Include="..\include\DeckMenu.h" />
|
||||
<ClInclude Include="..\include\DeckMenuItem.h" />
|
||||
<ClInclude Include="..\include\DeckMetaData.h" />
|
||||
<ClInclude Include="..\include\DeckStats.h" />
|
||||
<ClInclude Include="..\include\DeckView.h" />
|
||||
<ClInclude Include="..\include\DuelLayers.h" />
|
||||
<ClInclude Include="..\include\Easing.h" />
|
||||
<ClInclude Include="..\include\ExtraCost.h" />
|
||||
<ClInclude Include="..\include\GameApp.h" />
|
||||
<ClInclude Include="..\include\GameObserver.h" />
|
||||
<ClInclude Include="..\include\GameOptions.h" />
|
||||
<ClInclude Include="..\include\GameState.h" />
|
||||
<ClInclude Include="..\include\GameStateAwards.h" />
|
||||
<ClInclude Include="..\include\GameStateDeckViewer.h" />
|
||||
<ClInclude Include="..\include\GameStateDuel.h" />
|
||||
<ClInclude Include="..\include\GameStateMenu.h" />
|
||||
<ClInclude Include="..\include\GameStateOptions.h" />
|
||||
<ClInclude Include="..\include\GameStateShop.h" />
|
||||
<ClInclude Include="..\include\GameStateStory.h" />
|
||||
<ClInclude Include="..\include\GameStateTransitions.h" />
|
||||
<ClInclude Include="..\include\GridDeckView.h" />
|
||||
<ClInclude Include="..\include\GuiAvatars.h" />
|
||||
<ClInclude Include="..\include\GuiBackground.h" />
|
||||
<ClInclude Include="..\include\GuiCardsController.h" />
|
||||
<ClInclude Include="..\include\GuiCombat.h" />
|
||||
<ClInclude Include="..\include\GuiFrame.h" />
|
||||
<ClInclude Include="..\include\GuiHand.h" />
|
||||
<ClInclude Include="..\include\GuiLayers.h" />
|
||||
<ClInclude Include="..\include\GuiMana.h" />
|
||||
<ClInclude Include="..\include\GuiPhaseBar.h" />
|
||||
<ClInclude Include="..\include\GuiPlay.h" />
|
||||
<ClInclude Include="..\include\GuiStatic.h" />
|
||||
<ClInclude Include="..\include\IconButton.h" />
|
||||
<ClInclude Include="..\include\InteractiveButton.h" />
|
||||
<ClInclude Include="..\include\ManaCost.h" />
|
||||
<ClInclude Include="..\include\ManaCostHybrid.h" />
|
||||
<ClInclude Include="..\include\MenuItem.h" />
|
||||
<ClInclude Include="..\include\ModRules.h" />
|
||||
<ClInclude Include="..\include\MTGAbility.h" />
|
||||
<ClInclude Include="..\include\MTGCard.h" />
|
||||
<ClInclude Include="..\include\MTGCardInstance.h" />
|
||||
<ClInclude Include="..\include\MTGDeck.h" />
|
||||
<ClInclude Include="..\include\MTGDefinitions.h" />
|
||||
<ClInclude Include="..\include\MTGGamePhase.h" />
|
||||
<ClInclude Include="..\include\MTGGameZones.h" />
|
||||
<ClInclude Include="..\include\MTGPack.h" />
|
||||
<ClInclude Include="..\include\MTGRules.h" />
|
||||
<ClInclude Include="..\include\Navigator.h" />
|
||||
<ClInclude Include="..\include\NetworkPlayer.h" />
|
||||
<ClInclude Include="..\include\ObjectAnalytics.h" />
|
||||
<ClInclude Include="..\include\OptionItem.h" />
|
||||
<ClInclude Include="..\include\OSD.h" />
|
||||
<ClInclude Include="..\include\PhaseRing.h" />
|
||||
<ClInclude Include="..\include\Player.h" />
|
||||
<ClInclude Include="..\include\PlayerData.h" />
|
||||
<ClInclude Include="..\include\PlayGuiObject.h" />
|
||||
<ClInclude Include="..\include\PlayGuiObjectController.h" />
|
||||
<ClInclude Include="..\include\PlayRestrictions.h" />
|
||||
<ClInclude Include="..\include\Pos.h" />
|
||||
<ClInclude Include="..\include\PrecompiledHeader.h" />
|
||||
<ClInclude Include="..\include\PriceList.h" />
|
||||
<ClInclude Include="..\include\ReplacementEffects.h" />
|
||||
<ClInclude Include="..\include\Rules.h" />
|
||||
<ClInclude Include="..\include\SimpleButton.h" />
|
||||
<ClInclude Include="..\include\SimpleMenu.h" />
|
||||
<ClInclude Include="..\include\SimpleMenuItem.h" />
|
||||
<ClInclude Include="..\include\SimplePad.h" />
|
||||
<ClInclude Include="..\include\SimplePopup.h" />
|
||||
<ClInclude Include="..\include\StoryFlow.h" />
|
||||
<ClInclude Include="..\include\StyleManager.h" />
|
||||
<ClInclude Include="..\include\Subtypes.h" />
|
||||
<ClInclude Include="..\include\Targetable.h" />
|
||||
<ClInclude Include="..\include\TargetChooser.h" />
|
||||
<ClInclude Include="..\include\TargetsList.h" />
|
||||
<ClInclude Include="..\include\Tasks.h" />
|
||||
<ClInclude Include="..\include\TestSuiteAI.h" />
|
||||
<ClInclude Include="..\include\TextScroller.h" />
|
||||
<ClInclude Include="..\include\ThisDescriptor.h" />
|
||||
<ClInclude Include="..\include\Token.h" />
|
||||
<ClInclude Include="..\include\Translate.h" />
|
||||
<ClInclude Include="..\include\TranslateKeys.h" />
|
||||
<ClInclude Include="..\include\Trash.h" />
|
||||
<ClInclude Include="..\include\utils.h" />
|
||||
<ClInclude Include="..\include\Wagic_Version.h" />
|
||||
<ClInclude Include="..\include\WCachedResource.h" />
|
||||
<ClInclude Include="..\include\WDataSrc.h" />
|
||||
<ClInclude Include="..\include\WEvent.h" />
|
||||
<ClInclude Include="..\include\WFilter.h" />
|
||||
<ClInclude Include="..\include\WFont.h" />
|
||||
<ClInclude Include="..\include\WGui.h" />
|
||||
<ClInclude Include="..\include\WResourceManager.h" />
|
||||
<ClInclude Include="..\include\WResourceManagerImpl.h" />
|
||||
<ClInclude Include="..\include\WResource_Fwd.h" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
787
projects/mtg/WRL/wagic.vcxproj
Normal file
@@ -0,0 +1,787 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|ARM">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>ARM</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|ARM">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>ARM</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{c724e4d7-a1d1-41be-8f22-382c6cb3cdac}</ProjectGuid>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<ProjectName>wagic</ProjectName>
|
||||
<RootNamespace>wagic</RootNamespace>
|
||||
<DefaultLanguage>en-US</DefaultLanguage>
|
||||
<MinimumVisualStudioVersion>12.0</MinimumVisualStudioVersion>
|
||||
<AppContainerApplication>true</AppContainerApplication>
|
||||
<ApplicationType>Windows Store</ApplicationType>
|
||||
<ApplicationTypeRevision>8.1</ApplicationTypeRevision>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v120</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v120</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v120</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v120</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v120</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<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|ARM'">
|
||||
<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|ARM'">
|
||||
<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 />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<GenerateManifest>false</GenerateManifest>
|
||||
<OutDir>$(SolutionDir)$(Platform)\$(Configuration)\$(MSBuildProjectName)\</OutDir>
|
||||
<IntDir>$(Platform)\$(Configuration)\$(ProjectName)</IntDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<GenerateManifest>false</GenerateManifest>
|
||||
<OutDir>$(SolutionDir)$(Platform)\$(Configuration)\$(MSBuildProjectName)\</OutDir>
|
||||
<IntDir>$(Platform)\$(Configuration)\$(ProjectName)</IntDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
|
||||
<GenerateManifest>false</GenerateManifest>
|
||||
<IntDir>$(Platform)\$(Configuration)\$(ProjectName)</IntDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
|
||||
<GenerateManifest>false</GenerateManifest>
|
||||
<IntDir>$(Platform)\$(Configuration)\$(ProjectName)</IntDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<GenerateManifest>false</GenerateManifest>
|
||||
<IntDir>$(Platform)\$(Configuration)\$(ProjectName)</IntDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<GenerateManifest>false</GenerateManifest>
|
||||
<IntDir>$(Platform)\$(Configuration)\$(ProjectName)</IntDir>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
<CompileAsWinRT>false</CompileAsWinRT>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<AdditionalIncludeDirectories>../include;../../../JGE/include;../../../JGE/src/zipFS;../../../JGE/Dependencies/zlib;../../../JGE/Dependencies/libpng;../../../JGE/Dependencies/libjpeg;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>TIXML_USE_STL;WP8;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
|
||||
<GenerateWindowsMetadata>false</GenerateWindowsMetadata>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
<CompileAsWinRT>false</CompileAsWinRT>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<AdditionalIncludeDirectories>../include;../../../JGE/include;../../../JGE/src/zipFS;../../../JGE/Dependencies/zlib;../../../JGE/Dependencies/libpng;../../../JGE/Dependencies/libjpeg;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>TIXML_USE_STL;WP8;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
|
||||
<GenerateWindowsMetadata>false</GenerateWindowsMetadata>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|arm'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
<CompileAsWinRT>false</CompileAsWinRT>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<AdditionalIncludeDirectories>../include;../../../JGE/include;../../../JGE/src/zipFS;../../../JGE/Dependencies/zlib;../../../JGE/Dependencies/libpng;../../../JGE/Dependencies/libjpeg;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>TIXML_USE_STL;WP8;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
|
||||
<GenerateWindowsMetadata>false</GenerateWindowsMetadata>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|arm'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
<CompileAsWinRT>false</CompileAsWinRT>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<AdditionalIncludeDirectories>../include;../../../JGE/include;../../../JGE/src/zipFS;../../../JGE/Dependencies/zlib;../../../JGE/Dependencies/libpng;../../../JGE/Dependencies/libjpeg;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>TIXML_USE_STL;WP8;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
|
||||
<GenerateWindowsMetadata>false</GenerateWindowsMetadata>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
<CompileAsWinRT>false</CompileAsWinRT>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<AdditionalIncludeDirectories>../include;../../../JGE/include;../../../JGE/src/zipFS;../../../JGE/Dependencies/zlib;../../../JGE/Dependencies/libpng;../../../JGE/Dependencies/libjpeg;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>TIXML_USE_STL;WP8;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
|
||||
<GenerateWindowsMetadata>false</GenerateWindowsMetadata>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
<CompileAsWinRT>false</CompileAsWinRT>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<AdditionalIncludeDirectories>../include;../../../JGE/include;../../../JGE/src/zipFS;../../../JGE/Dependencies/zlib;../../../JGE/Dependencies/libpng;../../../JGE/Dependencies/libjpeg;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>TIXML_USE_STL;WP8;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
|
||||
<GenerateWindowsMetadata>false</GenerateWindowsMetadata>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\include\AbilityParser.h" />
|
||||
<ClInclude Include="..\include\ActionElement.h" />
|
||||
<ClInclude Include="..\include\ActionLayer.h" />
|
||||
<ClInclude Include="..\include\ActionStack.h" />
|
||||
<ClInclude Include="..\include\AIHints.h" />
|
||||
<ClInclude Include="..\include\AIMomirPlayer.h" />
|
||||
<ClInclude Include="..\include\AIPlayer.h" />
|
||||
<ClInclude Include="..\include\AIPlayerBaka.h" />
|
||||
<ClInclude Include="..\include\AIPlayerBakaB.h" />
|
||||
<ClInclude Include="..\include\AIStats.h" />
|
||||
<ClInclude Include="..\include\AllAbilities.h" />
|
||||
<ClInclude Include="..\include\CacheEngine.h" />
|
||||
<ClInclude Include="..\include\CardDescriptor.h" />
|
||||
<ClInclude Include="..\include\CardDisplay.h" />
|
||||
<ClInclude Include="..\include\CardGui.h" />
|
||||
<ClInclude Include="..\include\CardPrimitive.h" />
|
||||
<ClInclude Include="..\include\CardSelector.h" />
|
||||
<ClInclude Include="..\include\CardSelectorSingleton.h" />
|
||||
<ClInclude Include="..\include\CarouselDeckView.h" />
|
||||
<ClInclude Include="..\include\config.h" />
|
||||
<ClInclude Include="..\include\Counters.h" />
|
||||
<ClInclude Include="..\include\Credits.h" />
|
||||
<ClInclude Include="..\include\Damage.h" />
|
||||
<ClInclude Include="..\include\DamagerDamaged.h" />
|
||||
<ClInclude Include="..\include\DeckDataWrapper.h" />
|
||||
<ClInclude Include="..\include\DeckEditorMenu.h" />
|
||||
<ClInclude Include="..\include\DeckManager.h" />
|
||||
<ClInclude Include="..\include\DeckMenu.h" />
|
||||
<ClInclude Include="..\include\DeckMenuItem.h" />
|
||||
<ClInclude Include="..\include\DeckMetaData.h" />
|
||||
<ClInclude Include="..\include\DeckStats.h" />
|
||||
<ClInclude Include="..\include\DeckView.h" />
|
||||
<ClInclude Include="..\include\DuelLayers.h" />
|
||||
<ClInclude Include="..\include\Easing.h" />
|
||||
<ClInclude Include="..\include\ExtraCost.h" />
|
||||
<ClInclude Include="..\include\GameApp.h" />
|
||||
<ClInclude Include="..\include\GameObserver.h" />
|
||||
<ClInclude Include="..\include\GameOptions.h" />
|
||||
<ClInclude Include="..\include\GameState.h" />
|
||||
<ClInclude Include="..\include\GameStateAwards.h" />
|
||||
<ClInclude Include="..\include\GameStateDeckViewer.h" />
|
||||
<ClInclude Include="..\include\GameStateDuel.h" />
|
||||
<ClInclude Include="..\include\GameStateMenu.h" />
|
||||
<ClInclude Include="..\include\GameStateOptions.h" />
|
||||
<ClInclude Include="..\include\GameStateShop.h" />
|
||||
<ClInclude Include="..\include\GameStateStory.h" />
|
||||
<ClInclude Include="..\include\GameStateTransitions.h" />
|
||||
<ClInclude Include="..\include\GridDeckView.h" />
|
||||
<ClInclude Include="..\include\GuiAvatars.h" />
|
||||
<ClInclude Include="..\include\GuiBackground.h" />
|
||||
<ClInclude Include="..\include\GuiCardsController.h" />
|
||||
<ClInclude Include="..\include\GuiCombat.h" />
|
||||
<ClInclude Include="..\include\GuiFrame.h" />
|
||||
<ClInclude Include="..\include\GuiHand.h" />
|
||||
<ClInclude Include="..\include\GuiLayers.h" />
|
||||
<ClInclude Include="..\include\GuiMana.h" />
|
||||
<ClInclude Include="..\include\GuiPhaseBar.h" />
|
||||
<ClInclude Include="..\include\GuiPlay.h" />
|
||||
<ClInclude Include="..\include\GuiStatic.h" />
|
||||
<ClInclude Include="..\include\IconButton.h" />
|
||||
<ClInclude Include="..\include\InteractiveButton.h" />
|
||||
<ClInclude Include="..\include\ManaCost.h" />
|
||||
<ClInclude Include="..\include\ManaCostHybrid.h" />
|
||||
<ClInclude Include="..\include\MenuItem.h" />
|
||||
<ClInclude Include="..\include\ModRules.h" />
|
||||
<ClInclude Include="..\include\MTGAbility.h" />
|
||||
<ClInclude Include="..\include\MTGCard.h" />
|
||||
<ClInclude Include="..\include\MTGCardInstance.h" />
|
||||
<ClInclude Include="..\include\MTGDeck.h" />
|
||||
<ClInclude Include="..\include\MTGDefinitions.h" />
|
||||
<ClInclude Include="..\include\MTGGamePhase.h" />
|
||||
<ClInclude Include="..\include\MTGGameZones.h" />
|
||||
<ClInclude Include="..\include\MTGPack.h" />
|
||||
<ClInclude Include="..\include\MTGRules.h" />
|
||||
<ClInclude Include="..\include\Navigator.h" />
|
||||
<ClInclude Include="..\include\NetworkPlayer.h" />
|
||||
<ClInclude Include="..\include\ObjectAnalytics.h" />
|
||||
<ClInclude Include="..\include\OptionItem.h" />
|
||||
<ClInclude Include="..\include\OSD.h" />
|
||||
<ClInclude Include="..\include\PhaseRing.h" />
|
||||
<ClInclude Include="..\include\Player.h" />
|
||||
<ClInclude Include="..\include\PlayerData.h" />
|
||||
<ClInclude Include="..\include\PlayGuiObject.h" />
|
||||
<ClInclude Include="..\include\PlayGuiObjectController.h" />
|
||||
<ClInclude Include="..\include\PlayRestrictions.h" />
|
||||
<ClInclude Include="..\include\Pos.h" />
|
||||
<ClInclude Include="..\include\PrecompiledHeader.h" />
|
||||
<ClInclude Include="..\include\PriceList.h" />
|
||||
<ClInclude Include="..\include\ReplacementEffects.h" />
|
||||
<ClInclude Include="..\include\Rules.h" />
|
||||
<ClInclude Include="..\include\SimpleButton.h" />
|
||||
<ClInclude Include="..\include\SimpleMenu.h" />
|
||||
<ClInclude Include="..\include\SimpleMenuItem.h" />
|
||||
<ClInclude Include="..\include\SimplePad.h" />
|
||||
<ClInclude Include="..\include\SimplePopup.h" />
|
||||
<ClInclude Include="..\include\StoryFlow.h" />
|
||||
<ClInclude Include="..\include\StyleManager.h" />
|
||||
<ClInclude Include="..\include\Subtypes.h" />
|
||||
<ClInclude Include="..\include\Targetable.h" />
|
||||
<ClInclude Include="..\include\TargetChooser.h" />
|
||||
<ClInclude Include="..\include\TargetsList.h" />
|
||||
<ClInclude Include="..\include\Tasks.h" />
|
||||
<ClInclude Include="..\include\TestSuiteAI.h" />
|
||||
<ClInclude Include="..\include\TextScroller.h" />
|
||||
<ClInclude Include="..\include\ThisDescriptor.h" />
|
||||
<ClInclude Include="..\include\Token.h" />
|
||||
<ClInclude Include="..\include\Translate.h" />
|
||||
<ClInclude Include="..\include\TranslateKeys.h" />
|
||||
<ClInclude Include="..\include\Trash.h" />
|
||||
<ClInclude Include="..\include\utils.h" />
|
||||
<ClInclude Include="..\include\Wagic_Version.h" />
|
||||
<ClInclude Include="..\include\WCachedResource.h" />
|
||||
<ClInclude Include="..\include\WDataSrc.h" />
|
||||
<ClInclude Include="..\include\WEvent.h" />
|
||||
<ClInclude Include="..\include\WFilter.h" />
|
||||
<ClInclude Include="..\include\WFont.h" />
|
||||
<ClInclude Include="..\include\WGui.h" />
|
||||
<ClInclude Include="..\include\WResourceManager.h" />
|
||||
<ClInclude Include="..\include\WResourceManagerImpl.h" />
|
||||
<ClInclude Include="..\include\WResource_Fwd.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\src\AbilityParser.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\ActionElement.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\ActionLayer.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\ActionStack.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\AIHints.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\AIMomirPlayer.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\AIPlayer.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\AIPlayerBaka.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\AIPlayerBakaB.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\AIStats.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\AllAbilities.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\CardDescriptor.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\CardDisplay.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\CardGui.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\CardPrimitive.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\CardSelector.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\CardSelectorSingleton.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\CarouselDeckView.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\Closest.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\Counters.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\Credits.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\Damage.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\DamagerDamaged.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\DeckDataWrapper.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\DeckEditorMenu.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\DeckManager.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\DeckMenu.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\DeckMenuItem.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\DeckMetaData.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\DeckStats.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\DeckView.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\DuelLayers.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\ExtraCost.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\GameApp.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\GameLauncher.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\GameObserver.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\GameOptions.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\GameState.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\GameStateAwards.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\GameStateDeckViewer.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\GameStateDuel.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\GameStateMenu.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\GameStateOptions.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\GameStateShop.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\GameStateStory.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\GameStateTransitions.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\GridDeckView.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\GuiAvatars.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\GuiBackground.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\GuiCardsController.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\GuiCombat.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\GuiFrame.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\GuiHand.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\GuiLayers.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\GuiMana.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\GuiPhaseBar.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\GuiPlay.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\GuiStatic.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\IconButton.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\InteractiveButton.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\ManaCost.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\ManaCostHybrid.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\MenuItem.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\ModRules.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\MTGAbility.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\MTGCard.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\MTGCardInstance.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\MTGDeck.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\MTGDefinitions.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\MTGGamePhase.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\MTGGameZones.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\MTGPack.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\MTGRules.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\Navigator.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\NetworkPlayer.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\ObjectAnalytics.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\OptionItem.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\PhaseRing.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\Player.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\PlayerData.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\PlayGuiObject.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\PlayGuiObjectController.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\PlayRestrictions.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\Pos.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\PrecompiledHeader.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\PriceList.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\ReplacementEffects.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\Rules.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\SimpleButton.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\SimpleMenu.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\SimpleMenuItem.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\SimplePad.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\SimplePopup.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\StoryFlow.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\StyleManager.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\Subtypes.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\TargetChooser.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\TargetsList.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\Tasks.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\TestSuiteAI.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\TextScroller.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\ThisDescriptor.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\Token.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\Translate.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\TranslateKeys.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\Trash.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\utils.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\WCachedResource.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\WDataSrc.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\WEvent.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\WFilter.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\WFont.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\WGui.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\WResourceManager.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
@@ -2,7 +2,6 @@
|
||||
#define _GAME_STATE_MENU_H_
|
||||
|
||||
#include <JGui.h>
|
||||
#include <dirent.h>
|
||||
#include "GameState.h"
|
||||
#include "SimpleMenu.h"
|
||||
#include "TextScroller.h"
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
#include "MTGDefinitions.h"
|
||||
#include "WResourceManager.h"
|
||||
#include <dirent.h>
|
||||
#include "PrecompiledHeader.h"
|
||||
#include <Threading.h>
|
||||
#include <Subtypes.h>
|
||||
#include <string>
|
||||
|
||||
@@ -16,10 +16,58 @@
|
||||
#include <assert.h>
|
||||
|
||||
#ifdef WP8
|
||||
#include <wrl.h>
|
||||
#include <wrl/client.h>
|
||||
#if !defined(WIN32_LEAN_AND_MEAN)
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#endif
|
||||
|
||||
#if !defined(NOMINMAX)
|
||||
#define NOMINMAX
|
||||
#endif
|
||||
|
||||
#if defined(_XBOX_ONE) && defined(_TITLE)
|
||||
#include <d3d11_x.h>
|
||||
#define DCOMMON_H_INCLUDED
|
||||
#define NO_D3D11_DEBUG_NAME
|
||||
#else
|
||||
#include <d3d11_1.h>
|
||||
#endif
|
||||
|
||||
#include <DirectXMath.h>
|
||||
#include <DirectXPackedVector.h>
|
||||
#include <DirectXCollision.h>
|
||||
|
||||
#include <algorithm>
|
||||
#include <array>
|
||||
#include <exception>
|
||||
#include <malloc.h>
|
||||
#include <map>
|
||||
#include <memory>
|
||||
#include <set>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
// VS 2010's stdint.h conflicts with intsafe.h
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable : 4005)
|
||||
#include <stdint.h>
|
||||
#include <intsafe.h>
|
||||
#pragma warning(pop)
|
||||
|
||||
#include <wrl.h>
|
||||
#include "..\extra\dirent.h"
|
||||
|
||||
namespace DirectX
|
||||
{
|
||||
#if (DIRECTX_MATH_VERSION < 305) && !defined(XM_CALLCONV)
|
||||
#define XM_CALLCONV __fastcall
|
||||
typedef const XMVECTOR& HXMVECTOR;
|
||||
typedef const XMMATRIX& FXMMATRIX;
|
||||
#endif
|
||||
}
|
||||
|
||||
#else //WP8
|
||||
#include <boost/shared_ptr.hpp>
|
||||
#include <dirent.h>
|
||||
#endif
|
||||
|
||||
#include "JGE.h"
|
||||
|
||||
@@ -1509,7 +1509,7 @@ ostream& operator<<(ostream& out, const GameObserver& g)
|
||||
out << g.mSeed;
|
||||
out << endl;
|
||||
out << "rvalues:";
|
||||
out << g.randomGenerator.saveUsedRandValues(out);
|
||||
g.randomGenerator.saveUsedRandValues(out);
|
||||
out << endl;
|
||||
out << g.startupGameSerialized;
|
||||
}
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
#include "StoryFlow.h"
|
||||
#include "SimpleMenu.h"
|
||||
#include "GameApp.h"
|
||||
#include <dirent.h>
|
||||
|
||||
GameStateStory::GameStateStory(GameApp* parent) :
|
||||
GameState(parent, "story")
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
#include "PrecompiledHeader.h"
|
||||
|
||||
#include <JGui.h>
|
||||
#include <dirent.h>
|
||||
|
||||
#include "GameApp.h"
|
||||
#include "Translate.h"
|
||||
#include "WDataSrc.h"
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
#include "Subtypes.h"
|
||||
#include "TranslateKeys.h"
|
||||
#include "StyleManager.h"
|
||||
#include <dirent.h>
|
||||
#include "SimpleMenu.h"
|
||||
|
||||
//OptionItem
|
||||
|
||||
@@ -41,7 +41,7 @@ int RandomGenerator::random()
|
||||
ostream& RandomGenerator::saveUsedRandValues(ostream& out) const
|
||||
{
|
||||
list<int>::const_iterator ite;
|
||||
for(ite=usedRandomValues.begin(); ite != usedRandomValues.end(); ite++)
|
||||
for(ite=usedRandomValues.cbegin(); ite != usedRandomValues.cend(); ite++)
|
||||
{
|
||||
out << *ite << ",";
|
||||
}
|
||||
|
||||