--- Begin Message ---
Implementation of the simple D3DXCreateTextureFromFile functions in
relation to the Extended functions
---
dlls/d3dx8/Makefile.in | 1 +
dlls/d3dx8/d3dx8.spec | 8 ++--
dlls/d3dx8/texture.c | 86
++++++++++++++++++++++++++++++++++++++++++++++++
include/d3dx8.h | 1 +
include/d3dx8texture.h | 43 ++++++++++++++++++++++++
5 files changed, 135 insertions(+), 4 deletions(-)
create mode 100644 dlls/d3dx8/texture.c
create mode 100644 include/d3dx8texture.h
diff --git a/dlls/d3dx8/Makefile.in b/dlls/d3dx8/Makefile.in
index cbee6e5..d56807e 100644
--- a/dlls/d3dx8/Makefile.in
+++ b/dlls/d3dx8/Makefile.in
@@ -10,6 +10,7 @@ EXTRALIBS = -ldxguid -luuid
C_SRCS = \
d3dx8_main.c \
d3dxbuffer.c \
+ texture.c \
math.c
@MAKE_DLL_RULES@
diff --git a/dlls/d3dx8/d3dx8.spec b/dlls/d3dx8/d3dx8.spec
index 0ccfdf2..929fe0a 100644
--- a/dlls/d3dx8/d3dx8.spec
+++ b/dlls/d3dx8/d3dx8.spec
@@ -129,12 +129,12 @@
@ stub D3DXLoadVolumeFromMemory
@ stub D3DXCheckTextureRequirements
@ stub D3DXCreateTexture
-@ stub D3DXCreateTextureFromFileA
-@ stub D3DXCreateTextureFromFileW
+@ stdcall D3DXCreateTextureFromFileA(ptr ptr ptr)
+@ stdcall D3DXCreateTextureFromFileW(ptr ptr ptr)
@ stub D3DXCreateTextureFromResourceA
@ stub D3DXCreateTextureFromResourceW
-@ stub D3DXCreateTextureFromFileExA
-@ stub D3DXCreateTextureFromFileExW
+@ stdcall D3DXCreateTextureFromFileExA(ptr ptr long long long long ptr ptr long long ptr ptr ptr ptr)
+@ stdcall D3DXCreateTextureFromFileExW(ptr ptr long long long long ptr ptr long long ptr ptr ptr ptr)
@ stub D3DXCreateTextureFromResourceExA
@ stub D3DXCreateTextureFromResourceExW
@ stub D3DXCreateTextureFromFileInMemory
diff --git a/dlls/d3dx8/texture.c b/dlls/d3dx8/texture.c
new file mode 100644
index 0000000..fd98f76
--- /dev/null
+++ b/dlls/d3dx8/texture.c
@@ -0,0 +1,86 @@
+/*
+ * Direct3D X 8 texture file
+ *
+ * Copyright (C) 2008 Luis C. Busquets Pérez
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ *
+ */
+
+#include "config.h"
+#include "wine/port.h"
+#include <stdarg.h>
+#include "windef.h"
+#include "winbase.h"
+#include "wingdi.h"
+#include "winuser.h"
+#include "wine/debug.h"
+#include "d3dx8_private.h"
+
+WINE_DEFAULT_DEBUG_CHANNEL(d3d);
+
+HRESULT WINAPI D3DXCreateTextureFromFileExW(LPDIRECT3DDEVICE8 pDevice,
+ LPWSTR pSrcFile,
+ UINT Width,
+ UINT Height,
+ UINT MipLevels,
+ DWORD Usage,
+ D3DFORMAT Format,
+ D3DPOOL Pool,
+ DWORD Filter,
+ DWORD MipFilter,
+ D3DCOLOR ColorKey,
+ D3DXIMAGE_INFO *pSrcInfo,
+ PALETTEENTRY *pPalette,
+ LPDIRECT3DTEXTURE8 *ppTexture)
+{
+ FIXME("(void): stub\n");
+ return D3D_OK;
+}
+
+HRESULT WINAPI D3DXCreateTextureFromFileW(LPDIRECT3DDEVICE8 pDevice,
+ LPWSTR pSrcFile,
+ LPDIRECT3DTEXTURE8 *ppTexture)
+{
+ return D3DXCreateTextureFromFileExW(pDevice, pSrcFile, 0, 0, 0, 0, 1, 0, 0, 0, 0, NULL,NULL, ppTexture);
+}
+
+HRESULT WINAPI D3DXCreateTextureFromFileExA(LPDIRECT3DDEVICE8 pDevice,
+ LPSTR pSrcFile,
+ UINT Width,
+ UINT Height,
+ UINT MipLevels,
+ DWORD Usage,
+ D3DFORMAT Format,
+ D3DPOOL Pool,
+ DWORD Filter,
+ DWORD MipFilter,
+ D3DCOLOR ColorKey,
+ D3DXIMAGE_INFO *pSrcInfo,
+ PALETTEENTRY *pPalette,
+ LPDIRECT3DTEXTURE8 *ppTexture)
+{
+ FIXME("(void): stub\n");
+ return D3D_OK;
+}
+
+HRESULT WINAPI D3DXCreateTextureFromFileA(LPDIRECT3DDEVICE8 pDevice,
+ LPSTR pSrcFile,
+ LPDIRECT3DTEXTURE8 *ppTexture)
+{
+ return D3DXCreateTextureFromFileExA(pDevice, pSrcFile, 0, 0, 0, 0, 1, 0, 0, 0, 0, NULL,NULL, ppTexture);
+}
+
+
diff --git a/include/d3dx8.h b/include/d3dx8.h
index 52ddaf3..e446a56 100644
--- a/include/d3dx8.h
+++ b/include/d3dx8.h
@@ -24,5 +24,6 @@
#include <d3dx8math.h>
#include <d3dx8core.h>
+#include <d3dx8texture.h>
#endif
diff --git a/include/d3dx8texture.h b/include/d3dx8texture.h
new file mode 100644
index 0000000..3167edf
--- /dev/null
+++ b/include/d3dx8texture.h
@@ -0,0 +1,43 @@
+/*
+ * Copyright (C) 2008 Luis C. Busquets Pérez
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+typedef enum D3DXIMAGE_FILEFORMAT
+{
+ D3DXIFF_BMP = 0,
+ D3DXIFF_JPG = 1,
+ D3DXIFF_TGA = 2,
+ D3DXIFF_PNG = 3,
+ D3DXIFF_DDS = 4,
+ D3DXIFF_PPM = 5,
+ D3DXIFF_DIB = 6,
+ D3DXIFF_HDR = 7,
+ D3DXIFF_PFM = 8,
+ D3DXIFF_FORCE_DWORD = 0x7fffffff,
+} D3DXIMAGE_FILEFORMAT, *LPD3DXIMAGE_FILEFORMAT;
+
+typedef struct _D3DXIMAGE_INFO {
+ UINT Width;
+ UINT Height;
+ UINT Depth;
+ UINT MipLevels;
+ D3DFORMAT Format;
+ D3DRESOURCETYPE ResourceType;
+ D3DXIMAGE_FILEFORMAT ImageFileFormat;
+} D3DXIMAGE_INFO;
+
+
--- End Message ---