Re: [Fwd: d3dx8: Implement D3DXCreateTextureFromFile]

2008-02-04 Thread Luis C. Busquets Pérez

Why has this patch not been accepted?
Luis C. Busquets Pérez escribió:
> I have created a /dlls/d3dx8/texture.c file where to put all functions 
> related to textures and d3dx8.
>
> I have included D3DXIMAGE_FILEFORMAT in the patch because it is 
> referred by D3DXIMAGE_FILEFORMAT which is referred in the function. If 
> not included, it would not compile. They both are now in 
> /include/d3dx8.h whci I think is the appropiate file. Do you propose 
> to put them elsewhere?
>
> Do you think I am missing anything or is it ok?





RE : [Fwd: d3dx8: Implement D3DXCreateTextureFromFile]

2008-01-27 Thread paulo lesgaz
The real file is d3dx8tex.h and not d3dx8texture.h.  You need to use the same 
name as windows uses.

David

"Luis C. Busquets Pérez" <[EMAIL PROTECTED]> a écrit : I have created a 
/dlls/d3dx8/texture.c file where to put all functions 
related to textures and d3dx8.

I have included D3DXIMAGE_FILEFORMAT in the patch because it is referred 
by D3DXIMAGE_FILEFORMAT which is referred in the function. If not 
included, it would not compile. They both are now in /include/d3dx8.h 
whci I think is the appropiate file. Do you propose to put them elsewhere?

Do you think I am missing anything or is it ok?




 
-
 Ne gardez plus qu'une seule adresse mail ! Copiez vos mails vers Yahoo! Mail 


[Fwd: d3dx8: Implement D3DXCreateTextureFromFile]

2008-01-27 Thread Luis C. Busquets Pérez
I have created a /dlls/d3dx8/texture.c file where to put all functions 
related to textures and d3dx8.


I have included D3DXIMAGE_FILEFORMAT in the patch because it is referred 
by D3DXIMAGE_FILEFORMAT which is referred in the function. If not 
included, it would not compile. They both are now in /include/d3dx8.h 
whci I think is the appropiate file. Do you propose to put them elsewhere?


Do you think I am missing anything or is it ok?
--- 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 000..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 
+#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