Merge pull request #1071 from PatrickvL/prepare_d3d9_port
Prepare d3d9 port
This commit is contained in:
commit
50b6f333de
|
@ -26,6 +26,9 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "d3d8to9", "..\..\import\d3d
|
|||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug_Direct3D9|Any CPU = Debug_Direct3D9|Any CPU
|
||||
Debug_Direct3D9|Win32 = Debug_Direct3D9|Win32
|
||||
Debug_Direct3D9|x64 = Debug_Direct3D9|x64
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Debug|Win32 = Debug|Win32
|
||||
Debug|x64 = Debug|x64
|
||||
|
@ -34,6 +37,10 @@ Global
|
|||
Release|x64 = Release|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{E7A72D3D-5810-4078-A243-348B59726365}.Debug_Direct3D9|Any CPU.ActiveCfg = Debug|Win32
|
||||
{E7A72D3D-5810-4078-A243-348B59726365}.Debug_Direct3D9|Win32.ActiveCfg = Debug_Direct3D9|Win32
|
||||
{E7A72D3D-5810-4078-A243-348B59726365}.Debug_Direct3D9|Win32.Build.0 = Debug_Direct3D9|Win32
|
||||
{E7A72D3D-5810-4078-A243-348B59726365}.Debug_Direct3D9|x64.ActiveCfg = Debug|Win32
|
||||
{E7A72D3D-5810-4078-A243-348B59726365}.Debug|Any CPU.ActiveCfg = Debug|Win32
|
||||
{E7A72D3D-5810-4078-A243-348B59726365}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{E7A72D3D-5810-4078-A243-348B59726365}.Debug|Win32.Build.0 = Debug|Win32
|
||||
|
@ -42,6 +49,11 @@ Global
|
|||
{E7A72D3D-5810-4078-A243-348B59726365}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{E7A72D3D-5810-4078-A243-348B59726365}.Release|Win32.Build.0 = Release|Win32
|
||||
{E7A72D3D-5810-4078-A243-348B59726365}.Release|x64.ActiveCfg = Release|Win32
|
||||
{CD2DDE93-B45E-4D11-876D-D0056C3DD407}.Debug_Direct3D9|Any CPU.ActiveCfg = Debug|Win32
|
||||
{CD2DDE93-B45E-4D11-876D-D0056C3DD407}.Debug_Direct3D9|Win32.ActiveCfg = Debug|Win32
|
||||
{CD2DDE93-B45E-4D11-876D-D0056C3DD407}.Debug_Direct3D9|Win32.Build.0 = Debug|Win32
|
||||
{CD2DDE93-B45E-4D11-876D-D0056C3DD407}.Debug_Direct3D9|x64.ActiveCfg = Debug|x64
|
||||
{CD2DDE93-B45E-4D11-876D-D0056C3DD407}.Debug_Direct3D9|x64.Build.0 = Debug|x64
|
||||
{CD2DDE93-B45E-4D11-876D-D0056C3DD407}.Debug|Any CPU.ActiveCfg = Debug|Win32
|
||||
{CD2DDE93-B45E-4D11-876D-D0056C3DD407}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{CD2DDE93-B45E-4D11-876D-D0056C3DD407}.Debug|Win32.Build.0 = Debug|Win32
|
||||
|
@ -52,6 +64,11 @@ Global
|
|||
{CD2DDE93-B45E-4D11-876D-D0056C3DD407}.Release|Win32.Build.0 = Release|Win32
|
||||
{CD2DDE93-B45E-4D11-876D-D0056C3DD407}.Release|x64.ActiveCfg = Release|x64
|
||||
{CD2DDE93-B45E-4D11-876D-D0056C3DD407}.Release|x64.Build.0 = Release|x64
|
||||
{4A68E962-3805-4376-99D3-0AC59E9BEE69}.Debug_Direct3D9|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{4A68E962-3805-4376-99D3-0AC59E9BEE69}.Debug_Direct3D9|Any CPU.Build.0 = Debug|Any CPU
|
||||
{4A68E962-3805-4376-99D3-0AC59E9BEE69}.Debug_Direct3D9|Win32.ActiveCfg = Debug|Any CPU
|
||||
{4A68E962-3805-4376-99D3-0AC59E9BEE69}.Debug_Direct3D9|x64.ActiveCfg = Debug|Any CPU
|
||||
{4A68E962-3805-4376-99D3-0AC59E9BEE69}.Debug_Direct3D9|x64.Build.0 = Debug|Any CPU
|
||||
{4A68E962-3805-4376-99D3-0AC59E9BEE69}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{4A68E962-3805-4376-99D3-0AC59E9BEE69}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{4A68E962-3805-4376-99D3-0AC59E9BEE69}.Debug|Win32.ActiveCfg = Debug|Any CPU
|
||||
|
@ -62,6 +79,11 @@ Global
|
|||
{4A68E962-3805-4376-99D3-0AC59E9BEE69}.Release|Win32.ActiveCfg = Release|Any CPU
|
||||
{4A68E962-3805-4376-99D3-0AC59E9BEE69}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{4A68E962-3805-4376-99D3-0AC59E9BEE69}.Release|x64.Build.0 = Release|Any CPU
|
||||
{9131B025-5019-4DEE-84A3-86D2703A81C0}.Debug_Direct3D9|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{9131B025-5019-4DEE-84A3-86D2703A81C0}.Debug_Direct3D9|Any CPU.Build.0 = Debug|Any CPU
|
||||
{9131B025-5019-4DEE-84A3-86D2703A81C0}.Debug_Direct3D9|Win32.ActiveCfg = Debug|Any CPU
|
||||
{9131B025-5019-4DEE-84A3-86D2703A81C0}.Debug_Direct3D9|x64.ActiveCfg = Debug|Any CPU
|
||||
{9131B025-5019-4DEE-84A3-86D2703A81C0}.Debug_Direct3D9|x64.Build.0 = Debug|Any CPU
|
||||
{9131B025-5019-4DEE-84A3-86D2703A81C0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{9131B025-5019-4DEE-84A3-86D2703A81C0}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{9131B025-5019-4DEE-84A3-86D2703A81C0}.Debug|Win32.ActiveCfg = Debug|Any CPU
|
||||
|
@ -72,6 +94,11 @@ Global
|
|||
{9131B025-5019-4DEE-84A3-86D2703A81C0}.Release|Win32.ActiveCfg = Release|Any CPU
|
||||
{9131B025-5019-4DEE-84A3-86D2703A81C0}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{9131B025-5019-4DEE-84A3-86D2703A81C0}.Release|x64.Build.0 = Release|Any CPU
|
||||
{2171C0E8-4915-49B9-AC23-A484FA08C126}.Debug_Direct3D9|Any CPU.ActiveCfg = Debug|Win32
|
||||
{2171C0E8-4915-49B9-AC23-A484FA08C126}.Debug_Direct3D9|Win32.ActiveCfg = Debug|Win32
|
||||
{2171C0E8-4915-49B9-AC23-A484FA08C126}.Debug_Direct3D9|Win32.Build.0 = Debug|Win32
|
||||
{2171C0E8-4915-49B9-AC23-A484FA08C126}.Debug_Direct3D9|x64.ActiveCfg = Debug|x64
|
||||
{2171C0E8-4915-49B9-AC23-A484FA08C126}.Debug_Direct3D9|x64.Build.0 = Debug|x64
|
||||
{2171C0E8-4915-49B9-AC23-A484FA08C126}.Debug|Any CPU.ActiveCfg = Debug|Win32
|
||||
{2171C0E8-4915-49B9-AC23-A484FA08C126}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{2171C0E8-4915-49B9-AC23-A484FA08C126}.Debug|Win32.Build.0 = Debug|Win32
|
||||
|
@ -82,6 +109,10 @@ Global
|
|||
{2171C0E8-4915-49B9-AC23-A484FA08C126}.Release|Win32.Build.0 = Release|Win32
|
||||
{2171C0E8-4915-49B9-AC23-A484FA08C126}.Release|x64.ActiveCfg = Release|x64
|
||||
{2171C0E8-4915-49B9-AC23-A484FA08C126}.Release|x64.Build.0 = Release|x64
|
||||
{7EE21ADA-3B02-4CD6-A891-C2257A54B061}.Debug_Direct3D9|Any CPU.ActiveCfg = Debug|Win32
|
||||
{7EE21ADA-3B02-4CD6-A891-C2257A54B061}.Debug_Direct3D9|Win32.ActiveCfg = Debug|Win32
|
||||
{7EE21ADA-3B02-4CD6-A891-C2257A54B061}.Debug_Direct3D9|Win32.Build.0 = Debug|Win32
|
||||
{7EE21ADA-3B02-4CD6-A891-C2257A54B061}.Debug_Direct3D9|x64.ActiveCfg = Debug|Win32
|
||||
{7EE21ADA-3B02-4CD6-A891-C2257A54B061}.Debug|Any CPU.ActiveCfg = Debug|Win32
|
||||
{7EE21ADA-3B02-4CD6-A891-C2257A54B061}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{7EE21ADA-3B02-4CD6-A891-C2257A54B061}.Debug|Win32.Build.0 = Debug|Win32
|
||||
|
|
|
@ -1,6 +1,10 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug_Direct3D9|Win32">
|
||||
<Configuration>Debug_Direct3D9</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
|
@ -28,6 +32,12 @@
|
|||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>$(DefaultPlatformToolset)</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_Direct3D9|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseOfMfc>false</UseOfMfc>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>$(DefaultPlatformToolset)</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
|
@ -39,19 +49,29 @@
|
|||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug_Direct3D9|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</LinkIncremental>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug_Direct3D9|Win32'">false</LinkIncremental>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug_Direct3D9|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug_Direct3D9|Win32'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug_Direct3D9|Win32'" />
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
|
||||
<IncludePath Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\import\DirectX8\include;$(IncludePath)</IncludePath>
|
||||
<IncludePath Condition="'$(Configuration)|$(Platform)'=='Debug_Direct3D9|Win32'">..\..\import\DirectX9\include;$(IncludePath)</IncludePath>
|
||||
<LibraryPath Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\import\DirectX8\lib;$(LibraryPath)</LibraryPath>
|
||||
<LibraryPath Condition="'$(Configuration)|$(Platform)'=='Debug_Direct3D9|Win32'">$(LibraryPath)</LibraryPath>
|
||||
<IncludePath Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\import\DirectX8\include;$(IncludePath)</IncludePath>
|
||||
<LibraryPath Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\import\DirectX8\lib;$(LibraryPath)</LibraryPath>
|
||||
</PropertyGroup>
|
||||
|
@ -60,6 +80,11 @@
|
|||
<CustomBuildBeforeTargets />
|
||||
<IntDir>$(Configuration)\$(ProjectName)</IntDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_Direct3D9|Win32'">
|
||||
<CustomBuildAfterTargets>Build</CustomBuildAfterTargets>
|
||||
<CustomBuildBeforeTargets />
|
||||
<IntDir>$(Configuration)\$(ProjectName)</IntDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<CustomBuildAfterTargets>Build</CustomBuildAfterTargets>
|
||||
<CustomBuildBeforeTargets />
|
||||
|
@ -126,6 +151,67 @@
|
|||
<Message>Generate version header</Message>
|
||||
</PreBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug_Direct3D9|Win32'">
|
||||
<Midl>
|
||||
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MkTypLibCompatible>true</MkTypLibCompatible>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<TargetEnvironment>Win32</TargetEnvironment>
|
||||
<TypeLibraryName>.\..\..\bin\debug/Cxbx.tlb</TypeLibraryName>
|
||||
<HeaderFileName>
|
||||
</HeaderFileName>
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\..\src\Common;..\..\src;..\..\src\Common\Win32;%(AdditionalIncludeDirectories);..\..\import\OpenXDK\include;..\..\import\distorm\include;..\..\import\glew-2.0.0\include;..\..\import\subhook\</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>CXBX_USE_D3D9;NOMINMAX;_WIN32_WINNT=0x0601;WIN32;_DEBUG;_WINDOWS;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<BrowseInformation>false</BrowseInformation>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>
|
||||
<MinimalRebuild>true</MinimalRebuild>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<Culture>0x0409</Culture>
|
||||
<AdditionalIncludeDirectories>Include\Win32\Cxbx;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>legacy_stdio_definitions.lib;d3d8.lib;dinput8.lib;dxguid.lib;odbc32.lib;odbccp32.lib;Shlwapi.lib;dxerr8.lib;ws2_32.lib;dsound.lib;winmm.lib;ddraw.lib;d3dx8.lib;dbghelp.lib;comctl32.lib;XINPUT9_1_0.LIB;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<AdditionalLibraryDirectories>$(Configuration)\;..\..\import\distorm\lib\Win32\;..\..\import\glew-2.0.0\lib\Release\Win32\;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<IgnoreSpecificDefaultLibraries>msvcrt;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<GenerateMapFile>true</GenerateMapFile>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
<DataExecutionPrevention>
|
||||
</DataExecutionPrevention>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
<ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
|
||||
<BaseAddress>0x10000</BaseAddress>
|
||||
<FixedBaseAddress>true</FixedBaseAddress>
|
||||
<LargeAddressAware>true</LargeAddressAware>
|
||||
</Link>
|
||||
<Bscmake>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
</Bscmake>
|
||||
<PostBuildEvent>
|
||||
<Command>copy $(SolutionDir)..\..\import\glew-2.0.0\bin\Release\Win32\glew32.dll $(TargetDir)</Command>
|
||||
</PostBuildEvent>
|
||||
<CustomBuildStep>
|
||||
<Command>
|
||||
</Command>
|
||||
</CustomBuildStep>
|
||||
<PreBuildEvent>
|
||||
<Command>CALL "$(SolutionDir)Version.bat" "$(SolutionDir)..\..\src\Version.h"</Command>
|
||||
<Message>Generate version header</Message>
|
||||
</PreBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<Midl>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
|
@ -411,7 +497,9 @@
|
|||
<ItemGroup>
|
||||
<ResourceCompile Include="..\..\resource\Cxbx.rc">
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug_Direct3D9|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">\cxbx\git\cxbx-ds\resource;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug_Direct3D9|Win32'">\cxbx\git\cxbx-ds\resource;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">\cxbx\git\cxbx-ds\resource;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ResourceCompile>
|
||||
|
@ -427,95 +515,125 @@
|
|||
<ClCompile Include="..\..\src\Common\Logging.cpp" />
|
||||
<ClCompile Include="..\..\src\Common\Win32\EmuShared.cpp">
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug_Direct3D9|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug_Direct3D9|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\Common\XDVDFS Tools\buffered_io.cpp" />
|
||||
<ClCompile Include="..\..\src\Common\XDVDFS Tools\xdvdfs.cpp" />
|
||||
<ClCompile Include="..\..\src\CxbxKrnl\CxbxKrnl.cpp">
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug_Direct3D9|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug_Direct3D9|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\CxbxKrnl\DbgConsole.cpp">
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug_Direct3D9|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug_Direct3D9|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\CxbxKrnl\Emu.cpp">
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug_Direct3D9|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug_Direct3D9|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\CxbxKrnl\EmuD3D8.cpp">
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug_Direct3D9|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug_Direct3D9|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\CxbxKrnl\EmuD3D8\Convert.cpp">
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug_Direct3D9|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug_Direct3D9|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\CxbxKrnl\EmuD3D8\PixelShader.cpp" />
|
||||
<ClCompile Include="..\..\src\CxbxKrnl\EmuD3D8\PushBuffer.cpp">
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug_Direct3D9|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug_Direct3D9|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\CxbxKrnl\EmuD3D8\State.cpp">
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug_Direct3D9|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug_Direct3D9|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\CxbxKrnl\EmuD3D8\VertexBuffer.cpp">
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug_Direct3D9|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug_Direct3D9|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\CxbxKrnl\EmuD3D8\VertexShader.cpp">
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug_Direct3D9|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug_Direct3D9|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\CxbxKrnl\EmuDInput.cpp">
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug_Direct3D9|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug_Direct3D9|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\CxbxKrnl\EmuDSound.cpp">
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug_Direct3D9|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug_Direct3D9|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\CxbxKrnl\EmuFile.cpp">
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug_Direct3D9|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug_Direct3D9|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\CxbxKrnl\EmuFS.cpp">
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug_Direct3D9|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug_Direct3D9|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\CxbxKrnl\EmuKrnl.cpp">
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug_Direct3D9|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug_Direct3D9|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\CxbxKrnl\EmuKrnlAv.cpp" />
|
||||
|
@ -538,8 +656,10 @@
|
|||
<ClCompile Include="..\..\src\CxbxKrnl\EmuKrnlXe.cpp" />
|
||||
<ClCompile Include="..\..\src\CxbxKrnl\EmuNtDll.cpp">
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug_Direct3D9|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug_Direct3D9|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\CxbxKrnl\EmuSha.cpp" />
|
||||
|
@ -547,21 +667,27 @@
|
|||
<ClCompile Include="..\..\src\CxbxKrnl\EmuXactEng.cpp" />
|
||||
<ClCompile Include="..\..\src\CxbxKrnl\EmuXapi.cpp">
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug_Direct3D9|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug_Direct3D9|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\CxbxKrnl\EmuXG.cpp">
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug_Direct3D9|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug_Direct3D9|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\CxbxKrnl\EmuXInput.cpp" />
|
||||
<ClCompile Include="..\..\src\CxbxKrnl\EmuXOnline.cpp">
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug_Direct3D9|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug_Direct3D9|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\CxbxKrnl\gloffscreen\glextensions.cpp" />
|
||||
|
@ -569,28 +695,36 @@
|
|||
<ClCompile Include="..\..\src\CxbxKrnl\gloffscreen\gloffscreen_wgl.cpp" />
|
||||
<ClCompile Include="..\..\src\CxbxKrnl\HLEDataBase.cpp">
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug_Direct3D9|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug_Direct3D9|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\CxbxKrnl\HLEIntercept.cpp">
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug_Direct3D9|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug_Direct3D9|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\CxbxKrnl\KernelThunk.cpp">
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug_Direct3D9|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug_Direct3D9|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\CxbxKrnl\LibRc4.cpp" />
|
||||
<ClCompile Include="..\..\src\CxbxKrnl\PhysicalMemory.cpp" />
|
||||
<ClCompile Include="..\..\src\CxbxKrnl\ResourceTracker.cpp">
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug_Direct3D9|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug_Direct3D9|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\CxbxKrnl\VMManager.cpp" />
|
||||
|
@ -598,61 +732,81 @@
|
|||
<ClCompile Include="..\..\src\Cxbx\DlgAudioConfig.cpp" />
|
||||
<ClCompile Include="..\..\src\Cxbx\DlgControllerConfig.cpp">
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug_Direct3D9|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug_Direct3D9|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\Cxbx\DlgVideoConfig.cpp">
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug_Direct3D9|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug_Direct3D9|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\Common\Error.cpp">
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug_Direct3D9|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug_Direct3D9|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\Common\Win32\Mutex.cpp">
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug_Direct3D9|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug_Direct3D9|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\Cxbx\WinMain.cpp">
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug_Direct3D9|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug_Direct3D9|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\Cxbx\Wnd.cpp">
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug_Direct3D9|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug_Direct3D9|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\Cxbx\WndMain.cpp">
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug_Direct3D9|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug_Direct3D9|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\Common\Win32\XBController.cpp">
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug_Direct3D9|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug_Direct3D9|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\Common\Xbe.cpp">
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug_Direct3D9|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug_Direct3D9|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\Common\Win32\XBVideo.cpp">
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug_Direct3D9|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug_Direct3D9|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
|
|
|
@ -289,9 +289,6 @@
|
|||
<ClInclude Include="..\..\src\Cxbx\Wnd.h">
|
||||
<Filter>GUI</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\import\stb\stb_image.h">
|
||||
<Filter>GUI</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\CxbxKrnl\EmuD3D8\Convert.h">
|
||||
<Filter>EmuD3D8</Filter>
|
||||
</ClInclude>
|
||||
|
@ -448,9 +445,6 @@
|
|||
<ClInclude Include="..\..\src\CxbxKrnl\HLEDataBase\D3D8.OOVPA.h">
|
||||
<Filter>HLEDatabase\D3D8</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\CxbxKrnl\HLEDataBase\D3D8LTCG.OOVPA.h">
|
||||
<Filter>HLEDatabase\D3D8LTCG</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\CxbxKrnl\PhysicalMemory.h">
|
||||
<Filter>Emulator</Filter>
|
||||
</ClInclude>
|
||||
|
@ -573,9 +567,6 @@
|
|||
<None Include="..\..\src\CxbxKrnl\HLEDataBase\XNet.1.0.5455.inl">
|
||||
<Filter>HLEDatabase\XNet</Filter>
|
||||
</None>
|
||||
<None Include="..\..\resource\Cxbx.ico">
|
||||
<Filter>Shared</Filter>
|
||||
</None>
|
||||
<None Include="..\..\resource\Logo.bmp">
|
||||
<Filter>Shared</Filter>
|
||||
</None>
|
||||
|
@ -974,4 +965,8 @@
|
|||
<Filter>Shared</Filter>
|
||||
</ResourceCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Image Include="..\..\resource\Cxbx-R.ico" />
|
||||
<Image Include="..\..\resource\Logo-License-CC4.bmp" />
|
||||
</ItemGroup>
|
||||
</Project>
|
|
@ -0,0 +1,99 @@
|
|||
/*==========================================================================;
|
||||
*
|
||||
*
|
||||
* File: dxerr.h
|
||||
* Content: DirectX Error Library Include File
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef _DXERR_H_
|
||||
#define _DXERR_H_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif //__cplusplus
|
||||
|
||||
//
|
||||
// DXGetErrorString
|
||||
//
|
||||
// Desc: Converts a DirectX HRESULT to a string
|
||||
//
|
||||
// Args: HRESULT hr Can be any error code from
|
||||
// XACT XAUDIO2 XAPO XINPUT DXGI D3D10 D3DX10 D3D9 D3DX9 DDRAW DSOUND DINPUT DSHOW
|
||||
//
|
||||
// Return: Converted string
|
||||
//
|
||||
const char* WINAPI DXGetErrorStringA(__in HRESULT hr);
|
||||
const WCHAR* WINAPI DXGetErrorStringW(__in HRESULT hr);
|
||||
|
||||
#ifdef UNICODE
|
||||
#define DXGetErrorString DXGetErrorStringW
|
||||
#else
|
||||
#define DXGetErrorString DXGetErrorStringA
|
||||
#endif
|
||||
|
||||
|
||||
//
|
||||
// DXGetErrorDescription
|
||||
//
|
||||
// Desc: Returns a string description of a DirectX HRESULT
|
||||
//
|
||||
// Args: HRESULT hr Can be any error code from
|
||||
// XACT XAUDIO2 XAPO XINPUT DXGI D3D10 D3DX10 D3D9 D3DX9 DDRAW DSOUND DINPUT DSHOW
|
||||
//
|
||||
// Return: String description
|
||||
//
|
||||
const char* WINAPI DXGetErrorDescriptionA(__in HRESULT hr);
|
||||
const WCHAR* WINAPI DXGetErrorDescriptionW(__in HRESULT hr);
|
||||
|
||||
#ifdef UNICODE
|
||||
#define DXGetErrorDescription DXGetErrorDescriptionW
|
||||
#else
|
||||
#define DXGetErrorDescription DXGetErrorDescriptionA
|
||||
#endif
|
||||
|
||||
|
||||
//
|
||||
// DXTrace
|
||||
//
|
||||
// Desc: Outputs a formatted error message to the debug stream
|
||||
//
|
||||
// Args: CHAR* strFile The current file, typically passed in using the
|
||||
// __FILE__ macro.
|
||||
// DWORD dwLine The current line number, typically passed in using the
|
||||
// __LINE__ macro.
|
||||
// HRESULT hr An HRESULT that will be traced to the debug stream.
|
||||
// CHAR* strMsg A string that will be traced to the debug stream (may be NULL)
|
||||
// BOOL bPopMsgBox If TRUE, then a message box will popup also containing the passed info.
|
||||
//
|
||||
// Return: The hr that was passed in.
|
||||
//
|
||||
HRESULT WINAPI DXTraceA( __in_z const char* strFile, __in DWORD dwLine, __in HRESULT hr, __in_z_opt const char* strMsg, __in BOOL bPopMsgBox );
|
||||
HRESULT WINAPI DXTraceW( __in_z const char* strFile, __in DWORD dwLine, __in HRESULT hr, __in_z_opt const WCHAR* strMsg, __in BOOL bPopMsgBox );
|
||||
|
||||
#ifdef UNICODE
|
||||
#define DXTrace DXTraceW
|
||||
#else
|
||||
#define DXTrace DXTraceA
|
||||
#endif
|
||||
|
||||
|
||||
//
|
||||
// Helper macros
|
||||
//
|
||||
#if defined(DEBUG) | defined(_DEBUG)
|
||||
#define DXTRACE_MSG(str) DXTrace( __FILE__, (DWORD)__LINE__, 0, str, FALSE )
|
||||
#define DXTRACE_ERR(str,hr) DXTrace( __FILE__, (DWORD)__LINE__, hr, str, FALSE )
|
||||
#define DXTRACE_ERR_MSGBOX(str,hr) DXTrace( __FILE__, (DWORD)__LINE__, hr, str, TRUE )
|
||||
#else
|
||||
#define DXTRACE_MSG(str) (0L)
|
||||
#define DXTRACE_ERR(str,hr) (hr)
|
||||
#define DXTRACE_ERR_MSGBOX(str,hr) (hr)
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif //__cplusplus
|
||||
|
||||
#endif // _DXERR_H_
|
|
@ -0,0 +1,78 @@
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) Microsoft Corporation. All Rights Reserved.
|
||||
//
|
||||
// File: d3dx9.h
|
||||
// Content: D3DX utility library
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifdef __D3DX_INTERNAL__
|
||||
#error Incorrect D3DX header used
|
||||
#endif
|
||||
|
||||
#ifndef __D3DX9_H__
|
||||
#define __D3DX9_H__
|
||||
|
||||
|
||||
// Defines
|
||||
#include <limits.h>
|
||||
|
||||
#define D3DX_DEFAULT ((UINT) -1)
|
||||
#define D3DX_DEFAULT_NONPOW2 ((UINT) -2)
|
||||
#define D3DX_DEFAULT_FLOAT FLT_MAX
|
||||
#define D3DX_FROM_FILE ((UINT) -3)
|
||||
#define D3DFMT_FROM_FILE ((D3DFORMAT) -3)
|
||||
|
||||
#ifndef D3DXINLINE
|
||||
#ifdef _MSC_VER
|
||||
#if (_MSC_VER >= 1200)
|
||||
#define D3DXINLINE __forceinline
|
||||
#else
|
||||
#define D3DXINLINE __inline
|
||||
#endif
|
||||
#else
|
||||
#ifdef __cplusplus
|
||||
#define D3DXINLINE inline
|
||||
#else
|
||||
#define D3DXINLINE
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
// Includes
|
||||
#include "d3d9.h"
|
||||
#include "d3dx9math.h"
|
||||
#include "d3dx9core.h"
|
||||
#include "d3dx9xof.h"
|
||||
#include "d3dx9mesh.h"
|
||||
#include "d3dx9shader.h"
|
||||
#include "d3dx9effect.h"
|
||||
|
||||
#include "d3dx9tex.h"
|
||||
#include "d3dx9shape.h"
|
||||
#include "d3dx9anim.h"
|
||||
|
||||
|
||||
|
||||
// Errors
|
||||
#define _FACDD 0x876
|
||||
#define MAKE_DDHRESULT( code ) MAKE_HRESULT( 1, _FACDD, code )
|
||||
|
||||
enum _D3DXERR {
|
||||
D3DXERR_CANNOTMODIFYINDEXBUFFER = MAKE_DDHRESULT(2900),
|
||||
D3DXERR_INVALIDMESH = MAKE_DDHRESULT(2901),
|
||||
D3DXERR_CANNOTATTRSORT = MAKE_DDHRESULT(2902),
|
||||
D3DXERR_SKINNINGNOTSUPPORTED = MAKE_DDHRESULT(2903),
|
||||
D3DXERR_TOOMANYINFLUENCES = MAKE_DDHRESULT(2904),
|
||||
D3DXERR_INVALIDDATA = MAKE_DDHRESULT(2905),
|
||||
D3DXERR_LOADEDMESHASNODATA = MAKE_DDHRESULT(2906),
|
||||
D3DXERR_DUPLICATENAMEDFRAGMENT = MAKE_DDHRESULT(2907),
|
||||
D3DXERR_CANNOTREMOVELASTITEM = MAKE_DDHRESULT(2908),
|
||||
};
|
||||
|
||||
|
||||
#endif //__D3DX9_H__
|
||||
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,753 @@
|
|||
///////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) Microsoft Corporation. All Rights Reserved.
|
||||
//
|
||||
// File: d3dx9core.h
|
||||
// Content: D3DX core types and functions
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "d3dx9.h"
|
||||
|
||||
#ifndef __D3DX9CORE_H__
|
||||
#define __D3DX9CORE_H__
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// D3DX_SDK_VERSION:
|
||||
// -----------------
|
||||
// This identifier is passed to D3DXCheckVersion in order to ensure that an
|
||||
// application was built against the correct header files and lib files.
|
||||
// This number is incremented whenever a header (or other) change would
|
||||
// require applications to be rebuilt. If the version doesn't match,
|
||||
// D3DXCheckVersion will return FALSE. (The number itself has no meaning.)
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#define D3DX_VERSION 0x0902
|
||||
|
||||
#define D3DX_SDK_VERSION 43
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif //__cplusplus
|
||||
|
||||
BOOL WINAPI
|
||||
D3DXCheckVersion(UINT D3DSdkVersion, UINT D3DXSdkVersion);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif //__cplusplus
|
||||
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// D3DXDebugMute
|
||||
// Mutes D3DX and D3D debug spew (TRUE - mute, FALSE - not mute)
|
||||
//
|
||||
// returns previous mute value
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif //__cplusplus
|
||||
|
||||
BOOL WINAPI
|
||||
D3DXDebugMute(BOOL Mute);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif //__cplusplus
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// D3DXGetDriverLevel:
|
||||
// Returns driver version information:
|
||||
//
|
||||
// 700 - DX7 level driver
|
||||
// 800 - DX8 level driver
|
||||
// 900 - DX9 level driver
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif //__cplusplus
|
||||
|
||||
UINT WINAPI
|
||||
D3DXGetDriverLevel(LPDIRECT3DDEVICE9 pDevice);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif //__cplusplus
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// ID3DXBuffer:
|
||||
// ------------
|
||||
// The buffer object is used by D3DX to return arbitrary size data.
|
||||
//
|
||||
// GetBufferPointer -
|
||||
// Returns a pointer to the beginning of the buffer.
|
||||
//
|
||||
// GetBufferSize -
|
||||
// Returns the size of the buffer, in bytes.
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
typedef interface ID3DXBuffer ID3DXBuffer;
|
||||
typedef interface ID3DXBuffer *LPD3DXBUFFER;
|
||||
|
||||
// {8BA5FB08-5195-40e2-AC58-0D989C3A0102}
|
||||
DEFINE_GUID(IID_ID3DXBuffer,
|
||||
0x8ba5fb08, 0x5195, 0x40e2, 0xac, 0x58, 0xd, 0x98, 0x9c, 0x3a, 0x1, 0x2);
|
||||
|
||||
#undef INTERFACE
|
||||
#define INTERFACE ID3DXBuffer
|
||||
|
||||
DECLARE_INTERFACE_(ID3DXBuffer, IUnknown)
|
||||
{
|
||||
// IUnknown
|
||||
STDMETHOD(QueryInterface)(THIS_ REFIID iid, LPVOID *ppv) PURE;
|
||||
STDMETHOD_(ULONG, AddRef)(THIS) PURE;
|
||||
STDMETHOD_(ULONG, Release)(THIS) PURE;
|
||||
|
||||
// ID3DXBuffer
|
||||
STDMETHOD_(LPVOID, GetBufferPointer)(THIS) PURE;
|
||||
STDMETHOD_(DWORD, GetBufferSize)(THIS) PURE;
|
||||
};
|
||||
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
// D3DXSPRITE flags:
|
||||
// -----------------
|
||||
// D3DXSPRITE_DONOTSAVESTATE
|
||||
// Specifies device state is not to be saved and restored in Begin/End.
|
||||
// D3DXSPRITE_DONOTMODIFY_RENDERSTATE
|
||||
// Specifies device render state is not to be changed in Begin. The device
|
||||
// is assumed to be in a valid state to draw vertices containing POSITION0,
|
||||
// TEXCOORD0, and COLOR0 data.
|
||||
// D3DXSPRITE_OBJECTSPACE
|
||||
// The WORLD, VIEW, and PROJECTION transforms are NOT modified. The
|
||||
// transforms currently set to the device are used to transform the sprites
|
||||
// when the batch is drawn (at Flush or End). If this is not specified,
|
||||
// WORLD, VIEW, and PROJECTION transforms are modified so that sprites are
|
||||
// drawn in screenspace coordinates.
|
||||
// D3DXSPRITE_BILLBOARD
|
||||
// Rotates each sprite about its center so that it is facing the viewer.
|
||||
// D3DXSPRITE_ALPHABLEND
|
||||
// Enables ALPHABLEND(SRCALPHA, INVSRCALPHA) and ALPHATEST(alpha > 0).
|
||||
// ID3DXFont expects this to be set when drawing text.
|
||||
// D3DXSPRITE_SORT_TEXTURE
|
||||
// Sprites are sorted by texture prior to drawing. This is recommended when
|
||||
// drawing non-overlapping sprites of uniform depth. For example, drawing
|
||||
// screen-aligned text with ID3DXFont.
|
||||
// D3DXSPRITE_SORT_DEPTH_FRONTTOBACK
|
||||
// Sprites are sorted by depth front-to-back prior to drawing. This is
|
||||
// recommended when drawing opaque sprites of varying depths.
|
||||
// D3DXSPRITE_SORT_DEPTH_BACKTOFRONT
|
||||
// Sprites are sorted by depth back-to-front prior to drawing. This is
|
||||
// recommended when drawing transparent sprites of varying depths.
|
||||
// D3DXSPRITE_DO_NOT_ADDREF_TEXTURE
|
||||
// Disables calling AddRef() on every draw, and Release() on Flush() for
|
||||
// better performance.
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#define D3DXSPRITE_DONOTSAVESTATE (1 << 0)
|
||||
#define D3DXSPRITE_DONOTMODIFY_RENDERSTATE (1 << 1)
|
||||
#define D3DXSPRITE_OBJECTSPACE (1 << 2)
|
||||
#define D3DXSPRITE_BILLBOARD (1 << 3)
|
||||
#define D3DXSPRITE_ALPHABLEND (1 << 4)
|
||||
#define D3DXSPRITE_SORT_TEXTURE (1 << 5)
|
||||
#define D3DXSPRITE_SORT_DEPTH_FRONTTOBACK (1 << 6)
|
||||
#define D3DXSPRITE_SORT_DEPTH_BACKTOFRONT (1 << 7)
|
||||
#define D3DXSPRITE_DO_NOT_ADDREF_TEXTURE (1 << 8)
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
// ID3DXSprite:
|
||||
// ------------
|
||||
// This object intends to provide an easy way to drawing sprites using D3D.
|
||||
//
|
||||
// Begin -
|
||||
// Prepares device for drawing sprites.
|
||||
//
|
||||
// Draw -
|
||||
// Draws a sprite. Before transformation, the sprite is the size of
|
||||
// SrcRect, with its top-left corner specified by Position. The color
|
||||
// and alpha channels are modulated by Color.
|
||||
//
|
||||
// Flush -
|
||||
// Forces all batched sprites to submitted to the device.
|
||||
//
|
||||
// End -
|
||||
// Restores device state to how it was when Begin was called.
|
||||
//
|
||||
// OnLostDevice, OnResetDevice -
|
||||
// Call OnLostDevice() on this object before calling Reset() on the
|
||||
// device, so that this object can release any stateblocks and video
|
||||
// memory resources. After Reset(), the call OnResetDevice().
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
typedef interface ID3DXSprite ID3DXSprite;
|
||||
typedef interface ID3DXSprite *LPD3DXSPRITE;
|
||||
|
||||
|
||||
// {BA0B762D-7D28-43ec-B9DC-2F84443B0614}
|
||||
DEFINE_GUID(IID_ID3DXSprite,
|
||||
0xba0b762d, 0x7d28, 0x43ec, 0xb9, 0xdc, 0x2f, 0x84, 0x44, 0x3b, 0x6, 0x14);
|
||||
|
||||
|
||||
#undef INTERFACE
|
||||
#define INTERFACE ID3DXSprite
|
||||
|
||||
DECLARE_INTERFACE_(ID3DXSprite, IUnknown)
|
||||
{
|
||||
// IUnknown
|
||||
STDMETHOD(QueryInterface)(THIS_ REFIID iid, LPVOID *ppv) PURE;
|
||||
STDMETHOD_(ULONG, AddRef)(THIS) PURE;
|
||||
STDMETHOD_(ULONG, Release)(THIS) PURE;
|
||||
|
||||
// ID3DXSprite
|
||||
STDMETHOD(GetDevice)(THIS_ LPDIRECT3DDEVICE9* ppDevice) PURE;
|
||||
|
||||
STDMETHOD(GetTransform)(THIS_ D3DXMATRIX *pTransform) PURE;
|
||||
STDMETHOD(SetTransform)(THIS_ CONST D3DXMATRIX *pTransform) PURE;
|
||||
|
||||
STDMETHOD(SetWorldViewRH)(THIS_ CONST D3DXMATRIX *pWorld, CONST D3DXMATRIX *pView) PURE;
|
||||
STDMETHOD(SetWorldViewLH)(THIS_ CONST D3DXMATRIX *pWorld, CONST D3DXMATRIX *pView) PURE;
|
||||
|
||||
STDMETHOD(Begin)(THIS_ DWORD Flags) PURE;
|
||||
STDMETHOD(Draw)(THIS_ LPDIRECT3DTEXTURE9 pTexture, CONST RECT *pSrcRect, CONST D3DXVECTOR3 *pCenter, CONST D3DXVECTOR3 *pPosition, D3DCOLOR Color) PURE;
|
||||
STDMETHOD(Flush)(THIS) PURE;
|
||||
STDMETHOD(End)(THIS) PURE;
|
||||
|
||||
STDMETHOD(OnLostDevice)(THIS) PURE;
|
||||
STDMETHOD(OnResetDevice)(THIS) PURE;
|
||||
};
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif //__cplusplus
|
||||
|
||||
HRESULT WINAPI
|
||||
D3DXCreateSprite(
|
||||
LPDIRECT3DDEVICE9 pDevice,
|
||||
LPD3DXSPRITE* ppSprite);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif //__cplusplus
|
||||
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
// ID3DXFont:
|
||||
// ----------
|
||||
// Font objects contain the textures and resources needed to render a specific
|
||||
// font on a specific device.
|
||||
//
|
||||
// GetGlyphData -
|
||||
// Returns glyph cache data, for a given glyph.
|
||||
//
|
||||
// PreloadCharacters/PreloadGlyphs/PreloadText -
|
||||
// Preloads glyphs into the glyph cache textures.
|
||||
//
|
||||
// DrawText -
|
||||
// Draws formatted text on a D3D device. Some parameters are
|
||||
// surprisingly similar to those of GDI's DrawText function. See GDI
|
||||
// documentation for a detailed description of these parameters.
|
||||
// If pSprite is NULL, an internal sprite object will be used.
|
||||
//
|
||||
// OnLostDevice, OnResetDevice -
|
||||
// Call OnLostDevice() on this object before calling Reset() on the
|
||||
// device, so that this object can release any stateblocks and video
|
||||
// memory resources. After Reset(), the call OnResetDevice().
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
typedef struct _D3DXFONT_DESCA
|
||||
{
|
||||
INT Height;
|
||||
UINT Width;
|
||||
UINT Weight;
|
||||
UINT MipLevels;
|
||||
BOOL Italic;
|
||||
BYTE CharSet;
|
||||
BYTE OutputPrecision;
|
||||
BYTE Quality;
|
||||
BYTE PitchAndFamily;
|
||||
CHAR FaceName[LF_FACESIZE];
|
||||
|
||||
} D3DXFONT_DESCA, *LPD3DXFONT_DESCA;
|
||||
|
||||
typedef struct _D3DXFONT_DESCW
|
||||
{
|
||||
INT Height;
|
||||
UINT Width;
|
||||
UINT Weight;
|
||||
UINT MipLevels;
|
||||
BOOL Italic;
|
||||
BYTE CharSet;
|
||||
BYTE OutputPrecision;
|
||||
BYTE Quality;
|
||||
BYTE PitchAndFamily;
|
||||
WCHAR FaceName[LF_FACESIZE];
|
||||
|
||||
} D3DXFONT_DESCW, *LPD3DXFONT_DESCW;
|
||||
|
||||
#ifdef UNICODE
|
||||
typedef D3DXFONT_DESCW D3DXFONT_DESC;
|
||||
typedef LPD3DXFONT_DESCW LPD3DXFONT_DESC;
|
||||
#else
|
||||
typedef D3DXFONT_DESCA D3DXFONT_DESC;
|
||||
typedef LPD3DXFONT_DESCA LPD3DXFONT_DESC;
|
||||
#endif
|
||||
|
||||
|
||||
typedef interface ID3DXFont ID3DXFont;
|
||||
typedef interface ID3DXFont *LPD3DXFONT;
|
||||
|
||||
|
||||
// {D79DBB70-5F21-4d36-BBC2-FF525C213CDC}
|
||||
DEFINE_GUID(IID_ID3DXFont,
|
||||
0xd79dbb70, 0x5f21, 0x4d36, 0xbb, 0xc2, 0xff, 0x52, 0x5c, 0x21, 0x3c, 0xdc);
|
||||
|
||||
|
||||
#undef INTERFACE
|
||||
#define INTERFACE ID3DXFont
|
||||
|
||||
DECLARE_INTERFACE_(ID3DXFont, IUnknown)
|
||||
{
|
||||
// IUnknown
|
||||
STDMETHOD(QueryInterface)(THIS_ REFIID iid, LPVOID *ppv) PURE;
|
||||
STDMETHOD_(ULONG, AddRef)(THIS) PURE;
|
||||
STDMETHOD_(ULONG, Release)(THIS) PURE;
|
||||
|
||||
// ID3DXFont
|
||||
STDMETHOD(GetDevice)(THIS_ LPDIRECT3DDEVICE9 *ppDevice) PURE;
|
||||
STDMETHOD(GetDescA)(THIS_ D3DXFONT_DESCA *pDesc) PURE;
|
||||
STDMETHOD(GetDescW)(THIS_ D3DXFONT_DESCW *pDesc) PURE;
|
||||
STDMETHOD_(BOOL, GetTextMetricsA)(THIS_ TEXTMETRICA *pTextMetrics) PURE;
|
||||
STDMETHOD_(BOOL, GetTextMetricsW)(THIS_ TEXTMETRICW *pTextMetrics) PURE;
|
||||
|
||||
STDMETHOD_(HDC, GetDC)(THIS) PURE;
|
||||
STDMETHOD(GetGlyphData)(THIS_ UINT Glyph, LPDIRECT3DTEXTURE9 *ppTexture, RECT *pBlackBox, POINT *pCellInc) PURE;
|
||||
|
||||
STDMETHOD(PreloadCharacters)(THIS_ UINT First, UINT Last) PURE;
|
||||
STDMETHOD(PreloadGlyphs)(THIS_ UINT First, UINT Last) PURE;
|
||||
STDMETHOD(PreloadTextA)(THIS_ LPCSTR pString, INT Count) PURE;
|
||||
STDMETHOD(PreloadTextW)(THIS_ LPCWSTR pString, INT Count) PURE;
|
||||
|
||||
STDMETHOD_(INT, DrawTextA)(THIS_ LPD3DXSPRITE pSprite, LPCSTR pString, INT Count, LPRECT pRect, DWORD Format, D3DCOLOR Color) PURE;
|
||||
STDMETHOD_(INT, DrawTextW)(THIS_ LPD3DXSPRITE pSprite, LPCWSTR pString, INT Count, LPRECT pRect, DWORD Format, D3DCOLOR Color) PURE;
|
||||
|
||||
STDMETHOD(OnLostDevice)(THIS) PURE;
|
||||
STDMETHOD(OnResetDevice)(THIS) PURE;
|
||||
|
||||
#ifdef __cplusplus
|
||||
#ifdef UNICODE
|
||||
HRESULT GetDesc(D3DXFONT_DESCW *pDesc) { return GetDescW(pDesc); }
|
||||
HRESULT PreloadText(LPCWSTR pString, INT Count) { return PreloadTextW(pString, Count); }
|
||||
#else
|
||||
HRESULT GetDesc(D3DXFONT_DESCA *pDesc) { return GetDescA(pDesc); }
|
||||
HRESULT PreloadText(LPCSTR pString, INT Count) { return PreloadTextA(pString, Count); }
|
||||
#endif
|
||||
#endif //__cplusplus
|
||||
};
|
||||
|
||||
#ifndef GetTextMetrics
|
||||
#ifdef UNICODE
|
||||
#define GetTextMetrics GetTextMetricsW
|
||||
#else
|
||||
#define GetTextMetrics GetTextMetricsA
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef DrawText
|
||||
#ifdef UNICODE
|
||||
#define DrawText DrawTextW
|
||||
#else
|
||||
#define DrawText DrawTextA
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif //__cplusplus
|
||||
|
||||
|
||||
HRESULT WINAPI
|
||||
D3DXCreateFontA(
|
||||
LPDIRECT3DDEVICE9 pDevice,
|
||||
INT Height,
|
||||
UINT Width,
|
||||
UINT Weight,
|
||||
UINT MipLevels,
|
||||
BOOL Italic,
|
||||
DWORD CharSet,
|
||||
DWORD OutputPrecision,
|
||||
DWORD Quality,
|
||||
DWORD PitchAndFamily,
|
||||
LPCSTR pFaceName,
|
||||
LPD3DXFONT* ppFont);
|
||||
|
||||
HRESULT WINAPI
|
||||
D3DXCreateFontW(
|
||||
LPDIRECT3DDEVICE9 pDevice,
|
||||
INT Height,
|
||||
UINT Width,
|
||||
UINT Weight,
|
||||
UINT MipLevels,
|
||||
BOOL Italic,
|
||||
DWORD CharSet,
|
||||
DWORD OutputPrecision,
|
||||
DWORD Quality,
|
||||
DWORD PitchAndFamily,
|
||||
LPCWSTR pFaceName,
|
||||
LPD3DXFONT* ppFont);
|
||||
|
||||
#ifdef UNICODE
|
||||
#define D3DXCreateFont D3DXCreateFontW
|
||||
#else
|
||||
#define D3DXCreateFont D3DXCreateFontA
|
||||
#endif
|
||||
|
||||
|
||||
HRESULT WINAPI
|
||||
D3DXCreateFontIndirectA(
|
||||
LPDIRECT3DDEVICE9 pDevice,
|
||||
CONST D3DXFONT_DESCA* pDesc,
|
||||
LPD3DXFONT* ppFont);
|
||||
|
||||
HRESULT WINAPI
|
||||
D3DXCreateFontIndirectW(
|
||||
LPDIRECT3DDEVICE9 pDevice,
|
||||
CONST D3DXFONT_DESCW* pDesc,
|
||||
LPD3DXFONT* ppFont);
|
||||
|
||||
#ifdef UNICODE
|
||||
#define D3DXCreateFontIndirect D3DXCreateFontIndirectW
|
||||
#else
|
||||
#define D3DXCreateFontIndirect D3DXCreateFontIndirectA
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif //__cplusplus
|
||||
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// ID3DXRenderToSurface:
|
||||
// ---------------------
|
||||
// This object abstracts rendering to surfaces. These surfaces do not
|
||||
// necessarily need to be render targets. If they are not, a compatible
|
||||
// render target is used, and the result copied into surface at end scene.
|
||||
//
|
||||
// BeginScene, EndScene -
|
||||
// Call BeginScene() and EndScene() at the beginning and ending of your
|
||||
// scene. These calls will setup and restore render targets, viewports,
|
||||
// etc..
|
||||
//
|
||||
// OnLostDevice, OnResetDevice -
|
||||
// Call OnLostDevice() on this object before calling Reset() on the
|
||||
// device, so that this object can release any stateblocks and video
|
||||
// memory resources. After Reset(), the call OnResetDevice().
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
typedef struct _D3DXRTS_DESC
|
||||
{
|
||||
UINT Width;
|
||||
UINT Height;
|
||||
D3DFORMAT Format;
|
||||
BOOL DepthStencil;
|
||||
D3DFORMAT DepthStencilFormat;
|
||||
|
||||
} D3DXRTS_DESC, *LPD3DXRTS_DESC;
|
||||
|
||||
|
||||
typedef interface ID3DXRenderToSurface ID3DXRenderToSurface;
|
||||
typedef interface ID3DXRenderToSurface *LPD3DXRENDERTOSURFACE;
|
||||
|
||||
|
||||
// {6985F346-2C3D-43b3-BE8B-DAAE8A03D894}
|
||||
DEFINE_GUID(IID_ID3DXRenderToSurface,
|
||||
0x6985f346, 0x2c3d, 0x43b3, 0xbe, 0x8b, 0xda, 0xae, 0x8a, 0x3, 0xd8, 0x94);
|
||||
|
||||
|
||||
#undef INTERFACE
|
||||
#define INTERFACE ID3DXRenderToSurface
|
||||
|
||||
DECLARE_INTERFACE_(ID3DXRenderToSurface, IUnknown)
|
||||
{
|
||||
// IUnknown
|
||||
STDMETHOD(QueryInterface)(THIS_ REFIID iid, LPVOID *ppv) PURE;
|
||||
STDMETHOD_(ULONG, AddRef)(THIS) PURE;
|
||||
STDMETHOD_(ULONG, Release)(THIS) PURE;
|
||||
|
||||
// ID3DXRenderToSurface
|
||||
STDMETHOD(GetDevice)(THIS_ LPDIRECT3DDEVICE9* ppDevice) PURE;
|
||||
STDMETHOD(GetDesc)(THIS_ D3DXRTS_DESC* pDesc) PURE;
|
||||
|
||||
STDMETHOD(BeginScene)(THIS_ LPDIRECT3DSURFACE9 pSurface, CONST D3DVIEWPORT9* pViewport) PURE;
|
||||
STDMETHOD(EndScene)(THIS_ DWORD MipFilter) PURE;
|
||||
|
||||
STDMETHOD(OnLostDevice)(THIS) PURE;
|
||||
STDMETHOD(OnResetDevice)(THIS) PURE;
|
||||
};
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif //__cplusplus
|
||||
|
||||
HRESULT WINAPI
|
||||
D3DXCreateRenderToSurface(
|
||||
LPDIRECT3DDEVICE9 pDevice,
|
||||
UINT Width,
|
||||
UINT Height,
|
||||
D3DFORMAT Format,
|
||||
BOOL DepthStencil,
|
||||
D3DFORMAT DepthStencilFormat,
|
||||
LPD3DXRENDERTOSURFACE* ppRenderToSurface);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif //__cplusplus
|
||||
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// ID3DXRenderToEnvMap:
|
||||
// --------------------
|
||||
// This object abstracts rendering to environment maps. These surfaces
|
||||
// do not necessarily need to be render targets. If they are not, a
|
||||
// compatible render target is used, and the result copied into the
|
||||
// environment map at end scene.
|
||||
//
|
||||
// BeginCube, BeginSphere, BeginHemisphere, BeginParabolic -
|
||||
// This function initiates the rendering of the environment map. As
|
||||
// parameters, you pass the textures in which will get filled in with
|
||||
// the resulting environment map.
|
||||
//
|
||||
// Face -
|
||||
// Call this function to initiate the drawing of each face. For each
|
||||
// environment map, you will call this six times.. once for each face
|
||||
// in D3DCUBEMAP_FACES.
|
||||
//
|
||||
// End -
|
||||
// This will restore all render targets, and if needed compose all the
|
||||
// rendered faces into the environment map surfaces.
|
||||
//
|
||||
// OnLostDevice, OnResetDevice -
|
||||
// Call OnLostDevice() on this object before calling Reset() on the
|
||||
// device, so that this object can release any stateblocks and video
|
||||
// memory resources. After Reset(), the call OnResetDevice().
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
typedef struct _D3DXRTE_DESC
|
||||
{
|
||||
UINT Size;
|
||||
UINT MipLevels;
|
||||
D3DFORMAT Format;
|
||||
BOOL DepthStencil;
|
||||
D3DFORMAT DepthStencilFormat;
|
||||
|
||||
} D3DXRTE_DESC, *LPD3DXRTE_DESC;
|
||||
|
||||
|
||||
typedef interface ID3DXRenderToEnvMap ID3DXRenderToEnvMap;
|
||||
typedef interface ID3DXRenderToEnvMap *LPD3DXRenderToEnvMap;
|
||||
|
||||
|
||||
// {313F1B4B-C7B0-4fa2-9D9D-8D380B64385E}
|
||||
DEFINE_GUID(IID_ID3DXRenderToEnvMap,
|
||||
0x313f1b4b, 0xc7b0, 0x4fa2, 0x9d, 0x9d, 0x8d, 0x38, 0xb, 0x64, 0x38, 0x5e);
|
||||
|
||||
|
||||
#undef INTERFACE
|
||||
#define INTERFACE ID3DXRenderToEnvMap
|
||||
|
||||
DECLARE_INTERFACE_(ID3DXRenderToEnvMap, IUnknown)
|
||||
{
|
||||
// IUnknown
|
||||
STDMETHOD(QueryInterface)(THIS_ REFIID iid, LPVOID *ppv) PURE;
|
||||
STDMETHOD_(ULONG, AddRef)(THIS) PURE;
|
||||
STDMETHOD_(ULONG, Release)(THIS) PURE;
|
||||
|
||||
// ID3DXRenderToEnvMap
|
||||
STDMETHOD(GetDevice)(THIS_ LPDIRECT3DDEVICE9* ppDevice) PURE;
|
||||
STDMETHOD(GetDesc)(THIS_ D3DXRTE_DESC* pDesc) PURE;
|
||||
|
||||
STDMETHOD(BeginCube)(THIS_
|
||||
LPDIRECT3DCUBETEXTURE9 pCubeTex) PURE;
|
||||
|
||||
STDMETHOD(BeginSphere)(THIS_
|
||||
LPDIRECT3DTEXTURE9 pTex) PURE;
|
||||
|
||||
STDMETHOD(BeginHemisphere)(THIS_
|
||||
LPDIRECT3DTEXTURE9 pTexZPos,
|
||||
LPDIRECT3DTEXTURE9 pTexZNeg) PURE;
|
||||
|
||||
STDMETHOD(BeginParabolic)(THIS_
|
||||
LPDIRECT3DTEXTURE9 pTexZPos,
|
||||
LPDIRECT3DTEXTURE9 pTexZNeg) PURE;
|
||||
|
||||
STDMETHOD(Face)(THIS_ D3DCUBEMAP_FACES Face, DWORD MipFilter) PURE;
|
||||
STDMETHOD(End)(THIS_ DWORD MipFilter) PURE;
|
||||
|
||||
STDMETHOD(OnLostDevice)(THIS) PURE;
|
||||
STDMETHOD(OnResetDevice)(THIS) PURE;
|
||||
};
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif //__cplusplus
|
||||
|
||||
HRESULT WINAPI
|
||||
D3DXCreateRenderToEnvMap(
|
||||
LPDIRECT3DDEVICE9 pDevice,
|
||||
UINT Size,
|
||||
UINT MipLevels,
|
||||
D3DFORMAT Format,
|
||||
BOOL DepthStencil,
|
||||
D3DFORMAT DepthStencilFormat,
|
||||
LPD3DXRenderToEnvMap* ppRenderToEnvMap);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif //__cplusplus
|
||||
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// ID3DXLine:
|
||||
// ------------
|
||||
// This object intends to provide an easy way to draw lines using D3D.
|
||||
//
|
||||
// Begin -
|
||||
// Prepares device for drawing lines
|
||||
//
|
||||
// Draw -
|
||||
// Draws a line strip in screen-space.
|
||||
// Input is in the form of a array defining points on the line strip. of D3DXVECTOR2
|
||||
//
|
||||
// DrawTransform -
|
||||
// Draws a line in screen-space with a specified input transformation matrix.
|
||||
//
|
||||
// End -
|
||||
// Restores device state to how it was when Begin was called.
|
||||
//
|
||||
// SetPattern -
|
||||
// Applies a stipple pattern to the line. Input is one 32-bit
|
||||
// DWORD which describes the stipple pattern. 1 is opaque, 0 is
|
||||
// transparent.
|
||||
//
|
||||
// SetPatternScale -
|
||||
// Stretches the stipple pattern in the u direction. Input is one
|
||||
// floating-point value. 0.0f is no scaling, whereas 1.0f doubles
|
||||
// the length of the stipple pattern.
|
||||
//
|
||||
// SetWidth -
|
||||
// Specifies the thickness of the line in the v direction. Input is
|
||||
// one floating-point value.
|
||||
//
|
||||
// SetAntialias -
|
||||
// Toggles line antialiasing. Input is a BOOL.
|
||||
// TRUE = Antialiasing on.
|
||||
// FALSE = Antialiasing off.
|
||||
//
|
||||
// SetGLLines -
|
||||
// Toggles non-antialiased OpenGL line emulation. Input is a BOOL.
|
||||
// TRUE = OpenGL line emulation on.
|
||||
// FALSE = OpenGL line emulation off.
|
||||
//
|
||||
// OpenGL line: Regular line:
|
||||
// *\ *\
|
||||
// | \ / \
|
||||
// | \ *\ \
|
||||
// *\ \ \ \
|
||||
// \ \ \ \
|
||||
// \ * \ *
|
||||
// \ | \ /
|
||||
// \| *
|
||||
// *
|
||||
//
|
||||
// OnLostDevice, OnResetDevice -
|
||||
// Call OnLostDevice() on this object before calling Reset() on the
|
||||
// device, so that this object can release any stateblocks and video
|
||||
// memory resources. After Reset(), the call OnResetDevice().
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
typedef interface ID3DXLine ID3DXLine;
|
||||
typedef interface ID3DXLine *LPD3DXLINE;
|
||||
|
||||
|
||||
// {D379BA7F-9042-4ac4-9F5E-58192A4C6BD8}
|
||||
DEFINE_GUID(IID_ID3DXLine,
|
||||
0xd379ba7f, 0x9042, 0x4ac4, 0x9f, 0x5e, 0x58, 0x19, 0x2a, 0x4c, 0x6b, 0xd8);
|
||||
|
||||
#undef INTERFACE
|
||||
#define INTERFACE ID3DXLine
|
||||
|
||||
DECLARE_INTERFACE_(ID3DXLine, IUnknown)
|
||||
{
|
||||
// IUnknown
|
||||
STDMETHOD(QueryInterface)(THIS_ REFIID iid, LPVOID *ppv) PURE;
|
||||
STDMETHOD_(ULONG, AddRef)(THIS) PURE;
|
||||
STDMETHOD_(ULONG, Release)(THIS) PURE;
|
||||
|
||||
// ID3DXLine
|
||||
STDMETHOD(GetDevice)(THIS_ LPDIRECT3DDEVICE9* ppDevice) PURE;
|
||||
|
||||
STDMETHOD(Begin)(THIS) PURE;
|
||||
|
||||
STDMETHOD(Draw)(THIS_ CONST D3DXVECTOR2 *pVertexList,
|
||||
DWORD dwVertexListCount, D3DCOLOR Color) PURE;
|
||||
|
||||
STDMETHOD(DrawTransform)(THIS_ CONST D3DXVECTOR3 *pVertexList,
|
||||
DWORD dwVertexListCount, CONST D3DXMATRIX* pTransform,
|
||||
D3DCOLOR Color) PURE;
|
||||
|
||||
STDMETHOD(SetPattern)(THIS_ DWORD dwPattern) PURE;
|
||||
STDMETHOD_(DWORD, GetPattern)(THIS) PURE;
|
||||
|
||||
STDMETHOD(SetPatternScale)(THIS_ FLOAT fPatternScale) PURE;
|
||||
STDMETHOD_(FLOAT, GetPatternScale)(THIS) PURE;
|
||||
|
||||
STDMETHOD(SetWidth)(THIS_ FLOAT fWidth) PURE;
|
||||
STDMETHOD_(FLOAT, GetWidth)(THIS) PURE;
|
||||
|
||||
STDMETHOD(SetAntialias)(THIS_ BOOL bAntialias) PURE;
|
||||
STDMETHOD_(BOOL, GetAntialias)(THIS) PURE;
|
||||
|
||||
STDMETHOD(SetGLLines)(THIS_ BOOL bGLLines) PURE;
|
||||
STDMETHOD_(BOOL, GetGLLines)(THIS) PURE;
|
||||
|
||||
STDMETHOD(End)(THIS) PURE;
|
||||
|
||||
STDMETHOD(OnLostDevice)(THIS) PURE;
|
||||
STDMETHOD(OnResetDevice)(THIS) PURE;
|
||||
};
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif //__cplusplus
|
||||
|
||||
|
||||
HRESULT WINAPI
|
||||
D3DXCreateLine(
|
||||
LPDIRECT3DDEVICE9 pDevice,
|
||||
LPD3DXLINE* ppLine);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif //__cplusplus
|
||||
|
||||
#endif //__D3DX9CORE_H__
|
||||
|
|
@ -0,0 +1,873 @@
|
|||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
//
|
||||
// File: d3dx9effect.h
|
||||
// Content: D3DX effect types and Shaders
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "d3dx9.h"
|
||||
|
||||
#ifndef __D3DX9EFFECT_H__
|
||||
#define __D3DX9EFFECT_H__
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// D3DXFX_DONOTSAVESTATE
|
||||
// This flag is used as a parameter to ID3DXEffect::Begin(). When this flag
|
||||
// is specified, device state is not saved or restored in Begin/End.
|
||||
// D3DXFX_DONOTSAVESHADERSTATE
|
||||
// This flag is used as a parameter to ID3DXEffect::Begin(). When this flag
|
||||
// is specified, shader device state is not saved or restored in Begin/End.
|
||||
// This includes pixel/vertex shaders and shader constants
|
||||
// D3DXFX_DONOTSAVESAMPLERSTATE
|
||||
// This flag is used as a parameter to ID3DXEffect::Begin(). When this flag
|
||||
// is specified, sampler device state is not saved or restored in Begin/End.
|
||||
// D3DXFX_NOT_CLONEABLE
|
||||
// This flag is used as a parameter to the D3DXCreateEffect family of APIs.
|
||||
// When this flag is specified, the effect will be non-cloneable and will not
|
||||
// contain any shader binary data.
|
||||
// Furthermore, GetPassDesc will not return shader function pointers.
|
||||
// Setting this flag reduces effect memory usage by about 50%.
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
#define D3DXFX_DONOTSAVESTATE (1 << 0)
|
||||
#define D3DXFX_DONOTSAVESHADERSTATE (1 << 1)
|
||||
#define D3DXFX_DONOTSAVESAMPLERSTATE (1 << 2)
|
||||
|
||||
#define D3DXFX_NOT_CLONEABLE (1 << 11)
|
||||
#define D3DXFX_LARGEADDRESSAWARE (1 << 17)
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// D3DX_PARAMETER_SHARED
|
||||
// Indicates that the value of a parameter will be shared with all effects
|
||||
// which share the same namespace. Changing the value in one effect will
|
||||
// change it in all.
|
||||
//
|
||||
// D3DX_PARAMETER_LITERAL
|
||||
// Indicates that the value of this parameter can be treated as literal.
|
||||
// Literal parameters can be marked when the effect is compiled, and their
|
||||
// cannot be changed after the effect is compiled. Shared parameters cannot
|
||||
// be literal.
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
#define D3DX_PARAMETER_SHARED (1 << 0)
|
||||
#define D3DX_PARAMETER_LITERAL (1 << 1)
|
||||
#define D3DX_PARAMETER_ANNOTATION (1 << 2)
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// D3DXEFFECT_DESC:
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
typedef struct _D3DXEFFECT_DESC
|
||||
{
|
||||
LPCSTR Creator; // Creator string
|
||||
UINT Parameters; // Number of parameters
|
||||
UINT Techniques; // Number of techniques
|
||||
UINT Functions; // Number of function entrypoints
|
||||
|
||||
} D3DXEFFECT_DESC;
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// D3DXPARAMETER_DESC:
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
typedef struct _D3DXPARAMETER_DESC
|
||||
{
|
||||
LPCSTR Name; // Parameter name
|
||||
LPCSTR Semantic; // Parameter semantic
|
||||
D3DXPARAMETER_CLASS Class; // Class
|
||||
D3DXPARAMETER_TYPE Type; // Component type
|
||||
UINT Rows; // Number of rows
|
||||
UINT Columns; // Number of columns
|
||||
UINT Elements; // Number of array elements
|
||||
UINT Annotations; // Number of annotations
|
||||
UINT StructMembers; // Number of structure member sub-parameters
|
||||
DWORD Flags; // D3DX_PARAMETER_* flags
|
||||
UINT Bytes; // Parameter size, in bytes
|
||||
|
||||
} D3DXPARAMETER_DESC;
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// D3DXTECHNIQUE_DESC:
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
typedef struct _D3DXTECHNIQUE_DESC
|
||||
{
|
||||
LPCSTR Name; // Technique name
|
||||
UINT Passes; // Number of passes
|
||||
UINT Annotations; // Number of annotations
|
||||
|
||||
} D3DXTECHNIQUE_DESC;
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// D3DXPASS_DESC:
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
typedef struct _D3DXPASS_DESC
|
||||
{
|
||||
LPCSTR Name; // Pass name
|
||||
UINT Annotations; // Number of annotations
|
||||
|
||||
CONST DWORD *pVertexShaderFunction; // Vertex shader function
|
||||
CONST DWORD *pPixelShaderFunction; // Pixel shader function
|
||||
|
||||
} D3DXPASS_DESC;
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// D3DXFUNCTION_DESC:
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
typedef struct _D3DXFUNCTION_DESC
|
||||
{
|
||||
LPCSTR Name; // Function name
|
||||
UINT Annotations; // Number of annotations
|
||||
|
||||
} D3DXFUNCTION_DESC;
|
||||
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
// ID3DXEffectPool ///////////////////////////////////////////////////////////
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
typedef interface ID3DXEffectPool ID3DXEffectPool;
|
||||
typedef interface ID3DXEffectPool *LPD3DXEFFECTPOOL;
|
||||
|
||||
// {9537AB04-3250-412e-8213-FCD2F8677933}
|
||||
DEFINE_GUID(IID_ID3DXEffectPool,
|
||||
0x9537ab04, 0x3250, 0x412e, 0x82, 0x13, 0xfc, 0xd2, 0xf8, 0x67, 0x79, 0x33);
|
||||
|
||||
|
||||
#undef INTERFACE
|
||||
#define INTERFACE ID3DXEffectPool
|
||||
|
||||
DECLARE_INTERFACE_(ID3DXEffectPool, IUnknown)
|
||||
{
|
||||
// IUnknown
|
||||
STDMETHOD(QueryInterface)(THIS_ REFIID iid, LPVOID *ppv) PURE;
|
||||
STDMETHOD_(ULONG, AddRef)(THIS) PURE;
|
||||
STDMETHOD_(ULONG, Release)(THIS) PURE;
|
||||
|
||||
// No public methods
|
||||
};
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
// ID3DXBaseEffect ///////////////////////////////////////////////////////////
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
typedef interface ID3DXBaseEffect ID3DXBaseEffect;
|
||||
typedef interface ID3DXBaseEffect *LPD3DXBASEEFFECT;
|
||||
|
||||
// {017C18AC-103F-4417-8C51-6BF6EF1E56BE}
|
||||
DEFINE_GUID(IID_ID3DXBaseEffect,
|
||||
0x17c18ac, 0x103f, 0x4417, 0x8c, 0x51, 0x6b, 0xf6, 0xef, 0x1e, 0x56, 0xbe);
|
||||
|
||||
|
||||
#undef INTERFACE
|
||||
#define INTERFACE ID3DXBaseEffect
|
||||
|
||||
DECLARE_INTERFACE_(ID3DXBaseEffect, IUnknown)
|
||||
{
|
||||
// IUnknown
|
||||
STDMETHOD(QueryInterface)(THIS_ REFIID iid, LPVOID *ppv) PURE;
|
||||
STDMETHOD_(ULONG, AddRef)(THIS) PURE;
|
||||
STDMETHOD_(ULONG, Release)(THIS) PURE;
|
||||
|
||||
// Descs
|
||||
STDMETHOD(GetDesc)(THIS_ D3DXEFFECT_DESC* pDesc) PURE;
|
||||
STDMETHOD(GetParameterDesc)(THIS_ D3DXHANDLE hParameter, D3DXPARAMETER_DESC* pDesc) PURE;
|
||||
STDMETHOD(GetTechniqueDesc)(THIS_ D3DXHANDLE hTechnique, D3DXTECHNIQUE_DESC* pDesc) PURE;
|
||||
STDMETHOD(GetPassDesc)(THIS_ D3DXHANDLE hPass, D3DXPASS_DESC* pDesc) PURE;
|
||||
STDMETHOD(GetFunctionDesc)(THIS_ D3DXHANDLE hShader, D3DXFUNCTION_DESC* pDesc) PURE;
|
||||
|
||||
// Handle operations
|
||||
STDMETHOD_(D3DXHANDLE, GetParameter)(THIS_ D3DXHANDLE hParameter, UINT Index) PURE;
|
||||
STDMETHOD_(D3DXHANDLE, GetParameterByName)(THIS_ D3DXHANDLE hParameter, LPCSTR pName) PURE;
|
||||
STDMETHOD_(D3DXHANDLE, GetParameterBySemantic)(THIS_ D3DXHANDLE hParameter, LPCSTR pSemantic) PURE;
|
||||
STDMETHOD_(D3DXHANDLE, GetParameterElement)(THIS_ D3DXHANDLE hParameter, UINT Index) PURE;
|
||||
STDMETHOD_(D3DXHANDLE, GetTechnique)(THIS_ UINT Index) PURE;
|
||||
STDMETHOD_(D3DXHANDLE, GetTechniqueByName)(THIS_ LPCSTR pName) PURE;
|
||||
STDMETHOD_(D3DXHANDLE, GetPass)(THIS_ D3DXHANDLE hTechnique, UINT Index) PURE;
|
||||
STDMETHOD_(D3DXHANDLE, GetPassByName)(THIS_ D3DXHANDLE hTechnique, LPCSTR pName) PURE;
|
||||
STDMETHOD_(D3DXHANDLE, GetFunction)(THIS_ UINT Index) PURE;
|
||||
STDMETHOD_(D3DXHANDLE, GetFunctionByName)(THIS_ LPCSTR pName) PURE;
|
||||
STDMETHOD_(D3DXHANDLE, GetAnnotation)(THIS_ D3DXHANDLE hObject, UINT Index) PURE;
|
||||
STDMETHOD_(D3DXHANDLE, GetAnnotationByName)(THIS_ D3DXHANDLE hObject, LPCSTR pName) PURE;
|
||||
|
||||
// Get/Set Parameters
|
||||
STDMETHOD(SetValue)(THIS_ D3DXHANDLE hParameter, LPCVOID pData, UINT Bytes) PURE;
|
||||
STDMETHOD(GetValue)(THIS_ D3DXHANDLE hParameter, LPVOID pData, UINT Bytes) PURE;
|
||||
STDMETHOD(SetBool)(THIS_ D3DXHANDLE hParameter, BOOL b) PURE;
|
||||
STDMETHOD(GetBool)(THIS_ D3DXHANDLE hParameter, BOOL* pb) PURE;
|
||||
STDMETHOD(SetBoolArray)(THIS_ D3DXHANDLE hParameter, CONST BOOL* pb, UINT Count) PURE;
|
||||
STDMETHOD(GetBoolArray)(THIS_ D3DXHANDLE hParameter, BOOL* pb, UINT Count) PURE;
|
||||
STDMETHOD(SetInt)(THIS_ D3DXHANDLE hParameter, INT n) PURE;
|
||||
STDMETHOD(GetInt)(THIS_ D3DXHANDLE hParameter, INT* pn) PURE;
|
||||
STDMETHOD(SetIntArray)(THIS_ D3DXHANDLE hParameter, CONST INT* pn, UINT Count) PURE;
|
||||
STDMETHOD(GetIntArray)(THIS_ D3DXHANDLE hParameter, INT* pn, UINT Count) PURE;
|
||||
STDMETHOD(SetFloat)(THIS_ D3DXHANDLE hParameter, FLOAT f) PURE;
|
||||
STDMETHOD(GetFloat)(THIS_ D3DXHANDLE hParameter, FLOAT* pf) PURE;
|
||||
STDMETHOD(SetFloatArray)(THIS_ D3DXHANDLE hParameter, CONST FLOAT* pf, UINT Count) PURE;
|
||||
STDMETHOD(GetFloatArray)(THIS_ D3DXHANDLE hParameter, FLOAT* pf, UINT Count) PURE;
|
||||
STDMETHOD(SetVector)(THIS_ D3DXHANDLE hParameter, CONST D3DXVECTOR4* pVector) PURE;
|
||||
STDMETHOD(GetVector)(THIS_ D3DXHANDLE hParameter, D3DXVECTOR4* pVector) PURE;
|
||||
STDMETHOD(SetVectorArray)(THIS_ D3DXHANDLE hParameter, CONST D3DXVECTOR4* pVector, UINT Count) PURE;
|
||||
STDMETHOD(GetVectorArray)(THIS_ D3DXHANDLE hParameter, D3DXVECTOR4* pVector, UINT Count) PURE;
|
||||
STDMETHOD(SetMatrix)(THIS_ D3DXHANDLE hParameter, CONST D3DXMATRIX* pMatrix) PURE;
|
||||
STDMETHOD(GetMatrix)(THIS_ D3DXHANDLE hParameter, D3DXMATRIX* pMatrix) PURE;
|
||||
STDMETHOD(SetMatrixArray)(THIS_ D3DXHANDLE hParameter, CONST D3DXMATRIX* pMatrix, UINT Count) PURE;
|
||||
STDMETHOD(GetMatrixArray)(THIS_ D3DXHANDLE hParameter, D3DXMATRIX* pMatrix, UINT Count) PURE;
|
||||
STDMETHOD(SetMatrixPointerArray)(THIS_ D3DXHANDLE hParameter, CONST D3DXMATRIX** ppMatrix, UINT Count) PURE;
|
||||
STDMETHOD(GetMatrixPointerArray)(THIS_ D3DXHANDLE hParameter, D3DXMATRIX** ppMatrix, UINT Count) PURE;
|
||||
STDMETHOD(SetMatrixTranspose)(THIS_ D3DXHANDLE hParameter, CONST D3DXMATRIX* pMatrix) PURE;
|
||||
STDMETHOD(GetMatrixTranspose)(THIS_ D3DXHANDLE hParameter, D3DXMATRIX* pMatrix) PURE;
|
||||
STDMETHOD(SetMatrixTransposeArray)(THIS_ D3DXHANDLE hParameter, CONST D3DXMATRIX* pMatrix, UINT Count) PURE;
|
||||
STDMETHOD(GetMatrixTransposeArray)(THIS_ D3DXHANDLE hParameter, D3DXMATRIX* pMatrix, UINT Count) PURE;
|
||||
STDMETHOD(SetMatrixTransposePointerArray)(THIS_ D3DXHANDLE hParameter, CONST D3DXMATRIX** ppMatrix, UINT Count) PURE;
|
||||
STDMETHOD(GetMatrixTransposePointerArray)(THIS_ D3DXHANDLE hParameter, D3DXMATRIX** ppMatrix, UINT Count) PURE;
|
||||
STDMETHOD(SetString)(THIS_ D3DXHANDLE hParameter, LPCSTR pString) PURE;
|
||||
STDMETHOD(GetString)(THIS_ D3DXHANDLE hParameter, LPCSTR* ppString) PURE;
|
||||
STDMETHOD(SetTexture)(THIS_ D3DXHANDLE hParameter, LPDIRECT3DBASETEXTURE9 pTexture) PURE;
|
||||
STDMETHOD(GetTexture)(THIS_ D3DXHANDLE hParameter, LPDIRECT3DBASETEXTURE9 *ppTexture) PURE;
|
||||
STDMETHOD(GetPixelShader)(THIS_ D3DXHANDLE hParameter, LPDIRECT3DPIXELSHADER9 *ppPShader) PURE;
|
||||
STDMETHOD(GetVertexShader)(THIS_ D3DXHANDLE hParameter, LPDIRECT3DVERTEXSHADER9 *ppVShader) PURE;
|
||||
|
||||
//Set Range of an Array to pass to device
|
||||
//Useful for sending only a subrange of an array down to the device
|
||||
STDMETHOD(SetArrayRange)(THIS_ D3DXHANDLE hParameter, UINT uStart, UINT uEnd) PURE;
|
||||
|
||||
};
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// ID3DXEffectStateManager:
|
||||
// ------------------------
|
||||
// This is a user implemented interface that can be used to manage device
|
||||
// state changes made by an Effect.
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
typedef interface ID3DXEffectStateManager ID3DXEffectStateManager;
|
||||
typedef interface ID3DXEffectStateManager *LPD3DXEFFECTSTATEMANAGER;
|
||||
|
||||
// {79AAB587-6DBC-4fa7-82DE-37FA1781C5CE}
|
||||
DEFINE_GUID(IID_ID3DXEffectStateManager,
|
||||
0x79aab587, 0x6dbc, 0x4fa7, 0x82, 0xde, 0x37, 0xfa, 0x17, 0x81, 0xc5, 0xce);
|
||||
|
||||
#undef INTERFACE
|
||||
#define INTERFACE ID3DXEffectStateManager
|
||||
|
||||
DECLARE_INTERFACE_(ID3DXEffectStateManager, IUnknown)
|
||||
{
|
||||
// The user must correctly implement QueryInterface, AddRef, and Release.
|
||||
|
||||
// IUnknown
|
||||
STDMETHOD(QueryInterface)(THIS_ REFIID iid, LPVOID *ppv) PURE;
|
||||
STDMETHOD_(ULONG, AddRef)(THIS) PURE;
|
||||
STDMETHOD_(ULONG, Release)(THIS) PURE;
|
||||
|
||||
// The following methods are called by the Effect when it wants to make
|
||||
// the corresponding device call. Note that:
|
||||
// 1. Users manage the state and are therefore responsible for making the
|
||||
// the corresponding device calls themselves inside their callbacks.
|
||||
// 2. Effects pay attention to the return values of the callbacks, and so
|
||||
// users must pay attention to what they return in their callbacks.
|
||||
|
||||
STDMETHOD(SetTransform)(THIS_ D3DTRANSFORMSTATETYPE State, CONST D3DMATRIX *pMatrix) PURE;
|
||||
STDMETHOD(SetMaterial)(THIS_ CONST D3DMATERIAL9 *pMaterial) PURE;
|
||||
STDMETHOD(SetLight)(THIS_ DWORD Index, CONST D3DLIGHT9 *pLight) PURE;
|
||||
STDMETHOD(LightEnable)(THIS_ DWORD Index, BOOL Enable) PURE;
|
||||
STDMETHOD(SetRenderState)(THIS_ D3DRENDERSTATETYPE State, DWORD Value) PURE;
|
||||
STDMETHOD(SetTexture)(THIS_ DWORD Stage, LPDIRECT3DBASETEXTURE9 pTexture) PURE;
|
||||
STDMETHOD(SetTextureStageState)(THIS_ DWORD Stage, D3DTEXTURESTAGESTATETYPE Type, DWORD Value) PURE;
|
||||
STDMETHOD(SetSamplerState)(THIS_ DWORD Sampler, D3DSAMPLERSTATETYPE Type, DWORD Value) PURE;
|
||||
STDMETHOD(SetNPatchMode)(THIS_ FLOAT NumSegments) PURE;
|
||||
STDMETHOD(SetFVF)(THIS_ DWORD FVF) PURE;
|
||||
STDMETHOD(SetVertexShader)(THIS_ LPDIRECT3DVERTEXSHADER9 pShader) PURE;
|
||||
STDMETHOD(SetVertexShaderConstantF)(THIS_ UINT RegisterIndex, CONST FLOAT *pConstantData, UINT RegisterCount) PURE;
|
||||
STDMETHOD(SetVertexShaderConstantI)(THIS_ UINT RegisterIndex, CONST INT *pConstantData, UINT RegisterCount) PURE;
|
||||
STDMETHOD(SetVertexShaderConstantB)(THIS_ UINT RegisterIndex, CONST BOOL *pConstantData, UINT RegisterCount) PURE;
|
||||
STDMETHOD(SetPixelShader)(THIS_ LPDIRECT3DPIXELSHADER9 pShader) PURE;
|
||||
STDMETHOD(SetPixelShaderConstantF)(THIS_ UINT RegisterIndex, CONST FLOAT *pConstantData, UINT RegisterCount) PURE;
|
||||
STDMETHOD(SetPixelShaderConstantI)(THIS_ UINT RegisterIndex, CONST INT *pConstantData, UINT RegisterCount) PURE;
|
||||
STDMETHOD(SetPixelShaderConstantB)(THIS_ UINT RegisterIndex, CONST BOOL *pConstantData, UINT RegisterCount) PURE;
|
||||
};
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
// ID3DXEffect ///////////////////////////////////////////////////////////////
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
typedef interface ID3DXEffect ID3DXEffect;
|
||||
typedef interface ID3DXEffect *LPD3DXEFFECT;
|
||||
|
||||
// {F6CEB4B3-4E4C-40dd-B883-8D8DE5EA0CD5}
|
||||
DEFINE_GUID(IID_ID3DXEffect,
|
||||
0xf6ceb4b3, 0x4e4c, 0x40dd, 0xb8, 0x83, 0x8d, 0x8d, 0xe5, 0xea, 0xc, 0xd5);
|
||||
|
||||
#undef INTERFACE
|
||||
#define INTERFACE ID3DXEffect
|
||||
|
||||
DECLARE_INTERFACE_(ID3DXEffect, ID3DXBaseEffect)
|
||||
{
|
||||
// ID3DXBaseEffect
|
||||
STDMETHOD(QueryInterface)(THIS_ REFIID iid, LPVOID *ppv) PURE;
|
||||
STDMETHOD_(ULONG, AddRef)(THIS) PURE;
|
||||
STDMETHOD_(ULONG, Release)(THIS) PURE;
|
||||
|
||||
// Descs
|
||||
STDMETHOD(GetDesc)(THIS_ D3DXEFFECT_DESC* pDesc) PURE;
|
||||
STDMETHOD(GetParameterDesc)(THIS_ D3DXHANDLE hParameter, D3DXPARAMETER_DESC* pDesc) PURE;
|
||||
STDMETHOD(GetTechniqueDesc)(THIS_ D3DXHANDLE hTechnique, D3DXTECHNIQUE_DESC* pDesc) PURE;
|
||||
STDMETHOD(GetPassDesc)(THIS_ D3DXHANDLE hPass, D3DXPASS_DESC* pDesc) PURE;
|
||||
STDMETHOD(GetFunctionDesc)(THIS_ D3DXHANDLE hShader, D3DXFUNCTION_DESC* pDesc) PURE;
|
||||
|
||||
// Handle operations
|
||||
STDMETHOD_(D3DXHANDLE, GetParameter)(THIS_ D3DXHANDLE hParameter, UINT Index) PURE;
|
||||
STDMETHOD_(D3DXHANDLE, GetParameterByName)(THIS_ D3DXHANDLE hParameter, LPCSTR pName) PURE;
|
||||
STDMETHOD_(D3DXHANDLE, GetParameterBySemantic)(THIS_ D3DXHANDLE hParameter, LPCSTR pSemantic) PURE;
|
||||
STDMETHOD_(D3DXHANDLE, GetParameterElement)(THIS_ D3DXHANDLE hParameter, UINT Index) PURE;
|
||||
STDMETHOD_(D3DXHANDLE, GetTechnique)(THIS_ UINT Index) PURE;
|
||||
STDMETHOD_(D3DXHANDLE, GetTechniqueByName)(THIS_ LPCSTR pName) PURE;
|
||||
STDMETHOD_(D3DXHANDLE, GetPass)(THIS_ D3DXHANDLE hTechnique, UINT Index) PURE;
|
||||
STDMETHOD_(D3DXHANDLE, GetPassByName)(THIS_ D3DXHANDLE hTechnique, LPCSTR pName) PURE;
|
||||
STDMETHOD_(D3DXHANDLE, GetFunction)(THIS_ UINT Index) PURE;
|
||||
STDMETHOD_(D3DXHANDLE, GetFunctionByName)(THIS_ LPCSTR pName) PURE;
|
||||
STDMETHOD_(D3DXHANDLE, GetAnnotation)(THIS_ D3DXHANDLE hObject, UINT Index) PURE;
|
||||
STDMETHOD_(D3DXHANDLE, GetAnnotationByName)(THIS_ D3DXHANDLE hObject, LPCSTR pName) PURE;
|
||||
|
||||
// Get/Set Parameters
|
||||
STDMETHOD(SetValue)(THIS_ D3DXHANDLE hParameter, LPCVOID pData, UINT Bytes) PURE;
|
||||
STDMETHOD(GetValue)(THIS_ D3DXHANDLE hParameter, LPVOID pData, UINT Bytes) PURE;
|
||||
STDMETHOD(SetBool)(THIS_ D3DXHANDLE hParameter, BOOL b) PURE;
|
||||
STDMETHOD(GetBool)(THIS_ D3DXHANDLE hParameter, BOOL* pb) PURE;
|
||||
STDMETHOD(SetBoolArray)(THIS_ D3DXHANDLE hParameter, CONST BOOL* pb, UINT Count) PURE;
|
||||
STDMETHOD(GetBoolArray)(THIS_ D3DXHANDLE hParameter, BOOL* pb, UINT Count) PURE;
|
||||
STDMETHOD(SetInt)(THIS_ D3DXHANDLE hParameter, INT n) PURE;
|
||||
STDMETHOD(GetInt)(THIS_ D3DXHANDLE hParameter, INT* pn) PURE;
|
||||
STDMETHOD(SetIntArray)(THIS_ D3DXHANDLE hParameter, CONST INT* pn, UINT Count) PURE;
|
||||
STDMETHOD(GetIntArray)(THIS_ D3DXHANDLE hParameter, INT* pn, UINT Count) PURE;
|
||||
STDMETHOD(SetFloat)(THIS_ D3DXHANDLE hParameter, FLOAT f) PURE;
|
||||
STDMETHOD(GetFloat)(THIS_ D3DXHANDLE hParameter, FLOAT* pf) PURE;
|
||||
STDMETHOD(SetFloatArray)(THIS_ D3DXHANDLE hParameter, CONST FLOAT* pf, UINT Count) PURE;
|
||||
STDMETHOD(GetFloatArray)(THIS_ D3DXHANDLE hParameter, FLOAT* pf, UINT Count) PURE;
|
||||
STDMETHOD(SetVector)(THIS_ D3DXHANDLE hParameter, CONST D3DXVECTOR4* pVector) PURE;
|
||||
STDMETHOD(GetVector)(THIS_ D3DXHANDLE hParameter, D3DXVECTOR4* pVector) PURE;
|
||||
STDMETHOD(SetVectorArray)(THIS_ D3DXHANDLE hParameter, CONST D3DXVECTOR4* pVector, UINT Count) PURE;
|
||||
STDMETHOD(GetVectorArray)(THIS_ D3DXHANDLE hParameter, D3DXVECTOR4* pVector, UINT Count) PURE;
|
||||
STDMETHOD(SetMatrix)(THIS_ D3DXHANDLE hParameter, CONST D3DXMATRIX* pMatrix) PURE;
|
||||
STDMETHOD(GetMatrix)(THIS_ D3DXHANDLE hParameter, D3DXMATRIX* pMatrix) PURE;
|
||||
STDMETHOD(SetMatrixArray)(THIS_ D3DXHANDLE hParameter, CONST D3DXMATRIX* pMatrix, UINT Count) PURE;
|
||||
STDMETHOD(GetMatrixArray)(THIS_ D3DXHANDLE hParameter, D3DXMATRIX* pMatrix, UINT Count) PURE;
|
||||
STDMETHOD(SetMatrixPointerArray)(THIS_ D3DXHANDLE hParameter, CONST D3DXMATRIX** ppMatrix, UINT Count) PURE;
|
||||
STDMETHOD(GetMatrixPointerArray)(THIS_ D3DXHANDLE hParameter, D3DXMATRIX** ppMatrix, UINT Count) PURE;
|
||||
STDMETHOD(SetMatrixTranspose)(THIS_ D3DXHANDLE hParameter, CONST D3DXMATRIX* pMatrix) PURE;
|
||||
STDMETHOD(GetMatrixTranspose)(THIS_ D3DXHANDLE hParameter, D3DXMATRIX* pMatrix) PURE;
|
||||
STDMETHOD(SetMatrixTransposeArray)(THIS_ D3DXHANDLE hParameter, CONST D3DXMATRIX* pMatrix, UINT Count) PURE;
|
||||
STDMETHOD(GetMatrixTransposeArray)(THIS_ D3DXHANDLE hParameter, D3DXMATRIX* pMatrix, UINT Count) PURE;
|
||||
STDMETHOD(SetMatrixTransposePointerArray)(THIS_ D3DXHANDLE hParameter, CONST D3DXMATRIX** ppMatrix, UINT Count) PURE;
|
||||
STDMETHOD(GetMatrixTransposePointerArray)(THIS_ D3DXHANDLE hParameter, D3DXMATRIX** ppMatrix, UINT Count) PURE;
|
||||
STDMETHOD(SetString)(THIS_ D3DXHANDLE hParameter, LPCSTR pString) PURE;
|
||||
STDMETHOD(GetString)(THIS_ D3DXHANDLE hParameter, LPCSTR* ppString) PURE;
|
||||
STDMETHOD(SetTexture)(THIS_ D3DXHANDLE hParameter, LPDIRECT3DBASETEXTURE9 pTexture) PURE;
|
||||
STDMETHOD(GetTexture)(THIS_ D3DXHANDLE hParameter, LPDIRECT3DBASETEXTURE9 *ppTexture) PURE;
|
||||
STDMETHOD(GetPixelShader)(THIS_ D3DXHANDLE hParameter, LPDIRECT3DPIXELSHADER9 *ppPShader) PURE;
|
||||
STDMETHOD(GetVertexShader)(THIS_ D3DXHANDLE hParameter, LPDIRECT3DVERTEXSHADER9 *ppVShader) PURE;
|
||||
|
||||
//Set Range of an Array to pass to device
|
||||
//Usefull for sending only a subrange of an array down to the device
|
||||
STDMETHOD(SetArrayRange)(THIS_ D3DXHANDLE hParameter, UINT uStart, UINT uEnd) PURE;
|
||||
// ID3DXBaseEffect
|
||||
|
||||
|
||||
// Pool
|
||||
STDMETHOD(GetPool)(THIS_ LPD3DXEFFECTPOOL* ppPool) PURE;
|
||||
|
||||
// Selecting and setting a technique
|
||||
STDMETHOD(SetTechnique)(THIS_ D3DXHANDLE hTechnique) PURE;
|
||||
STDMETHOD_(D3DXHANDLE, GetCurrentTechnique)(THIS) PURE;
|
||||
STDMETHOD(ValidateTechnique)(THIS_ D3DXHANDLE hTechnique) PURE;
|
||||
STDMETHOD(FindNextValidTechnique)(THIS_ D3DXHANDLE hTechnique, D3DXHANDLE *pTechnique) PURE;
|
||||
STDMETHOD_(BOOL, IsParameterUsed)(THIS_ D3DXHANDLE hParameter, D3DXHANDLE hTechnique) PURE;
|
||||
|
||||
// Using current technique
|
||||
// Begin starts active technique
|
||||
// BeginPass begins a pass
|
||||
// CommitChanges updates changes to any set calls in the pass. This should be called before
|
||||
// any DrawPrimitive call to d3d
|
||||
// EndPass ends a pass
|
||||
// End ends active technique
|
||||
STDMETHOD(Begin)(THIS_ UINT *pPasses, DWORD Flags) PURE;
|
||||
STDMETHOD(BeginPass)(THIS_ UINT Pass) PURE;
|
||||
STDMETHOD(CommitChanges)(THIS) PURE;
|
||||
STDMETHOD(EndPass)(THIS) PURE;
|
||||
STDMETHOD(End)(THIS) PURE;
|
||||
|
||||
// Managing D3D Device
|
||||
STDMETHOD(GetDevice)(THIS_ LPDIRECT3DDEVICE9* ppDevice) PURE;
|
||||
STDMETHOD(OnLostDevice)(THIS) PURE;
|
||||
STDMETHOD(OnResetDevice)(THIS) PURE;
|
||||
|
||||
// Logging device calls
|
||||
STDMETHOD(SetStateManager)(THIS_ LPD3DXEFFECTSTATEMANAGER pManager) PURE;
|
||||
STDMETHOD(GetStateManager)(THIS_ LPD3DXEFFECTSTATEMANAGER *ppManager) PURE;
|
||||
|
||||
// Parameter blocks
|
||||
STDMETHOD(BeginParameterBlock)(THIS) PURE;
|
||||
STDMETHOD_(D3DXHANDLE, EndParameterBlock)(THIS) PURE;
|
||||
STDMETHOD(ApplyParameterBlock)(THIS_ D3DXHANDLE hParameterBlock) PURE;
|
||||
STDMETHOD(DeleteParameterBlock)(THIS_ D3DXHANDLE hParameterBlock) PURE;
|
||||
|
||||
// Cloning
|
||||
STDMETHOD(CloneEffect)(THIS_ LPDIRECT3DDEVICE9 pDevice, LPD3DXEFFECT* ppEffect) PURE;
|
||||
|
||||
// Fast path for setting variables directly in ID3DXEffect
|
||||
STDMETHOD(SetRawValue)(THIS_ D3DXHANDLE hParameter, LPCVOID pData, UINT ByteOffset, UINT Bytes) PURE;
|
||||
};
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
// ID3DXEffectCompiler ///////////////////////////////////////////////////////
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
typedef interface ID3DXEffectCompiler ID3DXEffectCompiler;
|
||||
typedef interface ID3DXEffectCompiler *LPD3DXEFFECTCOMPILER;
|
||||
|
||||
// {51B8A949-1A31-47e6-BEA0-4B30DB53F1E0}
|
||||
DEFINE_GUID(IID_ID3DXEffectCompiler,
|
||||
0x51b8a949, 0x1a31, 0x47e6, 0xbe, 0xa0, 0x4b, 0x30, 0xdb, 0x53, 0xf1, 0xe0);
|
||||
|
||||
|
||||
#undef INTERFACE
|
||||
#define INTERFACE ID3DXEffectCompiler
|
||||
|
||||
DECLARE_INTERFACE_(ID3DXEffectCompiler, ID3DXBaseEffect)
|
||||
{
|
||||
// ID3DXBaseEffect
|
||||
STDMETHOD(QueryInterface)(THIS_ REFIID iid, LPVOID *ppv) PURE;
|
||||
STDMETHOD_(ULONG, AddRef)(THIS) PURE;
|
||||
STDMETHOD_(ULONG, Release)(THIS) PURE;
|
||||
|
||||
// Descs
|
||||
STDMETHOD(GetDesc)(THIS_ D3DXEFFECT_DESC* pDesc) PURE;
|
||||
STDMETHOD(GetParameterDesc)(THIS_ D3DXHANDLE hParameter, D3DXPARAMETER_DESC* pDesc) PURE;
|
||||
STDMETHOD(GetTechniqueDesc)(THIS_ D3DXHANDLE hTechnique, D3DXTECHNIQUE_DESC* pDesc) PURE;
|
||||
STDMETHOD(GetPassDesc)(THIS_ D3DXHANDLE hPass, D3DXPASS_DESC* pDesc) PURE;
|
||||
STDMETHOD(GetFunctionDesc)(THIS_ D3DXHANDLE hShader, D3DXFUNCTION_DESC* pDesc) PURE;
|
||||
|
||||
// Handle operations
|
||||
STDMETHOD_(D3DXHANDLE, GetParameter)(THIS_ D3DXHANDLE hParameter, UINT Index) PURE;
|
||||
STDMETHOD_(D3DXHANDLE, GetParameterByName)(THIS_ D3DXHANDLE hParameter, LPCSTR pName) PURE;
|
||||
STDMETHOD_(D3DXHANDLE, GetParameterBySemantic)(THIS_ D3DXHANDLE hParameter, LPCSTR pSemantic) PURE;
|
||||
STDMETHOD_(D3DXHANDLE, GetParameterElement)(THIS_ D3DXHANDLE hParameter, UINT Index) PURE;
|
||||
STDMETHOD_(D3DXHANDLE, GetTechnique)(THIS_ UINT Index) PURE;
|
||||
STDMETHOD_(D3DXHANDLE, GetTechniqueByName)(THIS_ LPCSTR pName) PURE;
|
||||
STDMETHOD_(D3DXHANDLE, GetPass)(THIS_ D3DXHANDLE hTechnique, UINT Index) PURE;
|
||||
STDMETHOD_(D3DXHANDLE, GetPassByName)(THIS_ D3DXHANDLE hTechnique, LPCSTR pName) PURE;
|
||||
STDMETHOD_(D3DXHANDLE, GetFunction)(THIS_ UINT Index) PURE;
|
||||
STDMETHOD_(D3DXHANDLE, GetFunctionByName)(THIS_ LPCSTR pName) PURE;
|
||||
STDMETHOD_(D3DXHANDLE, GetAnnotation)(THIS_ D3DXHANDLE hObject, UINT Index) PURE;
|
||||
STDMETHOD_(D3DXHANDLE, GetAnnotationByName)(THIS_ D3DXHANDLE hObject, LPCSTR pName) PURE;
|
||||
|
||||
// Get/Set Parameters
|
||||
STDMETHOD(SetValue)(THIS_ D3DXHANDLE hParameter, LPCVOID pData, UINT Bytes) PURE;
|
||||
STDMETHOD(GetValue)(THIS_ D3DXHANDLE hParameter, LPVOID pData, UINT Bytes) PURE;
|
||||
STDMETHOD(SetBool)(THIS_ D3DXHANDLE hParameter, BOOL b) PURE;
|
||||
STDMETHOD(GetBool)(THIS_ D3DXHANDLE hParameter, BOOL* pb) PURE;
|
||||
STDMETHOD(SetBoolArray)(THIS_ D3DXHANDLE hParameter, CONST BOOL* pb, UINT Count) PURE;
|
||||
STDMETHOD(GetBoolArray)(THIS_ D3DXHANDLE hParameter, BOOL* pb, UINT Count) PURE;
|
||||
STDMETHOD(SetInt)(THIS_ D3DXHANDLE hParameter, INT n) PURE;
|
||||
STDMETHOD(GetInt)(THIS_ D3DXHANDLE hParameter, INT* pn) PURE;
|
||||
STDMETHOD(SetIntArray)(THIS_ D3DXHANDLE hParameter, CONST INT* pn, UINT Count) PURE;
|
||||
STDMETHOD(GetIntArray)(THIS_ D3DXHANDLE hParameter, INT* pn, UINT Count) PURE;
|
||||
STDMETHOD(SetFloat)(THIS_ D3DXHANDLE hParameter, FLOAT f) PURE;
|
||||
STDMETHOD(GetFloat)(THIS_ D3DXHANDLE hParameter, FLOAT* pf) PURE;
|
||||
STDMETHOD(SetFloatArray)(THIS_ D3DXHANDLE hParameter, CONST FLOAT* pf, UINT Count) PURE;
|
||||
STDMETHOD(GetFloatArray)(THIS_ D3DXHANDLE hParameter, FLOAT* pf, UINT Count) PURE;
|
||||
STDMETHOD(SetVector)(THIS_ D3DXHANDLE hParameter, CONST D3DXVECTOR4* pVector) PURE;
|
||||
STDMETHOD(GetVector)(THIS_ D3DXHANDLE hParameter, D3DXVECTOR4* pVector) PURE;
|
||||
STDMETHOD(SetVectorArray)(THIS_ D3DXHANDLE hParameter, CONST D3DXVECTOR4* pVector, UINT Count) PURE;
|
||||
STDMETHOD(GetVectorArray)(THIS_ D3DXHANDLE hParameter, D3DXVECTOR4* pVector, UINT Count) PURE;
|
||||
STDMETHOD(SetMatrix)(THIS_ D3DXHANDLE hParameter, CONST D3DXMATRIX* pMatrix) PURE;
|
||||
STDMETHOD(GetMatrix)(THIS_ D3DXHANDLE hParameter, D3DXMATRIX* pMatrix) PURE;
|
||||
STDMETHOD(SetMatrixArray)(THIS_ D3DXHANDLE hParameter, CONST D3DXMATRIX* pMatrix, UINT Count) PURE;
|
||||
STDMETHOD(GetMatrixArray)(THIS_ D3DXHANDLE hParameter, D3DXMATRIX* pMatrix, UINT Count) PURE;
|
||||
STDMETHOD(SetMatrixPointerArray)(THIS_ D3DXHANDLE hParameter, CONST D3DXMATRIX** ppMatrix, UINT Count) PURE;
|
||||
STDMETHOD(GetMatrixPointerArray)(THIS_ D3DXHANDLE hParameter, D3DXMATRIX** ppMatrix, UINT Count) PURE;
|
||||
STDMETHOD(SetMatrixTranspose)(THIS_ D3DXHANDLE hParameter, CONST D3DXMATRIX* pMatrix) PURE;
|
||||
STDMETHOD(GetMatrixTranspose)(THIS_ D3DXHANDLE hParameter, D3DXMATRIX* pMatrix) PURE;
|
||||
STDMETHOD(SetMatrixTransposeArray)(THIS_ D3DXHANDLE hParameter, CONST D3DXMATRIX* pMatrix, UINT Count) PURE;
|
||||
STDMETHOD(GetMatrixTransposeArray)(THIS_ D3DXHANDLE hParameter, D3DXMATRIX* pMatrix, UINT Count) PURE;
|
||||
STDMETHOD(SetMatrixTransposePointerArray)(THIS_ D3DXHANDLE hParameter, CONST D3DXMATRIX** ppMatrix, UINT Count) PURE;
|
||||
STDMETHOD(GetMatrixTransposePointerArray)(THIS_ D3DXHANDLE hParameter, D3DXMATRIX** ppMatrix, UINT Count) PURE;
|
||||
STDMETHOD(SetString)(THIS_ D3DXHANDLE hParameter, LPCSTR pString) PURE;
|
||||
STDMETHOD(GetString)(THIS_ D3DXHANDLE hParameter, LPCSTR* ppString) PURE;
|
||||
STDMETHOD(SetTexture)(THIS_ D3DXHANDLE hParameter, LPDIRECT3DBASETEXTURE9 pTexture) PURE;
|
||||
STDMETHOD(GetTexture)(THIS_ D3DXHANDLE hParameter, LPDIRECT3DBASETEXTURE9 *ppTexture) PURE;
|
||||
STDMETHOD(GetPixelShader)(THIS_ D3DXHANDLE hParameter, LPDIRECT3DPIXELSHADER9 *ppPShader) PURE;
|
||||
STDMETHOD(GetVertexShader)(THIS_ D3DXHANDLE hParameter, LPDIRECT3DVERTEXSHADER9 *ppVShader) PURE;
|
||||
|
||||
//Set Range of an Array to pass to device
|
||||
//Usefull for sending only a subrange of an array down to the device
|
||||
STDMETHOD(SetArrayRange)(THIS_ D3DXHANDLE hParameter, UINT uStart, UINT uEnd) PURE;
|
||||
// ID3DXBaseEffect
|
||||
|
||||
// Parameter sharing, specialization, and information
|
||||
STDMETHOD(SetLiteral)(THIS_ D3DXHANDLE hParameter, BOOL Literal) PURE;
|
||||
STDMETHOD(GetLiteral)(THIS_ D3DXHANDLE hParameter, BOOL *pLiteral) PURE;
|
||||
|
||||
// Compilation
|
||||
STDMETHOD(CompileEffect)(THIS_ DWORD Flags,
|
||||
LPD3DXBUFFER* ppEffect, LPD3DXBUFFER* ppErrorMsgs) PURE;
|
||||
|
||||
STDMETHOD(CompileShader)(THIS_ D3DXHANDLE hFunction, LPCSTR pTarget, DWORD Flags,
|
||||
LPD3DXBUFFER* ppShader, LPD3DXBUFFER* ppErrorMsgs, LPD3DXCONSTANTTABLE* ppConstantTable) PURE;
|
||||
};
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
// APIs //////////////////////////////////////////////////////////////////////
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif //__cplusplus
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// D3DXCreateEffectPool:
|
||||
// ---------------------
|
||||
// Creates an effect pool. Pools are used for sharing parameters between
|
||||
// multiple effects. For all effects within a pool, shared parameters of the
|
||||
// same name all share the same value.
|
||||
//
|
||||
// Parameters:
|
||||
// ppPool
|
||||
// Returns the created pool.
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
HRESULT WINAPI
|
||||
D3DXCreateEffectPool(
|
||||
LPD3DXEFFECTPOOL* ppPool);
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// D3DXCreateEffect:
|
||||
// -----------------
|
||||
// Creates an effect from an ascii or binary effect description.
|
||||
//
|
||||
// Parameters:
|
||||
// pDevice
|
||||
// Pointer of the device on which to create the effect
|
||||
// pSrcFile
|
||||
// Name of the file containing the effect description
|
||||
// hSrcModule
|
||||
// Module handle. if NULL, current module will be used.
|
||||
// pSrcResource
|
||||
// Resource name in module
|
||||
// pSrcData
|
||||
// Pointer to effect description
|
||||
// SrcDataSize
|
||||
// Size of the effect description in bytes
|
||||
// pDefines
|
||||
// Optional NULL-terminated array of preprocessor macro definitions.
|
||||
// Flags
|
||||
// See D3DXSHADER_xxx flags.
|
||||
// pSkipConstants
|
||||
// A list of semi-colon delimited variable names. The effect will
|
||||
// not set these variables to the device when they are referenced
|
||||
// by a shader. NOTE: the variables specified here must be
|
||||
// register bound in the file and must not be used in expressions
|
||||
// in passes or samplers or the file will not load.
|
||||
// pInclude
|
||||
// Optional interface pointer to use for handling #include directives.
|
||||
// If this parameter is NULL, #includes will be honored when compiling
|
||||
// from file, and will error when compiling from resource or memory.
|
||||
// pPool
|
||||
// Pointer to ID3DXEffectPool object to use for shared parameters.
|
||||
// If NULL, no parameters will be shared.
|
||||
// ppEffect
|
||||
// Returns a buffer containing created effect.
|
||||
// ppCompilationErrors
|
||||
// Returns a buffer containing any error messages which occurred during
|
||||
// compile. Or NULL if you do not care about the error messages.
|
||||
//
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
HRESULT WINAPI
|
||||
D3DXCreateEffectFromFileA(
|
||||
LPDIRECT3DDEVICE9 pDevice,
|
||||
LPCSTR pSrcFile,
|
||||
CONST D3DXMACRO* pDefines,
|
||||
LPD3DXINCLUDE pInclude,
|
||||
DWORD Flags,
|
||||
LPD3DXEFFECTPOOL pPool,
|
||||
LPD3DXEFFECT* ppEffect,
|
||||
LPD3DXBUFFER* ppCompilationErrors);
|
||||
|
||||
HRESULT WINAPI
|
||||
D3DXCreateEffectFromFileW(
|
||||
LPDIRECT3DDEVICE9 pDevice,
|
||||
LPCWSTR pSrcFile,
|
||||
CONST D3DXMACRO* pDefines,
|
||||
LPD3DXINCLUDE pInclude,
|
||||
DWORD Flags,
|
||||
LPD3DXEFFECTPOOL pPool,
|
||||
LPD3DXEFFECT* ppEffect,
|
||||
LPD3DXBUFFER* ppCompilationErrors);
|
||||
|
||||
#ifdef UNICODE
|
||||
#define D3DXCreateEffectFromFile D3DXCreateEffectFromFileW
|
||||
#else
|
||||
#define D3DXCreateEffectFromFile D3DXCreateEffectFromFileA
|
||||
#endif
|
||||
|
||||
|
||||
HRESULT WINAPI
|
||||
D3DXCreateEffectFromResourceA(
|
||||
LPDIRECT3DDEVICE9 pDevice,
|
||||
HMODULE hSrcModule,
|
||||
LPCSTR pSrcResource,
|
||||
CONST D3DXMACRO* pDefines,
|
||||
LPD3DXINCLUDE pInclude,
|
||||
DWORD Flags,
|
||||
LPD3DXEFFECTPOOL pPool,
|
||||
LPD3DXEFFECT* ppEffect,
|
||||
LPD3DXBUFFER* ppCompilationErrors);
|
||||
|
||||
HRESULT WINAPI
|
||||
D3DXCreateEffectFromResourceW(
|
||||
LPDIRECT3DDEVICE9 pDevice,
|
||||
HMODULE hSrcModule,
|
||||
LPCWSTR pSrcResource,
|
||||
CONST D3DXMACRO* pDefines,
|
||||
LPD3DXINCLUDE pInclude,
|
||||
DWORD Flags,
|
||||
LPD3DXEFFECTPOOL pPool,
|
||||
LPD3DXEFFECT* ppEffect,
|
||||
LPD3DXBUFFER* ppCompilationErrors);
|
||||
|
||||
#ifdef UNICODE
|
||||
#define D3DXCreateEffectFromResource D3DXCreateEffectFromResourceW
|
||||
#else
|
||||
#define D3DXCreateEffectFromResource D3DXCreateEffectFromResourceA
|
||||
#endif
|
||||
|
||||
|
||||
HRESULT WINAPI
|
||||
D3DXCreateEffect(
|
||||
LPDIRECT3DDEVICE9 pDevice,
|
||||
LPCVOID pSrcData,
|
||||
UINT SrcDataLen,
|
||||
CONST D3DXMACRO* pDefines,
|
||||
LPD3DXINCLUDE pInclude,
|
||||
DWORD Flags,
|
||||
LPD3DXEFFECTPOOL pPool,
|
||||
LPD3DXEFFECT* ppEffect,
|
||||
LPD3DXBUFFER* ppCompilationErrors);
|
||||
|
||||
//
|
||||
// Ex functions that accept pSkipConstants in addition to other parameters
|
||||
//
|
||||
|
||||
HRESULT WINAPI
|
||||
D3DXCreateEffectFromFileExA(
|
||||
LPDIRECT3DDEVICE9 pDevice,
|
||||
LPCSTR pSrcFile,
|
||||
CONST D3DXMACRO* pDefines,
|
||||
LPD3DXINCLUDE pInclude,
|
||||
LPCSTR pSkipConstants,
|
||||
DWORD Flags,
|
||||
LPD3DXEFFECTPOOL pPool,
|
||||
LPD3DXEFFECT* ppEffect,
|
||||
LPD3DXBUFFER* ppCompilationErrors);
|
||||
|
||||
HRESULT WINAPI
|
||||
D3DXCreateEffectFromFileExW(
|
||||
LPDIRECT3DDEVICE9 pDevice,
|
||||
LPCWSTR pSrcFile,
|
||||
CONST D3DXMACRO* pDefines,
|
||||
LPD3DXINCLUDE pInclude,
|
||||
LPCSTR pSkipConstants,
|
||||
DWORD Flags,
|
||||
LPD3DXEFFECTPOOL pPool,
|
||||
LPD3DXEFFECT* ppEffect,
|
||||
LPD3DXBUFFER* ppCompilationErrors);
|
||||
|
||||
#ifdef UNICODE
|
||||
#define D3DXCreateEffectFromFileEx D3DXCreateEffectFromFileExW
|
||||
#else
|
||||
#define D3DXCreateEffectFromFileEx D3DXCreateEffectFromFileExA
|
||||
#endif
|
||||
|
||||
|
||||
HRESULT WINAPI
|
||||
D3DXCreateEffectFromResourceExA(
|
||||
LPDIRECT3DDEVICE9 pDevice,
|
||||
HMODULE hSrcModule,
|
||||
LPCSTR pSrcResource,
|
||||
CONST D3DXMACRO* pDefines,
|
||||
LPD3DXINCLUDE pInclude,
|
||||
LPCSTR pSkipConstants,
|
||||
DWORD Flags,
|
||||
LPD3DXEFFECTPOOL pPool,
|
||||
LPD3DXEFFECT* ppEffect,
|
||||
LPD3DXBUFFER* ppCompilationErrors);
|
||||
|
||||
HRESULT WINAPI
|
||||
D3DXCreateEffectFromResourceExW(
|
||||
LPDIRECT3DDEVICE9 pDevice,
|
||||
HMODULE hSrcModule,
|
||||
LPCWSTR pSrcResource,
|
||||
CONST D3DXMACRO* pDefines,
|
||||
LPD3DXINCLUDE pInclude,
|
||||
LPCSTR pSkipConstants,
|
||||
DWORD Flags,
|
||||
LPD3DXEFFECTPOOL pPool,
|
||||
LPD3DXEFFECT* ppEffect,
|
||||
LPD3DXBUFFER* ppCompilationErrors);
|
||||
|
||||
#ifdef UNICODE
|
||||
#define D3DXCreateEffectFromResourceEx D3DXCreateEffectFromResourceExW
|
||||
#else
|
||||
#define D3DXCreateEffectFromResourceEx D3DXCreateEffectFromResourceExA
|
||||
#endif
|
||||
|
||||
|
||||
HRESULT WINAPI
|
||||
D3DXCreateEffectEx(
|
||||
LPDIRECT3DDEVICE9 pDevice,
|
||||
LPCVOID pSrcData,
|
||||
UINT SrcDataLen,
|
||||
CONST D3DXMACRO* pDefines,
|
||||
LPD3DXINCLUDE pInclude,
|
||||
LPCSTR pSkipConstants,
|
||||
DWORD Flags,
|
||||
LPD3DXEFFECTPOOL pPool,
|
||||
LPD3DXEFFECT* ppEffect,
|
||||
LPD3DXBUFFER* ppCompilationErrors);
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// D3DXCreateEffectCompiler:
|
||||
// -------------------------
|
||||
// Creates an effect from an ascii or binary effect description.
|
||||
//
|
||||
// Parameters:
|
||||
// pSrcFile
|
||||
// Name of the file containing the effect description
|
||||
// hSrcModule
|
||||
// Module handle. if NULL, current module will be used.
|
||||
// pSrcResource
|
||||
// Resource name in module
|
||||
// pSrcData
|
||||
// Pointer to effect description
|
||||
// SrcDataSize
|
||||
// Size of the effect description in bytes
|
||||
// pDefines
|
||||
// Optional NULL-terminated array of preprocessor macro definitions.
|
||||
// pInclude
|
||||
// Optional interface pointer to use for handling #include directives.
|
||||
// If this parameter is NULL, #includes will be honored when compiling
|
||||
// from file, and will error when compiling from resource or memory.
|
||||
// pPool
|
||||
// Pointer to ID3DXEffectPool object to use for shared parameters.
|
||||
// If NULL, no parameters will be shared.
|
||||
// ppCompiler
|
||||
// Returns a buffer containing created effect compiler.
|
||||
// ppParseErrors
|
||||
// Returns a buffer containing any error messages which occurred during
|
||||
// parse. Or NULL if you do not care about the error messages.
|
||||
//
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
HRESULT WINAPI
|
||||
D3DXCreateEffectCompilerFromFileA(
|
||||
LPCSTR pSrcFile,
|
||||
CONST D3DXMACRO* pDefines,
|
||||
LPD3DXINCLUDE pInclude,
|
||||
DWORD Flags,
|
||||
LPD3DXEFFECTCOMPILER* ppCompiler,
|
||||
LPD3DXBUFFER* ppParseErrors);
|
||||
|
||||
HRESULT WINAPI
|
||||
D3DXCreateEffectCompilerFromFileW(
|
||||
LPCWSTR pSrcFile,
|
||||
CONST D3DXMACRO* pDefines,
|
||||
LPD3DXINCLUDE pInclude,
|
||||
DWORD Flags,
|
||||
LPD3DXEFFECTCOMPILER* ppCompiler,
|
||||
LPD3DXBUFFER* ppParseErrors);
|
||||
|
||||
#ifdef UNICODE
|
||||
#define D3DXCreateEffectCompilerFromFile D3DXCreateEffectCompilerFromFileW
|
||||
#else
|
||||
#define D3DXCreateEffectCompilerFromFile D3DXCreateEffectCompilerFromFileA
|
||||
#endif
|
||||
|
||||
|
||||
HRESULT WINAPI
|
||||
D3DXCreateEffectCompilerFromResourceA(
|
||||
HMODULE hSrcModule,
|
||||
LPCSTR pSrcResource,
|
||||
CONST D3DXMACRO* pDefines,
|
||||
LPD3DXINCLUDE pInclude,
|
||||
DWORD Flags,
|
||||
LPD3DXEFFECTCOMPILER* ppCompiler,
|
||||
LPD3DXBUFFER* ppParseErrors);
|
||||
|
||||
HRESULT WINAPI
|
||||
D3DXCreateEffectCompilerFromResourceW(
|
||||
HMODULE hSrcModule,
|
||||
LPCWSTR pSrcResource,
|
||||
CONST D3DXMACRO* pDefines,
|
||||
LPD3DXINCLUDE pInclude,
|
||||
DWORD Flags,
|
||||
LPD3DXEFFECTCOMPILER* ppCompiler,
|
||||
LPD3DXBUFFER* ppParseErrors);
|
||||
|
||||
#ifdef UNICODE
|
||||
#define D3DXCreateEffectCompilerFromResource D3DXCreateEffectCompilerFromResourceW
|
||||
#else
|
||||
#define D3DXCreateEffectCompilerFromResource D3DXCreateEffectCompilerFromResourceA
|
||||
#endif
|
||||
|
||||
|
||||
HRESULT WINAPI
|
||||
D3DXCreateEffectCompiler(
|
||||
LPCSTR pSrcData,
|
||||
UINT SrcDataLen,
|
||||
CONST D3DXMACRO* pDefines,
|
||||
LPD3DXINCLUDE pInclude,
|
||||
DWORD Flags,
|
||||
LPD3DXEFFECTCOMPILER* ppCompiler,
|
||||
LPD3DXBUFFER* ppParseErrors);
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// D3DXDisassembleEffect:
|
||||
// -----------------------
|
||||
//
|
||||
// Parameters:
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
HRESULT WINAPI
|
||||
D3DXDisassembleEffect(
|
||||
LPD3DXEFFECT pEffect,
|
||||
BOOL EnableColorCode,
|
||||
LPD3DXBUFFER *ppDisassembly);
|
||||
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif //__cplusplus
|
||||
|
||||
#endif //__D3DX9EFFECT_H__
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,221 @@
|
|||
///////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) Microsoft Corporation. All Rights Reserved.
|
||||
//
|
||||
// File: d3dx9shapes.h
|
||||
// Content: D3DX simple shapes
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "d3dx9.h"
|
||||
|
||||
#ifndef __D3DX9SHAPES_H__
|
||||
#define __D3DX9SHAPES_H__
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// Functions:
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif //__cplusplus
|
||||
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
// D3DXCreatePolygon:
|
||||
// ------------------
|
||||
// Creates a mesh containing an n-sided polygon. The polygon is centered
|
||||
// at the origin.
|
||||
//
|
||||
// Parameters:
|
||||
//
|
||||
// pDevice The D3D device with which the mesh is going to be used.
|
||||
// Length Length of each side.
|
||||
// Sides Number of sides the polygon has. (Must be >= 3)
|
||||
// ppMesh The mesh object which will be created
|
||||
// ppAdjacency Returns a buffer containing adjacency info. Can be NULL.
|
||||
//-------------------------------------------------------------------------
|
||||
HRESULT WINAPI
|
||||
D3DXCreatePolygon(
|
||||
LPDIRECT3DDEVICE9 pDevice,
|
||||
FLOAT Length,
|
||||
UINT Sides,
|
||||
LPD3DXMESH* ppMesh,
|
||||
LPD3DXBUFFER* ppAdjacency);
|
||||
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
// D3DXCreateBox:
|
||||
// --------------
|
||||
// Creates a mesh containing an axis-aligned box. The box is centered at
|
||||
// the origin.
|
||||
//
|
||||
// Parameters:
|
||||
//
|
||||
// pDevice The D3D device with which the mesh is going to be used.
|
||||
// Width Width of box (along X-axis)
|
||||
// Height Height of box (along Y-axis)
|
||||
// Depth Depth of box (along Z-axis)
|
||||
// ppMesh The mesh object which will be created
|
||||
// ppAdjacency Returns a buffer containing adjacency info. Can be NULL.
|
||||
//-------------------------------------------------------------------------
|
||||
HRESULT WINAPI
|
||||
D3DXCreateBox(
|
||||
LPDIRECT3DDEVICE9 pDevice,
|
||||
FLOAT Width,
|
||||
FLOAT Height,
|
||||
FLOAT Depth,
|
||||
LPD3DXMESH* ppMesh,
|
||||
LPD3DXBUFFER* ppAdjacency);
|
||||
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
// D3DXCreateCylinder:
|
||||
// -------------------
|
||||
// Creates a mesh containing a cylinder. The generated cylinder is
|
||||
// centered at the origin, and its axis is aligned with the Z-axis.
|
||||
//
|
||||
// Parameters:
|
||||
//
|
||||
// pDevice The D3D device with which the mesh is going to be used.
|
||||
// Radius1 Radius at -Z end (should be >= 0.0f)
|
||||
// Radius2 Radius at +Z end (should be >= 0.0f)
|
||||
// Length Length of cylinder (along Z-axis)
|
||||
// Slices Number of slices about the main axis
|
||||
// Stacks Number of stacks along the main axis
|
||||
// ppMesh The mesh object which will be created
|
||||
// ppAdjacency Returns a buffer containing adjacency info. Can be NULL.
|
||||
//-------------------------------------------------------------------------
|
||||
HRESULT WINAPI
|
||||
D3DXCreateCylinder(
|
||||
LPDIRECT3DDEVICE9 pDevice,
|
||||
FLOAT Radius1,
|
||||
FLOAT Radius2,
|
||||
FLOAT Length,
|
||||
UINT Slices,
|
||||
UINT Stacks,
|
||||
LPD3DXMESH* ppMesh,
|
||||
LPD3DXBUFFER* ppAdjacency);
|
||||
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
// D3DXCreateSphere:
|
||||
// -----------------
|
||||
// Creates a mesh containing a sphere. The sphere is centered at the
|
||||
// origin.
|
||||
//
|
||||
// Parameters:
|
||||
//
|
||||
// pDevice The D3D device with which the mesh is going to be used.
|
||||
// Radius Radius of the sphere (should be >= 0.0f)
|
||||
// Slices Number of slices about the main axis
|
||||
// Stacks Number of stacks along the main axis
|
||||
// ppMesh The mesh object which will be created
|
||||
// ppAdjacency Returns a buffer containing adjacency info. Can be NULL.
|
||||
//-------------------------------------------------------------------------
|
||||
HRESULT WINAPI
|
||||
D3DXCreateSphere(
|
||||
LPDIRECT3DDEVICE9 pDevice,
|
||||
FLOAT Radius,
|
||||
UINT Slices,
|
||||
UINT Stacks,
|
||||
LPD3DXMESH* ppMesh,
|
||||
LPD3DXBUFFER* ppAdjacency);
|
||||
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
// D3DXCreateTorus:
|
||||
// ----------------
|
||||
// Creates a mesh containing a torus. The generated torus is centered at
|
||||
// the origin, and its axis is aligned with the Z-axis.
|
||||
//
|
||||
// Parameters:
|
||||
//
|
||||
// pDevice The D3D device with which the mesh is going to be used.
|
||||
// InnerRadius Inner radius of the torus (should be >= 0.0f)
|
||||
// OuterRadius Outer radius of the torue (should be >= 0.0f)
|
||||
// Sides Number of sides in a cross-section (must be >= 3)
|
||||
// Rings Number of rings making up the torus (must be >= 3)
|
||||
// ppMesh The mesh object which will be created
|
||||
// ppAdjacency Returns a buffer containing adjacency info. Can be NULL.
|
||||
//-------------------------------------------------------------------------
|
||||
HRESULT WINAPI
|
||||
D3DXCreateTorus(
|
||||
LPDIRECT3DDEVICE9 pDevice,
|
||||
FLOAT InnerRadius,
|
||||
FLOAT OuterRadius,
|
||||
UINT Sides,
|
||||
UINT Rings,
|
||||
LPD3DXMESH* ppMesh,
|
||||
LPD3DXBUFFER* ppAdjacency);
|
||||
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
// D3DXCreateTeapot:
|
||||
// -----------------
|
||||
// Creates a mesh containing a teapot.
|
||||
//
|
||||
// Parameters:
|
||||
//
|
||||
// pDevice The D3D device with which the mesh is going to be used.
|
||||
// ppMesh The mesh object which will be created
|
||||
// ppAdjacency Returns a buffer containing adjacency info. Can be NULL.
|
||||
//-------------------------------------------------------------------------
|
||||
HRESULT WINAPI
|
||||
D3DXCreateTeapot(
|
||||
LPDIRECT3DDEVICE9 pDevice,
|
||||
LPD3DXMESH* ppMesh,
|
||||
LPD3DXBUFFER* ppAdjacency);
|
||||
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
// D3DXCreateText:
|
||||
// ---------------
|
||||
// Creates a mesh containing the specified text using the font associated
|
||||
// with the device context.
|
||||
//
|
||||
// Parameters:
|
||||
//
|
||||
// pDevice The D3D device with which the mesh is going to be used.
|
||||
// hDC Device context, with desired font selected
|
||||
// pText Text to generate
|
||||
// Deviation Maximum chordal deviation from true font outlines
|
||||
// Extrusion Amount to extrude text in -Z direction
|
||||
// ppMesh The mesh object which will be created
|
||||
// pGlyphMetrics Address of buffer to receive glyph metric data (or NULL)
|
||||
//-------------------------------------------------------------------------
|
||||
HRESULT WINAPI
|
||||
D3DXCreateTextA(
|
||||
LPDIRECT3DDEVICE9 pDevice,
|
||||
HDC hDC,
|
||||
LPCSTR pText,
|
||||
FLOAT Deviation,
|
||||
FLOAT Extrusion,
|
||||
LPD3DXMESH* ppMesh,
|
||||
LPD3DXBUFFER* ppAdjacency,
|
||||
LPGLYPHMETRICSFLOAT pGlyphMetrics);
|
||||
|
||||
HRESULT WINAPI
|
||||
D3DXCreateTextW(
|
||||
LPDIRECT3DDEVICE9 pDevice,
|
||||
HDC hDC,
|
||||
LPCWSTR pText,
|
||||
FLOAT Deviation,
|
||||
FLOAT Extrusion,
|
||||
LPD3DXMESH* ppMesh,
|
||||
LPD3DXBUFFER* ppAdjacency,
|
||||
LPGLYPHMETRICSFLOAT pGlyphMetrics);
|
||||
|
||||
#ifdef UNICODE
|
||||
#define D3DXCreateText D3DXCreateTextW
|
||||
#else
|
||||
#define D3DXCreateText D3DXCreateTextA
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif //__cplusplus
|
||||
|
||||
#endif //__D3DX9SHAPES_H__
|
||||
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,299 @@
|
|||
///////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) Microsoft Corporation. All Rights Reserved.
|
||||
//
|
||||
// File: d3dx9xof.h
|
||||
// Content: D3DX .X File types and functions
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "d3dx9.h"
|
||||
|
||||
#if !defined( __D3DX9XOF_H__ )
|
||||
#define __D3DX9XOF_H__
|
||||
|
||||
#if defined( __cplusplus )
|
||||
extern "C" {
|
||||
#endif // defined( __cplusplus )
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// D3DXF_FILEFORMAT
|
||||
// This flag is used to specify what file type to use when saving to disk.
|
||||
// _BINARY, and _TEXT are mutually exclusive, while
|
||||
// _COMPRESSED is an optional setting that works with all file types.
|
||||
//----------------------------------------------------------------------------
|
||||
typedef DWORD D3DXF_FILEFORMAT;
|
||||
|
||||
#define D3DXF_FILEFORMAT_BINARY 0
|
||||
#define D3DXF_FILEFORMAT_TEXT 1
|
||||
#define D3DXF_FILEFORMAT_COMPRESSED 2
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// D3DXF_FILESAVEOPTIONS
|
||||
// This flag is used to specify where to save the file to. Each flag is
|
||||
// mutually exclusive, indicates the data location of the file, and also
|
||||
// chooses which additional data will specify the location.
|
||||
// _TOFILE is paired with a filename (LPCSTR)
|
||||
// _TOWFILE is paired with a filename (LPWSTR)
|
||||
//----------------------------------------------------------------------------
|
||||
typedef DWORD D3DXF_FILESAVEOPTIONS;
|
||||
|
||||
#define D3DXF_FILESAVE_TOFILE 0x00L
|
||||
#define D3DXF_FILESAVE_TOWFILE 0x01L
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// D3DXF_FILELOADOPTIONS
|
||||
// This flag is used to specify where to load the file from. Each flag is
|
||||
// mutually exclusive, indicates the data location of the file, and also
|
||||
// chooses which additional data will specify the location.
|
||||
// _FROMFILE is paired with a filename (LPCSTR)
|
||||
// _FROMWFILE is paired with a filename (LPWSTR)
|
||||
// _FROMRESOURCE is paired with a (D3DXF_FILELOADRESOUCE*) description.
|
||||
// _FROMMEMORY is paired with a (D3DXF_FILELOADMEMORY*) description.
|
||||
//----------------------------------------------------------------------------
|
||||
typedef DWORD D3DXF_FILELOADOPTIONS;
|
||||
|
||||
#define D3DXF_FILELOAD_FROMFILE 0x00L
|
||||
#define D3DXF_FILELOAD_FROMWFILE 0x01L
|
||||
#define D3DXF_FILELOAD_FROMRESOURCE 0x02L
|
||||
#define D3DXF_FILELOAD_FROMMEMORY 0x03L
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// D3DXF_FILELOADRESOURCE:
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
typedef struct _D3DXF_FILELOADRESOURCE
|
||||
{
|
||||
HMODULE hModule; // Desc
|
||||
LPCSTR lpName; // Desc
|
||||
LPCSTR lpType; // Desc
|
||||
} D3DXF_FILELOADRESOURCE;
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// D3DXF_FILELOADMEMORY:
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
typedef struct _D3DXF_FILELOADMEMORY
|
||||
{
|
||||
LPCVOID lpMemory; // Desc
|
||||
SIZE_T dSize; // Desc
|
||||
} D3DXF_FILELOADMEMORY;
|
||||
|
||||
#if defined( _WIN32 ) && !defined( _NO_COM )
|
||||
|
||||
// {cef08cf9-7b4f-4429-9624-2a690a933201}
|
||||
DEFINE_GUID( IID_ID3DXFile,
|
||||
0xcef08cf9, 0x7b4f, 0x4429, 0x96, 0x24, 0x2a, 0x69, 0x0a, 0x93, 0x32, 0x01 );
|
||||
|
||||
// {cef08cfa-7b4f-4429-9624-2a690a933201}
|
||||
DEFINE_GUID( IID_ID3DXFileSaveObject,
|
||||
0xcef08cfa, 0x7b4f, 0x4429, 0x96, 0x24, 0x2a, 0x69, 0x0a, 0x93, 0x32, 0x01 );
|
||||
|
||||
// {cef08cfb-7b4f-4429-9624-2a690a933201}
|
||||
DEFINE_GUID( IID_ID3DXFileSaveData,
|
||||
0xcef08cfb, 0x7b4f, 0x4429, 0x96, 0x24, 0x2a, 0x69, 0x0a, 0x93, 0x32, 0x01 );
|
||||
|
||||
// {cef08cfc-7b4f-4429-9624-2a690a933201}
|
||||
DEFINE_GUID( IID_ID3DXFileEnumObject,
|
||||
0xcef08cfc, 0x7b4f, 0x4429, 0x96, 0x24, 0x2a, 0x69, 0x0a, 0x93, 0x32, 0x01 );
|
||||
|
||||
// {cef08cfd-7b4f-4429-9624-2a690a933201}
|
||||
DEFINE_GUID( IID_ID3DXFileData,
|
||||
0xcef08cfd, 0x7b4f, 0x4429, 0x96, 0x24, 0x2a, 0x69, 0x0a, 0x93, 0x32, 0x01 );
|
||||
|
||||
#endif // defined( _WIN32 ) && !defined( _NO_COM )
|
||||
|
||||
#if defined( __cplusplus )
|
||||
#if !defined( DECLSPEC_UUID )
|
||||
#if _MSC_VER >= 1100
|
||||
#define DECLSPEC_UUID( x ) __declspec( uuid( x ) )
|
||||
#else // !( _MSC_VER >= 1100 )
|
||||
#define DECLSPEC_UUID( x )
|
||||
#endif // !( _MSC_VER >= 1100 )
|
||||
#endif // !defined( DECLSPEC_UUID )
|
||||
|
||||
interface DECLSPEC_UUID( "cef08cf9-7b4f-4429-9624-2a690a933201" )
|
||||
ID3DXFile;
|
||||
interface DECLSPEC_UUID( "cef08cfa-7b4f-4429-9624-2a690a933201" )
|
||||
ID3DXFileSaveObject;
|
||||
interface DECLSPEC_UUID( "cef08cfb-7b4f-4429-9624-2a690a933201" )
|
||||
ID3DXFileSaveData;
|
||||
interface DECLSPEC_UUID( "cef08cfc-7b4f-4429-9624-2a690a933201" )
|
||||
ID3DXFileEnumObject;
|
||||
interface DECLSPEC_UUID( "cef08cfd-7b4f-4429-9624-2a690a933201" )
|
||||
ID3DXFileData;
|
||||
|
||||
#if defined( _COM_SMARTPTR_TYPEDEF )
|
||||
_COM_SMARTPTR_TYPEDEF( ID3DXFile,
|
||||
__uuidof( ID3DXFile ) );
|
||||
_COM_SMARTPTR_TYPEDEF( ID3DXFileSaveObject,
|
||||
__uuidof( ID3DXFileSaveObject ) );
|
||||
_COM_SMARTPTR_TYPEDEF( ID3DXFileSaveData,
|
||||
__uuidof( ID3DXFileSaveData ) );
|
||||
_COM_SMARTPTR_TYPEDEF( ID3DXFileEnumObject,
|
||||
__uuidof( ID3DXFileEnumObject ) );
|
||||
_COM_SMARTPTR_TYPEDEF( ID3DXFileData,
|
||||
__uuidof( ID3DXFileData ) );
|
||||
#endif // defined( _COM_SMARTPTR_TYPEDEF )
|
||||
#endif // defined( __cplusplus )
|
||||
|
||||
typedef interface ID3DXFile ID3DXFile;
|
||||
typedef interface ID3DXFileSaveObject ID3DXFileSaveObject;
|
||||
typedef interface ID3DXFileSaveData ID3DXFileSaveData;
|
||||
typedef interface ID3DXFileEnumObject ID3DXFileEnumObject;
|
||||
typedef interface ID3DXFileData ID3DXFileData;
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
// ID3DXFile /////////////////////////////////////////////////////////////////
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#undef INTERFACE
|
||||
#define INTERFACE ID3DXFile
|
||||
|
||||
DECLARE_INTERFACE_( ID3DXFile, IUnknown )
|
||||
{
|
||||
STDMETHOD( QueryInterface )( THIS_ REFIID, LPVOID* ) PURE;
|
||||
STDMETHOD_( ULONG, AddRef )( THIS ) PURE;
|
||||
STDMETHOD_( ULONG, Release )( THIS ) PURE;
|
||||
|
||||
STDMETHOD( CreateEnumObject )( THIS_ LPCVOID, D3DXF_FILELOADOPTIONS,
|
||||
ID3DXFileEnumObject** ) PURE;
|
||||
STDMETHOD( CreateSaveObject )( THIS_ LPCVOID, D3DXF_FILESAVEOPTIONS,
|
||||
D3DXF_FILEFORMAT, ID3DXFileSaveObject** ) PURE;
|
||||
STDMETHOD( RegisterTemplates )( THIS_ LPCVOID, SIZE_T ) PURE;
|
||||
STDMETHOD( RegisterEnumTemplates )( THIS_ ID3DXFileEnumObject* ) PURE;
|
||||
};
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
// ID3DXFileSaveObject ///////////////////////////////////////////////////////
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#undef INTERFACE
|
||||
#define INTERFACE ID3DXFileSaveObject
|
||||
|
||||
DECLARE_INTERFACE_( ID3DXFileSaveObject, IUnknown )
|
||||
{
|
||||
STDMETHOD( QueryInterface )( THIS_ REFIID, LPVOID* ) PURE;
|
||||
STDMETHOD_( ULONG, AddRef )( THIS ) PURE;
|
||||
STDMETHOD_( ULONG, Release )( THIS ) PURE;
|
||||
|
||||
STDMETHOD( GetFile )( THIS_ ID3DXFile** ) PURE;
|
||||
STDMETHOD( AddDataObject )( THIS_ REFGUID, LPCSTR, CONST GUID*,
|
||||
SIZE_T, LPCVOID, ID3DXFileSaveData** ) PURE;
|
||||
STDMETHOD( Save )( THIS ) PURE;
|
||||
};
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
// ID3DXFileSaveData /////////////////////////////////////////////////////////
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#undef INTERFACE
|
||||
#define INTERFACE ID3DXFileSaveData
|
||||
|
||||
DECLARE_INTERFACE_( ID3DXFileSaveData, IUnknown )
|
||||
{
|
||||
STDMETHOD( QueryInterface )( THIS_ REFIID, LPVOID* ) PURE;
|
||||
STDMETHOD_( ULONG, AddRef )( THIS ) PURE;
|
||||
STDMETHOD_( ULONG, Release )( THIS ) PURE;
|
||||
|
||||
STDMETHOD( GetSave )( THIS_ ID3DXFileSaveObject** ) PURE;
|
||||
STDMETHOD( GetName )( THIS_ LPSTR, SIZE_T* ) PURE;
|
||||
STDMETHOD( GetId )( THIS_ LPGUID ) PURE;
|
||||
STDMETHOD( GetType )( THIS_ GUID* ) PURE;
|
||||
STDMETHOD( AddDataObject )( THIS_ REFGUID, LPCSTR, CONST GUID*,
|
||||
SIZE_T, LPCVOID, ID3DXFileSaveData** ) PURE;
|
||||
STDMETHOD( AddDataReference )( THIS_ LPCSTR, CONST GUID* ) PURE;
|
||||
};
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
// ID3DXFileEnumObject ///////////////////////////////////////////////////////
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#undef INTERFACE
|
||||
#define INTERFACE ID3DXFileEnumObject
|
||||
|
||||
DECLARE_INTERFACE_( ID3DXFileEnumObject, IUnknown )
|
||||
{
|
||||
STDMETHOD( QueryInterface )( THIS_ REFIID, LPVOID* ) PURE;
|
||||
STDMETHOD_( ULONG, AddRef )( THIS ) PURE;
|
||||
STDMETHOD_( ULONG, Release )( THIS ) PURE;
|
||||
|
||||
STDMETHOD( GetFile )( THIS_ ID3DXFile** ) PURE;
|
||||
STDMETHOD( GetChildren )( THIS_ SIZE_T* ) PURE;
|
||||
STDMETHOD( GetChild )( THIS_ SIZE_T, ID3DXFileData** ) PURE;
|
||||
STDMETHOD( GetDataObjectById )( THIS_ REFGUID, ID3DXFileData** ) PURE;
|
||||
STDMETHOD( GetDataObjectByName )( THIS_ LPCSTR, ID3DXFileData** ) PURE;
|
||||
};
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
// ID3DXFileData /////////////////////////////////////////////////////////////
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#undef INTERFACE
|
||||
#define INTERFACE ID3DXFileData
|
||||
|
||||
DECLARE_INTERFACE_( ID3DXFileData, IUnknown )
|
||||
{
|
||||
STDMETHOD( QueryInterface )( THIS_ REFIID, LPVOID* ) PURE;
|
||||
STDMETHOD_( ULONG, AddRef )( THIS ) PURE;
|
||||
STDMETHOD_( ULONG, Release )( THIS ) PURE;
|
||||
|
||||
STDMETHOD( GetEnum )( THIS_ ID3DXFileEnumObject** ) PURE;
|
||||
STDMETHOD( GetName )( THIS_ LPSTR, SIZE_T* ) PURE;
|
||||
STDMETHOD( GetId )( THIS_ LPGUID ) PURE;
|
||||
STDMETHOD( Lock )( THIS_ SIZE_T*, LPCVOID* ) PURE;
|
||||
STDMETHOD( Unlock )( THIS ) PURE;
|
||||
STDMETHOD( GetType )( THIS_ GUID* ) PURE;
|
||||
STDMETHOD_( BOOL, IsReference )( THIS ) PURE;
|
||||
STDMETHOD( GetChildren )( THIS_ SIZE_T* ) PURE;
|
||||
STDMETHOD( GetChild )( THIS_ SIZE_T, ID3DXFileData** ) PURE;
|
||||
};
|
||||
|
||||
STDAPI D3DXFileCreate( ID3DXFile** lplpDirectXFile );
|
||||
|
||||
/*
|
||||
* DirectX File errors.
|
||||
*/
|
||||
|
||||
#define _FACD3DXF 0x876
|
||||
|
||||
#define D3DXFERR_BADOBJECT MAKE_HRESULT( 1, _FACD3DXF, 900 )
|
||||
#define D3DXFERR_BADVALUE MAKE_HRESULT( 1, _FACD3DXF, 901 )
|
||||
#define D3DXFERR_BADTYPE MAKE_HRESULT( 1, _FACD3DXF, 902 )
|
||||
#define D3DXFERR_NOTFOUND MAKE_HRESULT( 1, _FACD3DXF, 903 )
|
||||
#define D3DXFERR_NOTDONEYET MAKE_HRESULT( 1, _FACD3DXF, 904 )
|
||||
#define D3DXFERR_FILENOTFOUND MAKE_HRESULT( 1, _FACD3DXF, 905 )
|
||||
#define D3DXFERR_RESOURCENOTFOUND MAKE_HRESULT( 1, _FACD3DXF, 906 )
|
||||
#define D3DXFERR_BADRESOURCE MAKE_HRESULT( 1, _FACD3DXF, 907 )
|
||||
#define D3DXFERR_BADFILETYPE MAKE_HRESULT( 1, _FACD3DXF, 908 )
|
||||
#define D3DXFERR_BADFILEVERSION MAKE_HRESULT( 1, _FACD3DXF, 909 )
|
||||
#define D3DXFERR_BADFILEFLOATSIZE MAKE_HRESULT( 1, _FACD3DXF, 910 )
|
||||
#define D3DXFERR_BADFILE MAKE_HRESULT( 1, _FACD3DXF, 911 )
|
||||
#define D3DXFERR_PARSEERROR MAKE_HRESULT( 1, _FACD3DXF, 912 )
|
||||
#define D3DXFERR_BADARRAYSIZE MAKE_HRESULT( 1, _FACD3DXF, 913 )
|
||||
#define D3DXFERR_BADDATAREFERENCE MAKE_HRESULT( 1, _FACD3DXF, 914 )
|
||||
#define D3DXFERR_NOMOREOBJECTS MAKE_HRESULT( 1, _FACD3DXF, 915 )
|
||||
#define D3DXFERR_NOMOREDATA MAKE_HRESULT( 1, _FACD3DXF, 916 )
|
||||
#define D3DXFERR_BADCACHEFILE MAKE_HRESULT( 1, _FACD3DXF, 917 )
|
||||
|
||||
/*
|
||||
* DirectX File object types.
|
||||
*/
|
||||
|
||||
#ifndef WIN_TYPES
|
||||
#define WIN_TYPES(itype, ptype) typedef interface itype *LP##ptype, **LPLP##ptype
|
||||
#endif
|
||||
|
||||
WIN_TYPES(ID3DXFile, D3DXFILE);
|
||||
WIN_TYPES(ID3DXFileEnumObject, D3DXFILEENUMOBJECT);
|
||||
WIN_TYPES(ID3DXFileSaveObject, D3DXFILESAVEOBJECT);
|
||||
WIN_TYPES(ID3DXFileData, D3DXFILEDATA);
|
||||
WIN_TYPES(ID3DXFileSaveData, D3DXFILESAVEDATA);
|
||||
|
||||
#if defined( __cplusplus )
|
||||
} // extern "C"
|
||||
#endif // defined( __cplusplus )
|
||||
|
||||
#endif // !defined( __D3DX9XOF_H__ )
|
||||
|
||||
|
|
@ -39,7 +39,7 @@
|
|||
#include "DlgVideoConfig.h"
|
||||
#include "ResCxbx.h"
|
||||
|
||||
#include <d3d8.h>
|
||||
#include "CxbxKrnl/EmuD3D8Types.h"
|
||||
|
||||
/*! windows dialog procedure */
|
||||
static INT_PTR CALLBACK DlgVideoConfigProc(HWND hWndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
||||
|
@ -49,7 +49,7 @@ static VOID RefreshDisplayAdapter();
|
|||
static VOID RefreshDirect3DDevice();
|
||||
|
||||
/*! direct3d instance */
|
||||
static XTL::LPDIRECT3D8 g_pD3D8 = 0;
|
||||
static XTL::IDirect3D *g_pDirect3D = 0;
|
||||
/*! video configuration */
|
||||
static XBVideo g_XBVideo;
|
||||
/*! changes flag */
|
||||
|
@ -73,11 +73,11 @@ VOID ShowVideoConfig(HWND hwnd)
|
|||
|
||||
/*! initialize direct3d */
|
||||
{
|
||||
g_pD3D8 = XTL::Direct3DCreate8(D3D_SDK_VERSION);
|
||||
g_pDirect3D = XTL::Direct3DCreate(D3D_SDK_VERSION);
|
||||
|
||||
if(g_pD3D8 == 0) { goto cleanup; }
|
||||
if(g_pDirect3D == 0) { goto cleanup; }
|
||||
|
||||
g_dwAdapterCount = g_pD3D8->GetAdapterCount();
|
||||
g_dwAdapterCount = g_pDirect3D->GetAdapterCount();
|
||||
}
|
||||
|
||||
/*! show dialog box */
|
||||
|
@ -87,10 +87,10 @@ cleanup:
|
|||
|
||||
/*! cleanup direct3d */
|
||||
{
|
||||
if(g_pD3D8 != 0)
|
||||
if(g_pDirect3D != 0)
|
||||
{
|
||||
g_pD3D8->Release();
|
||||
g_pD3D8 = 0;
|
||||
g_pDirect3D->Release();
|
||||
g_pDirect3D = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -114,9 +114,9 @@ INT_PTR CALLBACK DlgVideoConfigProc(HWND hWndDlg, UINT uMsg, WPARAM wParam, LPAR
|
|||
|
||||
for(uint32 v=0;v<g_dwAdapterCount;v++)
|
||||
{
|
||||
XTL::D3DADAPTER_IDENTIFIER8 adapterIdentifier;
|
||||
XTL::D3DADAPTER_IDENTIFIER adapterIdentifier;
|
||||
|
||||
g_pD3D8->GetAdapterIdentifier(v, D3DENUM_NO_WHQL_LEVEL, &adapterIdentifier);
|
||||
g_pDirect3D->GetAdapterIdentifier(v, D3DENUM_NO_WHQL_LEVEL, &adapterIdentifier);
|
||||
SendMessage(g_hDisplayAdapter, CB_ADDSTRING, 0, (LPARAM)adapterIdentifier.Description);
|
||||
}
|
||||
}
|
||||
|
@ -264,10 +264,10 @@ VOID RefreshDisplayAdapter()
|
|||
/*! step through devices types */
|
||||
for(uint32 d=0;d<2;d++)
|
||||
{
|
||||
XTL::D3DCAPS8 Caps;
|
||||
XTL::D3DCAPS Caps;
|
||||
|
||||
/*! verify device is available */
|
||||
if(g_pD3D8->GetDeviceCaps(g_XBVideo.GetDisplayAdapter(), devType[d], &Caps) == D3D_OK)
|
||||
if(g_pDirect3D->GetDeviceCaps(g_XBVideo.GetDisplayAdapter(), devType[d], &Caps) == D3D_OK)
|
||||
{
|
||||
/*! add device to list */
|
||||
SendMessage(g_hDirect3DDevice, CB_ADDSTRING, 0, (LPARAM)szDevType[d]);
|
||||
|
@ -309,7 +309,12 @@ VOID RefreshDirect3DDevice()
|
|||
|
||||
/*! enumerate display modes */
|
||||
{
|
||||
uint32 dwAdapterModeCount = g_pD3D8->GetAdapterModeCount(g_XBVideo.GetDisplayAdapter());
|
||||
uint32 dwAdapterModeCount = g_pDirect3D->GetAdapterModeCount(
|
||||
g_XBVideo.GetDisplayAdapter()
|
||||
#ifdef CXBX_USE_D3D9
|
||||
, XTL::D3DFMT_X8R8G8B8
|
||||
#endif
|
||||
);
|
||||
|
||||
SendMessage(g_hVideoResolution, CB_ADDSTRING, 0, (LPARAM)"Automatic (Default)");
|
||||
|
||||
|
@ -320,7 +325,14 @@ VOID RefreshDirect3DDevice()
|
|||
|
||||
XTL::D3DDISPLAYMODE displayMode;
|
||||
|
||||
g_pD3D8->EnumAdapterModes(g_XBVideo.GetDisplayAdapter(), v, &displayMode);
|
||||
g_pDirect3D->EnumAdapterModes(
|
||||
g_XBVideo.GetDisplayAdapter(),
|
||||
#ifdef CXBX_USE_D3D9
|
||||
XTL::D3DFMT_X8R8G8B8,
|
||||
#endif
|
||||
v,
|
||||
&displayMode
|
||||
);
|
||||
|
||||
switch(displayMode.Format)
|
||||
{
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -86,7 +86,7 @@ HRESULT WINAPI EMUPATCH(Direct3D_CreateDevice)
|
|||
HWND hFocusWindow,
|
||||
DWORD BehaviorFlags,
|
||||
X_D3DPRESENT_PARAMETERS *pPresentationParameters,
|
||||
IDirect3DDevice8 **ppReturnedDeviceInterface
|
||||
IDirect3DDevice **ppReturnedDeviceInterface
|
||||
);
|
||||
|
||||
// ******************************************************************
|
||||
|
@ -123,7 +123,7 @@ HRESULT WINAPI EMUPATCH(D3D_CheckDeviceFormat)
|
|||
// ******************************************************************
|
||||
VOID WINAPI EMUPATCH(D3DDevice_GetDeviceCaps)
|
||||
(
|
||||
D3DCAPS8 *pCaps
|
||||
X_D3DCAPS *pCaps
|
||||
);
|
||||
#endif
|
||||
|
||||
|
@ -289,7 +289,7 @@ VOID WINAPI EMUPATCH(D3DDevice_GetBackBuffer)
|
|||
// ******************************************************************
|
||||
VOID WINAPI EMUPATCH(D3DDevice_SetViewport)
|
||||
(
|
||||
CONST D3DVIEWPORT8 *pViewport
|
||||
CONST X_D3DVIEWPORT8 *pViewport
|
||||
);
|
||||
|
||||
// ******************************************************************
|
||||
|
@ -297,7 +297,7 @@ VOID WINAPI EMUPATCH(D3DDevice_SetViewport)
|
|||
// ******************************************************************
|
||||
VOID WINAPI EMUPATCH(D3DDevice_GetViewport)
|
||||
(
|
||||
D3DVIEWPORT8 *pViewport
|
||||
X_D3DVIEWPORT8 *pViewport
|
||||
);
|
||||
|
||||
// ******************************************************************
|
||||
|
@ -305,8 +305,8 @@ VOID WINAPI EMUPATCH(D3DDevice_GetViewport)
|
|||
// ******************************************************************
|
||||
VOID WINAPI EMUPATCH(D3DDevice_GetViewportOffsetAndScale)
|
||||
(
|
||||
D3DXVECTOR4 *pOffset,
|
||||
D3DXVECTOR4 *pScale
|
||||
X_D3DXVECTOR4 *pOffset,
|
||||
X_D3DXVECTOR4 *pScale
|
||||
);
|
||||
|
||||
// ******************************************************************
|
||||
|
@ -1328,7 +1328,7 @@ VOID WINAPI EMUPATCH(D3DDevice_DrawIndexedVerticesUP)
|
|||
VOID WINAPI EMUPATCH(D3DDevice_GetLight)
|
||||
(
|
||||
DWORD Index,
|
||||
D3DLIGHT8 *pLight
|
||||
X_D3DLIGHT8 *pLight
|
||||
);
|
||||
|
||||
// ******************************************************************
|
||||
|
@ -1337,7 +1337,7 @@ VOID WINAPI EMUPATCH(D3DDevice_GetLight)
|
|||
HRESULT WINAPI EMUPATCH(D3DDevice_SetLight)
|
||||
(
|
||||
DWORD Index,
|
||||
CONST D3DLIGHT8 *pLight
|
||||
CONST X_D3DLIGHT8 *pLight
|
||||
);
|
||||
|
||||
// ******************************************************************
|
||||
|
@ -1345,7 +1345,7 @@ HRESULT WINAPI EMUPATCH(D3DDevice_SetLight)
|
|||
// ******************************************************************
|
||||
VOID WINAPI EMUPATCH(D3DDevice_SetMaterial)
|
||||
(
|
||||
CONST D3DMATERIAL8 *pMaterial
|
||||
CONST X_D3DMATERIAL8 *pMaterial
|
||||
);
|
||||
|
||||
// ******************************************************************
|
||||
|
@ -1615,7 +1615,7 @@ HRESULT WINAPI EMUPATCH(D3D_GetDeviceCaps)
|
|||
(
|
||||
UINT Adapter,
|
||||
D3DDEVTYPE DeviceType,
|
||||
D3DCAPS8 *pCaps
|
||||
X_D3DCAPS *pCaps
|
||||
);
|
||||
#endif
|
||||
|
||||
|
@ -1882,7 +1882,10 @@ HRESULT WINAPI EMUPATCH(D3DDevice_GetModelView)(D3DXMATRIX* pModelView);
|
|||
// ******************************************************************
|
||||
// * patch: D3DDevice_SetBackMaterial
|
||||
// ******************************************************************
|
||||
VOID WINAPI EMUPATCH(D3DDevice_SetBackMaterial)(D3DMATERIAL8* pMaterial);
|
||||
VOID WINAPI EMUPATCH(D3DDevice_SetBackMaterial)
|
||||
(
|
||||
X_D3DMATERIAL8* pMaterial
|
||||
);
|
||||
|
||||
#if 0 // patch disabled
|
||||
// ******************************************************************
|
||||
|
@ -1892,7 +1895,7 @@ HRESULT WINAPI EMUPATCH(D3D_GetAdapterIdentifier)
|
|||
(
|
||||
UINT Adapter,
|
||||
DWORD Flags,
|
||||
D3DADAPTER_IDENTIFIER8* pIdentifier
|
||||
X_D3DADAPTER_IDENTIFIER *pIdentifier
|
||||
);
|
||||
#endif
|
||||
|
||||
|
@ -1985,7 +1988,10 @@ VOID WINAPI EMUPATCH(D3DDevice_GetScissors)
|
|||
// ******************************************************************
|
||||
// * patch: D3DDevice_GetBackMaterial
|
||||
// ******************************************************************
|
||||
VOID WINAPI EMUPATCH(D3DDevice_GetBackMaterial)(D3DMATERIAL8* pMaterial);
|
||||
VOID WINAPI EMUPATCH(D3DDevice_GetBackMaterial)
|
||||
(
|
||||
X_D3DMATERIAL8* pMaterial
|
||||
);
|
||||
|
||||
// ******************************************************************
|
||||
// * patch: D3D::LazySetPointParams
|
||||
|
@ -1995,6 +2001,9 @@ void WINAPI EMUPATCH(D3D_LazySetPointParams)( void* Device );
|
|||
// ******************************************************************
|
||||
// * patch: D3DDevice_GetMaterial
|
||||
// ******************************************************************
|
||||
VOID WINAPI EMUPATCH(D3DDevice_GetMaterial)(D3DMATERIAL8* pMaterial);
|
||||
VOID WINAPI EMUPATCH(D3DDevice_GetMaterial)
|
||||
(
|
||||
X_D3DMATERIAL8* pMaterial
|
||||
);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -930,7 +930,11 @@ static const FormatInfo FormatInfos[] = {
|
|||
/* 0x32 X_D3DFMT_L16 */ { 16, Swzzld, _____L16, XTL::D3DFMT_A8L8 , Texture, "X_D3DFMT_L16 -> D3DFMT_A8L8" },
|
||||
/* 0x33 X_D3DFMT_V16U16 */ { 32, Swzzld, NoCmpnts, XTL::D3DFMT_V16U16 },
|
||||
/* 0x34 undefined */ {},
|
||||
#ifdef CXBX_USE_D3D9
|
||||
/* 0x35 X_D3DFMT_LIN_L16 */ { 16, Linear, _____L16, XTL::D3DFMT_L16 },
|
||||
#else
|
||||
/* 0x35 X_D3DFMT_LIN_L16 */ { 16, Linear, _____L16, XTL::D3DFMT_A8L8 , Texture, "X_D3DFMT_LIN_L16 -> D3DFMT_A8L8" },
|
||||
#endif
|
||||
/* 0x36 X_D3DFMT_LIN_V16U16 */ { 32, Linear, NoCmpnts, XTL::D3DFMT_V16U16 }, // Note : Seems ununsed on Xbox
|
||||
/* 0x37 X_D3DFMT_LIN_L6V5U5 */ { 16, Linear, __R6G5B5, XTL::D3DFMT_L6V5U5 }, // Alias : X_D3DFMT_LIN_R6G5B5
|
||||
/* 0x38 X_D3DFMT_R5G5B5A1 */ { 16, Swzzld, R5G5B5A1, XTL::D3DFMT_A1R5G5B5 , Texture, "X_D3DFMT_R5G5B5A1 -> D3DFMT_A1R5G5B5" },
|
||||
|
@ -1532,7 +1536,7 @@ const RenderStateInfo DxbxRenderStateInfo[] = {
|
|||
{ "D3DRS_STENCILMASK" /*= 72*/, 3424, xtBYTE, NV2A_STENCIL_FUNC_MASK, D3DRS_STENCILMASK, "BYTE mask value used in stencil test" },
|
||||
{ "D3DRS_STENCILWRITEMASK" /*= 73*/, 3424, xtBYTE, NV2A_STENCIL_MASK, D3DRS_STENCILWRITEMASK, "BYTE write mask applied to values written to stencil buffer" },
|
||||
{ "D3DRS_BLENDOP" /*= 74*/, 3424, xtD3DBLENDOP, NV2A_BLEND_EQUATION, D3DRS_BLENDOP },
|
||||
#ifdef DXBX_USE_D3D9
|
||||
#ifdef CXBX_USE_D3D9
|
||||
{ "D3DRS_BLENDCOLOR" /*= 75*/, 3424, xtD3DCOLOR, NV2A_BLEND_COLOR, D3DRS_BLENDFACTOR, "D3DCOLOR for D3DBLEND_CONSTANTCOLOR" },
|
||||
// D3D9 D3DRS_BLENDFACTOR : D3DCOLOR used for a constant blend factor during alpha blending for devices that support D3DPBLENDCAPS_BLENDFACTOR
|
||||
#else
|
||||
|
@ -1588,7 +1592,11 @@ const RenderStateInfo DxbxRenderStateInfo[] = {
|
|||
{ "D3DRS_POINTSCALE_C" /*= 122*/, 3424, xtFloat, 0, D3DRS_POINTSCALE_C },
|
||||
{ "D3DRS_POINTSIZE_MAX" /*= 123*/, 3424, xtFloat, 0, D3DRS_POINTSIZE_MAX },
|
||||
{ "D3DRS_PATCHEDGESTYLE" /*= 124*/, 3424, xtDWORD, 0, D3DRS_PATCHEDGESTYLE }, // D3DPATCHEDGESTYLE?
|
||||
#ifdef CXBX_USE_D3D9 // D3DRS_PATCHSEGMENTS exists in Direct3D 8, but not in 9 !?
|
||||
{ "D3DRS_PATCHSEGMENTS" /*= 125*/, 3424, xtDWORD, 0 }, // nsp.
|
||||
#else
|
||||
{ "D3DRS_PATCHSEGMENTS" /*= 125*/, 3424, xtDWORD, 0, D3DRS_PATCHSEGMENTS },
|
||||
#endif
|
||||
// TODO -oDxbx : Is X_D3DRS_SWAPFILTER really a xtD3DMULTISAMPLE_TYPE?
|
||||
{ "D3DRS_SWAPFILTER" /*= 126*/, 4361, xtD3DMULTISAMPLE_TYPE, 0, D3DRS_NONE, "D3DTEXF_LINEAR etc. filter to use for Swap" }, // nsp.
|
||||
{ "D3DRS_PRESENTATIONINTERVAL" /*= 127*/, 4627, xtDWORD, 0 }, // nsp.
|
||||
|
@ -1614,13 +1622,13 @@ const RenderStateInfo DxbxRenderStateInfo[] = {
|
|||
{ "D3DRS_FRONTFACE" /*= 146*/, 3424, xtD3DFRONT, NV2A_FRONT_FACE }, // nsp.
|
||||
{ "D3DRS_CULLMODE" /*= 147*/, 3424, xtD3DCULL, NV2A_CULL_FACE, D3DRS_CULLMODE },
|
||||
{ "D3DRS_TEXTUREFACTOR" /*= 148*/, 3424, xtD3DCOLOR, NV2A_RC_CONSTANT_COLOR0(0), D3DRS_TEXTUREFACTOR },
|
||||
#ifdef DXBX_USE_D3D9
|
||||
#ifdef CXBX_USE_D3D9
|
||||
{ "D3DRS_ZBIAS" /*= 149*/, 3424, xtLONG, 0, D3DRS_DEPTHBIAS },
|
||||
#else
|
||||
{ "D3DRS_ZBIAS" /*= 149*/, 3424, xtLONG, 0, D3DRS_ZBIAS },
|
||||
#endif
|
||||
{ "D3DRS_LOGICOP" /*= 150*/, 3424, xtD3DLOGICOP, NV2A_COLOR_LOGIC_OP_OP }, // nsp.
|
||||
#ifdef DXBX_USE_D3D9
|
||||
#ifdef CXBX_USE_D3D9
|
||||
{ "D3DRS_EDGEANTIALIAS" /*= 151*/, 3424, xtBOOL, NV2A_LINE_SMOOTH_ENABLE, D3DRS_ANTIALIASEDLINEENABLE }, // Dxbx note : No Xbox ext. (according to Direct3D8) !
|
||||
#else
|
||||
{ "D3DRS_EDGEANTIALIAS" /*= 151*/, 3424, xtBOOL, NV2A_LINE_SMOOTH_ENABLE, D3DRS_EDGEANTIALIAS }, // Dxbx note : No Xbox ext. (according to Direct3D8) !
|
||||
|
|
|
@ -4107,8 +4107,8 @@ PSH_RECOMPILED_SHADER XTL_EmuRecompilePshDef(XTL::X_D3DPIXELSHADERDEF *pPSDef)
|
|||
uint32 PSVersion = D3DPS_VERSION(1, 3); // Use pixel shader model 1.3 by default
|
||||
|
||||
#if 0 // Once PS.1.4 can be generated, enable this :
|
||||
XTL::D3DCAPS8 g_D3DCaps = {};
|
||||
if (g_pD3DDevice8->GetDeviceCaps(&g_D3DCaps) == D3D_OK) {
|
||||
XTL::D3DCAPS g_D3DCaps = {};
|
||||
if (g_pD3DDevice->GetDeviceCaps(&g_D3DCaps) == D3D_OK) {
|
||||
PSVersion = g_D3DCaps.PixelShaderVersion;
|
||||
}
|
||||
#endif
|
||||
|
@ -4187,7 +4187,7 @@ static const
|
|||
pFunction = (DWORD*)(pShader->GetBufferPointer());
|
||||
if (hRet == D3D_OK) {
|
||||
// redirect to windows d3d
|
||||
hRet = g_pD3DDevice8->CreatePixelShader
|
||||
hRet = g_pD3DDevice->CreatePixelShader
|
||||
(
|
||||
pFunction,
|
||||
#ifdef CXBX_USE_D3D9
|
||||
|
@ -4278,13 +4278,13 @@ VOID XTL::DxbxUpdateActivePixelShader() // NOPATCH
|
|||
#ifdef CXBX_USE_D3D9
|
||||
g_pD3DDevice.GetPixelShader(/*out*/PIDirect3DPixelShader9(&CurrentPixelShader));
|
||||
#else
|
||||
g_pD3DDevice8->GetPixelShader(/*out*/&CurrentPixelShader);
|
||||
g_pD3DDevice->GetPixelShader(/*out*/&CurrentPixelShader);
|
||||
#endif
|
||||
if (CurrentPixelShader != ConvertedPixelShaderHandle)
|
||||
#ifdef CXBX_USE_D3D9
|
||||
g_pD3DDevice8->SetPixelShader((IDirect3DPixelShader9)ConvertedPixelShaderHandle);
|
||||
g_pD3DDevice->SetPixelShader((IDirect3DPixelShader9)ConvertedPixelShaderHandle);
|
||||
#else
|
||||
g_pD3DDevice8->SetPixelShader(ConvertedPixelShaderHandle);
|
||||
g_pD3DDevice->SetPixelShader(ConvertedPixelShaderHandle);
|
||||
#endif
|
||||
|
||||
// Note : We set the constants /after/ setting the shader, so that any
|
||||
|
@ -4315,7 +4315,7 @@ VOID XTL::DxbxUpdateActivePixelShader() // NOPATCH
|
|||
//dwColor = *XTL::EmuMappedD3DRenderState[XTL::X_D3DRS_FOGCOLOR] | 0xFF000000;
|
||||
// Note : FOG.RGB is correct like this, but FOG.a should be coming
|
||||
// from the vertex shader (oFog) - however, D3D8 does not forward this...
|
||||
g_pD3DDevice8->GetRenderState(D3DRS_FOGCOLOR, &dwColor);
|
||||
g_pD3DDevice->GetRenderState(D3DRS_FOGCOLOR, &dwColor);
|
||||
break;
|
||||
case PSH_XBOX_CONSTANT_FC0:
|
||||
//dwColor = *XTL::EmuMappedD3DRenderState[XTL::X_D3DRS_PSFINALCOMBINERCONSTANT0];
|
||||
|
@ -4340,7 +4340,7 @@ VOID XTL::DxbxUpdateActivePixelShader() // NOPATCH
|
|||
#ifdef CXBX_USE_D3D9
|
||||
g_pD3DDevice.SetPixelShaderConstantF(Register_, PSingle(&fColor), 1);
|
||||
#else
|
||||
g_pD3DDevice8->SetPixelShaderConstant(Register_, &fColor, 1);
|
||||
g_pD3DDevice->SetPixelShaderConstant(Register_, &fColor, 1);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
@ -4349,9 +4349,9 @@ VOID XTL::DxbxUpdateActivePixelShader() // NOPATCH
|
|||
{
|
||||
ConvertedPixelShaderHandle = 0;
|
||||
#ifdef CXBX_USE_D3D9
|
||||
g_pD3DDevice8->SetPixelShader((IDirect3DPixelShader9)ConvertedPixelShaderHandle);
|
||||
g_pD3DDevice->SetPixelShader((IDirect3DPixelShader9)ConvertedPixelShaderHandle);
|
||||
#else
|
||||
g_pD3DDevice8->SetPixelShader(ConvertedPixelShaderHandle);
|
||||
g_pD3DDevice->SetPixelShader(ConvertedPixelShaderHandle);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
|
|
@ -43,6 +43,9 @@
|
|||
|
||||
// TODO: Find somewhere to put this that doesn't conflict with XTL::
|
||||
extern void EmuUpdateActiveTextureStages();
|
||||
#ifdef CXBX_USE_D3D9
|
||||
extern DWORD g_CachedIndexBase;
|
||||
#endif
|
||||
|
||||
uint32 XTL::g_dwPrimaryPBCount = 0;
|
||||
uint32 *XTL::g_pPrimaryPB = 0;
|
||||
|
@ -191,8 +194,8 @@ extern void XTL::EmuExecutePushBufferRaw
|
|||
}
|
||||
#endif
|
||||
|
||||
static LPDIRECT3DINDEXBUFFER8 pIndexBuffer=0;
|
||||
static LPDIRECT3DVERTEXBUFFER8 pVertexBuffer=0;
|
||||
static IDirect3DIndexBuffer *pIndexBuffer=0;
|
||||
static IDirect3DVertexBuffer *pVertexBuffer=0;
|
||||
|
||||
static uint maxIBSize = 0;
|
||||
|
||||
|
@ -267,7 +270,16 @@ extern void XTL::EmuExecutePushBufferRaw
|
|||
// create cached vertex buffer only once, with maxed out size
|
||||
if(pVertexBuffer == 0)
|
||||
{
|
||||
HRESULT hRet = g_pD3DDevice8->CreateVertexBuffer(2047*sizeof(DWORD), D3DUSAGE_WRITEONLY, dwVertexShader, D3DPOOL_MANAGED, &pVertexBuffer);
|
||||
HRESULT hRet = g_pD3DDevice->CreateVertexBuffer(
|
||||
2047*sizeof(DWORD),
|
||||
D3DUSAGE_WRITEONLY,
|
||||
dwVertexShader,
|
||||
D3DPOOL_MANAGED,
|
||||
&pVertexBuffer
|
||||
#ifdef CXBX_USE_D3D9
|
||||
, nullptr
|
||||
#endif
|
||||
);
|
||||
|
||||
if(FAILED(hRet))
|
||||
CxbxKrnlCleanup("Unable to create vertex buffer cache for PushBuffer emulation (0x1818, dwCount : %d)", dwCount);
|
||||
|
@ -321,7 +333,7 @@ extern void XTL::EmuExecutePushBufferRaw
|
|||
|
||||
bool bPatched = VertPatch.Apply(&VPDesc, NULL);
|
||||
|
||||
g_pD3DDevice8->DrawPrimitiveUP
|
||||
g_pD3DDevice->DrawPrimitiveUP
|
||||
(
|
||||
PCPrimitiveType,
|
||||
VPDesc.dwHostPrimitiveCount,
|
||||
|
@ -376,7 +388,11 @@ extern void XTL::EmuExecutePushBufferRaw
|
|||
pIndexBuffer->Release();
|
||||
}
|
||||
|
||||
hRet = g_pD3DDevice8->CreateIndexBuffer(dwCount*2 + 2*2, 0, D3DFMT_INDEX16, D3DPOOL_MANAGED, &pIndexBuffer);
|
||||
hRet = g_pD3DDevice->CreateIndexBuffer(dwCount*2 + 2*2, 0, D3DFMT_INDEX16, D3DPOOL_MANAGED, &pIndexBuffer
|
||||
#ifdef CXBX_USE_D3D9
|
||||
, nullptr
|
||||
#endif
|
||||
);
|
||||
|
||||
maxIBSize = dwCount*2 + 2*2;
|
||||
}
|
||||
|
@ -417,7 +433,11 @@ extern void XTL::EmuExecutePushBufferRaw
|
|||
|
||||
bool bPatched = VertPatch.Apply(&VPDesc, NULL);
|
||||
|
||||
g_pD3DDevice8->SetIndices(pIndexBuffer, 0);
|
||||
#ifdef CXBX_USE_D3D9
|
||||
g_pD3DDevice->SetIndices(pIndexBuffer);
|
||||
#else
|
||||
g_pD3DDevice->SetIndices(pIndexBuffer, 0);
|
||||
#endif
|
||||
|
||||
#ifdef _DEBUG_TRACK_PB
|
||||
if(!g_PBTrackDisable.exists(pdwOrigPushData))
|
||||
|
@ -428,10 +448,16 @@ extern void XTL::EmuExecutePushBufferRaw
|
|||
{
|
||||
if(IsValidCurrentShader())
|
||||
{
|
||||
g_pD3DDevice8->DrawIndexedPrimitive
|
||||
g_pD3DDevice->DrawIndexedPrimitive
|
||||
(
|
||||
PCPrimitiveType, 0, 8*1024*1024, 0, PrimitiveCount
|
||||
// PCPrimitiveType, 0, dwCount*2, 0, PrimitiveCount
|
||||
PCPrimitiveType,
|
||||
#ifdef CXBX_USE_D3D9
|
||||
g_CachedIndexBase,
|
||||
#endif
|
||||
0,
|
||||
8*1024*1024, // dwCount*2
|
||||
0,
|
||||
PrimitiveCount
|
||||
);
|
||||
|
||||
g_dwPrimPerFrame += PrimitiveCount;
|
||||
|
@ -442,7 +468,11 @@ extern void XTL::EmuExecutePushBufferRaw
|
|||
}
|
||||
#endif
|
||||
|
||||
g_pD3DDevice8->SetIndices(0, 0);
|
||||
#ifdef CXBX_USE_D3D9
|
||||
g_pD3DDevice->SetIndices(nullptr);
|
||||
#else
|
||||
g_pD3DDevice->SetIndices(0, 0);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -477,7 +507,7 @@ extern void XTL::EmuExecutePushBufferRaw
|
|||
|
||||
printf("\n");
|
||||
|
||||
XTL::IDirect3DVertexBuffer8 *pActiveVB = NULL;
|
||||
XTL::IDirect3DVertexBuffer *pActiveVB = NULL;
|
||||
|
||||
D3DVERTEXBUFFER_DESC VBDesc;
|
||||
|
||||
|
@ -485,7 +515,11 @@ extern void XTL::EmuExecutePushBufferRaw
|
|||
UINT uiStride;
|
||||
|
||||
// retrieve stream data
|
||||
g_pD3DDevice8->GetStreamSource(0, &pActiveVB, &uiStride);
|
||||
g_pD3DDevice->GetStreamSource(0, &pActiveVB,
|
||||
#ifdef CXBX_USE_D3D9
|
||||
nullptr, // pOffsetInBytes
|
||||
#endif
|
||||
&uiStride);
|
||||
|
||||
// retrieve stream desc
|
||||
pActiveVB->GetDesc(&VBDesc);
|
||||
|
@ -528,7 +562,11 @@ extern void XTL::EmuExecutePushBufferRaw
|
|||
pIndexBuffer->Release();
|
||||
}
|
||||
|
||||
hRet = g_pD3DDevice8->CreateIndexBuffer(dwCount*2, 0, D3DFMT_INDEX16, D3DPOOL_MANAGED, &pIndexBuffer);
|
||||
hRet = g_pD3DDevice->CreateIndexBuffer(dwCount*2, 0, D3DFMT_INDEX16, D3DPOOL_MANAGED, &pIndexBuffer
|
||||
#ifdef CXBX_USE_D3D9
|
||||
, nullptr
|
||||
#endif
|
||||
);
|
||||
|
||||
maxIBSize = dwCount*2;
|
||||
}
|
||||
|
@ -580,7 +618,11 @@ extern void XTL::EmuExecutePushBufferRaw
|
|||
|
||||
bool bPatched = VertPatch.Apply(&VPDesc, NULL);
|
||||
|
||||
g_pD3DDevice8->SetIndices(pIndexBuffer, 0);
|
||||
#ifdef CXBX_USE_D3D9
|
||||
g_pD3DDevice->SetIndices(pIndexBuffer);
|
||||
#else
|
||||
g_pD3DDevice->SetIndices(pIndexBuffer, 0);
|
||||
#endif
|
||||
|
||||
#ifdef _DEBUG_TRACK_PB
|
||||
if(!g_PBTrackDisable.exists(pdwOrigPushData))
|
||||
|
@ -589,9 +631,16 @@ extern void XTL::EmuExecutePushBufferRaw
|
|||
|
||||
if(!g_bPBSkipPusher && IsValidCurrentShader())
|
||||
{
|
||||
g_pD3DDevice8->DrawIndexedPrimitive
|
||||
g_pD3DDevice->DrawIndexedPrimitive
|
||||
(
|
||||
PCPrimitiveType, 0, /*dwCount*2*/8*1024*1024, 0, PrimitiveCount
|
||||
PCPrimitiveType,
|
||||
#ifdef CXBX_USE_D3D9
|
||||
g_CachedIndexBase,
|
||||
#endif
|
||||
0,
|
||||
/*dwCount*2*/8*1024*1024,
|
||||
0,
|
||||
PrimitiveCount
|
||||
);
|
||||
|
||||
g_dwPrimPerFrame += PrimitiveCount;
|
||||
|
@ -601,8 +650,12 @@ extern void XTL::EmuExecutePushBufferRaw
|
|||
}
|
||||
#endif
|
||||
|
||||
g_pD3DDevice8->SetIndices(0, 0);
|
||||
}
|
||||
#ifdef CXBX_USE_D3D9
|
||||
g_pD3DDevice->SetIndices(nullptr);
|
||||
#else
|
||||
g_pD3DDevice->SetIndices(0, 0);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
pdwPushData--;
|
||||
|
@ -627,7 +680,7 @@ extern void XTL::EmuExecutePushBufferRaw
|
|||
|
||||
if(g_bStepPush)
|
||||
{
|
||||
g_pD3DDevice8->Present(0,0,0,0);
|
||||
g_pD3DDevice->Present(0,0,0,0);
|
||||
Sleep(500);
|
||||
}
|
||||
}
|
||||
|
@ -638,7 +691,7 @@ void DbgDumpMesh(WORD *pIndexData, DWORD dwCount)
|
|||
if(!XTL::IsValidCurrentShader() || (dwCount == 0))
|
||||
return;
|
||||
|
||||
XTL::IDirect3DVertexBuffer8 *pActiveVB = NULL;
|
||||
XTL::IDirect3DVertexBuffer *pActiveVB = NULL;
|
||||
|
||||
XTL::D3DVERTEXBUFFER_DESC VBDesc;
|
||||
|
||||
|
@ -646,7 +699,11 @@ void DbgDumpMesh(WORD *pIndexData, DWORD dwCount)
|
|||
UINT uiStride;
|
||||
|
||||
// retrieve stream data
|
||||
g_pD3DDevice8->GetStreamSource(0, &pActiveVB, &uiStride);
|
||||
g_pD3DDevice->GetStreamSource(0, &pActiveVB,
|
||||
#ifdef CXBX_USE_D3D9
|
||||
nullptr, // pOffsetInBytes
|
||||
#endif
|
||||
&uiStride);
|
||||
|
||||
char szFileName[128];
|
||||
sprintf(szFileName, "D:\\_cxbx\\mesh\\CxbxMesh-0x%.08X.x", pIndexData);
|
||||
|
@ -768,7 +825,7 @@ void XTL::DbgDumpPushBuffer( DWORD* PBData, DWORD dwSize )
|
|||
return;
|
||||
|
||||
// Get a copy of the current vertex shader
|
||||
g_pD3DDevice8->GetVertexShader( &dwVertexShader );
|
||||
g_pD3DDevice->GetVertexShader( &dwVertexShader );
|
||||
|
||||
/*if( g_CurrentVertexShader != dwVertexShader )
|
||||
{
|
||||
|
|
|
@ -55,22 +55,22 @@ void XTL::EmuUpdateDeferredStates()
|
|||
if(EmuD3DDeferredRenderState != 0)
|
||||
{
|
||||
if(XTL::EmuD3DDeferredRenderState[0] != X_D3DRS_UNK)
|
||||
g_pD3DDevice8->SetRenderState(D3DRS_FOGENABLE, XTL::EmuD3DDeferredRenderState[0]);
|
||||
g_pD3DDevice->SetRenderState(D3DRS_FOGENABLE, XTL::EmuD3DDeferredRenderState[0]);
|
||||
|
||||
if(XTL::EmuD3DDeferredRenderState[1] != X_D3DRS_UNK)
|
||||
g_pD3DDevice8->SetRenderState(D3DRS_FOGTABLEMODE, XTL::EmuD3DDeferredRenderState[1]);
|
||||
g_pD3DDevice->SetRenderState(D3DRS_FOGTABLEMODE, XTL::EmuD3DDeferredRenderState[1]);
|
||||
|
||||
if(XTL::EmuD3DDeferredRenderState[2] != X_D3DRS_UNK)
|
||||
g_pD3DDevice8->SetRenderState(D3DRS_FOGSTART, XTL::EmuD3DDeferredRenderState[2]);
|
||||
g_pD3DDevice->SetRenderState(D3DRS_FOGSTART, XTL::EmuD3DDeferredRenderState[2]);
|
||||
|
||||
if(XTL::EmuD3DDeferredRenderState[3] != X_D3DRS_UNK)
|
||||
g_pD3DDevice8->SetRenderState(D3DRS_FOGEND, XTL::EmuD3DDeferredRenderState[3]);
|
||||
g_pD3DDevice->SetRenderState(D3DRS_FOGEND, XTL::EmuD3DDeferredRenderState[3]);
|
||||
|
||||
if(XTL::EmuD3DDeferredRenderState[4] != X_D3DRS_UNK)
|
||||
g_pD3DDevice8->SetRenderState(D3DRS_FOGDENSITY, XTL::EmuD3DDeferredRenderState[4]);
|
||||
g_pD3DDevice->SetRenderState(D3DRS_FOGDENSITY, XTL::EmuD3DDeferredRenderState[4]);
|
||||
|
||||
if(XTL::EmuD3DDeferredRenderState[5] != X_D3DRS_UNK)
|
||||
g_pD3DDevice8->SetRenderState(D3DRS_RANGEFOGENABLE, XTL::EmuD3DDeferredRenderState[5]);
|
||||
g_pD3DDevice->SetRenderState(D3DRS_RANGEFOGENABLE, XTL::EmuD3DDeferredRenderState[5]);
|
||||
|
||||
if(XTL::EmuD3DDeferredRenderState[6] != X_D3DRS_UNK)
|
||||
{
|
||||
|
@ -80,7 +80,7 @@ void XTL::EmuUpdateDeferredStates()
|
|||
dwConv |= (XTL::EmuD3DDeferredRenderState[6] & 0x00001000) ? D3DWRAP_V : 0;
|
||||
dwConv |= (XTL::EmuD3DDeferredRenderState[6] & 0x00100000) ? D3DWRAP_W : 0;
|
||||
|
||||
g_pD3DDevice8->SetRenderState(D3DRS_WRAP0, dwConv);
|
||||
g_pD3DDevice->SetRenderState(D3DRS_WRAP0, dwConv);
|
||||
}
|
||||
|
||||
if(XTL::EmuD3DDeferredRenderState[7] != X_D3DRS_UNK)
|
||||
|
@ -91,56 +91,58 @@ void XTL::EmuUpdateDeferredStates()
|
|||
dwConv |= (XTL::EmuD3DDeferredRenderState[7] & 0x00001000) ? D3DWRAP_V : 0;
|
||||
dwConv |= (XTL::EmuD3DDeferredRenderState[7] & 0x00100000) ? D3DWRAP_W : 0;
|
||||
|
||||
g_pD3DDevice8->SetRenderState(D3DRS_WRAP1, dwConv);
|
||||
g_pD3DDevice->SetRenderState(D3DRS_WRAP1, dwConv);
|
||||
}
|
||||
|
||||
if(XTL::EmuD3DDeferredRenderState[10] != X_D3DRS_UNK)
|
||||
g_pD3DDevice8->SetRenderState(D3DRS_LIGHTING, XTL::EmuD3DDeferredRenderState[10]);
|
||||
g_pD3DDevice->SetRenderState(D3DRS_LIGHTING, XTL::EmuD3DDeferredRenderState[10]);
|
||||
|
||||
if(XTL::EmuD3DDeferredRenderState[11] != X_D3DRS_UNK)
|
||||
g_pD3DDevice8->SetRenderState(D3DRS_SPECULARENABLE, XTL::EmuD3DDeferredRenderState[11]);
|
||||
g_pD3DDevice->SetRenderState(D3DRS_SPECULARENABLE, XTL::EmuD3DDeferredRenderState[11]);
|
||||
|
||||
if(XTL::EmuD3DDeferredRenderState[13] != X_D3DRS_UNK)
|
||||
g_pD3DDevice8->SetRenderState(D3DRS_COLORVERTEX, XTL::EmuD3DDeferredRenderState[13]);
|
||||
g_pD3DDevice->SetRenderState(D3DRS_COLORVERTEX, XTL::EmuD3DDeferredRenderState[13]);
|
||||
|
||||
if(XTL::EmuD3DDeferredRenderState[19] != X_D3DRS_UNK)
|
||||
g_pD3DDevice8->SetRenderState(D3DRS_DIFFUSEMATERIALSOURCE, XTL::EmuD3DDeferredRenderState[19]);
|
||||
g_pD3DDevice->SetRenderState(D3DRS_DIFFUSEMATERIALSOURCE, XTL::EmuD3DDeferredRenderState[19]);
|
||||
|
||||
if(XTL::EmuD3DDeferredRenderState[20] != X_D3DRS_UNK)
|
||||
g_pD3DDevice8->SetRenderState(D3DRS_AMBIENTMATERIALSOURCE, XTL::EmuD3DDeferredRenderState[20]);
|
||||
g_pD3DDevice->SetRenderState(D3DRS_AMBIENTMATERIALSOURCE, XTL::EmuD3DDeferredRenderState[20]);
|
||||
|
||||
if(XTL::EmuD3DDeferredRenderState[21] != X_D3DRS_UNK)
|
||||
g_pD3DDevice8->SetRenderState(D3DRS_EMISSIVEMATERIALSOURCE, XTL::EmuD3DDeferredRenderState[21]);
|
||||
g_pD3DDevice->SetRenderState(D3DRS_EMISSIVEMATERIALSOURCE, XTL::EmuD3DDeferredRenderState[21]);
|
||||
|
||||
if(XTL::EmuD3DDeferredRenderState[23] != X_D3DRS_UNK)
|
||||
g_pD3DDevice8->SetRenderState(D3DRS_AMBIENT, XTL::EmuD3DDeferredRenderState[23]);
|
||||
g_pD3DDevice->SetRenderState(D3DRS_AMBIENT, XTL::EmuD3DDeferredRenderState[23]);
|
||||
|
||||
if(XTL::EmuD3DDeferredRenderState[24] != X_D3DRS_UNK)
|
||||
g_pD3DDevice8->SetRenderState(D3DRS_POINTSIZE, XTL::EmuD3DDeferredRenderState[24]);
|
||||
g_pD3DDevice->SetRenderState(D3DRS_POINTSIZE, XTL::EmuD3DDeferredRenderState[24]);
|
||||
|
||||
if(XTL::EmuD3DDeferredRenderState[25] != X_D3DRS_UNK)
|
||||
g_pD3DDevice8->SetRenderState(D3DRS_POINTSIZE_MIN, XTL::EmuD3DDeferredRenderState[25]);
|
||||
g_pD3DDevice->SetRenderState(D3DRS_POINTSIZE_MIN, XTL::EmuD3DDeferredRenderState[25]);
|
||||
|
||||
if(XTL::EmuD3DDeferredRenderState[26] != X_D3DRS_UNK)
|
||||
g_pD3DDevice8->SetRenderState(D3DRS_POINTSPRITEENABLE, XTL::EmuD3DDeferredRenderState[26]);
|
||||
g_pD3DDevice->SetRenderState(D3DRS_POINTSPRITEENABLE, XTL::EmuD3DDeferredRenderState[26]);
|
||||
|
||||
if(XTL::EmuD3DDeferredRenderState[27] != X_D3DRS_UNK)
|
||||
g_pD3DDevice8->SetRenderState(D3DRS_POINTSCALEENABLE, XTL::EmuD3DDeferredRenderState[27]);
|
||||
g_pD3DDevice->SetRenderState(D3DRS_POINTSCALEENABLE, XTL::EmuD3DDeferredRenderState[27]);
|
||||
|
||||
if(XTL::EmuD3DDeferredRenderState[28] != X_D3DRS_UNK)
|
||||
g_pD3DDevice8->SetRenderState(D3DRS_POINTSCALE_A, XTL::EmuD3DDeferredRenderState[28]);
|
||||
g_pD3DDevice->SetRenderState(D3DRS_POINTSCALE_A, XTL::EmuD3DDeferredRenderState[28]);
|
||||
|
||||
if(XTL::EmuD3DDeferredRenderState[29] != X_D3DRS_UNK)
|
||||
g_pD3DDevice8->SetRenderState(D3DRS_POINTSCALE_B, XTL::EmuD3DDeferredRenderState[29]);
|
||||
g_pD3DDevice->SetRenderState(D3DRS_POINTSCALE_B, XTL::EmuD3DDeferredRenderState[29]);
|
||||
|
||||
if(XTL::EmuD3DDeferredRenderState[30] != X_D3DRS_UNK)
|
||||
g_pD3DDevice8->SetRenderState(D3DRS_POINTSCALE_C, XTL::EmuD3DDeferredRenderState[30]);
|
||||
g_pD3DDevice->SetRenderState(D3DRS_POINTSCALE_C, XTL::EmuD3DDeferredRenderState[30]);
|
||||
|
||||
if(XTL::EmuD3DDeferredRenderState[31] != X_D3DRS_UNK)
|
||||
g_pD3DDevice8->SetRenderState(D3DRS_POINTSIZE_MAX, XTL::EmuD3DDeferredRenderState[31]);
|
||||
g_pD3DDevice->SetRenderState(D3DRS_POINTSIZE_MAX, XTL::EmuD3DDeferredRenderState[31]);
|
||||
|
||||
#ifndef CXBX_USE_D3D9 // D3DRS_PATCHSEGMENTS exists in Direct3D 8, but not in 9 !?
|
||||
if(XTL::EmuD3DDeferredRenderState[33] != X_D3DRS_UNK)
|
||||
g_pD3DDevice8->SetRenderState(D3DRS_PATCHSEGMENTS, XTL::EmuD3DDeferredRenderState[33]);
|
||||
g_pD3DDevice->SetRenderState(D3DRS_PATCHSEGMENTS, XTL::EmuD3DDeferredRenderState[33]);
|
||||
#endif
|
||||
|
||||
/** To check for unhandled RenderStates
|
||||
for(int v=0;v<117-82;v++)
|
||||
|
@ -172,7 +174,7 @@ void XTL::EmuUpdateDeferredStates()
|
|||
if(pCur[0+Adjust2] == 5)
|
||||
EmuWarning("ClampToEdge is unsupported (temporarily)");
|
||||
else
|
||||
g_pD3DDevice8->SetTextureStageState(v, D3DTSS_ADDRESSU, pCur[0+Adjust2]);
|
||||
g_pD3DDevice->SetTextureStageState(v, D3DTSS_ADDRESSU, pCur[0+Adjust2]);
|
||||
}
|
||||
|
||||
if(pCur[1+Adjust2] != X_D3DTSS_UNK)
|
||||
|
@ -180,7 +182,7 @@ void XTL::EmuUpdateDeferredStates()
|
|||
if(pCur[1+Adjust2] == 5)
|
||||
EmuWarning("ClampToEdge is unsupported (temporarily)");
|
||||
else
|
||||
g_pD3DDevice8->SetTextureStageState(v, D3DTSS_ADDRESSV, pCur[1+Adjust2]);
|
||||
g_pD3DDevice->SetTextureStageState(v, D3DTSS_ADDRESSV, pCur[1+Adjust2]);
|
||||
}
|
||||
|
||||
if(pCur[2+Adjust2] != X_D3DTSS_UNK)
|
||||
|
@ -188,7 +190,7 @@ void XTL::EmuUpdateDeferredStates()
|
|||
if(pCur[2+Adjust2] == 5)
|
||||
EmuWarning("ClampToEdge is unsupported (temporarily)");
|
||||
else
|
||||
g_pD3DDevice8->SetTextureStageState(v, D3DTSS_ADDRESSW, pCur[2+Adjust2]);
|
||||
g_pD3DDevice->SetTextureStageState(v, D3DTSS_ADDRESSW, pCur[2+Adjust2]);
|
||||
}
|
||||
|
||||
if(pCur[3+Adjust2] != X_D3DTSS_UNK)
|
||||
|
@ -196,7 +198,7 @@ void XTL::EmuUpdateDeferredStates()
|
|||
if(pCur[3+Adjust2] == 4)
|
||||
EmuWarning("QuinCunx is unsupported (temporarily)");
|
||||
else
|
||||
g_pD3DDevice8->SetTextureStageState(v, D3DTSS_MAGFILTER, pCur[3+Adjust2]);
|
||||
g_pD3DDevice->SetTextureStageState(v, D3DTSS_MAGFILTER, pCur[3+Adjust2]);
|
||||
}
|
||||
|
||||
if(pCur[4+Adjust2] != X_D3DTSS_UNK)
|
||||
|
@ -204,7 +206,7 @@ void XTL::EmuUpdateDeferredStates()
|
|||
if(pCur[4+Adjust2] == 4)
|
||||
EmuWarning("QuinCunx is unsupported (temporarily)");
|
||||
else
|
||||
g_pD3DDevice8->SetTextureStageState(v, D3DTSS_MINFILTER, pCur[4+Adjust2]);
|
||||
g_pD3DDevice->SetTextureStageState(v, D3DTSS_MINFILTER, pCur[4+Adjust2]);
|
||||
}
|
||||
|
||||
if(pCur[5+Adjust2] != X_D3DTSS_UNK)
|
||||
|
@ -212,17 +214,17 @@ void XTL::EmuUpdateDeferredStates()
|
|||
if(pCur[5+Adjust2] == 4)
|
||||
EmuWarning("QuinCunx is unsupported (temporarily)");
|
||||
else
|
||||
g_pD3DDevice8->SetTextureStageState(v, D3DTSS_MIPFILTER, pCur[5+Adjust2]);
|
||||
g_pD3DDevice->SetTextureStageState(v, D3DTSS_MIPFILTER, pCur[5+Adjust2]);
|
||||
}
|
||||
|
||||
if(pCur[6+Adjust2] != X_D3DTSS_UNK)
|
||||
g_pD3DDevice8->SetTextureStageState(v, D3DTSS_MIPMAPLODBIAS, pCur[6+Adjust2]);
|
||||
g_pD3DDevice->SetTextureStageState(v, D3DTSS_MIPMAPLODBIAS, pCur[6+Adjust2]);
|
||||
|
||||
if(pCur[7+Adjust2] != X_D3DTSS_UNK)
|
||||
g_pD3DDevice8->SetTextureStageState(v, D3DTSS_MAXMIPLEVEL, pCur[7+Adjust2]);
|
||||
g_pD3DDevice->SetTextureStageState(v, D3DTSS_MAXMIPLEVEL, pCur[7+Adjust2]);
|
||||
|
||||
if(pCur[8+Adjust2] != X_D3DTSS_UNK)
|
||||
g_pD3DDevice8->SetTextureStageState(v, D3DTSS_MAXANISOTROPY, pCur[8+Adjust2]);
|
||||
g_pD3DDevice->SetTextureStageState(v, D3DTSS_MAXANISOTROPY, pCur[8+Adjust2]);
|
||||
|
||||
if(pCur[12-Adjust1] != X_D3DTSS_UNK)
|
||||
{
|
||||
|
@ -230,82 +232,82 @@ void XTL::EmuUpdateDeferredStates()
|
|||
switch (pCur[12 - Adjust1])
|
||||
{
|
||||
case X_D3DTOP_DISABLE:
|
||||
g_pD3DDevice8->SetTextureStageState(v, D3DTSS_COLOROP, D3DTOP_DISABLE);
|
||||
g_pD3DDevice->SetTextureStageState(v, D3DTSS_COLOROP, D3DTOP_DISABLE);
|
||||
break;
|
||||
case X_D3DTOP_SELECTARG1:
|
||||
g_pD3DDevice8->SetTextureStageState(v, D3DTSS_COLOROP, D3DTOP_SELECTARG1);
|
||||
g_pD3DDevice->SetTextureStageState(v, D3DTSS_COLOROP, D3DTOP_SELECTARG1);
|
||||
break;
|
||||
case X_D3DTOP_SELECTARG2:
|
||||
g_pD3DDevice8->SetTextureStageState(v, D3DTSS_COLOROP, D3DTOP_SELECTARG2);
|
||||
g_pD3DDevice->SetTextureStageState(v, D3DTSS_COLOROP, D3DTOP_SELECTARG2);
|
||||
break;
|
||||
case X_D3DTOP_MODULATE:
|
||||
g_pD3DDevice8->SetTextureStageState(v, D3DTSS_COLOROP, D3DTOP_MODULATE);
|
||||
g_pD3DDevice->SetTextureStageState(v, D3DTSS_COLOROP, D3DTOP_MODULATE);
|
||||
break;
|
||||
case X_D3DTOP_MODULATE2X:
|
||||
g_pD3DDevice8->SetTextureStageState(v, D3DTSS_COLOROP, D3DTOP_MODULATE2X);
|
||||
g_pD3DDevice->SetTextureStageState(v, D3DTSS_COLOROP, D3DTOP_MODULATE2X);
|
||||
break;
|
||||
case X_D3DTOP_MODULATE4X:
|
||||
g_pD3DDevice8->SetTextureStageState(v, D3DTSS_COLOROP, D3DTOP_MODULATE4X);
|
||||
g_pD3DDevice->SetTextureStageState(v, D3DTSS_COLOROP, D3DTOP_MODULATE4X);
|
||||
break;
|
||||
case X_D3DTOP_ADD:
|
||||
g_pD3DDevice8->SetTextureStageState(v, D3DTSS_COLOROP, D3DTOP_ADD);
|
||||
g_pD3DDevice->SetTextureStageState(v, D3DTSS_COLOROP, D3DTOP_ADD);
|
||||
break;
|
||||
case X_D3DTOP_ADDSIGNED:
|
||||
g_pD3DDevice8->SetTextureStageState(v, D3DTSS_COLOROP, D3DTOP_ADDSIGNED);
|
||||
g_pD3DDevice->SetTextureStageState(v, D3DTSS_COLOROP, D3DTOP_ADDSIGNED);
|
||||
break;
|
||||
case X_D3DTOP_ADDSIGNED2X:
|
||||
g_pD3DDevice8->SetTextureStageState(v, D3DTSS_COLOROP, D3DTOP_ADDSIGNED2X);
|
||||
g_pD3DDevice->SetTextureStageState(v, D3DTSS_COLOROP, D3DTOP_ADDSIGNED2X);
|
||||
break;
|
||||
case X_D3DTOP_SUBTRACT:
|
||||
g_pD3DDevice8->SetTextureStageState(v, D3DTSS_COLOROP, D3DTOP_SUBTRACT);
|
||||
g_pD3DDevice->SetTextureStageState(v, D3DTSS_COLOROP, D3DTOP_SUBTRACT);
|
||||
break;
|
||||
case X_D3DTOP_ADDSMOOTH:
|
||||
g_pD3DDevice8->SetTextureStageState(v, D3DTSS_COLOROP, D3DTOP_ADDSMOOTH);
|
||||
g_pD3DDevice->SetTextureStageState(v, D3DTSS_COLOROP, D3DTOP_ADDSMOOTH);
|
||||
break;
|
||||
case X_D3DTOP_BLENDDIFFUSEALPHA:
|
||||
g_pD3DDevice8->SetTextureStageState(v, D3DTSS_COLOROP, D3DTOP_BLENDDIFFUSEALPHA);
|
||||
g_pD3DDevice->SetTextureStageState(v, D3DTSS_COLOROP, D3DTOP_BLENDDIFFUSEALPHA);
|
||||
break;
|
||||
case X_D3DTOP_BLENDCURRENTALPHA:
|
||||
g_pD3DDevice8->SetTextureStageState(v, D3DTSS_COLOROP, D3DTOP_BLENDCURRENTALPHA);
|
||||
g_pD3DDevice->SetTextureStageState(v, D3DTSS_COLOROP, D3DTOP_BLENDCURRENTALPHA);
|
||||
break;
|
||||
case X_D3DTOP_BLENDTEXTUREALPHA:
|
||||
g_pD3DDevice8->SetTextureStageState(v, D3DTSS_COLOROP, D3DTOP_BLENDTEXTUREALPHA);
|
||||
g_pD3DDevice->SetTextureStageState(v, D3DTSS_COLOROP, D3DTOP_BLENDTEXTUREALPHA);
|
||||
break;
|
||||
case X_D3DTOP_BLENDFACTORALPHA:
|
||||
g_pD3DDevice8->SetTextureStageState(v, D3DTSS_COLOROP, D3DTOP_BLENDFACTORALPHA);
|
||||
g_pD3DDevice->SetTextureStageState(v, D3DTSS_COLOROP, D3DTOP_BLENDFACTORALPHA);
|
||||
break;
|
||||
case X_D3DTOP_BLENDTEXTUREALPHAPM:
|
||||
g_pD3DDevice8->SetTextureStageState(v, D3DTSS_COLOROP, D3DTOP_BLENDTEXTUREALPHAPM);
|
||||
g_pD3DDevice->SetTextureStageState(v, D3DTSS_COLOROP, D3DTOP_BLENDTEXTUREALPHAPM);
|
||||
break;
|
||||
case X_D3DTOP_PREMODULATE:
|
||||
g_pD3DDevice8->SetTextureStageState(v, D3DTSS_COLOROP, D3DTOP_PREMODULATE);
|
||||
g_pD3DDevice->SetTextureStageState(v, D3DTSS_COLOROP, D3DTOP_PREMODULATE);
|
||||
break;
|
||||
case X_D3DTOP_MODULATEALPHA_ADDCOLOR:
|
||||
g_pD3DDevice8->SetTextureStageState(v, D3DTSS_COLOROP, D3DTOP_MODULATEALPHA_ADDCOLOR);
|
||||
g_pD3DDevice->SetTextureStageState(v, D3DTSS_COLOROP, D3DTOP_MODULATEALPHA_ADDCOLOR);
|
||||
break;
|
||||
case X_D3DTOP_MODULATECOLOR_ADDALPHA:
|
||||
g_pD3DDevice8->SetTextureStageState(v, D3DTSS_COLOROP, D3DTOP_MODULATECOLOR_ADDALPHA);
|
||||
g_pD3DDevice->SetTextureStageState(v, D3DTSS_COLOROP, D3DTOP_MODULATECOLOR_ADDALPHA);
|
||||
break;
|
||||
case X_D3DTOP_MODULATEINVALPHA_ADDCOLOR:
|
||||
g_pD3DDevice8->SetTextureStageState(v, D3DTSS_COLOROP, D3DTOP_MODULATEINVALPHA_ADDCOLOR);
|
||||
g_pD3DDevice->SetTextureStageState(v, D3DTSS_COLOROP, D3DTOP_MODULATEINVALPHA_ADDCOLOR);
|
||||
break;
|
||||
case X_D3DTOP_MODULATEINVCOLOR_ADDALPHA:
|
||||
g_pD3DDevice8->SetTextureStageState(v, D3DTSS_COLOROP, D3DTOP_MODULATEINVCOLOR_ADDALPHA);
|
||||
g_pD3DDevice->SetTextureStageState(v, D3DTSS_COLOROP, D3DTOP_MODULATEINVCOLOR_ADDALPHA);
|
||||
break;
|
||||
case X_D3DTOP_DOTPRODUCT3:
|
||||
g_pD3DDevice8->SetTextureStageState(v, D3DTSS_COLOROP, D3DTOP_DOTPRODUCT3);
|
||||
g_pD3DDevice->SetTextureStageState(v, D3DTSS_COLOROP, D3DTOP_DOTPRODUCT3);
|
||||
break;
|
||||
case X_D3DTOP_MULTIPLYADD:
|
||||
g_pD3DDevice8->SetTextureStageState(v, D3DTSS_COLOROP, D3DTOP_MULTIPLYADD);
|
||||
g_pD3DDevice->SetTextureStageState(v, D3DTSS_COLOROP, D3DTOP_MULTIPLYADD);
|
||||
break;
|
||||
case X_D3DTOP_LERP:
|
||||
g_pD3DDevice8->SetTextureStageState(v, D3DTSS_COLOROP, D3DTOP_LERP);
|
||||
g_pD3DDevice->SetTextureStageState(v, D3DTSS_COLOROP, D3DTOP_LERP);
|
||||
break;
|
||||
case X_D3DTOP_BUMPENVMAP:
|
||||
g_pD3DDevice8->SetTextureStageState(v, D3DTSS_COLOROP, D3DTOP_MULTIPLYADD);
|
||||
g_pD3DDevice->SetTextureStageState(v, D3DTSS_COLOROP, D3DTOP_MULTIPLYADD);
|
||||
break;
|
||||
case X_D3DTOP_BUMPENVMAPLUMINANCE:
|
||||
g_pD3DDevice8->SetTextureStageState(v, D3DTSS_COLOROP, D3DTOP_BUMPENVMAPLUMINANCE);
|
||||
g_pD3DDevice->SetTextureStageState(v, D3DTSS_COLOROP, D3DTOP_BUMPENVMAPLUMINANCE);
|
||||
break;
|
||||
default:
|
||||
EmuWarning("(Temporarily) Unsupported D3DTSS_COLOROP Value (%d)", pCur[12 - Adjust1]);
|
||||
|
@ -314,13 +316,13 @@ void XTL::EmuUpdateDeferredStates()
|
|||
}
|
||||
|
||||
if(pCur[13-Adjust1] != X_D3DTSS_UNK)
|
||||
g_pD3DDevice8->SetTextureStageState(v, D3DTSS_COLORARG0, pCur[13-Adjust1]);
|
||||
g_pD3DDevice->SetTextureStageState(v, D3DTSS_COLORARG0, pCur[13-Adjust1]);
|
||||
|
||||
if(pCur[14-Adjust1] != X_D3DTSS_UNK)
|
||||
g_pD3DDevice8->SetTextureStageState(v, D3DTSS_COLORARG1, pCur[14-Adjust1]);
|
||||
g_pD3DDevice->SetTextureStageState(v, D3DTSS_COLORARG1, pCur[14-Adjust1]);
|
||||
|
||||
if(pCur[15-Adjust1] != X_D3DTSS_UNK)
|
||||
g_pD3DDevice8->SetTextureStageState(v, D3DTSS_COLORARG2, pCur[15-Adjust1]);
|
||||
g_pD3DDevice->SetTextureStageState(v, D3DTSS_COLORARG2, pCur[15-Adjust1]);
|
||||
|
||||
// TODO: Use a lookup table, this is not always a 1:1 map (same as D3DTSS_COLOROP)
|
||||
if(pCur[16-Adjust1] != X_D3DTSS_UNK)
|
||||
|
@ -329,32 +331,32 @@ void XTL::EmuUpdateDeferredStates()
|
|||
EmuWarning("(Temporarily) Unsupported D3DTSS_ALPHAOP Value (%d)", pCur[16-Adjust1]);
|
||||
else
|
||||
if( pCur[16-Adjust1] == 14 )
|
||||
g_pD3DDevice8->SetTextureStageState(v, D3DTSS_ALPHAOP, D3DTOP_BLENDTEXTUREALPHA);
|
||||
g_pD3DDevice->SetTextureStageState(v, D3DTSS_ALPHAOP, D3DTOP_BLENDTEXTUREALPHA);
|
||||
if( pCur[16-Adjust1] == 15 )
|
||||
g_pD3DDevice8->SetTextureStageState(v, D3DTSS_ALPHAOP, D3DTOP_BLENDFACTORALPHA);
|
||||
g_pD3DDevice->SetTextureStageState(v, D3DTSS_ALPHAOP, D3DTOP_BLENDFACTORALPHA);
|
||||
if( pCur[16-Adjust1] == 13 )
|
||||
g_pD3DDevice8->SetTextureStageState(v, D3DTSS_ALPHAOP, D3DTOP_BLENDCURRENTALPHA);
|
||||
g_pD3DDevice->SetTextureStageState(v, D3DTSS_ALPHAOP, D3DTOP_BLENDCURRENTALPHA);
|
||||
else
|
||||
g_pD3DDevice8->SetTextureStageState(v, D3DTSS_ALPHAOP, pCur[16-Adjust1]);
|
||||
g_pD3DDevice->SetTextureStageState(v, D3DTSS_ALPHAOP, pCur[16-Adjust1]);
|
||||
}
|
||||
|
||||
if(pCur[17-Adjust1] != X_D3DTSS_UNK)
|
||||
g_pD3DDevice8->SetTextureStageState(v, D3DTSS_ALPHAARG0, pCur[17-Adjust1]);
|
||||
g_pD3DDevice->SetTextureStageState(v, D3DTSS_ALPHAARG0, pCur[17-Adjust1]);
|
||||
|
||||
if(pCur[18-Adjust1] != X_D3DTSS_UNK)
|
||||
g_pD3DDevice8->SetTextureStageState(v, D3DTSS_ALPHAARG1, pCur[18-Adjust1]);
|
||||
g_pD3DDevice->SetTextureStageState(v, D3DTSS_ALPHAARG1, pCur[18-Adjust1]);
|
||||
|
||||
if(pCur[19-Adjust1] != X_D3DTSS_UNK)
|
||||
g_pD3DDevice8->SetTextureStageState(v, D3DTSS_ALPHAARG2, pCur[19-Adjust1]);
|
||||
g_pD3DDevice->SetTextureStageState(v, D3DTSS_ALPHAARG2, pCur[19-Adjust1]);
|
||||
|
||||
if(pCur[20-Adjust1] != X_D3DTSS_UNK)
|
||||
g_pD3DDevice8->SetTextureStageState(v, D3DTSS_RESULTARG, pCur[20-Adjust1]);
|
||||
g_pD3DDevice->SetTextureStageState(v, D3DTSS_RESULTARG, pCur[20-Adjust1]);
|
||||
|
||||
if(pCur[21-Adjust1] != X_D3DTSS_UNK)
|
||||
g_pD3DDevice8->SetTextureStageState(v, D3DTSS_TEXTURETRANSFORMFLAGS, pCur[21-Adjust1]);
|
||||
g_pD3DDevice->SetTextureStageState(v, D3DTSS_TEXTURETRANSFORMFLAGS, pCur[21-Adjust1]);
|
||||
|
||||
/*if(pCur[29] != X_D3DTSS_UNK) // This is NOT a deferred texture state!
|
||||
g_pD3DDevice8->SetTextureStageState(v, D3DTSS_BORDERCOLOR, pCur[29]);*/
|
||||
g_pD3DDevice->SetTextureStageState(v, D3DTSS_BORDERCOLOR, pCur[29]);*/
|
||||
|
||||
/** To check for unhandled texture stage state changes
|
||||
for(int r=0;r<32;r++)
|
||||
|
@ -390,15 +392,15 @@ void XTL::EmuUpdateDeferredStates()
|
|||
// pCur = Texture Stage 3 States
|
||||
::DWORD *pCur = &EmuD3DDeferredTextureState[2*32];
|
||||
|
||||
IDirect3DBaseTexture8 *pTexture;
|
||||
IDirect3DBaseTexture *pTexture;
|
||||
|
||||
// set the point sprites texture
|
||||
g_pD3DDevice8->GetTexture(3, &pTexture);
|
||||
g_pD3DDevice8->SetTexture(0, pTexture);
|
||||
g_pD3DDevice->GetTexture(3, &pTexture);
|
||||
g_pD3DDevice->SetTexture(0, pTexture);
|
||||
|
||||
// disable all other stages
|
||||
g_pD3DDevice8->SetTextureStageState(1, D3DTSS_COLOROP, D3DTOP_DISABLE);
|
||||
g_pD3DDevice8->SetTextureStageState(1, D3DTSS_ALPHAOP, D3DTOP_DISABLE);
|
||||
g_pD3DDevice->SetTextureStageState(1, D3DTSS_COLOROP, D3DTOP_DISABLE);
|
||||
g_pD3DDevice->SetTextureStageState(1, D3DTSS_ALPHAOP, D3DTOP_DISABLE);
|
||||
|
||||
// in that case we have to copy over the stage by hand
|
||||
for(int v=0;v<30;v++)
|
||||
|
@ -407,8 +409,8 @@ void XTL::EmuUpdateDeferredStates()
|
|||
{
|
||||
::DWORD dwValue;
|
||||
|
||||
g_pD3DDevice8->GetTextureStageState(3, (D3DTEXTURESTAGESTATETYPE)v, &dwValue);
|
||||
g_pD3DDevice8->SetTextureStageState(0, (D3DTEXTURESTAGESTATETYPE)v, dwValue);
|
||||
g_pD3DDevice->GetTextureStageState(3, (D3DTEXTURESTAGESTATETYPE)v, &dwValue);
|
||||
g_pD3DDevice->SetTextureStageState(0, (D3DTEXTURESTAGESTATETYPE)v, dwValue);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -72,7 +72,7 @@ extern UINT g_D3DStreamStrides[16];
|
|||
void *GetDataFromXboxResource(XTL::X_D3DResource *pXboxResource);
|
||||
|
||||
typedef struct {
|
||||
XTL::IDirect3DVertexBuffer8* pHostVertexBuffer;
|
||||
XTL::IDirect3DVertexBuffer* pHostVertexBuffer;
|
||||
size_t uiSize;
|
||||
std::chrono::time_point<std::chrono::high_resolution_clock> lastUsed;
|
||||
} cached_vertex_buffer_object;
|
||||
|
@ -83,7 +83,7 @@ std::unordered_map<DWORD, cached_vertex_buffer_object> g_HostVertexBuffers;
|
|||
// This prevents unnecessary allocation and releasing of Vertex Buffers when
|
||||
// we can use an existing just fine. This gives a (slight) performance boost
|
||||
// Returns true if the existing vertex buffer was trashed/made invalid
|
||||
bool GetCachedVertexBufferObject(DWORD pXboxDataPtr, DWORD size, XTL::IDirect3DVertexBuffer8** pVertexBuffer)
|
||||
bool GetCachedVertexBufferObject(DWORD pXboxDataPtr, DWORD size, XTL::IDirect3DVertexBuffer** pVertexBuffer)
|
||||
{
|
||||
// TODO: If the vertex buffer object cache becomes too large,
|
||||
// free the least recently used vertex buffers
|
||||
|
@ -95,7 +95,16 @@ bool GetCachedVertexBufferObject(DWORD pXboxDataPtr, DWORD size, XTL::IDirect3DV
|
|||
newBuffer.uiSize = size;
|
||||
newBuffer.lastUsed = std::chrono::high_resolution_clock::now();
|
||||
|
||||
HRESULT hRet = g_pD3DDevice8->CreateVertexBuffer(size, D3DUSAGE_WRITEONLY | D3DUSAGE_DYNAMIC, 0, XTL::D3DPOOL_DEFAULT, &newBuffer.pHostVertexBuffer);
|
||||
HRESULT hRet = g_pD3DDevice->CreateVertexBuffer(
|
||||
size,
|
||||
D3DUSAGE_WRITEONLY | D3DUSAGE_DYNAMIC,
|
||||
0,
|
||||
XTL::D3DPOOL_DEFAULT,
|
||||
&newBuffer.pHostVertexBuffer
|
||||
#ifdef CXBX_USE_D3D9
|
||||
, nullptr
|
||||
#endif
|
||||
);
|
||||
if (FAILED(hRet)) {
|
||||
CxbxKrnlCleanup("Failed to create vertex buffer");
|
||||
}
|
||||
|
@ -118,7 +127,16 @@ bool GetCachedVertexBufferObject(DWORD pXboxDataPtr, DWORD size, XTL::IDirect3DV
|
|||
// If execution reached here, we need to release and re-create the vertex buffer..
|
||||
buffer->pHostVertexBuffer->Release();
|
||||
buffer->uiSize = size;
|
||||
HRESULT hRet = g_pD3DDevice8->CreateVertexBuffer(size, D3DUSAGE_WRITEONLY | D3DUSAGE_DYNAMIC, 0, XTL::D3DPOOL_DEFAULT, &buffer->pHostVertexBuffer);
|
||||
HRESULT hRet = g_pD3DDevice->CreateVertexBuffer(
|
||||
size,
|
||||
D3DUSAGE_WRITEONLY | D3DUSAGE_DYNAMIC,
|
||||
0,
|
||||
XTL::D3DPOOL_DEFAULT,
|
||||
&buffer->pHostVertexBuffer
|
||||
#ifdef CXBX_USE_D3D9
|
||||
, nullptr
|
||||
#endif
|
||||
);
|
||||
if (FAILED(hRet)) {
|
||||
CxbxKrnlCleanup("Failed to create vertex buffer");
|
||||
}
|
||||
|
@ -224,7 +242,7 @@ bool XTL::VertexPatcher::PatchStream(VertexPatchDesc *pPatchDesc,
|
|||
// Do some groovy patchin'
|
||||
|
||||
XTL::X_D3DVertexBuffer *pOrigVertexBuffer;
|
||||
IDirect3DVertexBuffer8 *pNewVertexBuffer;
|
||||
IDirect3DVertexBuffer *pNewVertexBuffer;
|
||||
uint08 *pOrigData;
|
||||
uint08 *pNewData;
|
||||
UINT uiVertexCount;
|
||||
|
@ -351,7 +369,7 @@ bool XTL::VertexPatcher::PatchStream(VertexPatchDesc *pPatchDesc,
|
|||
pOrigVertex += 1 * sizeof(SHORT);
|
||||
break;
|
||||
}
|
||||
#if !DXBX_USE_D3D9 // No need for patching in D3D9
|
||||
#if !CXBX_USE_D3D9 // No need for patching in D3D9
|
||||
case X_D3DVSDT_NORMSHORT2: { // 0x21: // Make it FLOAT2
|
||||
// UNTESTED - Need test-case!
|
||||
((FLOAT *)pNewDataPos)[0] = ((FLOAT)((SHORT*)pOrigVertex)[0]) / 32767.0f;
|
||||
|
@ -368,7 +386,7 @@ bool XTL::VertexPatcher::PatchStream(VertexPatchDesc *pPatchDesc,
|
|||
pOrigVertex += 3 * sizeof(SHORT);
|
||||
break;
|
||||
}
|
||||
#if !DXBX_USE_D3D9 // No need for patching in D3D9
|
||||
#if !CXBX_USE_D3D9 // No need for patching in D3D9
|
||||
case X_D3DVSDT_NORMSHORT4: { // 0x41: // Make it FLOAT4
|
||||
// UNTESTED - Need test-case!
|
||||
((FLOAT *)pNewDataPos)[0] = ((FLOAT)((SHORT*)pOrigVertex)[0]) / 32767.0f;
|
||||
|
@ -412,7 +430,14 @@ bool XTL::VertexPatcher::PatchStream(VertexPatchDesc *pPatchDesc,
|
|||
//if(pNewVertexBuffer != nullptr) // Dxbx addition
|
||||
pNewVertexBuffer->Unlock();
|
||||
|
||||
if(FAILED(g_pD3DDevice8->SetStreamSource(uiStream, pNewVertexBuffer, pStreamPatch->ConvertedStride)))
|
||||
HRESULT hr = g_pD3DDevice->SetStreamSource(
|
||||
uiStream,
|
||||
pNewVertexBuffer,
|
||||
#ifdef CXBX_USE_D3D9
|
||||
0, // OffsetInBytes
|
||||
#endif
|
||||
pStreamPatch->ConvertedStride);
|
||||
if (FAILED(hr))
|
||||
{
|
||||
CxbxKrnlCleanup("Failed to set the type patched buffer as the new stream source!\n");
|
||||
}
|
||||
|
@ -462,7 +487,7 @@ bool XTL::VertexPatcher::NormalizeTexCoords(VertexPatchDesc *pPatchDesc, UINT ui
|
|||
return false;
|
||||
|
||||
XTL::X_D3DVertexBuffer *pOrigVertexBuffer;
|
||||
IDirect3DVertexBuffer8 *pNewVertexBuffer;
|
||||
IDirect3DVertexBuffer *pNewVertexBuffer;
|
||||
PATCHEDSTREAM *pStream;
|
||||
uint08 *pData, *pUVData;
|
||||
uint uiStride, uiVertexCount;
|
||||
|
@ -575,7 +600,14 @@ bool XTL::VertexPatcher::NormalizeTexCoords(VertexPatchDesc *pPatchDesc, UINT ui
|
|||
{
|
||||
pNewVertexBuffer->Unlock();
|
||||
|
||||
if(FAILED(g_pD3DDevice8->SetStreamSource(uiStream, pNewVertexBuffer, uiStride)))
|
||||
HRESULT hr = g_pD3DDevice->SetStreamSource(
|
||||
uiStream,
|
||||
pNewVertexBuffer,
|
||||
#ifdef CXBX_USE_D3D9
|
||||
0, // OffsetInBytes
|
||||
#endif
|
||||
uiStride);
|
||||
if (FAILED(hr))
|
||||
{
|
||||
CxbxKrnlCleanup("Failed to set the texcoord patched FVF buffer as the new stream source.");
|
||||
}
|
||||
|
@ -769,7 +801,13 @@ bool XTL::VertexPatcher::PatchPrimitive(VertexPatchDesc *pPatchDesc,
|
|||
{
|
||||
pStream->pPatchedStream->Unlock();
|
||||
|
||||
g_pD3DDevice8->SetStreamSource(uiStream, pStream->pPatchedStream, pStream->uiOrigStride);
|
||||
g_pD3DDevice->SetStreamSource(
|
||||
uiStream,
|
||||
pStream->pPatchedStream,
|
||||
#ifdef CXBX_USE_D3D9
|
||||
0, // OffsetInBytes
|
||||
#endif
|
||||
pStream->uiOrigStride);
|
||||
}
|
||||
|
||||
m_bPatched = true;
|
||||
|
@ -807,7 +845,7 @@ bool XTL::VertexPatcher::Apply(VertexPatchDesc *pPatchDesc, bool *pbFatalError)
|
|||
|
||||
if (!Patched && pPatchDesc->pXboxVertexStreamZeroData == nullptr) {
|
||||
// Fetch or Create the host Vertex Buffer
|
||||
XTL::IDirect3DVertexBuffer8* pHostVertexBuffer;
|
||||
XTL::IDirect3DVertexBuffer* pHostVertexBuffer;
|
||||
GetCachedVertexBufferObject(g_D3DStreams[uiStream]->Data, pPatchDesc->uiSize, &pHostVertexBuffer);
|
||||
|
||||
// Copy xbox data to the host vertex buffer
|
||||
|
@ -820,7 +858,13 @@ bool XTL::VertexPatcher::Apply(VertexPatchDesc *pPatchDesc, bool *pbFatalError)
|
|||
pHostVertexBuffer->Unlock();
|
||||
|
||||
// Set the buffer as a stream source
|
||||
g_pD3DDevice8->SetStreamSource(uiStream, pHostVertexBuffer, g_D3DStreamStrides[uiStream]);
|
||||
g_pD3DDevice->SetStreamSource(
|
||||
uiStream,
|
||||
pHostVertexBuffer,
|
||||
#ifdef CXBX_USE_D3D9
|
||||
0, // OffsetInBytes
|
||||
#endif
|
||||
g_D3DStreamStrides[uiStream]);
|
||||
}
|
||||
|
||||
// TODO: Cache Vertex Buffer Data
|
||||
|
@ -999,10 +1043,10 @@ VOID XTL::EmuFlushIVB()
|
|||
|
||||
if(bFVF)
|
||||
{
|
||||
g_pD3DDevice8->SetVertexShader(dwCurFVF);
|
||||
g_pD3DDevice->SetVertexShader(dwCurFVF);
|
||||
}
|
||||
|
||||
g_pD3DDevice8->DrawPrimitiveUP(
|
||||
g_pD3DDevice->DrawPrimitiveUP(
|
||||
EmuXB2PC_D3DPrimitiveType(VPDesc.XboxPrimitiveType),
|
||||
VPDesc.dwHostPrimitiveCount,
|
||||
VPDesc.pXboxVertexStreamZeroData,
|
||||
|
@ -1012,7 +1056,7 @@ VOID XTL::EmuFlushIVB()
|
|||
|
||||
if(bFVF)
|
||||
{
|
||||
g_pD3DDevice8->SetVertexShader(g_CurrentXboxVertexShaderHandle);
|
||||
g_pD3DDevice->SetVertexShader(g_CurrentXboxVertexShaderHandle);
|
||||
}
|
||||
|
||||
g_InlineVertexBuffer_TableOffset = 0;
|
||||
|
|
|
@ -60,7 +60,7 @@ VertexPatchDesc;
|
|||
typedef struct _PATCHEDSTREAM
|
||||
{
|
||||
XTL::X_D3DVertexBuffer *pOriginalStream;
|
||||
XTL::IDirect3DVertexBuffer8 *pPatchedStream;
|
||||
XTL::IDirect3DVertexBuffer *pPatchedStream;
|
||||
UINT uiOrigStride;
|
||||
UINT uiNewStride;
|
||||
} PATCHEDSTREAM;
|
||||
|
|
|
@ -1643,11 +1643,15 @@ static DWORD VshGetDeclarationSize(DWORD *pDeclaration)
|
|||
return (Pos + 1) * sizeof(DWORD);
|
||||
}
|
||||
|
||||
#ifndef CXBX_USE_D3D9
|
||||
namespace XTL {
|
||||
typedef DWORD D3DDECLUSAGE;
|
||||
}
|
||||
#endif
|
||||
|
||||
#define D3DDECLUSAGE_UNSUPPORTED ((D3DDECLUSAGE)-1)
|
||||
|
||||
D3DDECLUSAGE Xb2PCRegisterType
|
||||
XTL::D3DDECLUSAGE Xb2PCRegisterType
|
||||
(
|
||||
DWORD VertexRegister,
|
||||
boolean IsFixedFunction
|
||||
|
@ -1656,6 +1660,9 @@ D3DDECLUSAGE Xb2PCRegisterType
|
|||
using namespace XTL;
|
||||
|
||||
D3DDECLUSAGE PCRegisterType;
|
||||
#ifdef CXBX_USE_D3D9
|
||||
DWORD PCUsageIndex = 0;
|
||||
#endif
|
||||
// For fixed function vertex shaders, print D3DVSDE_*, for custom shaders print numbered registers.
|
||||
if (IsFixedFunction) {
|
||||
switch (VertexRegister)
|
||||
|
@ -1666,27 +1673,52 @@ D3DDECLUSAGE Xb2PCRegisterType
|
|||
break;
|
||||
case X_D3DVSDE_POSITION: // 0
|
||||
DbgVshPrintf("D3DVSDE_POSITION");
|
||||
#ifdef CXBX_USE_D3D9
|
||||
PCRegisterType = D3DDECLUSAGE_POSITION;
|
||||
#else
|
||||
PCRegisterType = D3DVSDE_POSITION;
|
||||
#endif
|
||||
break;
|
||||
case X_D3DVSDE_BLENDWEIGHT: // 1
|
||||
DbgVshPrintf("D3DVSDE_BLENDWEIGHT");
|
||||
#ifdef CXBX_USE_D3D9
|
||||
PCRegisterType = D3DDECLUSAGE_BLENDWEIGHT;
|
||||
#else
|
||||
PCRegisterType = D3DVSDE_BLENDWEIGHT;
|
||||
#endif
|
||||
break;
|
||||
case X_D3DVSDE_NORMAL: // 2
|
||||
DbgVshPrintf("D3DVSDE_NORMAL");
|
||||
#ifdef CXBX_USE_D3D9
|
||||
PCRegisterType = D3DDECLUSAGE_NORMAL;
|
||||
#else
|
||||
PCRegisterType = D3DVSDE_NORMAL;
|
||||
#endif
|
||||
break;
|
||||
case X_D3DVSDE_DIFFUSE: // 3
|
||||
DbgVshPrintf("D3DVSDE_DIFFUSE");
|
||||
#ifdef CXBX_USE_D3D9
|
||||
PCRegisterType = D3DDECLUSAGE_COLOR; PCUsageIndex = 0;
|
||||
#else
|
||||
PCRegisterType = D3DVSDE_DIFFUSE;
|
||||
#endif
|
||||
break;
|
||||
case X_D3DVSDE_SPECULAR: // 4
|
||||
DbgVshPrintf("D3DVSDE_SPECULAR");
|
||||
#ifdef CXBX_USE_D3D9
|
||||
PCRegisterType = D3DDECLUSAGE_COLOR; PCUsageIndex = 1;
|
||||
#else
|
||||
PCRegisterType = D3DVSDE_SPECULAR;
|
||||
#endif
|
||||
break;
|
||||
case X_D3DVSDE_FOG: // 5
|
||||
#ifdef CXBX_USE_D3D9
|
||||
DbgVshPrintf("D3DVSDE_FOG");
|
||||
PCRegisterType = D3DDECLUSAGE_FOG;
|
||||
#else
|
||||
DbgVshPrintf("D3DVSDE_FOG /* xbox ext. */");
|
||||
PCRegisterType = D3DDECLUSAGE_UNSUPPORTED;
|
||||
#endif
|
||||
break;
|
||||
case X_D3DVSDE_BACKDIFFUSE: // 7
|
||||
DbgVshPrintf("D3DVSDE_BACKDIFFUSE /* xbox ext. */");
|
||||
|
@ -1698,19 +1730,35 @@ D3DDECLUSAGE Xb2PCRegisterType
|
|||
break;
|
||||
case X_D3DVSDE_TEXCOORD0: // 9
|
||||
DbgVshPrintf("D3DVSDE_TEXCOORD0");
|
||||
#ifdef CXBX_USE_D3D9
|
||||
PCRegisterType = D3DDECLUSAGE_TEXCOORD; PCUsageIndex = 0;
|
||||
#else
|
||||
PCRegisterType = D3DVSDE_TEXCOORD0;
|
||||
#endif
|
||||
break;
|
||||
case X_D3DVSDE_TEXCOORD1: // 10
|
||||
DbgVshPrintf("D3DVSDE_TEXCOORD1");
|
||||
#ifdef CXBX_USE_D3D9
|
||||
PCRegisterType = D3DDECLUSAGE_TEXCOORD; PCUsageIndex = 1;
|
||||
#else
|
||||
PCRegisterType = D3DVSDE_TEXCOORD1;
|
||||
#endif
|
||||
break;
|
||||
case X_D3DVSDE_TEXCOORD2: // 11
|
||||
DbgVshPrintf("D3DVSDE_TEXCOORD2");
|
||||
#ifdef CXBX_USE_D3D9
|
||||
PCRegisterType = D3DDECLUSAGE_TEXCOORD; PCUsageIndex = 2;
|
||||
#else
|
||||
PCRegisterType = D3DVSDE_TEXCOORD2;
|
||||
#endif
|
||||
break;
|
||||
case X_D3DVSDE_TEXCOORD3: // 12
|
||||
DbgVshPrintf("D3DVSDE_TEXCOORD3");
|
||||
#ifdef CXBX_USE_D3D9
|
||||
PCRegisterType = D3DDECLUSAGE_TEXCOORD; PCUsageIndex = 3;
|
||||
#else
|
||||
PCRegisterType = D3DVSDE_TEXCOORD3;
|
||||
#endif
|
||||
break;
|
||||
default:
|
||||
DbgVshPrintf("%d /* unknown register */", VertexRegister);
|
||||
|
@ -1723,6 +1771,9 @@ D3DDECLUSAGE Xb2PCRegisterType
|
|||
}
|
||||
|
||||
return PCRegisterType;
|
||||
#ifdef CXBX_USE_D3D9
|
||||
// TODO : Also return (and use) PCUsageIndex
|
||||
#endif
|
||||
}
|
||||
|
||||
static inline DWORD VshGetTokenType(DWORD Token)
|
||||
|
@ -2017,7 +2068,7 @@ static void VshConvertToken_STREAMDATA_REG(DWORD *pToken,
|
|||
break;
|
||||
case X_D3DVSDT_NONE: // 0x02:
|
||||
DbgVshPrintf("D3DVSDT_NONE /* xbox ext. nsp */");
|
||||
#if DXBX_USE_D3D9
|
||||
#if CXBX_USE_D3D9
|
||||
NewDataType = D3DVSDT_NONE;
|
||||
#endif
|
||||
// TODO -oDxbx: Use D3DVSD_NOP ?
|
||||
|
|
|
@ -58,46 +58,91 @@ ENUM2STR_START(D3DCUBEMAP_FACES)
|
|||
ENUM2STR_END_and_LOGRENDER(D3DCUBEMAP_FACES)
|
||||
|
||||
ENUM2STR_START(D3DFORMAT)
|
||||
ENUM2STR_CASE(D3DFMT_UNKNOWN)
|
||||
ENUM2STR_CASE(D3DFMT_R8G8B8)
|
||||
ENUM2STR_CASE(D3DFMT_A8R8G8B8)
|
||||
ENUM2STR_CASE(D3DFMT_X8R8G8B8)
|
||||
ENUM2STR_CASE(D3DFMT_R5G6B5)
|
||||
ENUM2STR_CASE(D3DFMT_X1R5G5B5)
|
||||
ENUM2STR_CASE(D3DFMT_A1R5G5B5)
|
||||
ENUM2STR_CASE(D3DFMT_A4R4G4B4)
|
||||
ENUM2STR_CASE(D3DFMT_R3G3B2)
|
||||
ENUM2STR_CASE(D3DFMT_A8)
|
||||
ENUM2STR_CASE(D3DFMT_A8R3G3B2)
|
||||
ENUM2STR_CASE(D3DFMT_X4R4G4B4)
|
||||
ENUM2STR_CASE(D3DFMT_A8P8)
|
||||
ENUM2STR_CASE(D3DFMT_P8)
|
||||
ENUM2STR_CASE(D3DFMT_L8)
|
||||
ENUM2STR_CASE(D3DFMT_A8L8)
|
||||
ENUM2STR_CASE(D3DFMT_A4L4)
|
||||
ENUM2STR_CASE(D3DFMT_V8U8)
|
||||
ENUM2STR_CASE(D3DFMT_L6V5U5)
|
||||
ENUM2STR_CASE(D3DFMT_X8L8V8U8)
|
||||
ENUM2STR_CASE(D3DFMT_Q8W8V8U8)
|
||||
ENUM2STR_CASE(D3DFMT_V16U16)
|
||||
ENUM2STR_CASE(D3DFMT_W11V11U10)
|
||||
ENUM2STR_CASE(D3DFMT_UYVY)
|
||||
ENUM2STR_CASE(D3DFMT_YUY2)
|
||||
ENUM2STR_CASE(D3DFMT_DXT1)
|
||||
ENUM2STR_CASE(D3DFMT_DXT2)
|
||||
ENUM2STR_CASE(D3DFMT_DXT3)
|
||||
ENUM2STR_CASE(D3DFMT_DXT4)
|
||||
ENUM2STR_CASE(D3DFMT_DXT5)
|
||||
ENUM2STR_CASE(D3DFMT_D16_LOCKABLE)
|
||||
ENUM2STR_CASE(D3DFMT_D32)
|
||||
ENUM2STR_CASE(D3DFMT_D15S1)
|
||||
ENUM2STR_CASE(D3DFMT_D24S8)
|
||||
ENUM2STR_CASE(D3DFMT_D16)
|
||||
ENUM2STR_CASE(D3DFMT_D24X8)
|
||||
ENUM2STR_CASE(D3DFMT_D24X4S4)
|
||||
ENUM2STR_CASE(D3DFMT_VERTEXDATA)
|
||||
ENUM2STR_CASE(D3DFMT_INDEX16)
|
||||
ENUM2STR_CASE(D3DFMT_INDEX32)
|
||||
ENUM2STR_CASE(D3DFMT_UNKNOWN) // = 0,
|
||||
ENUM2STR_CASE(D3DFMT_R8G8B8) // = 20,
|
||||
ENUM2STR_CASE(D3DFMT_A8R8G8B8) // = 21,
|
||||
ENUM2STR_CASE(D3DFMT_X8R8G8B8) // = 22,
|
||||
ENUM2STR_CASE(D3DFMT_R5G6B5) // = 23,
|
||||
ENUM2STR_CASE(D3DFMT_X1R5G5B5) // = 24,
|
||||
ENUM2STR_CASE(D3DFMT_A1R5G5B5) // = 25,
|
||||
ENUM2STR_CASE(D3DFMT_A4R4G4B4) // = 26,
|
||||
ENUM2STR_CASE(D3DFMT_R3G3B2) // = 27,
|
||||
ENUM2STR_CASE(D3DFMT_A8) // = 28,
|
||||
ENUM2STR_CASE(D3DFMT_A8R3G3B2) // = 29,
|
||||
ENUM2STR_CASE(D3DFMT_X4R4G4B4) // = 30,
|
||||
ENUM2STR_CASE(D3DFMT_A2B10G10R10) // = 31,
|
||||
#ifdef CXBX_USE_D3D9
|
||||
ENUM2STR_CASE(D3DFMT_A8B8G8R8) // = 32,
|
||||
ENUM2STR_CASE(D3DFMT_X8B8G8R8) // = 33,
|
||||
#endif // CXBX_USE_D3D9
|
||||
ENUM2STR_CASE(D3DFMT_G16R16) // = 34,
|
||||
#ifdef CXBX_USE_D3D9
|
||||
ENUM2STR_CASE(D3DFMT_A2R10G10B10) // = 35,
|
||||
ENUM2STR_CASE(D3DFMT_A16B16G16R16) // = 36,
|
||||
#endif // CXBX_USE_D3D9
|
||||
ENUM2STR_CASE(D3DFMT_A8P8) // = 40,
|
||||
ENUM2STR_CASE(D3DFMT_P8) // = 41,
|
||||
ENUM2STR_CASE(D3DFMT_L8) // = 50,
|
||||
ENUM2STR_CASE(D3DFMT_A8L8) // = 51,
|
||||
ENUM2STR_CASE(D3DFMT_A4L4) // = 52,
|
||||
ENUM2STR_CASE(D3DFMT_V8U8) // = 60,
|
||||
ENUM2STR_CASE(D3DFMT_L6V5U5) // = 61,
|
||||
ENUM2STR_CASE(D3DFMT_X8L8V8U8) // = 62,
|
||||
ENUM2STR_CASE(D3DFMT_Q8W8V8U8) // = 63,
|
||||
ENUM2STR_CASE(D3DFMT_V16U16) // = 64,
|
||||
#ifndef CXBX_USE_D3D9
|
||||
ENUM2STR_CASE(D3DFMT_W11V11U10) // = 65,
|
||||
#else // !CXBX_USE_D3D9
|
||||
ENUM2STR_CASE(D3DFMT_A2W10V10U10) // = 67,
|
||||
#endif // CXBX_USE_D3D9
|
||||
ENUM2STR_CASE(D3DFMT_UYVY) // = MAKEFOURCC('U', 'Y', 'V', 'Y'),
|
||||
#ifdef CXBX_USE_D3D9
|
||||
ENUM2STR_CASE(D3DFMT_R8G8_B8G8) // = MAKEFOURCC('R', 'G', 'B', 'G'),
|
||||
#endif // CXBX_USE_D3D9
|
||||
ENUM2STR_CASE(D3DFMT_YUY2) // = MAKEFOURCC('Y', 'U', 'Y', '2'),
|
||||
#ifdef CXBX_USE_D3D9
|
||||
ENUM2STR_CASE(D3DFMT_G8R8_G8B8) // = MAKEFOURCC('G', 'R', 'G', 'B'),
|
||||
#endif // CXBX_USE_D3D9
|
||||
ENUM2STR_CASE(D3DFMT_DXT1) // = MAKEFOURCC('D', 'X', 'T', '1'),
|
||||
ENUM2STR_CASE(D3DFMT_DXT2) // = MAKEFOURCC('D', 'X', 'T', '2'),
|
||||
ENUM2STR_CASE(D3DFMT_DXT3) // = MAKEFOURCC('D', 'X', 'T', '3'),
|
||||
ENUM2STR_CASE(D3DFMT_DXT4) // = MAKEFOURCC('D', 'X', 'T', '4'),
|
||||
ENUM2STR_CASE(D3DFMT_DXT5) // = MAKEFOURCC('D', 'X', 'T', '5'),
|
||||
ENUM2STR_CASE(D3DFMT_D16_LOCKABLE) // = 70,
|
||||
ENUM2STR_CASE(D3DFMT_D32) // = 71,
|
||||
ENUM2STR_CASE(D3DFMT_D15S1) // = 73,
|
||||
ENUM2STR_CASE(D3DFMT_D24S8) // = 75,
|
||||
ENUM2STR_CASE(D3DFMT_D24X8) // = 77,
|
||||
ENUM2STR_CASE(D3DFMT_D24X4S4) // = 79,
|
||||
ENUM2STR_CASE(D3DFMT_D16) // = 80,
|
||||
#ifdef CXBX_USE_D3D9
|
||||
ENUM2STR_CASE(D3DFMT_D32F_LOCKABLE) // = 82,
|
||||
ENUM2STR_CASE(D3DFMT_D24FS8) // = 83,
|
||||
#if !defined(D3D_DISABLE_9EX)
|
||||
ENUM2STR_CASE(D3DFMT_D32_LOCKABLE) // = 84,
|
||||
ENUM2STR_CASE(D3DFMT_S8_LOCKABLE) // = 85,
|
||||
#endif // !D3D_DISABLE_9EX
|
||||
ENUM2STR_CASE(D3DFMT_L16) // = 81,
|
||||
#endif // CXBX_USE_D3D9
|
||||
ENUM2STR_CASE(D3DFMT_VERTEXDATA) // = 100,
|
||||
ENUM2STR_CASE(D3DFMT_INDEX16) // = 101,
|
||||
ENUM2STR_CASE(D3DFMT_INDEX32) // = 102,
|
||||
#ifdef CXBX_USE_D3D9
|
||||
ENUM2STR_CASE(D3DFMT_Q16W16V16U16) // = 110,
|
||||
ENUM2STR_CASE(D3DFMT_MULTI2_ARGB8) // = MAKEFOURCC('M', 'E', 'T', '1'),
|
||||
ENUM2STR_CASE(D3DFMT_R16F) // = 111,
|
||||
ENUM2STR_CASE(D3DFMT_G16R16F) // = 112,
|
||||
ENUM2STR_CASE(D3DFMT_A16B16G16R16F) // = 113,
|
||||
ENUM2STR_CASE(D3DFMT_R32F) // = 114,
|
||||
ENUM2STR_CASE(D3DFMT_G32R32F) // = 115,
|
||||
ENUM2STR_CASE(D3DFMT_A32B32G32R32F) // = 116,
|
||||
ENUM2STR_CASE(D3DFMT_CxV8U8) // = 117,
|
||||
#if !defined(D3D_DISABLE_9EX)
|
||||
ENUM2STR_CASE(D3DFMT_A1) // = 118,
|
||||
ENUM2STR_CASE(D3DFMT_A2B10G10R10_XR_BIAS) // = 119,
|
||||
ENUM2STR_CASE(D3DFMT_BINARYBUFFER) // = 199,
|
||||
#endif // !D3D_DISABLE_9EX
|
||||
#endif // CXBX_USE_D3D9
|
||||
ENUM2STR_END_and_LOGRENDER(D3DFORMAT)
|
||||
|
||||
ENUM2STR_START(D3DPOOL)
|
||||
|
@ -304,7 +349,7 @@ LOGRENDER(X_D3DDISPLAYMODE)
|
|||
LOGRENDER_MEMBER(Format);
|
||||
}
|
||||
|
||||
LOGRENDER(D3DVIEWPORT8)
|
||||
LOGRENDER(X_D3DVIEWPORT8)
|
||||
{
|
||||
return os
|
||||
LOGRENDER_MEMBER(X)
|
||||
|
|
|
@ -99,7 +99,7 @@ LOGRENDER_HEADER(X_D3DRESOURCE_SIZE)
|
|||
// Xbox D3D LOGRENDER_HEADER(Type) declarations
|
||||
//
|
||||
|
||||
LOGRENDER_HEADER(D3DVIEWPORT8)
|
||||
LOGRENDER_HEADER(X_D3DVIEWPORT8)
|
||||
LOGRENDER_HEADER(X_D3DDISPLAYMODE)
|
||||
LOGRENDER_HEADER(X_D3DResource)
|
||||
LOGRENDER_HEADER(X_D3DPixelContainer)
|
||||
|
|
|
@ -34,17 +34,115 @@
|
|||
#ifndef EMUD3D8TYPES_H
|
||||
#define EMUD3D8TYPES_H
|
||||
|
||||
//#define CXBX_USE_D3D9 // Declared in the Debug_Direct3D9 build configuration
|
||||
|
||||
#ifdef CXBX_USE_D3D9
|
||||
|
||||
#undef UNICODE // make sure dxerr.h DXGetErrorString is aliassed to *A, not *W
|
||||
|
||||
// include direct3d 9x headers
|
||||
#define DIRECT3D_VERSION 0x0900
|
||||
#include <d3d9.h>
|
||||
//implies #include <d3d9types.h> // for D3DFORMAT, D3DLIGHT9, etc
|
||||
//implies #include <d3d9caps.h>
|
||||
#include <d3dx9math.h> // for D3DXVECTOR4, etc
|
||||
#include <d3dx9tex.h>
|
||||
|
||||
#include <dxerr.h>
|
||||
#pragma comment(lib, "dxerr.lib") // See https://blogs.msdn.microsoft.com/chuckw/2012/04/24/wheres-dxerr-lib/
|
||||
|
||||
// If the above doesn't compile, install the June 2010 DirectX SDK
|
||||
// from https://www.microsoft.com/en-us/download/details.aspx?id=6812
|
||||
// and select the Direct3D 9 include & library path (TODO : how?)
|
||||
|
||||
// We're going to use the approach detailed in :
|
||||
// https://blogs.msdn.microsoft.com/chuckw/2015/03/23/the-zombie-directx-sdk/
|
||||
|
||||
|
||||
// For transforming code that's written for Direct3D 8 into Direct3D 9,
|
||||
// See "Converting to Direct3D 9" https://msdn.microsoft.com/en-us/library/windows/desktop/bb204851(v=vs.85).aspx
|
||||
|
||||
// See https://msdn.microsoft.com/en-us/library/windows/desktop/bb204851(v=vs.85).aspx#D3DENUM_NO_WHQL_LEVEL_Changes
|
||||
#define D3DENUM_NO_WHQL_LEVEL 0 // default in Direct3D 9
|
||||
|
||||
// Alias all host Direct3D 9 symbols to generic symbols
|
||||
#define Direct3DCreate Direct3DCreate9
|
||||
#define D3DXAssembleShader D3DXCompileShader
|
||||
#define FullScreen_PresentationInterval PresentationInterval // a field in D3DPRESENT_PARAMETERS
|
||||
|
||||
#define D3DADAPTER_IDENTIFIER D3DADAPTER_IDENTIFIER9
|
||||
#define D3DCAPS D3DCAPS9
|
||||
#define D3DVIEWPORT D3DVIEWPORT9
|
||||
|
||||
#define IDirect3D IDirect3D9
|
||||
#define IDirect3DDevice IDirect3DDevice9
|
||||
//#define IDirect3DStateBlock IDirect3DStateBlock9
|
||||
//#define IDirect3DVertexDeclaration IDirect3DVertexDeclaration9
|
||||
//#define IDirect3DVertexShader IDirect3DVertexShader9
|
||||
//#define IDirect3DPixelShader IDirect3DPixelShader9
|
||||
#define IDirect3DResource IDirect3DResource9
|
||||
#define IDirect3DBaseTexture IDirect3DBaseTexture9
|
||||
#define IDirect3DTexture IDirect3DTexture9
|
||||
#define IDirect3DVolumeTexture IDirect3DVolumeTexture9
|
||||
#define IDirect3DCubeTexture IDirect3DCubeTexture9
|
||||
#define IDirect3DVertexBuffer IDirect3DVertexBuffer9
|
||||
#define IDirect3DIndexBuffer IDirect3DIndexBuffer9
|
||||
#define IDirect3DSurface IDirect3DSurface9
|
||||
#define IDirect3DVolume IDirect3DVolume9
|
||||
#define IDirect3DSwapChain IDirect3DSwapChain9
|
||||
//#define IDirect3DQuery IDirect3DQuery9
|
||||
|
||||
// TODO : Declare these aliasses as Xbox type
|
||||
typedef D3DLIGHT9 X_D3DLIGHT8;
|
||||
typedef D3DMATERIAL9 X_D3DMATERIAL8;
|
||||
typedef D3DVIEWPORT9 X_D3DVIEWPORT8;
|
||||
|
||||
#else
|
||||
|
||||
// include direct3d 8x headers
|
||||
#define DIRECT3D_VERSION 0x0800
|
||||
#include <d3d8.h>
|
||||
#include <d3dx8math.h> // For D3DXVECTOR4, etc
|
||||
#include <d3dx8tex.h>
|
||||
#include <d3d8types.h>
|
||||
#include <dxerr8.h> // For DXGetErrorString8A, DXGetErrorDescription8A
|
||||
|
||||
// Alias all host Direct3D 8 symbols to generic symbols
|
||||
#define Direct3DCreate Direct3DCreate8
|
||||
#define DXGetErrorString DXGetErrorString8A
|
||||
#define DXGetErrorDescription DXGetErrorDescription8A
|
||||
|
||||
#define D3DADAPTER_IDENTIFIER D3DADAPTER_IDENTIFIER8
|
||||
#define D3DCAPS D3DCAPS8
|
||||
#define D3DVIEWPORT D3DVIEWPORT8
|
||||
|
||||
#define IDirect3D IDirect3D8
|
||||
#define IDirect3DDevice IDirect3DDevice8
|
||||
#define IDirect3DResource IDirect3DResource8
|
||||
#define IDirect3DBaseTexture IDirect3DBaseTexture8
|
||||
#define IDirect3DTexture IDirect3DTexture8
|
||||
#define IDirect3DVolumeTexture IDirect3DVolumeTexture8
|
||||
#define IDirect3DCubeTexture IDirect3DCubeTexture8
|
||||
#define IDirect3DVertexBuffer IDirect3DVertexBuffer8
|
||||
#define IDirect3DIndexBuffer IDirect3DIndexBuffer8
|
||||
#define IDirect3DSurface IDirect3DSurface8
|
||||
#define IDirect3DVolume IDirect3DVolume8
|
||||
#define IDirect3DSwapChain IDirect3DSwapChain8
|
||||
|
||||
// TODO : Declare these aliasses as Xbox type
|
||||
typedef D3DLIGHT8 X_D3DLIGHT8;
|
||||
typedef D3DMATERIAL8 X_D3DMATERIAL8;
|
||||
typedef D3DVIEWPORT8 X_D3DVIEWPORT8;
|
||||
|
||||
#endif // Direct3d8
|
||||
|
||||
// TODO: fill out these enumeration tables for convienance
|
||||
typedef D3DSWAPEFFECT X_D3DSWAPEFFECT;
|
||||
typedef D3DXVECTOR4 X_D3DXVECTOR4;
|
||||
typedef DWORD X_D3DBLENDOP;
|
||||
typedef DWORD X_D3DBLEND;
|
||||
typedef DWORD X_D3DCMPFUNC;
|
||||
typedef DWORD X_D3DFILLMODE;
|
||||
typedef DWORD X_D3DMULTISAMPLE_TYPE;
|
||||
typedef DWORD X_D3DSHADEMODE;
|
||||
typedef DWORD X_D3DSTENCILOP;
|
||||
typedef DWORD X_D3DTEXTURESTAGESTATETYPE;
|
||||
|
@ -292,12 +390,13 @@ typedef struct _X_D3DSURFACE_DESC
|
|||
X_D3DRESOURCETYPE Type;
|
||||
DWORD Usage;
|
||||
UINT Size;
|
||||
D3DMULTISAMPLE_TYPE MultiSampleType;
|
||||
X_D3DMULTISAMPLE_TYPE MultiSampleType;
|
||||
UINT Width;
|
||||
UINT Height;
|
||||
}
|
||||
X_D3DSURFACE_DESC;
|
||||
|
||||
struct X_D3DSurface; // forward
|
||||
typedef struct _X_D3DPRESENT_PARAMETERS
|
||||
{
|
||||
UINT BackBufferWidth;
|
||||
|
@ -305,9 +404,9 @@ typedef struct _X_D3DPRESENT_PARAMETERS
|
|||
X_D3DFORMAT BackBufferFormat;
|
||||
UINT BackBufferCount;
|
||||
|
||||
D3DMULTISAMPLE_TYPE MultiSampleType;
|
||||
X_D3DMULTISAMPLE_TYPE MultiSampleType;
|
||||
|
||||
D3DSWAPEFFECT SwapEffect;
|
||||
X_D3DSWAPEFFECT SwapEffect;
|
||||
HWND hDeviceWindow;
|
||||
BOOL Windowed;
|
||||
BOOL EnableAutoDepthStencil;
|
||||
|
@ -319,8 +418,8 @@ typedef struct _X_D3DPRESENT_PARAMETERS
|
|||
// The Windows DirectX8 variant ends here
|
||||
// This check guarantees identical layout, compared to Direct3D8._D3DPRESENT_PARAMETERS_:
|
||||
// assert(offsetof(X_D3DPRESENT_PARAMETERS, BufferSurfaces) == sizeof(_D3DPRESENT_PARAMETERS_));
|
||||
IDirect3DSurface8 *BufferSurfaces[3];
|
||||
IDirect3DSurface8 *DepthStencilSurface;
|
||||
X_D3DSurface *BufferSurfaces[3];
|
||||
X_D3DSurface *DepthStencilSurface;
|
||||
}
|
||||
X_D3DPRESENT_PARAMETERS;
|
||||
|
||||
|
@ -332,8 +431,6 @@ typedef struct _X_D3DGAMMARAMP
|
|||
}
|
||||
X_D3DGAMMARAMP;
|
||||
|
||||
#define X_PIXELSHADER_FAKE_HANDLE 0xDEADBEEF
|
||||
|
||||
struct X_D3DVertexShader
|
||||
{
|
||||
union
|
||||
|
|
|
@ -37,7 +37,6 @@
|
|||
#undef FIELD_OFFSET // prevent macro redefinition warnings
|
||||
|
||||
#include <dsound.h>
|
||||
#include <d3dx8math.h>
|
||||
#include "CxbxKrnl.h"
|
||||
#include "Emu.h"
|
||||
|
||||
|
|
|
@ -54,7 +54,7 @@ namespace XTL
|
|||
#include "EmuXInput.h"
|
||||
}
|
||||
|
||||
extern XTL::LPDIRECT3DDEVICE8 g_pD3DDevice8;
|
||||
extern XTL::IDirect3DDevice *g_pD3DDevice;
|
||||
extern DWORD g_CurrentXboxVertexShaderHandle;
|
||||
extern XTL::X_PixelShader* g_D3DActivePixelShader;
|
||||
extern BOOL g_bIsFauxFullscreen;
|
||||
|
|
|
@ -34,8 +34,6 @@
|
|||
#ifndef EMUXAPI_H
|
||||
#define EMUXAPI_H
|
||||
|
||||
#include <dxerr8.h>
|
||||
|
||||
// ******************************************************************
|
||||
// * calling conventions
|
||||
// ******************************************************************
|
||||
|
|
Loading…
Reference in New Issue