Commit 75511e35 authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

d3dx9: Avoid LPCSTR.

parent 2a24b11a
......@@ -2398,8 +2398,8 @@ static HRESULT d3dx9_base_effect_get_string(struct d3dx9_base_effect *base,
if (string && param && !param->element_count && param->type == D3DXPT_STRING)
{
*string = *(LPCSTR *)param->data;
TRACE("Returning %s\n", debugstr_a(*string));
*string = *(const char **)param->data;
TRACE("Returning %s.\n", debugstr_a(*string));
return D3D_OK;
}
......
......@@ -34,11 +34,10 @@
WINE_DEFAULT_DEBUG_CHANNEL(d3dx);
/* This function is not declared in the SDK headers yet */
HRESULT WINAPI D3DAssemble(LPCVOID data, SIZE_T datasize, LPCSTR filename,
const D3D_SHADER_MACRO *defines, ID3DInclude *include,
UINT flags,
ID3DBlob **shader, ID3DBlob **error_messages);
/* This function is not declared in the SDK headers yet. */
HRESULT WINAPI D3DAssemble(const void *data, SIZE_T datasize, const char *filename,
const D3D_SHADER_MACRO *defines, ID3DInclude *include, UINT flags,
ID3DBlob **shader, ID3DBlob **error_messages);
static inline BOOL is_valid_bytecode(DWORD token)
{
......@@ -209,14 +208,13 @@ HRESULT WINAPI D3DXAssembleShader(const char *data, UINT data_len, const D3DXMAC
}
/* D3DXInclude private implementation, used to implement
D3DXAssembleShaderFromFile from D3DXAssembleShader */
/* To be able to correctly resolve include search paths we have to store
the pathname of each include file. We store the pathname pointer right
before the file data. */
static HRESULT WINAPI d3dincludefromfile_open(ID3DXInclude *iface,
D3DXINCLUDE_TYPE include_type,
LPCSTR filename, LPCVOID parent_data,
LPCVOID *data, UINT *bytes) {
* D3DXAssembleShaderFromFile() from D3DXAssembleShader(). */
/* To be able to correctly resolve include search paths we have to store the
* pathname of each include file. We store the pathname pointer right before
* the file data. */
static HRESULT WINAPI d3dincludefromfile_open(ID3DXInclude *iface, D3DXINCLUDE_TYPE include_type,
const char *filename, const void *parent_data, const void **data, UINT *bytes)
{
const char *p, *parent_name = "";
char *pathname = NULL;
char **buffer = NULL;
......@@ -335,7 +333,7 @@ HRESULT WINAPI D3DXAssembleShaderFromResourceA(HMODULE module, const char *resou
HRSRC res;
DWORD len;
if (!(res = FindResourceA(module, resource, (LPCSTR)RT_RCDATA)))
if (!(res = FindResourceA(module, resource, (const char *)RT_RCDATA)))
return D3DXERR_INVALIDDATA;
if (FAILED(load_resource_into_memory(module, res, &buffer, &len)))
return D3DXERR_INVALIDDATA;
......@@ -463,7 +461,7 @@ HRESULT WINAPI D3DXCompileShaderFromResourceA(HMODULE module, const char *resour
HRSRC res;
DWORD len;
if (!(res = FindResourceA(module, resource, (LPCSTR)RT_RCDATA)))
if (!(res = FindResourceA(module, resource, (const char *)RT_RCDATA)))
return D3DXERR_INVALIDDATA;
if (FAILED(load_resource_into_memory(module, res, &buffer, &len)))
return D3DXERR_INVALIDDATA;
......@@ -554,7 +552,7 @@ HRESULT WINAPI D3DXPreprocessShaderFromResourceA(HMODULE module, const char *res
HRSRC res;
DWORD len;
if (!(res = FindResourceA(module, resource, (LPCSTR)RT_RCDATA)))
if (!(res = FindResourceA(module, resource, (const char *)RT_RCDATA)))
return D3DXERR_INVALIDDATA;
if (FAILED(load_resource_into_memory(module, res, &buffer, &len)))
return D3DXERR_INVALIDDATA;
......@@ -636,12 +634,13 @@ static inline D3DXHANDLE handle_from_constant(struct ctab_constant *constant)
return (D3DXHANDLE)constant;
}
static struct ctab_constant *get_constant_by_name(struct ID3DXConstantTableImpl *, struct ctab_constant *, LPCSTR);
static struct ctab_constant *get_constant_by_name(struct ID3DXConstantTableImpl *table,
struct ctab_constant *constant, const char *name);
static struct ctab_constant *get_constant_element_by_name(struct ctab_constant *constant, LPCSTR name)
static struct ctab_constant *get_constant_element_by_name(struct ctab_constant *constant, const char *name)
{
const char *part;
UINT element;
LPCSTR part;
TRACE("constant %p, name %s\n", constant, debugstr_a(name));
......@@ -677,11 +676,11 @@ static struct ctab_constant *get_constant_element_by_name(struct ctab_constant *
}
static struct ctab_constant *get_constant_by_name(struct ID3DXConstantTableImpl *table,
struct ctab_constant *constant, LPCSTR name)
struct ctab_constant *constant, const char *name)
{
UINT i, count, length;
struct ctab_constant *handles;
LPCSTR part;
const char *part;
TRACE("table %p, constant %p, name %s\n", table, constant, debugstr_a(name));
......@@ -910,12 +909,13 @@ static D3DXHANDLE WINAPI ID3DXConstantTableImpl_GetConstant(ID3DXConstantTable *
return NULL;
}
static D3DXHANDLE WINAPI ID3DXConstantTableImpl_GetConstantByName(ID3DXConstantTable *iface, D3DXHANDLE constant, LPCSTR name)
static D3DXHANDLE WINAPI ID3DXConstantTableImpl_GetConstantByName(ID3DXConstantTable *iface,
D3DXHANDLE constant, const char *name)
{
struct ID3DXConstantTableImpl *This = impl_from_ID3DXConstantTable(iface);
struct ctab_constant *c = get_valid_constant(This, constant);
TRACE("(%p)->(%p, %s)\n", This, constant, name);
TRACE("iface %p, constant %p, name %s.\n", iface, constant, debugstr_a(name));
c = get_constant_by_name(This, c, name);
TRACE("Returning constant %p\n", c);
......
......@@ -238,15 +238,15 @@ static FLOAT WINAPI ID3DXSkinInfoImpl_GetMinBoneInfluence(ID3DXSkinInfo *iface)
return 0.0f;
}
static HRESULT WINAPI ID3DXSkinInfoImpl_SetBoneName(ID3DXSkinInfo *iface, DWORD bone_num, LPCSTR name)
static HRESULT WINAPI ID3DXSkinInfoImpl_SetBoneName(ID3DXSkinInfo *iface, DWORD bone_idx, const char *name)
{
ID3DXSkinInfoImpl *This = impl_from_ID3DXSkinInfo(iface);
char *new_name;
size_t size;
TRACE("(%p, %u, %s)\n", This, bone_num, debugstr_a(name));
TRACE("iface %p, bone_idx %u, name %s.\n", iface, bone_idx, debugstr_a(name));
if (bone_num >= This->num_bones || !name)
if (bone_idx >= This->num_bones || !name)
return D3DERR_INVALIDCALL;
size = strlen(name) + 1;
......@@ -254,22 +254,22 @@ static HRESULT WINAPI ID3DXSkinInfoImpl_SetBoneName(ID3DXSkinInfo *iface, DWORD
if (!new_name)
return E_OUTOFMEMORY;
memcpy(new_name, name, size);
HeapFree(GetProcessHeap(), 0, This->bones[bone_num].name);
This->bones[bone_num].name = new_name;
HeapFree(GetProcessHeap(), 0, This->bones[bone_idx].name);
This->bones[bone_idx].name = new_name;
return D3D_OK;
}
static LPCSTR WINAPI ID3DXSkinInfoImpl_GetBoneName(ID3DXSkinInfo *iface, DWORD bone_num)
static const char * WINAPI ID3DXSkinInfoImpl_GetBoneName(ID3DXSkinInfo *iface, DWORD bone_idx)
{
ID3DXSkinInfoImpl *This = impl_from_ID3DXSkinInfo(iface);
TRACE("(%p, %u)\n", This, bone_num);
TRACE("iface %p, bone_idx %u.\n", iface, bone_idx);
if (bone_num >= This->num_bones)
if (bone_idx >= This->num_bones)
return NULL;
return This->bones[bone_num].name;
return This->bones[bone_idx].name;
}
static HRESULT WINAPI ID3DXSkinInfoImpl_SetBoneOffsetMatrix(ID3DXSkinInfo *iface, DWORD bone_num, CONST D3DXMATRIX *bone_transform)
......
......@@ -899,7 +899,7 @@ HRESULT WINAPI D3DXGetImageInfoFromFileInMemory(const void *data, UINT datasize,
* D3DERR_INVALIDCALL, if file is NULL
*
*/
HRESULT WINAPI D3DXGetImageInfoFromFileA(LPCSTR file, D3DXIMAGE_INFO *info)
HRESULT WINAPI D3DXGetImageInfoFromFileA(const char *file, D3DXIMAGE_INFO *info)
{
WCHAR *widename;
HRESULT hr;
......
......@@ -42,10 +42,9 @@ static HRESULT create_file(const char *filename, const char *data, const unsigne
return D3DERR_INVALIDCALL;
}
static HRESULT WINAPI testD3DXInclude_open(ID3DXInclude *iface,
D3DXINCLUDE_TYPE include_type,
LPCSTR filename, LPCVOID parent_data,
LPCVOID *data, UINT *bytes) {
static HRESULT WINAPI testD3DXInclude_open(ID3DXInclude *iface, D3DXINCLUDE_TYPE include_type,
const char *filename, const void *parent_data, const void **data, UINT *bytes)
{
char *buffer;
const char include[] = "#define REGISTER r0\nvs.1.1\n";
const char include2[] = "#include \"incl3.vsh\"\n";
......
......@@ -309,7 +309,7 @@ static void test_create_effect_compiler(void)
*/
struct test_effect_parameter_value_result
{
LPCSTR full_name;
const char *full_name;
D3DXPARAMETER_DESC desc;
UINT value_offset; /* start position for the value in the blob */
};
......@@ -895,7 +895,7 @@ static void test_effect_parameter_value_GetValue(const struct test_effect_parame
ID3DXEffect *effect, const DWORD *res_value, D3DXHANDLE parameter, UINT i)
{
const D3DXPARAMETER_DESC *res_desc = &res->desc;
LPCSTR res_full_name = res->full_name;
const char *res_full_name = res->full_name;
DWORD value[EFFECT_PARAMETER_VALUE_ARRAY_SIZE];
HRESULT hr;
UINT l;
......@@ -962,7 +962,7 @@ static void test_effect_parameter_value_GetBool(const struct test_effect_paramet
ID3DXEffect *effect, const DWORD *res_value, D3DXHANDLE parameter, UINT i)
{
const D3DXPARAMETER_DESC *res_desc = &res->desc;
LPCSTR res_full_name = res->full_name;
const char *res_full_name = res->full_name;
BOOL bvalue = 0xabababab;
HRESULT hr;
......@@ -986,7 +986,7 @@ static void test_effect_parameter_value_GetBoolArray(const struct test_effect_pa
ID3DXEffect *effect, const DWORD *res_value, D3DXHANDLE parameter, UINT i)
{
const D3DXPARAMETER_DESC *res_desc = &res->desc;
LPCSTR res_full_name = res->full_name;
const char *res_full_name = res->full_name;
BOOL bavalue[EFFECT_PARAMETER_VALUE_ARRAY_SIZE];
HRESULT hr;
UINT l, err = 0;
......@@ -1023,7 +1023,7 @@ static void test_effect_parameter_value_GetInt(const struct test_effect_paramete
ID3DXEffect *effect, const DWORD *res_value, D3DXHANDLE parameter, UINT i)
{
const D3DXPARAMETER_DESC *res_desc = &res->desc;
LPCSTR res_full_name = res->full_name;
const char *res_full_name = res->full_name;
INT ivalue = 0xabababab;
HRESULT hr;
......@@ -1066,7 +1066,7 @@ static void test_effect_parameter_value_GetIntArray(const struct test_effect_par
ID3DXEffect *effect, const DWORD *res_value, D3DXHANDLE parameter, UINT i)
{
const D3DXPARAMETER_DESC *res_desc = &res->desc;
LPCSTR res_full_name = res->full_name;
const char *res_full_name = res->full_name;
INT iavalue[EFFECT_PARAMETER_VALUE_ARRAY_SIZE];
HRESULT hr;
UINT l, err = 0;
......@@ -1103,7 +1103,7 @@ static void test_effect_parameter_value_GetFloat(const struct test_effect_parame
ID3DXEffect *effect, const DWORD *res_value, D3DXHANDLE parameter, UINT i)
{
const D3DXPARAMETER_DESC *res_desc = &res->desc;
LPCSTR res_full_name = res->full_name;
const char *res_full_name = res->full_name;
HRESULT hr;
DWORD cmp = 0xabababab;
FLOAT fvalue = *(FLOAT *)&cmp;
......@@ -1128,7 +1128,7 @@ static void test_effect_parameter_value_GetFloatArray(const struct test_effect_p
ID3DXEffect *effect, const DWORD *res_value, D3DXHANDLE parameter, UINT i)
{
const D3DXPARAMETER_DESC *res_desc = &res->desc;
LPCSTR res_full_name = res->full_name;
const char *res_full_name = res->full_name;
FLOAT favalue[EFFECT_PARAMETER_VALUE_ARRAY_SIZE];
HRESULT hr;
UINT l, err = 0;
......@@ -1166,7 +1166,7 @@ static void test_effect_parameter_value_GetVector(const struct test_effect_param
ID3DXEffect *effect, const DWORD *res_value, D3DXHANDLE parameter, UINT i)
{
const D3DXPARAMETER_DESC *res_desc = &res->desc;
LPCSTR res_full_name = res->full_name;
const char *res_full_name = res->full_name;
HRESULT hr;
DWORD cmp = 0xabababab;
FLOAT fvalue[4];
......@@ -1214,7 +1214,7 @@ static void test_effect_parameter_value_GetVectorArray(const struct test_effect_
ID3DXEffect *effect, const DWORD *res_value, D3DXHANDLE parameter, UINT i)
{
const D3DXPARAMETER_DESC *res_desc = &res->desc;
LPCSTR res_full_name = res->full_name;
const char *res_full_name = res->full_name;
HRESULT hr;
DWORD cmp = 0xabababab;
FLOAT fvalue[EFFECT_PARAMETER_VALUE_ARRAY_SIZE];
......@@ -1263,7 +1263,7 @@ static void test_effect_parameter_value_GetMatrix(const struct test_effect_param
ID3DXEffect *effect, const DWORD *res_value, D3DXHANDLE parameter, UINT i)
{
const D3DXPARAMETER_DESC *res_desc = &res->desc;
LPCSTR res_full_name = res->full_name;
const char *res_full_name = res->full_name;
HRESULT hr;
DWORD cmp = 0xabababab;
FLOAT fvalue[16];
......@@ -1303,7 +1303,7 @@ static void test_effect_parameter_value_GetMatrixArray(const struct test_effect_
ID3DXEffect *effect, const DWORD *res_value, D3DXHANDLE parameter, UINT i)
{
const D3DXPARAMETER_DESC *res_desc = &res->desc;
LPCSTR res_full_name = res->full_name;
const char *res_full_name = res->full_name;
HRESULT hr;
DWORD cmp = 0xabababab;
FLOAT fvalue[EFFECT_PARAMETER_VALUE_ARRAY_SIZE];
......@@ -1357,7 +1357,7 @@ static void test_effect_parameter_value_GetMatrixPointerArray(const struct test_
ID3DXEffect *effect, const DWORD *res_value, D3DXHANDLE parameter, UINT i)
{
const D3DXPARAMETER_DESC *res_desc = &res->desc;
LPCSTR res_full_name = res->full_name;
const char *res_full_name = res->full_name;
HRESULT hr;
DWORD cmp = 0xabababab;
FLOAT fvalue[EFFECT_PARAMETER_VALUE_ARRAY_SIZE];
......@@ -1418,7 +1418,7 @@ static void test_effect_parameter_value_GetMatrixTranspose(const struct test_eff
ID3DXEffect *effect, const DWORD *res_value, D3DXHANDLE parameter, UINT i)
{
const D3DXPARAMETER_DESC *res_desc = &res->desc;
LPCSTR res_full_name = res->full_name;
const char *res_full_name = res->full_name;
HRESULT hr;
DWORD cmp = 0xabababab;
FLOAT fvalue[16];
......@@ -1476,7 +1476,7 @@ static void test_effect_parameter_value_GetMatrixTransposeArray(const struct tes
ID3DXEffect *effect, const DWORD *res_value, D3DXHANDLE parameter, UINT i)
{
const D3DXPARAMETER_DESC *res_desc = &res->desc;
LPCSTR res_full_name = res->full_name;
const char *res_full_name = res->full_name;
HRESULT hr;
DWORD cmp = 0xabababab;
FLOAT fvalue[EFFECT_PARAMETER_VALUE_ARRAY_SIZE];
......@@ -1532,7 +1532,7 @@ static void test_effect_parameter_value_GetMatrixTransposePointerArray(const str
ID3DXEffect *effect, const DWORD *res_value, D3DXHANDLE parameter, UINT i)
{
const D3DXPARAMETER_DESC *res_desc = &res->desc;
LPCSTR res_full_name = res->full_name;
const char *res_full_name = res->full_name;
HRESULT hr;
DWORD cmp = 0xabababab;
FLOAT fvalue[EFFECT_PARAMETER_VALUE_ARRAY_SIZE];
......@@ -1613,7 +1613,7 @@ static void test_effect_parameter_value_ResetValue(const struct test_effect_para
ID3DXEffect *effect, const DWORD *res_value, D3DXHANDLE parameter, UINT i)
{
const D3DXPARAMETER_DESC *res_desc = &res->desc;
LPCSTR res_full_name = res->full_name;
const char *res_full_name = res->full_name;
HRESULT hr;
if (res_desc->Class == D3DXPC_SCALAR
......@@ -1669,7 +1669,7 @@ static void test_effect_parameter_value(IDirect3DDevice9 *device)
for (k = 0; k < res_count; ++k)
{
const D3DXPARAMETER_DESC *res_desc = &res[k].desc;
LPCSTR res_full_name = res[k].full_name;
const char *res_full_name = res[k].full_name;
UINT res_value_offset = res[k].value_offset;
D3DXHANDLE parameter;
D3DXPARAMETER_DESC pdesc;
......
......@@ -1779,7 +1779,7 @@ static void check_generated_effects_(int line, const D3DXMATERIAL *materials, DW
}
}
static LPSTR strdupA(LPCSTR p)
static char *strdupA(const char *p)
{
LPSTR ret;
if (!p) return NULL;
......@@ -1798,9 +1798,10 @@ static CALLBACK HRESULT ID3DXAllocateHierarchyImpl_DestroyFrame(ID3DXAllocateHie
return D3D_OK;
}
static CALLBACK HRESULT ID3DXAllocateHierarchyImpl_CreateFrame(ID3DXAllocateHierarchy *iface, LPCSTR name, LPD3DXFRAME *new_frame)
static CALLBACK HRESULT ID3DXAllocateHierarchyImpl_CreateFrame(ID3DXAllocateHierarchy *iface,
const char *name, D3DXFRAME **new_frame)
{
LPD3DXFRAME frame;
D3DXFRAME *frame;
TRACECALLBACK("ID3DXAllocateHierarchyImpl_CreateFrame(%p, '%s', %p)\n", iface, name, new_frame);
frame = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*frame));
......@@ -3398,7 +3399,8 @@ static HRESULT create_outline(struct glyphinfo *glyph, void *raw_outline, int da
return S_OK;
}
static BOOL compute_text_mesh(struct mesh *mesh, HDC hdc, LPCSTR text, FLOAT deviation, FLOAT extrusion, FLOAT otmEMSquare)
static BOOL compute_text_mesh(struct mesh *mesh, HDC hdc, const char *text,
float deviation, float extrusion, float otmEMSquare)
{
HRESULT hr = E_FAIL;
DWORD nb_vertices, nb_faces;
......@@ -3901,7 +3903,7 @@ error:
if (vertex_buffer) IDirect3DVertexBuffer9_Release(vertex_buffer);
}
static void test_createtext(IDirect3DDevice9 *device, HDC hdc, LPCSTR text, FLOAT deviation, FLOAT extrusion)
static void test_createtext(IDirect3DDevice9 *device, HDC hdc, const char *text, float deviation, float extrusion)
{
HRESULT hr;
ID3DXMesh *d3dxmesh;
......@@ -4700,10 +4702,11 @@ static void test_create_skin_info(void)
hr = D3DXCreateSkinInfoFVF(1, 0, 1, &skininfo);
ok(hr == D3D_OK, "Expected D3D_OK, got %#x\n", hr);
if (skininfo) {
if (skininfo)
{
DWORD dword_result;
FLOAT flt_result;
LPCSTR string_result;
float flt_result;
const char *string_result;
D3DXMATRIX *transform;
D3DXMATRIX identity_matrix;
......
......@@ -410,7 +410,8 @@ static void test_get_shader_constant_table_ex(void)
hr = ID3DXConstantTable_GetDesc(constant_table, &desc);
ok(hr == D3D_OK, "Got result %x, expected 0 (D3D_OK)\n", hr);
ok(desc.Creator == (LPCSTR)data + 0x10, "Got result %p, expected %p\n", desc.Creator, (LPCSTR)data + 0x10);
ok(desc.Creator == (const char *)data + 0x10, "Got result %p, expected %p\n",
desc.Creator, (const char *)data + 0x10);
ok(desc.Version == D3DVS_VERSION(3, 0), "Got result %x, expected %x\n", desc.Version, D3DVS_VERSION(3, 0));
ok(desc.Constants == 0, "Got result %x, expected 0\n", desc.Constants);
......@@ -1532,8 +1533,8 @@ static const DWORD get_shader_samplers_blob[] =
static void test_get_shader_samplers(void)
{
LPCSTR samplers[16] = {NULL}; /* maximum number of sampler registers v/ps 3.0 = 16 */
LPCSTR sampler_orig;
const char *samplers[16] = {NULL}; /* maximum number of sampler registers v/ps 3.0 = 16 */
const char *sampler_orig;
UINT count = 2;
HRESULT hr;
......@@ -1552,19 +1553,19 @@ static void test_get_shader_samplers(void)
ok(hr == D3D_OK, "D3DXGetShaderSamplers failed, got %x, expected %x\n", hr, D3D_OK);
/* check that sampler points to shader blob */
sampler_orig = (LPCSTR)&get_shader_samplers_blob[0x2E];
sampler_orig = (const char *)&get_shader_samplers_blob[0x2e];
ok(sampler_orig == samplers[0], "D3DXGetShaderSamplers failed, got %p, expected %p\n", samplers[0], sampler_orig);
sampler_orig = (LPCSTR)&get_shader_samplers_blob[0x33];
sampler_orig = (const char *)&get_shader_samplers_blob[0x33];
ok(sampler_orig == samplers[1], "D3DXGetShaderSamplers failed, got %p, expected %p\n", samplers[1], sampler_orig);
sampler_orig = (LPCSTR)&get_shader_samplers_blob[0x38];
sampler_orig = (const char *)&get_shader_samplers_blob[0x38];
ok(sampler_orig == samplers[2], "D3DXGetShaderSamplers failed, got %p, expected %p\n", samplers[2], sampler_orig);
sampler_orig = (LPCSTR)&get_shader_samplers_blob[0x3D];
sampler_orig = (const char *)&get_shader_samplers_blob[0x3d];
ok(sampler_orig == samplers[3], "D3DXGetShaderSamplers failed, got %p, expected %p\n", samplers[3], sampler_orig);
sampler_orig = (LPCSTR)&get_shader_samplers_blob[0x42];
sampler_orig = (const char *)&get_shader_samplers_blob[0x42];
ok(sampler_orig == samplers[4], "D3DXGetShaderSamplers failed, got %p, expected %p\n", samplers[4], sampler_orig);
ok(!strcmp(samplers[5], "dummy"), "D3DXGetShaderSamplers failed, got \"%s\", expected \"%s\"\n", samplers[5], "dummy");
......@@ -1582,19 +1583,19 @@ static void test_get_shader_samplers(void)
ok(count == 5, "D3DXGetShaderSamplers failed, got %u, expected %u\n", count, 5);
/* check that sampler points to shader blob */
sampler_orig = (LPCSTR)&get_shader_samplers_blob[0x2E];
sampler_orig = (const char *)&get_shader_samplers_blob[0x2e];
ok(sampler_orig == samplers[0], "D3DXGetShaderSamplers failed, got %p, expected %p\n", samplers[0], sampler_orig);
sampler_orig = (LPCSTR)&get_shader_samplers_blob[0x33];
sampler_orig = (const char *)&get_shader_samplers_blob[0x33];
ok(sampler_orig == samplers[1], "D3DXGetShaderSamplers failed, got %p, expected %p\n", samplers[1], sampler_orig);
sampler_orig = (LPCSTR)&get_shader_samplers_blob[0x38];
sampler_orig = (const char *)&get_shader_samplers_blob[0x38];
ok(sampler_orig == samplers[2], "D3DXGetShaderSamplers failed, got %p, expected %p\n", samplers[2], sampler_orig);
sampler_orig = (LPCSTR)&get_shader_samplers_blob[0x3D];
sampler_orig = (const char *)&get_shader_samplers_blob[0x3d];
ok(sampler_orig == samplers[3], "D3DXGetShaderSamplers failed, got %p, expected %p\n", samplers[3], sampler_orig);
sampler_orig = (LPCSTR)&get_shader_samplers_blob[0x42];
sampler_orig = (const char *)&get_shader_samplers_blob[0x42];
ok(sampler_orig == samplers[4], "D3DXGetShaderSamplers failed, got %p, expected %p\n", samplers[4], sampler_orig);
ok(!strcmp(samplers[5], "dummy"), "D3DXGetShaderSamplers failed, got \"%s\", expected \"%s\"\n", samplers[5], "dummy");
......@@ -1701,8 +1702,9 @@ static const DWORD test_get_shader_constant_variables_blob[] =
0x80000000, 0x0000ffff,
};
const struct {
LPCSTR fullname;
const struct
{
const char *fullname;
D3DXCONSTANT_DESC desc;
UINT ctaboffset;
}
......@@ -1785,7 +1787,7 @@ static void test_get_shader_constant_variables(void)
for (i = 0; i < sizeof(test_get_shader_constant_variables_data) / sizeof(*test_get_shader_constant_variables_data); ++i)
{
LPCSTR fullname = test_get_shader_constant_variables_data[i].fullname;
const char *fullname = test_get_shader_constant_variables_data[i].fullname;
const D3DXCONSTANT_DESC *expected_desc = &test_get_shader_constant_variables_data[i].desc;
UINT ctaboffset = test_get_shader_constant_variables_data[i].ctaboffset;
......@@ -1918,7 +1920,7 @@ struct registerset_test
struct registerset_constants
{
LPCSTR fullname;
const char *fullname;
D3DXCONSTANT_DESC desc;
UINT ctaboffset;
};
......@@ -6031,10 +6033,10 @@ static void test_registerset(void)
return;
}
for(k = 0; k < sizeof(registerset_data) / sizeof(*registerset_data); ++k)
for (k = 0; k < sizeof(registerset_data) / sizeof(*registerset_data); ++k)
{
LPCSTR tablename = registerset_data[k].name;
LPCSTR name = registerset_data[k].var;
const char *tablename = registerset_data[k].name;
const char *name = registerset_data[k].var;
ID3DXConstantTable *ctable;
D3DXCONSTANTTABLE_DESC tdesc;
D3DXHANDLE constant;
......@@ -6055,7 +6057,7 @@ static void test_registerset(void)
for (i = 0; i < registerset_data[k].constant_count; ++i)
{
LPCSTR fullname = registerset_data[k].constants[i].fullname;
const char *fullname = registerset_data[k].constants[i].fullname;
const D3DXCONSTANT_DESC *expected_desc = &registerset_data[k].constants[i].desc;
D3DXCONSTANT_DESC desc;
UINT nr = 0;
......@@ -6332,9 +6334,9 @@ static void test_registerset_defaults(void)
return;
}
for(k = 0; k < sizeof(registerset_defaults_data) / sizeof(*registerset_defaults_data); ++k)
for (k = 0; k < sizeof(registerset_defaults_data) / sizeof(*registerset_defaults_data); ++k)
{
LPCSTR tablename = registerset_defaults_data[k].name;
const char *tablename = registerset_defaults_data[k].name;
ID3DXConstantTable *ctable;
D3DXCONSTANTTABLE_DESC tdesc;
BOOL is_vs;
......
......@@ -170,7 +170,7 @@ typedef interface ID3DXAnimationController *LPD3DXANIMATIONCONTROLLER;
#define INTERFACE ID3DXAllocateHierarchy
DECLARE_INTERFACE(ID3DXAllocateHierarchy)
{
STDMETHOD(CreateFrame)(THIS_ LPCSTR Name, LPD3DXFRAME *new_frame) PURE;
STDMETHOD(CreateFrame)(THIS_ const char *name, D3DXFRAME **new_frame) PURE;
STDMETHOD(CreateMeshContainer)(THIS_ const char *name, const D3DXMESHDATA *mesh_data,
const D3DXMATERIAL *materials, const D3DXEFFECTINSTANCE *effect_instances,
DWORD num_materials, const DWORD *adjacency, ID3DXSkinInfo *skin_info,
......@@ -211,12 +211,12 @@ DECLARE_INTERFACE_(ID3DXAnimationSet, IUnknown)
STDMETHOD_(ULONG, AddRef)(THIS) PURE;
STDMETHOD_(ULONG, Release)(THIS) PURE;
/*** ID3DXAnimationSet methods ***/
STDMETHOD_(LPCSTR, GetName)(THIS) PURE;
STDMETHOD_(const char *, GetName)(THIS) PURE;
STDMETHOD_(DOUBLE, GetPeriod)(THIS) PURE;
STDMETHOD_(DOUBLE, GetPeriodicPosition)(THIS_ DOUBLE position) PURE;
STDMETHOD_(UINT, GetNumAnimations)(THIS) PURE;
STDMETHOD(GetAnimationNameByIndex)(THIS_ UINT index, LPCSTR *name) PURE;
STDMETHOD(GetAnimationIndexByName)(THIS_ LPCSTR name, UINT *index) PURE;
STDMETHOD(GetAnimationNameByIndex)(THIS_ UINT index, const char **name) PURE;
STDMETHOD(GetAnimationIndexByName)(THIS_ const char *name, UINT *index) PURE;
STDMETHOD(GetSRT)(THIS_ DOUBLE periodic_position, UINT animation, D3DXVECTOR3 *scale,
D3DXQUATERNION *rotation, D3DXVECTOR3 *translation) PURE;
STDMETHOD(GetCallback)(THIS_ DOUBLE position, DWORD flags, DOUBLE *callback_position,
......@@ -232,12 +232,12 @@ DECLARE_INTERFACE_(ID3DXKeyframedAnimationSet, ID3DXAnimationSet)
STDMETHOD_(ULONG, AddRef)(THIS) PURE;
STDMETHOD_(ULONG, Release)(THIS) PURE;
/*** ID3DXAnimationSet methods ***/
STDMETHOD_(LPCSTR, GetName)(THIS) PURE;
STDMETHOD_(const char *, GetName)(THIS) PURE;
STDMETHOD_(DOUBLE, GetPeriod)(THIS) PURE;
STDMETHOD_(DOUBLE, GetPeriodicPosition)(THIS_ DOUBLE position) PURE;
STDMETHOD_(UINT, GetNumAnimations)(THIS) PURE;
STDMETHOD(GetAnimationNameByIndex)(THIS_ UINT index, LPCSTR *name) PURE;
STDMETHOD(GetAnimationIndexByName)(THIS_ LPCSTR name, UINT *index) PURE;
STDMETHOD(GetAnimationNameByIndex)(THIS_ UINT index, const char **name) PURE;
STDMETHOD(GetAnimationIndexByName)(THIS_ const char *name, UINT *index) PURE;
STDMETHOD(GetSRT)(THIS_ DOUBLE periodic_position, UINT animation, D3DXVECTOR3 *scale,
D3DXQUATERNION *rotation, D3DXVECTOR3 *translation) PURE;
STDMETHOD(GetCallback)(THIS_ DOUBLE position, DWORD flags, DOUBLE *callback_position,
......@@ -264,9 +264,9 @@ DECLARE_INTERFACE_(ID3DXKeyframedAnimationSet, ID3DXAnimationSet)
STDMETHOD(UnregisterScaleKey)(THIS_ UINT animation, UINT key) PURE;
STDMETHOD(UnregisterRotationKey)(THIS_ UINT animation, UINT key) PURE;
STDMETHOD(UnregisterTranslationKey)(THIS_ UINT animation, UINT key) PURE;
STDMETHOD(RegisterAnimationSRTKeys)(THIS_ LPCSTR name, UINT num_scale_keys,
UINT num_rotation_keys, UINT num_translation_keys, CONST D3DXKEY_VECTOR3 *scale_keys,
CONST D3DXKEY_QUATERNION *rotation_keys, CONST D3DXKEY_VECTOR3 *translation_keys,
STDMETHOD(RegisterAnimationSRTKeys)(THIS_ const char *name, UINT num_scale_keys,
UINT num_rotation_keys, UINT num_translation_keys, const D3DXKEY_VECTOR3 *scale_keys,
const D3DXKEY_QUATERNION *rotation_keys, const D3DXKEY_VECTOR3 *translation_keys,
DWORD *animation_index) PURE;
STDMETHOD(Compress)(THIS_ DWORD flags, float lossiness, D3DXFRAME *hierarchy,
ID3DXBuffer **compressed_data) PURE;
......@@ -282,12 +282,12 @@ DECLARE_INTERFACE_(ID3DXCompressedAnimationSet, ID3DXAnimationSet)
STDMETHOD_(ULONG, AddRef)(THIS) PURE;
STDMETHOD_(ULONG, Release)(THIS) PURE;
/*** ID3DXAnimationSet methods ***/
STDMETHOD_(LPCSTR, GetName)(THIS) PURE;
STDMETHOD_(const char *, GetName)(THIS) PURE;
STDMETHOD_(DOUBLE, GetPeriod)(THIS) PURE;
STDMETHOD_(DOUBLE, GetPeriodicPosition)(THIS_ DOUBLE position) PURE;
STDMETHOD_(UINT, GetNumAnimations)(THIS) PURE;
STDMETHOD(GetAnimationNameByIndex)(THIS_ UINT index, LPCSTR *name) PURE;
STDMETHOD(GetAnimationIndexByName)(THIS_ LPCSTR name, UINT *index) PURE;
STDMETHOD(GetAnimationNameByIndex)(THIS_ UINT index, const char **name) PURE;
STDMETHOD(GetAnimationIndexByName)(THIS_ const char *name, UINT *index) PURE;
STDMETHOD(GetSRT)(THIS_ DOUBLE periodic_position, UINT animation, D3DXVECTOR3 *scale,
D3DXQUATERNION *rotation, D3DXVECTOR3 *translation) PURE;
STDMETHOD(GetCallback)(THIS_ DOUBLE position, DWORD flags, DOUBLE *callback_position,
......@@ -320,7 +320,7 @@ DECLARE_INTERFACE_(ID3DXAnimationController, IUnknown)
STDMETHOD_(UINT, GetMaxNumAnimationSets)(THIS) PURE;
STDMETHOD_(UINT, GetMaxNumTracks)(THIS) PURE;
STDMETHOD_(UINT, GetMaxNumEvents)(THIS) PURE;
STDMETHOD(RegisterAnimationOutput)(THIS_ LPCSTR name, D3DXMATRIX *matrix,
STDMETHOD(RegisterAnimationOutput)(THIS_ const char *name, D3DXMATRIX *matrix,
D3DXVECTOR3 *scale, D3DXQUATERNION *rotation, D3DXVECTOR3 *translation) PURE;
STDMETHOD(RegisterAnimationSet)(THIS_ ID3DXAnimationSet *anim_set) PURE;
STDMETHOD(UnregisterAnimationSet)(THIS_ ID3DXAnimationSet *anim_set) PURE;
......@@ -387,7 +387,7 @@ HRESULT WINAPI D3DXSaveMeshHierarchyToFileW(const WCHAR *filename, DWORD format,
#define D3DXSaveMeshHierarchyToFile WINELIB_NAME_AW(D3DXSaveMeshHierarchyToFile)
HRESULT WINAPI D3DXFrameDestroy(D3DXFRAME *frame_root, ID3DXAllocateHierarchy *alloc);
HRESULT WINAPI D3DXFrameAppendChild(LPD3DXFRAME, CONST D3DXFRAME*);
LPD3DXFRAME WINAPI D3DXFrameFind(CONST D3DXFRAME*, LPCSTR);
D3DXFRAME * WINAPI D3DXFrameFind(const D3DXFRAME *root, const char *name);
HRESULT WINAPI D3DXFrameRegisterNamedMatrices(D3DXFRAME *frame_root, ID3DXAnimationController *animation_controller);
UINT WINAPI D3DXFrameNumNamedMatrices(CONST D3DXFRAME *frame_root);
HRESULT WINAPI D3DXFrameCalculateBoundingSphere(CONST D3DXFRAME*, LPD3DXVECTOR3, FLOAT*);
......
......@@ -143,7 +143,7 @@ DECLARE_INTERFACE_(ID3DXFont, IUnknown)
STDMETHOD(PreloadCharacters)(THIS_ UINT first, UINT last) PURE;
STDMETHOD(PreloadGlyphs)(THIS_ UINT first, UINT last) PURE;
STDMETHOD(PreloadTextA)(THIS_ LPCSTR string, INT count) PURE;
STDMETHOD(PreloadTextA)(THIS_ const char *string, INT count) PURE;
STDMETHOD(PreloadTextW)(THIS_ const WCHAR *string, INT count) PURE;
STDMETHOD_(INT, DrawTextA)(THIS_ struct ID3DXSprite *sprite, const char *string,
......
......@@ -31,16 +31,18 @@
#define D3DX_PARAMETER_LITERAL 2
#define D3DX_PARAMETER_ANNOTATION 4
typedef struct _D3DXEFFECT_DESC {
LPCSTR Creator;
typedef struct _D3DXEFFECT_DESC
{
const char *Creator;
UINT Parameters;
UINT Techniques;
UINT Functions;
} D3DXEFFECT_DESC;
typedef struct _D3DXPARAMETER_DESC {
LPCSTR Name;
LPCSTR Semantic;
typedef struct _D3DXPARAMETER_DESC
{
const char *Name;
const char *Semantic;
D3DXPARAMETER_CLASS Class;
D3DXPARAMETER_TYPE Type;
UINT Rows;
......@@ -52,21 +54,24 @@ typedef struct _D3DXPARAMETER_DESC {
UINT Bytes;
} D3DXPARAMETER_DESC;
typedef struct _D3DXTECHNIQUE_DESC {
LPCSTR Name;
typedef struct _D3DXTECHNIQUE_DESC
{
const char *Name;
UINT Passes;
UINT Annotations;
} D3DXTECHNIQUE_DESC;
typedef struct _D3DXPASS_DESC {
LPCSTR Name;
typedef struct _D3DXPASS_DESC
{
const char *Name;
UINT Annotations;
CONST DWORD *pVertexShaderFunction;
CONST DWORD *pPixelShaderFunction;
} D3DXPASS_DESC;
typedef struct _D3DXFUNCTION_DESC {
LPCSTR Name;
typedef struct _D3DXFUNCTION_DESC
{
const char *Name;
UINT Annotations;
} D3DXFUNCTION_DESC;
......@@ -105,17 +110,17 @@ DECLARE_INTERFACE_(ID3DXBaseEffect, IUnknown)
STDMETHOD(GetPassDesc)(THIS_ D3DXHANDLE pass, D3DXPASS_DESC* desc) PURE;
STDMETHOD(GetFunctionDesc)(THIS_ D3DXHANDLE shader, D3DXFUNCTION_DESC* desc) PURE;
STDMETHOD_(D3DXHANDLE, GetParameter)(THIS_ D3DXHANDLE parameter, UINT index) PURE;
STDMETHOD_(D3DXHANDLE, GetParameterByName)(THIS_ D3DXHANDLE parameter, LPCSTR name) PURE;
STDMETHOD_(D3DXHANDLE, GetParameterBySemantic)(THIS_ D3DXHANDLE parameter, LPCSTR semantic) PURE;
STDMETHOD_(D3DXHANDLE, GetParameterByName)(THIS_ D3DXHANDLE parameter, const char *name) PURE;
STDMETHOD_(D3DXHANDLE, GetParameterBySemantic)(THIS_ D3DXHANDLE parameter, const char *semantic) PURE;
STDMETHOD_(D3DXHANDLE, GetParameterElement)(THIS_ D3DXHANDLE parameter, UINT index) PURE;
STDMETHOD_(D3DXHANDLE, GetTechnique)(THIS_ UINT index) PURE;
STDMETHOD_(D3DXHANDLE, GetTechniqueByName)(THIS_ LPCSTR name) PURE;
STDMETHOD_(D3DXHANDLE, GetTechniqueByName)(THIS_ const char *name) PURE;
STDMETHOD_(D3DXHANDLE, GetPass)(THIS_ D3DXHANDLE technique, UINT index) PURE;
STDMETHOD_(D3DXHANDLE, GetPassByName)(THIS_ D3DXHANDLE technique, LPCSTR name) PURE;
STDMETHOD_(D3DXHANDLE, GetPassByName)(THIS_ D3DXHANDLE technique, const char *name) PURE;
STDMETHOD_(D3DXHANDLE, GetFunction)(THIS_ UINT index);
STDMETHOD_(D3DXHANDLE, GetFunctionByName)(THIS_ LPCSTR name);
STDMETHOD_(D3DXHANDLE, GetFunctionByName)(THIS_ const char *name);
STDMETHOD_(D3DXHANDLE, GetAnnotation)(THIS_ D3DXHANDLE object, UINT index) PURE;
STDMETHOD_(D3DXHANDLE, GetAnnotationByName)(THIS_ D3DXHANDLE object, LPCSTR name) PURE;
STDMETHOD_(D3DXHANDLE, GetAnnotationByName)(THIS_ D3DXHANDLE object, const char *name) PURE;
STDMETHOD(SetValue)(THIS_ D3DXHANDLE parameter, LPCVOID data, UINT bytes) PURE;
STDMETHOD(GetValue)(THIS_ D3DXHANDLE parameter, LPVOID data, UINT bytes) PURE;
STDMETHOD(SetBool)(THIS_ D3DXHANDLE parameter, BOOL b) PURE;
......@@ -146,8 +151,8 @@ DECLARE_INTERFACE_(ID3DXBaseEffect, IUnknown)
STDMETHOD(GetMatrixTransposeArray)(THIS_ D3DXHANDLE parameter, D3DXMATRIX* matrix, UINT count) PURE;
STDMETHOD(SetMatrixTransposePointerArray)(THIS_ D3DXHANDLE parameter, CONST D3DXMATRIX** matrix, UINT count) PURE;
STDMETHOD(GetMatrixTransposePointerArray)(THIS_ D3DXHANDLE parameter, D3DXMATRIX** matrix, UINT count) PURE;
STDMETHOD(SetString)(THIS_ D3DXHANDLE parameter, LPCSTR string) PURE;
STDMETHOD(GetString)(THIS_ D3DXHANDLE parameter, LPCSTR* string) PURE;
STDMETHOD(SetString)(THIS_ D3DXHANDLE parameter, const char *string) PURE;
STDMETHOD(GetString)(THIS_ D3DXHANDLE parameter, const char **string) PURE;
STDMETHOD(SetTexture)(THIS_ D3DXHANDLE parameter, struct IDirect3DBaseTexture9 *texture) PURE;
STDMETHOD(GetTexture)(THIS_ D3DXHANDLE parameter, struct IDirect3DBaseTexture9 **texture) PURE;
STDMETHOD(GetPixelShader)(THIS_ D3DXHANDLE parameter, struct IDirect3DPixelShader9 **shader) PURE;
......@@ -209,17 +214,17 @@ DECLARE_INTERFACE_(ID3DXEffect, ID3DXBaseEffect)
STDMETHOD(GetPassDesc)(THIS_ D3DXHANDLE pass, D3DXPASS_DESC* desc) PURE;
STDMETHOD(GetFunctionDesc)(THIS_ D3DXHANDLE shader, D3DXFUNCTION_DESC* desc) PURE;
STDMETHOD_(D3DXHANDLE, GetParameter)(THIS_ D3DXHANDLE parameter, UINT index) PURE;
STDMETHOD_(D3DXHANDLE, GetParameterByName)(THIS_ D3DXHANDLE parameter, LPCSTR name) PURE;
STDMETHOD_(D3DXHANDLE, GetParameterBySemantic)(THIS_ D3DXHANDLE parameter, LPCSTR semantic) PURE;
STDMETHOD_(D3DXHANDLE, GetParameterByName)(THIS_ D3DXHANDLE parameter, const char *name) PURE;
STDMETHOD_(D3DXHANDLE, GetParameterBySemantic)(THIS_ D3DXHANDLE parameter, const char *semantic) PURE;
STDMETHOD_(D3DXHANDLE, GetParameterElement)(THIS_ D3DXHANDLE parameter, UINT index) PURE;
STDMETHOD_(D3DXHANDLE, GetTechnique)(THIS_ UINT index) PURE;
STDMETHOD_(D3DXHANDLE, GetTechniqueByName)(THIS_ LPCSTR name) PURE;
STDMETHOD_(D3DXHANDLE, GetTechniqueByName)(THIS_ const char *name) PURE;
STDMETHOD_(D3DXHANDLE, GetPass)(THIS_ D3DXHANDLE technique, UINT index) PURE;
STDMETHOD_(D3DXHANDLE, GetPassByName)(THIS_ D3DXHANDLE technique, LPCSTR name) PURE;
STDMETHOD_(D3DXHANDLE, GetPassByName)(THIS_ D3DXHANDLE technique, const char *name) PURE;
STDMETHOD_(D3DXHANDLE, GetFunction)(THIS_ UINT index);
STDMETHOD_(D3DXHANDLE, GetFunctionByName)(THIS_ LPCSTR name);
STDMETHOD_(D3DXHANDLE, GetFunctionByName)(THIS_ const char *name);
STDMETHOD_(D3DXHANDLE, GetAnnotation)(THIS_ D3DXHANDLE object, UINT index) PURE;
STDMETHOD_(D3DXHANDLE, GetAnnotationByName)(THIS_ D3DXHANDLE object, LPCSTR name) PURE;
STDMETHOD_(D3DXHANDLE, GetAnnotationByName)(THIS_ D3DXHANDLE object, const char *name) PURE;
STDMETHOD(SetValue)(THIS_ D3DXHANDLE parameter, LPCVOID data, UINT bytes) PURE;
STDMETHOD(GetValue)(THIS_ D3DXHANDLE parameter, LPVOID data, UINT bytes) PURE;
STDMETHOD(SetBool)(THIS_ D3DXHANDLE parameter, BOOL b) PURE;
......@@ -250,8 +255,8 @@ DECLARE_INTERFACE_(ID3DXEffect, ID3DXBaseEffect)
STDMETHOD(GetMatrixTransposeArray)(THIS_ D3DXHANDLE parameter, D3DXMATRIX* matrix, UINT count) PURE;
STDMETHOD(SetMatrixTransposePointerArray)(THIS_ D3DXHANDLE parameter, CONST D3DXMATRIX** matrix, UINT count) PURE;
STDMETHOD(GetMatrixTransposePointerArray)(THIS_ D3DXHANDLE parameter, D3DXMATRIX** matrix, UINT count) PURE;
STDMETHOD(SetString)(THIS_ D3DXHANDLE parameter, LPCSTR string) PURE;
STDMETHOD(GetString)(THIS_ D3DXHANDLE parameter, LPCSTR* string) PURE;
STDMETHOD(SetString)(THIS_ D3DXHANDLE parameter, const char *string) PURE;
STDMETHOD(GetString)(THIS_ D3DXHANDLE parameter, const char **string) PURE;
STDMETHOD(SetTexture)(THIS_ D3DXHANDLE parameter, struct IDirect3DBaseTexture9 *texture) PURE;
STDMETHOD(GetTexture)(THIS_ D3DXHANDLE parameter, struct IDirect3DBaseTexture9 **texture) PURE;
STDMETHOD(GetPixelShader)(THIS_ D3DXHANDLE parameter, struct IDirect3DPixelShader9 **shader) PURE;
......@@ -302,17 +307,17 @@ DECLARE_INTERFACE_(ID3DXEffectCompiler, ID3DXBaseEffect)
STDMETHOD(GetPassDesc)(THIS_ D3DXHANDLE pass, D3DXPASS_DESC* desc) PURE;
STDMETHOD(GetFunctionDesc)(THIS_ D3DXHANDLE shader, D3DXFUNCTION_DESC* desc) PURE;
STDMETHOD_(D3DXHANDLE, GetParameter)(THIS_ D3DXHANDLE parameter, UINT index) PURE;
STDMETHOD_(D3DXHANDLE, GetParameterByName)(THIS_ D3DXHANDLE parameter, LPCSTR name) PURE;
STDMETHOD_(D3DXHANDLE, GetParameterBySemantic)(THIS_ D3DXHANDLE parameter, LPCSTR semantic) PURE;
STDMETHOD_(D3DXHANDLE, GetParameterByName)(THIS_ D3DXHANDLE parameter, const char *name) PURE;
STDMETHOD_(D3DXHANDLE, GetParameterBySemantic)(THIS_ D3DXHANDLE parameter, const char *semantic) PURE;
STDMETHOD_(D3DXHANDLE, GetParameterElement)(THIS_ D3DXHANDLE parameter, UINT index) PURE;
STDMETHOD_(D3DXHANDLE, GetTechnique)(THIS_ UINT index) PURE;
STDMETHOD_(D3DXHANDLE, GetTechniqueByName)(THIS_ LPCSTR name) PURE;
STDMETHOD_(D3DXHANDLE, GetTechniqueByName)(THIS_ const char *name) PURE;
STDMETHOD_(D3DXHANDLE, GetPass)(THIS_ D3DXHANDLE technique, UINT index) PURE;
STDMETHOD_(D3DXHANDLE, GetPassByName)(THIS_ D3DXHANDLE technique, LPCSTR name) PURE;
STDMETHOD_(D3DXHANDLE, GetPassByName)(THIS_ D3DXHANDLE technique, const char *name) PURE;
STDMETHOD_(D3DXHANDLE, GetFunction)(THIS_ UINT index);
STDMETHOD_(D3DXHANDLE, GetFunctionByName)(THIS_ LPCSTR name);
STDMETHOD_(D3DXHANDLE, GetFunctionByName)(THIS_ const char *name);
STDMETHOD_(D3DXHANDLE, GetAnnotation)(THIS_ D3DXHANDLE object, UINT index) PURE;
STDMETHOD_(D3DXHANDLE, GetAnnotationByName)(THIS_ D3DXHANDLE object, LPCSTR name) PURE;
STDMETHOD_(D3DXHANDLE, GetAnnotationByName)(THIS_ D3DXHANDLE object, const char *name) PURE;
STDMETHOD(SetValue)(THIS_ D3DXHANDLE parameter, LPCVOID data, UINT bytes) PURE;
STDMETHOD(GetValue)(THIS_ D3DXHANDLE parameter, LPVOID data, UINT bytes) PURE;
STDMETHOD(SetBool)(THIS_ D3DXHANDLE parameter, BOOL b) PURE;
......@@ -343,8 +348,8 @@ DECLARE_INTERFACE_(ID3DXEffectCompiler, ID3DXBaseEffect)
STDMETHOD(GetMatrixTransposeArray)(THIS_ D3DXHANDLE parameter, D3DXMATRIX* matrix, UINT count) PURE;
STDMETHOD(SetMatrixTransposePointerArray)(THIS_ D3DXHANDLE parameter, CONST D3DXMATRIX** matrix, UINT count) PURE;
STDMETHOD(GetMatrixTransposePointerArray)(THIS_ D3DXHANDLE parameter, D3DXMATRIX** matrix, UINT count) PURE;
STDMETHOD(SetString)(THIS_ D3DXHANDLE parameter, LPCSTR string) PURE;
STDMETHOD(GetString)(THIS_ D3DXHANDLE parameter, LPCSTR* string) PURE;
STDMETHOD(SetString)(THIS_ D3DXHANDLE parameter, const char *string) PURE;
STDMETHOD(GetString)(THIS_ D3DXHANDLE parameter, const char **string) PURE;
STDMETHOD(SetTexture)(THIS_ D3DXHANDLE parameter, struct IDirect3DBaseTexture9 *texture) PURE;
STDMETHOD(GetTexture)(THIS_ D3DXHANDLE parameter, struct IDirect3DBaseTexture9 **texture) PURE;
STDMETHOD(GetPixelShader)(THIS_ D3DXHANDLE parameter, struct IDirect3DPixelShader9 **shader) PURE;
......
......@@ -526,8 +526,8 @@ DECLARE_INTERFACE_(ID3DXSkinInfo, IUnknown)
DWORD num_faces, DWORD *max_face_influences) PURE;
STDMETHOD(SetMinBoneInfluence)(THIS_ FLOAT min_influence) PURE;
STDMETHOD_(FLOAT, GetMinBoneInfluence)(THIS) PURE;
STDMETHOD(SetBoneName)(THIS_ DWORD bone, LPCSTR name) PURE;
STDMETHOD_(LPCSTR, GetBoneName)(THIS_ DWORD bone) PURE;
STDMETHOD(SetBoneName)(THIS_ DWORD bone_idx, const char *name) PURE;
STDMETHOD_(const char *, GetBoneName)(THIS_ DWORD bone_idx) PURE;
STDMETHOD(SetBoneOffsetMatrix)(THIS_ DWORD bone, CONST D3DXMATRIX* bone_transform) PURE;
STDMETHOD_(D3DXMATRIX *, GetBoneOffsetMatrix)(THIS_ DWORD bone) PURE;
STDMETHOD(Clone)(THIS_ ID3DXSkinInfo **skin_info) PURE;
......
......@@ -42,7 +42,7 @@
#define D3DXSHADER_USE_LEGACY_D3DX9_31_DLL 0x10000
typedef LPCSTR D3DXHANDLE;
typedef const char *D3DXHANDLE;
typedef enum _D3DXREGISTER_SET
{
......@@ -91,14 +91,14 @@ typedef enum D3DXPARAMETER_TYPE
typedef struct _D3DXCONSTANTTABLE_DESC
{
LPCSTR Creator;
const char *Creator;
DWORD Version;
UINT Constants;
} D3DXCONSTANTTABLE_DESC, *LPD3DXCONSTANTTABLE_DESC;
typedef struct _D3DXCONSTANT_DESC
{
LPCSTR Name;
const char *Name;
D3DXREGISTER_SET RegisterSet;
UINT RegisterIndex;
UINT RegisterCount;
......@@ -131,7 +131,7 @@ DECLARE_INTERFACE_(ID3DXConstantTable, ID3DXBuffer)
STDMETHOD(GetConstantDesc)(THIS_ D3DXHANDLE hConstant, D3DXCONSTANT_DESC *pConstantDesc, UINT *pCount) PURE;
STDMETHOD_(UINT, GetSamplerIndex)(THIS_ D3DXHANDLE hConstant) PURE;
STDMETHOD_(D3DXHANDLE, GetConstant)(THIS_ D3DXHANDLE hConstant, UINT Index) PURE;
STDMETHOD_(D3DXHANDLE, GetConstantByName)(THIS_ D3DXHANDLE hConstant, LPCSTR pName) PURE;
STDMETHOD_(D3DXHANDLE, GetConstantByName)(THIS_ D3DXHANDLE constant, const char *name) PURE;
STDMETHOD_(D3DXHANDLE, GetConstantElement)(THIS_ D3DXHANDLE hConstant, UINT Index) PURE;
STDMETHOD(SetDefaults)(THIS_ struct IDirect3DDevice9 *device) PURE;
STDMETHOD(SetValue)(THIS_ struct IDirect3DDevice9 *device, D3DXHANDLE constant,
......@@ -228,9 +228,10 @@ DECLARE_INTERFACE_(ID3DXConstantTable, ID3DXBuffer)
typedef struct ID3DXConstantTable *LPD3DXCONSTANTTABLE;
typedef struct _D3DXMACRO {
LPCSTR Name;
LPCSTR Definition;
typedef struct _D3DXMACRO
{
const char *Name;
const char *Definition;
} D3DXMACRO, *LPD3DXMACRO;
typedef struct _D3DXSEMANTIC {
......@@ -249,8 +250,9 @@ typedef enum _D3DXINCLUDE_TYPE
DECLARE_INTERFACE(ID3DXInclude)
{
STDMETHOD(Open)(THIS_ D3DXINCLUDE_TYPE include_type, LPCSTR filename, LPCVOID parent_data, LPCVOID *data, UINT *bytes) PURE;
STDMETHOD(Close)(THIS_ LPCVOID data) PURE;
STDMETHOD(Open)(THIS_ D3DXINCLUDE_TYPE include_type, const char *filename,
const void *parent_data, const void **data, UINT *bytes) PURE;
STDMETHOD(Close)(THIS_ const void *data) PURE;
};
#undef INTERFACE
......@@ -267,8 +269,8 @@ const char * WINAPI D3DXGetPixelShaderProfile(struct IDirect3DDevice9 *device);
UINT WINAPI D3DXGetShaderSize(const DWORD *byte_code);
DWORD WINAPI D3DXGetShaderVersion(const DWORD *byte_code);
const char * WINAPI D3DXGetVertexShaderProfile(struct IDirect3DDevice9 *device);
HRESULT WINAPI D3DXFindShaderComment(CONST DWORD* byte_code, DWORD fourcc, LPCVOID* data, UINT* size);
HRESULT WINAPI D3DXGetShaderSamplers(CONST DWORD *byte_code, LPCSTR *samplers, UINT *count);
HRESULT WINAPI D3DXFindShaderComment(const DWORD *byte_code, DWORD fourcc, const void **data, UINT *size);
HRESULT WINAPI D3DXGetShaderSamplers(const DWORD *byte_code, const char **samplers, UINT *count);
HRESULT WINAPI D3DXAssembleShaderFromFileA(const char *filename, const D3DXMACRO *defines,
ID3DXInclude *include, DWORD flags, ID3DXBuffer **shader, ID3DXBuffer **error_messages);
......
......@@ -92,11 +92,11 @@ extern "C" {
/* Image Information */
HRESULT WINAPI D3DXGetImageInfoFromFileA(LPCSTR file, D3DXIMAGE_INFO *info);
HRESULT WINAPI D3DXGetImageInfoFromFileA(const char *file, D3DXIMAGE_INFO *info);
HRESULT WINAPI D3DXGetImageInfoFromFileW(const WCHAR *file, D3DXIMAGE_INFO *info);
#define D3DXGetImageInfoFromFile WINELIB_NAME_AW(D3DXGetImageInfoFromFile)
HRESULT WINAPI D3DXGetImageInfoFromResourceA(HMODULE module, LPCSTR resource, D3DXIMAGE_INFO *info);
HRESULT WINAPI D3DXGetImageInfoFromResourceA(HMODULE module, const char *resource, D3DXIMAGE_INFO *info);
HRESULT WINAPI D3DXGetImageInfoFromResourceW(HMODULE module, const WCHAR *resource, D3DXIMAGE_INFO *info);
#define D3DXGetImageInfoFromResource WINELIB_NAME_AW(D3DXGetImageInfoFromResource)
......
......@@ -40,10 +40,11 @@ typedef DWORD D3DXF_FILELOADOPTIONS;
#define D3DXF_FILELOAD_FROMRESOURCE 0x02
#define D3DXF_FILELOAD_FROMMEMORY 0x03
typedef struct _D3DXF_FILELOADRESOURCE {
typedef struct _D3DXF_FILELOADRESOURCE
{
HMODULE hModule;
LPCSTR lpName;
LPCSTR lpType;
const char *lpName;
const char *lpType;
} D3DXF_FILELOADRESOURCE;
typedef struct _D3DXF_FILELOADMEMORY {
......@@ -114,7 +115,7 @@ DECLARE_INTERFACE_IID_(ID3DXFileSaveData,IUnknown,"cef08cfb-7b4f-4429-9624-2a690
STDMETHOD(GetType)(THIS_ GUID*) PURE;
STDMETHOD(AddDataObject)(THIS_ REFGUID template_guid, const char *name, const GUID *guid,
SIZE_T data_size, const void *data, ID3DXFileSaveData **obj) PURE;
STDMETHOD(AddDataReference)(THIS_ LPCSTR, CONST GUID*) PURE;
STDMETHOD(AddDataReference)(THIS_ const char *name, const GUID *id) PURE;
};
#undef INTERFACE
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment