From: MichaÅ CichoÅ <th...@us...> - 2012-11-04 14:00:21
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Allegro". The branch, 5.1 has been updated via fde5515823478436f61d25dcd53d0d76bdb08eed (commit) from 1fb007f5690f9581fb64b1fe960fe7164549e93f (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit fde5515823478436f61d25dcd53d0d76bdb08eed Author: MichaÅ CichoÅ <th...@us...> Date: Sun Nov 4 15:00:02 2012 +0100 Replace magic values and replace them with constants. ----------------------------------------------------------------------- Summary of changes: addons/shader/shader_hlsl.cpp | 22 ++++++++++++---------- 1 files changed, 12 insertions(+), 10 deletions(-) diff --git a/addons/shader/shader_hlsl.cpp b/addons/shader/shader_hlsl.cpp index 00ac537..67d581a 100644 --- a/addons/shader/shader_hlsl.cpp +++ b/addons/shader/shader_hlsl.cpp @@ -16,6 +16,17 @@ ALLEGRO_DEBUG_CHANNEL("shader") +// DXSDK redistributable install d3dx9_xx.dll from version +// 24 to 43. It's unlikely that any new version will come, +// since HLSL compiler was moved to D3DCompiler_xx.dll and +// most recent versions of this utility library are bound +// to DirectX 11. +// +// However, if any new version appears anyway, this range +// should be changed. +#define D3DX9_MIN_VERSION 24 +#define D3DX9_MAX_VERSION 43 + typedef HRESULT (WINAPI *D3DXCREATEEFFECTPROC)(LPDIRECT3DDEVICE9, LPCVOID, UINT, CONST D3DXMACRO*, LPD3DXINCLUDE, DWORD, LPD3DXEFFECTPOOL, LPD3DXEFFECT*, LPD3DXBUFFER*); @@ -119,16 +130,7 @@ static bool _imp_load_d3dx9_module() } // Iterate over all valid versions. - // - // DXSDK redistributable install d3dx9_xx.dll from version - // 24 to 43. It's unlikely that any new version will come, - // since HLSL compiler was moved to D3DCompiler_xx.dll and - // most recent versions of this utility library are bound - // to DirectX 11. - // - // However, if any new version appears anyway, range in this - // loop should be changed. - for (version = 43; version >= 24; version--) + for (version = D3DX9_MAX_VERSION; version >= D3DX9_MIN_VERSION; version--) if (_imp_load_d3dx9_module_version((int)version)) return true; hooks/post-receive -- Allegro |