├── .gitignore ├── source ├── resources │ └── VersionInfo.rc ├── VersionInfo.lua ├── d3dx9.def ├── D3DXMatrix.cpp └── Exports.cpp ├── LICENSE ├── README.md └── premake5.lua /.gitignore: -------------------------------------------------------------------------------- 1 | /build/ 2 | -------------------------------------------------------------------------------- /source/resources/VersionInfo.rc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CookiePLMonster/SilentPatchME/HEAD/source/resources/VersionInfo.rc -------------------------------------------------------------------------------- /source/VersionInfo.lua: -------------------------------------------------------------------------------- 1 | defines { 2 | "rsc_FullName=\"SilentPatch for Mass Effect\"", 3 | "rsc_MinorVersion=0", 4 | "rsc_RevisionID=2", 5 | "rsc_BuildID=0", 6 | "rsc_Copyright=\"2020\"", 7 | "rsc_UpdateURL=\"https://github.com/CookiePLMonster/SilentPatchME/releases\"" 8 | } -------------------------------------------------------------------------------- /source/d3dx9.def: -------------------------------------------------------------------------------- 1 | LIBRARY D3DX9_31 2 | EXPORTS 3 | D3DXUVAtlasCreate=D3DXUVAtlasCreate_Export 4 | D3DXWeldVertices=D3DXUVAtlasCreate_Export 5 | D3DXSimplifyMesh=D3DXSimplifyMesh_Export 6 | D3DXDebugMute=D3DXDebugMute_Export 7 | D3DXCleanMesh=D3DXCleanMesh_Export 8 | D3DXDisassembleShader=D3DXDisassembleShader_Export 9 | D3DXCompileShader=D3DXCompileShader_Export 10 | D3DXAssembleShader=D3DXAssembleShader_Export 11 | D3DXLoadSurfaceFromMemory=D3DXLoadSurfaceFromMemory_Export 12 | D3DXPreprocessShader=D3DXPreprocessShader_Export 13 | D3DXCreateMesh=D3DXCreateMesh_Export 14 | 15 | D3DXMatrixInverse=D3DXMatrixInverse_XM -------------------------------------------------------------------------------- /source/D3DXMatrix.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | // D3DX Matrix functions implemented in the means of DirectXMath 6 | 7 | using namespace DirectX; 8 | 9 | D3DXMATRIX* WINAPI D3DXMatrixInverse_XM(D3DXMATRIX *pOut, FLOAT *pDeterminant, CONST D3DXMATRIX *pM) 10 | { 11 | XMVECTOR determinant; 12 | const XMMATRIX out = XMMatrixInverse(&determinant, XMMATRIX(static_cast(*pM))); 13 | const float det = XMVectorGetX(determinant); 14 | 15 | // Mirror the behaviour of D3DXMatrixInverse 16 | if (det == 0.0f || !std::isfinite(1.0f / det)) 17 | { 18 | return nullptr; 19 | } 20 | 21 | if (pDeterminant != nullptr) 22 | { 23 | *pDeterminant = det; 24 | } 25 | *pOut = *reinterpret_cast(&out); 26 | return pOut; 27 | } -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2020 Adrian Zdanowicz (Silent) 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # SilentPatch for Mass Effect 2 | 3 | **Mass Effect** is a popular franchise of sci-fi roleplaying games. The first game was initially released by BioWare in late 2007 on Xbox 360 exclusively as a part of a publishing deal with Microsoft. 4 | A few months later in mid-2008, the game received PC port developed by Demiurge Studios. It was a decent port with no obvious flaws, that is until 2011 when AMD released their new Bulldozer-based CPUs. 5 | When playing the game on PCs with modern AMD processors, two areas in the game (Noveria and Ilos) show severe graphical artifacts. 6 | 7 | SilentPatch diagnoses those issues and provides a definite fix, bringing complete visual parity between Intel and AMD CPUs. 8 | 9 | ## Featured fixes 10 | 11 | * Fixed an issue causing black blobs to appear with contemporary AMD CPUs. **Warning: AMD FX and Bulldozer chips are still affected. We are investigating the issue.** 12 | 13 | ## Credits 14 | 15 | * [Rafael Rivera](https://withinrafael.com/) - co-developer 16 | 17 | ![preview](https://i.imgur.com/jc8j6Ax.jpg) 18 | 19 | ## Related reads 20 | * [Fixing Mass Effect black blobs on modern AMD CPUs](https://cookieplmonster.github.io/2020/07/19/silentpatch-mass-effect/) - my comprehensive writeup about this issue and the steps taken to fix it -------------------------------------------------------------------------------- /premake5.lua: -------------------------------------------------------------------------------- 1 | workspace "SilentPatchME" 2 | platforms { "Win32" } 3 | 4 | project "SilentPatchME" 5 | kind "SharedLib" 6 | targetextension ".dll" 7 | language "C++" 8 | targetname "d3dx9_31" 9 | 10 | include "source/VersionInfo.lua" 11 | 12 | -- Include DX SDK in include paths 13 | includedirs { "$(DXSDK_DIR)/Include" } 14 | 15 | 16 | workspace "*" 17 | configurations { "Debug", "Release", "Master" } 18 | location "build" 19 | 20 | vpaths { ["Headers/*"] = "source/**.h", 21 | ["Sources/*"] = { "source/**.c", "source/**.cpp" }, 22 | ["Resources"] = "source/**.rc" 23 | } 24 | 25 | files { "source/*.h", "source/*.cpp", "source/resources/*.rc", "source/*.def" } 26 | 27 | -- Disable exceptions in WIL 28 | defines { "WIL_SUPPRESS_EXCEPTIONS" } 29 | 30 | cppdialect "C++17" 31 | staticruntime "on" 32 | buildoptions { "/sdl" } 33 | warnings "Extra" 34 | 35 | -- Automated defines for resources 36 | defines { "rsc_Extension=\"%{prj.targetextension}\"", 37 | "rsc_Name=\"%{prj.name}\"" } 38 | 39 | filter "configurations:Debug" 40 | defines { "DEBUG" } 41 | runtime "Debug" 42 | 43 | filter "configurations:Master" 44 | defines { "NDEBUG" } 45 | symbols "Off" 46 | 47 | filter "configurations:not Debug" 48 | optimize "Speed" 49 | functionlevellinking "on" 50 | flags { "LinkTimeOptimization" } 51 | 52 | filter { "platforms:Win32" } 53 | system "Windows" 54 | architecture "x86" 55 | 56 | filter { "platforms:Win64" } 57 | system "Windows" 58 | architecture "x86_64" 59 | 60 | filter { "toolset:*_xp"} 61 | defines { "WINVER=0x0501", "_WIN32_WINNT=0x0501" } -- Target WinXP 62 | buildoptions { "/Zc:threadSafeInit-" } 63 | 64 | filter { "toolset:not *_xp"} 65 | defines { "WINVER=0x0601", "_WIN32_WINNT=0x0601" } -- Target Win7 66 | buildoptions { "/permissive-" } -------------------------------------------------------------------------------- /source/Exports.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | #pragma comment(lib, "Shlwapi.lib") 6 | 7 | // These exports implement a bare minimum required for Mass Effect 8 | // In the case where this wrapper is needed for a different game, 9 | // extending this file and the .def file with more exports should be enough. 10 | 11 | // Init functions declarations 12 | static decltype(D3DXUVAtlasCreate) D3DXUVAtlasCreate_init; 13 | static decltype(D3DXWeldVertices) D3DXWeldVertices_init; 14 | static decltype(D3DXSimplifyMesh) D3DXSimplifyMesh_init; 15 | static decltype(D3DXDebugMute) D3DXDebugMute_init; 16 | static decltype(D3DXCleanMesh) D3DXCleanMesh_init; 17 | static decltype(D3DXDisassembleShader) D3DXDisassembleShader_init; 18 | static decltype(D3DXCompileShader) D3DXCompileShader_init; 19 | static decltype(D3DXAssembleShader) D3DXAssembleShader_init; 20 | static decltype(D3DXLoadSurfaceFromMemory) D3DXLoadSurfaceFromMemory_init; 21 | static decltype(D3DXPreprocessShader) D3DXPreprocessShader_init; 22 | static decltype(D3DXCreateMesh) D3DXCreateMesh_init; 23 | 24 | 25 | // Export function pointers 26 | auto pD3DXUVAtlasCreate = D3DXUVAtlasCreate_init; 27 | auto pD3DXWeldVertices = D3DXWeldVertices_init; 28 | auto pD3DXSimplifyMesh = D3DXSimplifyMesh_init; 29 | auto pD3DXDebugMute = D3DXDebugMute_init; 30 | auto pD3DXCleanMesh = D3DXCleanMesh_init; 31 | auto pD3DXDisassembleShader = D3DXDisassembleShader_init; 32 | auto pD3DXCompileShader = D3DXCompileShader_init; 33 | auto pD3DXAssembleShader = D3DXAssembleShader_init; 34 | auto pD3DXLoadSurfaceFromMemory = D3DXLoadSurfaceFromMemory_init; 35 | auto pD3DXPreprocessShader = D3DXPreprocessShader_init; 36 | auto pD3DXCreateMesh = D3DXCreateMesh_init; 37 | 38 | 39 | // Init function 40 | std::once_flag initFlag; 41 | static void D3DX_InitExports() 42 | { 43 | std::call_once(initFlag, [] { 44 | wchar_t dllPath[MAX_PATH]; 45 | GetSystemDirectoryW(dllPath, MAX_PATH); 46 | PathAppendW(dllPath, L"d3dx9_31.dll"); 47 | 48 | HMODULE d3dx9 = LoadLibraryW(dllPath); 49 | if (d3dx9 == nullptr) 50 | { 51 | // Everything will be broken, don't bother recovering 52 | std::terminate(); 53 | } 54 | 55 | pD3DXUVAtlasCreate = reinterpret_cast(GetProcAddress(d3dx9, "D3DXUVAtlasCreate")); 56 | pD3DXWeldVertices = reinterpret_cast(GetProcAddress(d3dx9, "D3DXWeldVertices")); 57 | pD3DXSimplifyMesh = reinterpret_cast(GetProcAddress(d3dx9, "D3DXSimplifyMesh")); 58 | pD3DXDebugMute = reinterpret_cast(GetProcAddress(d3dx9, "D3DXDebugMute")); 59 | pD3DXCleanMesh = reinterpret_cast(GetProcAddress(d3dx9, "D3DXCleanMesh")); 60 | pD3DXDisassembleShader = reinterpret_cast(GetProcAddress(d3dx9, "D3DXDisassembleShader")); 61 | pD3DXCompileShader = reinterpret_cast(GetProcAddress(d3dx9, "D3DXCompileShader")); 62 | pD3DXAssembleShader = reinterpret_cast(GetProcAddress(d3dx9, "D3DXAssembleShader")); 63 | pD3DXLoadSurfaceFromMemory = reinterpret_cast(GetProcAddress(d3dx9, "D3DXLoadSurfaceFromMemory")); 64 | pD3DXPreprocessShader = reinterpret_cast(GetProcAddress(d3dx9, "D3DXPreprocessShader")); 65 | pD3DXCreateMesh = reinterpret_cast(GetProcAddress(d3dx9, "D3DXCreateMesh")); 66 | 67 | // Leak the DLL handle deliberately 68 | }); 69 | } 70 | 71 | 72 | // Init functions definitions 73 | static HRESULT WINAPI D3DXUVAtlasCreate_init(LPD3DXMESH pMesh, UINT uMaxChartNumber, FLOAT fMaxStretch, UINT uWidth, UINT uHeight, FLOAT fGutter, DWORD dwTextureIndex, 74 | CONST DWORD *pdwAdjacency, CONST DWORD *pdwFalseEdgeAdjacency, CONST FLOAT *pfIMTArray, LPD3DXUVATLASCB pStatusCallback, FLOAT fCallbackFrequency, 75 | LPVOID pUserContext, DWORD dwOptions, LPD3DXMESH *ppMeshOut, LPD3DXBUFFER *ppFacePartitioning, LPD3DXBUFFER *ppVertexRemapArray, FLOAT *pfMaxStretchOut, UINT *puNumChartsOut) 76 | { 77 | D3DX_InitExports(); 78 | return pD3DXUVAtlasCreate(pMesh, uMaxChartNumber, fMaxStretch, uWidth, uHeight, fGutter, dwTextureIndex, pdwAdjacency, pdwFalseEdgeAdjacency, pfIMTArray, pStatusCallback, 79 | fCallbackFrequency, pUserContext, dwOptions, ppMeshOut, ppFacePartitioning, ppVertexRemapArray, pfMaxStretchOut, puNumChartsOut); 80 | } 81 | 82 | static HRESULT WINAPI D3DXWeldVertices_init(LPD3DXMESH pMesh, DWORD Flags, CONST D3DXWELDEPSILONS *pEpsilons, CONST DWORD *pAdjacencyIn, DWORD *pAdjacencyOut, DWORD *pFaceRemap, LPD3DXBUFFER *ppVertexRemap) 83 | { 84 | D3DX_InitExports(); 85 | return pD3DXWeldVertices(pMesh, Flags, pEpsilons, pAdjacencyIn, pAdjacencyOut, pFaceRemap, ppVertexRemap); 86 | } 87 | 88 | static HRESULT WINAPI D3DXSimplifyMesh_init(LPD3DXMESH pMesh, CONST DWORD* pAdjacency, CONST D3DXATTRIBUTEWEIGHTS *pVertexAttributeWeights, CONST FLOAT *pVertexWeights, DWORD MinValue, 89 | DWORD Options, LPD3DXMESH* ppMesh) 90 | { 91 | D3DX_InitExports(); 92 | return pD3DXSimplifyMesh(pMesh, pAdjacency, pVertexAttributeWeights, pVertexWeights, MinValue, Options, ppMesh); 93 | } 94 | 95 | static BOOL WINAPI D3DXDebugMute_init(BOOL Mute) 96 | { 97 | D3DX_InitExports(); 98 | return pD3DXDebugMute(Mute); 99 | } 100 | 101 | static HRESULT WINAPI D3DXCleanMesh_init(D3DXCLEANTYPE CleanType, LPD3DXMESH pMeshIn, CONST DWORD* pAdjacencyIn, LPD3DXMESH* ppMeshOut, DWORD* pAdjacencyOut, LPD3DXBUFFER* ppErrorsAndWarnings) 102 | { 103 | D3DX_InitExports(); 104 | return pD3DXCleanMesh(CleanType, pMeshIn, pAdjacencyIn, ppMeshOut, pAdjacencyOut, ppErrorsAndWarnings); 105 | } 106 | 107 | static HRESULT WINAPI D3DXDisassembleShader_init(CONST DWORD* pShader, BOOL EnableColorCode, LPCSTR pComments, LPD3DXBUFFER* ppDisassembly) 108 | { 109 | D3DX_InitExports(); 110 | return pD3DXDisassembleShader(pShader, EnableColorCode, pComments, ppDisassembly); 111 | } 112 | 113 | static HRESULT WINAPI D3DXCompileShader_init(LPCSTR pSrcData, UINT SrcDataLen, CONST D3DXMACRO* pDefines, LPD3DXINCLUDE pInclude, LPCSTR pFunctionName, LPCSTR pProfile, DWORD Flags, LPD3DXBUFFER* ppShader, 114 | LPD3DXBUFFER* ppErrorMsgs, LPD3DXCONSTANTTABLE* ppConstantTable) 115 | { 116 | D3DX_InitExports(); 117 | return pD3DXCompileShader(pSrcData, SrcDataLen, pDefines, pInclude, pFunctionName, pProfile, Flags, ppShader, ppErrorMsgs, ppConstantTable); 118 | } 119 | 120 | static HRESULT WINAPI D3DXAssembleShader_init(LPCSTR pSrcData, UINT SrcDataLen, CONST D3DXMACRO* pDefines, LPD3DXINCLUDE pInclude, DWORD Flags, LPD3DXBUFFER* ppShader, LPD3DXBUFFER* ppErrorMsgs) 121 | { 122 | D3DX_InitExports(); 123 | return pD3DXAssembleShader(pSrcData, SrcDataLen, pDefines, pInclude, Flags, ppShader, ppErrorMsgs); 124 | } 125 | 126 | static HRESULT WINAPI D3DXLoadSurfaceFromMemory_init(LPDIRECT3DSURFACE9 pDestSurface, CONST PALETTEENTRY* pDestPalette, CONST RECT* pDestRect, LPCVOID pSrcMemory, D3DFORMAT SrcFormat, UINT SrcPitch, 127 | CONST PALETTEENTRY* pSrcPalette, CONST RECT* pSrcRect, DWORD Filter, D3DCOLOR ColorKey) 128 | { 129 | D3DX_InitExports(); 130 | return pD3DXLoadSurfaceFromMemory(pDestSurface, pDestPalette, pDestRect, pSrcMemory, SrcFormat, SrcPitch, pSrcPalette, pSrcRect, Filter, ColorKey); 131 | } 132 | 133 | static HRESULT WINAPI D3DXPreprocessShader_init(LPCSTR pSrcData, UINT SrcDataSize, CONST D3DXMACRO* pDefines, LPD3DXINCLUDE pInclude, LPD3DXBUFFER* ppShaderText, LPD3DXBUFFER* ppErrorMsgs) 134 | { 135 | D3DX_InitExports(); 136 | return pD3DXPreprocessShader(pSrcData, SrcDataSize, pDefines, pInclude, ppShaderText, ppErrorMsgs); 137 | } 138 | 139 | static HRESULT WINAPI D3DXCreateMesh_init(DWORD NumFaces, DWORD NumVertices, DWORD Options, CONST D3DVERTEXELEMENT9 *pDeclaration, LPDIRECT3DDEVICE9 pD3DDevice, LPD3DXMESH* ppMesh) 140 | { 141 | D3DX_InitExports(); 142 | return pD3DXCreateMesh(NumFaces, NumVertices, Options, pDeclaration, pD3DDevice, ppMesh); 143 | } 144 | 145 | 146 | // Exports 147 | HRESULT WINAPI D3DXUVAtlasCreate_Export(LPD3DXMESH pMesh, UINT uMaxChartNumber, FLOAT fMaxStretch, UINT uWidth, UINT uHeight, FLOAT fGutter, DWORD dwTextureIndex, 148 | CONST DWORD *pdwAdjacency, CONST DWORD *pdwFalseEdgeAdjacency, CONST FLOAT *pfIMTArray, LPD3DXUVATLASCB pStatusCallback, FLOAT fCallbackFrequency, 149 | LPVOID pUserContext, DWORD dwOptions, LPD3DXMESH *ppMeshOut, LPD3DXBUFFER *ppFacePartitioning, LPD3DXBUFFER *ppVertexRemapArray, FLOAT *pfMaxStretchOut, UINT *puNumChartsOut) 150 | { 151 | return pD3DXUVAtlasCreate(pMesh, uMaxChartNumber, fMaxStretch, uWidth, uHeight, fGutter, dwTextureIndex, pdwAdjacency, pdwFalseEdgeAdjacency, pfIMTArray, pStatusCallback, 152 | fCallbackFrequency, pUserContext, dwOptions, ppMeshOut, ppFacePartitioning, ppVertexRemapArray, pfMaxStretchOut, puNumChartsOut); 153 | } 154 | 155 | HRESULT WINAPI D3DXWeldVertices_Export(LPD3DXMESH pMesh, DWORD Flags, CONST D3DXWELDEPSILONS *pEpsilons, CONST DWORD *pAdjacencyIn, DWORD *pAdjacencyOut, DWORD *pFaceRemap, LPD3DXBUFFER *ppVertexRemap) 156 | { 157 | return pD3DXWeldVertices(pMesh, Flags, pEpsilons, pAdjacencyIn, pAdjacencyOut, pFaceRemap, ppVertexRemap); 158 | } 159 | 160 | HRESULT WINAPI D3DXSimplifyMesh_Export(LPD3DXMESH pMesh, CONST DWORD* pAdjacency, CONST D3DXATTRIBUTEWEIGHTS *pVertexAttributeWeights, CONST FLOAT *pVertexWeights, DWORD MinValue, 161 | DWORD Options, LPD3DXMESH* ppMesh) 162 | { 163 | return pD3DXSimplifyMesh(pMesh, pAdjacency, pVertexAttributeWeights, pVertexWeights, MinValue, Options, ppMesh); 164 | } 165 | 166 | BOOL WINAPI D3DXDebugMute_Export(BOOL Mute) 167 | { 168 | return pD3DXDebugMute(Mute); 169 | } 170 | 171 | HRESULT WINAPI D3DXCleanMesh_Export(D3DXCLEANTYPE CleanType, LPD3DXMESH pMeshIn, CONST DWORD* pAdjacencyIn, LPD3DXMESH* ppMeshOut, DWORD* pAdjacencyOut, LPD3DXBUFFER* ppErrorsAndWarnings) 172 | { 173 | return pD3DXCleanMesh(CleanType, pMeshIn, pAdjacencyIn, ppMeshOut, pAdjacencyOut, ppErrorsAndWarnings); 174 | } 175 | 176 | HRESULT WINAPI D3DXDisassembleShader_Export(CONST DWORD* pShader, BOOL EnableColorCode, LPCSTR pComments, LPD3DXBUFFER* ppDisassembly) 177 | { 178 | return pD3DXDisassembleShader(pShader, EnableColorCode, pComments, ppDisassembly); 179 | } 180 | 181 | HRESULT WINAPI D3DXCompileShader_Export(LPCSTR pSrcData, UINT SrcDataLen, CONST D3DXMACRO* pDefines, LPD3DXINCLUDE pInclude, LPCSTR pFunctionName, LPCSTR pProfile, DWORD Flags, LPD3DXBUFFER* ppShader, 182 | LPD3DXBUFFER* ppErrorMsgs, LPD3DXCONSTANTTABLE* ppConstantTable) 183 | { 184 | return pD3DXCompileShader(pSrcData, SrcDataLen, pDefines, pInclude, pFunctionName, pProfile, Flags, ppShader, ppErrorMsgs, ppConstantTable); 185 | } 186 | 187 | HRESULT WINAPI D3DXAssembleShader_Export(LPCSTR pSrcData, UINT SrcDataLen, CONST D3DXMACRO* pDefines, LPD3DXINCLUDE pInclude, DWORD Flags, LPD3DXBUFFER* ppShader, LPD3DXBUFFER* ppErrorMsgs) 188 | { 189 | return pD3DXAssembleShader(pSrcData, SrcDataLen, pDefines, pInclude, Flags, ppShader, ppErrorMsgs); 190 | } 191 | 192 | HRESULT WINAPI D3DXLoadSurfaceFromMemory_Export(LPDIRECT3DSURFACE9 pDestSurface, CONST PALETTEENTRY* pDestPalette, CONST RECT* pDestRect, LPCVOID pSrcMemory, D3DFORMAT SrcFormat, UINT SrcPitch, 193 | CONST PALETTEENTRY* pSrcPalette, CONST RECT* pSrcRect, DWORD Filter, D3DCOLOR ColorKey) 194 | { 195 | return pD3DXLoadSurfaceFromMemory(pDestSurface, pDestPalette, pDestRect, pSrcMemory, SrcFormat, SrcPitch, pSrcPalette, pSrcRect, Filter, ColorKey); 196 | } 197 | 198 | HRESULT WINAPI D3DXPreprocessShader_Export(LPCSTR pSrcData, UINT SrcDataSize, CONST D3DXMACRO* pDefines, LPD3DXINCLUDE pInclude, LPD3DXBUFFER* ppShaderText, LPD3DXBUFFER* ppErrorMsgs) 199 | { 200 | return pD3DXPreprocessShader(pSrcData, SrcDataSize, pDefines, pInclude, ppShaderText, ppErrorMsgs); 201 | } 202 | 203 | HRESULT WINAPI D3DXCreateMesh_Export(DWORD NumFaces, DWORD NumVertices, DWORD Options, CONST D3DVERTEXELEMENT9 *pDeclaration, LPDIRECT3DDEVICE9 pD3DDevice, LPD3DXMESH* ppMesh) 204 | { 205 | return pD3DXCreateMesh(NumFaces, NumVertices, Options, pDeclaration, pD3DDevice, ppMesh); 206 | } --------------------------------------------------------------------------------