d3dx9: Avoid LPDIRECT3DCUBETEXTURE9.

This commit is contained in:
Henri Verbeet 2012-10-24 21:23:38 +02:00 committed by Alexandre Julliard
parent 17e33e9b27
commit 9b19d75519
3 changed files with 45 additions and 128 deletions

View File

@ -949,13 +949,8 @@ HRESULT WINAPI D3DXCreateTextureFromResourceExW(LPDIRECT3DDEVICE9 device,
return D3DXERR_INVALIDDATA; return D3DXERR_INVALIDDATA;
} }
HRESULT WINAPI D3DXCreateCubeTexture(LPDIRECT3DDEVICE9 device, HRESULT WINAPI D3DXCreateCubeTexture(struct IDirect3DDevice9 *device, UINT size, UINT miplevels,
UINT size, DWORD usage, D3DFORMAT format, D3DPOOL pool, struct IDirect3DCubeTexture9 **texture)
UINT miplevels,
DWORD usage,
D3DFORMAT format,
D3DPOOL pool,
LPDIRECT3DCUBETEXTURE9 *texture)
{ {
HRESULT hr; HRESULT hr;
@ -976,10 +971,8 @@ HRESULT WINAPI D3DXCreateCubeTexture(LPDIRECT3DDEVICE9 device,
return IDirect3DDevice9_CreateCubeTexture(device, size, miplevels, usage, format, pool, texture, NULL); return IDirect3DDevice9_CreateCubeTexture(device, size, miplevels, usage, format, pool, texture, NULL);
} }
HRESULT WINAPI D3DXCreateCubeTextureFromFileInMemory(LPDIRECT3DDEVICE9 device, HRESULT WINAPI D3DXCreateCubeTextureFromFileInMemory(struct IDirect3DDevice9 *device,
LPCVOID data, const void *data, UINT datasize, struct IDirect3DCubeTexture9 **texture)
UINT datasize,
LPDIRECT3DCUBETEXTURE9 *texture)
{ {
TRACE("(%p, %p, %u, %p)\n", device, data, datasize, texture); TRACE("(%p, %p, %u, %p)\n", device, data, datasize, texture);
@ -1704,9 +1697,7 @@ static float get_cube_coord(enum cube_coord coord, unsigned int x, unsigned int
} }
} }
HRESULT WINAPI D3DXFillCubeTexture(LPDIRECT3DCUBETEXTURE9 texture, HRESULT WINAPI D3DXFillCubeTexture(struct IDirect3DCubeTexture9 *texture, LPD3DXFILL3D function, void *funcdata)
LPD3DXFILL3D function,
LPVOID funcdata)
{ {
DWORD miplevels; DWORD miplevels;
DWORD m, i, x, y, c, f, v; DWORD m, i, x, y, c, f, v;

View File

@ -303,7 +303,7 @@ DECLARE_INTERFACE_(ID3DXRenderToEnvMap, IUnknown)
STDMETHOD(GetDevice)(THIS_ LPDIRECT3DDEVICE9 *device) PURE; STDMETHOD(GetDevice)(THIS_ LPDIRECT3DDEVICE9 *device) PURE;
STDMETHOD(GetDesc)(THIS_ D3DXRTE_DESC *desc) PURE; STDMETHOD(GetDesc)(THIS_ D3DXRTE_DESC *desc) PURE;
STDMETHOD(BeginCube)(THIS_ LPDIRECT3DCUBETEXTURE9 cubetex) PURE; STDMETHOD(BeginCube)(THIS_ struct IDirect3DCubeTexture9 *cubetex) PURE;
STDMETHOD(BeginSphere)(THIS_ LPDIRECT3DTEXTURE9 tex) PURE; STDMETHOD(BeginSphere)(THIS_ LPDIRECT3DTEXTURE9 tex) PURE;
STDMETHOD(BeginHemisphere)(THIS_ LPDIRECT3DTEXTURE9 texzpos, LPDIRECT3DTEXTURE9 texzneg) PURE; STDMETHOD(BeginHemisphere)(THIS_ LPDIRECT3DTEXTURE9 texzpos, LPDIRECT3DTEXTURE9 texzneg) PURE;
STDMETHOD(BeginParabolic)(THIS_ LPDIRECT3DTEXTURE9 texzpos, LPDIRECT3DTEXTURE9 texzneg) PURE; STDMETHOD(BeginParabolic)(THIS_ LPDIRECT3DTEXTURE9 texzpos, LPDIRECT3DTEXTURE9 texzneg) PURE;

View File

@ -306,15 +306,8 @@ HRESULT WINAPI D3DXCreateTexture( LPDIRECT3DDEVICE9 device,
D3DFORMAT format, D3DFORMAT format,
D3DPOOL pool, D3DPOOL pool,
LPDIRECT3DTEXTURE9 *texture); LPDIRECT3DTEXTURE9 *texture);
HRESULT WINAPI D3DXCreateCubeTexture(struct IDirect3DDevice9 *device, UINT size,
HRESULT WINAPI D3DXCreateCubeTexture( LPDIRECT3DDEVICE9 device, UINT miplevels, DWORD usage, D3DFORMAT format, D3DPOOL pool, struct IDirect3DCubeTexture9 **cube);
UINT size,
UINT miplevels,
DWORD usage,
D3DFORMAT format,
D3DPOOL pool,
LPDIRECT3DCUBETEXTURE9 *cube);
HRESULT WINAPI D3DXCreateVolumeTexture(struct IDirect3DDevice9 *device, UINT width, UINT height, UINT depth, HRESULT WINAPI D3DXCreateVolumeTexture(struct IDirect3DDevice9 *device, UINT width, UINT height, UINT depth,
UINT miplevels, DWORD usage, D3DFORMAT format, D3DPOOL pool, struct IDirect3DVolumeTexture9 **volume); UINT miplevels, DWORD usage, D3DFORMAT format, D3DPOOL pool, struct IDirect3DVolumeTexture9 **volume);
@ -327,13 +320,10 @@ HRESULT WINAPI D3DXCreateTextureFromFileW( LPDIRECT3DDEVICE9 device,
LPDIRECT3DTEXTURE9 *texture); LPDIRECT3DTEXTURE9 *texture);
#define D3DXCreateTextureFromFile WINELIB_NAME_AW(D3DXCreateTextureFromFile) #define D3DXCreateTextureFromFile WINELIB_NAME_AW(D3DXCreateTextureFromFile)
HRESULT WINAPI D3DXCreateCubeTextureFromFileA( LPDIRECT3DDEVICE9 device, HRESULT WINAPI D3DXCreateCubeTextureFromFileA(struct IDirect3DDevice9 *device,
LPCSTR srcfile, const char *srcfile, struct IDirect3DCubeTexture9 **cube);
LPDIRECT3DCUBETEXTURE9 *cube); HRESULT WINAPI D3DXCreateCubeTextureFromFileW(struct IDirect3DDevice9 *device,
const WCHAR *srcfile, struct IDirect3DCubeTexture9 **cube);
HRESULT WINAPI D3DXCreateCubeTextureFromFileW( LPDIRECT3DDEVICE9 device,
LPCWSTR srcfile,
LPDIRECT3DCUBETEXTURE9 *cube);
#define D3DXCreateCubeTextureFromFile WINELIB_NAME_AW(D3DXCreateCubeTextureFromFile) #define D3DXCreateCubeTextureFromFile WINELIB_NAME_AW(D3DXCreateCubeTextureFromFile)
HRESULT WINAPI D3DXCreateVolumeTextureFromFileA(struct IDirect3DDevice9 *device, HRESULT WINAPI D3DXCreateVolumeTextureFromFileA(struct IDirect3DDevice9 *device,
@ -353,14 +343,10 @@ HRESULT WINAPI D3DXCreateTextureFromResourceW( LPDIRECT3DDEVICE9 device,
LPDIRECT3DTEXTURE9 *texture); LPDIRECT3DTEXTURE9 *texture);
#define D3DXCreateTextureFromResource WINELIB_NAME_AW(D3DXCreateTextureFromResource) #define D3DXCreateTextureFromResource WINELIB_NAME_AW(D3DXCreateTextureFromResource)
HRESULT WINAPI D3DXCreateCubeTextureFromResourceA( LPDIRECT3DDEVICE9 device, HRESULT WINAPI D3DXCreateCubeTextureFromResourceA(struct IDirect3DDevice9 *device,
HMODULE srcmodule, HMODULE srcmodule, const char *resource, struct IDirect3DCubeTexture9 **cube);
LPCSTR resource, HRESULT WINAPI D3DXCreateCubeTextureFromResourceW(struct IDirect3DDevice9 *device,
LPDIRECT3DCUBETEXTURE9 *cube); HMODULE srcmodule, const WCHAR *resource, struct IDirect3DCubeTexture9 **cube);
HRESULT WINAPI D3DXCreateCubeTextureFromResourceW( LPDIRECT3DDEVICE9 device,
HMODULE srcmodule,
LPCWSTR resource,
LPDIRECT3DCUBETEXTURE9 *cube);
#define D3DXCreateCubeTextureFromResource WINELIB_NAME_AW(D3DXCreateCubeTextureFromResource) #define D3DXCreateCubeTextureFromResource WINELIB_NAME_AW(D3DXCreateCubeTextureFromResource)
HRESULT WINAPI D3DXCreateVolumeTextureFromResourceA(struct IDirect3DDevice9 *device, HRESULT WINAPI D3DXCreateVolumeTextureFromResourceA(struct IDirect3DDevice9 *device,
@ -400,33 +386,14 @@ HRESULT WINAPI D3DXCreateTextureFromFileExW( LPDIRECT3DDEVICE9 device,
LPDIRECT3DTEXTURE9 *texture); LPDIRECT3DTEXTURE9 *texture);
#define D3DXCreateTextureFromFileEx WINELIB_NAME_AW(D3DXCreateTextureFromFileEx) #define D3DXCreateTextureFromFileEx WINELIB_NAME_AW(D3DXCreateTextureFromFileEx)
HRESULT WINAPI D3DXCreateCubeTextureFromFileExA( LPDIRECT3DDEVICE9 device, HRESULT WINAPI D3DXCreateCubeTextureFromFileExA(struct IDirect3DDevice9 *device, const char *srcfile,
LPCSTR srcfile, UINT size, UINT miplevels, DWORD usage, D3DFORMAT format,
UINT size, D3DPOOL pool, DWORD filter, DWORD mipfilter, D3DCOLOR colorkey, D3DXIMAGE_INFO *srcinfo,
UINT miplevels, PALETTEENTRY *palette, struct IDirect3DCubeTexture9 **cube);
DWORD usage, HRESULT WINAPI D3DXCreateCubeTextureFromFileExW(struct IDirect3DDevice9 *device, const WCHAR *srcfile,
D3DFORMAT format, UINT size, UINT miplevels, DWORD usage, D3DFORMAT format,
D3DPOOL pool, D3DPOOL pool, DWORD filter, DWORD mipfilter, D3DCOLOR colorkey, D3DXIMAGE_INFO *srcinfo,
DWORD filter, PALETTEENTRY *palette, struct IDirect3DCubeTexture9 **cube);
DWORD mipfilter,
D3DCOLOR colorkey,
D3DXIMAGE_INFO *srcinfo,
PALETTEENTRY *palette,
LPDIRECT3DCUBETEXTURE9 *cube);
HRESULT WINAPI D3DXCreateCubeTextureFromFileExW( LPDIRECT3DDEVICE9 device,
LPCWSTR srcfile,
UINT size,
UINT miplevels,
DWORD usage,
D3DFORMAT format,
D3DPOOL pool,
DWORD filter,
DWORD mipfilter,
D3DCOLOR colorkey,
D3DXIMAGE_INFO *srcinfo,
PALETTEENTRY *palette,
LPDIRECT3DCUBETEXTURE9 *cube);
#define D3DXCreateCubeTextureFromFileEx WINELIB_NAME_AW(D3DXCreateCubeTextureFromFileEx) #define D3DXCreateCubeTextureFromFileEx WINELIB_NAME_AW(D3DXCreateCubeTextureFromFileEx)
HRESULT WINAPI D3DXCreateVolumeTextureFromFileExA(struct IDirect3DDevice9 *device, const char *srcfile, HRESULT WINAPI D3DXCreateVolumeTextureFromFileExA(struct IDirect3DDevice9 *device, const char *srcfile,
@ -472,35 +439,14 @@ HRESULT WINAPI D3DXCreateTextureFromResourceExW( LPDIRECT3DDEVICE9 device,
LPDIRECT3DTEXTURE9 *texture); LPDIRECT3DTEXTURE9 *texture);
#define D3DXCreateTextureFromResourceEx WINELIB_NAME_AW(D3DXCreateTextureFromResourceEx) #define D3DXCreateTextureFromResourceEx WINELIB_NAME_AW(D3DXCreateTextureFromResourceEx)
HRESULT WINAPI D3DXCreateCubeTextureFromResourceExA( LPDIRECT3DDEVICE9 device, HRESULT WINAPI D3DXCreateCubeTextureFromResourceExA(struct IDirect3DDevice9 *device, HMODULE srcmodule,
HMODULE srcmodule, const char *resource, UINT size, UINT miplevels, DWORD usage, D3DFORMAT format,
LPCSTR resource, D3DPOOL pool, DWORD filter, DWORD mipfilter, D3DCOLOR colorkey, D3DXIMAGE_INFO *srcinfo,
UINT size, PALETTEENTRY *palette, struct IDirect3DCubeTexture9 **cube);
UINT miplevels, HRESULT WINAPI D3DXCreateCubeTextureFromResourceExW(struct IDirect3DDevice9 *device, HMODULE srcmodule,
DWORD usage, const WCHAR *resource, UINT size, UINT miplevels, DWORD usage, D3DFORMAT format,
D3DFORMAT format, D3DPOOL pool, DWORD filter, DWORD mipfilter, D3DCOLOR colorkey, D3DXIMAGE_INFO *srcinfo,
D3DPOOL pool, PALETTEENTRY *palette, struct IDirect3DCubeTexture9 **cube);
DWORD filter,
DWORD mipfilter,
D3DCOLOR colorkey,
D3DXIMAGE_INFO *srcinfo,
PALETTEENTRY *palette,
LPDIRECT3DCUBETEXTURE9 *cube);
HRESULT WINAPI D3DXCreateCubeTextureFromResourceExW( LPDIRECT3DDEVICE9 device,
HMODULE srcmodule,
LPCWSTR resource,
UINT size,
UINT miplevels,
DWORD usage,
D3DFORMAT format,
D3DPOOL pool,
DWORD filter,
DWORD mipfilter,
D3DCOLOR colorkey,
D3DXIMAGE_INFO *srcinfo,
PALETTEENTRY *palette,
LPDIRECT3DCUBETEXTURE9 *cube);
#define D3DXCreateCubeTextureFromResourceEx WINELIB_NAME_AW(D3DXCreateCubeTextureFromResourceEx) #define D3DXCreateCubeTextureFromResourceEx WINELIB_NAME_AW(D3DXCreateCubeTextureFromResourceEx)
HRESULT WINAPI D3DXCreateVolumeTextureFromResourceExA(struct IDirect3DDevice9 *device, HMODULE srcmodule, HRESULT WINAPI D3DXCreateVolumeTextureFromResourceExA(struct IDirect3DDevice9 *device, HMODULE srcmodule,
@ -517,11 +463,8 @@ HRESULT WINAPI D3DXCreateTextureFromFileInMemory( LPDIRECT3DDEVICE9 device,
LPCVOID srcdata, LPCVOID srcdata,
UINT srcdatasize, UINT srcdatasize,
LPDIRECT3DTEXTURE9* texture); LPDIRECT3DTEXTURE9* texture);
HRESULT WINAPI D3DXCreateCubeTextureFromFileInMemory(struct IDirect3DDevice9 *device,
HRESULT WINAPI D3DXCreateCubeTextureFromFileInMemory( LPDIRECT3DDEVICE9 device, const void *srcdata, UINT srcdatasize, struct IDirect3DCubeTexture9 **cube);
LPCVOID srcdata,
UINT srcdatasize,
LPDIRECT3DCUBETEXTURE9* cube);
HRESULT WINAPI D3DXCreateVolumeTextureFromFileInMemory(struct IDirect3DDevice9 *device, HRESULT WINAPI D3DXCreateVolumeTextureFromFileInMemory(struct IDirect3DDevice9 *device,
const void *srcdata, UINT srcdatasize, struct IDirect3DVolumeTexture9 **volume); const void *srcdata, UINT srcdatasize, struct IDirect3DVolumeTexture9 **volume);
@ -540,21 +483,10 @@ HRESULT WINAPI D3DXCreateTextureFromFileInMemoryEx( LPDIRECT3DDEVICE9 devic
D3DXIMAGE_INFO *srcinfo, D3DXIMAGE_INFO *srcinfo,
PALETTEENTRY *palette, PALETTEENTRY *palette,
LPDIRECT3DTEXTURE9 *texture); LPDIRECT3DTEXTURE9 *texture);
HRESULT WINAPI D3DXCreateCubeTextureFromFileInMemoryEx(struct IDirect3DDevice9 *device, const void *srcdata,
HRESULT WINAPI D3DXCreateCubeTextureFromFileInMemoryEx( LPDIRECT3DDEVICE9 device, UINT srcdatasize, UINT size, UINT miplevels, DWORD usage, D3DFORMAT format,
LPCVOID srcdata, D3DPOOL pool, DWORD filter, DWORD mipfilter, D3DCOLOR colorkey, D3DXIMAGE_INFO *srcinfo,
UINT srcdatasize, PALETTEENTRY *palette, struct IDirect3DCubeTexture9 **cube);
UINT size,
UINT miplevels,
DWORD usage,
D3DFORMAT format,
D3DPOOL pool,
DWORD filter,
DWORD mipfilter,
D3DCOLOR colorkey,
D3DXIMAGE_INFO *srcinfo,
PALETTEENTRY *palette,
LPDIRECT3DCUBETEXTURE9 *cube);
HRESULT WINAPI D3DXCreateVolumeTextureFromFileInMemoryEx(struct IDirect3DDevice9 *device, const void *srcdata, HRESULT WINAPI D3DXCreateVolumeTextureFromFileInMemoryEx(struct IDirect3DDevice9 *device, const void *srcdata,
UINT srcdatasize, UINT width, UINT height, UINT depth, UINT miplevels, DWORD usage, D3DFORMAT format, UINT srcdatasize, UINT width, UINT height, UINT depth, UINT miplevels, DWORD usage, D3DFORMAT format,
D3DPOOL pool, DWORD filter, DWORD mipfilter, D3DCOLOR colorkey, D3DXIMAGE_INFO *srcinfo, D3DPOOL pool, DWORD filter, DWORD mipfilter, D3DCOLOR colorkey, D3DXIMAGE_INFO *srcinfo,
@ -587,21 +519,15 @@ HRESULT WINAPI D3DXFilterTexture( LPDIRECT3DBASETEXTURE9 texture,
HRESULT WINAPI D3DXFillTexture( LPDIRECT3DTEXTURE9 texture, HRESULT WINAPI D3DXFillTexture( LPDIRECT3DTEXTURE9 texture,
LPD3DXFILL2D function, LPD3DXFILL2D function,
LPVOID data); LPVOID data);
HRESULT WINAPI D3DXFillCubeTexture(struct IDirect3DCubeTexture9 *cube, LPD3DXFILL3D function, void *data);
HRESULT WINAPI D3DXFillCubeTexture( LPDIRECT3DCUBETEXTURE9 cube,
LPD3DXFILL3D function,
LPVOID data);
HRESULT WINAPI D3DXFillVolumeTexture(struct IDirect3DVolumeTexture9 *volume, LPD3DXFILL3D function, void *data); HRESULT WINAPI D3DXFillVolumeTexture(struct IDirect3DVolumeTexture9 *volume, LPD3DXFILL3D function, void *data);
HRESULT WINAPI D3DXFillTextureTX( LPDIRECT3DTEXTURE9 texture, HRESULT WINAPI D3DXFillTextureTX( LPDIRECT3DTEXTURE9 texture,
CONST DWORD *function, CONST DWORD *function,
CONST D3DXVECTOR4 *constants, CONST D3DXVECTOR4 *constants,
UINT numconstants); UINT numconstants);
HRESULT WINAPI D3DXFillCubeTextureTX(struct IDirect3DCubeTexture9 *cube, const DWORD *function,
HRESULT WINAPI D3DXFillCubeTextureTX( LPDIRECT3DCUBETEXTURE9 cube, const D3DXVECTOR4 *constants, UINT numconstants);
CONST DWORD *function,
CONST D3DXVECTOR4 *constants,
UINT numconstants);
HRESULT WINAPI D3DXFillVolumeTextureTX(struct IDirect3DVolumeTexture9 *volume, const DWORD *function, HRESULT WINAPI D3DXFillVolumeTextureTX(struct IDirect3DVolumeTexture9 *volume, const DWORD *function,
const D3DXVECTOR4 *constants, UINT numconstants); const D3DXVECTOR4 *constants, UINT numconstants);