mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-01 16:53:37 +00:00
d3dx9: Use correct integral type.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com> Signed-off-by: Matteo Bruni <mbruni@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
71091ed5d9
commit
fc67b16803
|
@ -230,7 +230,8 @@ static inline BOOL is_param_type_sampler(D3DXPARAMETER_TYPE type)
|
|||
/* Returns the smallest power of 2 which is greater than or equal to num */
|
||||
static inline uint32_t make_pow2(uint32_t num)
|
||||
{
|
||||
uint32_t index;
|
||||
DWORD index;
|
||||
|
||||
return BitScanReverse(&index, num - 1) ? 1u << (index + 1) : 1;
|
||||
}
|
||||
|
||||
|
|
|
@ -54,7 +54,7 @@ struct d3dx9_mesh
|
|||
IDirect3DVertexBuffer9 *vertex_buffer;
|
||||
IDirect3DIndexBuffer9 *index_buffer;
|
||||
DWORD *attrib_buffer;
|
||||
int attrib_buffer_lock_count;
|
||||
LONG attrib_buffer_lock_count;
|
||||
DWORD attrib_table_size;
|
||||
D3DXATTRIBUTERANGE *attrib_table;
|
||||
};
|
||||
|
|
|
@ -281,7 +281,7 @@ static HRESULT WINAPI d3dx_include_from_file_open(ID3DXInclude *iface, D3DXINCLU
|
|||
if(!buffer)
|
||||
goto error;
|
||||
*buffer = pathname;
|
||||
if(!ReadFile(file, buffer + 1, size, bytes, NULL))
|
||||
if (!ReadFile(file, buffer + 1, size, (DWORD *)bytes, NULL))
|
||||
goto error;
|
||||
|
||||
*data = buffer + 1;
|
||||
|
@ -339,11 +339,11 @@ HRESULT WINAPI D3DXAssembleShaderFromFileA(const char *filename, const D3DXMACRO
|
|||
HRESULT WINAPI D3DXAssembleShaderFromFileW(const WCHAR *filename, const D3DXMACRO *defines,
|
||||
ID3DXInclude *include, DWORD flags, ID3DXBuffer **shader, ID3DXBuffer **error_messages)
|
||||
{
|
||||
const void *buffer;
|
||||
DWORD len;
|
||||
HRESULT hr;
|
||||
struct d3dx_include_from_file include_from_file;
|
||||
const void *buffer;
|
||||
unsigned int len;
|
||||
char *filename_a;
|
||||
HRESULT hr;
|
||||
|
||||
TRACE("filename %s, defines %p, include %p, flags %#x, shader %p, error_messages %p.\n",
|
||||
debugstr_w(filename), defines, include, flags, shader, error_messages);
|
||||
|
@ -475,11 +475,12 @@ HRESULT WINAPI D3DXCompileShaderFromFileW(const WCHAR *filename, const D3DXMACRO
|
|||
ID3DXInclude *include, const char *entrypoint, const char *profile, DWORD flags,
|
||||
ID3DXBuffer **shader, ID3DXBuffer **error_messages, ID3DXConstantTable **constant_table)
|
||||
{
|
||||
const void *buffer;
|
||||
DWORD len, filename_len;
|
||||
HRESULT hr;
|
||||
struct d3dx_include_from_file include_from_file;
|
||||
unsigned int filename_len;
|
||||
const void *buffer;
|
||||
char *filename_a;
|
||||
HRESULT hr;
|
||||
UINT len;
|
||||
|
||||
TRACE("filename %s, defines %p, include %p, entrypoint %s, profile %s, "
|
||||
"flags %#x, shader %p, error_messages %p, constant_table %p.\n",
|
||||
|
@ -603,11 +604,11 @@ HRESULT WINAPI D3DXPreprocessShaderFromFileA(const char *filename, const D3DXMAC
|
|||
HRESULT WINAPI D3DXPreprocessShaderFromFileW(const WCHAR *filename, const D3DXMACRO *defines,
|
||||
ID3DXInclude *include, ID3DXBuffer **shader, ID3DXBuffer **error_messages)
|
||||
{
|
||||
const void *buffer;
|
||||
DWORD len;
|
||||
HRESULT hr;
|
||||
struct d3dx_include_from_file include_from_file;
|
||||
const void *buffer;
|
||||
char *filename_a;
|
||||
HRESULT hr;
|
||||
UINT len;
|
||||
|
||||
TRACE("filename %s, defines %p, include %p, shader %p, error_messages %p.\n",
|
||||
debugstr_w(filename), defines, include, shader, error_messages);
|
||||
|
|
|
@ -1391,7 +1391,7 @@ HRESULT WINAPI D3DXLoadSurfaceFromFileW(IDirect3DSurface9 *dst_surface,
|
|||
const PALETTEENTRY *dst_palette, const RECT *dst_rect, const WCHAR *src_file,
|
||||
const RECT *src_rect, DWORD filter, D3DCOLOR color_key, D3DXIMAGE_INFO *src_info)
|
||||
{
|
||||
UINT data_size;
|
||||
DWORD data_size;
|
||||
void *data;
|
||||
HRESULT hr;
|
||||
|
||||
|
@ -1417,7 +1417,7 @@ HRESULT WINAPI D3DXLoadSurfaceFromResourceA(IDirect3DSurface9 *dst_surface,
|
|||
const PALETTEENTRY *dst_palette, const RECT *dst_rect, HMODULE src_module, const char *resource,
|
||||
const RECT *src_rect, DWORD filter, D3DCOLOR color_key, D3DXIMAGE_INFO *src_info)
|
||||
{
|
||||
UINT data_size;
|
||||
DWORD data_size;
|
||||
HRSRC resinfo;
|
||||
void *data;
|
||||
|
||||
|
@ -1445,7 +1445,7 @@ HRESULT WINAPI D3DXLoadSurfaceFromResourceW(IDirect3DSurface9 *dst_surface,
|
|||
const PALETTEENTRY *dst_palette, const RECT *dst_rect, HMODULE src_module, const WCHAR *resource,
|
||||
const RECT *src_rect, DWORD filter, D3DCOLOR color_key, D3DXIMAGE_INFO *src_info)
|
||||
{
|
||||
UINT data_size;
|
||||
DWORD data_size;
|
||||
HRSRC resinfo;
|
||||
void *data;
|
||||
|
||||
|
|
|
@ -60,9 +60,9 @@ HRESULT WINAPI D3DXLoadVolumeFromFileW(IDirect3DVolume9 *dst_volume,
|
|||
D3DCOLOR color_key,
|
||||
D3DXIMAGE_INFO *info)
|
||||
{
|
||||
DWORD data_size;
|
||||
HRESULT hr;
|
||||
void *data;
|
||||
UINT data_size;
|
||||
|
||||
TRACE("(%p, %p, %p, %s, %p, %#x, %#x, %p)\n",
|
||||
dst_volume, dst_palette, dst_box, debugstr_w(filename), src_box,
|
||||
|
|
Loading…
Reference in a new issue