Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
77ee90b5
Commit
77ee90b5
authored
Sep 03, 2013
by
Henri Verbeet
Committed by
Alexandre Julliard
Sep 03, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3dx9: Avoid LPSTR.
parent
0d2d8479
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
21 additions
and
19 deletions
+21
-19
effect.c
dlls/d3dx9_36/effect.c
+5
-5
mesh.c
dlls/d3dx9_36/mesh.c
+8
-6
mesh.c
dlls/d3dx9_36/tests/mesh.c
+1
-1
d3dx9anim.h
include/d3dx9anim.h
+2
-2
d3dx9mesh.h
include/d3dx9mesh.h
+3
-3
d3dx9xof.h
include/d3dx9xof.h
+2
-2
No files found.
dlls/d3dx9_36/effect.c
View file @
77ee90b5
...
...
@@ -604,7 +604,7 @@ static void free_parameter_state(struct d3dx_parameter *param, BOOL element, BOO
switch
(
param
->
type
)
{
case
D3DXPT_STRING
:
HeapFree
(
GetProcessHeap
(),
0
,
*
(
LPSTR
*
)
param
->
data
);
HeapFree
(
GetProcessHeap
(),
0
,
*
(
char
*
*
)
param
->
data
);
if
(
!
child
)
HeapFree
(
GetProcessHeap
(),
0
,
param
->
data
);
break
;
...
...
@@ -621,7 +621,7 @@ static void free_parameter_state(struct d3dx_parameter *param, BOOL element, BOO
}
else
{
HeapFree
(
GetProcessHeap
(),
0
,
*
(
LPSTR
*
)
param
->
data
);
HeapFree
(
GetProcessHeap
(),
0
,
*
(
char
*
*
)
param
->
data
);
}
if
(
!
child
)
HeapFree
(
GetProcessHeap
(),
0
,
param
->
data
);
break
;
...
...
@@ -637,7 +637,7 @@ static void free_parameter_state(struct d3dx_parameter *param, BOOL element, BOO
}
else
{
HeapFree
(
GetProcessHeap
(),
0
,
*
(
LPSTR
*
)
param
->
data
);
HeapFree
(
GetProcessHeap
(),
0
,
*
(
char
*
*
)
param
->
data
);
}
/* samplers have always own data, so free that */
HeapFree
(
GetProcessHeap
(),
0
,
param
->
data
);
...
...
@@ -654,7 +654,7 @@ static void free_parameter_state(struct d3dx_parameter *param, BOOL element, BOO
{
if
(
st
!=
ST_CONSTANT
)
{
HeapFree
(
GetProcessHeap
(),
0
,
*
(
LPSTR
*
)
param
->
data
);
HeapFree
(
GetProcessHeap
(),
0
,
*
(
char
*
*
)
param
->
data
);
}
HeapFree
(
GetProcessHeap
(),
0
,
param
->
data
);
}
...
...
@@ -4417,7 +4417,7 @@ static HRESULT d3dx9_parse_data(struct d3dx_parameter *param, const char **ptr,
{
case
D3DXPT_STRING
:
/* re-read with size (sizeof(DWORD) = 4) */
hr
=
d3dx9_parse_name
((
LPSTR
*
)
param
->
data
,
*
ptr
-
4
);
hr
=
d3dx9_parse_name
((
char
*
*
)
param
->
data
,
*
ptr
-
4
);
if
(
hr
!=
D3D_OK
)
{
WARN
(
"Failed to parse string data
\n
"
);
...
...
dlls/d3dx9_36/mesh.c
View file @
77ee90b5
...
...
@@ -2638,7 +2638,7 @@ struct mesh_data {
DWORD
nb_bones
;
};
static
HRESULT
parse_texture_filename
(
ID3DXFileData
*
filedata
,
LPSTR
*
filename_out
)
static
HRESULT
parse_texture_filename
(
ID3DXFileData
*
filedata
,
char
*
*
filename_out
)
{
HRESULT
hr
;
SIZE_T
data_size
;
...
...
@@ -2658,12 +2658,13 @@ static HRESULT parse_texture_filename(ID3DXFileData *filedata, LPSTR *filename_o
if
(
FAILED
(
hr
))
return
hr
;
/* FIXME: String must be retrieved directly instead of through a pointer once ID3DXFILE is fixed */
if
(
data_size
<
sizeof
(
LPSTR
))
{
if
(
data_size
<
sizeof
(
filename_in
))
{
WARN
(
"truncated data (%lu bytes)
\n
"
,
data_size
);
filedata
->
lpVtbl
->
Unlock
(
filedata
);
return
E_FAIL
;
}
filename_in
=
*
(
LPSTR
*
)
data
;
filename_in
=
*
(
char
*
*
)
data
;
filename
=
HeapAlloc
(
GetProcessHeap
(),
0
,
strlen
(
filename_in
)
+
1
);
if
(
!
filename
)
{
...
...
@@ -3398,7 +3399,7 @@ static HRESULT generate_effects(ID3DXBuffer *materials, DWORD num_materials,
for
(
j
=
0
;
j
<
ARRAY_SIZE
(
material_effects
);
j
++
)
{
defaults
->
pParamName
=
(
LPSTR
)
out_ptr
;
defaults
->
pParamName
=
(
char
*
)
out_ptr
;
strcpy
(
defaults
->
pParamName
,
material_effects
[
j
].
param_name
);
defaults
->
pValue
=
defaults
->
pParamName
+
material_effects
[
j
].
name_size
;
defaults
->
Type
=
D3DXEDT_FLOATS
;
...
...
@@ -3408,8 +3409,9 @@ static HRESULT generate_effects(ID3DXBuffer *materials, DWORD num_materials,
defaults
++
;
}
if
(
material_ptr
->
pTextureFilename
)
{
defaults
->
pParamName
=
(
LPSTR
)
out_ptr
;
if
(
material_ptr
->
pTextureFilename
)
{
defaults
->
pParamName
=
(
char
*
)
out_ptr
;
strcpy
(
defaults
->
pParamName
,
texture_paramname
);
defaults
->
pValue
=
defaults
->
pParamName
+
sizeof
(
texture_paramname
);
defaults
->
Type
=
D3DXEDT_STRING
;
...
...
dlls/d3dx9_36/tests/mesh.c
View file @
77ee90b5
...
...
@@ -1781,7 +1781,7 @@ static void check_generated_effects_(int line, const D3DXMATERIAL *materials, DW
static
char
*
strdupA
(
const
char
*
p
)
{
LPSTR
ret
;
char
*
ret
;
if
(
!
p
)
return
NULL
;
ret
=
HeapAlloc
(
GetProcessHeap
(),
0
,
strlen
(
p
)
+
1
);
if
(
ret
)
strcpy
(
ret
,
p
);
...
...
include/d3dx9anim.h
View file @
77ee90b5
...
...
@@ -92,7 +92,7 @@ typedef struct _D3DXMESHDATA
typedef
struct
_D3DXMESHCONTAINER
{
LPSTR
Name
;
char
*
Name
;
D3DXMESHDATA
MeshData
;
LPD3DXMATERIAL
pMaterials
;
LPD3DXEFFECTINSTANCE
pEffects
;
...
...
@@ -104,7 +104,7 @@ typedef struct _D3DXMESHCONTAINER
typedef
struct
_D3DXFRAME
{
LPSTR
Name
;
char
*
Name
;
D3DXMATRIX
TransformationMatrix
;
LPD3DXMESHCONTAINER
pMeshContainer
;
struct
_D3DXFRAME
*
pFrameSibling
;
...
...
include/d3dx9mesh.h
View file @
77ee90b5
...
...
@@ -193,12 +193,12 @@ typedef D3DXATTRIBUTERANGE* LPD3DXATTRIBUTERANGE;
typedef
struct
_D3DXMATERIAL
{
D3DMATERIAL9
MatD3D
;
LPSTR
pTextureFilename
;
char
*
pTextureFilename
;
}
D3DXMATERIAL
,
*
LPD3DXMATERIAL
;
typedef
struct
_D3DXEFFECTDEFAULT
{
LPSTR
pParamName
;
char
*
pParamName
;
D3DXEFFECTDEFAULTTYPE
Type
;
DWORD
NumBytes
;
LPVOID
pValue
;
...
...
@@ -206,7 +206,7 @@ typedef struct _D3DXEFFECTDEFAULT
typedef
struct
_D3DXEFFECTINSTANCE
{
LPSTR
pEffectFilename
;
char
*
pEffectFilename
;
DWORD
NumDefaults
;
LPD3DXEFFECTDEFAULT
pDefaults
;
}
D3DXEFFECTINSTANCE
,
*
LPD3DXEFFECTINSTANCE
;
...
...
include/d3dx9xof.h
View file @
77ee90b5
...
...
@@ -110,7 +110,7 @@ DECLARE_INTERFACE_IID_(ID3DXFileSaveData,IUnknown,"cef08cfb-7b4f-4429-9624-2a690
STDMETHOD_
(
ULONG
,
Release
)(
THIS
)
PURE
;
/*** ID3DXFileSaveObject methods ***/
STDMETHOD
(
GetSave
)(
THIS_
ID3DXFileSaveObject
**
save_obj
)
PURE
;
STDMETHOD
(
GetName
)(
THIS_
LPSTR
,
SIZE_T
*
)
PURE
;
STDMETHOD
(
GetName
)(
THIS_
char
*
name
,
SIZE_T
*
size
)
PURE
;
STDMETHOD
(
GetId
)(
THIS_
LPGUID
)
PURE
;
STDMETHOD
(
GetType
)(
THIS_
GUID
*
)
PURE
;
STDMETHOD
(
AddDataObject
)(
THIS_
REFGUID
template_guid
,
const
char
*
name
,
const
GUID
*
guid
,
...
...
@@ -145,7 +145,7 @@ DECLARE_INTERFACE_IID_(ID3DXFileData,IUnknown,"cef08cfd-7b4f-4429-9624-2a690a933
STDMETHOD_
(
ULONG
,
Release
)(
THIS
)
PURE
;
/*** ID3DXFileData methods ***/
STDMETHOD
(
GetEnum
)(
THIS_
ID3DXFileEnumObject
**
enum_obj
)
PURE
;
STDMETHOD
(
GetName
)(
THIS_
LPSTR
,
SIZE_T
*
)
PURE
;
STDMETHOD
(
GetName
)(
THIS_
char
*
name
,
SIZE_T
*
size
)
PURE
;
STDMETHOD
(
GetId
)(
THIS_
LPGUID
)
PURE
;
STDMETHOD
(
Lock
)(
THIS_
SIZE_T
*
,
LPCVOID
*
)
PURE
;
STDMETHOD
(
Unlock
)(
THIS
)
PURE
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment